Mercurial > hg > xemacs-beta
changeset 1428:10738b72057d
[xemacs-hg @ 2003-04-24 05:29:11 by youngs]
2003-04-24 Steve Youngs <youngs@xemacs.org>
* font-lock.el (font-lock-match-java-declarations): Move
save-restriction, narrow-to-region to beginning of function to
avoid going beyond the limit and causing an infloop.
From Jin Choi <jsc@orangeimagineering.com>.
2003-04-24 Vasily Korytov <deskpot@myrealbox.com>
* lisp-mode.el (emacs-lisp-mode-hook, lisp-mode-hook,
lisp-interaction-mode-hook): Add the docstrings.
author | youngs |
---|---|
date | Thu, 24 Apr 2003 05:29:12 +0000 |
parents | 5d62849e7275 |
children | 969b7290edca |
files | lisp/ChangeLog lisp/font-lock.el lisp/lisp-mode.el |
diffstat | 3 files changed, 50 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Apr 24 05:26:42 2003 +0000 +++ b/lisp/ChangeLog Thu Apr 24 05:29:12 2003 +0000 @@ -1,3 +1,15 @@ +2003-04-24 Steve Youngs <youngs@xemacs.org> + + * font-lock.el (font-lock-match-java-declarations): Move + save-restriction, narrow-to-region to beginning of function to + avoid going beyond the limit and causing an infloop. + From Jin Choi <jsc@orangeimagineering.com>. + +2003-04-24 Vasily Korytov <deskpot@myrealbox.com> + + * lisp-mode.el (emacs-lisp-mode-hook, lisp-mode-hook, + lisp-interaction-mode-hook): Add the docstrings. + 2003-04-23 Stephen J. Turnbull <stephen@xemacs.org> * subr.el (split-string): Revert to regular behavior, except when
--- a/lisp/font-lock.el Thu Apr 24 05:26:42 2003 +0000 +++ b/lisp/font-lock.el Thu Apr 24 05:29:12 2003 +0000 @@ -2719,32 +2719,34 @@ ;; the cursor to fontify more identifiers. (defun font-lock-match-java-declarations (limit) "Match and skip over variable definitions." - (if (looking-at "\\s *\\(\\[\\s *\\]\\s *\\)*") - (goto-char (match-end 0))) - (and - (looking-at java-font-lock-identifier-regexp) - (save-match-data - (not (string-match java-font-lock-type-regexp - (buffer-substring (match-beginning 1) - (match-end 1))))) - (save-match-data - (save-excursion - (goto-char (match-beginning 1)) - (not (looking-at - (concat java-font-lock-class-name-regexp - "\\s *\\(\\[\\s *\\]\\s *\\)*\\<"))))) - (save-match-data - (condition-case nil - (save-restriction - (narrow-to-region (point-min) limit) - (goto-char (match-end 0)) - ;; Note: Both `scan-sexps' and the second goto-char can - ;; generate an error which is caught by the - ;; `condition-case' expression. - (while (not (looking-at "\\s *\\(\\(,\\)\\|;\\|$\\)")) - (goto-char (or (scan-sexps (point) 1) (point-max)))) - (goto-char (match-end 2))) ; non-nil - (error t))))) + (save-restriction + (narrow-to-region (point-min) limit) + + (if (looking-at "\\s *\\(\\[\\s *\\]\\s *\\)*") + (goto-char (match-end 0))) + (and + (looking-at java-font-lock-identifier-regexp) + (save-match-data + (not (string-match java-font-lock-type-regexp + (buffer-substring (match-beginning 1) + (match-end 1))))) + (save-match-data + (save-excursion + (goto-char (match-beginning 1)) + (not (looking-at + (concat java-font-lock-class-name-regexp + "\\s *\\(\\[\\s *\\]\\s *\\)*\\<"))))) + (save-match-data + (condition-case nil + (progn + (goto-char (match-end 0)) + ;; Note: Both `scan-sexps' and the second goto-char can + ;; generate an error which is caught by the + ;; `condition-case' expression. + (while (not (looking-at "\\s *\\(\\(,\\)\\|;\\|$\\)")) + (goto-char (or (scan-sexps (point) 1) (point-max)))) + (goto-char (match-end 2))) ; non-nil + (error t)))))) (defvar tex-font-lock-keywords
--- a/lisp/lisp-mode.el Thu Apr 24 05:26:42 2003 +0000 +++ b/lisp/lisp-mode.el Thu Apr 24 05:29:12 2003 +0000 @@ -267,6 +267,16 @@ ;; doesn't need them. ) +;; XEmacs: add docstrings to the hooks +(defvar emacs-lisp-mode-hook nil + "Hook to run when entering emacs-lisp-mode.") + +(defvar lisp-mode-hook nil + "Hook to run when entering lisp-mode.") + +(defvar lisp-interaction-mode-hook nil + "Hook to run when entering lisp-interaction-mode.") + (defun emacs-lisp-byte-compile () "Byte compile the file containing the current buffer." (interactive)