emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/eshell/esh-cmd.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/eshell/esh-cmd.el,v
Date: Wed, 25 Jun 2008 15:05:34 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/06/25 15:05:34

Index: eshell/esh-cmd.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/eshell/esh-cmd.el,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- eshell/esh-cmd.el   7 Jun 2008 02:37:13 -0000       1.40
+++ eshell/esh-cmd.el   25 Jun 2008 15:05:33 -0000      1.41
@@ -397,8 +397,7 @@
   "Output a debugging message to '*eshell last cmd*'."
   (let ((buf (get-buffer-create "*eshell last cmd*"))
        (text (eshell-stringify eshell-current-command)))
-    (save-excursion
-      (set-buffer buf)
+    (with-current-buffer buf
       (if (not tag)
          (erase-buffer)
        (insert "\n\C-l\n" tag "\n\n" text
@@ -997,11 +996,9 @@
                          (list 'eshell-do-eval
                                (list 'quote command)))))
     (and eshell-debug-command
-        (save-excursion
-          (let ((buf (get-buffer-create "*eshell last cmd*")))
-            (set-buffer buf)
+         (with-current-buffer (get-buffer-create "*eshell last cmd*")
             (erase-buffer)
-            (insert "command: \"" input "\"\n"))))
+           (insert "command: \"" input "\"\n")))
     (setq eshell-current-command command)
     (let ((delim (catch 'eshell-incomplete
                   (eshell-resume-eval))))
@@ -1041,7 +1038,9 @@
 
 (defmacro eshell-manipulate (tag &rest commands)
   "Manipulate a COMMAND form, with TAG as a debug identifier."
-  (if (not eshell-debug-command)
+  ;; Check `bound'ness since at compile time the code until here has not
+  ;; executed yet.
+  (if (not (and (boundp 'eshell-debug-command) eshell-debug-command))
       `(progn ,@commands)
     `(progn
        (eshell-debug-command ,(eval tag) form)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]