GNU bug report logs -
#10934
24.0.94; cperl system abbrevs fix
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Sun, 4 Mar 2012 04:34:02 UTC
Severity: normal
Tags: patch
Found in version 24.0.94
Fixed in version 26.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#10934: 24.0.94; cperl system abbrevs fix
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 10934 <at> debbugs.gnu.org.
--
10934: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10934
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Version: 26.1
Following comments in http://debbugs.gnu.org/10934#23, applied in 3aa3f73
and subsequent.
[Message part 3 (message/rfc822, inline)]
In cperl-mode it uses a hack to avoid having programmably-defined
abbrevs written to the abbrev file. This is not safe i.e. those abbrevs
can still be saved to disk, and users might be tricked to edit them but
lose their editing because they are redefined by cperl-mode.
I think the following patch is due.
commit 0d5a31c8fc9faf708e98bee32913bc2dfe31bf7d
Date: Fri Apr 16 21:09:01 2010 +0100
Fix cperl-mode abbrevs
See http://permalink.gmane.org/gmane.emacs.devel/123752.
---
lisp/progmodes/cperl-mode.el | 44 ++++++++++++++++++++----------------------
1 file changed, 21 insertions(+), 23 deletions(-)
Modified lisp/progmodes/cperl-mode.el
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index eb881d01..3a332b24 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -1714,29 +1714,27 @@ (defun cperl-mode ()
[(control c) (control h) f])))
(setq major-mode cperl-use-major-mode)
(setq mode-name "CPerl")
- (let ((prev-a-c abbrevs-changed))
- (define-abbrev-table 'cperl-mode-abbrev-table '(
- ("if" "if" cperl-electric-keyword 0)
- ("elsif" "elsif" cperl-electric-keyword 0)
- ("while" "while" cperl-electric-keyword 0)
- ("until" "until" cperl-electric-keyword 0)
- ("unless" "unless" cperl-electric-keyword 0)
- ("else" "else" cperl-electric-else 0)
- ("continue" "continue" cperl-electric-else 0)
- ("for" "for" cperl-electric-keyword 0)
- ("foreach" "foreach" cperl-electric-keyword 0)
- ("formy" "formy" cperl-electric-keyword 0)
- ("foreachmy" "foreachmy" cperl-electric-keyword 0)
- ("do" "do" cperl-electric-keyword 0)
- ("=pod" "=pod" cperl-electric-pod 0)
- ("=over" "=over" cperl-electric-pod 0)
- ("=head1" "=head1" cperl-electric-pod 0)
- ("=head2" "=head2" cperl-electric-pod 0)
- ("pod" "pod" cperl-electric-pod 0)
- ("over" "over" cperl-electric-pod 0)
- ("head1" "head1" cperl-electric-pod 0)
- ("head2" "head2" cperl-electric-pod 0)))
- (setq abbrevs-changed prev-a-c))
+ (define-abbrev-table 'cperl-mode-abbrev-table
+ '(("if" "if" cperl-electric-keyword 0 t)
+ ("elsif" "elsif" cperl-electric-keyword 0 t)
+ ("while" "while" cperl-electric-keyword 0 t)
+ ("until" "until" cperl-electric-keyword 0 t)
+ ("unless" "unless" cperl-electric-keyword 0 t)
+ ("else" "else" cperl-electric-else 0 t)
+ ("continue" "continue" cperl-electric-else 0 t)
+ ("for" "for" cperl-electric-keyword 0 t)
+ ("foreach" "foreach" cperl-electric-keyword 0 t)
+ ("formy" "formy" cperl-electric-keyword 0 t)
+ ("foreachmy" "foreachmy" cperl-electric-keyword 0 t)
+ ("do" "do" cperl-electric-keyword 0 t)
+ ("=pod" "=pod" cperl-electric-pod 0 t)
+ ("=over" "=over" cperl-electric-pod 0 t)
+ ("=head1" "=head1" cperl-electric-pod 0 t)
+ ("=head2" "=head2" cperl-electric-pod 0 t)
+ ("pod" "pod" cperl-electric-pod 0 t)
+ ("over" "over" cperl-electric-pod 0 t)
+ ("head1" "head1" cperl-electric-pod 0 t)
+ ("head2" "head2" cperl-electric-pod 0 t)))
(setq local-abbrev-table cperl-mode-abbrev-table)
(if (cperl-val 'cperl-electric-keywords)
(abbrev-mode 1))
This bug report was last modified 8 years and 248 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.