GNU bug report logs - #17850
24.3.91; skeleton-end-hook non-nil default value

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Thu, 26 Jun 2014 03:26:01 UTC

Severity: normal

Found in version 24.3.91

Done: Leo Liu <sdl.web <at> gmail.com>

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 17850 in the body.
You can then email your comments to 17850 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 bug-gnu-emacs <at> gnu.org:
bug#17850; Package emacs. (Thu, 26 Jun 2014 03:26:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Liu <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 26 Jun 2014 03:26:02 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.91; skeleton-end-hook non-nil default value
Date: Thu, 26 Jun 2014 11:24:52 +0800
This hook variable has non-nil default which means if someone
accidentally sets it before loading skeleton.el it can have ill effects.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17850; Package emacs. (Thu, 26 Jun 2014 03:43:01 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: 17850 <at> debbugs.gnu.org
Subject: Re: bug#17850: 24.3.91; skeleton-end-hook non-nil default value
Date: Thu, 26 Jun 2014 11:41:48 +0800
Patch:

=== modified file 'lisp/skeleton.el'
--- lisp/skeleton.el	2014-06-24 07:15:26 +0000
+++ lisp/skeleton.el	2014-06-26 03:40:29 +0000
@@ -62,12 +62,8 @@
   "If non-nil, make sure that the skeleton inserted ends with a newline.
 This just influences the way the default `skeleton-end-hook' behaves.")
 
-(defvar skeleton-end-hook
-  (lambda ()
-    (or (eolp) (not skeleton-end-newline) (newline-and-indent)))
+(defvar skeleton-end-hook nil
   "Hook called at end of skeleton but before going to point of interest.
-By default this moves out anything following to next line,
-  unless `skeleton-end-newline' is set to nil.
 The variables `v1' and `v2' are still set when calling this.")
 
 
@@ -268,6 +264,7 @@
               (mapcar #'car skeleton-further-elements)
               (mapcar (lambda (x) (eval (cadr x))) skeleton-further-elements)
             (skeleton-internal-list skeleton str))
+	(or (eolp) (not skeleton-end-newline) (newline-and-indent))
 	(run-hooks 'skeleton-end-hook)
 	(sit-for 0)
 	(or (pos-visible-in-window-p beg)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17850; Package emacs. (Thu, 26 Jun 2014 13:32:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 17850 <at> debbugs.gnu.org
Subject: Re: bug#17850: 24.3.91; skeleton-end-hook non-nil default value
Date: Thu, 26 Jun 2014 09:31:30 -0400
> -(defvar skeleton-end-hook
> -  (lambda ()
> -    (or (eolp) (not skeleton-end-newline) (newline-and-indent)))
> +(defvar skeleton-end-hook nil
>    "Hook called at end of skeleton but before going to point of interest.
> -By default this moves out anything following to next line,
> -  unless `skeleton-end-newline' is set to nil.
>  The variables `v1' and `v2' are still set when calling this.")
 
 
> @@ -268,6 +264,7 @@
>                (mapcar #'car skeleton-further-elements)
>                (mapcar (lambda (x) (eval (cadr x))) skeleton-further-elements)
>              (skeleton-internal-list skeleton str))
> +	(or (eolp) (not skeleton-end-newline) (newline-and-indent))
>  	(run-hooks 'skeleton-end-hook)
>  	(sit-for 0)
>  	(or (pos-visible-in-window-p beg)

Obviously NAK for 24.3.91, but I'm fine with that in trunk.


        Stefan




Reply sent to Leo Liu <sdl.web <at> gmail.com>:
You have taken responsibility. (Thu, 26 Jun 2014 14:24:02 GMT) Full text and rfc822 format available.

Notification sent to Leo Liu <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Thu, 26 Jun 2014 14:24:03 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: 17850-done <at> debbugs.gnu.org
Subject: Re: bug#17850: 24.3.91; skeleton-end-hook non-nil default value
Date: Thu, 26 Jun 2014 22:23:14 +0800
Fixed in 24.5

On 2014-06-26 09:31 -0400, Stefan Monnier wrote:
> Obviously NAK for 24.3.91, but I'm fine with that in trunk.

OK and done.

Thanks,
Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17850; Package emacs. (Thu, 26 Jun 2014 15:44:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 17850 <at> debbugs.gnu.org
Cc: sdl.web <at> gmail.com
Subject: Re: bug#17850: 24.3.91; skeleton-end-hook non-nil default value
Date: Thu, 26 Jun 2014 11:43:40 -0400
Leo Liu wrote:

> Fixed in 24.5

If you just change your wording a little bit (to "Version: 24.5"), the
bug-tracker itself will be able to understand it. :)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17850; Package emacs. (Thu, 26 Jun 2014 23:48:01 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 17850 <at> debbugs.gnu.org
Subject: Re: bug#17850: 24.3.91; skeleton-end-hook non-nil default value
Date: Fri, 27 Jun 2014 07:47:19 +0800
On 2014-06-26 11:43 -0400, Glenn Morris wrote:
> If you just change your wording a little bit (to "Version: 24.5"), the
> bug-tracker itself will be able to understand it. :)

Thanks for the tip and I'll do that in future.

Leo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 25 Jul 2014 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 300 days ago.

Previous Next


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