[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17850: 24.3.91; skeleton-end-hook non-nil default value
From: |
Leo Liu |
Subject: |
bug#17850: 24.3.91; skeleton-end-hook non-nil default value |
Date: |
Thu, 26 Jun 2014 11:41:48 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (CentOS 6.5) |
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)