diff options
| author | Stefan Monnier | 2008-06-25 15:05:33 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-06-25 15:05:33 +0000 |
| commit | ee5b7365d543288bf354ef40dae34a2d4c6258b8 (patch) | |
| tree | 53bca1524ec6a496cf00338546e43a10369a0215 | |
| parent | 32bed934f91f074c2adab249461b0039b90589a3 (diff) | |
| download | emacs-ee5b7365d543288bf354ef40dae34a2d4c6258b8.tar.gz emacs-ee5b7365d543288bf354ef40dae34a2d4c6258b8.zip | |
(eshell-manipulate): Check eshell-debug-command is bound before using it.
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/eshell/esh-cmd.el | 15 |
2 files changed, 16 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b48777438c0..82822ff4a3f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-06-25 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * eshell/esh-cmd.el (eshell-manipulate): Check eshell-debug-command | ||
| 4 | is bound before using it. | ||
| 5 | |||
| 1 | 2008-06-25 Kenichi Handa <handa@m17n.org> | 6 | 2008-06-25 Kenichi Handa <handa@m17n.org> |
| 2 | 7 | ||
| 3 | * image.el (image-jpeg-p): Convert DATA to unibyte at first. | 8 | * image.el (image-jpeg-p): Convert DATA to unibyte at first. |
| @@ -20,13 +25,13 @@ | |||
| 20 | 25 | ||
| 21 | 2008-06-25 Andreas Schwab <schwab@suse.de> | 26 | 2008-06-25 Andreas Schwab <schwab@suse.de> |
| 22 | 27 | ||
| 23 | * faces.el (face-font-family-alternatives, variable-pitch): Use | 28 | * faces.el (face-font-family-alternatives, variable-pitch): |
| 24 | "Sans Serif", not "Sans-Serif". | 29 | Use "Sans Serif", not "Sans-Serif". |
| 25 | 30 | ||
| 26 | 2008-06-24 Chong Yidong <cyd@stupidchicken.com> | 31 | 2008-06-24 Chong Yidong <cyd@stupidchicken.com> |
| 27 | 32 | ||
| 28 | * faces.el (face-font-family-alternatives, variable-pitch): Change | 33 | * faces.el (face-font-family-alternatives, variable-pitch): |
| 29 | "Sans" to the canonical name "Sans-Serif". | 34 | Change "Sans" to the canonical name "Sans-Serif". |
| 30 | 35 | ||
| 31 | 2008-06-24 Jay Belanger <jay.p.belanger@gmail.com> | 36 | 2008-06-24 Jay Belanger <jay.p.belanger@gmail.com> |
| 32 | 37 | ||
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 1c75eca28ee..82619d60791 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el | |||
| @@ -397,8 +397,7 @@ hooks should be run before and after the command." | |||
| 397 | "Output a debugging message to '*eshell last cmd*'." | 397 | "Output a debugging message to '*eshell last cmd*'." |
| 398 | (let ((buf (get-buffer-create "*eshell last cmd*")) | 398 | (let ((buf (get-buffer-create "*eshell last cmd*")) |
| 399 | (text (eshell-stringify eshell-current-command))) | 399 | (text (eshell-stringify eshell-current-command))) |
| 400 | (save-excursion | 400 | (with-current-buffer buf |
| 401 | (set-buffer buf) | ||
| 402 | (if (not tag) | 401 | (if (not tag) |
| 403 | (erase-buffer) | 402 | (erase-buffer) |
| 404 | (insert "\n\C-l\n" tag "\n\n" text | 403 | (insert "\n\C-l\n" tag "\n\n" text |
| @@ -997,11 +996,9 @@ at the moment are: | |||
| 997 | (list 'eshell-do-eval | 996 | (list 'eshell-do-eval |
| 998 | (list 'quote command))))) | 997 | (list 'quote command))))) |
| 999 | (and eshell-debug-command | 998 | (and eshell-debug-command |
| 1000 | (save-excursion | 999 | (with-current-buffer (get-buffer-create "*eshell last cmd*") |
| 1001 | (let ((buf (get-buffer-create "*eshell last cmd*"))) | 1000 | (erase-buffer) |
| 1002 | (set-buffer buf) | 1001 | (insert "command: \"" input "\"\n"))) |
| 1003 | (erase-buffer) | ||
| 1004 | (insert "command: \"" input "\"\n")))) | ||
| 1005 | (setq eshell-current-command command) | 1002 | (setq eshell-current-command command) |
| 1006 | (let ((delim (catch 'eshell-incomplete | 1003 | (let ((delim (catch 'eshell-incomplete |
| 1007 | (eshell-resume-eval)))) | 1004 | (eshell-resume-eval)))) |
| @@ -1041,7 +1038,9 @@ at the moment are: | |||
| 1041 | 1038 | ||
| 1042 | (defmacro eshell-manipulate (tag &rest commands) | 1039 | (defmacro eshell-manipulate (tag &rest commands) |
| 1043 | "Manipulate a COMMAND form, with TAG as a debug identifier." | 1040 | "Manipulate a COMMAND form, with TAG as a debug identifier." |
| 1044 | (if (not eshell-debug-command) | 1041 | ;; Check `bound'ness since at compile time the code until here has not |
| 1042 | ;; executed yet. | ||
| 1043 | (if (not (and (boundp 'eshell-debug-command) eshell-debug-command)) | ||
| 1045 | `(progn ,@commands) | 1044 | `(progn ,@commands) |
| 1046 | `(progn | 1045 | `(progn |
| 1047 | (eshell-debug-command ,(eval tag) form) | 1046 | (eshell-debug-command ,(eval tag) form) |