mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
Fix yas--message verbosity levels
The yas--message function was comparing with `>' instead of `>=', which meant it was quieter than intended (i.e., level 3 message were being suppressed by defualt). Also push the "Snippet %d exited" message up to level 4, so the net effect should actually be quieter than before for normal usage (the only level 3 messages are now for loading and saving snippets). * yasnippet.el (yas--message): Fix off-by-1 error. (yas--load-snippet-dirs): Lowest yas--message level should be 1, not 0. (yas--commit-snippet): "Snippet %d exited" is more of a debug message, put it at level 4.
This commit is contained in:
parent
3129040fe3
commit
dc098cf23e
@ -1836,7 +1836,7 @@ prompt the user to select one."
|
|||||||
(yas--message 4 "Loaded %s" directory)
|
(yas--message 4 "Loaded %s" directory)
|
||||||
(yas--message 4 "Prepared just-in-time loading for %s" directory)))
|
(yas--message 4 "Prepared just-in-time loading for %s" directory)))
|
||||||
(t
|
(t
|
||||||
(push (yas--message 0 "Check your `yas-snippet-dirs': %s is not a directory" directory) errors)))))
|
(push (yas--message 1 "Check your `yas-snippet-dirs': %s is not a directory" directory) errors)))))
|
||||||
errors))
|
errors))
|
||||||
|
|
||||||
(defun yas-reload-all (&optional no-jit interactive)
|
(defun yas-reload-all (&optional no-jit interactive)
|
||||||
@ -3215,7 +3215,7 @@ This renders the snippet as ordinary text."
|
|||||||
;; again from `yas--take-care-of-redo'....
|
;; again from `yas--take-care-of-redo'....
|
||||||
(setf (yas--snippet-fields snippet) nil)))
|
(setf (yas--snippet-fields snippet) nil)))
|
||||||
|
|
||||||
(yas--message 3 "Snippet %s exited." (yas--snippet-id snippet)))
|
(yas--message 4 "Snippet %s exited." (yas--snippet-id snippet)))
|
||||||
|
|
||||||
(defun yas--safely-run-hooks (hook-var)
|
(defun yas--safely-run-hooks (hook-var)
|
||||||
(condition-case error
|
(condition-case error
|
||||||
@ -4432,8 +4432,8 @@ object satisfying `yas--field-p' to restrict the expansion to.")))
|
|||||||
"Log level for `yas--message' 4 means trace most anything, 0 means nothing.")
|
"Log level for `yas--message' 4 means trace most anything, 0 means nothing.")
|
||||||
|
|
||||||
(defun yas--message (level message &rest args)
|
(defun yas--message (level message &rest args)
|
||||||
"When LEVEL is above `yas-verbosity-level', log MESSAGE and ARGS."
|
"When LEVEL is at or below `yas-verbosity-level', log MESSAGE and ARGS."
|
||||||
(when (> yas-verbosity level)
|
(when (>= yas-verbosity level)
|
||||||
(message "%s" (apply #'yas--format message args))))
|
(message "%s" (apply #'yas--format message args))))
|
||||||
|
|
||||||
(defun yas--warning (format-control &rest format-args)
|
(defun yas--warning (format-control &rest format-args)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user