emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/gnuplot df865fc 013/184: Slight change to font-lock regexp


From: ELPA Syncer
Subject: [nongnu] elpa/gnuplot df865fc 013/184: Slight change to font-lock regexps, and use buffer-local variables
Date: Sun, 29 Aug 2021 11:03:06 -0400 (EDT)

branch: elpa/gnuplot
commit df865fcaa0107e136f8a997759ce39b7e33331cb
Author: Jonathan Oddie <j.j.oddie@gmail.com>
Commit: Jonathan Oddie <j.j.oddie@gmail.com>

    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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]