GNU bug report logs - #11560
24.0.97; [PATCH] forward-same-syntax: wrong-type-argument number-or-marker-p nil

Previous Next

Package: emacs;

Reported by: "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>

Date: Fri, 25 May 2012 19:42:02 UTC

Severity: normal

Tags: patch

Found in version 24.0.97

Fixed in version 24.2

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11560 in the body.
You can then email your comments to 11560 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11560; Package emacs. (Fri, 25 May 2012 19:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 25 May 2012 19:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.97; [PATCH] forward-same-syntax: wrong-type-argument
	number-or-marker-p nil
Date: Fri, 25 May 2012 15:40:13 -0400
[I'm using a pretest, but this isn't a regression.  Applying the fix
in 24.2 is fine with me.]

Reproduce:

M-x load-library thingatpt
M-: (forward-same-syntax)

gives Lisp error: (wrong-type-argument number-or-marker-p nil)

Thanks for Emacs,
/a

2012-05-25  Aaron S. Hawley  <aaron.s.hawley <at> gmail.com>

        * thingatpt.el (forward-same-syntax): Calling as a function in
        Lisp with no argument gives error "wrong-type-argument
        number-or-marker-p nil" from `while'.

--- thingatpt.el	2012-04-07 23:03:02.000000000 -0400
+++ thingatpt.el	2012-05-25 12:33:28.817991100 -0400
@@ -455,8 +455,9 @@
 (defun forward-same-syntax (&optional arg)
  "Move point past all characters with the same syntax class.
 With prefix argument ARG, do it ARG times if positive, or move
 backwards ARG times if negative."
   (interactive "p")
+  (or arg (setq arg 1))
   (while (< arg 0)
     (skip-syntax-backward
      (char-to-string (char-syntax (char-before))))




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Sat, 26 May 2012 02:43:02 GMT) Full text and rfc822 format available.

Notification sent to "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>:
bug acknowledged by developer. (Sat, 26 May 2012 02:43:03 GMT) Full text and rfc822 format available.

Message #10 received at 11560-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 11560-done <at> debbugs.gnu.org
Subject: Re: bug#11560: 24.0.97;
	[PATCH] forward-same-syntax: wrong-type-argument number-or-marker-p
	nil
Date: Fri, 25 May 2012 22:41:07 -0400
Version: 24.2

Thanks; applied.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11560; Package emacs. (Sat, 26 May 2012 13:27:02 GMT) Full text and rfc822 format available.

Message #13 received at 11560 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>
Cc: 11560 <at> debbugs.gnu.org
Subject: Re: bug#11560: 24.0.97;
	[PATCH] forward-same-syntax: wrong-type-argument number-or-marker-p
	nil
Date: Sat, 26 May 2012 09:24:28 -0400
>  (defun forward-same-syntax (&optional arg)
>   "Move point past all characters with the same syntax class.
>  With prefix argument ARG, do it ARG times if positive, or move
>  backwards ARG times if negative."
>    (interactive "p")
> +  (or arg (setq arg 1))

Actually, unless (forward-same-syntax) used to work, the better fix is
to make the argument non-optional.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11560; Package emacs. (Sat, 26 May 2012 21:43:01 GMT) Full text and rfc822 format available.

Message #16 received at 11560 <at> debbugs.gnu.org (full text, mbox):

From: "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 11560 <at> debbugs.gnu.org
Subject: Re: bug#11560: 24.0.97; [PATCH] forward-same-syntax:
	wrong-type-argument number-or-marker-p nil
Date: Sat, 26 May 2012 17:41:29 -0400
On 5/26/12, Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
>>  (defun forward-same-syntax (&optional arg)
>>   "Move point past all characters with the same syntax class.
>>  With prefix argument ARG, do it ARG times if positive, or move
>>  backwards ARG times if negative."
>>    (interactive "p")
>> +  (or arg (setq arg 1))
>
> Actually, unless (forward-same-syntax) used to work, the better fix is
> to make the argument non-optional.

I considered that, but assumed it's better to keep it consistent with
the rest of the forward-* functions in Emacs.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 24 Jun 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 302 days ago.

Previous Next


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