Commit Graph

1004 Commits

Author SHA1 Message Date
Noam Postavsky
e53ec1e0c3 Make snippets submodule track master, update it
This should let us update the submodule just by running
    git submodule update --remote
rather than having to cd into it, and then pull.
2014-06-17 19:40:55 -04:00
Noam Postavsky
f98c527a38 Replace text -> yas-text in documentation
* doc/snippet-development.org: replace text -> yas-text
2014-06-17 19:21:22 -04:00
Noam Postavsky
763f5faa14 Closes #474: fix more cc-mode font-lock conflicts
* yasnippet-tests.el (example-for-issue-474): Don't call insert from
  within backquotes, it's redundant and prevents proper testing of
  backquote expansion.

* yasnippet.el (yas--restore-backquotes, yas--save-backquotes): Ensure
  the buffer isn't narrowed while modifying it to avoid conflicting with
  cc-mode fontification.
2014-05-14 19:49:11 -04:00
Noam Postavsky
fe288a156c Fix publishing with org 7.9
* doc/yas-doc-helper.el: Only use org-html-publish-to-html when it's
  fbound.
2014-05-11 19:37:12 -04:00
Noam Postavsky
6b04dada67 Document type directive
* doc/snippet-development.org: Add type to directive list.
2014-05-11 19:02:43 -04:00
Noam Postavsky
4c16eaee0e Document uuid directive
* doc/snippet-development.org: Mention uuid in directive list.
* yasnippet.el (yas-define-snippets): Fix docstring grammar.
2014-05-11 12:47:15 -04:00
Noam Postavsky
f1760272e0 Restore backquotes lost in rst -> org translation
* doc/snippet-development.org: Re-add lost `s.
2014-05-11 12:47:15 -04:00
Noam Postavsky
8ced5c7f1d Remove type, expand-env from new snippet value
They are seldom used, and can cause errors if left in.

* yasnippet.el (yas-new-snippet-default): Remove type and expand-env
  directives.
2014-05-11 12:44:29 -04:00
Noam Postavsky
580e5c64f6 Don't lose error message when yas-good-grace is t
* yasnippet.el
  (yas--eval-lisp-no-saves): Pass error message to message function.
  (yas--handle-error): Pass "%s" to error to avoid accidentally
  interpreting % in the error message as format codes.
2014-05-11 12:23:40 -04:00
Noam Postavsky
a80033d142 Refactor yas-good-grace error handling
* yasnippet.el
(yas--handle-error): New function.
(yas--eval-lisp-no-saves, yas--eval-lisp): Use it.
2014-05-10 23:04:13 -04:00
João Távora
4ccf133d49 Merge pull request #476 from npostavs/cc-fontify2
Avoid changing buffer while narrowed
2014-04-27 20:24:12 +01:00
Noam Postavsky
599a2622c6 Closes #474: fix cc-mode fontification conflict
* yasnippet.el (yas--save-backquotes): don't change buffer while
narrowed.
2014-04-27 14:49:05 -04:00
Noam Postavsky
4473b4ede5 New test for cc-mode's fontification functions
This issue requires font locking to trigger. This can be be done by
let-binding noninteractive to nil and using a buffer name that doesn't
start with a space, instead of the external emacs hack which is now
redundant.

* yasnippet-tests.el (yas--with-font-locked-temp-buffer): new macro
similar to with-temp-buffer but enables font-lock-mode even in -batch
mode.
(example-for-issue-474): new test
(example-for-issue-404, example-for-issue-404-c-mode): use new macro
(example-for-issue-404-external-emacs): removed
2014-04-27 14:49:02 -04:00
João Távora
4d9eee93ba Simpler, more effective .travis file
* .travis.yml (env): New section.
(install): Simpler install recipes.
(script): Just rake compile and rake tests.
2014-04-27 01:57:50 +01:00
João Távora
a0c221725c Merge pull request #473 from npostavs/org8
update doc for org 8.x
2014-03-24 00:29:14 +00:00
Noam Postavsky
a4e04f954b update doc for org 8.x
Keeping compabitily with 7.9 for now
2014-03-23 19:44:35 -04:00
Joao Tavora
8e7295b934 Closes #403: more uniform behaviour for `yas-use-menu'
Suggested by Noam Postavsky, this uses the :visible arg to
`easy-menu-define' to hide the whole "YASnippet" menu according to the
run-time value of `yas-use-menu'. Previously, only the load-time value
was considered and some functions we're noops when `yas-use-menu' was
nil.

The per-mode snippet submenus are now always updated even if
`yas-use-menu' is nil, although they won't be shown until it becomes
non-nil.

* yasnippet.el (yas--minor-mode-menu): Use :visible arg and eval `yas-use-menu'
(yas--update-template): Always update the menu.
(yas--show-menu-p): Always return t if `yas-use-menu' is non-nil and not `abbreviate'
(yas-define-menu): Always define a menu.
(yas-use-menu): Update docstring.
2014-03-14 09:55:22 +00:00
João Távora
b36a4f7449 Properly closes #469: Don't use `yas--init-minor-keymap'
Previous reverted commit 498cbe4 forgot to take into account that one
of the tests used the `yas--init-minor-keymap' function that was
removed.

* yasnippet.el (yas-use-menu): Don't allow `nil' value, it's
useless.
(yas--minor-mode-menu): Use top-level `easy-menu-define' form.
(yas--init-minor-keymap): Remove definition.

* yasnippet-tests.el (test-rebindings): Don't use
`yas--init-minor-keymap'. Restore bindings explicitly. Not ideal,
but should work.
2014-03-13 20:29:06 +00:00
Joao Tavora
d809e886e0 Revert "Closes #469: Don't use `yas--init-minor-keymap'"
This reverts commit 498cbe4138.
2014-03-13 20:23:05 +01:00
Joao Tavora
498cbe4138 Closes #469: Don't use `yas--init-minor-keymap'
* yasnippet.el (yas-use-menu): Don't allow `nil' value, it's
useless.
(yas--minor-mode-menu): Use top-level `easy-menu-define' form.
(yas--init-minor-keymap): Remove definition.
2014-03-13 19:04:05 +00:00
João Távora
e7599b9325 Merge pull request #466 from npostavs/no-reverse
Avoid double choices reversing
2014-03-06 08:05:53 +00:00
Noam Postavsky
43a501aa56 remove yas--x-pretty-prompt-templates 2014-03-05 22:38:46 -05:00
Noam Postavsky
c07db054ec yas-x-prompt: remove dead code 2014-03-04 21:46:05 -05:00
Noam Postavsky
4470110384 display-fn isn't actually used for filtering 2014-03-03 18:30:48 -05:00
Joao Tavora
4d220f726a Remove an obsolete hack notice
* yasnippet.el (yas-x-prompt): Remove hack notice.
2014-03-03 08:53:20 +00:00
Joao Tavora
1fc858fac6 Remove experimental Changelog file
The Changelog format is good but having a file for it is not. The same
format can be had in messages by having using vc-dir and C-x 4 a. A
temporary dummy changelog appears and that content goes to the git log
message, which is just as good in content and much better in form.
2014-03-03 08:53:04 +00:00
Noam Postavsky
3744f92ad2 avoid double choices reversing
Both yas-choose-value the yas-prompt-functions were reversing
values (cancelling each other out), instead just keep the choices in
order the whole time.
2014-03-02 11:18:54 -05:00
João Távora
83c174c96c Merge pull request #464 from kidd/master
yasnippet templates don't add newlines
2014-02-27 15:03:37 +00:00
Raimon Grau
c128580598 yasnippet templates don't add newlines 2014-02-27 12:34:55 +01:00
Noam Postavsky
987942c513 update snippets submodule 2014-02-23 15:02:37 -05:00
Joao Tavora
0f8c2ab438 Add yas-after-reload-hook' and run it at the end of yas-reload-all'
See https://github.com/pezra/rspec-mode/pull/75 for the discussion leading up to
this change.
2014-01-06 18:09:51 +00:00
Xiao Hanyu
3002043496 Sync git submodule for yasmate repo 2013-12-31 16:00:38 +00:00
Joao Tavora
12b7f82dd8 Add Travis CI and update tests. Start a Changelog.
* .travis.yml: new file

* README.mdown: Add Travis CI badge.

* Rakefile: use ert-run-tests-batch-and-exit.

* yasnippet-tests.el (example-for-issue-404-external-emacs): Use
`yas-with-snippet-dirs' to not depend on bundled snippets.
(yas--call-with-temporary-redefinitions): Use `cl-labels' since no
cl-flet in emacs-24.3's cl-lib.el.
(loading-with-cyclic-parenthood): prog-mode doesn't exist in emacs
24.3.
(yas-batch-run-tests): remove it.

* yasnippet.el (require): require cl-lib during byte-compilation
and load.
2013-12-31 15:58:21 +00:00
João Távora
f94c38eade Merge pull request #449 from nibua-r/https-submodules
Use https instead of ssh for submodules access
2013-12-26 11:38:51 -08:00
Noam Postavsky
78c8b5eb80 yas--document-symbol: fix no transform case
was causing YASnippetnippet
2013-12-24 11:49:24 -05:00
Noam Postavsky
df58222fe6 yas--document-symbols: respect level arg, raise to 1 2013-12-24 11:36:16 -05:00
Noam Postavsky
e190b088f0 Rakefile: don't fail with EMACS=t env setting
This lets it work from M-x shell.
2013-12-24 11:27:57 -05:00
Noam Postavsky
22773c77a0 add a link to the symbol reference in top menu 2013-12-24 11:14:57 -05:00
Noam Postavsky
24d7a67932 fix typo 2013-12-24 11:14:39 -05:00
Joao Tavora
c18672a227 Closes #447: only call command beyond yasnippet if it exists 2013-12-24 09:43:56 +00:00
Renaud AUBIN
49166572c8 Use https instead of ssh for submodules access
To enable direct access through a proxy, the submodules url definitions
need to use https instead of ssh.
2013-12-24 09:57:30 +01: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
João Távora
ba0b02fb3e Merge pull request #446 from dongxiong/patch-2
Remove one extra `yas-text` exportation
2013-12-20 03:12:02 -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
Noam Postavsky
46b4a02673 doc:upload stylesheets/*.css to gh-pages 2013-12-10 23:10:16 -05:00
Noam Postavsky
b944cc9b12 fix rake doc:upload 2013-12-10 23:02:53 -05:00
Noam Postavsky
260ecf9c3a fix a faq title 2013-12-10 22:52:34 -05:00
Noam Postavsky
d89e837d68 add top level menu, minimal styling 2013-12-10 22:50:49 -05:00
Noam Postavsky
7518cb4621 rake doc:upload: check for wrong/incomplete rev 2013-12-06 13:00:40 -05:00