GNU bug report logs - #4655
23.1.50; buffer-swap-text oddity

Previous Next

Package: emacs;

Reported by: Markus Rost <rost <at> math.uni-bielefeld.de>

Date: Tue, 6 Oct 2009 18:55:07 UTC

Severity: minor

Tags: patch

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: npostavs <at> users.sourceforge.net
Cc: rost <at> math.uni-bielefeld.de, lekktu <at> gmail.com, larsi <at> gnus.org, 4655 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: bug#4655: 23.1.50; buffer-swap-text oddity
Date: Mon, 11 Jul 2016 17:37:18 +0300
> From: npostavs <at> users.sourceforge.net
> Date: Sun, 10 Jul 2016 21:58:36 -0400
> Cc: Markus Rost <rost <at> math.uni-bielefeld.de>,
> 	Juanma Barranquero <lekktu <at> gmail.com>, 4655 <at> debbugs.gnu.org,
> 	Stefan Monnier <monnier <at> iro.umontreal.ca>
> 
> --- a/doc/lispref/buffers.texi
> +++ b/doc/lispref/buffers.texi
> @@ -1211,6 +1211,11 @@ Swapping Text
>  overlays, the text properties, the undo list, the value of the
>  @code{enable-multibyte-characters} flag (@pxref{Text Representations,
>  enable-multibyte-characters}), etc.
> +
> +@strong{Warning:} The current buffer will be set to @var{buffer} if
> +this function is called from within @code{save-excursion}, since the
> +marker used by @code{save-excursion} to save the position and buffer
> +will be swapped as well.
>  @end defun

Fine with me, but I think we should also add a single sentence to the
doc string, something like

  Using this function from `save-excursion' might produce surprising
  results, see Info node `(elisp)Swapping Text'.

With that taken care of, please push to emacs-25.

Thanks.




This bug report was last modified 9 years and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.