GNU bug report logs - #10934
24.0.94; cperl system abbrevs fix

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10934 in the body.
You can then email your comments to 10934 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org:
bug#10934; Package emacs. (Sun, 04 Mar 2012 04:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org. (Sun, 04 Mar 2012 04:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.94; cperl system abbrevs fix
Date: Sun, 04 Mar 2012 12:31:33 +0800
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))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10934; Package emacs. (Sun, 04 Mar 2012 14:50:01 GMT) Full text and rfc822 format available.

Message #8 received at 10934 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo <sdl.web <at> gmail.com>
Cc: 10934 <at> debbugs.gnu.org
Subject: Re: bug#10934: 24.0.94; cperl system abbrevs fix
Date: Sun, 04 Mar 2012 09:48:42 -0500
> 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.

Thanks for the patch.
But cperl-mode maintainership is a bit delicate, so I prefer to minimize the
difference between our version and the upstream version.
IOW, please try and find a patch that is acceptable to Ilya (I suspect
that he'll want the patch to be backward-compatible).


        Stefan


PS: The whole define-abbrev-table (c|sh)ould be moved to the toplevel.


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






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10934; Package emacs. (Thu, 15 Mar 2012 11:27:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#10934: 24.0.94; cperl system abbrevs fix
Date: Thu, 15 Mar 2012 18:55:02 +0800
On 2012-03-04 22:48 +0800, Stefan Monnier wrote:
> Thanks for the patch.
> But cperl-mode maintainership is a bit delicate, so I prefer to minimize the
> difference between our version and the upstream version.
> IOW, please try and find a patch that is acceptable to Ilya (I suspect
> that he'll want the patch to be backward-compatible).
>
>
>         Stefan
>
>
> PS: The whole define-abbrev-table (c|sh)ould be moved to the toplevel.

Do you mind if we install this for the emacs release? We can ask the
author of cperl mode to incorporate it later.

Leo





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10934; Package emacs. (Thu, 15 Mar 2012 12:40:02 GMT) Full text and rfc822 format available.

Message #14 received at 10934 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo <sdl.web <at> gmail.com>
Cc: 10934 <at> debbugs.gnu.org
Subject: Re: bug#10934: 24.0.94; cperl system abbrevs fix
Date: Thu, 15 Mar 2012 08:08:45 -0400
>> Thanks for the patch.
>> But cperl-mode maintainership is a bit delicate, so I prefer to minimize the
>> difference between our version and the upstream version.
>> IOW, please try and find a patch that is acceptable to Ilya (I suspect
>> that he'll want the patch to be backward-compatible).

> Do you mind if we install this for the emacs release? We can ask the
> author of cperl mode to incorporate it later.

I'd rather first get his agreement,


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10934; Package emacs. (Wed, 24 Feb 2016 06:41:02 GMT) Full text and rfc822 format available.

Message #17 received at 10934 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 10934 <at> debbugs.gnu.org, Leo <sdl.web <at> gmail.com>,
 Ilya Zakharevich <ilyaz <at> cpan.org>
Subject: Re: bug#10934: 24.0.94; cperl system abbrevs fix
Date: Wed, 24 Feb 2016 17:39:29 +1100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> Thanks for the patch.
>>> But cperl-mode maintainership is a bit delicate, so I prefer to minimize the
>>> difference between our version and the upstream version.
>>> IOW, please try and find a patch that is acceptable to Ilya (I suspect
>>> that he'll want the patch to be backward-compatible).
>
>> Do you mind if we install this for the emacs release? We can ask the
>> author of cperl mode to incorporate it later.
>
> I'd rather first get his agreement,

It looks like this patch was not applied.  Leo, did you contact Ilya?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10934; Package emacs. (Wed, 24 Feb 2016 08:16:01 GMT) Full text and rfc822 format available.

Message #20 received at 10934 <at> debbugs.gnu.org (full text, mbox):

From: Leo Liu <sdl.web <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 10934 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 Ilya Zakharevich <ilyaz <at> cpan.org>
Subject: Re: bug#10934: 24.0.94; cperl system abbrevs fix
Date: Wed, 24 Feb 2016 16:15:18 +0800
On 2016-02-24 17:39 +1100, Lars Ingebrigtsen wrote:
> It looks like this patch was not applied.  Leo, did you contact Ilya?

No sadly. There was a time I had trouble finding the most recent
cperl-mode.el to make an update-to-date patch.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10934; Package emacs. (Wed, 24 Feb 2016 11:13:02 GMT) Full text and rfc822 format available.

Message #23 received at 10934 <at> debbugs.gnu.org (full text, mbox):

From: Ilya Zakharevich <ilya <at> math.berkeley.edu>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 10934 <at> debbugs.gnu.org
Subject: Re: bug#10934: 24.0.94; cperl system abbrevs fix
Date: Wed, 24 Feb 2016 03:12:07 -0800
On Wed, Feb 24, 2016 at 04:15:18PM +0800, Leo Liu wrote:
> On 2016-02-24 17:39 +1100, Lars Ingebrigtsen wrote:
> > It looks like this patch was not applied.  Leo, did you contact Ilya?
> 
> No sadly. There was a time I had trouble finding the most recent
> cperl-mode.el to make an update-to-date patch.

Guys, sorry for being such a boor,

but I do not think that nowadays it is practical to pay attention to
my opinion w.r.t. cperl-mode.  I could not touch it for years — so if
I ever would find time to deal with it, a few extra patches should not
be showstopers.

So, please, disregard me; — if/when I’m back, I would let you know.

Yours,
Ilya (and sorry again!)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10934; Package emacs. (Wed, 24 Feb 2016 13:03:02 GMT) Full text and rfc822 format available.

Message #26 received at 10934 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jonathan Rockway <jon <at> jrock.us>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 10934 <at> debbugs.gnu.org, Leo <sdl.web <at> gmail.com>,
 Ilya Zakharevich <ilyaz <at> cpan.org>
Subject: Re: bug#10934: 24.0.94; cperl system abbrevs fix
Date: Wed, 24 Feb 2016 08:02:31 -0500
>>>>> "Lars" == Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>>> Thanks for the patch.
>>>> But cperl-mode maintainership is a bit delicate, so I prefer to minimize the
>>>> difference between our version and the upstream version.
>>>> IOW, please try and find a patch that is acceptable to Ilya (I suspect
>>>> that he'll want the patch to be backward-compatible).
>> 
>>> Do you mind if we install this for the emacs release? We can ask the
>>> author of cperl mode to incorporate it later.
>> 
>> I'd rather first get his agreement,

> It looks like this patch was not applied.  Leo, did you contact Ilya?

IIRC, Jonathan Rockway had agreed to maintain cperl-mode (he has a few
changes in his version which you can clone from
https://github.com/jrockway/cperl-mode).

Jonathan, where are we with that?


        Stefan




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Sun, 11 Dec 2016 03:40:02 GMT) Full text and rfc822 format available.

Notification sent to Leo <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Sun, 11 Dec 2016 03:40:02 GMT) Full text and rfc822 format available.

Message #31 received at 10934-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 10934-done <at> debbugs.gnu.org
Subject: Re: bug#10934: 24.0.94; cperl system abbrevs fix
Date: Sat, 10 Dec 2016 22:39:35 -0500
Version: 26.1

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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 08 Jan 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 103 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.