]> code.delx.au - gnu-emacs/blobdiff - lisp/ehelp.el
* lisp/eshell/esh-io.el (eshell-get-target): Better detection of read-only file ...
[gnu-emacs] / lisp / ehelp.el
index 8f1eeefa95ac9960b3ac8c6b9f132e6efe7d655b..7de4fd0ba6316ef05548c02931c8548d8ce4b941 100644 (file)
@@ -1,7 +1,7 @@
 ;;; ehelp.el --- bindings for electric-help mode
 
 ;; Copyright (C) 1986, 1995, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-;;   2007, 2008, 2009  Free Software Foundation, Inc.
+;;   2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Richard Mlynarik
 ;; (according to ack.texi and authors.el)
@@ -321,8 +321,7 @@ will select it.)"
                  ;;>>      suspend updating of the tick in order to allow
                  ;;>>      things like momentary-string-display)
                  (and b
-                      (save-excursion
-                        (set-buffer b)
+                      (with-current-buffer b
                         (set-buffer-modified-p t)))
                  (fset 'help-print-return-message 'ignore)
                  (call-interactively fun)
@@ -333,8 +332,7 @@ will select it.)"
                           (not (buffer-modified-p b)))))
              (fset 'help-print-return-message p)
              (and b (buffer-name b)
-                  (save-excursion
-                    (set-buffer b)
+                  (with-current-buffer b
                     (set-buffer-modified-p m))))))
        (with-electric-help 'ignore name t))))