# HG changeset patch # User Stefan Monnier # Date 973292716 0 # Node ID 5323492591dd7590cb6b8fc20c0ac5a8c5a07bcb # Parent 92f44ab47ab522b358fed23d84e16e143ad2486e (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. diff -r 92f44ab47ab5 -r 5323492591dd lisp/progmodes/icon.el --- 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