aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorMiles Bader2006-08-16 14:08:49 +0000
committerMiles Bader2006-08-16 14:08:49 +0000
commitde20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65 (patch)
tree80243ce02b52cbf7945c614bd213dd63142b861a /lisp/progmodes
parent7a5c2a42040b12b037940a067aee6ac6fde01680 (diff)
parent5ebdc2990a95cc38b21f772eea4de3ceee149e54 (diff)
downloademacs-de20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65.tar.gz
emacs-de20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 382-398) - Update from CVS - Update from erc--emacs--22 - Fix ERC bug introduced in last patch - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 123-125) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-101
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/gdb-ui.el170
-rw-r--r--lisp/progmodes/gud.el10
-rw-r--r--lisp/progmodes/sh-script.el13
3 files changed, 113 insertions, 80 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index e6c6380bf88..b5334ba5bc5 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -115,6 +115,7 @@ address for root variables.")
115(defvar gdb-main-file nil "Source file from which program execution begins.") 115(defvar gdb-main-file nil "Source file from which program execution begins.")
116(defvar gud-old-arrow nil) 116(defvar gud-old-arrow nil)
117(defvar gdb-overlay-arrow-position nil) 117(defvar gdb-overlay-arrow-position nil)
118(defvar gdb-stack-position nil)
118(defvar gdb-server-prefix nil) 119(defvar gdb-server-prefix nil)
119(defvar gdb-flush-pending-output nil) 120(defvar gdb-flush-pending-output nil)
120(defvar gdb-location-alist nil 121(defvar gdb-location-alist nil
@@ -321,7 +322,7 @@ of the inferior. Non-nil means display the layout shown for
321 :version "22.1") 322 :version "22.1")
322 323
323(defcustom gdb-use-separate-io-buffer nil 324(defcustom gdb-use-separate-io-buffer nil
324 "Non-nil means display output from the inferior in a separate buffer." 325 "Non-nil means display output from the debugged program in a separate buffer."
325 :type 'boolean 326 :type 'boolean
326 :group 'gud 327 :group 'gud
327 :version "22.1") 328 :version "22.1")
@@ -353,14 +354,14 @@ With arg, display additional buffers iff arg is positive."
353 (error nil)))) 354 (error nil))))
354 355
355(defun gdb-use-separate-io-buffer (arg) 356(defun gdb-use-separate-io-buffer (arg)
356 "Toggle separate IO for inferior. 357 "Toggle separate IO for debugged program.
357With arg, use separate IO iff arg is positive." 358With arg, use separate IO iff arg is positive."
358 (interactive "P") 359 (interactive "P")
359 (setq gdb-use-separate-io-buffer 360 (setq gdb-use-separate-io-buffer
360 (if (null arg) 361 (if (null arg)
361 (not gdb-use-separate-io-buffer) 362 (not gdb-use-separate-io-buffer)
362 (> (prefix-numeric-value arg) 0))) 363 (> (prefix-numeric-value arg) 0)))
363 (message (format "Separate inferior IO %sabled" 364 (message (format "Separate IO %sabled"
364 (if gdb-use-separate-io-buffer "en" "dis"))) 365 (if gdb-use-separate-io-buffer "en" "dis")))
365 (if (and gud-comint-buffer 366 (if (and gud-comint-buffer
366 (buffer-name gud-comint-buffer)) 367 (buffer-name gud-comint-buffer))
@@ -1030,7 +1031,7 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'."
1030 (minibuffer . nil))) 1031 (minibuffer . nil)))
1031 1032
1032(defun gdb-frame-separate-io-buffer () 1033(defun gdb-frame-separate-io-buffer ()
1033 "Display IO of inferior in a new frame." 1034 "Display IO of debugged program in a new frame."
1034 (interactive) 1035 (interactive)
1035 (if gdb-use-separate-io-buffer 1036 (if gdb-use-separate-io-buffer
1036 (let ((special-display-regexps (append special-display-regexps '(".*"))) 1037 (let ((special-display-regexps (append special-display-regexps '(".*")))
@@ -1296,6 +1297,7 @@ not GDB."
1296 (setq gud-old-arrow gud-overlay-arrow-position) 1297 (setq gud-old-arrow gud-overlay-arrow-position)
1297 (setq gud-overlay-arrow-position nil) 1298 (setq gud-overlay-arrow-position nil)
1298 (setq gdb-overlay-arrow-position nil) 1299 (setq gdb-overlay-arrow-position nil)
1300 (setq gdb-stack-position nil)
1299 (if gdb-use-separate-io-buffer 1301 (if gdb-use-separate-io-buffer
1300 (setq gdb-output-sink 'inferior)))) 1302 (setq gdb-output-sink 'inferior))))
1301 (t 1303 (t
@@ -1330,6 +1332,7 @@ directives."
1330 (setq gdb-active-process nil) 1332 (setq gdb-active-process nil)
1331 (setq gud-overlay-arrow-position nil) 1333 (setq gud-overlay-arrow-position nil)
1332 (setq gdb-overlay-arrow-position nil) 1334 (setq gdb-overlay-arrow-position nil)
1335 (setq gdb-stack-position nil)
1333 (setq gud-old-arrow nil) 1336 (setq gud-old-arrow nil)
1334 (setq gdb-inferior-status "exited") 1337 (setq gdb-inferior-status "exited")
1335 (gdb-force-mode-line-update 1338 (gdb-force-mode-line-update
@@ -1776,9 +1779,8 @@ static char *magick[] = {
1776 (goto-char (point-min)) 1779 (goto-char (point-min))
1777 (while (< (point) (- (point-max) 1)) 1780 (while (< (point) (- (point-max) 1))
1778 (forward-line 1) 1781 (forward-line 1)
1779 (if (looking-at "[^\t].*?breakpoint") 1782 (if (looking-at gdb-breakpoint-regexp)
1780 (progn 1783 (progn
1781 (looking-at "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)")
1782 (setq bptno (match-string 1)) 1784 (setq bptno (match-string 1))
1783 (setq flag (char-after (match-beginning 2))) 1785 (setq flag (char-after (match-beginning 2)))
1784 (add-text-properties 1786 (add-text-properties
@@ -1786,43 +1788,55 @@ static char *magick[] = {
1786 (if (eq flag ?y) 1788 (if (eq flag ?y)
1787 '(face font-lock-warning-face) 1789 '(face font-lock-warning-face)
1788 '(face font-lock-type-face))) 1790 '(face font-lock-type-face)))
1789 (beginning-of-line) 1791 (let ((bl (point))
1790 (if (re-search-forward " in \\(.*\\) at\\s-+" nil t) 1792 (el (line-end-position)))
1791 (progn 1793 (if (re-search-forward " in \\(.*\\) at\\s-+" el t)
1794 (progn
1795 (add-text-properties
1796 (match-beginning 1) (match-end 1)
1797 '(face font-lock-function-name-face))
1798 (looking-at "\\(\\S-+\\):\\([0-9]+\\)")
1799 (let ((line (match-string 2))
1800 (file (match-string 1)))
1801 (add-text-properties bl el
1802 '(mouse-face highlight
1803 help-echo "mouse-2, RET: visit breakpoint"))
1804 (unless (file-exists-p file)
1805 (setq file (cdr (assoc bptno gdb-location-alist))))
1806 (if (and file
1807 (not (string-equal file "File not found")))
1808 (with-current-buffer
1809 (find-file-noselect file 'nowarn)
1810 (set (make-local-variable 'gud-minor-mode)
1811 'gdba)
1812 (set (make-local-variable 'tool-bar-map)
1813 gud-tool-bar-map)
1814 ;; Only want one breakpoint icon at each
1815 ;; location.
1816 (save-excursion
1817 (goto-line (string-to-number line))
1818 (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
1819 (gdb-enqueue-input
1820 (list
1821 (concat gdb-server-prefix "list "
1822 (match-string-no-properties 1) ":1\n")
1823 'ignore))
1824 (gdb-enqueue-input
1825 (list (concat gdb-server-prefix "info source\n")
1826 `(lambda () (gdb-get-location
1827 ,bptno ,line ,flag)))))))
1828 (if (re-search-forward
1829 "<\\(\\(\\sw\\|[_.]\\)+\\)\\(\\+[0-9]+\\)?>"
1830 el t)
1831 (add-text-properties
1832 (match-beginning 1) (match-end 1)
1833 '(face font-lock-function-name-face))
1834 (end-of-line)
1835 (re-search-backward "\\s-\\(\\S-*\\)"
1836 bl t)
1792 (add-text-properties 1837 (add-text-properties
1793 (match-beginning 1) (match-end 1) 1838 (match-beginning 1) (match-end 1)
1794 '(face font-lock-function-name-face)) 1839 '(face font-lock-variable-name-face)))))))
1795 (looking-at "\\(\\S-+\\):\\([0-9]+\\)")
1796 (let ((line (match-string 2))
1797 (file (match-string 1)))
1798 (add-text-properties (line-beginning-position)
1799 (line-end-position)
1800 '(mouse-face highlight
1801 help-echo "mouse-2, RET: visit breakpoint"))
1802 (unless (file-exists-p file)
1803 (setq file (cdr (assoc bptno gdb-location-alist))))
1804 (if (and file
1805 (not (string-equal file "File not found")))
1806 (with-current-buffer
1807 (find-file-noselect file 'nowarn)
1808 (set (make-local-variable 'gud-minor-mode)
1809 'gdba)
1810 (set (make-local-variable 'tool-bar-map)
1811 gud-tool-bar-map)
1812 ;; Only want one breakpoint icon at each
1813 ;; location.
1814 (save-excursion
1815 (goto-line (string-to-number line))
1816 (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
1817 (gdb-enqueue-input
1818 (list
1819 (concat gdb-server-prefix "list "
1820 (match-string-no-properties 1) ":1\n")
1821 'ignore))
1822 (gdb-enqueue-input
1823 (list (concat gdb-server-prefix "info source\n")
1824 `(lambda () (gdb-get-location
1825 ,bptno ,line ,flag))))))))))
1826 (end-of-line)))))) 1840 (end-of-line))))))
1827 (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom))) 1841 (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
1828 1842
@@ -2026,8 +2040,14 @@ static char *magick[] = {
2026 (goto-char bl) 2040 (goto-char bl)
2027 (when (looking-at "^#\\([0-9]+\\)") 2041 (when (looking-at "^#\\([0-9]+\\)")
2028 (when (string-equal (match-string 1) gdb-frame-number) 2042 (when (string-equal (match-string 1) gdb-frame-number)
2029 (put-text-property bl (+ bl 4) 2043 (if (> (car (window-fringes)) 0)
2030 'face '(:inverse-video t))) 2044 (progn
2045 (or gdb-stack-position
2046 (setq gdb-stack-position (make-marker)))
2047 (set-marker gdb-stack-position (point)))
2048 (set-marker gdb-stack-position nil)
2049 (put-text-property bl (+ bl 4)
2050 'face '(:inverse-video t))))
2031 (when (re-search-forward 2051 (when (re-search-forward
2032 (concat 2052 (concat
2033 (if (string-equal (match-string 1) "0") "" " in ") 2053 (if (string-equal (match-string 1) "0") "" " in ")
@@ -2098,6 +2118,8 @@ static char *magick[] = {
2098 (kill-all-local-variables) 2118 (kill-all-local-variables)
2099 (setq major-mode 'gdb-frames-mode) 2119 (setq major-mode 'gdb-frames-mode)
2100 (setq mode-name "Frames") 2120 (setq mode-name "Frames")
2121 (setq gdb-stack-position nil)
2122 (add-to-list 'overlay-arrow-variable-list 'gdb-stack-position)
2101 (setq buffer-read-only t) 2123 (setq buffer-read-only t)
2102 (use-local-map gdb-frames-mode-map) 2124 (use-local-map gdb-frames-mode-map)
2103 (run-mode-hooks 'gdb-frames-mode-hook) 2125 (run-mode-hooks 'gdb-frames-mode-hook)
@@ -2549,18 +2571,18 @@ corresponding to the mode line clicked."
2549 'local-map 2571 'local-map
2550 (gdb-make-header-line-mouse-map 2572 (gdb-make-header-line-mouse-map
2551 'mouse-1 2573 'mouse-1
2552 #'(lambda () (interactive) 2574 (lambda () (interactive)
2553 (let ((gdb-memory-address 2575 (let ((gdb-memory-address
2554 ;; Let GDB do the arithmetic. 2576 ;; Let GDB do the arithmetic.
2555 (concat 2577 (concat
2556 gdb-memory-address " - " 2578 gdb-memory-address " - "
2557 (number-to-string 2579 (number-to-string
2558 (* gdb-memory-repeat-count 2580 (* gdb-memory-repeat-count
2559 (cond ((string= gdb-memory-unit "b") 1) 2581 (cond ((string= gdb-memory-unit "b") 1)
2560 ((string= gdb-memory-unit "h") 2) 2582 ((string= gdb-memory-unit "h") 2)
2561 ((string= gdb-memory-unit "w") 4) 2583 ((string= gdb-memory-unit "w") 4)
2562 ((string= gdb-memory-unit "g") 8))))))) 2584 ((string= gdb-memory-unit "g") 8)))))))
2563 (gdb-invalidate-memory))))) 2585 (gdb-invalidate-memory)))))
2564 "|" 2586 "|"
2565 (propertize "+" 2587 (propertize "+"
2566 'face font-lock-warning-face 2588 'face font-lock-warning-face
@@ -2568,9 +2590,9 @@ corresponding to the mode line clicked."
2568 'mouse-face 'mode-line-highlight 2590 'mouse-face 'mode-line-highlight
2569 'local-map (gdb-make-header-line-mouse-map 2591 'local-map (gdb-make-header-line-mouse-map
2570 'mouse-1 2592 'mouse-1
2571 #'(lambda () (interactive) 2593 (lambda () (interactive)
2572 (let ((gdb-memory-address nil)) 2594 (let ((gdb-memory-address nil))
2573 (gdb-invalidate-memory))))) 2595 (gdb-invalidate-memory)))))
2574 "]: " 2596 "]: "
2575 (propertize gdb-memory-address 2597 (propertize gdb-memory-address
2576 'face font-lock-warning-face 2598 'face font-lock-warning-face
@@ -2635,13 +2657,13 @@ corresponding to the mode line clicked."
2635 2657
2636(defvar gdb-locals-watch-map 2658(defvar gdb-locals-watch-map
2637 (let ((map (make-sparse-keymap))) 2659 (let ((map (make-sparse-keymap)))
2638 (define-key map "\r" '(lambda () (interactive) 2660 (define-key map "\r" (lambda () (interactive)
2639 (beginning-of-line) 2661 (beginning-of-line)
2640 (gud-watch))) 2662 (gud-watch)))
2641 (define-key map [mouse-2] '(lambda (event) (interactive "e") 2663 (define-key map [mouse-2] (lambda (event) (interactive "e")
2642 (mouse-set-point event) 2664 (mouse-set-point event)
2643 (beginning-of-line) 2665 (beginning-of-line)
2644 (gud-watch))) 2666 (gud-watch)))
2645 map) 2667 map)
2646 "Keymap to create watch expression of a complex data type local variable.") 2668 "Keymap to create watch expression of a complex data type local variable.")
2647 2669
@@ -2764,7 +2786,7 @@ corresponding to the mode line clicked."
2764 (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer)) 2786 (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer))
2765 (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) 2787 (define-key menu [threads] '("Threads" . gdb-display-threads-buffer))
2766 (define-key menu [inferior] 2788 (define-key menu [inferior]
2767 '(menu-item "Inferior IO" gdb-display-separate-io-buffer 2789 '(menu-item "Separate IO" gdb-display-separate-io-buffer
2768 :enable gdb-use-separate-io-buffer)) 2790 :enable gdb-use-separate-io-buffer))
2769 (define-key menu [memory] '("Memory" . gdb-display-memory-buffer)) 2791 (define-key menu [memory] '("Memory" . gdb-display-memory-buffer))
2770 (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) 2792 (define-key menu [registers] '("Registers" . gdb-display-registers-buffer))
@@ -2783,7 +2805,7 @@ corresponding to the mode line clicked."
2783 (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) 2805 (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer))
2784 (define-key menu [memory] '("Memory" . gdb-frame-memory-buffer)) 2806 (define-key menu [memory] '("Memory" . gdb-frame-memory-buffer))
2785 (define-key menu [inferior] 2807 (define-key menu [inferior]
2786 '(menu-item "Inferior IO" gdb-frame-separate-io-buffer 2808 '(menu-item "Separate IO" gdb-frame-separate-io-buffer
2787 :enable gdb-use-separate-io-buffer)) 2809 :enable gdb-use-separate-io-buffer))
2788 (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) 2810 (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer))
2789 (define-key menu [disassembly] '("Disassembly" . gdb-frame-assembler-buffer)) 2811 (define-key menu [disassembly] '("Disassembly" . gdb-frame-assembler-buffer))
@@ -2802,9 +2824,9 @@ corresponding to the mode line clicked."
2802 :help "Toggle look for source frame." 2824 :help "Toggle look for source frame."
2803 :button (:toggle . gdb-find-source-frame))) 2825 :button (:toggle . gdb-find-source-frame)))
2804 (define-key menu [gdb-use-separate-io] 2826 (define-key menu [gdb-use-separate-io]
2805 '(menu-item "Separate Inferior IO" gdb-use-separate-io-buffer 2827 '(menu-item "Separate IO" gdb-use-separate-io-buffer
2806 :visible (eq gud-minor-mode 'gdba) 2828 :visible (eq gud-minor-mode 'gdba)
2807 :help "Toggle separate IO for inferior." 2829 :help "Toggle separate IO for debugged program."
2808 :button (:toggle . gdb-use-separate-io-buffer))) 2830 :button (:toggle . gdb-use-separate-io-buffer)))
2809 (define-key menu [gdb-many-windows] 2831 (define-key menu [gdb-many-windows]
2810 '(menu-item "Display Other Windows" gdb-many-windows 2832 '(menu-item "Display Other Windows" gdb-many-windows
@@ -2901,12 +2923,13 @@ Kills the gdb buffers, and resets variables and the source buffers."
2901 (setq gud-minor-mode nil) 2923 (setq gud-minor-mode nil)
2902 (kill-local-variable 'tool-bar-map) 2924 (kill-local-variable 'tool-bar-map)
2903 (kill-local-variable 'gdb-define-alist)))))) 2925 (kill-local-variable 'gdb-define-alist))))))
2904 (when (markerp gdb-overlay-arrow-position) 2926 (setq gdb-overlay-arrow-position nil)
2905 (move-marker gdb-overlay-arrow-position nil)
2906 (setq gdb-overlay-arrow-position nil))
2907 (setq overlay-arrow-variable-list 2927 (setq overlay-arrow-variable-list
2908 (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list)) 2928 (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list))
2909 (setq fringe-indicator-alist '((overlay-arrow . right-triangle))) 2929 (setq fringe-indicator-alist '((overlay-arrow . right-triangle)))
2930 (setq gdb-stack-position nil)
2931 (setq overlay-arrow-variable-list
2932 (delq 'gdb-stack-position overlay-arrow-variable-list))
2910 (if (boundp 'speedbar-frame) (speedbar-timer-fn)) 2933 (if (boundp 'speedbar-frame) (speedbar-timer-fn))
2911 (setq gud-running nil) 2934 (setq gud-running nil)
2912 (setq gdb-active-process nil) 2935 (setq gdb-active-process nil)
@@ -3128,8 +3151,7 @@ BUFFER nil or omitted means use the current buffer."
3128 '((overlay-arrow . hollow-right-triangle)))) 3151 '((overlay-arrow . hollow-right-triangle))))
3129 (or gdb-overlay-arrow-position 3152 (or gdb-overlay-arrow-position
3130 (setq gdb-overlay-arrow-position (make-marker))) 3153 (setq gdb-overlay-arrow-position (make-marker)))
3131 (set-marker gdb-overlay-arrow-position 3154 (set-marker gdb-overlay-arrow-position (point))))))
3132 (point) (current-buffer))))))
3133 ;; remove all breakpoint-icons in assembler buffer before updating. 3155 ;; remove all breakpoint-icons in assembler buffer before updating.
3134 (gdb-remove-breakpoint-icons (point-min) (point-max)))) 3156 (gdb-remove-breakpoint-icons (point-min) (point-max))))
3135 (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) 3157 (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 97e54135a6f..84b40e8ba80 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -3180,7 +3180,15 @@ class of the file (using s to separate nested class ids)."
3180(defvar gdb-script-font-lock-syntactic-keywords 3180(defvar gdb-script-font-lock-syntactic-keywords
3181 '(("^document\\s-.*\\(\n\\)" (1 "< b")) 3181 '(("^document\\s-.*\\(\n\\)" (1 "< b"))
3182 ;; It would be best to change the \n in front, but it's more difficult. 3182 ;; It would be best to change the \n in front, but it's more difficult.
3183 ("^en\\(d\\)\\>" (1 "> b")))) 3183 ("^end\\>"
3184 (0 (progn
3185 (unless (eq (match-beginning 0) (point-min))
3186 (put-text-property (1- (match-beginning 0)) (match-beginning 0)
3187 'syntax-table (eval-when-compile
3188 (string-to-syntax "> b")))
3189 (put-text-property (1- (match-beginning 0)) (match-end 0)
3190 'font-lock-multiline t)
3191 nil))))))
3184 3192
3185(defun gdb-script-font-lock-syntactic-face (state) 3193(defun gdb-script-font-lock-syntactic-face (state)
3186 (cond 3194 (cond
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index f748bb4b040..a08f999f089 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -986,7 +986,9 @@ subshells can nest."
986 ;; FIXME: This can (and often does) match multiple lines, yet it makes no 986 ;; FIXME: This can (and often does) match multiple lines, yet it makes no
987 ;; effort to handle multiline cases correctly, so it ends up being 987 ;; effort to handle multiline cases correctly, so it ends up being
988 ;; rather flakey. 988 ;; rather flakey.
989 (when (re-search-forward "\"\\(?:\\(?:.\\|\n\\)*?[^\\]\\(?:\\\\\\\\\\)*\\)??\\(\\$(\\|`\\)" limit t) 989 (when (and (re-search-forward "\"\\(?:\\(?:.\\|\n\\)*?[^\\]\\(?:\\\\\\\\\\)*\\)??\\(\\$(\\|`\\)" limit t)
990 ;; Make sure the " we matched is an opening quote.
991 (eq ?\" (nth 3 (syntax-ppss))))
990 ;; bingo we have a $( or a ` inside a "" 992 ;; bingo we have a $( or a ` inside a ""
991 (let ((char (char-after (point))) 993 (let ((char (char-after (point)))
992 (continue t) 994 (continue t)
@@ -1081,9 +1083,6 @@ This is used to flag quote characters in subshell constructs inside strings
1081 ("\\(\\\\\\)'" 1 ,sh-st-punc) 1083 ("\\(\\\\\\)'" 1 ,sh-st-punc)
1082 ;; Make sure $@ and @? are correctly recognized as sexps. 1084 ;; Make sure $@ and @? are correctly recognized as sexps.
1083 ("\\$\\([?@]\\)" 1 ,sh-st-symbol) 1085 ("\\$\\([?@]\\)" 1 ,sh-st-symbol)
1084 ;; highlight (possibly nested) subshells inside "" quoted regions correctly.
1085 (sh-quoted-subshell
1086 (1 (sh-apply-quoted-subshell) t t))
1087 ;; Find HEREDOC starters and add a corresponding rule for the ender. 1086 ;; Find HEREDOC starters and add a corresponding rule for the ender.
1088 (sh-font-lock-here-doc 1087 (sh-font-lock-here-doc
1089 (2 (sh-font-lock-open-heredoc 1088 (2 (sh-font-lock-open-heredoc
@@ -1093,7 +1092,11 @@ This is used to flag quote characters in subshell constructs inside strings
1093 (and (match-beginning 3) (/= (match-beginning 3) (match-end 3)))) 1092 (and (match-beginning 3) (/= (match-beginning 3) (match-end 3))))
1094 nil t)) 1093 nil t))
1095 ;; Distinguish the special close-paren in `case'. 1094 ;; Distinguish the special close-paren in `case'.
1096 (")" 0 (sh-font-lock-paren (match-beginning 0))))) 1095 (")" 0 (sh-font-lock-paren (match-beginning 0)))
1096 ;; highlight (possibly nested) subshells inside "" quoted regions correctly.
1097 ;; This should be at the very end because it uses syntax-ppss.
1098 (sh-quoted-subshell
1099 (1 (sh-apply-quoted-subshell) t t))))
1097 1100
1098(defun sh-font-lock-syntactic-face-function (state) 1101(defun sh-font-lock-syntactic-face-function (state)
1099 (let ((q (nth 3 state))) 1102 (let ((q (nth 3 state)))