From: Ted Zlatanov Date: Wed, 5 Jun 2013 18:30:47 +0000 (-0400) Subject: (prog-prettify-symbols) (prog-prettify-install): Update docstrings. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~66 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9bfff84bf73ecebdcdc936e3e3c43ebac0157e21;p=emacs.git (prog-prettify-symbols) (prog-prettify-install): Update docstrings. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8bf63a4bbb0..acc7d6566d3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-06-05 Teodor Zlatanov + + * progmodes/prog-mode.el (prog-prettify-symbols) + (prog-prettify-install): Update docstrings. + 2013-06-05 Stefan Monnier * simple.el: Move all the prog-mode code to prog-mode.el. diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index c1e2857eb89..483d1cd9cda 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -58,8 +58,8 @@ instead." (defcustom prog-prettify-symbols nil "Whether symbols should be prettified. -When set to an alist in the form `(STRING . CHARACTER)' it will -augment the mode's native prettify alist." +When set to an alist in the form `((STRING . CHARACTER)...)' it +will augment the mode's native prettify alist." :type '(choice (const :tag "No thanks" nil) (const :tag "Mode defaults" t) @@ -96,6 +96,12 @@ Regexp match data 0 points to the chars." (0 (prog--prettify-font-lock-compose-symbol ',alist))))))) (defun prog-prettify-install (alist) +"Install prog-mode support to prettify symbols according to ALIST. + +ALIST is in the format `((STRING . CHARACTER)...)' like +`prog-prettify-symbols'. + +Internally, `font-lock-add-keywords' is called." (setq-local prog-prettify-symbols-alist alist) (let ((keywords (prog-prettify-font-lock-symbols-keywords))) (if keywords (font-lock-add-keywords nil keywords))))