branch: elpa/aidermacs commit 976115dcbc2396395074a8d49def04da5a70a674 Author: Troy Hinckley <t.mac...@gmail.com> Commit: Troy Hinckley <t.mac...@gmail.com>
Replace series of dash characters with a single separator This enables a nicer division between commands that also scales with the window width --- aider.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/aider.el b/aider.el index 6028cc848d..b6af459d4a 100644 --- a/aider.el +++ b/aider.el @@ -31,6 +31,16 @@ :type '(repeat string) :group 'aider) +(defface aider-command-separator + '((((type graphic)) :strike-through t :extend t) + (((type tty)) :inherit font-lock-comment-face :underline t :extend t)) + "Face for command separator in aider." + :group 'aider) + +(defvar aider-font-lock-keywords '(("^\x2500+\n?" 0 '(face aider-command-separator) t) + ("^\x2500+" 0 '(face nil display (space :width 2)))) + "Font lock keywords for aider buffer.") + (defun aider-plain-read-string (prompt &optional initial-input) "Read a string from the user with PROMPT and optional INITIAL-INPUT. This function can be customized or redefined by the user." @@ -107,7 +117,7 @@ If not in a git repository, an error is raised." ;; Optionally, you can set the mode or add hooks here (with-current-buffer buffer-name (comint-mode) - )) + (font-lock-add-keywords nil aider-font-lock-keywords t))) ;; Switch to the buffer (pop-to-buffer buffer-name)))