Commit 449657e8 authored by Glenn Morris's avatar Glenn Morris

(cperl-mode): Define abbrevs even if abbrev-table is non-nil (saved

user abbrevs may have been restored).
parent 4673156b
...@@ -1681,9 +1681,8 @@ or as help on variables `cperl-tips', `cperl-problems', ...@@ -1681,9 +1681,8 @@ or as help on variables `cperl-tips', `cperl-problems',
[(control c) (control h) f]))) [(control c) (control h) f])))
(setq major-mode cperl-use-major-mode) (setq major-mode cperl-use-major-mode)
(setq mode-name "CPerl") (setq mode-name "CPerl")
(if (not cperl-mode-abbrev-table) (let ((prev-a-c abbrevs-changed))
(let ((prev-a-c abbrevs-changed)) (define-abbrev-table 'cperl-mode-abbrev-table '(
(define-abbrev-table 'cperl-mode-abbrev-table '(
("if" "if" cperl-electric-keyword 0) ("if" "if" cperl-electric-keyword 0)
("elsif" "elsif" cperl-electric-keyword 0) ("elsif" "elsif" cperl-electric-keyword 0)
("while" "while" cperl-electric-keyword 0) ("while" "while" cperl-electric-keyword 0)
...@@ -1704,7 +1703,7 @@ or as help on variables `cperl-tips', `cperl-problems', ...@@ -1704,7 +1703,7 @@ or as help on variables `cperl-tips', `cperl-problems',
("over" "over" cperl-electric-pod 0) ("over" "over" cperl-electric-pod 0)
("head1" "head1" cperl-electric-pod 0) ("head1" "head1" cperl-electric-pod 0)
("head2" "head2" cperl-electric-pod 0))) ("head2" "head2" cperl-electric-pod 0)))
(setq abbrevs-changed prev-a-c))) (setq abbrevs-changed prev-a-c))
(setq local-abbrev-table cperl-mode-abbrev-table) (setq local-abbrev-table cperl-mode-abbrev-table)
(if (cperl-val 'cperl-electric-keywords) (if (cperl-val 'cperl-electric-keywords)
(abbrev-mode 1)) (abbrev-mode 1))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment