aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorGlenn Morris2012-09-05 00:05:56 -0700
committerGlenn Morris2012-09-05 00:05:56 -0700
commit7e570fbf3ef8ccd31df2651f5d2775c5697d5950 (patch)
tree2a722a870a0240ded0b1fcffb34f52a1d7d668e3 /lisp/progmodes
parent1a1ecd2b14f38fcd995516a71b49c8810eac5828 (diff)
parentf1220388bca64f31182daacfb2eefcc8053af11a (diff)
downloademacs-7e570fbf3ef8ccd31df2651f5d2775c5697d5950.tar.gz
emacs-7e570fbf3ef8ccd31df2651f5d2775c5697d5950.zip
Merge from emacs-24; up to 2012-05-05T02:50:20Z!monnier@iro.umontreal.ca
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/flymake.el5
-rw-r--r--lisp/progmodes/sh-script.el31
2 files changed, 20 insertions, 16 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index ad285274928..10d5fdf9c64 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -977,6 +977,9 @@ from compile.el")
977;; :type '(repeat (string number number number)) 977;; :type '(repeat (string number number number))
978;;) 978;;)
979 979
980(defvar flymake-warning-re "^[wW]arning"
981 "Regexp matching against err-text to detect a warning.")
982
980(defun flymake-parse-line (line) 983(defun flymake-parse-line (line)
981 "Parse LINE to see if it is an error or warning. 984 "Parse LINE to see if it is an error or warning.
982Return its components if so, nil otherwise." 985Return its components if so, nil otherwise."
@@ -997,7 +1000,7 @@ Return its components if so, nil otherwise."
997 (match-string (nth 4 (car patterns)) line) 1000 (match-string (nth 4 (car patterns)) line)
998 (flymake-patch-err-text (substring line (match-end 0))))) 1001 (flymake-patch-err-text (substring line (match-end 0)))))
999 (or err-text (setq err-text "<no error text>")) 1002 (or err-text (setq err-text "<no error text>"))
1000 (if (and err-text (string-match "^[wW]arning" err-text)) 1003 (if (and err-text (string-match flymake-warning-re err-text))
1001 (setq err-type "w") 1004 (setq err-type "w")
1002 ) 1005 )
1003 (flymake-log 3 "parse line: file-idx=%s line-idx=%s file=%s line=%s text=%s" file-idx line-idx 1006 (flymake-log 3 "parse line: file-idx=%s line-idx=%s file=%s line=%s text=%s" file-idx line-idx
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index a422462775d..b4d550bcee0 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1062,21 +1062,22 @@ subshells can nest."
1062 (backward-char 1)) 1062 (backward-char 1))
1063 (when (eq (char-before) ?|) 1063 (when (eq (char-before) ?|)
1064 (backward-char 1) t))) 1064 (backward-char 1) t)))
1065 (when (progn (backward-char 2) 1065 (and (> (point) (1+ (point-min)))
1066 (if (> start (line-end-position)) 1066 (progn (backward-char 2)
1067 (put-text-property (point) (1+ start) 1067 (if (> start (line-end-position))
1068 'syntax-multiline t)) 1068 (put-text-property (point) (1+ start)
1069 ;; FIXME: The `in' may just be a random argument to 1069 'syntax-multiline t))
1070 ;; a normal command rather than the real `in' keyword. 1070 ;; FIXME: The `in' may just be a random argument to
1071 ;; I.e. we should look back to try and find the 1071 ;; a normal command rather than the real `in' keyword.
1072 ;; corresponding `case'. 1072 ;; I.e. we should look back to try and find the
1073 (and (looking-at ";[;&]\\|\\_<in") 1073 ;; corresponding `case'.
1074 ;; ";; esac )" is a case that looks like a case-pattern 1074 (and (looking-at ";[;&]\\|\\_<in")
1075 ;; but it's really just a close paren after a case 1075 ;; ";; esac )" is a case that looks like a case-pattern
1076 ;; statement. I.e. if we skipped over `esac' just now, 1076 ;; but it's really just a close paren after a case
1077 ;; we're not looking at a case-pattern. 1077 ;; statement. I.e. if we skipped over `esac' just now,
1078 (not (looking-at "..[ \t\n]+esac[^[:word:]_]")))) 1078 ;; we're not looking at a case-pattern.
1079 sh-st-punc)))) 1079 (not (looking-at "..[ \t\n]+esac[^[:word:]_]"))))
1080 sh-st-punc))))
1080 1081
1081(defun sh-font-lock-backslash-quote () 1082(defun sh-font-lock-backslash-quote ()
1082 (if (eq (save-excursion (nth 3 (syntax-ppss (match-beginning 0)))) ?\') 1083 (if (eq (save-excursion (nth 3 (syntax-ppss (match-beginning 0)))) ?\')