aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2001-10-26 13:54:45 +0000
committerSam Steingold2001-10-26 13:54:45 +0000
commit187cd25bb00b7d0a1cbd76556b7a87b1eca3039f (patch)
tree7fc7675a1693d4490bf7d2f74d6d4abb4fb01e62
parent035107fa9cbb1b0b2f53b5a4623b9f4cbfc61544 (diff)
downloademacs-187cd25bb00b7d0a1cbd76556b7a87b1eca3039f.tar.gz
emacs-187cd25bb00b7d0a1cbd76556b7a87b1eca3039f.zip
(sh-font-lock-close-heredoc): check the args for being non-nil
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/progmodes/sh-script.el5
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c61548b5a6c..abd2605c98f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12001-10-26 Sam Steingold <sds@gnu.org>
2
3 * progmodes/sh-script.el (sh-font-lock-syntactic-keywords):
4 Protect the /= test by checking that the args are non-nil.
5 (sh-font-lock-close-heredoc): check eof for being non-nil.
6
12001-10-26 Tomas Abrahamsson <tab@lysator.liu.se> 72001-10-26 Tomas Abrahamsson <tab@lysator.liu.se>
2 8
3 * textmodes/artist.el (artist-version): 1.2.4. 9 * textmodes/artist.el (artist-version): 1.2.4.
@@ -25,7 +31,7 @@
25 `eval'. 31 `eval'.
26 (numerous places): Add back-tick and tick around names in 32 (numerous places): Add back-tick and tick around names in
27 docstrings, fix punctuation in docstrings, remove trailing spaces. 33 docstrings, fix punctuation in docstrings, remove trailing spaces.
28 34
292001-10-25 Sam Steingold <sds@gnu.org> 352001-10-25 Sam Steingold <sds@gnu.org>
30 36
31 * add-log.el (add-log-always-start-new-record): New user option. 37 * add-log.el (add-log-always-start-new-record): New user option.
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 8c05826d7f4..a3b95231774 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -828,7 +828,7 @@ See `sh-feature'.")
828(defun sh-font-lock-close-heredoc (bol eof indented) 828(defun sh-font-lock-close-heredoc (bol eof indented)
829 "Determine the syntax of the \\n after an EOF. 829 "Determine the syntax of the \\n after an EOF.
830If non-nil INDENTED indicates that the EOF was indented." 830If non-nil INDENTED indicates that the EOF was indented."
831 (let* ((eof-re (regexp-quote eof)) 831 (let* ((eof-re (if eof (regexp-quote eof) ""))
832 ;; A rough regexp that should find the opening <<EOF back. 832 ;; A rough regexp that should find the opening <<EOF back.
833 (sre (concat "<<\\(-?\\)\\s-*['\"\\]?" 833 (sre (concat "<<\\(-?\\)\\s-*['\"\\]?"
834 ;; Use \s| to cheaply check it's an open-heredoc. 834 ;; Use \s| to cheaply check it's an open-heredoc.
@@ -921,7 +921,8 @@ be indented (i.e. a <<- was used rather than just <<)."
921 (match-beginning 0) (match-string 1)) nil t) 921 (match-beginning 0) (match-string 1)) nil t)
922 (5 (sh-font-lock-close-heredoc 922 (5 (sh-font-lock-close-heredoc
923 (match-beginning 0) (match-string 4) 923 (match-beginning 0) (match-string 4)
924 (/= (match-beginning 3) (match-end 3))) nil t)) 924 (and (match-beginning 3) (/= (match-beginning 3) (match-end 3))))
925 nil t))
925 ;; Distinguish the special close-paren in `case'. 926 ;; Distinguish the special close-paren in `case'.
926 (")" 0 (sh-font-lock-paren (match-beginning 0))))) 927 (")" 0 (sh-font-lock-paren (match-beginning 0)))))
927 928