[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117417: * skeleton.el (skeleton-end-hook): Default
From: |
Leo Liu |
Subject: |
[Emacs-diffs] trunk r117417: * skeleton.el (skeleton-end-hook): Default to nil and move the |
Date: |
Thu, 26 Jun 2014 14:22:50 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117417
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17850
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Thu 2014-06-26 22:21:46 +0800
message:
* skeleton.el (skeleton-end-hook): Default to nil and move the
work to skeleton-insert.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/skeleton.el skeleton.el-20091113204419-o5vbwnq5f7feedwu-728
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-06-26 07:13:13 +0000
+++ b/lisp/ChangeLog 2014-06-26 14:21:46 +0000
@@ -1,3 +1,8 @@
+2014-06-26 Leo Liu <address@hidden>
+
+ * skeleton.el (skeleton-end-hook): Default to nil and move the
+ work to skeleton-insert. (Bug#17850)
+
2014-06-26 Dmitry Antipov <address@hidden>
* calc/calc-alg.el (math-beforep):
=== modified file 'lisp/skeleton.el'
--- a/lisp/skeleton.el 2014-06-24 07:15:26 +0000
+++ b/lisp/skeleton.el 2014-06-26 14:21:46 +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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117417: * skeleton.el (skeleton-end-hook): Default to nil and move the,
Leo Liu <=