Noam Postavsky [Thu, 12 May 2016 09:41:08 +0000 (05:41 -0400)]
Don't use major-mode syntax-propertize-function
during snippet creation. The snippet creation manipulates the
syntax-table which can lead to conflicts (see also
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23443).
* yasnippet.el (yas-expand-snippet): Let-bind syntax-propertize-function
to nil and then call syntax-ppss-flush-cache afterwards.
Noam Postavsky [Thu, 12 May 2016 08:57:08 +0000 (04:57 -0400)]
Fix field transform application in yas-next-field
* yasnippet.el (yas--apply-transform): Don't let-bind yas-moving-away-p
to nil, it's nil by default.
(yas-next-field): Call `yas--field-update-display' instead of only
calling `yas--eval-lisp' so that the result of the transform is inserted
into the buffer.
Noam Postavsky [Tue, 10 May 2016 16:21:14 +0000 (12:21 -0400)]
Fix outdated and misformatted docs
yas-find-snippets was removed by [1].
* doc/snippet-development.org: Add keybindings on same line as command
names, fixup intra document links, and remove mention of non-existent
command yas-find-snippets.
* yasnippet.el (yas-load-snippet-buffer):
(yas-load-snippet-buffer-and-close): Fix docstring formatting.
Andrew Hyatt [Tue, 10 May 2016 03:21:15 +0000 (23:21 -0400)]
Version 1.6, mostly fixes for fragmented headers.
* websocket.el (websocket-verify-response-code, websocket-outer-filter):
Fix handling of fragmented headers.
* websocket.el (websocket-server): Accept host for listening on.
* websocket-functional-test.el: Stop stopping the listener process on
Windows.
Noam Postavsky [Sun, 8 May 2016 19:32:20 +0000 (15:32 -0400)]
Document $> and fix escaping
* doc/snippet-development.org: New "Indentation markers" section.
* yasnippet-tests.el (indentation-markers): New test.
* yasnippet.el (yas--indent-markers): New variable.
(yas--indent): Use it instead of searching for $> directly.
(yas--indent-parse-create): New function, records occurences of $> into
`yas--indent-markers'.
(yas--snippet-parse-create): Call it.
Noam Postavsky [Wed, 4 May 2016 16:35:48 +0000 (12:35 -0400)]
Don't indent empty lines in snippet expansion
* yasnippet.el (yas--indent-region): Indent only non-empty lines.
* yasnippet-tests.el (basic-indentation): Add empy and non-empty (but
blank) lines in test snippet.
Make sure output that occurs in normal use goes to verbosity levels 3 or
higher, and level 2 and below are reserved for something unexpected
happening. Level 3 (the new default) should be a reasonably quiet but
informative level.
* yasnippet.el (yas--read-keybinding, yas--safely-run-hooks):
(yas--on-protection-overlay-modification): Put warnings at verbosity
level 2.
(yas--load-yas-setup-file, yas-load-directory):
(yas--load-directory-1, yas--load-snippet-dirs):
(yas-expand-snippet, yas--load-pending-jits): Put per-file loading and
other debug messages at level 4.
(yas-load-snippet-buffer, yas--template-get-file, yas-reload-all): Put
top level loading messages at level 3 (or 2 if there were errors).
(yas--define-menu-1, yas-insert-snippet, yas-tryout-snippet): Put error
messages at level 1.
(yas-verbosity): Reduce default verbosity to level 3.
Noam Postavsky [Sun, 1 May 2016 02:29:57 +0000 (22:29 -0400)]
Fix some doc formatting
* doc/snippet-development.org (Template Syntax):
(Placeholder fields, Mirrors): Text inside dedicated target <<angle
brackets>> does not show up in output, so duplicate it. Add
descriptions to avoid getting numbers instead of names in links.
Noam Postavsky [Sun, 1 May 2016 02:11:49 +0000 (22:11 -0400)]
Support htmlize.el in Rakefile doc target
Htmlized output can now be produced by
rake doc[/path/to/htmlize/]
* Rakefile (doc): Add htmlize argument.
* doc/yas-doc-helper.el (yas--generate-html-batch): Tell org to use css
selectors only when exporting htmlized faces.
* doc/stylesheets/manual.css: Add styles for faces used by org export.
When inserting text due to a non-nil yas-wrap-around-region and the
snippet had fields occuring later in the buffer than $0, the insertion
of the text was shifting the location of later fields, thus invalidating
the calculation of yas--dollar-regions.
* yasnippet.el (yas--simple-mirror-parse-create): Don't insert text fo
yas-wrap-around-region here.
(yas--snippet-parse-create): Do it here, after deleting
`yas--dollar-regions`, instead.
Disabling this for trigger key introduced an inconsistency that is more
complicated to implement and document than simply fixing region wrapping
for trigger key expanded snippets.
Noam Postavsky [Thu, 10 Dec 2015 04:15:39 +0000 (23:15 -0500)]
Add register option for yas-wrap-around-region
Replace `cua' setting with more general behaviour that can use any given
register. A `cua' setting is converted to ?0 for backwards
compatibility.
* yasnippet.el (yas--simple-mirror-parse-create): Use contents of any
register depending on `yas-wrap-around-region' value.
(yas-wrap-around-region): Update docstring.
João Távora [Fri, 4 Mar 2016 17:34:40 +0000 (17:34 +0000)]
Indent multi-line output from mirrors
* yasnippet.el (yas--indent-region): Adapted and redesigned from
`yas--indent-according-to-mode'
(yas--indent-according-to-mode): Deleted.
(yas--indent): Use `yas--indent-region'.
(yas--real-line-beginning): Deleted.
(yas--update-mirrors): Always re-place active field overlay if it
exists. Pass the snippet to `yas--mirror-update-display'.
(yas--mirror-update-display): Indent the mirror text after
inserting the reflection.
* dired-async.el (dired-async-operation): Removed no more needed.
(dired-async-failures): New face.
(dired-async-mode-line-message): Use one more arg FACE.
(dired-async-after-file-create): Handle failures.
(dired-async-create-files): Pass failures args to callback.
Remove code that is now never called since when the mode is turned off
and we are no more async the job is delegated again to old dired function.
* async-bytecomp.el (async-byte-recompile-directory): Do it.
* dired-async.el (dired-async-create-files): Do it.
* smtpmail-async.el (async-smtpmail-send-it): Do it.
cc-mode fill paragraph narrows to the paragraph being filled. This
causes problems if there is a mirror needing to be updated outside of
the current paragraph.
* yasnippet-tests.el: New test.
* yasnippet.el (yas--update-mirrors): Widen while updating the mirrors.
(ampc-current-playlist-mode): Set font-lock-defaults instead.
(ampc-item-mode): Remove broken highlight rule.
(ampc-handle-status): Use font-lock-flush when available.
Stefan Monnier [Wed, 27 Apr 2016 13:39:46 +0000 (09:39 -0400)]
* debbugs: Use cl-lib. Use lexical-binding when available
* debbugs-gnu.el: Only require subr-x at compile time. Use cl-lib.
(debbugs-gnu-print-entry): Remove unused var `title-length'.
(debbugs-gnu-sort-title): Mark `s2' as unused.
* debbugs-org.el (debbugs-gnu): Use cl-lib.
* debbugs.el: Add `cl-lib' as dependency. Use cl-lib.
(debbugs-soap-invoke-async): Mark `args' as unused.
* packages/debbugs/debbugs-gnu.el (debbugs-gnu-patches): New command.
(debbugs-gnu-get-bugs): Remove the "user tags" cond -- it didn't
allow us to search for bugs with specific tags.
* packages/debbugs/debbugs-gnu.el (debbugs-gnu-insert-changelog):
When handling git-formatted patches, get all the info from the
patches automatically.