Now on revision 112664. ------------------------------------------------------------ revno: 112664 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-05-21 20:21:30 -0700 message: Small viper clean-up * lisp/emulation/viper-cmd.el (viper-set-searchstyle-toggling-macros) (viper-set-parsing-style-toggling-macro) (viper-set-emacs-state-searchstyle-macros): Use called-interactively-p on Emacs. (viper-looking-back): Make it an obsolete alias. Update callers. * lisp/emulation/viper-ex.el: Load viper-keym, not viper-cmd. Use looking-back rather than viper-looking-back. (viper-tmp-insert-at-eob, viper-enlarge-region) (viper-read-string-with-history, viper-register-to-point) (viper-append-to-register, viper-change-state-to-vi) (viper-backward-char-carefully, viper-forward-char-carefully) (viper-Put-back, viper-put-back, viper-add-newline-at-eob-if-necessary) (viper-change-state-to-emacs): Declare. * lisp/emulation/viper-macs.el: Load viper-mous, viper-ex, not viper-cmd. (viper-change-state-to-insert, viper-change-state-to-vi): Declare. * lisp/emulation/viper-mous.el: Do not load viper-cmd. (viper-backward-char-carefully, viper-forward-char-carefully) (viper-forward-word, viper-adjust-window): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-22 03:17:22 +0000 +++ lisp/ChangeLog 2013-05-22 03:21:30 +0000 @@ -1,5 +1,24 @@ 2013-05-22 Glenn Morris + * emulation/viper-cmd.el (viper-set-searchstyle-toggling-macros) + (viper-set-parsing-style-toggling-macro) + (viper-set-emacs-state-searchstyle-macros): + Use called-interactively-p on Emacs. + (viper-looking-back): Make it an obsolete alias. Update callers. + * emulation/viper-ex.el: Load viper-keym, not viper-cmd. + Use looking-back rather than viper-looking-back. + (viper-tmp-insert-at-eob, viper-enlarge-region) + (viper-read-string-with-history, viper-register-to-point) + (viper-append-to-register, viper-change-state-to-vi) + (viper-backward-char-carefully, viper-forward-char-carefully) + (viper-Put-back, viper-put-back, viper-add-newline-at-eob-if-necessary) + (viper-change-state-to-emacs): Declare. + * emulation/viper-macs.el: Load viper-mous, viper-ex, not viper-cmd. + (viper-change-state-to-insert, viper-change-state-to-vi): Declare. + * emulation/viper-mous.el: Do not load viper-cmd. + (viper-backward-char-carefully, viper-forward-char-carefully) + (viper-forward-word, viper-adjust-window): Declare. + * vc/ediff.el (ediff-version): Use called-interactively-p on Emacs. * progmodes/idlw-help.el (idlwave-help-fontify): === modified file 'lisp/emulation/viper-cmd.el' --- lisp/emulation/viper-cmd.el 2013-03-12 02:08:21 +0000 +++ lisp/emulation/viper-cmd.el 2013-05-22 03:21:30 +0000 @@ -3781,9 +3781,9 @@ "///" 'vi-state [2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return] scope) - ;; XEmacs has no called-interactively-p - ;; (if (called-interactively-p 'interactive) - (if (interactive-p) + (if (if (featurep 'xemacs) + (interactive-p) + (called-interactively-p 'interactive)) (message "// and /// now toggle case-sensitivity and regexp search"))) (viper-unrecord-kbd-macro "//" 'vi-state) @@ -3806,10 +3806,9 @@ "%%%" 'vi-state [(meta x) v i p e r - t o g g l e - p a r s e - s e x p - i g n o r e - c o m m e n t s return] 't) - ;; XEmacs has no called-interactively-p. And interactive-p - ;; works fine here. - ;; (if (called-interactively-p 'interactive) - (if (interactive-p) + (if (if (featurep 'xemacs) + (interactive-p) + (called-interactively-p 'interactive)) (message "%%%%%% now toggles whether comments should be parsed for matching parentheses"))) (viper-unrecord-kbd-macro "%%%" 'vi-state)))) @@ -3838,10 +3837,9 @@ "///" 'emacs-state [2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return] (or arg-majormode major-mode)) - ;; called-interactively-p does not work for - ;; XEmacs. interactive-p is ok here. - ;; (if (called-interactively-p 'interactive) - (if (interactive-p) + (if (if (featurep 'xemacs) + (interactive-p) + (called-interactively-p 'interactive)) (message "// and /// now toggle case-sensitivity and regexp search."))) (viper-unrecord-kbd-macro "//" 'emacs-state) @@ -4608,10 +4606,7 @@ ;; Input Mode Indentation -;; Returns t, if the string before point matches the regexp STR. -(defsubst viper-looking-back (str) - (and (save-excursion (re-search-backward str nil t)) - (= (point) (match-end 0)))) +(define-obsolete-function-alias 'viper-looking-back 'looking-back "24.4") (defun viper-forward-indent () @@ -4625,7 +4620,7 @@ (interactive) (if viper-cted (let ((p (point)) (c (current-column)) bol (indent t)) - (if (viper-looking-back "[0^]") + (if (looking-back "[0^]") (progn (if (eq ?^ (preceding-char)) (setq viper-preserve-indent t)) @@ -4637,7 +4632,7 @@ (delete-region (point) p) (if indent (indent-to (- c viper-shift-width))) - (if (or (bolp) (viper-looking-back "[^ \t]")) + (if (or (bolp) (looking-back "[^ \t]")) (setq viper-cted nil))))) ;; do smart indent === modified file 'lisp/emulation/viper-ex.el' --- lisp/emulation/viper-ex.el 2013-01-01 09:11:05 +0000 +++ lisp/emulation/viper-ex.el 2013-05-22 03:21:30 +0000 @@ -39,14 +39,7 @@ (defvar viper-case-fold-search) (defvar explicit-shell-file-name) (defvar compile-command) - -;; loading happens only in non-interactive compilation -;; in order to spare non-viperized emacs from being viperized -(if noninteractive - (eval-when-compile - (if (not (featurep 'viper-cmd)) - (require 'viper-cmd)) - )) +(require 'viper-keym) ;; end pacifier (require 'viper-util) @@ -462,7 +455,7 @@ (while (and (not (eolp)) cont) ;;(re-search-forward "[^/]*/") (re-search-forward "[^/]*\\(/\\|\n\\)") - (if (not (viper-looking-back "[^\\\\]\\(\\\\\\\\\\)*\\\\/")) + (if (not (looking-back "[^\\\\]\\(\\\\\\\\\\)*\\\\/")) (setq cont nil)))) (backward-char 1) (setq ex-token (buffer-substring (point) (mark t))) @@ -475,7 +468,7 @@ (while (and (not (eolp)) cont) ;;(re-search-forward "[^\\?]*\\?") (re-search-forward "[^\\?]*\\(\\?\\|\n\\)") - (if (not (viper-looking-back "[^\\\\]\\(\\\\\\\\\\)*\\\\\\?")) + (if (not (looking-back "[^\\\\]\\(\\\\\\\\\\)*\\\\\\?")) (setq cont nil)) (backward-char 1) (if (not (looking-at "\n")) (forward-char 1)))) @@ -553,11 +546,13 @@ (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (goto-char (point-max))) - (cond ((viper-looking-back quit-regex1) (exit-minibuffer)) - ((viper-looking-back stay-regex) (insert " ")) - ((viper-looking-back quit-regex2) (exit-minibuffer)) + (cond ((looking-back quit-regex1) (exit-minibuffer)) + ((looking-back stay-regex) (insert " ")) + ((looking-back quit-regex2) (exit-minibuffer)) (t (insert " "))))) +(declare-function viper-tmp-insert-at-eob "viper-cmd" (msg)) + ;; complete Ex command (defun ex-cmd-complete () (interactive) @@ -568,14 +563,14 @@ save-pos (point))) (if (or (= dist 0) - (viper-looking-back "\\([ \t]*['`][ \t]*[a-z]*\\)") - (viper-looking-back + (looking-back "\\([ \t]*['`][ \t]*[a-z]*\\)") + (looking-back "^[ \t]*[a-zA-Z!=>&~][ \t]*[/?]*[ \t]+[a-zA-Z!=>&~]+")) ;; Preceding characters are not the ones allowed in an Ex command ;; or we have typed past command name. ;; Note: we didn't do parsing, so there can be surprises. - (if (or (viper-looking-back "[a-zA-Z!=>&~][ \t]*[/?]*[ \t]*") - (viper-looking-back "\\([ \t]*['`][ \t]*[a-z]*\\)") + (if (or (looking-back "[a-zA-Z!=>&~][ \t]*[/?]*[ \t]*") + (looking-back "\\([ \t]*['`][ \t]*[a-z]*\\)") (looking-at "[^ \t\n\C-m]")) nil (with-output-to-temp-buffer "*Completions*" @@ -605,6 +600,11 @@ ))) +(declare-function viper-enlarge-region "viper-cmd" (beg end)) +(declare-function viper-read-string-with-history "viper-cmd" + (prompt &optional viper-initial history-var + default keymap init-message)) + ;; Read Ex commands ;; ARG is a prefix argument. If given, the ex command runs on the region ;;(without the user having to specify the address :a,b @@ -746,7 +746,7 @@ (if (member ex-token '("global" "vglobal")) (error "Missing closing delimiter for global regexp") (goto-char (point-max)))) - (if (not (viper-looking-back + (if (not (looking-back (format "[^\\\\]\\(\\\\\\\\\\)*\\\\%c" c))) (setq cont nil) ;; we are at an escaped delimiter: unescape it and continue @@ -826,6 +826,9 @@ (if ans (setq address ans)))))) address)) +(declare-function viper-register-to-point "viper-cmd" + (char &optional enforce-buffer)) + ;; Returns an address as a point (defun viper-get-ex-address-subr (old-address dot) (let ((address nil)) @@ -960,7 +963,7 @@ (while (re-search-forward "%\\|#" nil t) (let ((data (match-data)) (char (buffer-substring (match-beginning 0) (match-end 0)))) - (if (viper-looking-back (concat "\\\\" char)) + (if (looking-back (concat "\\\\" char)) (replace-match char) (store-match-data data) (if (string= char "%") @@ -986,7 +989,7 @@ (get-buffer-create viper-ex-work-buf-name)) (skip-chars-forward " \t") (if (looking-at "!") - (if (and (not (viper-looking-back "[ \t]")) + (if (and (not (looking-back "[ \t]")) ;; read doesn't have a corresponding :r! form, so ! is ;; immediately interpreted as a shell command. (not (string= ex-token "read"))) @@ -1063,7 +1066,7 @@ (cond ((ex-cmd-accepts-multiple-files-p ex-token) (exit-minibuffer)) ;; apparently the argument to an Ex command is ;; supposed to be a shell command - ((viper-looking-back "^[ \t]*!.*") + ((looking-back "^[ \t]*!.*") (setq ex-cmdfile t) (insert " ")) (t @@ -1202,6 +1205,8 @@ (forward-line 1)) (insert (current-kill 0)))) +(declare-function viper-append-to-register "viper-cmd" (reg start end)) + ;; Ex delete command (defun ex-delete () (viper-default-ex-addresses) @@ -1238,6 +1243,7 @@ (kill-region (point) (mark t)))))) +(declare-function viper-change-state-to-vi "viper-cmd" ()) ;; Ex edit command ;; In Viper, `e' and `e!' behave identically. In both cases, the user is @@ -1308,6 +1314,8 @@ )) +(declare-function viper-backward-char-carefully "viper-cmd" (&optional arg)) + ;; Ex global command ;; This is executed in response to: ;; :global "pattern" ex-command @@ -1416,6 +1424,8 @@ (goto-char (1- point)) (beginning-of-line))) +(declare-function viper-forward-char-carefully "viper-cmd" (&optional arg)) + (defun ex-line-subr (com beg end) (cond ((string= com "join") (goto-char (min beg end)) @@ -1566,6 +1576,9 @@ (message "Autosaving all buffers that need to be saved...") (do-auto-save t)) +(declare-function viper-Put-back "viper-cmd" (arg)) +(declare-function viper-put-back "viper-cmd" (arg)) + ;; Ex put (defun ex-put () (let ((point (if (null ex-addresses) (point) (car ex-addresses)))) @@ -1589,6 +1602,8 @@ (kill-buffer (current-buffer)))) +(declare-function viper-add-newline-at-eob-if-necessary "viper-cmd" ()) + ;; Ex read command ;; ex-read doesn't support wildcards, because file completion is a better ;; mechanism. We also don't support # and % (except in :r @@ -1975,6 +1990,8 @@ (beginning-of-line) (if opt-c (message "done")))) +(declare-function viper-change-state-to-emacs "viper-cmd" ()) + ;; Ex tag command (defun ex-tag () (let (tag) === modified file 'lisp/emulation/viper-macs.el' --- lisp/emulation/viper-macs.el 2013-01-01 09:11:05 +0000 +++ lisp/emulation/viper-macs.el 2013-05-22 03:21:30 +0000 @@ -31,13 +31,8 @@ (defvar viper-custom-file-name) (defvar viper-current-state) (defvar viper-fast-keyseq-timeout) - -;; loading happens only in non-interactive compilation -;; in order to spare non-viperized emacs from being viperized -(if noninteractive - (eval-when-compile - (require 'viper-cmd) - )) +(require 'viper-mous) +(require 'viper-ex) ;; end pacifier (require 'viper-util) @@ -83,6 +78,8 @@ ;;; Code +(declare-function viper-change-state-to-insert "viper-cmd" ()) + ;; Ex map command (defun ex-map () (let ((mod-char "") @@ -277,6 +274,8 @@ )) +(declare-function viper-change-state-to-vi "viper-cmd" ()) + ;; Terminate a Vi kbd macro. ;; optional argument IGNORE, if t, indicates that we are dealing with an ;; existing macro that needs to be registered, but there is no need to === modified file 'lisp/emulation/viper-mous.el' --- lisp/emulation/viper-mous.el 2013-01-01 09:11:05 +0000 +++ lisp/emulation/viper-mous.el 2013-05-22 03:21:30 +0000 @@ -35,16 +35,9 @@ (defvar viper-s-string) (defvar viper-re-search) -;; loading happens only in non-interactive compilation -;; in order to spare non-viperized emacs from being viperized -(if noninteractive - (eval-when-compile - (require 'viper-cmd) - )) +(require 'viper-util) ;; end pacifier -(require 'viper-util) - (defgroup viper-mouse nil "Support for Viper special mouse-bound commands." @@ -140,6 +133,10 @@ (posn-point (event-start click)))) + +(declare-function viper-backward-char-carefully "viper-cmd" (&optional arg)) +(declare-function viper-forward-char-carefully "viper-cmd" (&optional arg)) + (defun viper-surrounding-word (count click-count) "Returns word surrounding point according to a heuristic. COUNT indicates how many regions to return. @@ -335,6 +332,8 @@ viper-current-click-count 0)))) +(declare-function viper-forward-word "viper-cmd" (arg)) +(declare-function viper-adjust-window "viper-cmd" ()) (defun viper-mouse-click-search-word (click arg) "Find the word clicked or double-clicked on. Word may be in another window. ------------------------------------------------------------ revno: 112663 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-05-21 20:17:22 -0700 message: * lisp/vc/ediff.el (ediff-version): Use called-interactively-p on Emacs. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-22 03:16:05 +0000 +++ lisp/ChangeLog 2013-05-22 03:17:22 +0000 @@ -1,5 +1,7 @@ 2013-05-22 Glenn Morris + * vc/ediff.el (ediff-version): Use called-interactively-p on Emacs. + * progmodes/idlw-help.el (idlwave-help-fontify): Use called-interactively-p. === modified file 'lisp/vc/ediff.el' --- lisp/vc/ediff.el 2013-01-01 09:11:05 +0000 +++ lisp/vc/ediff.el 2013-05-22 03:17:22 +0000 @@ -1464,9 +1464,9 @@ "Return string describing the version of Ediff. When called interactively, displays the version." (interactive) - ;; called-interactively-p - not in XEmacs - ;; (if (called-interactively-p 'interactive) - (if (interactive-p) + (if (if (featurep 'xemacs) + (interactive-p) + (called-interactively-p 'interactive)) (message "%s" (ediff-version)) (format "Ediff %s of %s" ediff-version ediff-date))) ------------------------------------------------------------ revno: 112662 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-05-21 20:16:05 -0700 message: * progmodes/idlw-help.el (idlwave-help-fontify): Use called-interactively-p. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-22 03:15:03 +0000 +++ lisp/ChangeLog 2013-05-22 03:16:05 +0000 @@ -1,5 +1,8 @@ 2013-05-22 Glenn Morris + * progmodes/idlw-help.el (idlwave-help-fontify): + Use called-interactively-p. + * term/w32console.el (w32-get-console-codepage) (w32-get-console-output-codepage): Declare. === modified file 'lisp/progmodes/idlw-help.el' --- lisp/progmodes/idlw-help.el 2013-05-09 01:40:20 +0000 +++ lisp/progmodes/idlw-help.el 2013-05-22 03:16:05 +0000 @@ -1178,7 +1178,7 @@ (if (featurep 'font-lock) (let ((major-mode 'idlwave-mode) (font-lock-verbose - (if (interactive-p) font-lock-verbose nil)) + (if (called-interactively-p 'interactive) font-lock-verbose nil)) (syntax-table (syntax-table))) (unwind-protect (progn ------------------------------------------------------------ revno: 112661 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-05-21 20:15:03 -0700 message: Silence w32console.el compilation * lisp/term/w32console.el (w32-get-console-codepage) (w32-get-console-output-codepage): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-22 03:13:56 +0000 +++ lisp/ChangeLog 2013-05-22 03:15:03 +0000 @@ -1,5 +1,8 @@ 2013-05-22 Glenn Morris + * term/w32console.el (w32-get-console-codepage) + (w32-get-console-output-codepage): Declare. + * dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): Remove unnecessary declarations. (dframe-message): Doc fix. === modified file 'lisp/term/w32console.el' --- lisp/term/w32console.el 2013-01-01 09:11:05 +0000 +++ lisp/term/w32console.el 2013-05-22 03:15:03 +0000 @@ -47,6 +47,8 @@ (declare-function x-setup-function-keys "term/common-win" (frame)) (declare-function get-screen-color "w32console.c" ()) +(declare-function w32-get-console-codepage "w32proc.c" ()) +(declare-function w32-get-console-output-codepage "w32proc.c" ()) (defun terminal-init-w32console () "Terminal initialization function for w32 console." ------------------------------------------------------------ revno: 112660 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-05-21 20:13:56 -0700 message: Small speedbar-related clean-up * lisp/dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): Remove unnecessary declarations. (dframe-message): Doc fix. * lisp/info.el (dframe-select-attached-frame, dframe-current-frame): Declare. * lisp/speedbar.el (speedbar-message): Make it an obsolete alias. Update all callers. (speedbar-with-attached-buffer) (speedbar-maybee-jump-to-attached-frame): Make these aliases obsolete. (speedbar-with-writable): Use backquote. * lisp/emacs-lisp/eieio-opt.el (eieio-describe-class-sb): * lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-handle-click): Use dframe-with-attached-buffer, dframe-maybee-jump-to-attached-frame rather than speedbar- aliases. * lisp/mail/rmail.el: Load dframe rather than speedbar when compiling. (speedbar-make-specialized-keymap, speedbar-insert-button) (dframe-select-attached-frame, dframe-maybee-jump-to-attached-frame) (speedbar-do-function-pointer): Declare. (rmail-speedbar-button, rmail-speedbar-find-file) (rmail-speedbar-move-message): Use dframe-with-attached-buffer rather than speedbar- alias. * lisp/progmodes/gud.el: Load dframe rather than speedbar when compiling. (dframe-message, speedbar-make-specialized-keymap) (speedbar-add-expansion-list, speedbar-mode-functions-list) (speedbar-make-tag-line, speedbar-remove-localized-speedbar-support) (speedbar-insert-button, dframe-select-attached-frame) (dframe-maybee-jump-to-attached-frame) (speedbar-change-initial-expansion-list) (speedbar-previously-used-expansion-list-name): Declare. (gud-speedbar-item-info, gud-gdb-goto-stackframe): Use dframe-message, dframe-with-attached-buffer rather than speedbar- aliases. (gud-sentinel): Silence compiler. * lisp/progmodes/vhdl-mode.el (speedbar-refresh) (speedbar-do-function-pointer, speedbar-add-supported-extension) (speedbar-add-mode-functions-list, speedbar-make-specialized-keymap) (speedbar-change-initial-expansion-list, speedbar-add-expansion-list) (speedbar-extension-list-to-regex, speedbar-directory-buttons) (speedbar-file-lists, speedbar-make-tag-line) (speedbar-line-directory, speedbar-goto-this-file) (speedbar-center-buffer-smartly, speedbar-change-expand-button-char) (speedbar-delete-subblock, speedbar-position-cursor-on-line) (speedbar-make-button, speedbar-reset-scanners) (speedbar-files-item-info, speedbar-line-text) (speedbar-find-file-in-frame, speedbar-set-timer) (dframe-maybee-jump-to-attached-frame, speedbar-line-file): Declare. (speedbar-with-writable): Do not (re)define it. (vhdl-speedbar-find-file): Use dframe-maybee-jump-to-attached-frame rather than speedbar- alias. * lisp/cedet/ede/speedbar.el (ede-file-find, ede-tag-find): * lisp/cedet/semantic/sb.el (semantic-sb-token-jump): Use dframe-maybee-jump-to-attached-frame rather than speedbar- alias. * lisp/mh-e/mh-speed.el (mh-speed-view): Use dframe-with-attached-buffer rather than speedbar- alias. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-21 23:05:16 +0000 +++ lisp/ChangeLog 2013-05-22 03:13:56 +0000 @@ -1,3 +1,57 @@ +2013-05-22 Glenn Morris + + * dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): + Remove unnecessary declarations. + (dframe-message): Doc fix. + + * info.el (dframe-select-attached-frame, dframe-current-frame): + Declare. + + * speedbar.el (speedbar-message): Make it an obsolete alias. + Update all callers. + (speedbar-with-attached-buffer) + (speedbar-maybee-jump-to-attached-frame): Make these aliases obsolete. + (speedbar-with-writable): Use backquote. + * emacs-lisp/eieio-opt.el (eieio-describe-class-sb): + * emacs-lisp/eieio-speedbar.el (eieio-speedbar-handle-click): + Use dframe-with-attached-buffer, dframe-maybee-jump-to-attached-frame + rather than speedbar- aliases. + * mail/rmail.el: Load dframe rather than speedbar when compiling. + (speedbar-make-specialized-keymap, speedbar-insert-button) + (dframe-select-attached-frame, dframe-maybee-jump-to-attached-frame) + (speedbar-do-function-pointer): Declare. + (rmail-speedbar-button, rmail-speedbar-find-file) + (rmail-speedbar-move-message): + Use dframe-with-attached-buffer rather than speedbar- alias. + * progmodes/gud.el: Load dframe rather than speedbar when compiling. + (dframe-message, speedbar-make-specialized-keymap) + (speedbar-add-expansion-list, speedbar-mode-functions-list) + (speedbar-make-tag-line, speedbar-remove-localized-speedbar-support) + (speedbar-insert-button, dframe-select-attached-frame) + (dframe-maybee-jump-to-attached-frame) + (speedbar-change-initial-expansion-list) + (speedbar-previously-used-expansion-list-name): Declare. + (gud-speedbar-item-info, gud-gdb-goto-stackframe): + Use dframe-message, dframe-with-attached-buffer rather than + speedbar- aliases. + (gud-sentinel): Silence compiler. + * progmodes/vhdl-mode.el (speedbar-refresh) + (speedbar-do-function-pointer, speedbar-add-supported-extension) + (speedbar-add-mode-functions-list, speedbar-make-specialized-keymap) + (speedbar-change-initial-expansion-list, speedbar-add-expansion-list) + (speedbar-extension-list-to-regex, speedbar-directory-buttons) + (speedbar-file-lists, speedbar-make-tag-line) + (speedbar-line-directory, speedbar-goto-this-file) + (speedbar-center-buffer-smartly, speedbar-change-expand-button-char) + (speedbar-delete-subblock, speedbar-position-cursor-on-line) + (speedbar-make-button, speedbar-reset-scanners) + (speedbar-files-item-info, speedbar-line-text) + (speedbar-find-file-in-frame, speedbar-set-timer) + (dframe-maybee-jump-to-attached-frame, speedbar-line-file): Declare. + (speedbar-with-writable): Do not (re)define it. + (vhdl-speedbar-find-file): Use dframe-maybee-jump-to-attached-frame + rather than speedbar- alias. + 2013-05-21 Leo Liu * progmodes/octave.el (octave-mode-menu): Update and re-organize === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2013-05-15 23:55:41 +0000 +++ lisp/cedet/ChangeLog 2013-05-22 03:13:56 +0000 @@ -1,3 +1,9 @@ +2013-05-22 Glenn Morris + + * ede/speedbar.el (ede-file-find, ede-tag-find): + * semantic/sb.el (semantic-sb-token-jump): + Use dframe-maybee-jump-to-attached-frame rather than speedbar- alias. + 2013-05-15 Glenn Morris * semantic/symref/list.el (semantic-symref-auto-expand-results) === modified file 'lisp/cedet/ede/speedbar.el' --- lisp/cedet/ede/speedbar.el 2013-01-01 09:11:05 +0000 +++ lisp/cedet/ede/speedbar.el 2013-05-22 03:13:56 +0000 @@ -257,7 +257,7 @@ INDENT is the current indentation level." (speedbar-find-file-in-frame (expand-file-name token (speedbar-line-directory indent))) - (speedbar-maybee-jump-to-attached-frame)) + (dframe-maybee-jump-to-attached-frame)) (defun ede-create-tag-buttons (filename indent) "Create the tag buttons associated with FILENAME at INDENT." @@ -304,7 +304,7 @@ (goto-char token) (run-hooks 'speedbar-visiting-tag-hook) ;;(recenter) - (speedbar-maybee-jump-to-attached-frame) + (dframe-maybee-jump-to-attached-frame) )) ;;; EDE and the speedbar FILE display === modified file 'lisp/cedet/semantic/sb.el' --- lisp/cedet/semantic/sb.el 2013-05-11 23:55:46 +0000 +++ lisp/cedet/semantic/sb.el 2013-05-22 03:13:56 +0000 @@ -323,7 +323,7 @@ ;; that other timer. ;; (speedbar-set-timer dframe-update-speed) ;;(recenter) - (speedbar-maybee-jump-to-attached-frame) + (dframe-maybee-jump-to-attached-frame) (run-hooks 'speedbar-visiting-tag-hook))) (defun semantic-sb-expand-group (text token indent) === modified file 'lisp/dframe.el' --- lisp/dframe.el 2013-01-01 09:11:05 +0000 +++ lisp/dframe.el 2013-05-22 03:13:56 +0000 @@ -243,9 +243,6 @@ "Return non-nil if FRAME is currently available." (and frame (frame-live-p frame) (frame-visible-p frame))) -(defvar x-sensitive-text-pointer-shape) -(defvar x-pointer-shape) - (defun dframe-frame-mode (arg frame-var cache-var buffer-var frame-name local-mode-fn &optional @@ -681,7 +678,7 @@ "Non-nil means that `dframe-message' should just return a string.") (defun dframe-message (fmt &rest args) - "Like message, but for use in a dedicated frame. + "Like `message', but for use in a dedicated frame. Argument FMT is the format string, and ARGS are the arguments for message." (save-selected-window (if dframe-suppress-message-flag === modified file 'lisp/emacs-lisp/eieio-opt.el' --- lisp/emacs-lisp/eieio-opt.el 2013-02-19 02:57:04 +0000 +++ lisp/emacs-lisp/eieio-opt.el 2013-05-22 03:13:56 +0000 @@ -795,9 +795,9 @@ (defun eieio-describe-class-sb (text token indent) "Describe the class TEXT in TOKEN. INDENT is the current indentation level." - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (eieio-describe-class token)) - (speedbar-maybee-jump-to-attached-frame)) + (dframe-maybee-jump-to-attached-frame)) (provide 'eieio-opt) === modified file 'lisp/emacs-lisp/eieio-speedbar.el' --- lisp/emacs-lisp/eieio-speedbar.el 2013-02-19 02:57:04 +0000 +++ lisp/emacs-lisp/eieio-speedbar.el 2013-05-22 03:13:56 +0000 @@ -230,9 +230,9 @@ If your object represents some other item, override this method and take the appropriate action." (require 'eieio-custom) - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (eieio-customize-object object)) - (speedbar-maybee-jump-to-attached-frame)) + (dframe-maybee-jump-to-attached-frame)) ;;; Class definitions === modified file 'lisp/info.el' --- lisp/info.el 2013-05-05 08:48:44 +0000 +++ lisp/info.el 2013-05-22 03:13:56 +0000 @@ -4985,7 +4985,7 @@ ;;; Speedbar support: ;; These functions permit speedbar to display the "tags" in the ;; current Info node. -(eval-when-compile (require 'speedbar)) +(eval-when-compile (require 'speedbar)) ; for speedbar-with-writable (declare-function speedbar-add-expansion-list "speedbar" (new-list)) (declare-function speedbar-center-buffer-smartly "speedbar" ()) @@ -5047,6 +5047,10 @@ (speedbar-change-initial-expansion-list "Info") ) +;; speedbar loads dframe at runtime. +(declare-function dframe-select-attached-frame "dframe" (&optional frame)) +(declare-function dframe-current-frame "dframe" (frame-var desired-major-mode)) + (defun Info-speedbar-hierarchy-buttons (_directory depth &optional node) "Display an Info directory hierarchy in speedbar. DIRECTORY is the current directory in the attached frame. === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2013-05-21 17:22:04 +0000 +++ lisp/mail/rmail.el 2013-05-22 03:13:56 +0000 @@ -4310,8 +4310,6 @@ (restore-buffer-modified-p nil))))))) ;;; Speedbar support for RMAIL files. -(eval-when-compile (require 'speedbar)) - (defcustom rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$" "Regexp matching Rmail folder names to be displayed in Speedbar. Enabling this permits Speedbar to display your folders for easy @@ -4326,12 +4324,12 @@ (defvar rmail-speedbar-key-map nil "Keymap used when in rmail display mode.") +(declare-function speedbar-make-specialized-keymap "speedbar" ()) + (defun rmail-install-speedbar-variables () "Install those variables used by speedbar to enhance rmail." - (if rmail-speedbar-key-map - nil + (unless rmail-speedbar-key-map (setq rmail-speedbar-key-map (speedbar-make-specialized-keymap)) - (define-key rmail-speedbar-key-map "e" 'speedbar-edit-line) (define-key rmail-speedbar-key-map "r" 'speedbar-edit-line) (define-key rmail-speedbar-key-map "\C-m" 'speedbar-edit-line) @@ -4346,6 +4344,9 @@ (looking-at " "))]) "Additional menu-items to add to speedbar frame.") +(declare-function speedbar-insert-button "speedbar" + (text face mouse function &optional token prevline)) + ;; Make sure our special speedbar major mode is loaded (if (featurep 'speedbar) (rmail-install-speedbar-variables) @@ -4387,19 +4388,27 @@ (speedbar-insert-button file 'speedbar-file-face 'highlight 'rmail-speedbar-find-file nil t))))))) +(eval-when-compile (require 'dframe)) +;; Part of the macro expansion of dframe-with-attached-buffer. +;; At runtime, will be pulled in as a require of speedbar. +(declare-function dframe-select-attached-frame "dframe" (&optional frame)) +(declare-function dframe-maybee-jump-to-attached-frame "dframe" ()) + (defun rmail-speedbar-button (text token indent) "Execute an rmail command specified by TEXT. The command used is TOKEN. INDENT is not used." - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (funcall token t))) (defun rmail-speedbar-find-file (text token indent) "Load in the rmail file TEXT. TOKEN and INDENT are not used." - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (message "Loading in RMAIL file %s..." text) (rmail text))) +(declare-function speedbar-do-function-pointer "speedbar" ()) + (defun rmail-speedbar-move-message-to-folder-on-line () "If the current line is a folder, move current message to it." (interactive) @@ -4413,7 +4422,7 @@ (defun rmail-speedbar-move-message (text token indent) "From button TEXT, copy current message to the rmail file specified by TOKEN. TEXT and INDENT are not used." - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (message "Moving message to %s" token) ;; expand-file-name is needed due to the unhelpful way in which ;; rmail-output expands non-absolute filenames against rmail-default-file. === modified file 'lisp/mh-e/ChangeLog' --- lisp/mh-e/ChangeLog 2013-05-21 01:59:36 +0000 +++ lisp/mh-e/ChangeLog 2013-05-22 03:13:56 +0000 @@ -1,3 +1,8 @@ +2013-05-22 Glenn Morris + + * mh-speed.el (mh-speed-view): + Use dframe-with-attached-buffer rather than speedbar- alias. + 2013-05-21 Glenn Morris * mh-comp.el (mh-regexp-in-field-p): Fix previous change. === modified file 'lisp/mh-e/mh-speed.el' --- lisp/mh-e/mh-speed.el 2013-01-01 09:11:05 +0000 +++ lisp/mh-e/mh-speed.el 2013-05-22 03:13:56 +0000 @@ -175,7 +175,7 @@ (mh-read-range "Scan" folder t nil nil mh-interpret-number-as-range-flag)))) (when (stringp folder) - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (mh-visit-folder folder range) (delete-other-windows))))) === modified file 'lisp/progmodes/gud.el' --- lisp/progmodes/gud.el 2013-05-21 07:25:14 +0000 +++ lisp/progmodes/gud.el 2013-05-22 03:13:56 +0000 @@ -413,7 +413,7 @@ ;; ====================================================================== ;; speedbar support functions and variables. -(eval-when-compile (require 'speedbar)) ;For speedbar-with-attached-buffer. +(eval-when-compile (require 'dframe)) ; for dframe-with-attached-buffer (defvar gud-last-speedbar-stackframe nil "Description of the currently displayed GUD stack. @@ -422,19 +422,24 @@ (defvar gud-speedbar-key-map nil "Keymap used when in the buffers display mode.") +;; At runtime, will be pulled in as a require of speedbar. +(declare-function dframe-message "dframe" (fmt &rest args)) + (defun gud-speedbar-item-info () "Display the data type of the watch expression element." (let ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))) (if (nth 7 var) - (speedbar-message "%s: %s" (nth 7 var) (nth 3 var)) - (speedbar-message "%s" (nth 3 var))))) + (dframe-message "%s: %s" (nth 7 var) (nth 3 var)) + (dframe-message "%s" (nth 3 var))))) + +(declare-function speedbar-make-specialized-keymap "speedbar" ()) +(declare-function speedbar-add-expansion-list "speedbar" (new-list)) +(defvar speedbar-mode-functions-list) (defun gud-install-speedbar-variables () "Install those variables used by speedbar to enhance gud/gdb." - (if gud-speedbar-key-map - nil + (unless gud-speedbar-key-map (setq gud-speedbar-key-map (speedbar-make-specialized-keymap)) - (define-key gud-speedbar-key-map "j" 'speedbar-edit-line) (define-key gud-speedbar-key-map "e" 'speedbar-edit-line) (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line) @@ -483,6 +488,13 @@ DIRECTORY and ZERO are not used, but are required by the caller." (gud-speedbar-buttons gud-comint-buffer)) +(declare-function speedbar-make-tag-line "speedbar" + (type char func data tag tfunc tdata tface depth)) +(declare-function speedbar-remove-localized-speedbar-support "speedbar" + (buffer)) +(declare-function speedbar-insert-button "speedbar" + (text face mouse function &optional token prevline)) + (defun gud-speedbar-buttons (buffer) "Create a speedbar display based on the current state of GUD. If the GUD BUFFER is not running a supported debugger, then turn @@ -881,9 +893,14 @@ ;; gdb speedbar functions +;; Part of the macro expansion of dframe-with-attached-buffer. +;; At runtime, will be pulled in as a require of speedbar. +(declare-function dframe-select-attached-frame "dframe" (&optional frame)) +(declare-function dframe-maybee-jump-to-attached-frame "dframe" ()) + (defun gud-gdb-goto-stackframe (_text token _indent) "Goto the stackframe described by TEXT, TOKEN, and INDENT." - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (gud-basic-call (concat "server frame " (nth 1 token))) (sit-for 1))) @@ -2633,6 +2650,8 @@ (add-to-list 'overlay-arrow-variable-list 'gud-overlay-arrow-position) (declare-function gdb-reset "gdb-mi" ()) +(declare-function speedbar-change-initial-expansion-list "speedbar" (new)) +(defvar speedbar-previously-used-expansion-list-name) (defun gud-sentinel (proc msg) (cond ((null (buffer-name (process-buffer proc))) @@ -2640,7 +2659,7 @@ ;; Stop displaying an arrow in a source file. (setq gud-overlay-arrow-position nil) (set-process-buffer proc nil) - (if (and (boundp 'speedbar-frame) + (if (and (boundp 'speedbar-initial-expansion-list-name) (string-equal speedbar-initial-expansion-list-name "GUD")) (speedbar-change-initial-expansion-list speedbar-previously-used-expansion-list-name)) === modified file 'lisp/progmodes/vhdl-mode.el' --- lisp/progmodes/vhdl-mode.el 2013-05-18 00:25:02 +0000 +++ lisp/progmodes/vhdl-mode.el 2013-05-22 03:13:56 +0000 @@ -2135,7 +2135,7 @@ (eval-when-compile (require 'font-lock) (require 'ps-print) - (require 'speedbar))) + (require 'speedbar))) ; for speedbar-with-writable ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2553,6 +2553,9 @@ (setcdr list1 (cddr list1)))) (cdr list)) +(declare-function speedbar-refresh "speedbar" (&optional arg)) +(declare-function speedbar-do-function-pointer "speedbar" ()) + (defun vhdl-speedbar-refresh (&optional key) "Refresh directory or project with name KEY." (when (and (boundp 'speedbar-frame) @@ -14515,6 +14518,13 @@ (defvar vhdl-speedbar-menu-items nil "Additional menu-items to add to speedbar frame.") +(declare-function speedbar-add-supported-extension "speedbar" (extension)) +(declare-function speedbar-add-mode-functions-list "speedbar" (new-list)) +(declare-function speedbar-make-specialized-keymap "speedbar" ()) +(declare-function speedbar-change-initial-expansion-list "speedbar" + (new-default)) +(declare-function speedbar-add-expansion-list "speedbar" (new-list)) + (defun vhdl-speedbar-initialize () "Initialize speedbar." ;; general settings @@ -14644,11 +14654,15 @@ "Name of last selected project.") ;; macros must be defined in the file they are used (copied from `speedbar.el') -(defmacro speedbar-with-writable (&rest forms) - "Allow the buffer to be writable and evaluate FORMS." - (list 'let '((inhibit-read-only t)) - (cons 'progn forms))) -(put 'speedbar-with-writable 'lisp-indent-function 0) +;;; (defmacro speedbar-with-writable (&rest forms) +;;; "Allow the buffer to be writable and evaluate FORMS." +;;; (list 'let '((inhibit-read-only t)) +;;; (cons 'progn forms))) +;;; (put 'speedbar-with-writable 'lisp-indent-function 0) + +(declare-function speedbar-extension-list-to-regex "speedbar" (extlist)) +(declare-function speedbar-directory-buttons "speedbar" (directory _index)) +(declare-function speedbar-file-lists "speedbar" (directory)) (defun vhdl-speedbar-display-directory (directory depth &optional rescan) "Display directory and hierarchy information in speedbar." @@ -14684,6 +14698,9 @@ (error (vhdl-warning-when-idle "ERROR: Invalid hierarchy information, unable to display correctly")))) (setq speedbar-full-text-cache nil)) ; prevent caching +(declare-function speedbar-make-tag-line "speedbar" + (type char func data tag tfunc tdata tface depth)) + (defun vhdl-speedbar-insert-projects () "Insert all projects in speedbar." (vhdl-speedbar-make-title-line "Projects:") @@ -14787,6 +14804,8 @@ depth) (setq pack-alist (cdr pack-alist)))))) +(declare-function speedbar-line-directory "speedbar" (&optional depth)) + (defun vhdl-speedbar-rescan-hierarchy () "Rescan hierarchy for the directory or project under the cursor." (interactive) @@ -14808,6 +14827,8 @@ (abbreviate-file-name (match-string 1 path))))) (vhdl-speedbar-refresh key))) +(declare-function speedbar-goto-this-file "speedbar" (file)) + (defun vhdl-speedbar-expand-dirs (directory) "Expand subdirectories in DIRECTORY according to `speedbar-shown-directories'." @@ -14857,6 +14878,8 @@ (setq unit-alist (cdr unit-alist)))))) (vhdl-speedbar-update-current-unit nil t)) +(declare-function speedbar-center-buffer-smartly "speedbar" ()) + (defun vhdl-speedbar-contract-level () "Contract current level in current directory/project." (interactive) @@ -14912,6 +14935,9 @@ (when (memq 'display vhdl-speedbar-save-cache) (add-to-list 'vhdl-updated-project-list key)))) +(declare-function speedbar-change-expand-button-char "speedbar" (char)) +(declare-function speedbar-delete-subblock "speedbar" (indent)) + (defun vhdl-speedbar-expand-project (text token indent) "Expand/contract the project under the cursor." (cond @@ -15240,6 +15266,8 @@ (setq vhdl-speedbar-last-selected-project vhdl-project))) t) +(declare-function speedbar-position-cursor-on-line "speedbar" ()) + (defun vhdl-speedbar-update-current-unit (&optional no-position always) "Highlight all design units that are contained in the current file. NO-POSITION non-nil means do not re-position cursor." @@ -15329,6 +15357,9 @@ (setq unit-list (cdr unit-list))) pos) +(declare-function speedbar-make-button "speedbar" + (start end face mouse function &optional token)) + (defun vhdl-speedbar-make-inst-line (inst-name inst-file-marker ent-name ent-file-marker arch-name arch-file-marker @@ -15515,6 +15546,8 @@ 'speedbar-directory-face level) (setq dirs (cdr dirs))))) +(declare-function speedbar-reset-scanners "speedbar" ()) + (defun vhdl-speedbar-dired (text token indent) "Speedbar click handler for directory expand button in hierarchy mode." (cond ((string-match "+" text) ; we have to expand this dir @@ -15554,6 +15587,8 @@ (when (equal (selected-frame) speedbar-frame) (speedbar-center-buffer-smartly))) +(declare-function speedbar-files-item-info "speedbar" ()) + (defun vhdl-speedbar-item-info () "Derive and display information about this line item." (save-excursion @@ -15602,6 +15637,8 @@ (vhdl-default-directory))))) (t (message ""))))) +(declare-function speedbar-line-text "speedbar" (&optional p)) + (defun vhdl-speedbar-line-text () "Calls `speedbar-line-text' and removes text properties." (let ((string (speedbar-line-text))) @@ -15696,6 +15733,11 @@ (goto-char dest) nil))) +(declare-function speedbar-find-file-in-frame "speedbar" (file)) +(declare-function speedbar-set-timer "speedbar" (timeout)) +;; speedbar loads dframe at runtime. +(declare-function dframe-maybee-jump-to-attached-frame "dframe" ()) + (defun vhdl-speedbar-find-file (text token indent) "When user clicks on TEXT, load file with name and position in TOKEN. Jump to the design unit if `vhdl-speedbar-jump-to-unit' is t or if the file @@ -15709,7 +15751,7 @@ (recenter)) (vhdl-speedbar-update-current-unit t t) (speedbar-set-timer dframe-update-speed) - (speedbar-maybee-jump-to-attached-frame)))) + (dframe-maybee-jump-to-attached-frame)))) (defun vhdl-speedbar-port-copy () "Copy the port of the entity/component or subprogram under the cursor." @@ -15769,6 +15811,8 @@ (setcar (cddr (cddr ent-entry)) arch-key) ; (nth 4 ent-entry) (speedbar-refresh)))) +(declare-function speedbar-line-file "speedbar" (&optional p)) + (defun vhdl-speedbar-make-design () "Make (compile) design unit or directory/project under the cursor." (interactive) === modified file 'lisp/speedbar.el' --- lisp/speedbar.el 2013-01-02 16:13:04 +0000 +++ lisp/speedbar.el 2013-05-22 03:13:56 +0000 @@ -73,7 +73,7 @@ ;; `speedbar-insert-generic-list'. If you use ;; `speedbar-insert-generic-list', also read the doc for ;; `speedbar-tag-hierarchy-method' in case you wish to override it. -;; The macro `speedbar-with-attached-buffer' brings you back to the +;; The macro `dframe-with-attached-buffer' brings you back to the ;; buffer speedbar is displaying for. ;; ;; For those functions that make buttons, the "function" should be a @@ -1137,10 +1137,7 @@ dframe-mouse-position-function #'speedbar-position-cursor-on-line)) speedbar-buffer) -(defmacro speedbar-message (fmt &rest args) - "Like `message', but for use in the speedbar frame. -Argument FMT is the format string, and ARGS are the arguments for message." - `(dframe-message ,fmt ,@args)) +(define-obsolete-function-alias 'speedbar-message 'dframe-message "24.4") (defsubst speedbar-y-or-n-p (prompt &optional deleting) "Like `y-or-n-p', but for use in the speedbar frame. @@ -1157,8 +1154,10 @@ (dframe-select-attached-frame (speedbar-current-frame))) ;; Backwards compatibility -(defalias 'speedbar-with-attached-buffer 'dframe-with-attached-buffer) -(defalias 'speedbar-maybee-jump-to-attached-frame 'dframe-maybee-jump-to-attached-frame) +(define-obsolete-function-alias 'speedbar-with-attached-buffer + 'dframe-with-attached-buffer "24.4") ; macro +(define-obsolete-function-alias 'speedbar-maybee-jump-to-attached-frame + 'dframe-maybee-jump-to-attached-frame "24.4") (defun speedbar-set-mode-line-format () "Set the format of the mode line based on the current speedbar environment. @@ -1285,7 +1284,7 @@ (if (eq major-mode 'speedbar-mode) ;; XEmacs may let us get in here in other mode buffers. (speedbar-item-info))) - (error (speedbar-message nil))))))) + (error (dframe-message nil))))))) (defun speedbar-show-info-under-mouse () "Call the info function for the line under the mouse." @@ -1417,13 +1416,13 @@ (delq (assoc d speedbar-directory-contents-alist) speedbar-directory-contents-alist))) (if (<= 1 speedbar-verbosity-level) - (speedbar-message "Refreshing speedbar...")) + (dframe-message "Refreshing speedbar...")) (speedbar-update-contents) (speedbar-stealthy-updates) ;; Reset the timer in case it got really hosed for some reason... (speedbar-set-timer dframe-update-speed) (if (<= 1 speedbar-verbosity-level) - (speedbar-message "Refreshing speedbar...done")))) + (dframe-message "Refreshing speedbar...done")))) (defun speedbar-item-load () "Load the item under the cursor or mouse if it is a Lisp file." @@ -1467,7 +1466,7 @@ ;; Skip items in "folder" type text characters. (if (looking-at "\\s-*[[<({].[]>)}] ") (goto-char (match-end 0))) ;; Get the text - (speedbar-message "Text: %s" (buffer-substring-no-properties + (dframe-message "Text: %s" (buffer-substring-no-properties (point) (line-end-position))))) (defun speedbar-item-info () @@ -1485,7 +1484,7 @@ instead of reading it from the speedbar buffer." (let* ((item (or filename (speedbar-line-file))) (attr (if item (file-attributes item) nil))) - (if (and item attr) (speedbar-message "%s %-6d %s" (nth 8 attr) + (if (and item attr) (dframe-message "%s %-6d %s" (nth 8 attr) (nth 7 attr) item) nil))) @@ -1506,14 +1505,14 @@ (when (and (semantic-tag-overlay attr) (semantic-tag-buffer attr)) (set-buffer (semantic-tag-buffer attr))) - (speedbar-message + (dframe-message (funcall semantic-sb-info-format-tag-function attr) ))) (looking-at "\\([0-9]+\\):") (setq item (file-name-nondirectory (speedbar-line-directory))) - (speedbar-message "Tag: %s in %s" tag item))) + (dframe-message "Tag: %s in %s" tag item))) (if (re-search-forward "{[+-]} \\([^\n]+\\)$" (line-end-position) t) - (speedbar-message "Group of tags \"%s\"" (match-string 1)) + (dframe-message "Group of tags \"%s\"" (match-string 1)) (if (re-search-forward " [+-]?[()|@] \\([^\n]+\\)$" nil t) (let* ((detailtext (match-string 1)) (detail (or (speedbar-line-token) detailtext)) @@ -1532,18 +1531,18 @@ (if (featurep 'semantic) (with-no-warnings (if (semantic-tag-p detail) - (speedbar-message + (dframe-message (funcall semantic-sb-info-format-tag-function detail parent)) (if parent - (speedbar-message "Detail: %s of tag %s" detail + (dframe-message "Detail: %s of tag %s" detail (if (semantic-tag-p parent) (semantic-format-tag-name parent nil t) parent)) - (speedbar-message "Detail: %s" detail)))) + (dframe-message "Detail: %s" detail)))) ;; Not using `semantic': (if parent - (speedbar-message "Detail: %s of tag %s" detail parent) - (speedbar-message "Detail: %s" detail)))) + (dframe-message "Detail: %s of tag %s" detail parent) + (dframe-message "Detail: %s" detail)))) nil))))) (defun speedbar-files-item-info () @@ -1641,7 +1640,7 @@ (if (file-directory-p f) (delete-directory f t t) (delete-file f t)) - (speedbar-message "Okie dokie.") + (dframe-message "Okie dokie.") (let ((p (point))) (speedbar-refresh) (goto-char p)) @@ -1706,9 +1705,9 @@ (defmacro speedbar-with-writable (&rest forms) "Allow the buffer to be writable and evaluate FORMS." - (list 'let '((inhibit-read-only t)) - (cons 'progn forms))) -(put 'speedbar-with-writable 'lisp-indent-function 0) + (declare (indent 0)) + `(let ((inhibit-read-only t)) + ,@forms)) (defun speedbar-insert-button (text face mouse function &optional token prevline) @@ -2437,7 +2436,7 @@ (car (car lst)) ;button name nil nil 'speedbar-tag-face (1+ level))) - (t (speedbar-message "speedbar-insert-generic-list: malformed list!") + (t (dframe-message "speedbar-insert-generic-list: malformed list!") )) (setq lst (cdr lst))))) @@ -2492,14 +2491,14 @@ (expand-file-name default-directory)))) nil (if (<= 1 speedbar-verbosity-level) - (speedbar-message "Updating speedbar to: %s..." + (dframe-message "Updating speedbar to: %s..." default-directory)) (speedbar-update-directory-contents) (if (<= 1 speedbar-verbosity-level) (progn - (speedbar-message "Updating speedbar to: %s...done" + (dframe-message "Updating speedbar to: %s...done" default-directory) - (speedbar-message nil)))) + (dframe-message nil)))) ;; Else, we can do a short cut. No text cache. (let ((cbd (expand-file-name default-directory))) (set-buffer speedbar-buffer) @@ -2662,16 +2661,16 @@ ;;(eq (get major-mode 'mode-class 'special))) (progn (if (<= 2 speedbar-verbosity-level) - (speedbar-message + (dframe-message "Updating speedbar to special mode: %s..." major-mode)) (speedbar-update-special-contents) (if (<= 2 speedbar-verbosity-level) (progn - (speedbar-message + (dframe-message "Updating speedbar to special mode: %s...done" major-mode) - (speedbar-message nil)))) + (dframe-message nil)))) ;; Update all the contents if directories change! (unless (and (or (member major-mode speedbar-ignored-modes) @@ -2704,7 +2703,7 @@ (while (and l (funcall (car l))) ;;(sit-for 0) (setq l (cdr l)))) - ;;(speedbar-message "Exit with %S" (car l)) + ;;(dframe-message "Exit with %S" (car l)) )))) (defun speedbar-reset-scanners () @@ -2944,7 +2943,7 @@ (point)))) (fulln (concat f fn))) (if (<= 2 speedbar-verbosity-level) - (speedbar-message "Speedbar vc check...%s" fulln)) + (dframe-message "Speedbar vc check...%s" fulln)) (and (file-writable-p fulln) (speedbar-this-file-in-vc f fn)))) @@ -3016,7 +3015,7 @@ (point)))) (fulln (concat f fn))) (if (<= 2 speedbar-verbosity-level) - (speedbar-message "Speedbar obj check...%s" fulln)) + (dframe-message "Speedbar obj check...%s" fulln)) (let ((oa speedbar-obj-alist)) (while (and oa (not (string-match (car (car oa)) fulln))) (setq oa (cdr oa))) @@ -3076,7 +3075,7 @@ (buffer-substring-no-properties (match-beginning 0) (match-end 0)) "0"))))) - ;;(speedbar-message "%S:%S:%S:%s" fn tok txt dent) + ;;(dframe-message "%S:%S:%S:%s" fn tok txt dent) (and fn (funcall fn txt tok dent))) (speedbar-position-cursor-on-line)) @@ -3697,14 +3696,14 @@ (if (get-buffer "*etags tmp*") (kill-buffer "*etags tmp*")) ;kill to clean it up (if (<= 1 speedbar-verbosity-level) - (speedbar-message "Fetching etags...")) + (dframe-message "Fetching etags...")) (set-buffer (get-buffer-create "*etags tmp*")) (apply 'call-process speedbar-fetch-etags-command nil (current-buffer) nil (append speedbar-fetch-etags-arguments (list file))) (goto-char (point-min)) (if (<= 1 speedbar-verbosity-level) - (speedbar-message "Fetching etags...")) + (dframe-message "Fetching etags...")) (let ((expr (let ((exprlst speedbar-fetch-etags-parse-list) (ans nil)) @@ -3721,7 +3720,7 @@ (setq tnl (speedbar-extract-one-symbol expr))) (if tnl (setq newlist (cons tnl newlist))) (forward-line 1))) - (speedbar-message + (dframe-message "Sorry, no support for a file of that extension")))) ) (if speedbar-sort-tags @@ -3908,7 +3907,7 @@ (let* ((item (speedbar-line-text)) (buffer (if item (get-buffer item) nil))) (and buffer - (speedbar-message "%s%s %S %d %s" + (dframe-message "%s%s %S %d %s" (if (buffer-modified-p buffer) "* " "") item (with-current-buffer buffer major-mode) ------------------------------------------------------------ revno: 112659 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-05-21 19:56:22 -0700 message: ChangeLog fix diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-21 21:48:52 +0000 +++ src/ChangeLog 2013-05-22 02:56:22 +0000 @@ -1,4 +1,4 @@ -2013-05-21 Barry OReilly +2013-05-21 Barry OReilly (tiny change) * search.c (looking_at_1): Only set last_thing_searched if the match changed the match-data (bug#14281). ------------------------------------------------------------ revno: 112658 committer: Leo Liu branch nick: trunk timestamp: Wed 2013-05-22 07:19:03 +0800 message: Minor fix to last change diff: === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-21 23:05:16 +0000 +++ lisp/progmodes/octave.el 2013-05-21 23:19:03 +0000 @@ -141,7 +141,7 @@ ["Close Block" smie-close-block t] "---" ["Start Octave Process" run-octave t] - ["Lookup Documentation" info-lookup-symbol t] + ["Documentation Lookup" info-lookup-symbol t] ["Help on Function" octave-help t] ["Find Function Definition" octave-find-definition t] ["Insert Function" octave-insert-defun t] ------------------------------------------------------------ revno: 112657 committer: Leo Liu branch nick: trunk timestamp: Wed 2013-05-22 07:05:16 +0800 message: * progmodes/octave.el (octave-mode-menu): Update and re-organize menu items. (octave-mode): Tweak fill-nobreak-predicate. (inferior-octave-startup): Check process to avoid infinite loop. (inferior-octave): Pop to buffer first to show abornmal process exit information. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-21 17:22:04 +0000 +++ lisp/ChangeLog 2013-05-21 23:05:16 +0000 @@ -1,3 +1,12 @@ +2013-05-21 Leo Liu + + * progmodes/octave.el (octave-mode-menu): Update and re-organize + menu items. + (octave-mode): Tweak fill-nobreak-predicate. + (inferior-octave-startup): Check process to avoid infinite loop. + (inferior-octave): Pop to buffer first to show abornmal process + exit information. + 2013-05-21 Glenn Morris * printing.el (pr-menu-bar): Define when compiling. === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-21 09:43:14 +0000 +++ lisp/progmodes/octave.el 2013-05-21 23:05:16 +0000 @@ -132,38 +132,49 @@ (easy-menu-define octave-mode-menu octave-mode-map "Menu for Octave mode." '("Octave" - ("Lines" - ["Previous Code Line" octave-previous-code-line t] - ["Next Code Line" octave-next-code-line t] - ["Begin of Continuation" octave-beginning-of-line t] - ["End of Continuation" octave-end-of-line t] - ["Split Line at Point" octave-indent-new-comment-line t]) - ("Blocks" - ["Mark Block" octave-mark-block t] - ["Close Block" smie-close-block t]) - ("Functions" - ["Insert Function" octave-insert-defun t] - ["Update function file comment" octave-update-function-file-comment t]) - "-" + ["Split Line at Point" octave-indent-new-comment-line t] + ["Previous Code Line" octave-previous-code-line t] + ["Next Code Line" octave-next-code-line t] + ["Begin of Line" octave-beginning-of-line t] + ["End of Line" octave-end-of-line t] + ["Mark Block" octave-mark-block t] + ["Close Block" smie-close-block t] + "---" + ["Start Octave Process" run-octave t] + ["Lookup Documentation" info-lookup-symbol t] + ["Help on Function" octave-help t] + ["Find Function Definition" octave-find-definition t] + ["Insert Function" octave-insert-defun t] + ["Update Function File Comment" octave-update-function-file-comment t] + "---" + ["Function Syntax Hints" (call-interactively + (if (fboundp 'eldoc-post-insert-mode) + 'eldoc-post-insert-mode + 'eldoc-mode)) + :style toggle :selected (or eldoc-post-insert-mode eldoc-mode) + :help "Display function signatures after typing `SPC' or `('"] + ["Delimiter Matching" smie-highlight-matching-block-mode + :style toggle :selected smie-highlight-matching-block-mode + :help "Highlight matched pairs such as `if ... end'" + :visible (fboundp 'smie-highlight-matching-block-mode)] + ["Auto Fill" auto-fill-mode + :style toggle :selected auto-fill-function + :help "Automatic line breaking"] + ["Electric Layout" electric-layout-mode + :style toggle :selected electric-layout-mode + :help "Automatically insert newlines around some chars"] + "---" ("Debug" - ["Send Current Line" octave-send-line t] - ["Send Current Block" octave-send-block t] - ["Send Current Function" octave-send-defun t] - ["Send Region" octave-send-region t] - ["Show Process Buffer" octave-show-process-buffer t] - ["Hide Process Buffer" octave-hide-process-buffer t] - ["Kill Process" octave-kill-process t]) - "-" - ["Indent Line" indent-according-to-mode t] - ["Complete Symbol" completion-at-point t] - ["Toggle Auto-Fill Mode" auto-fill-mode - :style toggle :selected auto-fill-function] - "-" - ["Describe Octave Mode" describe-mode t] - ["Lookup Octave Index" info-lookup-symbol t] - ["Customize Octave" (customize-group 'octave) t] - "-" - ["Submit Bug Report" report-emacs-bug t])) + ["Send Current Line" octave-send-line t] + ["Send Current Block" octave-send-block t] + ["Send Current Function" octave-send-defun t] + ["Send Region" octave-send-region t] + ["Show Process Buffer" octave-show-process-buffer t] + ["Hide Process Buffer" octave-hide-process-buffer t] + ["Kill Process" octave-kill-process t]) + "---" + ["Customize Octave" (customize-group 'octave) t] + ["Submit Bug Report" report-emacs-bug t])) (defvar octave-mode-syntax-table (let ((table (make-syntax-table))) @@ -543,7 +554,8 @@ ;; Use `smie-auto-fill' after fixing bug#14381. (setq-local normal-auto-fill-function 'do-auto-fill) - (setq-local fill-nobreak-predicate #'octave-in-string-p) + (setq-local fill-nobreak-predicate + (lambda () (eq (octave-in-string-p) ?'))) (setq-local comment-line-break-function #'octave-indent-new-comment-line) (setq font-lock-defaults '(octave-font-lock-keywords)) @@ -689,12 +701,12 @@ startup file, `~/.emacs-octave'." (interactive "P") (let ((buffer (get-buffer-create inferior-octave-buffer))) + (unless arg + (pop-to-buffer buffer)) (unless (comint-check-proc buffer) (with-current-buffer buffer (inferior-octave-startup) (inferior-octave-mode))) - (unless arg - (pop-to-buffer buffer)) buffer)) ;;;###autoload @@ -724,6 +736,8 @@ ;; output may be mixed up). Hence, we need to digest the Octave ;; output to see when it issues a prompt. (while inferior-octave-receive-in-progress + (or (process-live-p inferior-octave-process) + (error "Process `%s' died" inferior-octave-process)) (accept-process-output inferior-octave-process)) (goto-char (point-max)) (set-marker (process-mark proc) (point)) @@ -1296,7 +1310,7 @@ (and (= (current-column) cfc) (eolp))) (forward-line 1) (if (not (eolp)) (insert " ")) - (or (do-auto-fill) + (or (funcall normal-auto-fill-function) (forward-line 1)))) t))) ------------------------------------------------------------ revno: 112656 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14281 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-05-21 17:48:52 -0400 message: * src/search.c (looking_at_1): Only set last_thing_searched if the match changed the match-data. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-21 05:27:33 +0000 +++ src/ChangeLog 2013-05-21 21:48:52 +0000 @@ -1,3 +1,8 @@ +2013-05-21 Barry OReilly + + * search.c (looking_at_1): Only set last_thing_searched if the match + changed the match-data (bug#14281). + 2013-05-21 Dmitry Antipov * xdisp.c (reseat_at_previous_visible_line_start): @@ -8,8 +13,8 @@ * xfns.c (check_x_display_info): Don't use XINT for terminal object. (Fx_display_pixel_width, Fx_display_pixel_height) - (Fx_display_mm_width, Fx_display_mm_height): Mention - `display-monitor-attributes-list' in docstrings. + (Fx_display_mm_width, Fx_display_mm_height): + Mention `display-monitor-attributes-list' in docstrings. * nsfns.m (ns_get_screen): Remove function. All uses removed. (check_ns_display_info): Sync with check_x_display_info in xfns.c. @@ -25,8 +30,8 @@ (Fx_display_pixel_width, Fx_display_pixel_width): Return width or height for all physical monitors as in X11. - * nsterm.m (x_display_pixel_width, x_display_pixel_height): Return - pixel width or height for all physical monitors as in X11. + * nsterm.m (x_display_pixel_width, x_display_pixel_height): + Return pixel width or height for all physical monitors as in X11. 2013-05-18 Paul Eggert === modified file 'src/search.c' --- src/search.c 2013-04-02 01:54:56 +0000 +++ src/search.c 2013-05-21 21:48:52 +0000 @@ -328,18 +328,18 @@ val = (i >= 0 ? Qt : Qnil); if (NILP (Vinhibit_changing_match_data) && i >= 0) + { for (i = 0; i < search_regs.num_regs; i++) if (search_regs.start[i] >= 0) { search_regs.start[i] = BYTE_TO_CHAR (search_regs.start[i] + BEGV_BYTE); - search_regs.end[i] - = BYTE_TO_CHAR (search_regs.end[i] + BEGV_BYTE); - } - - /* Set last_thing_searched only when match data is changed. */ - if (NILP (Vinhibit_changing_match_data)) + search_regs.end[i] + = BYTE_TO_CHAR (search_regs.end[i] + BEGV_BYTE); + } + /* Set last_thing_searched only when match data is changed. */ XSETBUFFER (last_thing_searched, current_buffer); + } return val; } ------------------------------------------------------------ revno: 112655 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-05-21 13:22:04 -0400 message: For now, revert previous rmail.el change diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-21 16:13:08 +0000 +++ lisp/ChangeLog 2013-05-21 17:22:04 +0000 @@ -2,10 +2,6 @@ * printing.el (pr-menu-bar): Define when compiling. - * mail/rmail.el (speedbar): No need to load when compiling. - (speedbar-make-specialized-keymap, speedbar-with-attached-buffer) - (speedbar-do-function-pointer): Declare. - 2013-05-21 Leo Liu * progmodes/octave.el (octave-auto-fill): Remove. === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2013-05-21 15:43:06 +0000 +++ lisp/mail/rmail.el 2013-05-21 17:22:04 +0000 @@ -4310,6 +4310,7 @@ (restore-buffer-modified-p nil))))))) ;;; Speedbar support for RMAIL files. +(eval-when-compile (require 'speedbar)) (defcustom rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$" "Regexp matching Rmail folder names to be displayed in Speedbar. @@ -4325,12 +4326,12 @@ (defvar rmail-speedbar-key-map nil "Keymap used when in rmail display mode.") -(declare-function speedbar-make-specialized-keymap "speedbar" ()) - (defun rmail-install-speedbar-variables () "Install those variables used by speedbar to enhance rmail." - (unless rmail-speedbar-key-map + (if rmail-speedbar-key-map + nil (setq rmail-speedbar-key-map (speedbar-make-specialized-keymap)) + (define-key rmail-speedbar-key-map "e" 'speedbar-edit-line) (define-key rmail-speedbar-key-map "r" 'speedbar-edit-line) (define-key rmail-speedbar-key-map "\C-m" 'speedbar-edit-line) @@ -4345,15 +4346,11 @@ (looking-at " "))]) "Additional menu-items to add to speedbar frame.") -(declare-function speedbar-insert-button "speedbar" - (text face mouse function &optional token prevline)) - ;; Make sure our special speedbar major mode is loaded (if (featurep 'speedbar) (rmail-install-speedbar-variables) (add-hook 'speedbar-load-hook 'rmail-install-speedbar-variables)) -;; Called from speedbar-add-localized-speedbar-support. (defun rmail-speedbar-buttons (buffer) "Create buttons for BUFFER containing rmail messages. Click on the address under Reply to: to reply to this person. @@ -4390,8 +4387,6 @@ (speedbar-insert-button file 'speedbar-file-face 'highlight 'rmail-speedbar-find-file nil t))))))) -(declare-function speedbar-with-attached-buffer "speedbar" (&rest forms) t) - (defun rmail-speedbar-button (text token indent) "Execute an rmail command specified by TEXT. The command used is TOKEN. INDENT is not used." @@ -4405,8 +4400,6 @@ (message "Loading in RMAIL file %s..." text) (rmail text))) -(declare-function speedbar-do-function-pointer "speedbar" ()) - (defun rmail-speedbar-move-message-to-folder-on-line () "If the current line is a folder, move current message to it." (interactive) ------------------------------------------------------------ revno: 112654 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-05-21 09:13:08 -0700 message: Silence printing.el compilation * lisp/printing.el (pr-menu-bar): Define when compiling. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-21 15:43:06 +0000 +++ lisp/ChangeLog 2013-05-21 16:13:08 +0000 @@ -1,5 +1,7 @@ 2013-05-21 Glenn Morris + * printing.el (pr-menu-bar): Define when compiling. + * mail/rmail.el (speedbar): No need to load when compiling. (speedbar-make-specialized-keymap, speedbar-with-attached-buffer) (speedbar-do-function-pointer): Declare. === modified file 'lisp/printing.el' --- lisp/printing.el 2013-01-11 23:08:55 +0000 +++ lisp/printing.el 2013-05-21 16:13:08 +0000 @@ -1342,6 +1342,10 @@ ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; GNU Emacs Definitions +(eval-and-compile + (unless (featurep 'xemacs) + (defvar pr-menu-bar nil + "Specify Printing menu-bar entry."))) (cond ((featurep 'xemacs) ; XEmacs @@ -1372,9 +1376,6 @@ (defun pr-menu-char-width () (frame-char-width)) - (defvar pr-menu-bar nil - "Specify Printing menu-bar entry.") - ;; GNU Emacs ;; Menu binding ;; Replace existing "print" item by "Printing" item. ------------------------------------------------------------ revno: 112653 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-05-21 08:43:06 -0700 message: Silence rmail.el compilation * lisp/mail/rmail.el (speedbar): No need to load when compiling. (speedbar-make-specialized-keymap, speedbar-with-attached-buffer) (speedbar-do-function-pointer): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-21 09:43:14 +0000 +++ lisp/ChangeLog 2013-05-21 15:43:06 +0000 @@ -1,3 +1,9 @@ +2013-05-21 Glenn Morris + + * mail/rmail.el (speedbar): No need to load when compiling. + (speedbar-make-specialized-keymap, speedbar-with-attached-buffer) + (speedbar-do-function-pointer): Declare. + 2013-05-21 Leo Liu * progmodes/octave.el (octave-auto-fill): Remove. === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2013-05-21 07:25:14 +0000 +++ lisp/mail/rmail.el 2013-05-21 15:43:06 +0000 @@ -4310,7 +4310,6 @@ (restore-buffer-modified-p nil))))))) ;;; Speedbar support for RMAIL files. -(eval-when-compile (require 'speedbar)) (defcustom rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$" "Regexp matching Rmail folder names to be displayed in Speedbar. @@ -4326,12 +4325,12 @@ (defvar rmail-speedbar-key-map nil "Keymap used when in rmail display mode.") +(declare-function speedbar-make-specialized-keymap "speedbar" ()) + (defun rmail-install-speedbar-variables () "Install those variables used by speedbar to enhance rmail." - (if rmail-speedbar-key-map - nil + (unless rmail-speedbar-key-map (setq rmail-speedbar-key-map (speedbar-make-specialized-keymap)) - (define-key rmail-speedbar-key-map "e" 'speedbar-edit-line) (define-key rmail-speedbar-key-map "r" 'speedbar-edit-line) (define-key rmail-speedbar-key-map "\C-m" 'speedbar-edit-line) @@ -4346,11 +4345,15 @@ (looking-at " "))]) "Additional menu-items to add to speedbar frame.") +(declare-function speedbar-insert-button "speedbar" + (text face mouse function &optional token prevline)) + ;; Make sure our special speedbar major mode is loaded (if (featurep 'speedbar) (rmail-install-speedbar-variables) (add-hook 'speedbar-load-hook 'rmail-install-speedbar-variables)) +;; Called from speedbar-add-localized-speedbar-support. (defun rmail-speedbar-buttons (buffer) "Create buttons for BUFFER containing rmail messages. Click on the address under Reply to: to reply to this person. @@ -4387,6 +4390,8 @@ (speedbar-insert-button file 'speedbar-file-face 'highlight 'rmail-speedbar-find-file nil t))))))) +(declare-function speedbar-with-attached-buffer "speedbar" (&rest forms) t) + (defun rmail-speedbar-button (text token indent) "Execute an rmail command specified by TEXT. The command used is TOKEN. INDENT is not used." @@ -4400,6 +4405,8 @@ (message "Loading in RMAIL file %s..." text) (rmail text))) +(declare-function speedbar-do-function-pointer "speedbar" ()) + (defun rmail-speedbar-move-message-to-folder-on-line () "If the current line is a folder, move current message to it." (interactive) ------------------------------------------------------------ revno: 112652 committer: Leo Liu branch nick: trunk timestamp: Tue 2013-05-21 17:43:14 +0800 message: Simplify auto fill in Octave mode and some small improvements diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-21 07:25:14 +0000 +++ lisp/ChangeLog 2013-05-21 09:43:14 +0000 @@ -1,3 +1,13 @@ +2013-05-21 Leo Liu + + * progmodes/octave.el (octave-auto-fill): Remove. + (octave-indent-new-comment-line): Improve. + (octave-mode): Use auto fill mode through + comment-line-break-function and fill-nobreak-predicate + (octave-goto-function-definition): Support DEFUN_DLD. + (octave-beginning-of-defun): Small Tweak + (octave-help): Show parent directory. + 2013-05-21 Glenn Morris * files.el (dired-unmark): === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-20 22:52:40 +0000 +++ lisp/progmodes/octave.el 2013-05-21 09:43:14 +0000 @@ -540,11 +540,11 @@ (setq-local paragraph-separate paragraph-start) (setq-local paragraph-ignore-fill-prefix t) (setq-local fill-paragraph-function 'octave-fill-paragraph) - ;; FIXME: Why disable it? - ;; (setq-local adaptive-fill-regexp nil) - ;; Again, this is not a property of the language, don't set it here. - ;; (setq fill-column 72) - (setq-local normal-auto-fill-function 'octave-auto-fill) + + ;; Use `smie-auto-fill' after fixing bug#14381. + (setq-local normal-auto-fill-function 'do-auto-fill) + (setq-local fill-nobreak-predicate #'octave-in-string-p) + (setq-local comment-line-break-function #'octave-indent-new-comment-line) (setq font-lock-defaults '(octave-font-lock-keywords)) @@ -946,7 +946,7 @@ (or done (goto-char (point-min))))))) (pcase (file-name-extension (buffer-file-name)) (`"cc" (funcall search - "\\_ arg 0) (/= orig (point))) (setq arg (1- arg))) (forward-sexp (- arg)) + (and (< arg 0) (forward-sexp -1)) (/= orig (point)))) - -;;; Filling -(defun octave-auto-fill () - "Perform auto-fill in Octave mode. -Returns nil if no feasible place to break the line could be found, and t -otherwise." - (let (fc give-up) - (if (or (null (setq fc (current-fill-column))) - (save-excursion - (beginning-of-line) - (and auto-fill-inhibit-regexp - (octave-looking-at-kw auto-fill-inhibit-regexp)))) - nil ; Can't do anything - (if (and (not (octave-in-comment-p)) - (> (current-column) fc)) - (setq fc (- fc (+ (length octave-continuation-string) 1)))) - (while (and (not give-up) (> (current-column) fc)) - (let* ((opoint (point)) - (fpoint - (save-excursion - (move-to-column (+ fc 1)) - (skip-chars-backward "^ \t\n") - ;; If we're at the beginning of the line, break after - ;; the first word - (if (bolp) - (re-search-forward "[ \t]" opoint t)) - ;; If we're in a comment line, don't break after the - ;; comment chars - (if (save-excursion - (skip-syntax-backward " <") - (bolp)) - (re-search-forward "[ \t]" (line-end-position) - 'move)) - ;; If we're not in a comment line and just ahead the - ;; continuation string, don't break here. - (if (and (not (octave-in-comment-p)) - (looking-at - (concat "\\s-*" - (regexp-quote - octave-continuation-string) - "\\s-*$"))) - (end-of-line)) - (skip-chars-backward " \t") - (point)))) - (if (save-excursion - (goto-char fpoint) - (not (or (bolp) (eolp)))) - (let ((prev-column (current-column))) - (if (save-excursion - (skip-chars-backward " \t") - (= (point) fpoint)) - (progn - (octave-maybe-insert-continuation-string) - (indent-new-comment-line t)) - (save-excursion - (goto-char fpoint) - (octave-maybe-insert-continuation-string) - (indent-new-comment-line t))) - (if (>= (current-column) prev-column) - (setq give-up t))) - (setq give-up t)))) - (not give-up)))) - (defun octave-fill-paragraph (&optional _arg) "Fill paragraph of Octave code, handling Octave comments." ;; FIXME: difference with generic fill-paragraph: @@ -1354,11 +1296,10 @@ (and (= (current-column) cfc) (eolp))) (forward-line 1) (if (not (eolp)) (insert " ")) - (or (octave-auto-fill) + (or (do-auto-fill) (forward-line 1)))) t))) - ;;; Completions (defun octave-completion-at-point () @@ -1658,10 +1599,14 @@ (when (re-search-forward "from the file \\(.*\\)$" (line-end-position) t) - (let ((file (match-string 1))) + (let* ((file (match-string 1)) + (dir (file-name-directory + (directory-file-name (file-name-directory file))))) (replace-match "" nil nil nil 1) (insert "`") - (help-insert-xref-button (file-name-nondirectory file) + ;; Include the parent directory which may be regarded as + ;; the category for the FN. + (help-insert-xref-button (file-relative-name file dir) 'octave-help-file fn) (insert "'"))) ;; Make 'See also' clickable ------------------------------------------------------------ revno: 112651 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-05-21 00:25:14 -0700 message: Silence some compiler warnings * calculator.el (electric, ehelp): No need to load when compiling. (Electric-command-loop, electric-describe-mode): Declare. * doc-view.el (doc-view-current-converter-processes): Move before use. * files.el (dired-unmark): * progmodes/gud.el (gdb-input): Update declarations. * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Move MODE-set-explicitly definition before use. * erc/erc-log.el (erc-network-name): Declare. * erc/erc-notify.el (pcomplete--here): Declare. (pcomplete/erc-mode/NOTIFY): Require pcomplete. * international/mule-diag.el (mule-diag): Don't use obsolete window-system-version. * mail/feedmail.el (smtpmail): No need to load when compiling. (smtpmail-via-smtp, smtpmail-smtp-server): Declare. * mail/mail-utils.el (rfc822): No need to load when compiling. (rfc822-addresses): Autoload it. (mail-strip-quoted-names): Trivial simplification. * mail/rmail.el (rmail-mime-message-p, rmail-mime-toggle-raw): Declare. (rmail-retry-failure): Don't assume that rmail-mime-feature == rmailmm. * net/snmp-mode.el (tempo): Don't duplicate requires. * progmodes/prolog.el (info): No need to load when compiling. (comint): Require before shell requires it. (Info-goto-node): Autoload it. (Info-follow-nearest-node): Declare. (prolog-help-info, prolog-goto-predicate-info): No need to require info. * textmodes/artist.el (picture-mode-exit): Declare. * textmodes/reftex-parse.el (reftex-parse-from-file): Trivial rewrite so the compiler can parse it better. * url/url-dav.el (url-http): Require it. (url-http-head-file-attributes): Don't autoload it. * url/url-proxy.el (url-http): Autoload it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-20 22:52:40 +0000 +++ lisp/ChangeLog 2013-05-21 07:25:14 +0000 @@ -1,3 +1,42 @@ +2013-05-21 Glenn Morris + + * files.el (dired-unmark): + * progmodes/gud.el (gdb-input): Update declarations. + + * calculator.el (electric, ehelp): No need to load when compiling. + (Electric-command-loop, electric-describe-mode): Declare. + + * doc-view.el (doc-view-current-converter-processes): Move before use. + + * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): + Move MODE-set-explicitly definition before use. + + * international/mule-diag.el (mule-diag): + Don't use obsolete window-system-version. + + * mail/feedmail.el (smtpmail): No need to load when compiling. + (smtpmail-via-smtp, smtpmail-smtp-server): Declare. + + * mail/mail-utils.el (rfc822): No need to load when compiling. + (rfc822-addresses): Autoload it. + (mail-strip-quoted-names): Trivial simplification. + + * mail/rmail.el (rmail-mime-message-p, rmail-mime-toggle-raw): Declare. + (rmail-retry-failure): Don't assume that rmail-mime-feature == rmailmm. + + * net/snmp-mode.el (tempo): Don't duplicate requires. + + * progmodes/prolog.el (info): No need to load when compiling. + (comint): Require before shell requires it. + (Info-goto-node): Autoload it. + (Info-follow-nearest-node): Declare. + (prolog-help-info, prolog-goto-predicate-info): No need to require info. + + * textmodes/artist.el (picture-mode-exit): Declare. + + * textmodes/reftex-parse.el (reftex-parse-from-file): + Trivial rewrite so the compiler can parse it better. + 2013-05-20 Leo Liu * progmodes/octave.el (octave-help-mode-map) === modified file 'lisp/calculator.el' --- lisp/calculator.el 2013-01-01 09:11:05 +0000 +++ lisp/calculator.el 2013-05-21 07:25:14 +0000 @@ -668,7 +668,9 @@ \\{calculator-mode-map}") -(eval-when-compile (require 'electric) (require 'ehelp)) +(declare-function Electric-command-loop "electric" + (return-tag &optional prompt inhibit-quitting + loop-function loop-state)) ;;;###autoload (defun calculator () @@ -1667,6 +1669,8 @@ (interactive "cRegister to get value from: ") (calculator-put-value (cdr (assq reg calculator-registers)))) +(declare-function electric-describe-mode "ehelp" ()) + (defun calculator-help () ;; this is used as the quick reference screen you get with `h' "Quick reference: @@ -1697,7 +1701,7 @@ (if (or (not calculator-electric-mode) ;; XEmacs has a problem with electric-describe-mode (featurep 'xemacs)) - (describe-mode) + (describe-mode) (electric-describe-mode)) (if calculator-electric-mode (use-global-map g-map)) === modified file 'lisp/doc-view.el' --- lisp/doc-view.el 2013-04-16 00:51:46 +0000 +++ lisp/doc-view.el 2013-05-21 07:25:14 +0000 @@ -1,6 +1,5 @@ ;;; doc-view.el --- View PDF/PostScript/DVI files in Emacs -*- lexical-binding: t -*- - ;; Copyright (C) 2007-2013 Free Software Foundation, Inc. ;; ;; Author: Tassilo Horn @@ -306,6 +305,10 @@ ;;;; Internal Variables +(defvar doc-view-current-converter-processes nil + "Only used internally.") +(make-variable-buffer-local 'doc-view-current-converter-processes) + (defun doc-view-new-window-function (winprops) ;; (message "New window %s for buf %s" (car winprops) (current-buffer)) (cl-assert (or (eq t (car winprops)) @@ -348,10 +351,6 @@ "Only used internally.") (make-variable-buffer-local 'doc-view-current-files) -(defvar doc-view-current-converter-processes nil - "Only used internally.") -(make-variable-buffer-local 'doc-view-current-converter-processes) - (defvar doc-view-current-timer nil "Only used internally.") (make-variable-buffer-local 'doc-view-current-timer) === modified file 'lisp/emacs-lisp/easy-mmode.el' --- lisp/emacs-lisp/easy-mmode.el 2013-02-26 01:50:45 +0000 +++ lisp/emacs-lisp/easy-mmode.el 2013-05-21 07:25:14 +0000 @@ -419,6 +419,13 @@ ;; up-to-here. :autoload-end + ;; MODE-set-explicitly is set in MODE-set-explicitly and cleared by + ;; kill-all-local-variables. + (defvar-local ,MODE-set-explicitly nil) + (defun ,MODE-set-explicitly () + (setq ,MODE-set-explicitly t)) + (put ',MODE-set-explicitly 'definition-name ',global-mode) + ;; A function which checks whether MODE has been disabled in the major ;; mode hook which has just been run. (add-hook ',minor-MODE-hook ',MODE-set-explicitly) @@ -451,13 +458,7 @@ (defun ,MODE-cmhh () (add-to-list ',MODE-buffers (current-buffer)) (add-hook 'post-command-hook ',MODE-check-buffers)) - (put ',MODE-cmhh 'definition-name ',global-mode) - ;; MODE-set-explicitly is set in MODE-set-explicitly and cleared by - ;; kill-all-local-variables. - (defvar-local ,MODE-set-explicitly nil) - (defun ,MODE-set-explicitly () - (setq ,MODE-set-explicitly t)) - (put ',MODE-set-explicitly 'definition-name ',global-mode)))) + (put ',MODE-cmhh 'definition-name ',global-mode)))) ;;; ;;; easy-mmode-defmap === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2013-05-21 07:15:59 +0000 +++ lisp/erc/ChangeLog 2013-05-21 07:25:14 +0000 @@ -1,5 +1,10 @@ 2013-05-21 Glenn Morris + * erc-log.el (erc-network-name): Declare. + + * erc-notify.el (pcomplete--here): Declare. + (pcomplete/erc-mode/NOTIFY): Require pcomplete. + * erc.el (erc-quit-reason-various-alist) (erc-part-reason-various-alist): Don't mention zippy. (erc-quit-reason, erc-part-reason): Remove zippy options. === modified file 'lisp/erc/erc-log.el' --- lisp/erc/erc-log.el 2013-01-02 16:13:04 +0000 +++ lisp/erc/erc-log.el 2013-05-21 07:25:14 +0000 @@ -378,6 +378,8 @@ ;; we need a make-safe-file-name function. (convert-standard-filename file))) +(declare-function erc-network-name "erc-networks" ()) + (defun erc-generate-log-file-name-network (buffer target nick server port) "Generates a log-file name using the network name rather than server name. This results in a file name of the form #channel!nick@network.txt. === modified file 'lisp/erc/erc-notify.el' --- lisp/erc/erc-notify.el 2013-01-02 16:13:04 +0000 +++ lisp/erc/erc-notify.el 2013-05-21 07:25:14 +0000 @@ -235,8 +235,13 @@ (autoload 'pcomplete-erc-all-nicks "erc-pcomplete") +;; "--" is not a typo. +(declare-function pcomplete--here "pcomplete" + (&optional form stub paring form-only)) + ;;;###autoload (defun pcomplete/erc-mode/NOTIFY () + (require 'pcomplete) (pcomplete-here (pcomplete-erc-all-nicks))) (erc-notify-install-message-catalogs) === modified file 'lisp/files.el' --- lisp/files.el 2013-04-27 17:07:01 +0000 +++ lisp/files.el 2013-05-21 07:25:14 +0000 @@ -206,7 +206,7 @@ (declare-function msdos-long-file-names "msdos.c") (declare-function w32-long-file-name "w32proc.c") (declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep)) -(declare-function dired-unmark "dired" (arg)) +(declare-function dired-unmark "dired" (arg &optional interactive)) (declare-function dired-do-flagged-delete "dired" (&optional nomessage)) (declare-function dos-8+3-filename "dos-fns" (filename)) (declare-function dosified-file-name "dos-fns" (file-name)) === modified file 'lisp/international/mule-diag.el' --- lisp/international/mule-diag.el 2013-01-01 09:11:05 +0000 +++ lisp/international/mule-diag.el 2013-05-21 07:25:14 +0000 @@ -1104,8 +1104,7 @@ (insert-section 2 "Display") (if window-system - (insert (format "Window-system: %s, version %s" - window-system window-system-version)) + (insert (format "Window-system: %s" window-system)) (insert "Terminal: " (getenv "TERM"))) (insert "\n\n") === modified file 'lisp/mail/feedmail.el' --- lisp/mail/feedmail.el 2013-02-09 12:52:01 +0000 +++ lisp/mail/feedmail.el 2013-05-21 07:25:14 +0000 @@ -370,9 +370,6 @@ (require 'mail-utils) ; pick up mail-strip-quoted-names -(eval-when-compile - (require 'smtpmail)) - (autoload 'mail-do-fcc "sendmail") (defgroup feedmail nil @@ -1619,6 +1616,10 @@ ;; These mean "report errors by mail" and "deliver in background". (if (null mail-interactive) '("-oem" "-odb"))))) +(declare-function smtpmail-via-smtp "smtpmail" + (recipient smtpmail-text-buffer &optional ask-for-password)) +(defvar smtpmail-smtp-server) + ;; provided by jam@austin.asc.slb.com (James A. McLaughlin); ;; simplified by WJC after more feedmail development; ;; idea (but not implementation) of copying smtpmail trace buffer to === modified file 'lisp/mail/mail-utils.el' --- lisp/mail/mail-utils.el 2013-01-01 09:11:05 +0000 +++ lisp/mail/mail-utils.el 2013-05-21 07:25:14 +0000 @@ -183,17 +183,15 @@ (error "Malformed MIME quoted-printable message")))) (not failed)))))) -(eval-when-compile (require 'rfc822)) +(autoload 'rfc822-addresses "rfc822") (defun mail-strip-quoted-names (address) "Delete comments and quoted strings in an address list ADDRESS. Also delete leading/trailing whitespace and replace FOO with just BAR. Return a modified address list." - (if (null address) - nil + (when address (if mail-use-rfc822 - (progn (require 'rfc822) - (mapconcat 'identity (rfc822-addresses address) ", ")) + (mapconcat 'identity (rfc822-addresses address) ", ") (let (pos) ;; Strip comments. === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2013-05-05 17:41:09 +0000 +++ lisp/mail/rmail.el 2013-05-21 07:25:14 +0000 @@ -4105,6 +4105,9 @@ (autoload 'mail-position-on-field "sendmail") +(declare-function rmail-mime-message-p "rmailmm" ()) +(declare-function rmail-mime-toggle-raw "rmailmm" (&optional state)) + (defun rmail-retry-failure () "Edit a mail message which is based on the contents of the current message. For a message rejected by the mail system, extract the interesting headers and @@ -4117,7 +4120,13 @@ specifying headers which should not be copied into the new message." (interactive) (require 'mail-utils) - (if rmail-enable-mime + ;; FIXME This does not handle rmail-mime-feature != 'rmailmm. + ;; There is no API defined for rmail-mime-feature to provide + ;; rmail-mime-message-p, rmail-mime-toggle-raw equivalents. + ;; But does anyone actually use rmail-mime-feature != 'rmailmm? + (if (and rmail-enable-mime + (eq rmail-mime-feature 'rmailmm) + (featurep rmail-mime-feature)) (with-current-buffer rmail-buffer (if (rmail-mime-message-p) (let ((rmail-mime-mbox-buffer rmail-view-buffer) === modified file 'lisp/net/snmp-mode.el' --- lisp/net/snmp-mode.el 2013-01-01 09:11:05 +0000 +++ lisp/net/snmp-mode.el 2013-05-21 07:25:14 +0000 @@ -85,8 +85,9 @@ ;;; Code: (eval-when-compile - (require 'imenu) ; Need this stuff when compiling for imenu macros, etc. - (require 'tempo)) + (require 'imenu)) ; Need this stuff when compiling for imenu macros, etc. + +(require 'tempo) ;;;---------------------------------------------------------------------------- ;; @@ -540,8 +541,6 @@ ;; ;;;---------------------------------------------------------------------------- -(require 'tempo) - ;; Perform a completing-read with info given ;; (defun snmp-completing-read (prompt table &optional pred require init hist) === modified file 'lisp/progmodes/gud.el' --- lisp/progmodes/gud.el 2013-05-08 15:06:28 +0000 +++ lisp/progmodes/gud.el 2013-05-21 07:25:14 +0000 @@ -3429,7 +3429,7 @@ ((or `xdb `pdb) (concat "p " expr)) (`sdb (concat expr "/")))) -(declare-function gdb-input "gdb-mi" (command handler)) +(declare-function gdb-input "gdb-mi" (command handler &optional trigger)) (declare-function tooltip-expr-to-print "tooltip" (event)) (declare-function tooltip-event-buffer "tooltip" (event)) === modified file 'lisp/progmodes/prolog.el' --- lisp/progmodes/prolog.el 2013-05-08 16:27:53 +0000 +++ lisp/progmodes/prolog.el 2013-05-21 07:25:14 +0000 @@ -278,16 +278,16 @@ ;;; Code: +(require 'comint) + (eval-when-compile (require 'font-lock) ;; We need imenu everywhere because of the predicate index! (require 'imenu) ;) - (require 'info) (require 'shell) ) -(require 'comint) (require 'easymenu) (require 'align) @@ -3030,11 +3030,14 @@ (error "Sorry, no help method defined for this Prolog system.")))) )) + +(autoload 'Info-goto-node "info" nil t) +(declare-function Info-follow-nearest-node "info" (&optional FORK)) + (defun prolog-help-info (predicate) (let ((buffer (current-buffer)) oldp (str (concat "^\\* " (regexp-quote predicate) " */"))) - (require 'info) (pop-to-buffer nil) (Info-goto-node prolog-info-predicate-index) (if (not (re-search-forward str nil t)) @@ -3123,7 +3126,6 @@ (defun prolog-goto-predicate-info (predicate) "Go to the info page for PREDICATE, which is a PredSpec." (interactive) - (require 'info) (string-match "\\(.*\\)/\\([0-9]+\\).*$" predicate) (let ((buffer (current-buffer)) (name (match-string 1 predicate)) === modified file 'lisp/textmodes/artist.el' --- lisp/textmodes/artist.el 2013-02-23 21:54:00 +0000 +++ lisp/textmodes/artist.el 2013-05-21 07:25:14 +0000 @@ -1449,6 +1449,8 @@ (message ""))) (artist-mode-line-show-curr-operation artist-key-is-drawing)) +(declare-function picture-mode-exit "picture" (&optional nostrip)) + (defun artist-mode-exit () "Exit Artist mode. This will call the hook `artist-mode-hook'." (if (and artist-picture-compatibility (eq major-mode 'picture-mode)) === modified file 'lisp/textmodes/reftex-parse.el' --- lisp/textmodes/reftex-parse.el 2013-04-25 12:01:09 +0000 +++ lisp/textmodes/reftex-parse.el 2013-05-21 07:25:14 +0000 @@ -238,12 +238,13 @@ ;; \label{} defs should always be honored, ;; just no keyval style [label=foo] defs. (string-equal "\label{" (substring (reftex-match-string 0) 0 7)) - (not (fboundp 'TeX-current-macro)) - (not (fboundp 'LaTeX-current-environment)) - (not (or (member (save-match-data (TeX-current-macro)) - reftex-label-ignored-macros-and-environments) - (member (save-match-data (LaTeX-current-environment)) - reftex-label-ignored-macros-and-environments)))) + (if (and (fboundp 'TeX-current-macro) + (fboundp 'LaTeX-current-environment)) + (not (or (member (save-match-data (TeX-current-macro)) + reftex-label-ignored-macros-and-environments) + (member (save-match-data (LaTeX-current-environment)) + reftex-label-ignored-macros-and-environments))) + t)) (push (reftex-label-info (reftex-match-string 1) file bound) docstruct))) === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2013-05-15 23:55:41 +0000 +++ lisp/url/ChangeLog 2013-05-21 07:25:14 +0000 @@ -1,3 +1,10 @@ +2013-05-21 Glenn Morris + + * url-dav.el (url-http): Require it. + (url-http-head-file-attributes): Don't autoload it. + + * url-proxy.el (url-http): Autoload it. + 2013-05-15 Glenn Morris * url-news.el (url-news): Remove empty custom group. === modified file 'lisp/url/url-dav.el' --- lisp/url/url-dav.el 2013-01-01 09:11:05 +0000 +++ lisp/url/url-dav.el 2013-05-21 07:25:14 +0000 @@ -32,10 +32,12 @@ (require 'xml) (require 'url-util) (require 'url-handlers) +(require 'url-http) (defvar url-dav-supported-protocols '(1 2) "List of supported DAV versions.") +;; Dynamically bound. (defvar url-http-content-type) (defvar url-http-response-status) (defvar url-http-end-of-headers) @@ -621,8 +623,6 @@ (url-debug 'dav "Unrecognized DAV:locktype (%S)" (car lock))))) modes)) -(autoload 'url-http-head-file-attributes "url-http") - (defun url-dav-file-attributes (url &optional id-format) (let ((properties (cdar (url-dav-get-properties url)))) (if (and properties === modified file 'lisp/url/url-proxy.el' --- lisp/url/url-proxy.el 2013-01-01 09:11:05 +0000 +++ lisp/url/url-proxy.el 2013-05-21 07:25:14 +0000 @@ -63,6 +63,8 @@ (url-warn 'url (format "Unknown proxy directive: %s" proxy) 'critical) nil)))) +(autoload 'url-http "url-http") + (defun url-proxy (url callback &optional cbargs) ;; Retrieve URL from a proxy. ;; Expects `url-using-proxy' to be bound to the specific proxy to use." @@ -73,7 +75,7 @@ (url-http url callback cbargs)) (t (error "Don't know how to use proxy `%s'" url-using-proxy)))) - + (provide 'url-proxy) ;;; url-proxy.el ends here ------------------------------------------------------------ revno: 112650 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-05-21 00:15:59 -0700 message: Make some trivial erc.el functions obsolete * lisp/erc/erc.el (erc-quit-reason-various-alist) (erc-part-reason-various-alist): Don't mention zippy. (erc-quit-reason, erc-part-reason): Remove zippy options. (erc-quit-reason-zippy, erc-part-reason-zippy): Make obsolete. If yow is not defined, fall back to -normal versions. diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2013-05-15 23:55:41 +0000 +++ lisp/erc/ChangeLog 2013-05-21 07:15:59 +0000 @@ -1,3 +1,11 @@ +2013-05-21 Glenn Morris + + * erc.el (erc-quit-reason-various-alist) + (erc-part-reason-various-alist): Don't mention zippy. + (erc-quit-reason, erc-part-reason): Remove zippy options. + (erc-quit-reason-zippy, erc-part-reason-zippy): Make obsolete. + If yow is not defined, fall back to -normal versions. + 2013-05-15 Glenn Morris * erc-list.el (erc-list): === modified file 'lisp/erc/erc.el' --- lisp/erc/erc.el 2013-01-02 16:13:04 +0000 +++ lisp/erc/erc.el 2013-05-21 07:15:59 +0000 @@ -899,13 +899,12 @@ As an example: (setq erc-quit-reason-various-alist - '((\"zippy\" erc-quit-reason-zippy) - (\"xmms\" dme:now-playing) + '((\"xmms\" dme:now-playing) (\"version\" erc-quit-reason-normal) (\"home\" \"Gone home !\") (\"^$\" \"Default Reason\"))) -If the user types \"/quit zippy\", then a Zippy the Pinhead quotation -will be used as the quit message." +If the user types \"/quit home\", then \"Gone home !\" will be used +as the quit message." :group 'erc-quit-and-part :type '(repeat (list regexp (choice (string) (function))))) @@ -923,13 +922,12 @@ As an example: (setq erc-part-reason-various-alist - '((\"zippy\" erc-part-reason-zippy) - (\"xmms\" dme:now-playing) + '((\"xmms\" dme:now-playing) (\"version\" erc-part-reason-normal) (\"home\" \"Gone home !\") (\"^$\" \"Default Reason\"))) -If the user types \"/part zippy\", then a Zippy the Pinhead quotation -will be used as the part message." +If the user types \"/part home\", then \"Gone home !\" will be used +as the part message." :group 'erc-quit-and-part :type '(repeat (list regexp (choice (string) (function))))) @@ -940,7 +938,6 @@ user after \"/quit\"." :group 'erc-quit-and-part :type '(choice (const erc-quit-reason-normal) - (const erc-quit-reason-zippy) (const erc-quit-reason-various) (symbol))) @@ -951,7 +948,6 @@ user after \"/PART\"." :group 'erc-quit-and-part :type '(choice (const erc-part-reason-normal) - (const erc-part-reason-zippy) (const erc-part-reason-various) (symbol))) @@ -3398,7 +3394,11 @@ If S is non-nil, it will be used as the quit reason." (or s - (erc-replace-regexp-in-string "\n" "" (yow)))) + (if (fboundp 'yow) + (erc-replace-regexp-in-string "\n" "" (yow)) + (erc-quit-reason-normal)))) + +(make-obsolete 'erc-quit-reason-zippy "it will be removed." "24.4") (defun erc-quit-reason-various (s) "Choose a quit reason based on S (a string)." @@ -3425,7 +3425,11 @@ If S is non-nil, it will be used as the quit reason." (or s - (erc-replace-regexp-in-string "\n" "" (yow)))) + (if (fboundp 'yow) + (erc-replace-regexp-in-string "\n" "" (yow)) + (erc-part-reason-normal)))) + +(make-obsolete 'erc-part-reason-zippy "it will be removed." "24.4") (defun erc-part-reason-various (s) "Choose a part reason based on S (a string)." ------------------------------------------------------------ revno: 112649 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-05-21 09:27:33 +0400 message: * xdisp.c (reseat_at_previous_visible_line_start): Already declared in dispextern.h, so remove it here. (move_it_vertically_backward): Likewise. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-20 08:27:56 +0000 +++ src/ChangeLog 2013-05-21 05:27:33 +0000 @@ -1,3 +1,9 @@ +2013-05-21 Dmitry Antipov + + * xdisp.c (reseat_at_previous_visible_line_start): + Already declared in dispextern.h, so remove it here. + (move_it_vertically_backward): Likewise. + 2013-05-20 YAMAMOTO Mitsuharu * xfns.c (check_x_display_info): Don't use XINT for terminal object. === modified file 'src/xdisp.c' --- src/xdisp.c 2013-05-16 18:33:27 +0000 +++ src/xdisp.c 2013-05-21 05:27:33 +0000 @@ -881,7 +881,6 @@ static void reseat (struct it *, struct text_pos, int); static void reseat_1 (struct it *, struct text_pos, int); static void back_to_previous_visible_line_start (struct it *); -void reseat_at_previous_visible_line_start (struct it *); static void reseat_at_next_visible_line_start (struct it *, int); static int next_element_from_ellipsis (struct it *); static int next_element_from_display_vector (struct it *); @@ -900,7 +899,6 @@ static enum move_it_result move_it_in_display_line_to (struct it *, ptrdiff_t, int, enum move_operation_enum); -void move_it_vertically_backward (struct it *, int); static void get_visually_first_element (struct it *); static void init_to_row_start (struct it *, struct window *, struct glyph_row *);