1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-23 10:34:07 +00:00

* lisp/informat.el (Info-tagify): Handle buffers not visiting files.

Fixes: debbugs:13763
This commit is contained in:
Glenn Morris 2013-02-20 22:39:04 -08:00
parent f0c954fa28
commit bed1791adc
2 changed files with 15 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2013-02-21 Glenn Morris <rgm@gnu.org>
* informat.el (Info-tagify):
Handle buffers not visiting files. (Bug#13763)
2013-02-21 Juanma Barranquero <lekktu@gmail.com>
* calc/calc-graph.el (calc-graph-show-dumb): Fix typo.

View File

@ -43,14 +43,17 @@
;; save-restrictions would not work
;; because it records the old max relative to the end.
;; We record it relative to the beginning.
(if input-buffer-name
(message "Tagifying region in %s ..." input-buffer-name)
(message
"Tagifying %s ..." (file-name-nondirectory (buffer-file-name))))
(let ((omin (point-min))
(omax (point-max))
(nomax (= (point-max) (1+ (buffer-size))))
(opoint (point)))
(opoint (point))
(msg (format "Tagifying %s..."
(cond (input-buffer-name
(format "region in %s" input-buffer-name))
(buffer-file-name
(file-name-nondirectory (buffer-file-name)))
(t "buffer")))))
(message "%s" msg)
(unwind-protect
(progn
(widen)
@ -148,11 +151,8 @@
(insert "\^_\nEnd tag table\n")))))
(goto-char opoint)
(narrow-to-region omin (if nomax (1+ (buffer-size))
(min omax (point-max))))))
(if input-buffer-name
(message "Tagifying region in %s done" input-buffer-name)
(message
"Tagifying %s done" (file-name-nondirectory (buffer-file-name)))))
(min omax (point-max)))))
(message "%sdone" msg)))
;;;###autoload