all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Sven Joachim <svenjoac@gmx.de>
Cc: emacs-devel@gnu.org
Subject: Re: kill-buffer-if-not-modified: Wrong type argument: bufferp, t
Date: Mon, 21 Jan 2008 22:07:54 +0200	[thread overview]
Message-ID: <ubq7fndr9.fsf@gnu.org> (raw)
In-Reply-To: <87fxwrc92i.fsf@gmx.de> (message from Sven Joachim on Mon, 21 Jan 2008 19:44:37 +0100)

> From: Sven Joachim <svenjoac@gmx.de>
> Date: Mon, 21 Jan 2008 19:44:37 +0100
> 
> 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.

Sorry for messing up.  Please show me the full traceback, I didn't
expect this function to be called with t as its argument.

> 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))))

I'm not sure this is the right fix, that's why I want to see the
traceback.

> Eli, is switching away from the buffer even if it is modified the
> intended behavior?

Sorry, I don't understand the question.  Could you please explain?

  parent reply	other threads:[~2008-01-21 20:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-21 18:44 kill-buffer-if-not-modified: Wrong type argument: bufferp, t Sven Joachim
2008-01-21 19:55 ` Andreas Schwab
2008-01-21 20:07 ` Eli Zaretskii [this message]
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=ubq7fndr9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=svenjoac@gmx.de \
    /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.