* [PATCH] nroff-mode.el (nroff-view): Kill old buffer before refresh the preview buffer.
@ 2010-09-13 17:09 Kan-Ru Chen
2010-09-18 1:25 ` Chong Yidong
0 siblings, 1 reply; 2+ messages in thread
From: Kan-Ru Chen @ 2010-09-13 17:09 UTC (permalink / raw)
To: emacs-devel; +Cc: Kan-Ru Chen
Currently calling nroff-view always return the previous generated
buffer. Kill the old buffer first so it can be updated.
Signed-off-by: Kan-Ru Chen <kanru@kanru.info>
---
lisp/ChangeLog | 5 +++++
lisp/textmodes/nroff-mode.el | 9 +++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3c3ce90..c46c7f1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-14 Kan-Ru Chen <kanru@kanru.info>
+
+ * textmodes/nroff-mode.el (nroff-view): Kill old buffer before
+ refresh the preview buffer.
+
2010-09-13 Michael Albinus <michael.albinus@gmx.de>
Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el.
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index 14b0b10..c84699c 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -311,9 +311,14 @@ turns it on if arg is positive, otherwise off."
"Run man on this file."
(interactive)
(require 'man)
- (let* ((file (buffer-file-name)))
+ (let* ((file (buffer-file-name))
+ (bufname (concat "*Man " file "*"))
+ (buffer (get-buffer bufname)))
(if file
- (Man-getpage-in-background file)
+ (progn
+ (if buffer
+ (kill-buffer buffer))
+ (Man-getpage-in-background file))
(error "No associated file for the current buffer"))))
;; Old names that were not namespace clean.
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-18 1:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-13 17:09 [PATCH] nroff-mode.el (nroff-view): Kill old buffer before refresh the preview buffer Kan-Ru Chen
2010-09-18 1:25 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.