Here's another small synch with GNU Emacs, discovered in the process of
porting clojure-mode.
2013-02-08  Michael Sperber  <mike(a)xemacs.org>
	* font-lock.el (font-lock-set-defaults-1):
	(font-lock-defaults): Allow the left-hand-side of a syntax-alist
	entry in `font-lock-defaults' to be a string, in addition to a
	char.  (This is a sync with GNU Emacs.)
-- 
Regards,
Mike
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -529,9 +529,9 @@
 to use for fontification) or a list of symbols.  If KEYWORDS-ONLY is non-nil,
 syntactic fontification (strings and comments) is not performed.  If CASE-FOLD
 is non-nil, the case of the keywords is ignored when fontifying.  If
-SYNTAX-ALIST is non-nil, it should be a list of cons pairs of the form (CHAR
-. STRING) used to set the local Font Lock syntax table, for keyword and
-syntactic fontification (see `modify-syntax-entry').
+SYNTAX-ALIST is non-nil, it should be a list of cons pairs of the form 
+(CHAR-OR-STRING . STRING) used to set the local Font Lock syntax table, for
+keyword and syntactic fontification (see `modify-syntax-entry').
 
 If SYNTAX-BEGIN is non-nil, it should be a function with no args used to move
 backwards outside any enclosing syntactic block, for syntactic fontification.
@@ -2070,8 +2070,16 @@
 		(setq font-lock-syntax-table
 		      (copy-syntax-table (syntax-table)))
 		(while slist
-		  (modify-syntax-entry (car (car slist)) (cdr (car slist))
-				       font-lock-syntax-table)
+		  (let ((entry (cdr (car slist)))
+			(thing (car (car slist))))
+		    (mapc #'(lambda (char)
+			      (modify-syntax-entry char entry
+						   font-lock-syntax-table))
+			  (cond
+			   ((stringp thing) (string-to-list thing))
+			   ((characterp thing) (list thing))
+			   (t
+			    (error "invalid syntax-alist entry for `font-lock-defaults': %S"
(car slist))))))
 		  (setq slist (cdr slist)))))
 
 	  ;; Syntax function?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches