Add and use `font-lock-extend-region-functions'
11 years, 7 months
Michael Sperber
More fallout from porting clojure-mode.
2013-02-20 Michael Sperber <mike(a)xemacs.org>
* font-lock.el (font-lock-beg)
(font-lock-extend-region-functions)
(font-lock-extend-region-multiline)
(font-lock-extend-region-wholelines)
(font-lock-default-fontify-region): Add and use
`font-lock-extend-region-functions' from 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
@@ -1371,6 +1371,61 @@
(font-lock-unfontify-region (point-min) (point-max))
(set (make-local-variable 'font-lock-fontified) nil))
+(defvar font-lock-beg) (defvar font-lock-end)
+(defvar font-lock-extend-region-functions
+ '(font-lock-extend-region-wholelines
+ ;; This use of font-lock-multiline property is unreliable but is just
+ ;; a handy heuristic: in case you don't have a function that does
+ ;; /identification/ of multiline elements, you may still occasionally
+ ;; discover them by accident (or you may /identify/ them but not in all
+ ;; cases), in which case the font-lock-multiline property can help make
+ ;; sure you will properly *re*identify them during refontification.
+ font-lock-extend-region-multiline)
+ "Special hook run just before proceeding to fontify a region.
+This is used to allow major modes to help font-lock find safe buffer positions
+as beginning and end of the fontified region. Its most common use is to solve
+the problem of /identification/ of multiline elements by providing a function
+that tries to find such elements and move the boundaries such that they do
+not fall in the middle of one.
+Each function is called with no argument; it is expected to adjust the
+dynamically bound variables `font-lock-beg' and `font-lock-end'; and return
+non-nil if it did make such an adjustment.
+These functions are run in turn repeatedly until they all return nil.
+Put first the functions more likely to cause a change and cheaper to compute.")
+;; Mark it as a special hook which doesn't use any global setting
+;; (i.e. doesn't obey the element t in the buffer-local value).
+(make-variable-buffer-local 'font-lock-extend-region-functions)
+
+(defun font-lock-extend-region-multiline ()
+ "Move fontification boundaries away from any `font-lock-multiline' property."
+ (let ((changed nil))
+ (when (and (> font-lock-beg (point-min))
+ (get-text-property (1- font-lock-beg) 'font-lock-multiline))
+ (setq changed t)
+ (setq font-lock-beg (or (previous-single-property-change
+ font-lock-beg 'font-lock-multiline)
+ (point-min))))
+ ;;
+ (when (get-text-property font-lock-end 'font-lock-multiline)
+ (setq changed t)
+ (setq font-lock-end (or (text-property-any font-lock-end (point-max)
+ 'font-lock-multiline nil)
+ (point-max))))
+ changed))
+
+(defun font-lock-extend-region-wholelines ()
+ "Move fontification boundaries to beginning of lines."
+ (let ((changed nil))
+ (goto-char font-lock-beg)
+ (unless (bolp)
+ (setq changed t font-lock-beg (line-beginning-position)))
+ (goto-char font-lock-end)
+ (unless (bolp)
+ (unless (eq font-lock-end
+ (setq font-lock-end (line-beginning-position 2)))
+ (setq changed t)))
+ changed))
+
;; This used to be `font-lock-fontify-region', and before that,
;; `font-lock-fontify-region' used to be the name used for what is now
;; `font-lock-fontify-syntactically-region'.
@@ -1383,6 +1438,19 @@
(progn
;; Use the fontification syntax table, if any.
(if font-lock-syntax-table (set-syntax-table font-lock-syntax-table))
+ (let ((funs font-lock-extend-region-functions)
+ (font-lock-beg beg)
+ (font-lock-end end))
+ (while funs
+ (setq funs (if (or (not (funcall (car funs)))
+ (eq funs font-lock-extend-region-functions))
+ (cdr funs)
+ ;; If there's been a change, we should go through
+ ;; the list again since this new position may
+ ;; warrant a different answer from one of the fun
+ ;; we've already seen.
+ font-lock-extend-region-functions)))
+ (setq beg font-lock-beg end font-lock-end))
;; Now do the fontification.
(font-lock-unfontify-region beg end)
(when font-lock-syntactic-keywords
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit/xemacs-base: 2 new changesets
11 years, 7 months
Bitbucket
2 new commits in xemacs-base:
https://bitbucket.org/xemacs/xemacs-base/commits/dd9ec365bc4d/
changeset: dd9ec365bc4d
user: sperber
date: 2013-02-21 13:47:57
summary: Add file-util.el with `locate-dominating-file'.
2013-02-21 Michael Sperber <mike(a)xemacs.org>
* file-util.el:
(locate-dominating-stop-dir-regexp, locate-dominating-file): New
file, add functions from GNU Emacs.
affected #: 3 files
diff -r 8f81f441c070adfd90fedb59c13bb6f69dab39a4 -r dd9ec365bc4d72997e78ef114777f4397ebe7140 ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-02-21 Michael Sperber <mike(a)xemacs.org>
+
+ * file-util.el:
+ (locate-dominating-stop-dir-regexp, locate-dominating-file): New
+ file, add functions from GNU Emacs.
+
2013-02-19 Michael Sperber <mike(a)xemacs.org>
* rx.el: Added port from GNU Emacs 24.2.
diff -r 8f81f441c070adfd90fedb59c13bb6f69dab39a4 -r dd9ec365bc4d72997e78ef114777f4397ebe7140 Makefile
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,7 @@
chistory.elc comint.elc comint-xemacs.elc compile.elc debug.elc \
easy-mmode.elc ebuff-menu.elc echistory.elc ehelp.elc edmacro.elc \
electric.elc enriched.elc env.elc facemenu.elc ffap.elc field.elc \
+ file-util.elc \
helper.elc imenu.elc iso-syntax.elc macros.elc novice.elc outline.elc \
passwd.elc pp.elc regexp-opt.elc regi.elc ring.elc shell.elc \
skeleton.elc sort.elc thing.elc time-stamp.elc timer-funcs.elc \
diff -r 8f81f441c070adfd90fedb59c13bb6f69dab39a4 -r dd9ec365bc4d72997e78ef114777f4397ebe7140 file-util.el
--- /dev/null
+++ b/file-util.el
@@ -0,0 +1,134 @@
+;;; file-util.el --- utilities for dealing with files
+
+;; Copyright (C) 1985-1987, 1992-2012 Free Software Foundation, Inc.
+
+;; This file is part of XEmacs.
+
+;; XEmacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;;###autoload
+(defvar locate-dominating-stop-dir-regexp
+ "\\`\\(?:[\\/][\\/][^\\/]+[\\/]\\|/\\(?:net\\|afs\\|\\.\\.\\.\\)/\\)\\'"
+ "Regexp of directory names which stop the search in `locate-dominating-file'.
+Any directory whose name matches this regexp will be treated like
+a kind of root directory by `locate-dominating-file' which will stop its search
+when it bumps into it.
+The default regexp prevents fruitless and time-consuming attempts to find
+special files in directories in which filenames are interpreted as hostnames,
+or mount points potentially requiring authentication as a different user.")
+
+;; (defun locate-dominating-files (file regexp)
+;; "Look up the directory hierarchy from FILE for a file matching REGEXP.
+;; Stop at the first parent where a matching file is found and return the list
+;; of files that that match in this directory."
+;; (catch 'found
+;; ;; `user' is not initialized yet because `file' may not exist, so we may
+;; ;; have to walk up part of the hierarchy before we find the "initial UID".
+;; (let ((user nil)
+;; ;; Abbreviate, so as to stop when we cross ~/.
+;; (dir (abbreviate-file-name (file-name-as-directory file)))
+;; files)
+;; (while (and dir
+;; ;; As a heuristic, we stop looking up the hierarchy of
+;; ;; directories as soon as we find a directory belonging to
+;; ;; another user. This should save us from looking in
+;; ;; things like /net and /afs. This assumes that all the
+;; ;; files inside a project belong to the same user.
+;; (let ((prev-user user))
+;; (setq user (nth 2 (file-attributes dir)))
+;; (or (null prev-user) (equal user prev-user))))
+;; (if (setq files (condition-case nil
+;; (directory-files dir 'full regexp 'nosort)
+;; (error nil)))
+;; (throw 'found files)
+;; (if (equal dir
+;; (setq dir (file-name-directory
+;; (directory-file-name dir))))
+;; (setq dir nil))))
+;; nil)))
+
+;;;###autoload
+(defun locate-dominating-file (file name)
+ "Look up the directory hierarchy from FILE for a file named NAME.
+Stop at the first parent directory containing a file NAME,
+and return the directory. Return nil if not found.
+
+This function only tests if FILE exists. If you care about whether
+it is readable, regular, etc., you should test the result."
+ ;; We used to use the above locate-dominating-files code, but the
+ ;; directory-files call is very costly, so we're much better off doing
+ ;; multiple calls using the code in here.
+ ;;
+ ;; Represent /home/luser/foo as ~/foo so that we don't try to look for
+ ;; `name' in /home or in /.
+ (setq file (abbreviate-file-name file))
+ (let ((root nil)
+ ;; `user' is not initialized outside the loop because
+ ;; `file' may not exist, so we may have to walk up part of the
+ ;; hierarchy before we find the "initial UID". Note: currently unused
+ ;; (user nil)
+ try)
+ (while (not (or root
+ (null file)
+ ;; FIXME: Disabled this heuristic because it is sometimes
+ ;; inappropriate.
+ ;; As a heuristic, we stop looking up the hierarchy of
+ ;; directories as soon as we find a directory belonging
+ ;; to another user. This should save us from looking in
+ ;; things like /net and /afs. This assumes that all the
+ ;; files inside a project belong to the same user.
+ ;; (let ((prev-user user))
+ ;; (setq user (nth 2 (file-attributes file)))
+ ;; (and prev-user (not (equal user prev-user))))
+ (string-match locate-dominating-stop-dir-regexp file)))
+ ;; FIXME? maybe this function should (optionally?)
+ ;; use file-readable-p instead. In many cases, an unreadable
+ ;; FILE is no better than a non-existent one.
+ ;; See eg dir-locals-find-file.
+ (setq try (file-exists-p (expand-file-name name file)))
+ (cond (try (setq root file))
+ ((equal file (setq file (file-name-directory
+ (directory-file-name file))))
+ (setq file nil))))
+ root))
+
+(defcustom confirm-nonexistent-file-or-buffer 'after-completion
+ "Whether confirmation is requested before visiting a new file or buffer.
+If nil, confirmation is not requested.
+If the value is `after-completion', confirmation is only
+ requested if the user called `minibuffer-complete' right before
+ `minibuffer-complete-and-exit'.
+Any other non-nil value means to request confirmation.
+
+This affects commands like `switch-to-buffer' and `find-file'."
+:group 'find-file
+:version "23.1"
+:type '(choice (const :tag "After completion" after-completion)
+ (const :tag "Never" nil)
+ (other :tag "Always" t)))
+
+(defun confirm-nonexistent-file-or-buffer ()
+ "Whether to request confirmation before visiting a new file or buffer.
+The variable `confirm-nonexistent-file-or-buffer' determines the
+return value, which may be passed as the REQUIRE-MATCH arg to
+`read-buffer' or `find-file-read-args'."
+ (cond ((eq confirm-nonexistent-file-or-buffer 'after-completion)
+ 'confirm-after-completion)
+ (confirm-nonexistent-file-or-buffer
+ 'confirm)
+ (t nil)))
+
+;;; file-util.el ends here
https://bitbucket.org/xemacs/xemacs-base/commits/a3e50fc78cea/
changeset: a3e50fc78cea
user: sperber
date: 2013-02-24 10:48:00
summary: Merge.
affected #: 3 files
diff -r dd9ec365bc4d72997e78ef114777f4397ebe7140 -r a3e50fc78cea130c1b0dcfebce65506ebbb69a78 .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -152,3 +152,4 @@
180d3329330918504ae165892e3fb92edc3d7efa xemacs-base-1_41
a0a1d78982e41ca066dc5aed5dc1a5009f60a091 xemacs-base-2_31
2d772818dd24876d728e60d0ca6b8903b6ac4ee0 xemacs-base-2_32
+2c1ae84a10ac1ac8d7db49aa5f2e7840fe7ca69b xemacs-base-2_33
diff -r dd9ec365bc4d72997e78ef114777f4397ebe7140 -r a3e50fc78cea130c1b0dcfebce65506ebbb69a78 ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,10 @@
(locate-dominating-stop-dir-regexp, locate-dominating-file): New
file, add functions from GNU Emacs.
+2013-02-22 Norbert Koch <viteno(a)xemacs.org>
+
+ * Makefile (VERSION): XEmacs package 2.33 released.
+
2013-02-19 Michael Sperber <mike(a)xemacs.org>
* rx.el: Added port from GNU Emacs 24.2.
diff -r dd9ec365bc4d72997e78ef114777f4397ebe7140 -r a3e50fc78cea130c1b0dcfebce65506ebbb69a78 Makefile
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-VERSION = 2.32
+VERSION = 2.33
AUTHOR_VERSION =
MAINTAINER = XEmacs Development Team <xemacs-beta(a)xemacs.org>
PACKAGE = xemacs-base
Repository URL: https://bitbucket.org/xemacs/xemacs-base/
--
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
Add `locate-dominating-file' from GNU Emacs
11 years, 7 months
Michael Sperber
I didn't know where to put this; in GNU Emacs, it's in the core in
files.el. I put it in a new file in xemacs-base. Let me know if you
have better ideas.
2013-02-21 Michael Sperber <mike(a)xemacs.org>
* file-util.el:
(locate-dominating-stop-dir-regexp, locate-dominating-file): New
file, add functions from GNU Emacs.
--
Regards,
Mike
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,7 @@
chistory.elc comint.elc comint-xemacs.elc compile.elc debug.elc \
easy-mmode.elc ebuff-menu.elc echistory.elc ehelp.elc edmacro.elc \
electric.elc enriched.elc env.elc facemenu.elc ffap.elc field.elc \
+ file-util.elc \
helper.elc imenu.elc iso-syntax.elc macros.elc novice.elc outline.elc \
passwd.elc pp.elc regexp-opt.elc regi.elc ring.elc shell.elc \
skeleton.elc sort.elc thing.elc time-stamp.elc timer-funcs.elc \
diff --git a/file-util.el b/file-util.el
new file mode 100644
--- /dev/null
+++ b/file-util.el
@@ -0,0 +1,106 @@
+;;; file-util.el --- utilities for dealing with files
+
+;; Copyright (C) 1985-1987, 1992-2012 Free Software Foundation, Inc.
+
+;; This file is part of XEmacs.
+
+;; XEmacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;;###autoload
+(defvar locate-dominating-stop-dir-regexp
+ "\\`\\(?:[\\/][\\/][^\\/]+[\\/]\\|/\\(?:net\\|afs\\|\\.\\.\\.\\)/\\)\\'"
+ "Regexp of directory names which stop the search in `locate-dominating-file'.
+Any directory whose name matches this regexp will be treated like
+a kind of root directory by `locate-dominating-file' which will stop its search
+when it bumps into it.
+The default regexp prevents fruitless and time-consuming attempts to find
+special files in directories in which filenames are interpreted as hostnames,
+or mount points potentially requiring authentication as a different user.")
+
+;; (defun locate-dominating-files (file regexp)
+;; "Look up the directory hierarchy from FILE for a file matching REGEXP.
+;; Stop at the first parent where a matching file is found and return the list
+;; of files that that match in this directory."
+;; (catch 'found
+;; ;; `user' is not initialized yet because `file' may not exist, so we may
+;; ;; have to walk up part of the hierarchy before we find the "initial UID".
+;; (let ((user nil)
+;; ;; Abbreviate, so as to stop when we cross ~/.
+;; (dir (abbreviate-file-name (file-name-as-directory file)))
+;; files)
+;; (while (and dir
+;; ;; As a heuristic, we stop looking up the hierarchy of
+;; ;; directories as soon as we find a directory belonging to
+;; ;; another user. This should save us from looking in
+;; ;; things like /net and /afs. This assumes that all the
+;; ;; files inside a project belong to the same user.
+;; (let ((prev-user user))
+;; (setq user (nth 2 (file-attributes dir)))
+;; (or (null prev-user) (equal user prev-user))))
+;; (if (setq files (condition-case nil
+;; (directory-files dir 'full regexp 'nosort)
+;; (error nil)))
+;; (throw 'found files)
+;; (if (equal dir
+;; (setq dir (file-name-directory
+;; (directory-file-name dir))))
+;; (setq dir nil))))
+;; nil)))
+
+;;;###autoload
+(defun locate-dominating-file (file name)
+ "Look up the directory hierarchy from FILE for a file named NAME.
+Stop at the first parent directory containing a file NAME,
+and return the directory. Return nil if not found.
+
+This function only tests if FILE exists. If you care about whether
+it is readable, regular, etc., you should test the result."
+ ;; We used to use the above locate-dominating-files code, but the
+ ;; directory-files call is very costly, so we're much better off doing
+ ;; multiple calls using the code in here.
+ ;;
+ ;; Represent /home/luser/foo as ~/foo so that we don't try to look for
+ ;; `name' in /home or in /.
+ (setq file (abbreviate-file-name file))
+ (let ((root nil)
+ ;; `user' is not initialized outside the loop because
+ ;; `file' may not exist, so we may have to walk up part of the
+ ;; hierarchy before we find the "initial UID". Note: currently unused
+ ;; (user nil)
+ try)
+ (while (not (or root
+ (null file)
+ ;; FIXME: Disabled this heuristic because it is sometimes
+ ;; inappropriate.
+ ;; As a heuristic, we stop looking up the hierarchy of
+ ;; directories as soon as we find a directory belonging
+ ;; to another user. This should save us from looking in
+ ;; things like /net and /afs. This assumes that all the
+ ;; files inside a project belong to the same user.
+ ;; (let ((prev-user user))
+ ;; (setq user (nth 2 (file-attributes file)))
+ ;; (and prev-user (not (equal user prev-user))))
+ (string-match locate-dominating-stop-dir-regexp file)))
+ ;; FIXME? maybe this function should (optionally?)
+ ;; use file-readable-p instead. In many cases, an unreadable
+ ;; FILE is no better than a non-existent one.
+ ;; See eg dir-locals-find-file.
+ (setq try (file-exists-p (expand-file-name name file)))
+ (cond (try (setq root file))
+ ((equal file (setq file (file-name-directory
+ (directory-file-name file))))
+ (setq file nil))))
+ root))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
Allow the left-hand-side of a syntax-alist entry in `font-lock-defaults' to be a string
11 years, 7 months
Michael Sperber
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
commit/XEmacs: sperber: Allow the lhs a syntax-alist entry in `font-lock-defaults' to be a string.
11 years, 7 months
Bitbucket
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
commit/xemacs-packages: 3 new changesets
11 years, 7 months
Bitbucket
3 new commits in xemacs-packages:
https://bitbucket.org/xemacs/xemacs-packages/commits/282eeb5577eb/
changeset: 282eeb5577eb
user: Norbert Koch
date: 2013-02-22 09:32:03
summary: Update xemacs-base os-utils
affected #: 1 file
diff -r 413b4f427ac52ae573e6eb94de5837836d459c9e -r 282eeb5577eb1a6f334b89bd06c74130cae88998 .hgsubstate
--- a/.hgsubstate
+++ b/.hgsubstate
@@ -76,7 +76,7 @@
89c61585a9a799cc0cbeb69ab1e841732ffdc3eb xemacs-packages/net-utils
fd7ad264907107574dbbe5492304ec4a9786d658 xemacs-packages/ocaml
a0a3bac469f2d74a0af53140dace0cc455060c43 xemacs-packages/oo-browser
-89f88d5db0a8af3b2751c90ca5d43bf9cf27dad8 xemacs-packages/os-utils
+d772ec44493e5666ae20087c37e1ccdb9c595f0d xemacs-packages/os-utils
86f4cd2b333b893910a961f7311bf63126a5f152 xemacs-packages/patcher
7a04c241f47185ce3284c2760a9dc426a9657958 xemacs-packages/pc
608918670e3d6936ffa06ecefff8f76251d74a98 xemacs-packages/pcl-cvs
@@ -123,7 +123,7 @@
4eb09b852b72373e7ce9790cb9ebafc7e1b7598e xemacs-packages/vm
d1d1893d29ed5c97fab849e1ffb3a51d778d8026 xemacs-packages/w3
fd7cd3bdb22b444b112299facd2375daa2091dee xemacs-packages/x-symbol
-190b20ac84fc380fba1dabcf04b0181f3ac13353 xemacs-packages/xemacs-base
+8f81f441c070adfd90fedb59c13bb6f69dab39a4 xemacs-packages/xemacs-base
9c8d90ff018391ccc55abcf6967ea6a00e749f53 xemacs-packages/xemacs-devel
be5592eaca6a65548d138ecd753f2e71b123793a xemacs-packages/xetla
bc5e241f2ddfed169b3e679b85a030237d5132ee xemacs-packages/xlib
https://bitbucket.org/xemacs/xemacs-packages/commits/f9118eb9a190/
changeset: f9118eb9a190
user: Norbert Koch
date: 2013-02-22 09:32:33
summary: XEmacs Package Release
affected #: 1 file
diff -r 282eeb5577eb1a6f334b89bd06c74130cae88998 -r f9118eb9a19027ef52cfa8d26dd50fca3024c630 ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-02-22 Norbert Koch <viteno(a)xemacs.org>
+
+ * Packages released: xemacs-base, os-utils.
+
2013-02-08 Norbert Koch <viteno(a)xemacs.org>
* Packages released: cc-mode, tramp.
https://bitbucket.org/xemacs/xemacs-packages/commits/38538c177698/
changeset: 38538c177698
user: Norbert Koch
date: 2013-02-22 09:43:55
summary: Pre-release xemacs-base os-utils
affected #: 1 file
diff -r f9118eb9a19027ef52cfa8d26dd50fca3024c630 -r 38538c1776988b4fcfdca40975ee74c173f1bf5b .hgsubstate
--- a/.hgsubstate
+++ b/.hgsubstate
@@ -76,7 +76,7 @@
89c61585a9a799cc0cbeb69ab1e841732ffdc3eb xemacs-packages/net-utils
fd7ad264907107574dbbe5492304ec4a9786d658 xemacs-packages/ocaml
a0a3bac469f2d74a0af53140dace0cc455060c43 xemacs-packages/oo-browser
-d772ec44493e5666ae20087c37e1ccdb9c595f0d xemacs-packages/os-utils
+26abf69511758b2c3c84cee706ca36080aec3de8 xemacs-packages/os-utils
86f4cd2b333b893910a961f7311bf63126a5f152 xemacs-packages/patcher
7a04c241f47185ce3284c2760a9dc426a9657958 xemacs-packages/pc
608918670e3d6936ffa06ecefff8f76251d74a98 xemacs-packages/pcl-cvs
@@ -123,7 +123,7 @@
4eb09b852b72373e7ce9790cb9ebafc7e1b7598e xemacs-packages/vm
d1d1893d29ed5c97fab849e1ffb3a51d778d8026 xemacs-packages/w3
fd7cd3bdb22b444b112299facd2375daa2091dee xemacs-packages/x-symbol
-8f81f441c070adfd90fedb59c13bb6f69dab39a4 xemacs-packages/xemacs-base
+3caa7d3893ee7ec36a14b4709bcd97d477d14283 xemacs-packages/xemacs-base
9c8d90ff018391ccc55abcf6967ea6a00e749f53 xemacs-packages/xemacs-devel
be5592eaca6a65548d138ecd753f2e71b123793a xemacs-packages/xetla
bc5e241f2ddfed169b3e679b85a030237d5132ee xemacs-packages/xlib
Repository URL: https://bitbucket.org/xemacs/xemacs-packages/
--
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
commit/xemacs-base: 2 new changesets
11 years, 7 months
Bitbucket
2 new commits in xemacs-base:
https://bitbucket.org/xemacs/xemacs-base/commits/2c1ae84a10ac/
changeset: 2c1ae84a10ac
user: Norbert Koch
date: 2013-02-22 09:32:28
summary: XEmacs Package Release 2.33
affected #: 2 files
diff -r 8f81f441c070adfd90fedb59c13bb6f69dab39a4 -r 2c1ae84a10ac1ac8d7db49aa5f2e7840fe7ca69b ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-02-22 Norbert Koch <viteno(a)xemacs.org>
+
+ * Makefile (VERSION): XEmacs package 2.33 released.
+
2013-02-19 Michael Sperber <mike(a)xemacs.org>
* rx.el: Added port from GNU Emacs 24.2.
diff -r 8f81f441c070adfd90fedb59c13bb6f69dab39a4 -r 2c1ae84a10ac1ac8d7db49aa5f2e7840fe7ca69b Makefile
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-VERSION = 2.32
+VERSION = 2.33
AUTHOR_VERSION =
MAINTAINER = XEmacs Development Team <xemacs-beta(a)xemacs.org>
PACKAGE = xemacs-base
https://bitbucket.org/xemacs/xemacs-base/commits/3caa7d3893ee/
changeset: 3caa7d3893ee
user: Norbert Koch
date: 2013-02-22 09:32:28
summary: Added tag xemacs-base-2_33 for changeset 2c1ae84a10ac
affected #: 1 file
diff -r 2c1ae84a10ac1ac8d7db49aa5f2e7840fe7ca69b -r 3caa7d3893ee7ec36a14b4709bcd97d477d14283 .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -152,3 +152,4 @@
180d3329330918504ae165892e3fb92edc3d7efa xemacs-base-1_41
a0a1d78982e41ca066dc5aed5dc1a5009f60a091 xemacs-base-2_31
2d772818dd24876d728e60d0ca6b8903b6ac4ee0 xemacs-base-2_32
+2c1ae84a10ac1ac8d7db49aa5f2e7840fe7ca69b xemacs-base-2_33
Repository URL: https://bitbucket.org/xemacs/xemacs-base/
--
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
commit/os-utils: 2 new changesets
11 years, 7 months
Bitbucket
2 new commits in os-utils:
https://bitbucket.org/xemacs/os-utils/commits/9fbc73e6f15a/
changeset: 9fbc73e6f15a
user: Norbert Koch
date: 2013-02-22 09:32:33
summary: XEmacs Package Release 1.42
affected #: 2 files
diff -r d772ec44493e5666ae20087c37e1ccdb9c595f0d -r 9fbc73e6f15ab32febf6a3f4602680e1c46ea6ed ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-02-22 Norbert Koch <viteno(a)xemacs.org>
+
+ * Makefile (VERSION): XEmacs package 1.42 released.
+
2013-02-19 Michael Sperber <mike(a)xemacs.org>
* arc-mode.el (arc-mode): Provide `arc-mode' in addition to
diff -r d772ec44493e5666ae20087c37e1ccdb9c595f0d -r 9fbc73e6f15ab32febf6a3f4602680e1c46ea6ed Makefile
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@
# This XEmacs package contains independent single file lisp packages
-VERSION = 1.41
+VERSION = 1.42
AUTHOR_VERSION =
MAINTAINER = XEmacs Development Team <xemacs-beta(a)xemacs.org>
PACKAGE = os-utils
https://bitbucket.org/xemacs/os-utils/commits/26abf6951175/
changeset: 26abf6951175
user: Norbert Koch
date: 2013-02-22 09:32:33
summary: Added tag os-utils-1_42 for changeset 9fbc73e6f15a
affected #: 1 file
diff -r 9fbc73e6f15ab32febf6a3f4602680e1c46ea6ed -r 26abf69511758b2c3c84cee706ca36080aec3de8 .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -73,3 +73,4 @@
d935263f5724d14598947401d8139ed30711a83b XEMACS_BEFORE_MOVE_TO_SUNSITE_DK
504874d0fb6314d847aec7bb34280902884e6145 sumo-2003-02-05
08df6e631d2fcfc0bc9d0c5099eade227d699fc1 sumo-2006-05-10
+9fbc73e6f15ab32febf6a3f4602680e1c46ea6ed os-utils-1_42
Repository URL: https://bitbucket.org/xemacs/os-utils/
--
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
Provide 'arc-mode
11 years, 7 months
Michael Sperber
Another bit of GNU Emacs compatibility.
2013-02-19 Michael Sperber <mike(a)xemacs.org>
* arc-mode.el (arc-mode): Provide `arc-mode' in addition to
`archive-mode', for GNU Emacs compatibility.
--
Regards,
Mike
diff --git a/arc-mode.el b/arc-mode.el
--- a/arc-mode.el
+++ b/arc-mode.el
@@ -1594,5 +1594,6 @@
;;;###autoload(add-to-list 'auto-mode-alist '("\\.\\(?:arc\\|[ejw]ar\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode))
(provide 'archive-mode)
+(provide 'arc-mode)
;;; arc-mode.el ends here.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit/os-utils: sperber: Provide 'arc-mode.
11 years, 7 months
Bitbucket
1 new commit in os-utils:
https://bitbucket.org/xemacs/os-utils/commits/d772ec44493e/
changeset: d772ec44493e
user: sperber
date: 2013-02-21 10:52:19
summary: Provide 'arc-mode.
2013-02-19 Michael Sperber <mike(a)xemacs.org>
* arc-mode.el (arc-mode): Provide `arc-mode' in addition to
`archive-mode', for GNU Emacs compatibility.
affected #: 2 files
diff -r 89f88d5db0a8af3b2751c90ca5d43bf9cf27dad8 -r d772ec44493e5666ae20087c37e1ccdb9c595f0d ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-19 Michael Sperber <mike(a)xemacs.org>
+
+ * arc-mode.el (arc-mode): Provide `arc-mode' in addition to
+ `archive-mode', for GNU Emacs compatibility.
+
2008-06-25 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.41 released.
diff -r 89f88d5db0a8af3b2751c90ca5d43bf9cf27dad8 -r d772ec44493e5666ae20087c37e1ccdb9c595f0d arc-mode.el
--- a/arc-mode.el
+++ b/arc-mode.el
@@ -1594,5 +1594,6 @@
;;;###autoload(add-to-list 'auto-mode-alist '("\\.\\(?:arc\\|[ejw]ar\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode))
(provide 'archive-mode)
+(provide 'arc-mode)
;;; arc-mode.el ends here.
Repository URL: https://bitbucket.org/xemacs/os-utils/
--
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