all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Liu <sdl.web@gmail.com>
To: 17850@debbugs.gnu.org
Subject: bug#17850: 24.3.91; skeleton-end-hook non-nil default value
Date: Thu, 26 Jun 2014 11:41:48 +0800	[thread overview]
Message-ID: <m3wqc4gww3.fsf@gmail.com> (raw)
In-Reply-To: <m31tucic8r.fsf@gmail.com> (Leo Liu's message of "Thu, 26 Jun 2014 11:24:52 +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)





  reply	other threads:[~2014-06-26  3:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26  3:24 bug#17850: 24.3.91; skeleton-end-hook non-nil default value Leo Liu
2014-06-26  3:41 ` Leo Liu [this message]
2014-06-26 13:31   ` Stefan Monnier
2014-06-26 14:23     ` Leo Liu
2014-06-26 15:43       ` Glenn Morris
2014-06-26 23:47         ` Leo Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3wqc4gww3.fsf@gmail.com \
    --to=sdl.web@gmail.com \
    --cc=17850@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.