summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-02-20 22:39:04 -0800
committerGlenn Morris <rgm@gnu.org>2013-02-20 22:39:04 -0800
commitbed1791adc32683ed9bb2b93e229a88805196c87 (patch)
tree2e688c020819a1e422bb7962de0004b8c1ce4247
parentf0c954fa281b31517bbab8cf82a5d81fc7caeff5 (diff)
downloademacs-bed1791adc32683ed9bb2b93e229a88805196c87.tar.gz
* lisp/informat.el (Info-tagify): Handle buffers not visiting files.
Fixes: debbugs:13763
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/informat.el20
2 files changed, 15 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fb9c6b25c54..e54b777b3d0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/informat.el b/lisp/informat.el
index d4412b8a86a..53b043fbbad 100644
--- a/lisp/informat.el
+++ b/lisp/informat.el
@@ -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