Add ansi-color function
This commit is contained in:
parent
3723589363
commit
442bad66a4
@ -581,6 +581,16 @@ Convenience macro to run some code in a particular default-directory:
|
|||||||
(concat result (substring alnum i (1+ i))))))))
|
(concat result (substring alnum i (1+ i))))))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
A handy function to colorize a buffer with ANSI escape characters in it:
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defun ansi-color (&optional begin end)
|
||||||
|
(interactive)
|
||||||
|
(let ((begin (or begin (point-min)))
|
||||||
|
(end (or end (point-max)))
|
||||||
|
(inhibit-read-only t))
|
||||||
|
(ansi-color-apply-on-region begin end)))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Persisting variables between session
|
** Persisting variables between session
|
||||||
The idea behind this is pretty simple - variables get persisted in ~/.emacs.d/<persisted-vars-file> as a plist of (variable-name variable-value).
|
The idea behind this is pretty simple - variables get persisted in ~/.emacs.d/<persisted-vars-file> as a plist of (variable-name variable-value).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user