diff options
| author | Stefan Monnier | 2008-05-02 18:32:18 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-05-02 18:32:18 +0000 |
| commit | 7210c33ff83136d924d23afa0087d6583117f47e (patch) | |
| tree | 42e5eb454c1d991e773edacc153f9b6c1846756d | |
| parent | 5af733c09a3b3bce3ad4ced365fb06102c813a70 (diff) | |
| download | emacs-7210c33ff83136d924d23afa0087d6583117f47e.tar.gz emacs-7210c33ff83136d924d23afa0087d6583117f47e.zip | |
(octave-abbrev-table): Move defvar and
initialization into define-abbrev-table. Use :regexp.
(octave-mode-syntax-table): Don't set word syntax for `.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/progmodes/octave-mod.el | 71 |
2 files changed, 39 insertions, 36 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4215ebb37e4..4e158093b2d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -11,6 +11,10 @@ | |||
| 11 | 11 | ||
| 12 | 2008-05-02 Stefan Monnier <monnier@iro.umontreal.ca> | 12 | 2008-05-02 Stefan Monnier <monnier@iro.umontreal.ca> |
| 13 | 13 | ||
| 14 | * progmodes/octave-mod.el (octave-abbrev-table): Move defvar and | ||
| 15 | initialization into define-abbrev-table. Use :regexp. | ||
| 16 | (octave-mode-syntax-table): Don't set word syntax for `. | ||
| 17 | |||
| 14 | * files.el (minibuffer-with-setup-hook): Allow `fun' expressions rather | 18 | * files.el (minibuffer-with-setup-hook): Allow `fun' expressions rather |
| 15 | than only value. | 19 | than only value. |
| 16 | 20 | ||
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index ce18a7032d7..4673f2ad3bb 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el | |||
| @@ -55,43 +55,41 @@ | |||
| 55 | "Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>, bug-gnu-emacs@gnu.org" | 55 | "Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>, bug-gnu-emacs@gnu.org" |
| 56 | "Current maintainer of the Emacs Octave package.") | 56 | "Current maintainer of the Emacs Octave package.") |
| 57 | 57 | ||
| 58 | (defvar octave-abbrev-table nil | 58 | (define-abbrev-table 'octave-abbrev-table |
| 59 | (mapcar (lambda (e) (append e '(nil 0 t))) | ||
| 60 | '(("`a" "all_va_args") | ||
| 61 | ("`b" "break") | ||
| 62 | ("`cs" "case") | ||
| 63 | ("`ca" "catch") | ||
| 64 | ("`c" "continue") | ||
| 65 | ("`el" "else") | ||
| 66 | ("`eli" "elseif") | ||
| 67 | ("`et" "end_try_catch") | ||
| 68 | ("`eu" "end_unwind_protect") | ||
| 69 | ("`ef" "endfor") | ||
| 70 | ("`efu" "endfunction") | ||
| 71 | ("`ei" "endif") | ||
| 72 | ("`es" "endswitch") | ||
| 73 | ("`ew" "endwhile") | ||
| 74 | ("`f" "for") | ||
| 75 | ("`fu" "function") | ||
| 76 | ("`gl" "global") | ||
| 77 | ("`gp" "gplot") | ||
| 78 | ("`gs" "gsplot") | ||
| 79 | ("`if" "if ()") | ||
| 80 | ("`o" "otherwise") | ||
| 81 | ("`rp" "replot") | ||
| 82 | ("`r" "return") | ||
| 83 | ("`s" "switch") | ||
| 84 | ("`t" "try") | ||
| 85 | ("`u" "until ()") | ||
| 86 | ("`up" "unwind_protect") | ||
| 87 | ("`upc" "unwind_protect_cleanup") | ||
| 88 | ("`w" "while ()"))) | ||
| 59 | "Abbrev table for Octave's reserved words. | 89 | "Abbrev table for Octave's reserved words. |
| 60 | Used in `octave-mode' and inferior-octave-mode buffers. | 90 | Used in `octave-mode' and inferior-octave-mode buffers. |
| 61 | All Octave abbrevs start with a grave accent (`).") | 91 | All Octave abbrevs start with a grave accent (`)." |
| 62 | (unless octave-abbrev-table | 92 | :regexp "\\(?:[^`]\\|^\\)\\(\\(?:\\<\\|`\\)\\w+\\)\\W*") |
| 63 | (define-abbrev-table 'octave-abbrev-table ())) | ||
| 64 | |||
| 65 | (let ((abbrevs-changed abbrevs-changed)) | ||
| 66 | (define-abbrev octave-abbrev-table "`a" "all_va_args" nil 0 t) | ||
| 67 | (define-abbrev octave-abbrev-table "`b" "break" nil 0 t) | ||
| 68 | (define-abbrev octave-abbrev-table "`cs" "case" nil 0 t) | ||
| 69 | (define-abbrev octave-abbrev-table "`ca" "catch" nil 0 t) | ||
| 70 | (define-abbrev octave-abbrev-table "`c" "continue" nil 0 t) | ||
| 71 | (define-abbrev octave-abbrev-table "`el" "else" nil 0 t) | ||
| 72 | (define-abbrev octave-abbrev-table "`eli" "elseif" nil 0 t) | ||
| 73 | (define-abbrev octave-abbrev-table "`et" "end_try_catch" nil 0 t) | ||
| 74 | (define-abbrev octave-abbrev-table "`eu" "end_unwind_protect" nil 0 t) | ||
| 75 | (define-abbrev octave-abbrev-table "`ef" "endfor" nil 0 t) | ||
| 76 | (define-abbrev octave-abbrev-table "`efu" "endfunction" nil 0 t) | ||
| 77 | (define-abbrev octave-abbrev-table "`ei" "endif" nil 0 t) | ||
| 78 | (define-abbrev octave-abbrev-table "`es" "endswitch" nil 0 t) | ||
| 79 | (define-abbrev octave-abbrev-table "`ew" "endwhile" nil 0 t) | ||
| 80 | (define-abbrev octave-abbrev-table "`f" "for" nil 0 t) | ||
| 81 | (define-abbrev octave-abbrev-table "`fu" "function" nil 0 t) | ||
| 82 | (define-abbrev octave-abbrev-table "`gl" "global" nil 0 t) | ||
| 83 | (define-abbrev octave-abbrev-table "`gp" "gplot" nil 0 t) | ||
| 84 | (define-abbrev octave-abbrev-table "`gs" "gsplot" nil 0 t) | ||
| 85 | (define-abbrev octave-abbrev-table "`if" "if ()" nil 0 t) | ||
| 86 | (define-abbrev octave-abbrev-table "`o" "otherwise" nil 0 t) | ||
| 87 | (define-abbrev octave-abbrev-table "`rp" "replot" nil 0 t) | ||
| 88 | (define-abbrev octave-abbrev-table "`r" "return" nil 0 t) | ||
| 89 | (define-abbrev octave-abbrev-table "`s" "switch" nil 0 t) | ||
| 90 | (define-abbrev octave-abbrev-table "`t" "try" nil 0 t) | ||
| 91 | (define-abbrev octave-abbrev-table "`u" "until ()" nil 0 t) | ||
| 92 | (define-abbrev octave-abbrev-table "`up" "unwind_protect" nil 0 t) | ||
| 93 | (define-abbrev octave-abbrev-table "`upc" "unwind_protect_cleanup" nil 0 t) | ||
| 94 | (define-abbrev octave-abbrev-table "`w" "while ()" nil 0 t)) | ||
| 95 | 93 | ||
| 96 | (defvar octave-comment-char ?# | 94 | (defvar octave-comment-char ?# |
| 97 | "Character to start an Octave comment.") | 95 | "Character to start an Octave comment.") |
| @@ -298,7 +296,8 @@ parenthetical grouping.") | |||
| 298 | (modify-syntax-entry ?! "." table) | 296 | (modify-syntax-entry ?! "." table) |
| 299 | (modify-syntax-entry ?\\ "\\" table) | 297 | (modify-syntax-entry ?\\ "\\" table) |
| 300 | (modify-syntax-entry ?\' "." table) | 298 | (modify-syntax-entry ?\' "." table) |
| 301 | (modify-syntax-entry ?\` "w" table) | 299 | ;; Was "w" for abbrevs, but now that it's not necessary any more, |
| 300 | (modify-syntax-entry ?\` "." table) | ||
| 302 | (modify-syntax-entry ?\" "\"" table) | 301 | (modify-syntax-entry ?\" "\"" table) |
| 303 | (modify-syntax-entry ?. "w" table) | 302 | (modify-syntax-entry ?. "w" table) |
| 304 | (modify-syntax-entry ?_ "w" table) | 303 | (modify-syntax-entry ?_ "w" table) |