diff options
| -rw-r--r-- | lisp/progmodes/icon.el | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index fa0b9266bc0..ccebcb3789b 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el | |||
| @@ -126,7 +126,7 @@ when the TAB command is used." | |||
| 126 | :group 'icon) | 126 | :group 'icon) |
| 127 | 127 | ||
| 128 | (defvar icon-imenu-generic-expression | 128 | (defvar icon-imenu-generic-expression |
| 129 | '((nil "^[ \t]*procedure[ \t]*\\(\\sw+\\)[ \t]*(" 1)) | 129 | '((nil "^[ \t]*procedure[ \t]+\\(\\sw+\\)[ \t]*(" 1)) |
| 130 | "Imenu expression for Icon mode. See `imenu-generic-expression'.") | 130 | "Imenu expression for Icon mode. See `imenu-generic-expression'.") |
| 131 | 131 | ||
| 132 | 132 | ||
| @@ -193,20 +193,21 @@ with no args, if that value is non-nil." | |||
| 193 | (make-local-variable 'font-lock-defaults) | 193 | (make-local-variable 'font-lock-defaults) |
| 194 | (setq font-lock-defaults | 194 | (setq font-lock-defaults |
| 195 | '((icon-font-lock-keywords | 195 | '((icon-font-lock-keywords |
| 196 | icon-font-lock-keywords-1 | 196 | icon-font-lock-keywords-1 icon-font-lock-keywords-2) |
| 197 | icon-font-lock-keywords-2 | ||
| 198 | ) | ||
| 199 | nil nil ((?_ . "w")) beginning-of-defun | 197 | nil nil ((?_ . "w")) beginning-of-defun |
| 200 | (font-lock-comment-start-regexp . "#") | 198 | ;; Obsoleted by Emacs 19.35 parse-partial-sexp's COMMENTSTOP. |
| 199 | ;(font-lock-comment-start-regexp . "#") | ||
| 201 | (font-lock-mark-block-function . mark-defun))) | 200 | (font-lock-mark-block-function . mark-defun))) |
| 202 | ;; imenu support | 201 | ;; imenu support |
| 203 | (make-local-variable 'imenu-generic-expression) | 202 | (make-local-variable 'imenu-generic-expression) |
| 204 | (setq imenu-generic-expression icon-imenu-generic-expression) | 203 | (setq imenu-generic-expression icon-imenu-generic-expression) |
| 205 | ;; hideshow support | 204 | ;; hideshow support |
| 206 | ;; we start from the assertion that `hs-special-modes-alist' is autoloaded. | 205 | ;; we start from the assertion that `hs-special-modes-alist' is autoloaded. |
| 207 | (pushnew '(icon-mode "\\<procedure\\>" "\\<end\\>" nil | 206 | (unless (assq 'icon-mode hs-special-modes-alist) |
| 208 | icon-forward-sexp-function) | 207 | (setq hs-special-modes-alist |
| 209 | hs-special-modes-alist :test 'equal) | 208 | (cons '(icon-mode "\\<procedure\\>" "\\<end\\>" nil |
| 209 | icon-forward-sexp-function) | ||
| 210 | hs-special-modes-alist))) | ||
| 210 | (run-hooks 'icon-mode-hook)) | 211 | (run-hooks 'icon-mode-hook)) |
| 211 | 212 | ||
| 212 | ;; This is used by indent-for-comment to decide how much to | 213 | ;; This is used by indent-for-comment to decide how much to |
| @@ -619,7 +620,7 @@ Returns nil if line starts inside a string, t if in a comment." | |||
| 619 | ;; Fontify procedure name definitions. | 620 | ;; Fontify procedure name definitions. |
| 620 | '("^[ \t]*\\(procedure\\)[ \t]*\\(\\sw+\\)[ \t]*(" | 621 | '("^[ \t]*\\(procedure\\)[ \t]*\\(\\sw+\\)[ \t]*(" |
| 621 | (1 font-lock-builtin-face) (2 font-lock-function-name-face nil t)))) | 622 | (1 font-lock-builtin-face) (2 font-lock-function-name-face nil t)))) |
| 622 | "Subdued level highlighting for `icon-mode'.") | 623 | "Subdued level highlighting for Icon mode.") |
| 623 | 624 | ||
| 624 | (defconst icon-font-lock-keywords-2 | 625 | (defconst icon-font-lock-keywords-2 |
| 625 | (append | 626 | (append |
| @@ -674,10 +675,9 @@ Returns nil if line starts inside a string, t if in a comment." | |||
| 674 | font-lock-variable-name-face))))) | 675 | font-lock-variable-name-face))))) |
| 675 | 676 | ||
| 676 | (cons ;; $define $elif $ifdef $ifdef $ifndef | 677 | (cons ;; $define $elif $ifdef $ifdef $ifndef |
| 677 | (concat | 678 | (concat "^" |
| 678 | "^" | 679 | (regexp-opt'("$define" "$elif" "$ifdef" "$ifndef" "$undef") t) |
| 679 | (regexp-opt'("$define" "$elif" "$ifdef" "$ifdef" "$ifndef" "$undef") t) | 680 | "\\>[ \t]*\\([^ \t\n]+\\)?") |
| 680 | "[ \t]+\\([^ \t\n]+\\)") | ||
| 681 | '((1 font-lock-builtin-face) | 681 | '((1 font-lock-builtin-face) |
| 682 | (4 font-lock-variable-name-face nil t))) | 682 | (4 font-lock-variable-name-face nil t))) |
| 683 | (cons ;; $dump $endif $else $include | 683 | (cons ;; $dump $endif $else $include |
| @@ -685,9 +685,10 @@ Returns nil if line starts inside a string, t if in a comment." | |||
| 685 | "^" (regexp-opt'("$dump" "$endif" "$else" "$include") t) "\\>" ) | 685 | "^" (regexp-opt'("$dump" "$endif" "$else" "$include") t) "\\>" ) |
| 686 | 'font-lock-builtin-face) | 686 | 'font-lock-builtin-face) |
| 687 | (cons ;; $warning $error | 687 | (cons ;; $warning $error |
| 688 | (concat "^" (regexp-opt '("$warning" "$error") t) "[ \t]+\\([^\n]+\\)") | 688 | (concat "^" (regexp-opt '("$warning" "$error") t) |
| 689 | '((1 font-lock-builtin-face) (3 font-lock-warning-face nil t)))))) | 689 | "\\>[ \t]*\\(.+\\)?") |
| 690 | "Gaudy level highlighting for `icon-mode'.") | 690 | '((1 font-lock-builtin-face) (3 font-lock-warning-face nil t)))))) |
| 691 | "Gaudy level highlighting for Icon mode.") | ||
| 691 | 692 | ||
| 692 | (defvar icon-font-lock-keywords icon-font-lock-keywords-1 | 693 | (defvar icon-font-lock-keywords icon-font-lock-keywords-1 |
| 693 | "Default expressions to highlight in `icon-mode'.") | 694 | "Default expressions to highlight in `icon-mode'.") |