From 2e269860c48696ca6fd0a76315a85ca3fd1ee3bc Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Sun, 28 Sep 2014 00:59:08 +0400 Subject: emacs: Support font-locking. Avoid breaking highlighting after adding new font-lock keywords. * emacs/guix-base.el (guix-insert-package-strings): Use 'propertize' instead of 'guix-get-string'. * emacs/guix-info.el (guix, guix-action, guix-file, guix-url, guix-package-location, guix-package-name): New button types. (guix-info-insert-action-button, guix-info-insert-file-path, guix-info-insert-url, guix-package-info-insert-location, guix-package-info-insert-full-names, guix-package-info-insert-non-unique-text): Adjust for 'guix-insert-button' and button types. (guix-package-info-name-button): New face. (guix-package-info-define-insert-inputs): Use it. Add new button types. (guix-package-info-insert-full-name): Remove. * emacs/guix-utils.el (guix-get-string): Replace 'face' with 'font-lock-face'. (guix-insert-button): Adjust for using button types. --- emacs/guix-base.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'emacs/guix-base.el') diff --git a/emacs/guix-base.el b/emacs/guix-base.el index 98ee315688..98ce0bcb49 100644 --- a/emacs/guix-base.el +++ b/emacs/guix-base.el @@ -673,7 +673,7 @@ ENTRIES is a list of package entries to get info about packages." (defun guix-insert-package-strings (strings action) "Insert information STRINGS at point for performing package ACTION." (when strings - (insert "Package(s) to " (guix-get-string action 'bold) ":\n") + (insert "Package(s) to " (propertize action 'face 'bold) ":\n") (mapc (lambda (str) (insert " " str "\n")) strings) -- cgit v1.2.3