all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: tcr@freebits.de
To: emacs-pretest-bug@gnu.org
Subject: bug#2499: 23.0.91; syntax-ppss / beginning-of-defun not saving match data
Date: Fri, 27 Feb 2009 16:42:52 +0100	[thread overview]
Message-ID: <87myc7ga2r.fsf@freebits.de> (raw)


`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







             reply	other threads:[~2009-02-27 15:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-27 15:42 tcr [this message]
2009-02-28  4:50 ` bug#2499: 23.0.91; syntax-ppss / beginning-of-defun not saving match data 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

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=87myc7ga2r.fsf@freebits.de \
    --to=tcr@freebits.de \
    --cc=2499@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    /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.