From fcf89f2ece3d376c3e8d303d22e3eefb3f4911b3 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 13 May 2018 13:12:57 -0400 Subject: [PATCH] Automatic documentation update. From 0.13.0 --- faq.html | 197 ++- index.html | 193 ++- snippet-development.html | 465 ++++--- snippet-expansion.html | 367 +++--- snippet-menu.html | 195 ++- snippet-organization.html | 214 +++- snippet-reference.html | 2489 +++++++++++++++++++------------------ stylesheets/manual.css | 33 +- 8 files changed, 2422 insertions(+), 1731 deletions(-) diff --git a/faq.html b/faq.html index bd4f9c6..c2e003a 100644 --- a/faq.html +++ b/faq.html @@ -3,21 +3,28 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + + Frequently Asked Questions - - + @@ -92,7 +184,7 @@ @licstart The following is the entire license notice for the JavaScript code in this tag. -Copyright (C) 2012-2013 Free Software Foundation, Inc. +Copyright (C) 2012-2018 Free Software Foundation, Inc. The JavaScript code in this tag is free software: you can redistribute it and/or modify it under the terms of the GNU @@ -141,14 +233,14 @@ for the JavaScript code in this tag.
  • Overview
  • Intro and Tutorial -
  • Snippet - @@ -159,18 +251,24 @@ for the JavaScript code in this tag.

    Table of Contents

    + -
    -

    Why is there an extra newline?

    -
    +
    +

    Why is there an extra newline?

    +

    If there is a newline at the end of a snippet definition file, YASnippet will add a newline when expanding that snippet. When editing @@ -186,16 +284,15 @@ final newline automatically.

    -
    -

    Why doesn't TAB navigation work with flyspell

    -
    +
    +

    Why doesn't TAB navigation work with flyspell

    +

    A workaround is to inhibit flyspell overlays while the snippet is active:

    -
    (add-hook 'flyspell-incorrect-hook
               #'(lambda (dummy1 dummy2 dymmy3)
                   (and yas-active-field-overlay
    @@ -214,16 +311,15 @@ solve this problem, drop a line in the
     
    -
    -

    How to I use alternative keys, i.e. not TAB?

    -
    +
    +

    How do I use alternative keys, i.e. not TAB?

    +

    Edit the keymaps yas-minor-mode-map and yas-keymap as you would any other keymap:

    -
    (define-key yas-minor-mode-map (kbd "<tab>") nil)
     (define-key yas-minor-mode-map (kbd "TAB") nil)
     (define-key yas-minor-mode-map (kbd "<the new key>") yas-maybe-expand)
    @@ -240,16 +336,15 @@ Edit the keymaps yas-m
     
    -
    -

    How do I turn off the minor mode where in some buffers?

    -
    +
    +

    How do I turn off the minor mode where in some buffers?

    +

    The best way, since version 0.6.1c, is to set the default value of the variable yas-dont-activate to a lambda function like so:

    -
    (set-default 'yas-dont-activate
                  #'(lambda ()
                      (and yas-root-directory
    @@ -265,15 +360,14 @@ but only once you have setup your yas-root-directory.
     
    -
    -

    How do I define an abbrev key containing characters not supported by the filesystem?

    -
    +
    +

    How do I define an abbrev key containing characters not supported by the filesystem?

    +
    • Note: This question applies if you're still defining snippets whose key is the filename. This is behavior still provided by version 0.6 for backward compatibilty, but is somewhat -deprecated… -
    • +deprecated…

    @@ -290,7 +384,6 @@ directive:

    -
    # key: <
     # name: <...></...>
     # --
    @@ -301,7 +394,7 @@ directive:
     
    -

    Generated by Emacs 25.2.50.5 (Org mode 8.2.10) from 0.12.2 (2017-08-29 02:08:58)

    +

    Generated by Emacs 26.1 (Org mode 9.1.9) from 0.13.0 (2018-05-13 16:12:51)

    Validate

    diff --git a/index.html b/index.html index e24b774..544f023 100644 --- a/index.html +++ b/index.html @@ -3,21 +3,28 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + + Yet another snippet extension - - + @@ -92,7 +184,7 @@ @licstart The following is the entire license notice for the JavaScript code in this tag. -Copyright (C) 2012-2013 Free Software Foundation, Inc. +Copyright (C) 2012-2018 Free Software Foundation, Inc. The JavaScript code in this tag is free software: you can redistribute it and/or modify it under the terms of the GNU @@ -138,11 +230,11 @@ for the JavaScript code in this tag.
    -

    Generated by Emacs 25.2.50.5 (Org mode 8.2.10) from 0.12.2 (2017-08-29 02:08:58)

    +

    Generated by Emacs 26.1 (Org mode 9.1.9) from 0.13.0 (2018-05-13 16:12:51)

    Validate

    diff --git a/snippet-development.html b/snippet-development.html index cb43e3c..dae3e10 100644 --- a/snippet-development.html +++ b/snippet-development.html @@ -3,21 +3,28 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + + Writing snippets - - + @@ -92,7 +184,7 @@ @licstart The following is the entire license notice for the JavaScript code in this tag. -Copyright (C) 2012-2013 Free Software Foundation, Inc. +Copyright (C) 2012-2018 Free Software Foundation, Inc. The JavaScript code in this tag is free software: you can redistribute it and/or modify it under the terms of the GNU @@ -141,11 +233,11 @@ for the JavaScript code in this tag.
  • Overview
  • Intro and Tutorial -
  • Snippet -
      +
    • Snippet +
    • FAQ @@ -159,87 +251,90 @@ for the JavaScript code in this tag.

      Table of Contents

      -
      -

      Snippet development

      -
      -
      -

      Quickly finding snippets

      -
      +
      +

      Snippet development

      +
      +
      +
      +

      Quickly finding snippets

      +

      There are some ways you can quickly find a snippet file or create a new one:

        -
      • M-x yas-new-snippet, key bindind: C-c & C-n +
      • +M-x yas-new-snippet, key bindind: C-c & C-n +

        Creates a new buffer with a template for making a new snippet. The -buffer is in snippet-mode (see below). When you are done editing -the new snippet, use C-c C-c to save it. -

        -
      • +buffer is in snippet-mode (see below). When you are done editing +the new snippet, use C-c C-c to save it. +

        -
      • M-x yas-visit-snippet-file, key binding: C-c & C-v +
      • +M-x yas-visit-snippet-file, key binding: C-c & C-v +

        Prompts you for possible snippet expansions like yas-insert-snippet, but instead of expanding it, takes you directly to the snippet definition's file, if it exists. -

        -
      • +

      -Once you find this file it will be set to snippet-mode (see ahead) +Once you find this file it will be set to snippet-mode (see ahead) and you can start editing your snippet.

      -
      -

      Using the snippet-mode major mode

      -
      +
      +

      Using the snippet-mode major mode

      +

      There is a major mode snippet-mode to edit snippets. You can set the buffer to this mode with M-x snippet-mode. It provides reasonably @@ -251,16 +346,19 @@ Three commands are defined in this mode:

        -
      • M-x yas-load-snippet-buffer, key binding: C-c C-l +
      • +M-x yas-load-snippet-buffer, key binding: C-c C-l +

        Prompts for a snippet table (with a default based on snippet's major mode) and loads the snippet currently being edited. -

        -
      • +

        -
      • M-x yas-load-snippet-buffer-and-close, key binding: C-c C-c - +
      • +M-x yas-load-snippet-buffer-and-close, key binding: C-c C-c + +

        Like yas-load-snippet-buffer, but also saves the snippet and @@ -268,17 +366,17 @@ calls quit-window. The destination is decided based on the chosen snippet table and snippet collection directly (defaulting to the first directory in yas-snippet-dirs (see Organizing Snippets for more detail on how snippets are organized). -

        -
      • +

        -
      • M-x yas-tryout-snippet, key binding: C-c C-t +
      • +M-x yas-tryout-snippet, key binding: C-c C-t +

        When editing a snippet, this opens a new empty buffer, sets it to the appropriate major mode and inserts the snippet there, so you can see what it looks like. -

        -
      • +

      @@ -289,9 +387,9 @@ There are also snippets for writing snippets: vars, $f

      -
      -

      File content

      -
      +
      +

      File content

      +

      A file defining a snippet generally contains the template to be expanded. @@ -310,7 +408,6 @@ Here's a typical example:

      -
      # contributor: pluskid <pluskid@gmail.com>
       # name: __...__
       # --
      @@ -323,21 +420,21 @@ Here's a list of currently supported directives:
       

      -
      -

      # key: snippet abbrev

      -
      +
      +

      # key: snippet abbrev

      +

      This is the probably the most important directive, it's the abbreviation you type to expand a snippet just before hitting the key -that runs yas-expand. If you don't specify this +that runs yas-expand. If you don't specify this, the snippet will not be expandable through the trigger mechanism.

      -
      -

      # name: snippet name

      -
      +
      +

      # name: snippet name

      +

      This is a one-line description of the snippet. It will be displayed in the menu. It's a good idea to select a descriptive name for a snippet – @@ -345,15 +442,15 @@ especially distinguishable among similar snippets.

      -If you omit this name it will default to the file name the snippet was -loaded from. +If you omit this name, it will default to the file name the snippet +was loaded from.

      -
      -

      # condition: snippet condition

      -
      +
      +

      # condition: snippet condition

      +

      This is a piece of Emacs-lisp code. If a snippet has a condition, then it will only be expanded when the condition code evaluate to some @@ -367,9 +464,9 @@ See also yas-b

      -
      -

      # group: snippet menu grouping

      -
      +
      +

      # group: snippet menu grouping

      +

      When expanding/visiting snippets from the menu-bar menu, snippets for a given mode can be grouped into sub-menus . This is useful if one has too @@ -393,9 +490,9 @@ group which is under the control structure group.

      -
      -

      # expand-env: expand environment

      -
      +
      +

      # expand-env: expand environment

      +

      This is another piece of Emacs-lisp code in the form of a let varlist form, i.e. a list of lists assigning values to variables. It can be @@ -415,7 +512,6 @@ You can then use:

      -
      # name: ASCII home
       # expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil))
       # --
      @@ -434,9 +530,9 @@ You can then use:
       
      -
      -

      # binding: direct keybinding

      -
      +
      +

      # binding: direct keybinding

      +

      You can use this directive to expand a snippet directly from a normal Emacs keybinding. The keybinding will be registered in the Emacs keymap @@ -450,11 +546,10 @@ same snippet, for example in this "html-mode" snippet.

      -
      # name: <p>...</p>
       # binding: C-c C-c C-m
       # --
      -<p>`(when yas-prefix "\n")`$0`(when yas-prefix "\n")`</p>
      +<p>`(when yas-prefix "\n")`$0`(when yas-prefix "\n")`</p>
       
      @@ -466,9 +561,9 @@ will expand the paragraph tag without newlines.
      -
      -

      # type: snippet or command

      -
      + -
      -

      # uuid: unique identifier

      -
      +
      +

      # uuid: unique identifier

      +

      This provides to a way to identify a snippet, independent of its name. Loading a second snippet file with the same uuid would replace the @@ -494,9 +589,9 @@ previous snippet.

      -
      -

      # contributor: snippet author

      -
      +
      +

      # contributor: snippet author

      +

      This is optional and has no effect whatsoever on snippet functionality, but it looks nice. @@ -505,18 +600,18 @@ but it looks nice.

      -
      -

      Template Syntax

      -
      +
      +

      Template Syntax

      +

      The syntax of the snippet template is simple but powerful, very similar to TextMate's.

      -
      -

      Plain Text

      -
      +
      +

      Plain Text

      +

      Arbitrary text can be included as the content of a template. They are usually interpreted as plain text, except $ and `. You need to @@ -526,9 +621,9 @@ escaped as \\ sometimes.

      -
      -

      Embedded Emacs-lisp code

      -
      +
      +

      Embedded Emacs-lisp code

      +

      Emacs-Lisp code can be embedded inside the template, written inside back-quotes (`). The lisp forms are evaluated when the snippet is @@ -542,7 +637,6 @@ dynamically:

      -
      #ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_}
       #define $1
       
      @@ -559,7 +653,6 @@ therefore define a snippet like:
       

      -
      for ($1;$2;$3) {
         `yas-selected-text`$0
       }
      @@ -573,9 +666,9 @@ Alternatively, you can also customize the variable
       

      -
      -

      Note: backquote expressions should not modify the buffer

      -
      +
      +

      Note: backquote expressions should not modify the buffer

      +

      Please note that the lisp forms in backquotes should not modify the buffer, doing so will trigger a warning. For example, instead of @@ -583,7 +676,6 @@ doing

      -
      Timestamp: `(insert (current-time-string))`
       
      @@ -592,7 +684,6 @@ doing do this:

      -
      Timestamp: `(current-time-string)`
       
      @@ -601,7 +692,6 @@ do this: The warning may be suppressed with the following code in your init file:

      -
      (add-to-list 'warning-suppress-types '(yasnippet backquote-change))
       
      @@ -610,9 +700,9 @@ The warning may be suppressed with the following code in your init file:
      -
      -

      Tab stop fields

      -
      +
      +

      Tab stop fields

      +

      Tab stops are fields that you can navigate back and forth by TAB and S-TAB. They are written by $ followed with a number. $0 has the @@ -621,7 +711,6 @@ to go when you've traveled all the fields. Here's a typical example:

      -
      <div$1>
           $0
       </div>
      @@ -629,40 +718,38 @@ to go when you've traveled all the fields. Here's a typical example:
       
      -
      -

      Placeholder fields

      -
      +
      +

      Placeholder fields

      +

      Tab stops can have default values – a.k.a placeholders. The syntax is like this:

      -
      ${N:default value}
       

      -They acts as the default value for a tab stop. But when you firstly +They act as the default value for a tab stop. But when you first type at a tab stop, the default value will be replaced by your typing. -The number can be omitted if you don't want to create mirrors or -transformations for this field. +The number can be omitted if you don't want to create mirrors or +transformations for this field.

      -
      -

      Mirrors

      -
      +
      +

      Mirrors

      +

      -We refer the tab stops with placeholders as a field. A field can have -mirrors. Its mirrors will get updated when you change the text of a -field. Here's an example: +We refer the tab stops with placeholders as a field. A field can +have mirrors. All mirrors get updated whenever you update any field +text. Here's an example:

      -
      \begin{${1:enumerate}}
           $0
       \end{$1}
      @@ -683,9 +770,9 @@ the field and others mirrors.
       
      -
      -

      Mirrors with transformations

      -
      +
      +

      Mirrors with transformations

      +

      If the value of an ${n:-construct starts with and contains $(, then it is interpreted as a mirror for field n with a @@ -697,7 +784,6 @@ Objective-C:

      -
      - (${1:id})${2:foo}
       {
           return $2;
      @@ -729,7 +815,6 @@ should be at least as long as the text. So
       

      -
      =====
       Title
       =====
      @@ -741,7 +826,6 @@ is a valid title but
       

      -
      ===
       Title
       ===
      @@ -753,7 +837,6 @@ is not. Here's an snippet for rst title:
       

      -
      ${1:$(make-string (string-width yas-text) ?\=)}
       ${1:Title}
       ${1:$(make-string (string-width yas-text) ?\=)}
      @@ -761,17 +844,36 @@ is not. Here's an snippet for rst title:
       $0
       
      + +

      +Note that a mirror with a transform is not restricted to the text of +the field it is mirroring. By making use of yas-field-value, a +mirror can look at any of the snippet's field (as mentioned above, all +mirrors are updated when any field is updated). Here is an example +which shows a "live" result of calling format: +

      + +
      +
      (format "${1:formatted %s}" "${2:value}")
      +=> "${1:$(ignore-errors (format (yas-field-value 1) (yas-field-value 2)))}"
      +
      +
      + +

      +To keep the example simple, it uses ignore-errors to suppress errors +due to incomplete format codes. +

      -
      -

      Fields with transformations

      -
      +
      +

      Fields with transformations

      +

      From version 0.6 on, you can also have lisp transformation inside -fields. These work mostly mirror transformations but are evaluated when -you first enter the field, after each change you make to the field and -also just before you exit the field. +fields. These work mostly like mirror transformations. However, they +are evaluated when you first enter the field, after each change you +make to the field and also just before you exit the field.

      @@ -781,6 +883,7 @@ distinguish between fields and mirrors. In the following example

       #define "${1:mydefine$(upcase yas-text)}"
      +
       

      @@ -798,6 +901,7 @@ transformation's $. If you don't want this extra-text, you can use

       #define "${1:$$(upcase yas-text)}"
      +
       

      @@ -809,9 +913,9 @@ does not take place. This is by design.

      -
      -

      Choosing fields value from a list and other tricks

      -
      +
      +

      Choosing fields value from a list and other tricks

      + -
      -

      Nested placeholder fields

      -
      + -
      -

      Indentation markers

      -
      +
      +

      Indentation markers

      +

      If yas-indent-line is not set to 'auto, it's still possible to indent specific lines by adding an indentation marker, $>, somewhere @@ -900,7 +1001,7 @@ on the line.

      -

      Generated by Emacs 25.2.50.5 (Org mode 8.2.10) from 0.12.2 (2017-08-29 02:08:58)

      +

      Generated by Emacs 26.1 (Org mode 9.1.9) from 0.13.0 (2018-05-13 16:12:51)

      Validate

      diff --git a/snippet-expansion.html b/snippet-expansion.html index e9aacfe..b043eca 100644 --- a/snippet-expansion.html +++ b/snippet-expansion.html @@ -3,21 +3,28 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + + Expanding snippets - - + @@ -92,7 +184,7 @@ @licstart The following is the entire license notice for the JavaScript code in this tag. -Copyright (C) 2012-2013 Free Software Foundation, Inc. +Copyright (C) 2012-2018 Free Software Foundation, Inc. The JavaScript code in this tag is free software: you can redistribute it and/or modify it under the terms of the GNU @@ -141,10 +233,10 @@ for the JavaScript code in this tag.
    • Overview
    • Intro and Tutorial -
    • Snippet -
    • -
      -

      Trigger key

      -
      +
      +

      Trigger key

      +

      yas-expand tries to expand a snippet abbrev (also known as snippet key) before point. YASnippet also provides a conditional @@ -261,7 +345,6 @@ and <tab> by default, however, you can freely remove those bi

      -
      (define-key yas-minor-mode-map (kbd "<tab>") nil)
       (define-key yas-minor-mode-map (kbd "TAB") nil)
       
      @@ -272,7 +355,6 @@ And set your own:

      -
      ;; Bind `SPC' to `yas-expand' when snippet expansion available (it
       ;; will still call `self-insert-command' otherwise).
       (define-key yas-minor-mode-map (kbd "SPC") yas-maybe-expand)
      @@ -301,9 +383,9 @@ argument in the buffer's mode hook.
       

      -
      -

      Fallback behaviour

      -
      +
      +

      Fallback behaviour

      +

      YASnippet used to support a more complicated way of sharing keybindings before yas-maybe-expand was added. This is now @@ -313,11 +395,11 @@ obsolete.

      -
      -

      Insert at point

      -
      +
      +

      Insert at point

      +

      -The command yas-insert-snippet lets you insert snippets at point +The command yas-insert-snippet lets you insert snippets at point for your current major mode. It prompts you for the snippet key first, and then for a snippet template if more than one template exists for the same key. @@ -335,14 +417,14 @@ The prompting methods used are again controlled by

      -
      -

      Inserting region or register contents into snippet

      -
      +
      +

      Inserting region or register contents into snippet

      +

      It's often useful to inject already written text in the middle of a snippet. The variable yas-wrap-around-region when to t substitute the region contents into the $0 placeholder of a snippet expanded by -yas-insert-snippet. Setting it to a character value (e.g. ?0) +yas-insert-snippet. Setting it to a character value (e.g. ?0) will insert the contents of corresponding register.

      @@ -356,9 +438,9 @@ compatibility, but is now entirely equivalent to ?0.
      -
      -

      Snippet keybinding

      -
      +
      +

      Snippet keybinding

      +

      See the section of the # binding: directive in Writing Snippets. @@ -366,18 +448,18 @@ See the section of the # binding: directive in

      -
      -

      Expanding from the menu

      -
      +
      +

      Expanding from the menu

      +
      -
      -

      Expanding with hippie-expand

      -
      +
      +

      Expanding with hippie-expand

      +

      To integrate with hippie-expand, just put yas-hippie-try-expand in @@ -388,9 +470,9 @@ prefer.

      -
      -

      Expanding from emacs-lisp code

      -
      +
      +

      Expanding from emacs-lisp code

      +

      Sometimes you might want to expand a snippet directly from your own elisp code. You should call yas-expand-snippet instead of @@ -407,7 +489,6 @@ menu has the same effect of evaluating the follow code:

      -
      (yas-expand-snippet template)
       
      @@ -420,12 +501,13 @@ See the internal documentation on -

      Controlling expansion

      -
      -
      -

      Eligible snippets

      -
      +
      +

      Controlling expansion

      +
      +
      +
      +

      Eligible snippets

      +

      YASnippet does quite a bit of filtering to find out which snippets are eligible for expanding at the current cursor position. @@ -436,46 +518,49 @@ In particular, the following things matter:

      -
      ;; When entering rinari-minor-mode, consider also the snippets in the
       ;; snippet table "rails-mode"
       (add-hook 'rinari-minor-mode-hook
      @@ -485,23 +570,24 @@ mode. Typically, you call this from a minor mode hook, for example:
       
      -
      -

      The condition system

      -
      +
      +

      The condition system

      +

      Consider this scenario: you are an old Emacs hacker. You like the abbrev-way and bind yas-expand to SPC. However, you don't want @@ -524,7 +610,6 @@ inside a comment? Set -

      (add-hook 'python-mode-hook
                 (lambda ()
                   (setq yas-buffer-local-condition
      @@ -548,11 +633,11 @@ For the full set of possible conditions, see the documentation for
       
      -
      -

      Multiples snippet with the same key

      -
      +
      +

      Multiples snippet with the same key

      +

      -The rules outlined above can return more than +The rules outlined above can return more than one snippet to be expanded at point.

      @@ -570,7 +655,6 @@ can put in your emacs-file:

      -
      (setq yas-prompt-functions '(yas-x-prompt yas-dropdown-prompt))
       
      @@ -580,9 +664,9 @@ Currently there are some alternatives solution with YASnippet.

      -
      -

      Use the X window system

      -
      +
      +

      Use the X window system

      +

      x-menu.png @@ -597,20 +681,17 @@ means:

      • It usually looks beautiful. E.g. when you compile Emacs with gtk -support, this menu will be rendered with your gtk theme. -
      • +support, this menu will be rendered with your gtk theme.
      • Your window system may or may not allow to you use C-n, C-p to -navigate this menu. -
      • -
      • This function can't be used when in a terminal. -
      • +navigate this menu. +
      • This function can't be used when in a terminal.
      -
      -

      Minibuffer prompting

      -
      +
      +

      Minibuffer prompting

      +

      ido-menu.png @@ -625,9 +706,9 @@ The best way is to try it. This works in a terminal.

      -
      -

      Use dropdown-menu.el

      -
      +
      +

      Use dropdown-menu.el

      +

      dropdown-menu.png @@ -647,9 +728,9 @@ shortcut to select the 6th candidate.

      -
      -

      Roll your own

      -
      +
      +

      Roll your own

      +

      See the documentation on variable yas-prompt-functions

      @@ -659,7 +740,7 @@ See the documentation on variable -

      Generated by Emacs 25.2.50.5 (Org mode 8.2.10) from 0.12.2 (2017-08-29 02:08:58)

      +

      Generated by Emacs 26.1 (Org mode 9.1.9) from 0.13.0 (2018-05-13 16:12:51)

      Validate

      diff --git a/snippet-menu.html b/snippet-menu.html index d7c8db9..5fb0fff 100644 --- a/snippet-menu.html +++ b/snippet-menu.html @@ -3,21 +3,28 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + + YASnippet menu - - + @@ -92,7 +184,7 @@ @licstart The following is the entire license notice for the JavaScript code in this tag. -Copyright (C) 2012-2013 Free Software Foundation, Inc. +Copyright (C) 2012-2018 Free Software Foundation, Inc. The JavaScript code in this tag is free software: you can redistribute it and/or modify it under the terms of the GNU @@ -141,12 +233,12 @@ for the JavaScript code in this tag.
    • Overview
    • Intro and Tutorial -
    • Snippet -
    • @@ -178,17 +270,14 @@ In this menu, you can find
      • The currently loaded snippet definitions, organized by major mode, -and optional grouping. -
      • +and optional grouping.
      • A rundown of the most common commands, (followed by their keybindings) including commands to load directories and reload all -snippet definitions. -
      • +snippet definitions.
      • A series of submenus for customizing and exploring YASnippet -behavior. -
      • +behavior.
      @@ -197,25 +286,25 @@ behavior.

      -
      -

      Loading snippets from menu

      -
      +
      +

      Loading snippets from menu

      +

      Invoking "Load snippets…" from the menu invokes yas-load-directory and prompts you for a snippet directory hierarchy to load.

      -Also useful is the "Reload everything" item to invoke yas-reload-all +Also useful is the "Reload everything" item to invoke yas-reload-all which uncondionally reloads all the snippets directories defined in yas-snippet-dirs and rebuilds the menus.

      -
      -

      Snippet menu behavior

      -
      +
      +

      Snippet menu behavior

      +

      YASnippet will list in this section all the loaded snippet definitions organized by snippet table name. @@ -251,9 +340,9 @@ These customizations can also be found in the menu itself, under the

      -
      -

      Controlling indenting

      -
      +
      +

      Controlling indenting

      +

      The "Indenting" submenu contains options to control the values of yas-indent-line and yas-also-auto-indent-first-line. See @@ -262,9 +351,9 @@ The "Indenting" submenu contains options to control the values of

      -
      -

      Prompting method

      -
      +
      +

      Prompting method

      +

      The "Prompting method" submenu contains options to control the value of yas-prompt-functions. See Expanding snippets. @@ -272,9 +361,9 @@ The "Prompting method" submenu contains options to control the value of

      -
      -

      Misc

      -
      +
      +

      Misc

      +

      The "Misc" submenu contains options to control the values of more variables. @@ -283,7 +372,7 @@ variables.

      -

      Generated by Emacs 25.2.50.5 (Org mode 8.2.10) from 0.12.2 (2017-08-29 02:08:58)

      +

      Generated by Emacs 26.1 (Org mode 9.1.9) from 0.13.0 (2018-05-13 16:12:51)

      Validate

      diff --git a/snippet-organization.html b/snippet-organization.html index 03ca816..b805085 100644 --- a/snippet-organization.html +++ b/snippet-organization.html @@ -3,21 +3,28 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + + Organizing snippets - - + @@ -92,7 +184,7 @@ @licstart The following is the entire license notice for the JavaScript code in this tag. -Copyright (C) 2012-2013 Free Software Foundation, Inc. +Copyright (C) 2012-2018 Free Software Foundation, Inc. The JavaScript code in this tag is free software: you can redistribute it and/or modify it under the terms of the GNU @@ -141,9 +233,9 @@ for the JavaScript code in this tag.
    • Overview
    • Intro and Tutorial -
    • Snippet -
    • -
      -

      Basic structure

      -
      +
      +

      Basic structure

      +

      -Snippet collections can be stored in plain text files. They are arranged by -sub-directories naming snippet tables. These mostly name Emacs major names. +Snippet collections can be stored in plain text files. They are +arranged by sub-directories naming snippet tables. These mostly +name Emacs major mode names.

      @@ -197,9 +290,9 @@ triggering mechanism (see Expanding Snippets
       
      -
      -

      Setting up yas-snippet-dirs

      -
      +
      +

      Setting up yas-snippet-dirs

      +

      The emacs variable yas-snippet-dirs tells YASnippet which collections to consider. It's used when you activate @@ -212,10 +305,8 @@ The default considers:

        -
      • a personal collection that lives in ~/.emacs.d/snippets -
      • -
      • the bundled collection, taken as a relative path to yasnippet.el localtion -
      • +
      • a personal collection that lives in ~/.emacs.d/snippets
      • +
      • the bundled collection, taken as a relative path to yasnippet.el localtion

      @@ -224,7 +315,6 @@ out:

      -
      ;; Develop in ~/emacs.d/mysnippets, but also
       ;; try out snippets in ~/Downloads/interesting-snippets
       (setq yas-snippet-dirs '("~/emacs.d/mysnippets"
      @@ -244,9 +334,9 @@ snippets in the first collection.
       
      -
      -

      The .yas-parents file

      -
      +
      +

      The .yas-parents file

      +

      It's very useful to have certain modes share snippets between themselves. To do this, choose a mode subdirectory and place a @@ -274,13 +364,13 @@ mode.

      -
      -

      TODO The .yas-make-groups file

      -
      +
      +

      TODO The .yas-make-groups file

      +

      If you place an empty plain text file .yas-make-groups inside one of the mode directories, the names of these sub-directories are -considered groups of snippets and the menu is organized much more +considered groups of snippets and the menu is organized much more cleanly:

      @@ -318,9 +408,9 @@ Yet another way to create a nice snippet menu is to write into
      -
      -

      The .yas-setup.el file

      -
      +
      +

      The .yas-setup.el file

      +

      If there is file named .yas-setup.el in a mode's snippet subdirectory, it is loaded along with the snippets. Utility @@ -329,9 +419,9 @@ functions used by the snippets can be put here.

      -
      -

      The .yas-compiled-snippet.el file

      -
      +
      +

      The .yas-compiled-snippet.el file

      +

      You may compile a top-level snippet directory with the yas-compile-directory function, which will create a @@ -347,9 +437,9 @@ Alternatively, you may compile all directories in the list

      -
      -

      The .yas-skip file

      -
      +
      +

      The .yas-skip file

      +

      A .yas-skip file in a mode's snippet subdirectory tells YASnippet not to load snippets from there. @@ -358,7 +448,7 @@ not to load snippets from there.

      -

      Generated by Emacs 25.2.50.5 (Org mode 8.2.10) from 0.12.2 (2017-08-29 02:08:58)

      +

      Generated by Emacs 26.1 (Org mode 9.1.9) from 0.13.0 (2018-05-13 16:12:51)

      Validate

      diff --git a/snippet-reference.html b/snippet-reference.html index 926d784..e0c8349 100644 --- a/snippet-reference.html +++ b/snippet-reference.html @@ -3,21 +3,28 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + + Reference - - + @@ -92,7 +184,7 @@ @licstart The following is the entire license notice for the JavaScript code in this tag. -Copyright (C) 2012-2013 Free Software Foundation, Inc. +Copyright (C) 2012-2018 Free Software Foundation, Inc. The JavaScript code in this tag is free software: you can redistribute it and/or modify it under the terms of the GNU @@ -141,15 +233,15 @@ for the JavaScript code in this tag.
    • Overview
    • Intro and Tutorial -
    • Snippet -
    • @@ -159,426 +251,139 @@ for the JavaScript code in this tag.

      Table of Contents

      -
      -

      Interactive functions

      -
      -
      -

      yas-abort-snippet (&optional snippet)

      -
      -

      -warning: no doc for symbol yas-abort-snippet -

      +
      +

      Interactive functions

      +
      -
      - -
      -

      yas-visit-snippet-file ()

      -
      -

      -Choose a snippet to edit, selection like yas-insert-snippet. -

      - -

      -Only success if selected snippet was loaded from a file. Put the -visited file in snippet-mode. -

      -
      -
      - -
      -

      yas-describe-table-by-namehash ()

      -
      -

      -Display snippet tables by namehash. -

      -
      -
      - -
      -

      yas-load-snippet-buffer (table &optional interactive)

      -
      -

      -Parse and load current buffer's snippet definition into table. -table is a symbol name passed to yas--table-get-create. When -called interactively, prompt for the table name. -Return the yas--template object created -

      -
      -
      - -
      -

      yas-global-mode (&optional arg)

      -
      -

      -Toggle Yas minor mode in all buffers. -With prefix arg, enable Yas-Global mode if arg is positive; -otherwise, disable it. If called from Lisp, enable the mode if -arg is omitted or nil. -

      - -

      -Yas minor mode is enabled in all buffers where -yas-minor-mode-on would do it. -See yas-minor-mode for more information on Yas minor mode. -

      -
      -
      - -
      -

      yas-skip-and-clear-or-delete-char (&optional field)

      -
      -

      -Clears unmodified field if at field start, skips to next tab. -

      - -

      -Otherwise deletes a character normally by calling delete-char. -

      -
      -
      - -
      -

      yas-next-field (&optional arg)

      -
      -

      -Navigate to the argth next field. -

      - -

      -If there's none, exit the snippet. -

      -
      -
      - -
      -

      yas-insert-snippet (&optional no-condition)

      -
      -

      -Choose a snippet to expand, pop-up a list of choices according -to yas-prompt-functions. -

      - -

      -With prefix argument no-condition, bypass filtering of snippets -by condition. -

      -
      -
      - -
      -

      yas-activate-extra-mode (mode)

      -
      -

      -Activates the snippets for the given mode in the buffer. -

      - -

      -The function can be called in the hook of a minor mode to -activate snippets associated with that mode. -

      -
      -
      - -
      -

      yas-recompile-all ()

      -
      -

      -Compile every dir in yas-snippet-dirs. -

      -
      -
      - -
      -

      yas-compile-directory (top-level-dir)

      -
      -

      -Create .yas-compiled-snippets.el files under subdirs of top-level-dir. -

      - -

      -This works by stubbing a few functions, then calling -yas-load-directory. -

      -
      -
      - -
      -

      yas-direct-keymaps-reload ()

      -
      -

      -Force reload the direct keybinding for active snippet tables. -

      -
      -
      - -
      -

      yas-exit-all-snippets ()

      -
      -

      -Exit all snippets. -

      -
      -
      - -
      -

      yas-tryout-snippet (&optional debug)

      -
      -

      -Test current buffer's snippet template in other buffer. -

      -
      -
      - -
      -

      yas-exit-snippet (snippet)

      -
      -

      -Goto exit-marker of snippet. -

      -
      -
      - -
      -

      yas-expand (&optional field)

      -
      -

      -Expand a snippet before point. If no snippet -expansion is possible, defer to yas-fallback-behavior (which see). -

      - -

      -Optional argument field is for non-interactive use and is an -object satisfying yas--field-p to restrict the expansion to. -

      -
      -
      - -
      -

      yas-expand-from-keymap ()

      -
      -

      -Expand/run snippets from keymaps, possibly falling back to original binding. -

      -
      -
      - - -
      -

      yas-minor-mode (&optional arg)

      -
      -

      -Toggle YASnippet mode. -

      - -

      -When YASnippet mode is enabled, yas-expand, normally bound to -the tab key, expands snippets of code depending on the major -mode. -

      - -

      -With no argument, this command toggles the mode. -positive prefix argument turns on the mode. -Negative prefix argument turns off the mode. -

      - -

      -Key bindings: -\{yas-minor-mode-map} -

      -
      -
      - -
      -

      yas-minor-mode-on ()

      -
      -

      -Turn on YASnippet minor mode. -

      - -

      -Honour yas-dont-activate-functions, which see. -

      -
      -
      - -
      -

      yas-reload-all (&optional no-jit interactive)

      -
      -

      -Reload all snippets and rebuild the YASnippet menu. -

      - -

      -When no-jit is non-nil force immediate reload of all known -snippets under yas-snippet-dirs, otherwise use just-in-time -loading. -

      - -

      -When called interactively, use just-in-time loading when given a -prefix argument. -

      -
      -
      - -
      -

      yas-load-directory (top-level-dir &optional use-jit interactive)

      -
      -

      -Load snippets in directory hierarchy top-level-dir. -

      - -

      -Below top-level-dir each directory should be a mode name. -

      - -

      -With prefix argument use-jit do jit-loading of snippets. -

      -
      -
      - -
      -

      yas-new-snippet (&optional no-template)

      -
      -

      -Pops a new buffer for writing a snippet. -

      - -

      -Expands a snippet-writing snippet, unless the optional prefix arg -no-template is non-nil. -

      -
      -
      - -
      -

      yas-load-snippet-buffer-and-close (table &optional kill)

      +
      +

      yas-load-snippet-buffer-and-close (table &optional kill)

      Load and save the snippet, then quit-window if saved. @@ -598,57 +403,8 @@ and kill-buffer instead.

      -
      -

      yas-describe-tables (&optional with-nonactive)

      -
      -

      -Display snippets for each table. -

      -
      -
      - -
      -

      yas-deactivate-extra-mode (mode)

      -
      -

      -Deactivates the snippets for the given mode in the buffer. -

      -
      -
      - -
      -

      yas-next-field-or-maybe-expand ()

      -
      -

      -Try to expand a snippet at a key before point. -

      - -

      -Otherwise delegate to yas-next-field. -

      -
      -
      - -
      -

      yas-about ()

      -
      -

      -warning: no doc for symbol yas-about -

      -
      -
      - -
      -

      yas-prev-field ()

      -
      -

      -Navigate to prev field. If there's none, exit the snippet. -

      -
      -
      - -
      -

      yas-expand-from-trigger-key (&optional field)

      +
      +

      yas-expand-from-trigger-key (&optional field)

      Expand a snippet before point. @@ -665,357 +421,376 @@ object satisfying yas--field-p to restrict the expansion to.

      -
      -
      -

      Customization variables

      -
      -
      -

      yas-choose-tables-first

      -
      + +
      +

      yas-skip-and-clear-or-delete-char (&optional field)

      +

      -If non-nil, and multiple eligible snippet tables, prompts user for tables first. +Clears unmodified field if at field start, skips to next tab.

      -Otherwise, user chooses between the merging together of all -eligible tables. -

      - -

      -This affects yas-insert-snippet, yas-visit-snippet-file +Otherwise deletes a character normally by calling delete-char.

      -
      -

      yas-snippet-revival

      -
      +
      +

      yas-global-mode (&optional arg)

      +

      -Non-nil means re-activate snippet fields after undo/redo. +Toggle Yas minor mode in all buffers. +With prefix arg, enable Yas-Global mode if arg is positive; +otherwise, disable it. If called from Lisp, enable the mode if +arg is omitted or nil. +

      + +

      +Yas minor mode is enabled in all buffers where +yas-minor-mode-on would do it. +See yas-minor-mode for more information on Yas minor mode.

      -
      -

      yas-overlay-priority

      -
      +
      +

      yas-recompile-all ()

      +

      -Priority to use for yasnippets overlays. -This is useful to control whether snippet navigation bindings -override bindings from other packages (e.g., company-mode). +Compile every dir in yas-snippet-dirs.

      -
      -

      yas-alias-to-yas/prefix-p

      -
      +
      +

      yas-visit-snippet-file ()

      +

      -If non-nil make aliases for the old style yas/ prefixed symbols. -It must be set to nil before loading yasnippet to take effect. +Choose a snippet to edit, selection like yas-insert-snippet. +

      + +

      +Only success if selected snippet was loaded from a file. Put the +visited file in snippet-mode.

      -
      -

      yas-also-auto-indent-first-line

      -
      +
      +

      yas-deactivate-extra-mode (mode)

      +

      -Non-nil means also auto indent first line according to mode. -

      - -

      -Naturally this is only valid when yas-indent-line is auto. +Deactivates the snippets for the given mode in the buffer.

      -
      -

      yas-new-snippet-default

      -
      +
      +

      yas-prev-field ()

      +

      -Default snippet to use when creating a new snippet. -If nil, don't use any snippet. +Navigate to prev field. If there's none, exit the snippet.

      -
      -

      yas-choose-keys-first

      -
      +
      +

      yas-load-snippet-buffer (table &optional interactive)

      +

      -If non-nil, prompt for snippet key first, then for template. -

      - -

      -Otherwise prompts for all possible snippet names. -

      - -

      -This affects yas-insert-snippet and yas-visit-snippet-file. +Parse and load current buffer's snippet definition into table. +table is a symbol name passed to yas--table-get-create. When +called interactively, prompt for the table name. +Return the yas--template object created

      -
      -

      yas-buffer-local-condition

      -
      +
      +

      yas-exit-all-snippets ()

      +

      -Snippet expanding condition. -

      - -

      -This variable is a Lisp form which is evaluated every time a -snippet expansion is attempted: -

      - -
        -
      • If it evaluates to nil, no snippets can be expanded. -
      • - -
      • If it evaluates to the a cons (require-snippet-condition -. requirement) - -
          -
        • Snippets bearing no "# condition:" directive are not -considered -
        • - -
        • Snippets bearing conditions that evaluate to nil (or -produce an error) won't be considered. -
        • - -
        • If the snippet has a condition that evaluates to non-nil -result: - -
            -
          • If requirement is t, the snippet is considered -
          • - -
          • If requirement is eq result, the snippet is -considered -
          • - -
          • Otherwise, the snippet is not considered. -
          • -
          -
        • -
        -
      • - -
      • If it evaluates to the symbol always, all snippets are -considered for expansion, regardless of any conditions. -
      • - -
      • If it evaluates to t or some other non-nil value - -
          -
        • Snippet bearing no conditions, or conditions that -evaluate to non-nil, are considered for expansion. -
        • - -
        • Otherwise, the snippet is not considered. -
        • -
        -
      • -
      - -

      -Here's an example preventing snippets from being expanded from -inside comments, in python-mode only, with the exception of -snippets returning the symbol force-in-comment in their -conditions. -

      - -

      -(add-hook \='python-mode-hook - (lambda () - (setq yas-buffer-local-condition - \='(if (python-syntax-comment-or-string-p) - \='(require-snippet-condition . force-in-comment) - t)))) +Exit all snippets.

      -
      -

      yas-also-indent-empty-lines

      -
      +
      +

      yas-next-field (&optional arg)

      +

      -Non-nil means also indent empty lines according to mode. +Navigate to the argth next field. +

      + +

      +If there's none, exit the snippet.

      -
      -

      yas-wrap-around-region

      -
      +
      +

      yas-abort-snippet (&optional snippet)

      +

      -What to insert for snippet's $0 field. -

      - -

      -If set to a character, insert contents of corresponding register. -If non-nil insert region contents. This can be overridden on a -per-snippet basis. A value of cua is considered equivalent to -`?0' for backwards compatibility. +warning: no doc for symbol yas-abort-snippet

      -
      -

      yas-prompt-functions

      -
      +
      +

      yas-describe-tables (&optional with-nonactive)

      +

      -Functions to prompt for keys, templates, etc interactively. -

      - -

      -These functions are called with the following arguments: -

      - -
        -
      • prompt: A string to prompt the user -
      • - -
      • choices: a list of strings or objects. -
      • - -
      • optional display-fn : A function that, when applied to each of -
      • -
      -

      -the objects in choices will return a string. -

      - -

      -The return value of any function you put here should be one of -the objects in choices, properly formatted with display-fn (if -that is passed). -

      - -
        -
      • To signal that your particular style of prompting is -
      • -
      -

      -unavailable at the moment, you can also have the function return -nil. -

      - -
        -
      • To signal that the user quit the prompting process, you can -
      • -
      -

      -signal quit with -

      - -

      -(signal \='quit "user quit!"). +Display snippets for each table.

      -
      -

      yas-visit-from-menu

      -
      +
      +

      yas-expand-from-keymap ()

      +

      -If non-nil visit snippets's files from menu, instead of expanding them. -

      - -

      -This can only work when snippets are loaded from files. +Expand/run snippets from keymaps, possibly falling back to original binding.

      -
      -

      yas-triggers-in-field

      -
      + +
      +

      yas-new-snippet (&optional no-template)

      +

      -If non-nil, allow stacked expansions (snippets inside snippets). +Pops a new buffer for writing a snippet.

      -Otherwise yas-next-field-or-maybe-expand just moves on to the -next field +Expands a snippet-writing snippet, unless the optional prefix arg +no-template is non-nil.

      -
      -

      yas-trigger-symbol

      -
      +
      +

      yas-reload-all (&optional no-jit interactive)

      +

      -The text that will be used in menu to represent the trigger. +Reload all snippets and rebuild the YASnippet menu. +

      + +

      +When no-jit is non-nil force immediate reload of all known +snippets under yas-snippet-dirs, otherwise use just-in-time +loading. +

      + +

      +When called interactively, use just-in-time loading when given a +prefix argument.

      -
      -

      yas-use-menu

      -
      +
      +

      yas-next-field-or-maybe-expand ()

      +

      -Display a YASnippet menu in the menu bar. +Try to expand a snippet at a key before point.

      -When non-nil, submenus for each snippet table will be listed -under the menu "Yasnippet". -

      - -
        -
      • If set to abbreviate, only the current major-mode -
      • -
      -

      -menu and the modes set in yas--extra-modes are listed. -

      - -
        -
      • If set to full, every submenu is listed -
      • - -
      • If set to nil, hide the menu. -
      • -
      - -

      -Any other non-nil value, every submenu is listed. +Otherwise delegate to yas-next-field.

      -
      -

      yas-indent-line

      -
      +
      +

      yas-activate-extra-mode (mode)

      +

      -Controls indenting applied to a recent snippet expansion. +Activates the snippets for the given mode in the buffer.

      -The following values are possible: -

      - -
        -
      • fixed Indent the snippet to the current column; -
      • - -
      • auto Indent each line of the snippet with indent-according-to-mode -
      • -
      - -

      -Every other value means don't apply any snippet-side indentation -after expansion (the manual per-line "$>" indentation still -applies). +The function can be called in the hook of a minor mode to +activate snippets associated with that mode.

      -
      -

      yas-expand-only-for-last-commands

      +
      +

      yas-insert-snippet (&optional no-condition)

      +
      +

      +Choose a snippet to expand, pop-up a list of choices according +to yas-prompt-functions. +

      + +

      +With prefix argument no-condition, bypass filtering of snippets +by condition. +

      +
      +
      + +
      +

      yas-expand (&optional field)

      +
      +

      +Expand a snippet before point. If no snippet +expansion is possible, defer to yas-fallback-behavior (which see). +

      + +

      +Optional argument field is for non-interactive use and is an +object satisfying yas--field-p to restrict the expansion to. +

      +
      +
      + +
      +

      yas-minor-mode (&optional arg)

      +
      +

      +Toggle YASnippet mode. +

      + +

      +When YASnippet mode is enabled, yas-expand, normally bound to +the tab key, expands snippets of code depending on the major +mode. +

      + +

      +With no argument, this command toggles the mode. +positive prefix argument turns on the mode. +Negative prefix argument turns off the mode. +

      + +

      +Key bindings: +

      +
      +key             binding
      +---             -------
      +
      +C-c		Prefix Command
      +
      +C-c &		Prefix Command
      +
      +C-c & C-n	yas-new-snippet
      +C-c & C-s	yas-insert-snippet
      +C-c & C-v	yas-visit-snippet-file
      +
      +
      +
      +
      + + +
      +

      yas-direct-keymaps-reload ()

      +
      +

      +Force reload the direct keybinding for active snippet tables. +

      +
      +
      + +
      +

      yas-exit-snippet (snippet)

      +
      +

      +Goto exit-marker of snippet. +

      +
      +
      + +
      +

      yas-about ()

      +
      +

      +warning: no doc for symbol yas-about +

      +
      +
      + +
      +

      yas-minor-mode-on ()

      +
      +

      +Turn on YASnippet minor mode. +

      + +

      +Honour yas-dont-activate-functions, which see. +

      +
      +
      + +
      +

      yas-skip-and-clear-field (&optional field)

      +
      +

      +Clears unmodified field if at field start, skips to next tab. +

      +
      +
      + +
      +

      yas-compile-directory (top-level-dir)

      +
      +

      +Create .yas-compiled-snippets.el files under subdirs of top-level-dir. +

      + +

      +This works by stubbing a few functions, then calling +yas-load-directory. +

      +
      +
      + +
      +

      yas-load-directory (top-level-dir &optional use-jit interactive)

      +
      +

      +Load snippets in directory hierarchy top-level-dir. +

      + +

      +Below top-level-dir each directory should be a mode name. +

      + +

      +With prefix argument use-jit do jit-loading of snippets. +

      +
      +
      + +
      +

      yas-describe-table-by-namehash ()

      +
      +

      +Display snippet tables by namehash. +

      +
      +
      + +
      +

      yas-tryout-snippet (&optional debug)

      +
      +

      +Test current buffer's snippet template in other buffer. +debug is for debugging the YASnippet engine itself. +

      +
      +
      +
      +
      +

      Customization variables

      +
      +
      +
      +

      yas-expand-only-for-last-commands

      List of last-command values to restrict tab-triggering to, or nil. @@ -1036,8 +811,96 @@ the trigger key itself.

      -
      -

      yas-snippet-dirs ()

      +
      +

      yas-wrap-around-region

      +
      +

      +What to insert for snippet's $0 field. +

      + +

      +If set to a character, insert contents of corresponding register. +If non-nil insert region contents. This can be overridden on a +per-snippet basis. A value of cua is considered equivalent to +`?0' for backwards compatibility. +

      +
      +
      + +
      +

      yas-new-snippet-default

      +
      +

      +Default snippet to use when creating a new snippet. +If nil, don't use any snippet. +

      +
      +
      + +
      +

      yas-choose-keys-first

      +
      +

      +If non-nil, prompt for snippet key first, then for template. +

      + +

      +Otherwise prompts for all possible snippet names. +

      + +

      +This affects yas-insert-snippet and yas-visit-snippet-file. +

      +
      +
      + +
      +

      yas-triggers-in-field

      +
      +

      +If non-nil, allow stacked expansions (snippets inside snippets). +

      + +

      +Otherwise yas-next-field-or-maybe-expand just moves on to the +next field +

      +
      +
      + +
      +

      yas-use-menu

      +
      +

      +Display a YASnippet menu in the menu bar. +

      + +

      +When non-nil, submenus for each snippet table will be listed +under the menu "Yasnippet". +

      + +
        +
      • If set to abbreviate, only the current major-mode
      • +
      +

      +menu and the modes set in yas--extra-modes are listed. +

      + +
        +
      • If set to full, every submenu is listed
      • + +
      • If set to nil, hide the menu.
      • +
      + +

      +Any other non-nil value, every submenu is listed. +

      +
      +
      + +
      +

      yas-snippet-dirs ()

      Return variable yas-snippet-dirs as list of strings. @@ -1045,8 +908,115 @@ Return variable yas-snippet-dirs as

      -
      -

      yas-good-grace

      +
      +

      yas-buffer-local-condition

      +
      +

      +Snippet expanding condition. +

      + +

      +This variable is a Lisp form which is evaluated every time a +snippet expansion is attempted: +

      + +
        +
      • If it evaluates to nil, no snippets can be expanded.
      • + +
      • If it evaluates to the a cons (require-snippet-condition +. requirement) + +
          +
        • Snippets bearing no "# condition:" directive are not +considered
        • + +
        • Snippets bearing conditions that evaluate to nil (or +produce an error) won't be considered.
        • + +
        • If the snippet has a condition that evaluates to non-nil +result: + +
            +
          • If requirement is t, the snippet is considered
          • + +
          • If requirement is eq result, the snippet is +considered
          • + +
          • Otherwise, the snippet is not considered.
          • +
        • +
      • + +
      • If it evaluates to the symbol always, all snippets are +considered for expansion, regardless of any conditions.
      • + +
      • If it evaluates to t or some other non-nil value + +
          +
        • Snippet bearing no conditions, or conditions that +evaluate to non-nil, are considered for expansion.
        • + +
        • Otherwise, the snippet is not considered.
        • +
      • +
      + +

      +Here's an example preventing snippets from being expanded from +inside comments, in python-mode only, with the exception of +snippets returning the symbol force-in-comment in their +conditions. +

      + +

      +(add-hook 'python-mode-hook + (lambda () + (setq yas-buffer-local-condition + '(if (python-syntax-comment-or-string-p) + '(require-snippet-condition . force-in-comment) + t)))) +

      +
      +
      + +
      +

      yas-choose-tables-first

      +
      +

      +If non-nil, and multiple eligible snippet tables, prompts user for tables first. +

      + +

      +Otherwise, user chooses between the merging together of all +eligible tables. +

      + +

      +This affects yas-insert-snippet, yas-visit-snippet-file +

      +
      +
      + +
      +

      yas-overlay-priority

      +
      +

      +Priority to use for yasnippets overlays. +This is useful to control whether snippet navigation bindings +override bindings from other packages (e.g., company-mode). +

      +
      +
      + +
      +

      yas-snippet-revival

      +
      +

      +Non-nil means re-activate snippet fields after undo/redo. +

      +
      +
      + +
      +

      yas-good-grace

      If non-nil, don't raise errors in elisp evaluation. @@ -1066,209 +1036,166 @@ active.

      -
      -
      -

      Useful functions

      -
      -
      -

      yas-default-from-field (number)

      -
      + +
      +

      yas-visit-from-menu

      +

      -warning: no doc for symbol yas-default-from-field +If non-nil visit snippets's files from menu, instead of expanding them. +

      + +

      +This can only work when snippets are loaded from files.

      -
      -

      yas-completing-prompt (prompt choices &optional display-fn completion-fn)

      -
      +
      +

      yas-prompt-functions

      +

      -warning: no doc for symbol yas-completing-prompt +Functions to prompt for keys, templates, etc interactively. +

      + +

      +These functions are called with the following arguments: +

      + +
        +
      • prompt: A string to prompt the user
      • + +
      • choices: a list of strings or objects.
      • + +
      • optional display-fn : A function that, when applied to each of
      • +
      +

      +the objects in choices will return a string. +

      + +

      +The return value of any function you put here should be one of +the objects in choices, properly formatted with display-fn (if +that is passed). +

      + +
        +
      • To signal that your particular style of prompting is
      • +
      +

      +unavailable at the moment, you can also have the function return +nil. +

      + +
        +
      • To signal that the user quit the prompting process, you can
      • +
      +

      +signal quit with +

      +
      +
      +
      +(signal 'quit "user quit!")
      +
      +
      +
      +
      + + +
      +

      yas-trigger-symbol

      +
      +

      +The text that will be used in menu to represent the trigger.

      -
      -

      yas-selected-text ()

      -
      +
      +

      yas-also-indent-empty-lines

      +

      -Return yas-selected-text if that exists and is non-empty, else nil. +Non-nil means also indent empty lines according to mode.

      -
      -

      yas-hippie-try-expand (first-time?)

      -
      +
      +

      yas-also-auto-indent-first-line

      +

      -Integrate with hippie expand. +Non-nil means also auto indent first line according to mode.

      -Just put this function in hippie-expand-try-functions-list. +Naturally this is only valid when yas-indent-line is auto.

      -
      -

      yas-snippet-mode-buffer-p ()

      -
      +
      +

      yas-indent-line

      +

      -Return non-nil if current buffer should be in snippet-mode. -Meaning it's visiting a file under one of the mode directories in -yas-snippet-dirs. +Controls indenting applied to a recent snippet expansion. +

      + +

      +The following values are possible: +

      + +
        +
      • fixed Indent the snippet to the current column;
      • + +
      • auto Indent each line of the snippet with indent-according-to-mode
      • +
      + +

      +Every other value means don't apply any snippet-side indentation +after expansion (the manual per-line "$>" indentation still +applies).

      -
      -

      yas-global-mode-cmhh ()

      -
      +
      +

      yas-alias-to-yas/prefix-p

      +

      -warning: no doc for symbol yas-global-mode-cmhh +If non-nil make aliases for the old style yas/ prefixed symbols. +It must be set to nil before loading yasnippet to take effect. +

      +
      +
      +
      +
      +

      Useful functions

      +
      +
      +
      +

      yas-expand-snippet (snippet &optional start end expand-env)

      +
      +

      +Expand snippet at current point. +

      + +

      +Text between start and end will be deleted before inserting +template. expand-env is a list of (sym value) let-style dynamic +bindings considered when expanding the snippet. If omitted, use +snippet's expand-env field. +

      + +

      +snippet may be a snippet structure (e.g., as returned by +yas-lookup-snippet), or just a snippet body (which is a string +for normal snippets, and a list for command snippets).

      -
      -

      yas-lookup-snippet (name &optional mode noerror)

      -
      -

      -Get the snippet content for the snippet name in mode's tables. -

      - -

      -mode defaults to the current buffer's major-mode. If noerror -is non-nil, then don't signal an error if there isn't any snippet -called name. -

      - -

      -Honours yas-buffer-local-condition. -

      -
      -
      - -
      -

      yas-throw (text)

      -
      -

      -Signal yas-exception with text as the reason. -

      -
      -
      - -
      -

      yas-inside-string ()

      -
      -

      -Return non-nil if the point is inside a string according to font-lock. -

      -
      -
      - -
      -

      yas-next-field-will-exit-p (&optional arg)

      -
      -

      -Return non-nil if (yas-next-field arg) would exit the current snippet. -

      -
      -
      - -
      -

      yas-x-prompt (prompt choices &optional display-fn)

      -
      -

      -Display choices in a x-window prompt. -

      -
      -
      - -
      -

      yas-shortest-key-until-whitespace (_start-point)

      -
      -

      -Like yas-longest-key-from-whitespace but take the shortest key. -

      -
      -
      - -
      -

      yas-maybe-load-snippet-buffer ()

      -
      -

      -Added to after-save-hook in snippet-mode. -

      -
      -
      - -
      -

      yas-longest-key-from-whitespace (start-point)

      -
      -

      -As yas-key-syntaxes element, look for longest key between point and whitespace. -

      - -

      -A newline will be considered whitespace even if the mode syntax -marks it as something else (typically comment ender). -

      -
      -
      - -
      -

      yas-text ()

      -
      -

      -Return yas-text if that exists and is non-empty, else nil. -

      -
      -
      - -
      -

      yas-ido-prompt (prompt choices &optional display-fn)

      -
      -

      -warning: no doc for symbol yas-ido-prompt -

      -
      -
      - -
      -

      yas-try-key-from-whitespace (_start-point)

      -
      -

      -As yas-key-syntaxes element, look for whitespace delimited key. -

      - -

      -A newline will be considered whitespace even if the mode syntax -marks it as something else (typically comment ender). -

      -
      -
      - -
      -

      yas-maybe-ido-prompt (prompt choices &optional display-fn)

      -
      -

      -warning: no doc for symbol yas-maybe-ido-prompt -

      -
      -
      - -
      -

      yas-dropdown-prompt (_prompt choices &optional display-fn)

      -
      -

      -warning: no doc for symbol yas-dropdown-prompt -

      -
      -
      - -
      -

      yas-define-snippets (mode snippets)

      +
      +

      yas-define-snippets (mode snippets)

      Define snippets for mode. @@ -1319,8 +1246,54 @@ the current buffers contents.

      -
      -

      yas-global-mode-enable-in-buffers ()

      +
      +

      yas-completing-prompt (prompt choices &optional display-fn completion-fn)

      +
      +

      +warning: no doc for symbol yas-completing-prompt +

      +
      +
      + +
      +

      yas-inside-string ()

      +
      +

      +Return non-nil if the point is inside a string according to font-lock. +

      +
      +
      + +
      +

      yas-lookup-snippet (name &optional mode noerror)

      +
      +

      +Get the snippet named name in mode's tables. +

      + +

      +mode defaults to the current buffer's major-mode. If noerror +is non-nil, then don't signal an error if there isn't any snippet +called name. +

      + +

      +Honours yas-buffer-local-condition. +

      +
      +
      + +
      +

      yas-x-prompt (prompt choices &optional display-fn)

      +
      +

      +Display choices in a x-window prompt. +

      +
      +
      + +
      +

      yas-global-mode-enable-in-buffers ()

      warning: no doc for symbol yas-global-mode-enable-in-buffers @@ -1328,8 +1301,110 @@ the current buffers contents.

      -
      -

      yas-no-prompt (_prompt choices &optional _display-fn)

      +
      +

      yas-selected-text ()

      +
      +

      +Return yas-selected-text if that exists and is non-empty, else nil. +

      +
      +
      + +
      +

      yas-field-value (number)

      +
      +

      +Get the string for field with number. +

      + +

      +Use this in primary and mirror transformations to get the text of +other fields. +

      +
      +
      + +
      +

      yas-global-mode-cmhh ()

      +
      +

      +warning: no doc for symbol yas-global-mode-cmhh +

      +
      +
      + +
      +

      yas-escape-text (text)

      +
      +

      +Escape text for snippet. +

      +
      +
      + +
      +

      yas-dropdown-prompt (_prompt choices &optional display-fn)

      +
      +

      +warning: no doc for symbol yas-dropdown-prompt +

      +
      +
      + +
      +

      yas-shortest-key-until-whitespace (_start-point)

      +
      +

      +Like yas-longest-key-from-whitespace but take the shortest key. +

      +
      +
      + +
      +

      yas-substr (str pattern &optional subexp)

      +
      +

      +Search pattern in str and return subexpth match. +

      + +

      +If found, the content of subexp group subexp (default 0) is + returned, or else the original str will be returned. +

      +
      +
      + +
      +

      yas-ido-prompt (prompt choices &optional display-fn)

      +
      +

      +warning: no doc for symbol yas-ido-prompt +

      +
      +
      + +
      +

      yas-maybe-ido-prompt (prompt choices &optional display-fn)

      +
      +

      +warning: no doc for symbol yas-maybe-ido-prompt +

      +
      +
      + +
      +

      yas-snippet-mode-buffer-p ()

      +
      +

      +Return non-nil if current buffer should be in snippet-mode. +Meaning it's visiting a file under one of the mode directories in +yas-snippet-dirs. +

      +
      +
      + +
      +

      yas-no-prompt (_prompt choices &optional _display-fn)

      warning: no doc for symbol yas-no-prompt @@ -1337,17 +1412,115 @@ the current buffers contents.

      -
      -

      yas-active-keys ()

      -
      +
      +

      yas-longest-key-from-whitespace (start-point)

      +

      -Return all active trigger keys for current buffer and point. +As yas-key-syntaxes element, look for longest key between point and whitespace. +

      + +

      +A newline will be considered whitespace even if the mode syntax +marks it as something else (typically comment ender).

      -
      -

      yas-define-condition-cache (func doc &rest body)

      +
      +

      yas-try-key-from-whitespace (_start-point)

      +
      +

      +As yas-key-syntaxes element, look for whitespace delimited key. +

      + +

      +A newline will be considered whitespace even if the mode syntax +marks it as something else (typically comment ender). +

      +
      +
      + +
      +

      yas-choose-value (&rest possibilities)

      +
      +

      +Prompt for a string in possibilities and return it. +

      + +

      +The last element of possibilities may be a list of strings. +

      +
      +
      + +
      +

      yas-global-mode-check-buffers ()

      +
      +

      +warning: no doc for symbol yas-global-mode-check-buffers +

      +
      +
      + +
      +

      yas-minor-mode-set-explicitly ()

      +
      +

      +warning: no doc for symbol yas-minor-mode-set-explicitly +

      +
      +
      + +
      +

      yas-define-menu (mode menu &optional omit-items)

      +
      +

      +Define a snippet menu for mode according to menu, omitting omit-items. +

      + +

      +menu is a list, its elements can be: +

      + +
        +
      • (yas-item uuid) : Creates an entry the snippet identified with +uuid. The menu entry for a snippet thus identified is +permanent, i.e. it will never move (be reordered) in the menu.
      • + +
      • (yas-separator) : Creates a separator
      • + +
      • (yas-submenu name submenu) : Creates a submenu with name, +submenu has the same form as menu. name is also added to the +list of groups of the snippets defined thereafter.
      • +
      + +

      +omit-items is a list of snippet uuids that will always be +omitted from mode's menu, even if they're manually loaded. +

      +
      +
      + +
      +

      yas-current-field ()

      +
      +

      +Return the currently active field. +

      +
      +
      + +
      +

      yas-unimplemented (&optional missing-feature)

      +
      +

      +warning: no doc for symbol yas-unimplemented +

      +
      +
      + +
      +

      yas-define-condition-cache (func doc &rest body)

      Define a function func with doc doc and body body. @@ -1361,118 +1534,35 @@ It doesn't make any sense to call func programatically.

      -
      -

      yas-global-mode-check-buffers ()

      -
      +
      +

      yas-active-keys ()

      +

      -warning: no doc for symbol yas-global-mode-check-buffers +Return all active trigger keys for current buffer and point.

      -
      -

      yas-define-menu (mode menu &optional omit-items)

      -
      +
      +

      yas-text ()

      +

      -Define a snippet menu for mode according to menu, omitting omit-items. -

      - -

      -menu is a list, its elements can be: -

      - -
        -
      • (yas-item uuid) : Creates an entry the snippet identified with -uuid. The menu entry for a snippet thus identified is -permanent, i.e. it will never move (be reordered) in the menu. -
      • - -
      • (yas-separator) : Creates a separator -
      • - -
      • (yas-submenu name submenu) : Creates a submenu with name, -submenu has the same form as menu. name is also added to the -list of groups of the snippets defined thereafter. -
      • -
      - -

      -omit-items is a list of snippet uuids that will always be -omitted from mode's menu, even if they're manually loaded. +Return yas-text if that exists and is non-empty, else nil.

      -
      -

      yas-field-value (number)

      -
      +
      +

      yas-next-field-will-exit-p (&optional arg)

      +

      -Get the string for field with number. -

      - -

      -Use this in primary and mirror transformations to tget. +Return non-nil if (yas-next-field arg) would exit the current snippet.

      -
      -

      yas-verify-value (possibilities)

      -
      -

      -Verify that the current field value is in possibilities. -Otherwise signal yas-exception. -

      -
      -
      - -
      -

      yas-key-to-value (alist)

      -
      -

      -warning: no doc for symbol yas-key-to-value -

      -
      -
      - -
      -

      yas-escape-text (text)

      -
      -

      -Escape text for snippet. -

      -
      -
      - -
      -

      yas-choose-value (&rest possibilities)

      -
      -

      -Prompt for a string in possibilities and return it. -

      - -

      -The last element of possibilities may be a list of strings. -

      -
      -
      - -
      -

      yas-substr (str pattern &optional subexp)

      -
      -

      -Search pattern in str and return subexpth match. -

      - -

      -If found, the content of subexp group subexp (default 0) is - returned, or else the original str will be returned. -

      -
      -
      - -
      -

      yas-active-snippets (&optional beg end)

      +
      +

      yas-active-snippets (&optional beg end)

      Return a sorted list of active snippets. @@ -1489,165 +1579,71 @@ equivalent to a range covering the whole buffer.

      -
      -

      yas-unimplemented (&optional missing-feature)

      -
      +
      +

      yas-verify-value (possibilities)

      +

      -warning: no doc for symbol yas-unimplemented +Verify that the current field value is in possibilities. +Otherwise signal yas-exception.

      -
      -

      yas-expand-snippet (content &optional start end expand-env)

      -
      +
      +

      yas-default-from-field (number)

      +

      -Expand snippet content at current point. -

      - -

      -Text between start and end will be deleted before inserting -template. expand-env is a list of (sym value) let-style dynamic bindings -considered when expanding the snippet. +warning: no doc for symbol yas-default-from-field

      -
      -

      yas-minor-mode-set-explicitly ()

      -
      +
      +

      yas-key-to-value (alist)

      +

      -warning: no doc for symbol yas-minor-mode-set-explicitly -

      -
      -
      -
      -
      -

      Useful variables

      -
      -
      -

      yas-global-mode-buffers

      -
      -

      -warning: no doc for symbol yas-global-mode-buffers +warning: no doc for symbol yas-key-to-value

      -
      -

      yas-after-reload-hook

      -
      +
      +

      yas-throw (text)

      +

      -Hooks run after yas-reload-all. +Signal yas-exception with text as the reason.

      -
      -

      yas-snippet-beg

      -
      +
      +

      yas-hippie-try-expand (first-time?)

      +

      -Beginning position of the last snippet committed. +Integrate with hippie expand. +

      + +

      +Just put this function in hippie-expand-try-functions-list.

      -
      -

      yas-maybe-expand

      -
      +
      +

      yas-maybe-load-snippet-buffer ()

      +

      -A conditional key definition. -This can be used as a key definition in keymaps to bind a key to -yas-expand only when there is a snippet available to be -expanded. +Added to after-save-hook in snippet-mode.

      - -
      -

      yas-after-exit-snippet-hook

      -
      -

      -Hooks to run after a snippet exited. -

      - -

      -The hooks will be run in an environment where some variables bound to -proper values: -

      - -

      -yas-snippet-beg : The beginning of the region of the snippet. -

      - -

      -yas-snippet-end : Similar to beg. -

      - -

      -Attention: These hooks are not run when exiting nested/stacked snippet expansion! -

      +
      +

      Useful variables

      +
      - -
      -

      yas-global-mode-hook

      -
      -

      -Hook run after entering or leaving yas-global-mode. -No problems result if this variable is not bound. -add-hook automatically binds it. (This is true for all hook variables.) -

      -
      -
      - -
      -

      yas-minor-mode-map

      -
      -

      -The keymap used when yas-minor-mode is active. -

      -
      -
      - -
      -

      yas-moving-away-p

      -
      -

      -Non-nil if user is about to exit field. -

      -
      -
      - -
      -

      yas-modified-p

      -
      -

      -Non-nil if field has been modified by user or transformation. -

      -
      -
      - -
      -

      yas-before-expand-snippet-hook

      -
      -

      -Hooks to run just before expanding a snippet. -

      -
      -
      - -
      -

      yas-keymap

      -
      -

      -The active keymap while a snippet expansion is in progress. -

      -
      -
      - -
      -

      yas-key-syntaxes

      +
      +

      yas-key-syntaxes

      Syntaxes and functions to help look for trigger keys before point. @@ -1701,32 +1697,22 @@ point between "bar" and "baz".

      -See also Info node `(elisp) Syntax Descriptors'. +See also Info node (elisp) Syntax Descriptors.

      -
      -

      yas-snippet-end

      -
      +
      +

      yas-modified-p

      +

      -End position of the last snippet committed. +Non-nil if field has been modified by user or transformation.

      -
      -

      yas-not-string-or-comment-condition

      -
      -

      -Disables snippet expansion in strings and comments. -To use, set yas-buffer-local-condition to this value. -

      -
      -
      - -
      -

      yas-dont-activate-functions

      +
      +

      yas-dont-activate-functions

      Special hook to control which buffers yas-global-mode affects. @@ -1751,19 +1737,38 @@ mode's hook.

      -
      -

      yas-minor-mode-hook

      -
      +
      +

      yas-before-expand-snippet-hook

      +

      -Hook run after entering or leaving yas-minor-mode. -No problems result if this variable is not bound. -add-hook automatically binds it. (This is true for all hook variables.) +Hooks to run just before expanding a snippet.

      -
      -

      yas-verbosity

      +
      +

      yas-maybe-skip-and-clear-field

      +
      +

      +A conditional key definition. +This can be used as a key definition in keymaps to bind a key to +yas-skip-and-clear-field only when at the beginning of an +unmodified snippey field. +

      +
      +
      + +
      +

      yas-keymap

      +
      +

      +The active keymap while a snippet expansion is in progress. +

      +
      +
      + +
      +

      yas-verbosity

      Log level for yas--message 4 means trace most anything, 0 means nothing. @@ -1771,8 +1776,17 @@ Log level for yas--message 4 means trace most anything, 0 means not

      -
      -

      yas-minor-mode-major-mode

      +
      +

      yas-minor-mode-hook

      +
      +

      +Hook run when yas-minor-mode is turned on. +

      +
      +
      + +
      +

      yas-minor-mode-major-mode

      warning: no doc for symbol yas-minor-mode-major-mode @@ -1780,27 +1794,140 @@ Log level for yas--message 4 means trace most anything, 0 means not

      -
      -

      yas-installed-snippets-dir

      -
      +
      +

      yas-not-string-or-comment-condition

      +

      -warning: no doc for symbol yas-installed-snippets-dir +Disables snippet expansion in strings and comments. +To use, set yas-buffer-local-condition to this value.

      -
      -

      yas-maybe-expand-from-keymap

      +
      +

      yas-after-exit-snippet-hook

      +
      +

      +Hooks to run after a snippet exited. +

      + +

      +The hooks will be run in an environment where some variables bound to +proper values: +

      + +

      +yas-snippet-beg : The beginning of the region of the snippet. +

      + +

      +yas-snippet-end : Similar to beg. +

      + +

      +Attention: These hooks are not run when exiting nested/stacked snippet expansion! +

      +
      +
      + +
      +

      yas-maybe-expand

      +
      +

      +A conditional key definition. +This can be used as a key definition in keymaps to bind a key to +yas-expand only when there is a snippet available to be +expanded. +

      +
      +
      + +
      +

      yas-after-reload-hook

      +
      +

      +Hooks run after yas-reload-all. +

      +
      +
      + +
      +

      yas-new-snippet-buffer-name

      +
      +

      +warning: no doc for symbol yas-new-snippet-buffer-name +

      +
      +
      + +
      +

      yas-snippet-end

      +
      +

      +End position of the last snippet committed. +

      +
      +
      + +
      +

      yas-minor-mode-map

      +
      +

      +The keymap used when yas-minor-mode is active. +

      +
      +
      + +
      +

      yas-global-mode-hook

      +
      +

      +Hook run after entering or leaving yas-global-mode. +No problems result if this variable is not bound. +add-hook automatically binds it. (This is true for all hook variables.) +

      +
      +
      + +
      +

      yas-snippet-beg

      +
      +

      +Beginning position of the last snippet committed. +

      +
      +
      + +
      +

      yas-moving-away-p

      +
      +

      +Non-nil if user is about to exit field. +

      +
      +
      + +
      +

      yas-maybe-expand-from-keymap

      warning: no doc for symbol yas-maybe-expand-from-keymap

      + +
      +

      yas-global-mode-buffers

      +
      +

      +warning: no doc for symbol yas-global-mode-buffers +

      +
      +
      -

      Generated by Emacs 25.2.50.5 (Org mode 8.2.10) from 0.12.2 (2017-08-29 02:08:58)

      +

      Generated by Emacs 26.1 (Org mode 9.1.9) from 0.13.0 (2018-05-13 16:12:51)

      Validate

      diff --git a/stylesheets/manual.css b/stylesheets/manual.css index 9580347..74bfe16 100644 --- a/stylesheets/manual.css +++ b/stylesheets/manual.css @@ -1,5 +1,14 @@ -nav > ul > li.center > ul { - padding: 0; +.center { margin-left: auto; margin-right: auto; text-align: center; } +.current { + font-weight: bold; + background-color: #E0E8F0; +} + +body { background-color: #E4F0F4 } +div#content { + max-width: 20cm; + margin-left: auto; + margin-right: auto; } nav li { @@ -9,20 +18,22 @@ nav li { list-style-type: none; padding: 0.5em; } - nav > ul > li { display: inline-block; } - -/* match org's css for
       */
      -code {
      -    background-color: #F3F5F7;
      -    font-family: courier, monospace;
      +.nopad {
      +    padding: 0;
      +}
      +li.border {
      +    border: solid;
      +    border-width: 1px;
       }
       
      -#content {
      -    margin-left: 5%;
      -    margin-right: 10%;
      +pre, code{ background-color: #F3F5F7; }
      +code {
      +    /* http://neugierig.org/software/chromium/notes/2009/09/monospace-fonts-workaround.html */
      +    font-family: WorkAroundWebKitAndMozilla, monospace;
      +    white-space: nowrap;
       }
       
       /* Styles for htmlize.el fontification.  */