[COMMIT] Correct an error in my #'edmacro-parse-word syntax, thank you Smoketest

Aidan Kehoe kehoea at parhasard.net
Fri Sep 3 16:03:59 EDT 2010



I’ve checked that the current version of edmacro-parse-word doesn’t error on
basically every occurrence of (kbd "string") in the package source tree, so
we shouldn’t see any more build breaks from this change.

APPROVE COMMIT

NOTE: This patch has been committed.

xemacs-packages/xemacs-base/ChangeLog addition:

2010-09-03  Aidan Kehoe  <kehoea at parhasard.net>

	* edmacro.el (edmacro-parse-word):
	Only #'read if WORD actually matched the regexp avoiding errors
	when WORD is not valid Lisp syntax. Logic error on my part, caught
	by the smoketest; thank you Mats Lidell!


XEmacs Packages source patch:
Diff command:   cvs -q diff -Nu
Files affected: xemacs-packages/xemacs-base/edmacro.el

Index: xemacs-packages/xemacs-base/edmacro.el
===================================================================
RCS file: /cvsroot/xemacs/XEmacs/packages/xemacs-packages/xemacs-base/edmacro.el,v
retrieving revision 1.5
diff -u -r1.5 edmacro.el
--- xemacs-packages/xemacs-base/edmacro.el	2 Sep 2010 20:21:38 -0000	1.5
+++ xemacs-packages/xemacs-base/edmacro.el	3 Sep 2010 19:49:26 -0000
@@ -517,12 +517,13 @@
                           (t (intern (string arg))))))
 	   (add
 	    (cond
-	     ((prog1 nil
-                (string-match "^\\\\[0-7]\\{1,3\\}$" word)
-                ;; Octal value of a character. If it's numerically out of
-                ;; range, allow the Lisp reader to error. If read succedds,
-                ;; we handle the actual numeric value further down.
-                (setq word (read (concat "\"" word "\"")))))
+	     ((and (string-match "^\\\\[0-7]\\{1,3\\}$" word)
+                   ;; Octal value of a character. If it's numerically out of
+                   ;; range, allow the Lisp reader to error.
+                   (setq word (read (concat "\"" word "\"")))
+                   ;; This clause never succeeds, we want to handle the
+                   ;; actual numeric value further down:
+                   nil))
 	     ((string-match "^<<.+>>$" word)
 	      ;; Extended command.
 	      (nconc

-- 
“Apart from the nine-banded armadillo, man is the only natural host of
Mycobacterium leprae, although it can be grown in the footpads of mice.”
  -- Kumar & Clark, Clinical Medicine, summarising improbable leprosy research



More information about the XEmacs-Patches mailing list