unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11560: 24.0.97; [PATCH] forward-same-syntax: wrong-type-argument number-or-marker-p nil
@ 2012-05-25 19:40 Aaron S. Hawley
  2012-05-26  2:41 ` Glenn Morris
  2012-05-26 13:24 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Aaron S. Hawley @ 2012-05-25 19:40 UTC (permalink / raw)
  To: 11560

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





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

end of thread, other threads:[~2012-05-26 21:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-25 19:40 bug#11560: 24.0.97; [PATCH] forward-same-syntax: wrong-type-argument number-or-marker-p nil Aaron S. Hawley
2012-05-26  2:41 ` Glenn Morris
2012-05-26 13:24 ` Stefan Monnier
2012-05-26 21:41   ` Aaron S. Hawley

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