Skip to content

Commit

Permalink
Make command log colorful
Browse files Browse the repository at this point in the history
Add two faces - one for keys and one for commands.
  • Loading branch information
Bar Magal committed Dec 8, 2015
1 parent 7408c0c commit 71fb603
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions command-log-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ Frequently used non-interesting commands (like cursor movements) should be put h
(defgroup command-log nil
"Customization for the command log.")

(defface command-log-key
'((t (:foreground "cyan")))
"Face for keys in command log."
:group 'command-log)

(defface command-log-command
'((t (:foreground "pale green")))
"Face for commands in command log."
:group 'command-log)

(defcustom command-log-mode-auto-show nil
"Show the command-log window or frame automatically."
:group 'command-log
Expand Down Expand Up @@ -266,11 +276,13 @@ Scrolling up can be accomplished with:
(insert
(propertize
(key-description (this-command-keys))
:time (format-time-string clm/time-string (current-time))))
:time (format-time-string clm/time-string (current-time))
'face 'command-log-key))
(when (>= (current-column) clm/log-command-indentation)
(newline))
(move-to-column clm/log-command-indentation t)
(princ cmd current)
(insert (propertize (format "%s" cmd)
'face 'command-log-command))
(newline)
(setq clm/last-keyboard-command cmd)))
(clm/scroll-buffer-window current))))))
Expand Down

0 comments on commit 71fb603

Please sign in to comment.