Joao Tavora
c18672a227
Closes #447 : only call command beyond yasnippet if it exists
2013-12-24 09:43:56 +00:00
João Távora
0567c931f4
Merge pull request #442 from npostavs/auto-export
...
populate yas--exported-syms based on sym prefix
2013-12-23 02:44:24 -08:00
dongxiong
90e7595c74
yas-text export twice
...
Something different between line 4521 and line 4528? I am not sure about this.
2013-12-20 13:06:37 +08:00
Noam Postavsky
6c752a1572
populate yas--exported-syms based on sym prefix
...
Rename what was formerly yas--exported-syms to yas--backported-syms,
and remove yas--dont-backport.
2013-12-12 23:19:21 -05:00
Joao Tavora
7d4e4aa34c
Closes #440 : don't use make-variable-buffer-local' for
yas--extra-modes'
2013-12-03 15:20:53 +00:00
Noam Postavsky
a9e303525c
docstring fixes
...
yas--prompt-function -> yas-prompt-functions
yas-fallback-behaviour -> yas-fallback-behavior
2013-11-28 23:35:32 -05:00
Noam Postavsky
eaa3141402
fix docstring extraction for "fancy" docs
...
The docstrings for yas-expand and yas-expand-from-keymap are generated
on the fly, depending on how they are called ("context"). Add a context
argument to the synthesizing functions and pass it nil when extracting
docstrings for the manual.
2013-11-27 21:34:29 -05:00
João Távora
0f67c07ddd
Merge pull request #424 from ljos/de/activate-extra-mode
...
Feature: de/activate-extra-mode
2013-10-31 06:28:26 -07:00
Noam Postavsky
d7b2b89eaa
widen before deleting regions
...
This avoid problems with c-mode's after change hooks.
2013-10-30 18:25:51 -04:00
Bjarte Johansen
d5d6e456bf
Feature: de/activate-extra-mode
...
Adds functionality to deactivate/activate extra modes. Two new functions
are added: `activate-extra-mode', `deactivate-extra-mode'. These two
functions activate and deactivate snippets for the given mode in the
current buffer. The use-case for the functions is to have a simple
interface for adding new snippets when activating a new minor mode.
The previous way of doing this, using `yas-extra-modes', is made
obsolete and the new deactivate/activate should be the preferred
instead. The reason for making `yas-extra-modes' obsolete is to keep a
simple interface.
See issue #420 for more information.
2013-10-27 20:38:12 +01:00
Noam Postavsky
33dff9ad12
let C-c C-c save existing snippets too
2013-10-26 14:40:50 -04:00
Noam Postavsky
205b0e6970
move snippet saving from loading to closing
...
yas-load-snippet-buffer now just loads the snippet,
yas-load-snippet-buffer-and-close also saves it.
2013-10-26 13:42:32 -04:00
Noam Postavsky
ffd497d541
don't kill snippet buffer unless saved
...
Split the quit-window part of yas-load-snippet-buffer into
yas-load-snippet-buffer-and-close, and only quit if the snippet was
saved.
This resolves #417 , where you could lose a snippet by giving the wrong
answer in a prompt.
2013-10-26 12:11:04 -04:00
Joao Tavora
32ee5cbde5
Closes #415 : remove c-specific hacks, harmful on emacs 24.3
2013-10-21 09:28:44 +01:00
João Távora
6c3e0294dd
Merge pull request #412 from npostavs/less-narrow
...
Wait till after content insertion to narrow
2013-10-14 09:28:42 -07:00
João Távora
3bb1515046
Merge pull request #409 from npostavs/font-lock
...
Fix yas--font-lock-keywords
2013-10-14 08:46:18 -07:00
Noam Postavsky
51e9e8e53c
wait till after content insertion to narrow
...
Fixes #404 without inhibiting change hooks.
2013-10-14 10:00:45 -04:00
Noam Postavsky
6997922011
Revert "inhibit change hooks during (insert content)"
...
This reverts commit 90d4cae1b1bbfacc612e73444f1e5a723ae4036e.
2013-10-14 09:57:11 -04:00
Joao Tavora
7849ffcec5
fix: don't use universal-argument-num-events
2013-10-14 10:26:34 +01:00
Noam Postavsky
90d4cae1b1
inhibit change hooks during (insert content)
...
`yas-expand-snippet' narrows to a 0 size region before doing (insert
content), this confuses cc-mode's before-change-functions that
invalidate some cached information. Binding `inhibit-modification-hooks'
to `t' prevents calling these functions.
Fixes #404 .
2013-10-14 01:05:29 -04:00
Noam Postavsky
f21ddd1b2e
remove redundant font-lock-keywords
...
`lisp-font-lock-keywords' is identical to `lisp-font-lock-keywords1',
`lisp-font-lock-keywords2' is a superset of `lisp-font-lock-keywords1'.
2013-10-13 18:00:00 -04:00
Noam Postavsky
79f3656b3e
fix font-lock-keywords syntax
...
The syntax is (MATCHER . FACENAME) (note the dot).
2013-10-13 17:55:58 -04:00
João Távora
d963c41a14
Closes #406 : correct docstring for yas-extra-modes
2013-10-10 00:02:39 +01:00
João Távora
3ec62aba0d
fix: please older emacsen, don't use LETREC after all
...
also fix some compiler warnings
2013-09-07 18:55:37 +01:00
João Távora
78c52fdf5c
fix: shoosh warning with LETREC instead of LET
2013-09-02 12:01:24 +01:00
João Távora
ce50b3dbfa
Closes #318 : Don't use CL-LABELS for backward compatibility with older emacsen
2013-09-02 11:55:55 +01:00
João Távora
a7d40ed14a
Closes #318 : correctly implement YAS--MODES-TO-ACTIVATE
...
- simpler and got rid of YAS--ALL-PARENTS
- also got rid of YAS/MODE-SYMBOL backward compatibility hack
2013-08-31 23:48:19 +01:00
Joao Tavora
13d87aa3c0
fix: more idiomatic elisp, better docstrings, less byte-compiler warnings
...
By Stefan Monnier, with original commentary.
"Here's an untested patch of cleanups, found partly via compilation using
lexical-binding and partly via checkdoc-current-buffer (and
occasionally by stumble-upon happenstance)."
2013-08-29 10:20:31 +01:00
thisirs
501857e767
Assume NO-TEMPLATE is non-nil if `yas-new-snippet-default' is nil
2013-08-20 17:19:35 +02:00
thisirs
80bb95326b
Factor out embedded elisp code
...
* yasnippet.el (yas--key-from-desc): Added
2013-08-20 17:19:35 +02:00
thisirs
3acb8c5773
Make default snippet customizable
2013-08-20 17:19:35 +02:00
Joao Tavora
9e085ec05d
closes #391 : don't assume `declare-function'/ exists, it doesn't in emacs22
2013-07-22 18:32:45 +01:00
Joao Tavora
0da56720a8
Closes #318 : now checks for circular parenthood in snippet dirs
2013-05-05 20:42:33 -04:00
Jonas Bernoulli
57138e6df4
do not require dropdown-list at compile time
...
It might not be available.
Also update commentary with respect to dropdown-list.
2013-05-04 03:36:06 +02:00
Guillaume Papin
8772b51052
Fix yas--version to compatible with version-to-list
2013-02-04 10:42:09 +01:00
Takafumi Arakaki
2e118646f0
Fix yas--message for the case message contains %
2013-01-12 18:23:16 +01:00
João Távora
618cf506ee
Doc: document structures YAS--FIELD and YAS--MIRROR
2012-12-25 04:30:26 +00:00
João Távora
74e8f43f06
Closes #351 : sort mirrors by nesting depth when updating
2012-12-25 04:30:19 +00:00
Joao Tavora
04970abf30
Closes #315 : don't consider keybindings when filtering snippets in YAS-ACTIVE-KEYS
2012-12-24 16:35:03 +00:00
João Távora
1ef0091de1
Fix: YAS-RELOAD-ALL preserves user bindings on YAS-MINOR-MODE-MAP cleanup
...
- Don't create a new keymap on every reload
2012-12-23 20:43:23 +00:00
João Távora
9b31880ed1
Fix: double check if mac trigger symbol is available
2012-12-22 18:18:04 +00:00
João Távora
1db685c480
Fix: YAS--CALLED-INTERACTIVELY-P should reverse its condition check
2012-12-22 18:04:54 +00:00
João Távora
1bc497ecbe
Closes #335 : YAS-DONT-ACTIVATE is only buffer-local in pre-24 emacsen
2012-12-17 00:13:17 +00:00
João Távora
327fa4b86e
Merge pull request #344 from dgutov/no-aget
...
Fix: remove the use of AGET that has creeped in
2012-12-16 15:53:04 -08:00
João Távora
d9f966a220
Closes #347 : can't expect THIS-COMMAND to have valid value in YAS-BUFFER-LOCAL-CONDITION
2012-12-16 14:36:14 +00:00
Dmitry Gutov
f6d6d4ca56
Remove the use of aget
that has creeped in
...
See also c38c3aa, 38db5aa9fbf0f60dce63b83cab8f028bfcd152bd and
9de1c5f4fb6f281cfa4af869d393db76616cb42e#commitcomment-2265088
2012-12-09 03:08:57 +04:00
João Távora
4f99f9dc20
Closes #339
2012-11-27 00:25:51 +00:00
Joao Tavora
0778a1b61b
Fix: Closes #330
2012-11-16 15:15:24 +00:00
João Távora
0ab9fb281e
Minor: make 'yas--define-snippets-1' an internal defun
2012-11-08 22:22:41 +00:00
João Távora
d5865b1092
Merge remote-tracking branch 'rolandwalker/byte-compiler-3'
...
Fix: reorder defuns to quieten byte-compiler
Conflicts:
yasnippet.el
2012-11-08 22:21:19 +00:00