Subject: bug#10934: closed (Re: bug#10934: 24.0.94; cperl system abbrevs fix)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 11 Dec 2016 03:40:02 +0000

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 [email-masked].

-- 
10934: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10934
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#10934: 24.0.94; cperl system abbrevs fix
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Sat, 10 Dec 2016 22:39:35 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 26.1

Following comments in http://debbugs.gnu.org/10934#23, applied in 3aa3f73
and subsequent.

Subject: 24.0.94; cperl system abbrevs fix
From: Leo <[email-masked]>
To: [email-masked]
Date: Sun, 04 Mar 2012 12:31:33 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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))