branch: elpa/gnuplot
commit df865fcaa0107e136f8a997759ce39b7e33331cb
Author: Jonathan Oddie <[email protected]>
Commit: Jonathan Oddie <[email protected]>
Slight change to font-lock regexps, and use buffer-local variables
- Changed regexp for variable/function defs to include multi-argument
functions
In gnuplot-comint-start-function:
- Use make-local-variable instead of make-variable-buffer-local on
font-lock-defaults
- Make comint-mode-map buffer-local before defining gnuplot-specific
keybindings
---
gnuplot.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gnuplot.el b/gnuplot.el
index 2981d6b..c1900ca 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -1547,7 +1547,7 @@ operators are punctuation characters.")
'("\\[\\([^]]+\\)\\]"
1 font-lock-reference-face)
; variable/function definitions
- '("\\(\\<[a-z]+[a-z_0-9()]*\\)[ \t]*="
+ '("\\(\\<[a-z]+[a-z_0-9(), \t]*\\)[ \t]*="
1 font-lock-variable-name-face)
; built-in function names
(cons (concat
@@ -1838,14 +1838,15 @@ buffer. Further customization is possible via
;;(if (not (fboundp 'hilit-set-mode-patterns))
(if (featurep 'font-lock)
(progn
- (make-variable-buffer-local 'font-lock-defaults)
- (setq font-lock-defaults '(gnuplot-font-lock-keywords t t))
+ (set (make-local-variable 'font-lock-defaults)
+ '(gnuplot-font-lock-keywords t t))
(if gnuplot-xemacs-p (turn-on-font-lock))))
;;(if (featurep 'kw-compl)
;; (progn
;; (setq kw-compl-list gnuplot-keywords
;; kw-compl-upper-case nil)
;; (define-key comint-mode-map "\M-\r" 'kw-compl-abbrev)))
+ (make-local-variable 'comint-mode-map)
(define-key comint-mode-map "\M-\C-p" 'gnuplot-plot-from-comint)
(define-key comint-mode-map "\M-\C-f" 'gnuplot-save-and-plot-from-comint)
(define-key comint-mode-map "\C-d" 'gnuplot-delchar-or-maybe-eof)