aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorJuanma Barranquero2007-01-02 23:49:25 +0000
committerJuanma Barranquero2007-01-02 23:49:25 +0000
commitdbf284bece5dee64e944d3e4baffd2d23fa94ab9 (patch)
tree232219e51eab68a1b38f4340d850430943b01358 /lisp/subr.el
parenta6c327a88c6fe3595d02ca8d498d0a4d037b87db (diff)
downloademacs-dbf284bece5dee64e944d3e4baffd2d23fa94ab9.tar.gz
emacs-dbf284bece5dee64e944d3e4baffd2d23fa94ab9.zip
(momentary-string-display): After moving point, set POS variable to it to avoid
later errors once the buffer is modified. Doc fix.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 086163cca72..c98e14b6334 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1887,6 +1887,7 @@ menu bar menus and the frame title."
1887(defun momentary-string-display (string pos &optional exit-char message) 1887(defun momentary-string-display (string pos &optional exit-char message)
1888 "Momentarily display STRING in the buffer at POS. 1888 "Momentarily display STRING in the buffer at POS.
1889Display remains until next event is input. 1889Display remains until next event is input.
1890If POS is a marker, only its position is used; its buffer is ignored.
1890Optional third arg EXIT-CHAR can be a character, event or event 1891Optional third arg EXIT-CHAR can be a character, event or event
1891description list. EXIT-CHAR defaults to SPC. If the input is 1892description list. EXIT-CHAR defaults to SPC. If the input is
1892EXIT-CHAR it is swallowed; otherwise it is then available as 1893EXIT-CHAR it is swallowed; otherwise it is then available as
@@ -1904,6 +1905,8 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there."
1904 (progn 1905 (progn
1905 (save-excursion 1906 (save-excursion
1906 (goto-char pos) 1907 (goto-char pos)
1908 ;; To avoid trouble with out-of-bounds position
1909 (setq pos (point))
1907 ;; defeat file locking... don't try this at home, kids! 1910 ;; defeat file locking... don't try this at home, kids!
1908 (setq buffer-file-name nil) 1911 (setq buffer-file-name nil)
1909 (insert-before-markers string) 1912 (insert-before-markers string)