Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103522. ------------------------------------------------------------ revno: 103522 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-03-04 20:24:44 -0800 message: esh-util.el comment fix. diff: === modified file 'lisp/eshell/esh-util.el' --- lisp/eshell/esh-util.el 2011-03-05 03:53:41 +0000 +++ lisp/eshell/esh-util.el 2011-03-05 04:24:44 +0000 @@ -285,7 +285,6 @@ (setq text (replace-match " " t t text))) text)) -;; FIXME this is just dolist. (defmacro eshell-for (for-var for-list &rest forms) "Iterate through a list" `(let ((list-iter ,for-list)) ------------------------------------------------------------ revno: 103521 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-03-04 20:11:05 -0800 message: Default all eshell hooks to nil (bug#5375) * eshell/esh-mode.el (eshell-kill-buffer-function): New function. (eshell-mode): Use eshell-kill-buffer-function. Run the -initialize functions independently of the -load-hooks. * eshell/esh-proc.el (eshell-kill-process-function): New function. (eshell-gather-process-output, eshell-sentinel) (eshell-interrupt-process, eshell-kill-process, eshell-quit-process): Use eshell-kill-process-function. * eshell/em-alias.el (eshell-alias-load-hook): * eshell/em-banner.el (eshell-banner-load-hook): * eshell/em-cmpl.el (eshell-cmpl-load-hook): * eshell/em-dirs.el (eshell-dirs-load-hook): * eshell/em-glob.el (eshell-glob-load-hook): * eshell/em-hist.el (eshell-hist-load-hook): * eshell/em-pred.el (eshell-pred-load-hook): * eshell/em-prompt.el (eshell-prompt-load-hook): * eshell/em-rebind.el (eshell-rebind-load-hook): * eshell/em-script.el (eshell-script-load-hook): * eshell/em-smart.el (eshell-smart-load-hook): * eshell/em-term.el (eshell-term-load-hook): * eshell/em-unix.el (eshell-unix-load-hook): * eshell/esh-arg.el (eshell-arg-load-hook): * eshell/esh-cmd.el (eshell-cmd-load-hook): * eshell/esh-ext.el (eshell-ext-load-hook): * eshell/esh-io.el (eshell-io-load-hook): * eshell/esh-mode.el (eshell-exit-hook): * eshell/esh-proc.el (eshell-proc-load-hook, eshell-kill-hook): * eshell/esh-var.el (eshell-var-load-hook): Set default hook values to nil. (Bug#5375) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-05 03:59:53 +0000 +++ lisp/ChangeLog 2011-03-05 04:11:05 +0000 @@ -1,5 +1,34 @@ 2011-03-05 Glenn Morris + * eshell/esh-mode.el (eshell-kill-buffer-function): New function. + (eshell-mode): Use eshell-kill-buffer-function. + Run the -initialize functions independently of the -load-hooks. + * eshell/esh-proc.el (eshell-kill-process-function): New function. + (eshell-gather-process-output, eshell-sentinel) + (eshell-interrupt-process, eshell-kill-process, eshell-quit-process): + Use eshell-kill-process-function. + * eshell/em-alias.el (eshell-alias-load-hook): + * eshell/em-banner.el (eshell-banner-load-hook): + * eshell/em-cmpl.el (eshell-cmpl-load-hook): + * eshell/em-dirs.el (eshell-dirs-load-hook): + * eshell/em-glob.el (eshell-glob-load-hook): + * eshell/em-hist.el (eshell-hist-load-hook): + * eshell/em-pred.el (eshell-pred-load-hook): + * eshell/em-prompt.el (eshell-prompt-load-hook): + * eshell/em-rebind.el (eshell-rebind-load-hook): + * eshell/em-script.el (eshell-script-load-hook): + * eshell/em-smart.el (eshell-smart-load-hook): + * eshell/em-term.el (eshell-term-load-hook): + * eshell/em-unix.el (eshell-unix-load-hook): + * eshell/esh-arg.el (eshell-arg-load-hook): + * eshell/esh-cmd.el (eshell-cmd-load-hook): + * eshell/esh-ext.el (eshell-ext-load-hook): + * eshell/esh-io.el (eshell-io-load-hook): + * eshell/esh-mode.el (eshell-exit-hook): + * eshell/esh-proc.el (eshell-proc-load-hook, eshell-kill-hook): + * eshell/esh-var.el (eshell-var-load-hook): + Set default hook values to nil. (Bug#5375) + * eshell/esh-module.el (eshell-module-unload-hook) (eshell-modules-list): Remove leading * from defcustom docs. === modified file 'lisp/eshell/em-alias.el' --- lisp/eshell/em-alias.el 2011-03-05 03:53:41 +0000 +++ lisp/eshell/em-alias.el 2011-03-05 04:11:05 +0000 @@ -117,8 +117,9 @@ ;; :link '(custom-manual "(eshell)Auto-correction of bad commands") :group 'eshell-alias) -(defcustom eshell-alias-load-hook '(eshell-alias-initialize) +(defcustom eshell-alias-load-hook nil "A hook that gets run when `eshell-alias' is loaded." + :version "24.1" ; removed eshell-alias-initialize :type 'hook :group 'eshell-alias) === modified file 'lisp/eshell/em-banner.el' --- lisp/eshell/em-banner.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-banner.el 2011-03-05 04:11:05 +0000 @@ -64,8 +64,9 @@ (put 'eshell-banner-message 'risky-local-variable t) -(defcustom eshell-banner-load-hook '(eshell-banner-initialize) +(defcustom eshell-banner-load-hook nil "A list of functions to run when `eshell-banner' is loaded." + :version "24.1" ; removed eshell-banner-initialize :type 'hook :group 'eshell-banner) === modified file 'lisp/eshell/em-cmpl.el' --- lisp/eshell/em-cmpl.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-cmpl.el 2011-03-05 04:11:05 +0000 @@ -84,8 +84,9 @@ ;;; User Variables: -(defcustom eshell-cmpl-load-hook '(eshell-cmpl-initialize) +(defcustom eshell-cmpl-load-hook nil "A list of functions to run when `eshell-cmpl' is loaded." + :version "24.1" ; removed eshell-cmpl-initialize :type 'hook :group 'eshell-cmpl) === modified file 'lisp/eshell/em-dirs.el' --- lisp/eshell/em-dirs.el 2011-03-05 03:53:41 +0000 +++ lisp/eshell/em-dirs.el 2011-03-05 04:11:05 +0000 @@ -58,8 +58,9 @@ ;;; User Variables: -(defcustom eshell-dirs-load-hook '(eshell-dirs-initialize) +(defcustom eshell-dirs-load-hook nil "A hook that gets run when `eshell-dirs' is loaded." + :version "24.1" ; removed eshell-dirs-initialize :type 'hook :group 'eshell-dirs) === modified file 'lisp/eshell/em-glob.el' --- lisp/eshell/em-glob.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-glob.el 2011-03-05 04:11:05 +0000 @@ -61,8 +61,9 @@ ;;; User Variables: -(defcustom eshell-glob-load-hook '(eshell-glob-initialize) +(defcustom eshell-glob-load-hook nil "A list of functions to run when `eshell-glob' is loaded." + :version "24.1" ; removed eshell-glob-initialize :type 'hook :group 'eshell-glob) === modified file 'lisp/eshell/em-hist.el' --- lisp/eshell/em-hist.el 2011-03-05 03:53:41 +0000 +++ lisp/eshell/em-hist.el 2011-03-05 04:11:05 +0000 @@ -70,8 +70,9 @@ ;;; User Variables: -(defcustom eshell-hist-load-hook '(eshell-hist-initialize) +(defcustom eshell-hist-load-hook nil "A list of functions to call when loading `eshell-hist'." + :version "24.1" ; removed eshell-hist-initialize :type 'hook :group 'eshell-hist) === modified file 'lisp/eshell/em-pred.el' --- lisp/eshell/em-pred.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-pred.el 2011-03-05 04:11:05 +0000 @@ -59,8 +59,9 @@ ;;; User Variables: -(defcustom eshell-pred-load-hook '(eshell-pred-initialize) +(defcustom eshell-pred-load-hook nil "A list of functions to run when `eshell-pred' is loaded." + :version "24.1" ; removed eshell-pred-initialize :type 'hook :group 'eshell-pred) === modified file 'lisp/eshell/em-prompt.el' --- lisp/eshell/em-prompt.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-prompt.el 2011-03-05 04:11:05 +0000 @@ -37,8 +37,9 @@ ;;; User Variables: -(defcustom eshell-prompt-load-hook '(eshell-prompt-initialize) +(defcustom eshell-prompt-load-hook nil "A list of functions to call when loading `eshell-prompt'." + :version "24.1" ; removed eshell-prompt-initialize :type 'hook :group 'eshell-prompt) === modified file 'lisp/eshell/em-rebind.el' --- lisp/eshell/em-rebind.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-rebind.el 2011-03-05 04:11:05 +0000 @@ -41,8 +41,9 @@ ;;; User Variables: -(defcustom eshell-rebind-load-hook '(eshell-rebind-initialize) +(defcustom eshell-rebind-load-hook nil "A list of functions to call when loading `eshell-rebind'." + :version "24.1" ; removed eshell-rebind-initialize :type 'hook :group 'eshell-rebind) === modified file 'lisp/eshell/em-script.el' --- lisp/eshell/em-script.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-script.el 2011-03-05 04:11:05 +0000 @@ -34,8 +34,9 @@ ;;; User Variables: -(defcustom eshell-script-load-hook '(eshell-script-initialize) +(defcustom eshell-script-load-hook nil "A list of functions to call when loading `eshell-script'." + :version "24.1" ; removed eshell-script-initialize :type 'hook :group 'eshell-script) === modified file 'lisp/eshell/em-smart.el' --- lisp/eshell/em-smart.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-smart.el 2011-03-05 04:11:05 +0000 @@ -84,8 +84,9 @@ ;;; User Variables: -(defcustom eshell-smart-load-hook '(eshell-smart-initialize) +(defcustom eshell-smart-load-hook nil "A list of functions to call when loading `eshell-smart'." + :version "24.1" ; removed eshell-smart-initialize :type 'hook :group 'eshell-smart) === modified file 'lisp/eshell/em-term.el' --- lisp/eshell/em-term.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-term.el 2011-03-05 04:11:05 +0000 @@ -46,8 +46,9 @@ ;;; User Variables: -(defcustom eshell-term-load-hook '(eshell-term-initialize) +(defcustom eshell-term-load-hook nil "A list of functions to call when loading `eshell-term'." + :version "24.1" ; removed eshell-term-initialize :type 'hook :group 'eshell-term) === modified file 'lisp/eshell/em-unix.el' --- lisp/eshell/em-unix.el 2011-03-05 03:53:41 +0000 +++ lisp/eshell/em-unix.el 2011-03-05 04:11:05 +0000 @@ -53,8 +53,9 @@ :tag "UNIX commands in Lisp" :group 'eshell-module) -(defcustom eshell-unix-load-hook '(eshell-unix-initialize) +(defcustom eshell-unix-load-hook nil "A list of functions to run when `eshell-unix' is loaded." + :version "24.1" ; removed eshell-unix-initialize :type 'hook :group 'eshell-unix) === modified file 'lisp/eshell/esh-arg.el' --- lisp/eshell/esh-arg.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/esh-arg.el 2011-03-05 04:11:05 +0000 @@ -117,8 +117,9 @@ ;;; User Variables: -(defcustom eshell-arg-load-hook '(eshell-arg-initialize) +(defcustom eshell-arg-load-hook nil "A hook that gets run when `eshell-arg' is loaded." + :version "24.1" ; removed eshell-arg-initialize :type 'hook :group 'eshell-arg) === modified file 'lisp/eshell/esh-cmd.el' --- lisp/eshell/esh-cmd.el 2011-03-05 03:53:41 +0000 +++ lisp/eshell/esh-cmd.el 2011-03-05 04:11:05 +0000 @@ -229,8 +229,9 @@ ;;; User Variables: -(defcustom eshell-cmd-load-hook '(eshell-cmd-initialize) +(defcustom eshell-cmd-load-hook nil "A hook that gets run when `eshell-cmd' is loaded." + :version "24.1" ; removed eshell-cmd-initialize :type 'hook :group 'eshell-cmd) === modified file 'lisp/eshell/esh-ext.el' --- lisp/eshell/esh-ext.el 2011-03-05 03:53:41 +0000 +++ lisp/eshell/esh-ext.el 2011-03-05 04:11:05 +0000 @@ -46,8 +46,9 @@ ;;; User Variables: -(defcustom eshell-ext-load-hook '(eshell-ext-initialize) +(defcustom eshell-ext-load-hook nil "A hook that gets run when `eshell-ext' is loaded." + :version "24.1" ; removed eshell-ext-initialize :type 'hook :group 'eshell-ext) === modified file 'lisp/eshell/esh-io.el' --- lisp/eshell/esh-io.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/esh-io.el 2011-03-05 04:11:05 +0000 @@ -71,8 +71,9 @@ ;;; User Variables: -(defcustom eshell-io-load-hook '(eshell-io-initialize) +(defcustom eshell-io-load-hook nil "A hook that gets run when `eshell-io' is loaded." + :version "24.1" ; removed eshell-io-initialize :type 'hook :group 'eshell-io) === modified file 'lisp/eshell/esh-mode.el' --- lisp/eshell/esh-mode.el 2011-03-05 03:53:41 +0000 +++ lisp/eshell/esh-mode.el 2011-03-05 04:11:05 +0000 @@ -89,9 +89,10 @@ :type 'hook :group 'eshell-mode) -(defcustom eshell-exit-hook '(eshell-query-kill-processes) +(defcustom eshell-exit-hook nil "A hook that is run whenever `eshell' is exited. This hook is only run if exiting actually kills the buffer." + :version "24.1" ; removed eshell-query-kill-processes :type 'hook :group 'eshell-mode) @@ -287,6 +288,17 @@ ;;; User Functions: +(defun eshell-kill-buffer-function () + "Function added to `kill-buffer-hook' in Eshell buffers. +This runs the function `eshell-kill-processes-on-exit', +and the hook `eshell-exit-hook'." + ;; It's fine to run this unconditionally since it can be customized + ;; via the `eshell-kill-processes-on-exit' variable. + (and (fboundp 'eshell-query-kill-processes) + (not (memq 'eshell-query-kill-processes eshell-exit-hook)) + (eshell-query-kill-processes)) + (run-hooks 'eshell-exit-hook)) + ;;;###autoload (defun eshell-mode () "Emacs shell interactive mode. @@ -403,17 +415,15 @@ (unless (file-exists-p eshell-directory-name) (eshell-make-private-directory eshell-directory-name t)) - ;; load core Eshell modules for this session - (dolist (module (eshell-subgroups 'eshell)) - (run-hooks (intern-soft (concat (symbol-name module) - "-load-hook")))) - - ;; load extension modules for this session - (dolist (module eshell-modules-list) - (let ((load-hook (intern-soft (concat (symbol-name module) - "-load-hook")))) - (if (and load-hook (boundp load-hook)) - (run-hooks load-hook)))) + ;; Load core Eshell modules, then extension modules, for this session. + (dolist (module (append (eshell-subgroups 'eshell) eshell-modules-list)) + (let ((load-hook (intern-soft (format "%s-load-hook" module))) + (initfunc (intern-soft (format "%s-initialize" module)))) + (when (and load-hook (boundp load-hook)) + (if (memq initfunc (symbol-value load-hook)) (setq initfunc nil)) + (run-hooks load-hook)) + ;; So we don't need the -initialize functions on the hooks (b#5375). + (and initfunc (fboundp initfunc) (funcall initfunc)))) (if eshell-send-direct-to-subprocesses (add-hook 'pre-command-hook 'eshell-intercept-commands t t)) @@ -428,10 +438,7 @@ (add-hook 'eshell-pre-command-hook 'eshell-command-started nil t) (add-hook 'eshell-post-command-hook 'eshell-command-finished nil t)) - (add-hook 'kill-buffer-hook - (function - (lambda () - (run-hooks 'eshell-exit-hook))) t t) + (add-hook 'kill-buffer-hook 'eshell-kill-buffer-function t t) (if eshell-first-time-p (run-hooks 'eshell-first-time-mode-hook)) === modified file 'lisp/eshell/esh-proc.el' --- lisp/eshell/esh-proc.el 2011-03-05 03:53:41 +0000 +++ lisp/eshell/esh-proc.el 2011-03-05 04:11:05 +0000 @@ -38,8 +38,9 @@ ;;; User Variables: -(defcustom eshell-proc-load-hook '(eshell-proc-initialize) +(defcustom eshell-proc-load-hook nil "A hook that gets run when `eshell-proc' is loaded." + :version "24.1" ; removed eshell-proc-initialize :type 'hook :group 'eshell-proc) @@ -94,13 +95,14 @@ :type 'hook :group 'eshell-proc) -(defcustom eshell-kill-hook '(eshell-reset-after-proc) +(defcustom eshell-kill-hook nil "Called when a process run by `eshell-gather-process-output' has ended. It is passed two arguments: the process that was just ended, and the termination status (as a string). Note that the first argument may be nil, in which case the user attempted to send a signal, but there was no relevant process. This can be used for displaying help information, for example." + :version "24.1" ; removed eshell-reset-after-proc :type 'hook :group 'eshell-proc) @@ -113,6 +115,14 @@ ;;; Functions: +(defun eshell-kill-process-function (proc status) + "Function run when killing a process. +Runs `eshell-reset-after-proc' and `eshell-kill-hook', passing arguments +PROC and STATUS to both." + (or (memq 'eshell-reset-after-proc eshell-kill-hook) + (eshell-reset-after-proc proc status)) + (run-hook-with-args eshell-kill-hook proc status)) + (defun eshell-proc-initialize () "Initialize the process handling code." (make-local-variable 'eshell-process-list) @@ -346,7 +356,7 @@ (eshell-update-markers eshell-last-output-end) ;; Simulate the effect of eshell-sentinel. (eshell-close-handles (if (numberp exit-status) exit-status -1)) - (run-hook-with-args 'eshell-kill-hook command exit-status) + (eshell-kill-process-function command exit-status) (or eshell-in-pipeline-p (setq eshell-last-sync-output-start nil)) (if (not (numberp exit-status)) @@ -391,7 +401,7 @@ (eshell-close-handles (process-exit-status proc) 'nil (cadr entry)))) (eshell-remove-process-entry entry)))) - (run-hook-with-args 'eshell-kill-hook proc string))))) + (eshell-kill-process-function proc string))))) (defun eshell-process-interact (func &optional all query) "Interact with a process, using PROMPT if more than one, via FUNC. @@ -485,31 +495,29 @@ (kill-buffer buf))) (message nil)))) -(custom-add-option 'eshell-exit-hook 'eshell-query-kill-processes) - (defun eshell-interrupt-process () "Interrupt a process." (interactive) (unless (eshell-process-interact 'interrupt-process) - (run-hook-with-args 'eshell-kill-hook nil "interrupt"))) + (eshell-kill-process-function nil "interrupt"))) (defun eshell-kill-process () "Kill a process." (interactive) (unless (eshell-process-interact 'kill-process) - (run-hook-with-args 'eshell-kill-hook nil "killed"))) + (eshell-kill-process-function nil "killed"))) (defun eshell-quit-process () "Send quit signal to process." (interactive) (unless (eshell-process-interact 'quit-process) - (run-hook-with-args 'eshell-kill-hook nil "quit"))) + (eshell-kill-process-function nil "quit"))) ;(defun eshell-stop-process () ; "Send STOP signal to process." ; (interactive) ; (unless (eshell-process-interact 'stop-process) -; (run-hook-with-args 'eshell-kill-hook nil "stopped"))) +; (eshell-kill-process-function nil "stopped"))) ;(defun eshell-continue-process () ; "Send CONTINUE signal to process." @@ -518,7 +526,7 @@ ; ;; jww (1999-09-17): this signal is not dealt with yet. For ; ;; example, `eshell-reset' will be called, and so will ; ;; `eshell-resume-eval'. -; (run-hook-with-args 'eshell-kill-hook nil "continue"))) +; (eshell-kill-process-function nil "continue"))) (defun eshell-send-eof-to-process () "Send EOF to process." === modified file 'lisp/eshell/esh-var.el' --- lisp/eshell/esh-var.el 2011-03-05 03:53:41 +0000 +++ lisp/eshell/esh-var.el 2011-03-05 04:11:05 +0000 @@ -126,8 +126,9 @@ ;;; User Variables: -(defcustom eshell-var-load-hook '(eshell-var-initialize) +(defcustom eshell-var-load-hook nil "A list of functions to call when loading `eshell-var'." + :version "24.1" ; removed eshell-var-initialize :type 'hook :group 'eshell-var) ------------------------------------------------------------ revno: 103520 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-03-04 19:59:53 -0800 message: esh-module doc fixes. * lisp/eshell/esh-module.el (eshell-module-unload-hook) (eshell-modules-list): Remove leading * from defcustom docs. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-05 03:53:41 +0000 +++ lisp/ChangeLog 2011-03-05 03:59:53 +0000 @@ -1,5 +1,8 @@ 2011-03-05 Glenn Morris + * eshell/esh-module.el (eshell-module-unload-hook) + (eshell-modules-list): Remove leading * from defcustom docs. + * eshell/esh-util.el (eshell-for): Make it obsolete. * eshell/em-alias.el (eshell/alias, eshell-alias-completions): * eshell/em-dirs.el (eshell-save-some-last-dir): === modified file 'lisp/eshell/esh-module.el' --- lisp/eshell/esh-module.el 2011-03-05 03:53:41 +0000 +++ lisp/eshell/esh-module.el 2011-03-05 03:59:53 +0000 @@ -43,7 +43,7 @@ (defcustom eshell-module-unload-hook '(eshell-unload-extension-modules) - "*A hook run when `eshell-module' is unloaded." + "A hook run when `eshell-module' is unloaded." :type 'hook :group 'eshell-module) @@ -61,7 +61,7 @@ eshell-script eshell-term eshell-unix) - "*A list of optional add-on modules to be loaded by Eshell. + "A list of optional add-on modules to be loaded by Eshell. Changes will only take effect in future Eshell buffers." :type (append (list 'set ':tag "Supported modules") ------------------------------------------------------------ revno: 103519 author: Daiki Ueno committer: Katsumi Yamaoka branch nick: trunk timestamp: Sat 2011-03-05 03:56:02 +0000 message: message.el (message-options): Don't mark it buffer-local when running under XEmacs. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-03-04 13:59:21 +0000 +++ lisp/gnus/ChangeLog 2011-03-05 03:56:02 +0000 @@ -1,7 +1,8 @@ 2011-03-04 Daiki Ueno * message.el (message-options): Revert the change that's a workaround - for XEmacs buffer-local issue. + for XEmacs buffer-local issue; don't mark it buffer-local when running + under XEmacs. 2011-03-03 Tassilo Horn === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2011-03-04 13:59:21 +0000 +++ lisp/gnus/message.el 2011-03-05 03:56:02 +0000 @@ -1814,7 +1814,12 @@ (defvar message-options nil "Some saved answers when sending message.") -(make-variable-buffer-local 'message-options) +;; FIXME: On XEmacs this causes problems since let-binding like: +;; (let ((message-options message-options)) ...) +;; as in `message-send' and `mml-preview' loses to buffer-local +;; variable initialization. +(unless (featurep 'xemacs) + (make-variable-buffer-local 'message-options)) (defvar message-send-mail-real-function nil "Internal send mail function.") ------------------------------------------------------------ revno: 103518 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-03-04 19:53:41 -0800 message: Make eshell-for obsolete (replaced by dolist) * eshell/esh-util.el (eshell-for): Make it obsolete. * eshell/em-alias.el (eshell/alias, eshell-alias-completions): * eshell/em-dirs.el (eshell-save-some-last-dir): * eshell/em-hist.el (eshell-save-some-history, eshell-hist-parse-modifier): * eshell/em-ls.el (eshell-ls-dir, eshell-ls-files, eshell-ls-entries): * eshell/em-unix.el (eshell/cat, eshell/du, eshell/su): * eshell/esh-cmd.el (eshell-invoke-directly, eshell-do-eval, eshell/which): * eshell/esh-ext.el (eshell-find-interpreter): * eshell/esh-mode.el (eshell-mode): * eshell/esh-module.el (eshell-unload-extension-modules): * eshell/esh-proc.el (eshell-process-interact): * eshell/esh-test.el (eshell-test): * eshell/esh-util.el (eshell-flatten-list, eshell-winnow-list): * eshell/esh-var.el (eshell/env, eshell-environment-variables) (eshell-variables-list): * eshell/eshell.el (eshell-unload-all-modules): Replace eshell-for with dolist. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-04 17:24:02 +0000 +++ lisp/ChangeLog 2011-03-05 03:53:41 +0000 @@ -1,3 +1,26 @@ +2011-03-05 Glenn Morris + + * eshell/esh-util.el (eshell-for): Make it obsolete. + * eshell/em-alias.el (eshell/alias, eshell-alias-completions): + * eshell/em-dirs.el (eshell-save-some-last-dir): + * eshell/em-hist.el (eshell-save-some-history) + (eshell-hist-parse-modifier): + * eshell/em-ls.el (eshell-ls-dir, eshell-ls-files) + (eshell-ls-entries): + * eshell/em-unix.el (eshell/cat, eshell/du, eshell/su): + * eshell/esh-cmd.el (eshell-invoke-directly, eshell-do-eval) + (eshell/which): + * eshell/esh-ext.el (eshell-find-interpreter): + * eshell/esh-mode.el (eshell-mode): + * eshell/esh-module.el (eshell-unload-extension-modules): + * eshell/esh-proc.el (eshell-process-interact): + * eshell/esh-test.el (eshell-test): + * eshell/esh-util.el (eshell-flatten-list, eshell-winnow-list): + * eshell/esh-var.el (eshell/env, eshell-environment-variables) + (eshell-variables-list): + * eshell/eshell.el (eshell-unload-all-modules): + Replace eshell-for with dolist. + 2011-03-04 Glenn Morris * vc/vc-bzr.el (vc-bzr-after-dir-status): Handle bzr 2.3.0. (Bug#8170) === modified file 'lisp/eshell/em-alias.el' --- lisp/eshell/em-alias.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-alias.el 2011-03-05 03:53:41 +0000 @@ -156,7 +156,7 @@ (defun eshell/alias (&optional alias &rest definition) "Define an ALIAS in the user's alias list using DEFINITION." (if (not alias) - (eshell-for alias eshell-command-aliases-list + (dolist (alias eshell-command-aliases-list) (eshell-print (apply 'format "alias %s %s\n" alias))) (if (not definition) (setq eshell-command-aliases-list @@ -238,7 +238,7 @@ "Find all possible completions for NAME. These are all the command aliases which begin with NAME." (let (completions) - (eshell-for alias eshell-command-aliases-list + (dolist (alias eshell-command-aliases-list) (if (string-match (concat "^" name) (car alias)) (setq completions (cons (car alias) completions)))) completions)) === modified file 'lisp/eshell/em-dirs.el' --- lisp/eshell/em-dirs.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-dirs.el 2011-03-05 03:53:41 +0000 @@ -233,7 +233,7 @@ (defun eshell-save-some-last-dir () "Save the list-dir-ring for any open Eshell buffers." - (eshell-for buf (buffer-list) + (dolist (buf (buffer-list)) (if (buffer-live-p buf) (with-current-buffer buf (if (and eshell-mode === modified file 'lisp/eshell/em-hist.el' --- lisp/eshell/em-hist.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-hist.el 2011-03-05 03:53:41 +0000 @@ -292,7 +292,7 @@ (defun eshell-save-some-history () "Save the history for any open Eshell buffers." - (eshell-for buf (buffer-list) + (dolist (buf (buffer-list)) (if (buffer-live-p buf) (with-current-buffer buf (if (and eshell-mode @@ -730,7 +730,7 @@ (narrow-to-region here (point)) (goto-char (point-min)) (let ((modifiers (cdr (eshell-parse-modifiers)))) - (eshell-for mod modifiers + (dolist (mod modifiers) (setq hist (funcall mod hist))) hist)) (delete-region here (point))))) === modified file 'lisp/eshell/em-ls.el' --- lisp/eshell/em-ls.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-ls.el 2011-03-05 03:53:41 +0000 @@ -561,7 +561,7 @@ (when (or (eq listing-style 'long-listing) show-size) (let ((total 0.0)) (setq size-width 0) - (eshell-for e entries + (dolist (e entries) (if (nth 7 (cdr e)) (setq total (+ total (nth 7 (cdr e))) size-width @@ -651,7 +651,7 @@ (not (eq eshell-in-pipeline-p 'last)) (not (eq listing-style 'by-lines))) (memq listing-style '(long-listing single-column))) - (eshell-for file files + (dolist (file files) (if file (eshell-ls-file file size-width copy-fileinfo))) (let ((f files) @@ -676,7 +676,7 @@ (setcdr f (cddr f)))))) (if (not show-size) (setq display-files (mapcar 'eshell-ls-annotate files)) - (eshell-for file files + (dolist (file files) (let* ((str (eshell-ls-printable-size (nth 7 (cdr file)) t)) (len (length str))) (if (< len size-width) @@ -696,7 +696,7 @@ (columns (length col-widths)) (col-index 1) need-return) - (eshell-for file display-files + (dolist (file display-files) (let ((name (if (car file) (if show-size @@ -731,7 +731,7 @@ which non-absolute directory names will be made relative if ever they need to be printed." (let (dirs files show-names need-return (size-width 0)) - (eshell-for entry entries + (dolist (entry entries) (if (and (not dir-literal) (or (eshell-ls-filetype-p (cdr entry) ?d) (and (eshell-ls-filetype-p (cdr entry) ?l) @@ -757,7 +757,7 @@ (setq need-return t)) (setq show-names (or show-recursive (> (+ (length files) (length dirs)) 1))) - (eshell-for dir (eshell-ls-sort-entries dirs) + (dolist (dir (eshell-ls-sort-entries dirs)) (if (and need-return (not dir-literal)) (funcall insert-func "\n")) (eshell-ls-dir dir show-names === modified file 'lisp/eshell/em-unix.el' --- lisp/eshell/em-unix.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/em-unix.el 2011-03-05 03:53:41 +0000 @@ -587,7 +587,7 @@ (setq args (eshell-stringify-list (eshell-flatten-list args))) (if (or eshell-in-pipeline-p (catch 'special - (eshell-for arg args + (dolist (arg args) (unless (or (and (stringp arg) (> (length arg) 0) (eq (aref arg 0) ?-)) @@ -610,12 +610,12 @@ :show-usage :usage "[OPTION] FILE... Concatenate FILE(s), or standard input, to standard output.") - (eshell-for file args + (dolist (file args) (if (string= file "-") (throw 'eshell-external (eshell-external-command "cat" args)))) (let ((curbuf (current-buffer))) - (eshell-for file args + (dolist (file args) (with-temp-buffer (insert-file-contents file) (goto-char (point-min)) @@ -851,7 +851,7 @@ (let ((ext-du (eshell-search-path "du"))) (if (and ext-du (not (catch 'have-ange-path - (eshell-for arg args + (dolist (arg args) (if (string-equal (file-remote-p (expand-file-name arg) 'method) "ftp") (throw 'have-ange-path t)))))) @@ -1055,7 +1055,7 @@ "localhost")) (dir (or (file-remote-p default-directory 'localname) (expand-file-name default-directory)))) - (eshell-for arg args + (dolist (arg args) (if (string-equal arg "-") (setq login t) (setq user arg))) ;; `eshell-eval-using-options' does not handle "-". (if (member "-" orig-args) (setq login t)) === modified file 'lisp/eshell/esh-cmd.el' --- lisp/eshell/esh-cmd.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/esh-cmd.el 2011-03-05 03:53:41 +0000 @@ -987,7 +987,7 @@ (not (member name eshell-complex-commands)) (catch 'simple (progn - (eshell-for pred eshell-complex-commands + (dolist (pred eshell-complex-commands) (if (and (functionp pred) (funcall pred name)) (throw 'simple nil))) @@ -1165,7 +1165,7 @@ (if (and (eq (car form) 'let) (not (eq (car (cadr args)) 'eshell-do-eval))) (eshell-manipulate "evaluating let args" - (eshell-for letarg (car args) + (dolist (letarg (car args)) (if (and (listp letarg) (not (eq (cadr letarg) 'quote))) (setcdr letarg @@ -1241,7 +1241,7 @@ (defun eshell/which (command &rest names) "Identify the COMMAND, and where it is located." - (eshell-for name (cons command names) + (dolist (name (cons command names)) (let (program alias direct) (if (eq (aref name 0) eshell-explicit-command-char) (setq name (substring name 1) === modified file 'lisp/eshell/esh-ext.el' --- lisp/eshell/esh-ext.el 2011-02-22 05:50:25 +0000 +++ lisp/eshell/esh-ext.el 2011-03-05 03:53:41 +0000 @@ -263,7 +263,7 @@ (let ((finterp (catch 'found (ignore - (eshell-for possible eshell-interpreter-alist + (dolist (possible eshell-interpreter-alist) (cond ((functionp (car possible)) (and (funcall (car possible) file) === modified file 'lisp/eshell/esh-mode.el' --- lisp/eshell/esh-mode.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/esh-mode.el 2011-03-05 03:53:41 +0000 @@ -389,7 +389,7 @@ ;; load extension modules into memory. This will cause any global ;; variables they define to be visible, since some of the core ;; modules sometimes take advantage of their functionality if used. - (eshell-for module eshell-modules-list + (dolist (module eshell-modules-list) (let ((module-fullname (symbol-name module)) module-shortname) (if (string-match "^eshell-\\(.*\\)" module-fullname) @@ -404,12 +404,12 @@ (eshell-make-private-directory eshell-directory-name t)) ;; load core Eshell modules for this session - (eshell-for module (eshell-subgroups 'eshell) + (dolist (module (eshell-subgroups 'eshell)) (run-hooks (intern-soft (concat (symbol-name module) "-load-hook")))) ;; load extension modules for this session - (eshell-for module eshell-modules-list + (dolist (module eshell-modules-list) (let ((load-hook (intern-soft (concat (symbol-name module) "-load-hook")))) (if (and load-hook (boundp load-hook)) === modified file 'lisp/eshell/esh-module.el' --- lisp/eshell/esh-module.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/esh-module.el 2011-03-05 03:53:41 +0000 @@ -92,7 +92,7 @@ (defun eshell-unload-extension-modules () "Unload any memory resident extension modules." - (eshell-for module (eshell-subgroups 'eshell-module) + (dolist (module (eshell-subgroups 'eshell-module)) (if (featurep module) (ignore-errors (message "Unloading %s..." (symbol-name module)) === modified file 'lisp/eshell/esh-proc.el' --- lisp/eshell/esh-proc.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/esh-proc.el 2011-03-05 03:53:41 +0000 @@ -398,7 +398,7 @@ If ALL is non-nil, background processes will be interacted with as well. If QUERY is non-nil, query the user with QUERY before calling FUNC." (let (defunct result) - (eshell-for entry eshell-process-list + (dolist (entry eshell-process-list) (if (and (memq (process-status (car entry)) '(run stop open closed)) (or all @@ -412,7 +412,7 @@ ;; clean up the process list; this can get dirty if an error ;; occurred that brought the user into the debugger, and then they ;; quit, so that the sentinel was never called. - (eshell-for d defunct + (dolist (d defunct) (eshell-remove-process-entry d)) result)) === modified file 'lisp/eshell/esh-test.el' --- lisp/eshell/esh-test.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/esh-test.el 2011-03-05 03:53:41 +0000 @@ -166,9 +166,9 @@ (insert "Testing Eshell under " (emacs-version)) (switch-to-buffer test-buffer) (delete-other-windows)) - (eshell-for funcname (sort (all-completions "eshell-test--" + (dolist (funcname (sort (all-completions "eshell-test--" obarray 'functionp) - 'string-lessp) + 'string-lessp)) (with-current-buffer test-buffer (insert "\n")) (funcall (intern-soft funcname))) === modified file 'lisp/eshell/esh-util.el' --- lisp/eshell/esh-util.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/esh-util.el 2011-03-05 03:53:41 +0000 @@ -296,10 +296,12 @@ (put 'eshell-for 'lisp-indent-function 2) +(make-obsolete 'eshell-for 'dolist "24.1") + (defun eshell-flatten-list (args) "Flatten any lists within ARGS, so that there are no sublists." (let ((new-list (list t))) - (eshell-for a args + (dolist (a args) (if (and (listp a) (listp (cdr a))) (nconc new-list (eshell-flatten-list a)) @@ -405,7 +407,7 @@ (unless (listp entries) (setq entries (list entries) listified t)) - (eshell-for entry entries + (dolist (entry entries) (unless (and exclude (string-match exclude entry)) (setq p predicates valid (null p)) (while p === modified file 'lisp/eshell/esh-var.el' --- lisp/eshell/esh-var.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/esh-var.el 2011-03-05 03:53:41 +0000 @@ -351,8 +351,7 @@ '((?h "help" nil nil "show this usage screen") :external "env" :usage "") - (eshell-for setting (sort (eshell-environment-variables) - 'string-lessp) + (dolist (setting (sort (eshell-environment-variables) 'string-lessp)) (eshell-buffered-print setting "\n")) (eshell-flush))) @@ -374,7 +373,7 @@ This involves setting any variable aliases which affect the environment, as specified in `eshell-variable-aliases-list'." (let ((process-environment (eshell-copy-environment))) - (eshell-for var-alias eshell-variable-aliases-list + (dolist (var-alias eshell-variable-aliases-list) (if (nth 2 var-alias) (setenv (car var-alias) (eshell-stringify @@ -623,7 +622,7 @@ "Generate list of applicable variables." (let ((argname pcomplete-stub) completions) - (eshell-for alias eshell-variable-aliases-list + (dolist (alias eshell-variable-aliases-list) (if (string-match (concat "^" argname) (car alias)) (setq completions (cons (car alias) completions)))) (sort === modified file 'lisp/eshell/eshell.el' --- lisp/eshell/eshell.el 2011-01-25 04:08:28 +0000 +++ lisp/eshell/eshell.el 2011-03-05 03:53:41 +0000 @@ -474,7 +474,7 @@ ;; if the user set `eshell-prefer-to-shell' to t, but never loaded ;; Eshell, then `eshell-subgroups' will be unbound (when (fboundp 'eshell-subgroups) - (eshell-for module (eshell-subgroups 'eshell) + (dolist (module (eshell-subgroups 'eshell)) ;; this really only unloads as many modules as possible, ;; since other `require' references (such as by customizing ;; `eshell-prefer-to-shell' to a non-nil value) might make it ------------------------------------------------------------ revno: 103517 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-03-04 09:24:02 -0800 message: * lisp/vc/vc-bzr.el (vc-bzr-after-dir-status): Handle bzr 2.3.0. (Bug#8170) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-04 16:19:56 +0000 +++ lisp/ChangeLog 2011-03-04 17:24:02 +0000 @@ -1,3 +1,7 @@ +2011-03-04 Glenn Morris + + * vc/vc-bzr.el (vc-bzr-after-dir-status): Handle bzr 2.3.0. (Bug#8170) + 2011-03-04 Tom Tromey * progmodes/gud.el (gdb-script-mode): Derive from prog-mode. === modified file 'lisp/vc/vc-bzr.el' --- lisp/vc/vc-bzr.el 2011-03-03 06:25:21 +0000 +++ lisp/vc/vc-bzr.el 2011-03-04 17:24:02 +0000 @@ -879,38 +879,40 @@ (result nil)) (goto-char (point-min)) (while (not (eobp)) - (setq status-str - (buffer-substring-no-properties (point) (+ (point) 3))) - (setq translated (cdr (assoc status-str translation))) - (cond - ((eq translated 'conflict) - ;; For conflicts the file appears twice in the listing: once - ;; with the M flag and once with the C flag, so take care - ;; not to add it twice to `result'. Ugly. - (let* ((file - (buffer-substring-no-properties - ;;For files with conflicts the format is: - ;;C Text conflict in FILENAME - ;; Bah. - (+ (point) 21) (line-end-position))) - (entry (assoc file result))) - (when entry - (setf (nth 1 entry) 'conflict)))) - ((eq translated 'renamed) - (re-search-forward "R[ M] \\(.*\\) => \\(.*\\)$" (line-end-position) t) - (let ((new-name (file-relative-name (match-string 2) relative-dir)) - (old-name (file-relative-name (match-string 1) relative-dir))) - (push (list new-name 'edited - (vc-bzr-create-extra-fileinfo old-name)) result))) - ;; do nothing for non existent files - ((eq translated 'not-found)) - (t - (push (list (file-relative-name - (buffer-substring-no-properties - (+ (point) 4) - (line-end-position)) relative-dir) - translated) result))) - (forward-line)) + ;; Bzr 2.3.0 added this if there are shelves. (Bug#8170) + (unless (looking-at "[1-9]+ shel\\(f\\|ves\\) exists?\\.") + (setq status-str + (buffer-substring-no-properties (point) (+ (point) 3))) + (setq translated (cdr (assoc status-str translation))) + (cond + ((eq translated 'conflict) + ;; For conflicts the file appears twice in the listing: once + ;; with the M flag and once with the C flag, so take care + ;; not to add it twice to `result'. Ugly. + (let* ((file + (buffer-substring-no-properties + ;;For files with conflicts the format is: + ;;C Text conflict in FILENAME + ;; Bah. + (+ (point) 21) (line-end-position))) + (entry (assoc file result))) + (when entry + (setf (nth 1 entry) 'conflict)))) + ((eq translated 'renamed) + (re-search-forward "R[ M] \\(.*\\) => \\(.*\\)$" (line-end-position) t) + (let ((new-name (file-relative-name (match-string 2) relative-dir)) + (old-name (file-relative-name (match-string 1) relative-dir))) + (push (list new-name 'edited + (vc-bzr-create-extra-fileinfo old-name)) result))) + ;; do nothing for non existent files + ((eq translated 'not-found)) + (t + (push (list (file-relative-name + (buffer-substring-no-properties + (+ (point) 4) + (line-end-position)) relative-dir) + translated) result)))) + (forward-line)) (funcall update-function result))) (defun vc-bzr-dir-status (dir update-function) ------------------------------------------------------------ revno: 103516 committer: Tom Tromey branch nick: trunk timestamp: Fri 2011-03-04 09:19:56 -0700 message: * progmodes/gud.el (gdb-script-mode): Derive from prog-mode. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-04 08:40:00 +0000 +++ lisp/ChangeLog 2011-03-04 16:19:56 +0000 @@ -1,3 +1,7 @@ +2011-03-04 Tom Tromey + + * progmodes/gud.el (gdb-script-mode): Derive from prog-mode. + 2011-03-04 Glenn Morris * outline.el (outline-regexp): No longer allow nil. === modified file 'lisp/progmodes/gud.el' --- lisp/progmodes/gud.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/gud.el 2011-03-04 16:19:56 +0000 @@ -3218,7 +3218,7 @@ t) ;;;###autoload -(define-derived-mode gdb-script-mode nil "GDB-Script" +(define-derived-mode gdb-script-mode prog-mode "GDB-Script" "Major mode for editing GDB scripts." (set (make-local-variable 'comment-start) "#") (set (make-local-variable 'comment-start-skip) "#+\\s-*") ------------------------------------------------------------ revno: 103515 author: Daiki Ueno committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2011-03-04 13:59:21 +0000 message: message.el (message-options): Revert the change that's a workaround for XEmacs buffer-local issue. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-03-03 13:21:50 +0000 +++ lisp/gnus/ChangeLog 2011-03-04 13:59:21 +0000 @@ -1,3 +1,8 @@ +2011-03-04 Daiki Ueno + + * message.el (message-options): Revert the change that's a workaround + for XEmacs buffer-local issue. + 2011-03-03 Tassilo Horn * nnimap.el (nnimap-parse-flags): Add a workaround for FETCH lines with === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2011-03-03 13:21:50 +0000 +++ lisp/gnus/message.el 2011-03-04 13:59:21 +0000 @@ -1814,10 +1814,7 @@ (defvar message-options nil "Some saved answers when sending message.") - -(if (featurep 'xemacs) - (make-local-variable 'message-options) - (make-variable-buffer-local 'message-options)) +(make-variable-buffer-local 'message-options) (defvar message-send-mail-real-function nil "Internal send mail function.") ------------------------------------------------------------ revno: 103514 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-03-04 00:40:00 -0800 message: outline.el fix for bug#7619. It turns out the use of nil in the :type of outline regexp was for very hysterical raisons. Prior to CVS rev 1.49, 2001-09-12, the default value was nil, then it was initialized afterwards. Everywhere in the code assumes it cannot be nil, so no need to allow that any more. * lisp/outline.el (outline-regexp): No longer allow nil. (outline-heading-end-regexp): Add safety predicate. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-04 08:21:56 +0000 +++ lisp/ChangeLog 2011-03-04 08:40:00 +0000 @@ -1,5 +1,8 @@ 2011-03-04 Glenn Morris + * outline.el (outline-regexp): No longer allow nil. + (outline-heading-end-regexp): Add safety predicate. (Bug#7619) + * net/browse-url.el (browse-url): Handle deleted default-directory. (Bug#6077) === modified file 'lisp/outline.el' --- lisp/outline.el 2011-01-25 04:08:28 +0000 +++ lisp/outline.el 2011-03-04 08:40:00 +0000 @@ -50,9 +50,9 @@ so the regexp need not (and usually does not) start with `^'. The recommended way to set this is with a Local Variables: list in the file it applies to. See also `outline-heading-end-regexp'." - :type '(choice regexp (const nil)) + :type 'regexp :group 'outlines) -;;;###autoload(put 'outline-regexp 'safe-local-variable 'string-or-null-p) +;;;###autoload(put 'outline-regexp 'safe-local-variable 'stringp) (defcustom outline-heading-end-regexp "\n" "Regular expression to match the end of a heading line. @@ -62,6 +62,7 @@ in the file it applies to." :type 'regexp :group 'outlines) +;;;###autoload(put 'outline-heading-end-regexp 'safe-local-variable 'stringp) (defvar outline-mode-prefix-map (let ((map (make-sparse-keymap))) ------------------------------------------------------------ revno: 103513 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-03-04 00:21:56 -0800 message: browse-url fix for bug#6077. * lisp/net/browse-url.el (browse-url): Handle deleted default-directory. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-04 08:14:57 +0000 +++ lisp/ChangeLog 2011-03-04 08:21:56 +0000 @@ -1,5 +1,8 @@ 2011-03-04 Glenn Morris + * net/browse-url.el (browse-url): + Handle deleted default-directory. (Bug#6077) + * recentf.el (recentf-include-p): In case of a buggy predicate, err on the side of including, not excluding. (Bug#5843) === modified file 'lisp/net/browse-url.el' --- lisp/net/browse-url.el 2011-01-26 08:36:39 +0000 +++ lisp/net/browse-url.el 2011-03-04 08:21:56 +0000 @@ -798,7 +798,12 @@ (let ((process-environment (copy-sequence process-environment)) (function (or (and (string-match "\\`mailto:" url) browse-url-mailto-function) - browse-url-browser-function))) + browse-url-browser-function)) + ;; Ensure that `default-directory' exists and is readable (b#6077). + (default-directory (if (and (file-directory-p default-directory) + (file-readable-p default-directory)) + default-directory + (expand-file-name "~/")))) ;; When connected to various displays, be careful to use the display of ;; the currently selected frame, rather than the original start display, ;; which may not even exist any more. ------------------------------------------------------------ revno: 103512 committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-03-04 00:14:57 -0800 message: recentf.el fix for bug#5843. * lisp/recentf.el (recentf-include-p): In case of a buggy predicate, err on the side of including, not excluding. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-04 08:01:24 +0000 +++ lisp/ChangeLog 2011-03-04 08:14:57 +0000 @@ -1,3 +1,8 @@ +2011-03-04 Glenn Morris + + * recentf.el (recentf-include-p): In case of a buggy predicate, + err on the side of including, not excluding. (Bug#5843) + 2011-03-04 Jay Belanger * calc/calc-units.el (math-to-standard-rec): Don't treat subscripted === modified file 'lisp/recentf.el' --- lisp/recentf.el 2011-01-25 04:08:28 +0000 +++ lisp/recentf.el 2011-03-04 08:14:57 +0000 @@ -411,13 +411,14 @@ (checks recentf-exclude) (keepit t)) (while (and checks keepit) - (setq keepit (condition-case nil - (not (if (stringp (car checks)) - ;; A regexp - (string-match (car checks) filename) - ;; A predicate - (funcall (car checks) filename))) - (error nil)) + ;; If there was an error in a predicate, err on the side of + ;; keeping the file. (Bug#5843) + (setq keepit (not (ignore-errors + (if (stringp (car checks)) + ;; A regexp + (string-match (car checks) filename) + ;; A predicate + (funcall (car checks) filename)))) checks (cdr checks))) keepit)) ------------------------------------------------------------ revno: 103511 author: Leo committer: Glenn Morris branch nick: trunk timestamp: Fri 2011-03-04 00:01:24 -0800 message: * lisp/vc/diff-mode.el (diff-mode): Fix whitespace-style. (Bug#8139) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-04 06:35:49 +0000 +++ lisp/ChangeLog 2011-03-04 08:01:24 +0000 @@ -10,6 +10,8 @@ 2011-03-04 Leo + * vc/diff-mode.el (diff-mode): Fix whitespace-style. (Bug#8139) + * time.el (display-time-world-list): Fix typo. (Bug#7571) 2011-03-04 Zachary Kanfer (tiny change) === modified file 'lisp/vc/diff-mode.el' --- lisp/vc/diff-mode.el 2011-02-01 21:22:21 +0000 +++ lisp/vc/diff-mode.el 2011-03-04 08:01:24 +0000 @@ -1266,7 +1266,7 @@ ;; Set up `whitespace-mode' so that turning it on will show trailing ;; whitespace problems on the modified lines of the diff. - (set (make-local-variable 'whitespace-style) '(trailing)) + (set (make-local-variable 'whitespace-style) '(face trailing)) (set (make-local-variable 'whitespace-trailing-regexp) "^[-\+!<>].*?\\([\t ]+\\)$") ------------------------------------------------------------ revno: 103510 committer: Jay Belanger branch nick: trunk timestamp: Fri 2011-03-04 00:35:49 -0600 message: * calc/calc-units.el (math-to-standard-rec): Don't treat subscripted variables as units. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-04 05:16:56 +0000 +++ lisp/ChangeLog 2011-03-04 06:35:49 +0000 @@ -1,3 +1,8 @@ +2011-03-04 Jay Belanger + + * calc/calc-units.el (math-to-standard-rec): Don't treat subscripted + variables as units. + 2011-03-04 Bob Rogers * emacs-lisp/ewoc.el (ewoc-goto-next): Give a more explicit error === modified file 'lisp/calc/calc-units.el' --- lisp/calc/calc-units.el 2011-03-02 03:07:34 +0000 +++ lisp/calc/calc-units.el 2011-03-04 06:35:49 +0000 @@ -960,7 +960,10 @@ (if (eq base 'pi) (math-pi) expr))) - (if (Math-primp expr) + (if (or + (Math-primp expr) + (and (eq (car-safe expr) 'calcFunc-subscr) + (eq (car-safe (nth 1 expr)) 'var))) expr (cons (car expr) (mapcar 'math-to-standard-rec (cdr expr))))))