[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kill-buffer-if-not-modified: Wrong type argument: bufferp, t
From: |
Andreas Schwab |
Subject: |
Re: kill-buffer-if-not-modified: Wrong type argument: bufferp, t |
Date: |
Mon, 21 Jan 2008 20:55:20 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux) |
Sven Joachim <address@hidden> writes:
> --- 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))))
get-buffer returns the argument if it is already a buffer, thus the
conditional is not needed.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Re: kill-buffer-if-not-modified: Wrong type argument: bufferp, t, Stefan Monnier, 2008/01/21