unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#2499: 23.0.91; syntax-ppss / beginning-of-defun not saving match data
@ 2009-02-27 15:42 tcr
  2009-02-28  4:50 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: tcr @ 2009-02-27 15:42 UTC (permalink / raw)
  To: emacs-pretest-bug


`beginning-of-defun' (and `syntax-ppss' as it invokes the former by
the variable `syntax-begin-function') does not save match data.

The issue also applies to 23.0.60.1, and 22.1.1.

Test case:

  (let ((buffer-sexpr "(defun *HERE*"))
  (with-temp-buffer
    (lisp-mode)
    (insert buffer-sexpr)
    (search-backward "*HERE*")
    (let ((old (match-data)))
      (progn (beginning-of-defun))
      (equal old (match-data)))))

               ==> nil

There are several possible options now:

  (i) `beginning-of-defun' is allowed to not save match data. If so,
      please document it.

  (ii) If (i) is true, still consider whether `syntax-ppss' is allowed
       to not save match data, too. Perhaps it should rather funcall
       `syntax-begin-function' wrapped in a `save-match-data'.
       Whatever the decision, please document it.

Thank you!


In GNU Emacs 23.0.91.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9)
 of 2009-02-27 on thaleron
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
configured using `configure  '--prefix=/home/tcr/software/emacs-cvs' '--with-x-toolkit=gtk' '--without-gpm' '--with-x' '--without-xpm' '--enable-asserts' 'CFLAGS=-g''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  eldoc-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<down> <return> C-x b * <backspace> <return> C-y C-M-x 
C-j <up> <up> <up> <right> <right> <right> <right> 
<right> <right> <right> M-d s a v e - m a t c h - d 
a t a C-e <down> C-j <up> <up> <right> <right> <right> 
<right> <right> <right> <right> <up> C-M-k r <backspace> 
p r o g n M-x r e p o r t - e m a c s - b u g <ret
urn>

Recent messages:
Loading /home/tcr/.emacs.d/config/lisp-config.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
nil

-- 
Diese Nachricht wurde auf Viren und andere gefaerliche Inhalte untersucht
und ist - aktuelle Virenscanner vorausgesetzt - sauber.
Freebits E-Mail Virus Scanner







^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-03 18:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 15:42 bug#2499: 23.0.91; syntax-ppss / beginning-of-defun not saving match data tcr
2009-02-28  4:50 ` Stefan Monnier
2009-02-28 16:56   ` Tobias C. Rittweiler
2009-02-28 22:09     ` Stefan Monnier
2009-03-03 20:50       ` Tobias C. Rittweiler
2011-07-03 18:45         ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).