compare symbol names with `equal'
[bpt/emacs.git] / lisp / skeleton.el
index 54dce9e..1c6128a 100644 (file)
@@ -55,22 +55,15 @@ Typical examples might be `upcase' or `capitalize'.")
 When the region is visible (due to `transient-mark-mode' or marking a region
 with the mouse) and this is non-nil and the function was called without an
 explicit ARG, then the ARG defaults to -1, i.e. wrapping around the visible
-region.
-
-We will probably delete this variable in a future Emacs version
-unless we get a substantial number of complaints about the auto-wrap
-feature.")
+region.")
+(make-obsolete-variable 'skeleton-autowrap nil "24.5")
 
 (defvar skeleton-end-newline t
   "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.")
 
 
@@ -271,6 +264,7 @@ When done with skeleton, but before going back to `_'-point call
               (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)