From: Glenn Morris Date: Tue, 5 Dec 2006 05:25:17 +0000 (+0000) Subject: (octave-abbrev-table): Define abbrevs even if abbrev-table is non-nil X-Git-Tag: emacs-pretest-22.0.92~291 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a48edb29fad38a1d04e69bac50a11c580bda8321;p=emacs.git (octave-abbrev-table): Define abbrevs even if abbrev-table is non-nil (saved user abbrevs may have been restored). --- diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 57941db9691..998b33ffbc7 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -61,37 +61,38 @@ Used in `octave-mode' and inferior-octave-mode buffers. All Octave abbrevs start with a grave accent (`).") (unless octave-abbrev-table - (let ((ac abbrevs-changed)) - (define-abbrev-table 'octave-abbrev-table ()) - (define-abbrev octave-abbrev-table "`a" "all_va_args" nil 0 t) - (define-abbrev octave-abbrev-table "`b" "break" nil 0 t) - (define-abbrev octave-abbrev-table "`cs" "case" nil 0 t) - (define-abbrev octave-abbrev-table "`ca" "catch" nil 0 t) - (define-abbrev octave-abbrev-table "`c" "continue" nil 0 t) - (define-abbrev octave-abbrev-table "`el" "else" nil 0 t) - (define-abbrev octave-abbrev-table "`eli" "elseif" nil 0 t) - (define-abbrev octave-abbrev-table "`et" "end_try_catch" nil 0 t) - (define-abbrev octave-abbrev-table "`eu" "end_unwind_protect" nil 0 t) - (define-abbrev octave-abbrev-table "`ef" "endfor" nil 0 t) - (define-abbrev octave-abbrev-table "`efu" "endfunction" nil 0 t) - (define-abbrev octave-abbrev-table "`ei" "endif" nil 0 t) - (define-abbrev octave-abbrev-table "`es" "endswitch" nil 0 t) - (define-abbrev octave-abbrev-table "`ew" "endwhile" nil 0 t) - (define-abbrev octave-abbrev-table "`f" "for" nil 0 t) - (define-abbrev octave-abbrev-table "`fu" "function" nil 0 t) - (define-abbrev octave-abbrev-table "`gl" "global" nil 0 t) - (define-abbrev octave-abbrev-table "`gp" "gplot" nil 0 t) - (define-abbrev octave-abbrev-table "`gs" "gsplot" nil 0 t) - (define-abbrev octave-abbrev-table "`if" "if ()" nil 0 t) - (define-abbrev octave-abbrev-table "`o" "otherwise" nil 0 t) - (define-abbrev octave-abbrev-table "`rp" "replot" nil 0 t) - (define-abbrev octave-abbrev-table "`r" "return" nil 0 t) - (define-abbrev octave-abbrev-table "`s" "switch" nil 0 t) - (define-abbrev octave-abbrev-table "`t" "try" nil 0 t) - (define-abbrev octave-abbrev-table "`up" "unwind_protect" nil 0 t) - (define-abbrev octave-abbrev-table "`upc" "unwind_protect_cleanup" nil 0 t) - (define-abbrev octave-abbrev-table "`w" "while ()" nil 0 t) - (setq abbrevs-changed ac))) + (define-abbrev-table 'octave-abbrev-table ())) + +(let ((ac abbrevs-changed)) + (define-abbrev octave-abbrev-table "`a" "all_va_args" nil 0 t) + (define-abbrev octave-abbrev-table "`b" "break" nil 0 t) + (define-abbrev octave-abbrev-table "`cs" "case" nil 0 t) + (define-abbrev octave-abbrev-table "`ca" "catch" nil 0 t) + (define-abbrev octave-abbrev-table "`c" "continue" nil 0 t) + (define-abbrev octave-abbrev-table "`el" "else" nil 0 t) + (define-abbrev octave-abbrev-table "`eli" "elseif" nil 0 t) + (define-abbrev octave-abbrev-table "`et" "end_try_catch" nil 0 t) + (define-abbrev octave-abbrev-table "`eu" "end_unwind_protect" nil 0 t) + (define-abbrev octave-abbrev-table "`ef" "endfor" nil 0 t) + (define-abbrev octave-abbrev-table "`efu" "endfunction" nil 0 t) + (define-abbrev octave-abbrev-table "`ei" "endif" nil 0 t) + (define-abbrev octave-abbrev-table "`es" "endswitch" nil 0 t) + (define-abbrev octave-abbrev-table "`ew" "endwhile" nil 0 t) + (define-abbrev octave-abbrev-table "`f" "for" nil 0 t) + (define-abbrev octave-abbrev-table "`fu" "function" nil 0 t) + (define-abbrev octave-abbrev-table "`gl" "global" nil 0 t) + (define-abbrev octave-abbrev-table "`gp" "gplot" nil 0 t) + (define-abbrev octave-abbrev-table "`gs" "gsplot" nil 0 t) + (define-abbrev octave-abbrev-table "`if" "if ()" nil 0 t) + (define-abbrev octave-abbrev-table "`o" "otherwise" nil 0 t) + (define-abbrev octave-abbrev-table "`rp" "replot" nil 0 t) + (define-abbrev octave-abbrev-table "`r" "return" nil 0 t) + (define-abbrev octave-abbrev-table "`s" "switch" nil 0 t) + (define-abbrev octave-abbrev-table "`t" "try" nil 0 t) + (define-abbrev octave-abbrev-table "`up" "unwind_protect" nil 0 t) + (define-abbrev octave-abbrev-table "`upc" "unwind_protect_cleanup" nil 0 t) + (define-abbrev octave-abbrev-table "`w" "while ()" nil 0 t) + (setq abbrevs-changed ac)) (defvar octave-comment-char ?# "Character to start an Octave comment.")