emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kill-buffer-if-not-modified: Wrong type argument: bufferp, t


From: Sven Joachim
Subject: kill-buffer-if-not-modified: Wrong type argument: bufferp, t
Date: Mon, 21 Jan 2008 19:44:37 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

The following change in EMACS_22_BASE:

,----
| 2008-01-12  Eli Zaretskii  <address@hidden>
| 
|       * 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  <address@hidden>

        * 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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]