173 Commits

Author SHA1 Message Date
capitaomorte
cc0211316e Checking in still largely failing attempt on nested placeholders,,, 2008-09-08 08:42:14 +00:00
Zhang Chiyuan
535a1ef314 Added $> support, fixed issue 16 2008-09-02 13:06:51 +00:00
capitaomorte
cca2df173d * Added a new section "Field-level undo functionality" to correct
issue 33.

* Added functions `yas/field-undo-before-hook',
  `yas/field-undo-after-hook', `yas/field-undo-group-text-change' and
  variables `yas/field-undo-history',
  `yas/field-undo-forbidden-commands' to implement field-level undo.

* Modified `yas/cleanup-snippet' to record the actual snippet end
  in the snippet before cleaning up the main overlay.

* New hooks `yas/field-undo-before-hook' and
  `yas/field-undo-after-hook' added to `pre-command-hook' and
  `post-command-hook', respectively.

* Slightly changed the commentary of the "Snippet register and
  unregister routines section"

* Modified step 12 to call `yas/undo-expand-snippet' without the
  `(point-min)' argument, which led to incorrect undo behaviour.

* Added a new step in `yas/expand-snippet' describing the local
  restore and save of undo infomation in a new slot of the
  `yas/snippet' structure. This is step 14, previous 14 was moved to 15.

* Modified `yas/undo-expand-snippet' to kill text up to the the
  correct snippet end, which was not being calculated correctly. It is
  now a slot of the snippet itself and no longer a parameter.

* Added functions `yas/current-field-text',
  `yas/replace-fields-with-value',
  `yas/remove-recent-undo-from-history' to refactor some code used
  twice or more.

* Modified `yas/check-cleanup-snippet' to detect trigger cleanup
  if point exits any primary snippet field, of any
  group. Previously cleanup would only be triggered on exiting
  all groups. This is a follow-up to issue 28.

* Added two slot to the `yas/snippet' structure to allow for
  field-level undo and correct small bug in the previous fix of issue
  28.

* Modified `yas/cleanup-snippet' to call
  `yas/after-exit-snippet-hook' as a follow-up to feedback on
  issue 28.

* (Accidentaly :) changed (but corrected!) indentation of most
  existing functions. This was done by a buffer global indent-region.

* (Accidentaly :) ran `checkdoc' but then gave up, it's
  uncessary. Didn't change much stuff though.
2008-08-30 19:33:16 +00:00
capitaomorte
b8e187b5b6 * Fixed issue 28,
http://code.google.com/p/yasnippet/issues/detail?id=28

* Added snippet registration routines `yas/register-snippet',
  `yas/unregister-snippet', `yas/cleanup-snippet',
  `yas/exterminate-snippets' and `yas/check-cleanup-snippet'

* Adjusted existing code to call these routines.

* Added some commentary to explain functionality.
2008-08-22 17:09:16 +00:00
Zhang Chiyuan
e6276da02a Raise an error when yas/load-directory get a parameter that is not a directory. 2008-08-20 15:32:02 +00:00
Zhang Chiyuan
36184e0bc7 forget to commit for 0.5.6? 2008-08-08 05:04:42 +00:00
Zhang Chiyuan
de67b5802f Make the environment of elisp evaluation more friendly to (current-column) 2008-08-06 08:52:36 +00:00
Zhang Chiyuan
b3aa297b95 use full key extension as "name" when no "name" property defined. 2008-08-01 05:04:47 +00:00
Zhang Chiyuan
e9cd192bda Use filename for snippet name if no "name" property is defined. 2008-07-31 07:05:53 +00:00
Zhang Chiyuan
6ea153b0df add markdown-mode to known modes 2008-06-18 04:06:26 +00:00
Zhang Chiyuan
395e0a93e7 Added directory to yas/root-directory automatically when loaded. 2008-05-22 05:39:56 +00:00
Zhang Chiyuan
31865ae984 Oops, forget to check in the latest changes since 0.5.3 2008-05-21 06:52:50 +00:00
Zhang Chiyuan
72790f649d add python-mode-hook to extra-mode-hooks 2008-05-15 02:04:29 +00:00
Zhang Chiyuan
4a178dadd8 Added ox-mode-hook to extra-mode-hooks 2008-05-13 23:09:26 +00:00
Zhang Chiyuan
bd82705b0d fix a bug of condition system 2008-05-02 15:32:19 +00:00
Zhang Chiyuan
0e1456f4b8 fix a bug in condition system. 2008-05-01 03:21:32 +00:00
Zhang Chiyuan
db6a74078f fix indent (was 3 spaces) of snippets for python-mode 2008-04-25 15:01:39 +00:00
Zhang Chiyuan
aea245c70e fix bug: comparing string to symbol using string= 2008-04-20 08:25:14 +00:00
Zhang Chiyuan
208ca3de44 Use a beautiful css style for the document. release as 0.5.1 2008-04-14 12:42:08 +00:00
Zhang Chiyuan
024c04fab0 load snippets from menu bar 2008-04-11 04:04:46 +00:00
Zhang Chiyuan
5bd14c4b18 yas/root-directory now can contains a list of directories 2008-04-11 03:58:40 +00:00
Zhang Chiyuan
7591c6e588 rename fall-back to fallback 2008-04-10 05:40:30 +00:00
Zhang Chiyuan
88bc80164f YASnippet now integrate with hippie-expand 2008-04-10 05:30:23 +00:00
Zhang Chiyuan
bca01e5638 the behavior when no snippet is found is now customizable through `yas/fall-back-behavior' 2008-04-10 05:11:01 +00:00
Zhang Chiyuan
3deb5c9481 default condition won't expand a snippet in string or comment. 2008-04-10 04:50:00 +00:00
Zhang Chiyuan
6f220b1243 avoid the problem where the condition is evaluated twice 2008-04-10 04:39:56 +00:00
Zhang Chiyuan
60cf669105 now you can C-w to delete the overlay without causing problems. 2008-04-10 04:30:52 +00:00
Zhang Chiyuan
2d56844711 prepare for 0.4.5 2008-04-07 10:43:49 +00:00
Zhang Chiyuan
b9f3509252 incorporate the latest dropdown-list.el 2008-04-07 10:35:50 +00:00
Zhang Chiyuan
87d81f8639 add <backtab> to keymap of back navigating 2008-04-07 02:27:30 +00:00
Zhang Chiyuan
fdb17ae897 add actionscript-mode-hook to extra-mode-hooks 2008-03-28 10:54:44 +00:00
Zhang Chiyuan
72be6f0fc2 bug fix: infinite recursion when several snippets overlaps. 2008-03-27 08:25:37 +00:00
Zhang Chiyuan
6c521b97d2 prepare for 0.4.4 2008-03-24 02:28:25 +00:00
Zhang Chiyuan
0beb4b3f56 bug fix: dropdown-list.el doesn't recognize <return> key. 2008-03-24 01:31:04 +00:00
Zhang Chiyuan
07bada8634 bug fix: failed to recognize user customized yas/trigger-key 2008-03-23 00:45:08 +00:00
Zhang Chiyuan
e0a2762d9c prepare for 0.4.2 2008-03-22 11:01:18 +00:00
Zhang Chiyuan
1322a96414 prepare for 0.4.1 2008-03-21 15:29:17 +00:00
Zhang Chiyuan
aedf0e230b use a hook to ensure yas/minor-mode's keybinding always takes priority. 2008-03-21 15:22:39 +00:00
Zhang Chiyuan
aa21a5da7a remove php-mode-hook from black list 2008-03-20 15:42:07 +00:00
Zhang Chiyuan
62b10948e7 more document for selecting a snippet 2008-03-20 15:12:58 +00:00
Zhang Chiyuan
11a716c3b6 better doc string for yas/buffer-local-condition 2008-03-20 13:36:33 +00:00
Zhang Chiyuan
67dc9d7518 more powerful condition system 2008-03-20 13:24:39 +00:00
Zhang Chiyuan
21c98d141a more document 2008-03-20 12:10:13 +00:00
Zhang Chiyuan
490848d9fe preparing for new rst format document 2008-03-20 09:53:06 +00:00
Zhang Chiyuan
33c0cd5fe1 before expansion hook 2008-03-20 08:11:39 +00:00
Zhang Chiyuan
b2c59c0722 sophisticated condition system for yasnippet 2008-03-20 08:10:10 +00:00
Zhang Chiyuan
25ed4cdaa6 add php-mode to yas/extra-mode-hooks 2008-03-19 16:34:32 +00:00
Zhang Chiyuan
4abc6b08a7 use a separate mode-map for yas/minor-mode 2008-03-19 12:15:38 +00:00
Zhang Chiyuan
88bb0d5fd4 bugfix: Emacs get confused when a field content is deleted. 2008-03-17 01:29:03 +00:00
Zhang Chiyuan
1b45a9d545 more compatible with dropdown-list.el 2008-03-16 03:41:12 +00:00