]> git.eshelyaron.com Git - emacs.git/commitdiff
More tweaks of skeleton documentation wrt \n behavior at bol/eol.
authorEli Zaretskii <eliz@gnu.org>
Sun, 22 Jun 2014 16:59:30 +0000 (19:59 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 22 Jun 2014 16:59:30 +0000 (19:59 +0300)
 lisp/skeleton.el (skeleton-insert): Yet another fix of the doc string
 wrt behavior of \n as the first/last element of a skeleton.

 doc/misc/autotype.texi (Skeleton Language): Document the \n feature
 better.

doc/misc/ChangeLog
doc/misc/autotype.texi
lisp/ChangeLog
lisp/skeleton.el

index b1d7c3a7a0c35adae7f48f162bc3c03b64a82c21..69aa171b554c8b20abc141d28fb49cc0f21ca810 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-22  Eli Zaretskii  <eliz@gnu.org>
+
+       * autotype.texi (Skeleton Language): Document the \n feature
+       better.
+
 2014-06-21  Eli Zaretskii  <eliz@gnu.org>
 
        * autotype.texi (Skeleton Language): Document the feature of \n
index dafec226d5d24258029bbb081dde5222c38a1796..3ddeb08a306eb8a6d6c4518bd8c8d448e6949529 100644 (file)
@@ -234,9 +234,10 @@ Insert string or character.  Literal strings and characters are passed through
 @c ??? something seems very wrong here.
 Insert a newline and align under current line, but not if this is the
 last element of a skeleton and the newline would be inserted at end of
-line.  Use newline character @code{?\n} to prevent alignment.  Use
-@code{"\n"} as the last string element of a skeleton to insert a
-newline after the skeleton unconditionally.
+line, or this is the first element and the newline would be inserted
+at beginning of line.  Use newline character @code{?\n} to prevent
+alignment.  Use @code{"\n"} as the first or last string element of a
+skeleton to insert a newline unconditionally.
 @item @code{_}
 Interesting point.  When wrapping skeletons around successive regions, they are
 put at these places.  Point is left at first @code{_} where nothing is wrapped.
index e0aaa1827852ad93b3684db306113a24d6edd0ca..471b44940116124af0b6a206e77dc7f8ab6dff15 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-22  Eli Zaretskii  <eliz@gnu.org>
+
+       * skeleton.el (skeleton-insert): Yet another fix of the doc string
+       wrt behavior of \n as the first/last element of a skeleton.
+
 2014-06-22  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-adb.el (tramp-adb-handle-process-file):
index 86c8ed49c74b4b1fdc919a8eed676d24b7634526..54dce9e43b7ad39a735a0e92ce396f4cdb950aa5 100644 (file)
@@ -200,8 +200,9 @@ not needed, a prompt-string or an expression for complex read functions.
 If ELEMENT is a string or a character it gets inserted (see also
 `skeleton-transformation-function').  Other possibilities are:
 
-       \\n     if not the last element of the skeleton, or not at eol,
-                go to next line and indent according to mode
+       \\n     go to next line and indent according to mode, unless
+                this is the first/last element of a skeleton and point
+                is at bol/eol
        _       interesting point, interregion here
        -       interesting point, no interregion interaction, overrides
                interesting point set by _
@@ -218,7 +219,8 @@ or at the first occurrence of _ or at the end of the inserted text.
 
 Note that \\n as the last element of the skeleton only inserts a
 newline if not at eol.  If you want to unconditionally insert a newline
-at the end of the skeleton, use \"\\n\" instead.
+at the end of the skeleton, use \"\\n\" instead.  Likewise with \\n
+as the first element when at bol.
 
 Further elements can be defined via `skeleton-further-elements'.
 ELEMENT may itself be a SKELETON with an INTERACTOR.  The user is prompted