diff options
| author | Glenn Morris | 2013-02-20 22:39:04 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-02-20 22:39:04 -0800 |
| commit | bed1791adc32683ed9bb2b93e229a88805196c87 (patch) | |
| tree | 2e688c020819a1e422bb7962de0004b8c1ce4247 | |
| parent | f0c954fa281b31517bbab8cf82a5d81fc7caeff5 (diff) | |
| download | emacs-bed1791adc32683ed9bb2b93e229a88805196c87.tar.gz emacs-bed1791adc32683ed9bb2b93e229a88805196c87.zip | |
* lisp/informat.el (Info-tagify): Handle buffers not visiting files.
Fixes: debbugs:13763
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/informat.el | 20 |
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 @@ | |||
| 1 | 2013-02-21 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * informat.el (Info-tagify): | ||
| 4 | Handle buffers not visiting files. (Bug#13763) | ||
| 5 | |||
| 1 | 2013-02-21 Juanma Barranquero <lekktu@gmail.com> | 6 | 2013-02-21 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * calc/calc-graph.el (calc-graph-show-dumb): Fix typo. | 8 | * 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 @@ | |||
| 43 | ;; save-restrictions would not work | 43 | ;; save-restrictions would not work |
| 44 | ;; because it records the old max relative to the end. | 44 | ;; because it records the old max relative to the end. |
| 45 | ;; We record it relative to the beginning. | 45 | ;; We record it relative to the beginning. |
| 46 | (if input-buffer-name | ||
| 47 | (message "Tagifying region in %s ..." input-buffer-name) | ||
| 48 | (message | ||
| 49 | "Tagifying %s ..." (file-name-nondirectory (buffer-file-name)))) | ||
| 50 | (let ((omin (point-min)) | 46 | (let ((omin (point-min)) |
| 51 | (omax (point-max)) | 47 | (omax (point-max)) |
| 52 | (nomax (= (point-max) (1+ (buffer-size)))) | 48 | (nomax (= (point-max) (1+ (buffer-size)))) |
| 53 | (opoint (point))) | 49 | (opoint (point)) |
| 50 | (msg (format "Tagifying %s..." | ||
| 51 | (cond (input-buffer-name | ||
| 52 | (format "region in %s" input-buffer-name)) | ||
| 53 | (buffer-file-name | ||
| 54 | (file-name-nondirectory (buffer-file-name))) | ||
| 55 | (t "buffer"))))) | ||
| 56 | (message "%s" msg) | ||
| 54 | (unwind-protect | 57 | (unwind-protect |
| 55 | (progn | 58 | (progn |
| 56 | (widen) | 59 | (widen) |
| @@ -148,11 +151,8 @@ | |||
| 148 | (insert "\^_\nEnd tag table\n"))))) | 151 | (insert "\^_\nEnd tag table\n"))))) |
| 149 | (goto-char opoint) | 152 | (goto-char opoint) |
| 150 | (narrow-to-region omin (if nomax (1+ (buffer-size)) | 153 | (narrow-to-region omin (if nomax (1+ (buffer-size)) |
| 151 | (min omax (point-max)))))) | 154 | (min omax (point-max))))) |
| 152 | (if input-buffer-name | 155 | (message "%sdone" msg))) |
| 153 | (message "Tagifying region in %s done" input-buffer-name) | ||
| 154 | (message | ||
| 155 | "Tagifying %s done" (file-name-nondirectory (buffer-file-name))))) | ||
| 156 | 156 | ||
| 157 | 157 | ||
| 158 | ;;;###autoload | 158 | ;;;###autoload |