(if (> buffer-saved-size (car hilit-auto-rehighlight-fallback))
(setq hilit-auto-rehighlight
(cdr hilit-auto-rehighlight-fallback)))
- (if (> buffer-saved-size hilit-auto-highlight-maxout) nil
- (hilit-rehighlight-buffer)
- (set-buffer-modified-p nil)))))
+ (if (> buffer-saved-size hilit-auto-highlight-maxout)
+ nil
+ (let ((bm (buffer-modified-p)))
+ (hilit-rehighlight-buffer)
+ (set-buffer-modified-p bm))))))
(defun hilit-repaint-command (arg)
"Rehighlights according to the value of hilit-auto-rehighlight, or the
("^\\s *(def\\(un\\|macro\\|advice\\|subst\\|method\\)\\s " "\\()\\|nil\\)" defun)
("^\\s *(\\(def\\(var\\|type\\|parameter\\)\\|declare\\)\\s +\\S +" nil decl)
- ("^\\s *(def\\(const\\(ant\\)?\\|class\\|struct\\)\\s \\S +[ \t\n]+\\((\\(([^()]*)\\|[^()]+\\)*)\\)?" nil define)
+ ("^\\s *(def\\(const\\(ant\\)?\\|class\\|struct\\)\\s \\S +[ \t\n]+" nil define)
("^\\s *(\\(provide\\|require\\|\\(auto\\)?load\\).*$" nil include)
("[ \t]\\&\\(key\\|rest\\|optional\\|aux\\)\\s *" nil keyword)
- ("(\\(let\\*?\\|locally\\|cond\\|if\\*?\\|or\\|and\\|map\\(car\\|c[ao]n\\)?\\|prog[nv1*]?\\|while\\|when\\|unless\\|do\\(\\*\\|list\\|times\\)\\|lambda\\|function\\|values\\|set\\([qf]\\|car\\|cdr\\)?\\|rplac[ad]\\|nconc\\|block\\|go\\|return\\(-from\\)?\\|[ec]?\\(type\\)?case\\|multiple-value-\\(bind\\|setq\\|list\\|call\\|prog1\\)\\|unwind-protect\\|handler-case\\|catch\\|throw\\|eval-when\\(-compile\\)?\\)[ \t\n]" 1 keyword)
+ ("(\\(let\\*?\\|locally\\|cond\\|if\\*?\\|or\\|and\\|map\\(car\\|c[ao]n\\)?\\|prog[nv1*]?\\|while\\|when\\|unless\\|do\\(\\*\\|list\\|times\\)\\|list\\|lambda\\|function\\|values\\|set\\([qf]\\|car\\|cdr\\)?\\|rplac[ad]\\|nconc\\|block\\|go\\|return\\(-from\\)?\\|[ec]?\\(type\\)?case\\|multiple-value-\\(bind\\|setq\\|list\\|call\\|prog1\\)\\|unwind-protect\\|handler-case\\|catch\\|throw\\|eval-when\\(-compile\\)?\\)[ \t\n]" 1 keyword)
))
(hilit-set-mode-patterns
'calendar-mode
'(("[A-Z][a-z]+ [0-9]+" nil define) ; month and year
- ("S M Tu W Th F S" nil label) ; week days
- ("[0-9]+\\*" nil defun) ; holidays
- ("[0-9]+\\+" nil comment) ; diary days
- ))
+ ("S M Tu W Th F S" nil label))) ; week days
+
+(hilit-set-mode-patterns
+ 'asm-mode
+ '(("/\\*" "\\*/" comment)
+ ("^#[ \t]*\\(undef\\|define\\).*$" "[^\\]$" define)
+ ("^#.*$" nil include)
+ ;; labels
+ ("^.+:" nil defun)
+ ;; assembler directives
+ ("^[ \t]*\\..*$" nil decl)
+ ;; register names
+ ("\\$[a-z0-9]+" nil string)
+ ;; mnemonics
+ ("^[ \t]*[a-z]+" nil struct)))
(hilit-set-mode-patterns
'pascal-mode