[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11560: 24.0.97; [PATCH] forward-same-syntax: wrong-type-argument num

From: Aaron S. Hawley
Subject: bug#11560: 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.]


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

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

Thanks for Emacs,

2012-05-25  Aaron S. Hawley  <address@hidden>

        * 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)
      (char-to-string (char-syntax (char-before))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]