1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/e32ce9c59c23/
changeset: e32ce9c59c23
user: sperber
date: 2013-02-20 11:07:16
summary: Allow the lhs a syntax-alist entry in `font-lock-defaults' to be a
string.
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.)
affected #: 2 files
diff -r 74172066fd6aba10d3e5b167de76921daa661c33 -r
e32ce9c59c23cbeed381b4248642720749aef344 lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+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.)
+
2013-02-16 Stephen J. Turnbull <stephen(a)xemacs.org>
Thanks to Jeff Sparkes for suggestion and the original patches and
diff -r 74172066fd6aba10d3e5b167de76921daa661c33 -r
e32ce9c59c23cbeed381b4248642720749aef344 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?
Repository URL:
https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches