/[emacs]/emacs/lisp/progmodes/icon.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/icon.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by monnier, Fri Nov 3 23:05:16 2000 UTC revision 1.25.18.1 by miles, Fri Apr 4 06:20:32 2003 UTC
# Line 46  Line 46 
46      (define-key icon-mode-map "\e\C-e" 'end-of-icon-defun)      (define-key icon-mode-map "\e\C-e" 'end-of-icon-defun)
47      (define-key icon-mode-map "\e\C-q" 'indent-icon-exp)      (define-key icon-mode-map "\e\C-q" 'indent-icon-exp)
48      (define-key icon-mode-map "\177" 'backward-delete-char-untabify)      (define-key icon-mode-map "\177" 'backward-delete-char-untabify)
49      
50      (define-key icon-mode-map [menu-bar] (make-sparse-keymap "Icon"))      (define-key icon-mode-map [menu-bar] (make-sparse-keymap "Icon"))
51      (define-key icon-mode-map [menu-bar icon]      (define-key icon-mode-map [menu-bar icon]
52        (cons "Icon" map))        (cons "Icon" map))
# Line 188  with no args, if that value is non-nil." Line 188  with no args, if that value is non-nil."
188    (setq comment-indent-function 'icon-comment-indent)    (setq comment-indent-function 'icon-comment-indent)
189    (set (make-local-variable 'indent-line-function) 'icon-indent-line)    (set (make-local-variable 'indent-line-function) 'icon-indent-line)
190    ;; font-lock support    ;; font-lock support
191    (setq font-lock-defaults      (setq font-lock-defaults
192          '((icon-font-lock-keywords          '((icon-font-lock-keywords
193             icon-font-lock-keywords-1 icon-font-lock-keywords-2)             icon-font-lock-keywords-1 icon-font-lock-keywords-2)
194            nil nil ((?_ . "w")) beginning-of-defun            nil nil ((?_ . "w")) beginning-of-defun
# Line 202  with no args, if that value is non-nil." Line 202  with no args, if that value is non-nil."
202    ;; we start from the assertion that `hs-special-modes-alist' is autoloaded.    ;; we start from the assertion that `hs-special-modes-alist' is autoloaded.
203    (unless (assq 'icon-mode hs-special-modes-alist)    (unless (assq 'icon-mode hs-special-modes-alist)
204      (setq hs-special-modes-alist      (setq hs-special-modes-alist
205            (cons '(icon-mode  "\\<procedure\\>" "\\<end\\>" nil            (cons '(icon-mode  "\\<procedure\\>" "\\<end\\>" nil
206                               icon-forward-sexp-function)                               icon-forward-sexp-function)
207                  hs-special-modes-alist)))                  hs-special-modes-alist)))
208    (run-hooks 'icon-mode-hook))    (run-hooks 'icon-mode-hook))
# Line 613  Returns nil if line starts inside a stri Line 613  Returns nil if line starts inside a stri
613    "Subdued level highlighting for Icon mode.")    "Subdued level highlighting for Icon mode.")
614    
615  (defconst icon-font-lock-keywords-2  (defconst icon-font-lock-keywords-2
616    (append    (append
617     icon-font-lock-keywords-1     icon-font-lock-keywords-1
618     (eval-when-compile     (eval-when-compile
619       (list       (list
# Line 624  Returns nil if line starts inside a stri Line 624  Returns nil if line starts inside a stri
624         'font-lock-type-face)         'font-lock-type-face)
625        ;; Fontify all keywords.        ;; Fontify all keywords.
626        ;;        ;;
627        (cons        (cons
628         (regexp-opt         (regexp-opt
629          '("break" "do" "next" "repeat" "to" "by" "else" "if" "not" "return"          '("break" "do" "next" "repeat" "to" "by" "else" "if" "not" "return"
630            "until" "case" "of" "while" "create" "every" "suspend" "default"            "until" "case" "of" "while" "create" "every" "suspend" "default"
631            "fail" "record" "then") 'words)            "fail" "record" "then") 'words)
632         'font-lock-keyword-face)         'font-lock-keyword-face)
633        ;; "end" "initial"        ;; "end" "initial"
634        (cons (regexp-opt '("end" "initial") 'words)        (cons (regexp-opt '("end" "initial") 'words)
635              'font-lock-builtin-face)              'font-lock-builtin-face)
636        ;; Fontify all system variables.        ;; Fontify all system variables.
637        (cons        (cons
638         (regexp-opt         (regexp-opt
639          '("&allocated" "&ascii" "&clock" "&col" "&collections" "&column"          '("&allocated" "&ascii" "&clock" "&col" "&collections" "&column"
640            "&control" "&cset" "&current" "&date" "&dateline" "&digits" "&dump"            "&control" "&cset" "&current" "&date" "&dateline" "&digits" "&dump"
641            "&e" "&error" "&errornumber" "&errortext" "&errorvalue" "&errout"            "&e" "&error" "&errornumber" "&errortext" "&errorvalue" "&errout"
642            "&eventcode" "&eventsource" "&eventvalue" "&fail" "&features"            "&eventcode" "&eventsource" "&eventvalue" "&fail" "&features"
643            "&file" "&host" "&input" "&interval" "&lcase" "&ldrag" "&letters"            "&file" "&host" "&input" "&interval" "&lcase" "&ldrag" "&letters"
644            "&level" "&line" "&lpress" "&lrelease" "&main" "&mdrag" "&meta"            "&level" "&line" "&lpress" "&lrelease" "&main" "&mdrag" "&meta"
645            "&mpress" "&mrelease" "&null" "&output" "&phi" "&pi" "&pos"            "&mpress" "&mrelease" "&null" "&output" "&phi" "&pi" "&pos"
646            "&progname" "&random" "&rdrag" "&regions" "&resize" "&row"            "&progname" "&random" "&rdrag" "&regions" "&resize" "&row"
647            "&rpress" "&rrelease" "&shift" "&source" "&storage" "&subject"            "&rpress" "&rrelease" "&shift" "&source" "&storage" "&subject"
648            "&time" "&trace" "&ucase" "&version" "&window" "&x" "&y") t)            "&time" "&trace" "&ucase" "&version" "&window" "&x" "&y") t)
649         'font-lock-constant-face)         'font-lock-constant-face)
650        (cons      ;; global local static declarations and link files        (cons      ;; global local static declarations and link files
651         (concat         (concat
652          "^[ \t]*"          "^[ \t]*"
653          (regexp-opt '("global" "link" "local" "static") t)          (regexp-opt '("global" "link" "local" "static") t)
654          "\\(\\sw+\\>\\)*")          "\\(\\sw+\\>\\)*")
# Line 660  Returns nil if line starts inside a stri Line 660  Returns nil if line starts inside a stri
660                 font-lock-variable-name-face)))))                 font-lock-variable-name-face)))))
661    
662        (cons      ;; $define $elif $ifdef $ifndef $undef        (cons      ;; $define $elif $ifdef $ifndef $undef
663         (concat "^"         (concat "^"
664                 (regexp-opt'("$define" "$elif" "$ifdef" "$ifndef" "$undef") t)                 (regexp-opt'("$define" "$elif" "$ifdef" "$ifndef" "$undef") t)
665                 "\\>[ \t]*\\([^ \t\n]+\\)?")                 "\\>[ \t]*\\([^ \t\n]+\\)?")
666              '((1 font-lock-builtin-face)              '((1 font-lock-builtin-face)
667                (4 font-lock-variable-name-face nil t)))                (4 font-lock-variable-name-face nil t)))
668        (cons      ;; $dump $endif $else $include        (cons      ;; $dump $endif $else $include
669         (concat         (concat
670          "^" (regexp-opt'("$dump" "$endif" "$else" "$include") t) "\\>" )          "^" (regexp-opt'("$dump" "$endif" "$else" "$include") t) "\\>" )
671         'font-lock-builtin-face)         'font-lock-builtin-face)
672        (cons      ;; $warning $error        (cons      ;; $warning $error

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.25.18.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26