]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/informat.el (Info-tagify): Handle buffers not visiting files.
authorGlenn Morris <rgm@gnu.org>
Thu, 21 Feb 2013 06:39:04 +0000 (22:39 -0800)
committerGlenn Morris <rgm@gnu.org>
Thu, 21 Feb 2013 06:39:04 +0000 (22:39 -0800)
Fixes: debbugs:13763
lisp/ChangeLog
lisp/informat.el

index fb9c6b25c54a5f9cae4870198141c2a75ba970c3..e54b777b3d0e96c019e97b4edee5eabc7ec435a6 100644 (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.
index d4412b8a86ad663496322ee3056db398da57daad..53b043fbbadf8030b3967a6f0ad4bd72d1d46a83 100644 (file)
   ;; 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)
                (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)))
 
 \f
 ;;;###autoload