unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10934: 24.0.94; cperl system abbrevs fix
@ 2012-03-04  4:31 Leo
  2012-03-04 14:48 ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Leo @ 2012-03-04  4:31 UTC (permalink / raw)
  To: 10934

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






^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#10934: 24.0.94; cperl system abbrevs fix
  2012-03-04  4:31 bug#10934: 24.0.94; cperl system abbrevs fix Leo
@ 2012-03-04 14:48 ` Stefan Monnier
  2012-03-15 10:55   ` Leo
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2012-03-04 14:48 UTC (permalink / raw)
  To: Leo; +Cc: 10934

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







^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#10934: 24.0.94; cperl system abbrevs fix
  2012-03-04 14:48 ` Stefan Monnier
@ 2012-03-15 10:55   ` Leo
  2012-03-15 12:08     ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Leo @ 2012-03-15 10:55 UTC (permalink / raw)
  To: 10934

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






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#10934: 24.0.94; cperl system abbrevs fix
  2012-03-15 10:55   ` Leo
@ 2012-03-15 12:08     ` Stefan Monnier
  2016-02-24  6:39       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2012-03-15 12:08 UTC (permalink / raw)
  To: Leo; +Cc: 10934

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#10934: 24.0.94; cperl system abbrevs fix
  2012-03-15 12:08     ` Stefan Monnier
@ 2016-02-24  6:39       ` Lars Ingebrigtsen
  2016-02-24  8:15         ` Leo Liu
  2016-02-24 13:02         ` Stefan Monnier
  0 siblings, 2 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-24  6:39 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 10934, Leo, Ilya Zakharevich

Stefan Monnier <monnier@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#10934: 24.0.94; cperl system abbrevs fix
  2016-02-24  6:39       ` Lars Ingebrigtsen
@ 2016-02-24  8:15         ` Leo Liu
  2016-02-24 11:12           ` Ilya Zakharevich
  2016-02-24 13:02         ` Stefan Monnier
  1 sibling, 1 reply; 9+ messages in thread
From: Leo Liu @ 2016-02-24  8:15 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 10934, Stefan Monnier, Ilya Zakharevich

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#10934: 24.0.94; cperl system abbrevs fix
  2016-02-24  8:15         ` Leo Liu
@ 2016-02-24 11:12           ` Ilya Zakharevich
  2016-12-11  3:39             ` Glenn Morris
  0 siblings, 1 reply; 9+ messages in thread
From: Ilya Zakharevich @ 2016-02-24 11:12 UTC (permalink / raw)
  To: Leo Liu; +Cc: Lars Ingebrigtsen, Stefan Monnier, 10934

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#10934: 24.0.94; cperl system abbrevs fix
  2016-02-24  6:39       ` Lars Ingebrigtsen
  2016-02-24  8:15         ` Leo Liu
@ 2016-02-24 13:02         ` Stefan Monnier
  1 sibling, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2016-02-24 13:02 UTC (permalink / raw)
  To: Jonathan Rockway, Lars Ingebrigtsen; +Cc: 10934, Leo, Ilya Zakharevich

>>>>> "Lars" == Lars Ingebrigtsen <larsi@gnus.org> writes:

> Stefan Monnier <monnier@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#10934: 24.0.94; cperl system abbrevs fix
  2016-02-24 11:12           ` Ilya Zakharevich
@ 2016-12-11  3:39             ` Glenn Morris
  0 siblings, 0 replies; 9+ messages in thread
From: Glenn Morris @ 2016-12-11  3:39 UTC (permalink / raw)
  To: 10934-done

Version: 26.1

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-12-11  3:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-04  4:31 bug#10934: 24.0.94; cperl system abbrevs fix Leo
2012-03-04 14:48 ` Stefan Monnier
2012-03-15 10:55   ` Leo
2012-03-15 12:08     ` Stefan Monnier
2016-02-24  6:39       ` Lars Ingebrigtsen
2016-02-24  8:15         ` Leo Liu
2016-02-24 11:12           ` Ilya Zakharevich
2016-12-11  3:39             ` Glenn Morris
2016-02-24 13:02         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).