From: Sven Joachim <svenjoac@gmx.de>
To: emacs-devel@gnu.org
Subject: kill-buffer-if-not-modified: Wrong type argument: bufferp, t
Date: Mon, 21 Jan 2008 19:44:37 +0100 [thread overview]
Message-ID: <87fxwrc92i.fsf@gmx.de> (raw)
The following change in EMACS_22_BASE:
,----
| 2008-01-12 Eli Zaretskii <eliz@gnu.org>
|
| * view.el (view-file-other-window, view-file-other-frame): Don't
| kill the buffer if it is modified. Doc fixes.
| (kill-buffer-if-not-modified): New function.
| (view-file): Don't kill the buffer if it is modified.
`----
causes the error mentioned in the subject every time view-mode is
exited. It seems that this patch fixes the issue:
--8<---------------cut here---------------start------------->8---
--- view.el 21 Jan 2008 18:51:02 +0100 1.84.2.9
+++ view.el 21 Jan 2008 19:26:10 +0100
@@ -244,7 +244,9 @@
;; types C-x C-q again to return to view mode.
(defun kill-buffer-if-not-modified (buf)
"Like `kill-buffer', but does nothing if the buffer is modified."
- (let ((buf (or (bufferp buf) (get-buffer buf))))
+ (let ((buf (if (bufferp buf)
+ buf
+ (get-buffer buf))))
(and buf (not (buffer-modified-p buf))
(kill-buffer buf))))
--8<---------------cut here---------------end--------------->8---
Changelog entry:
2008-01-21 Sven Joachim <svenjoac@gmx.de>
* view.el (kill-buffer-if-not-modified): Fix argument to kill-buffer.
Eli, is switching away from the buffer even if it is modified the
intended behavior?
next reply other threads:[~2008-01-21 18:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-21 18:44 Sven Joachim [this message]
2008-01-21 19:55 ` kill-buffer-if-not-modified: Wrong type argument: bufferp, t Andreas Schwab
2008-01-21 20:07 ` Eli Zaretskii
2008-01-21 20:44 ` Sven Joachim
2008-01-22 6:55 ` Sven Joachim
2008-01-22 13:57 ` martin rudalics
2008-01-24 18:48 ` Sven Joachim
2008-01-25 4:42 ` Glenn Morris
2008-01-21 20:08 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fxwrc92i.fsf@gmx.de \
--to=svenjoac@gmx.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.