Mercurial > emacs
changeset 33200:5323492591dd
(icon-mode-map): Don't rebind \t.
(icon-mode): Define indent-line-function.
(icon-comment-indent): Simplify.
(icon-font-lock-keywords-2): Use the `words' arg to regexp-opt.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 03 Nov 2000 23:05:16 +0000 |
parents | 92f44ab47ab5 |
children | f934d044b019 |
files | lisp/progmodes/icon.el |
diffstat | 1 files changed, 10 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/icon.el Fri Nov 03 22:42:36 2000 +0000 +++ b/lisp/progmodes/icon.el Fri Nov 03 23:05:16 2000 +0000 @@ -46,7 +46,6 @@ (define-key icon-mode-map "\e\C-e" 'end-of-icon-defun) (define-key icon-mode-map "\e\C-q" 'indent-icon-exp) (define-key icon-mode-map "\177" 'backward-delete-char-untabify) - (define-key icon-mode-map "\t" 'icon-indent-command) (define-key icon-mode-map [menu-bar] (make-sparse-keymap "Icon")) (define-key icon-mode-map [menu-bar icon] @@ -187,8 +186,8 @@ (setq comment-start-skip "# *") (make-local-variable 'comment-indent-function) (setq comment-indent-function 'icon-comment-indent) + (set (make-local-variable 'indent-line-function) 'icon-indent-line) ;; font-lock support - (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '((icon-font-lock-keywords icon-font-lock-keywords-1 icon-font-lock-keywords-2) @@ -211,12 +210,7 @@ ;; This is used by indent-for-comment to decide how much to ;; indent a comment in Icon code based on its context. (defun icon-comment-indent () - (if (looking-at "^#") - 0 - (save-excursion - (skip-chars-backward " \t") - (max (if (bolp) 0 (1+ (current-column))) - comment-column)))) + (if (looking-at "^#") 0 comment-column)) (defun electric-icon-brace (arg) "Insert character and correct line's indentation." @@ -624,25 +618,20 @@ (eval-when-compile (list ;; Fontify all type specifiers. - (cons - (concat - "\\<" (regexp-opt '("null" "string" "co-expression" "table" "integer" - "cset" "set" "real" "file" "list") t) - "\\>") + (cons + (regexp-opt '("null" "string" "co-expression" "table" "integer" + "cset" "set" "real" "file" "list") 'words) 'font-lock-type-face) ;; Fontify all keywords. ;; (cons - (concat - "\\<" - (regexp-opt - '("break" "do" "next" "repeat" "to" "by" "else" "if" "not" "return" - "until" "case" "of" "while" "create" "every" "suspend" "default" - "fail" "record" "then") t) - "\\>") + (regexp-opt + '("break" "do" "next" "repeat" "to" "by" "else" "if" "not" "return" + "until" "case" "of" "while" "create" "every" "suspend" "default" + "fail" "record" "then") 'words) 'font-lock-keyword-face) ;; "end" "initial" - (cons (concat "\\<" (regexp-opt '("end" "initial") t) "\\>") + (cons (regexp-opt '("end" "initial") 'words) 'font-lock-builtin-face) ;; Fontify all system variables. (cons