読者です 読者をやめる 読者になる 読者になる

*iroi*

mechairoi の Blog

anything.el で (processp candidates)のときmultilineにならない?

anything.el で source が (processp candidates)のときmultilineにならない気がしたので..

--- a/.emacs.d/auto-install/anything.el
+++ b/.emacs.d/auto-install/anything.el
@@ -2265,7 +2265,12 @@ the real value in a text property."
                        (split-string string "\n")
                        (assoc 'incomplete-line source))
                       source t))
-    (anything-insert-match candidate 'insert-before-markers source)
+    (if (not (assq 'multiline source))
+        (anything-insert-match candidate 'insert-before-markers source)
+      (lexical-let ((start (point)))
+        (anything-insert-candidate-separator)
+        (anything-insert-match candidate 'insert-before-markers source)
+        (put-text-property start (point) 'anything-multiline t)))
     (incf (cdr (assoc 'item-count source)))
     (when (>= (assoc-default 'item-count source) limit)
       (anything-kill-async-process process)

追記
取り込んでいただきました!ありがとうございます。