diff options
author | Alex Kost <alezost@gmail.com> | 2015-11-17 22:10:46 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2016-01-02 17:25:35 +0300 |
commit | 36c00c61fa257f5177ba9bc54a2d57191b70909f (patch) | |
tree | f0f9da8afa5891b08b5a60fc1e6433fcc49c133e /emacs/guix-info.el | |
parent | 778437ed9f4586370512768f06bfd9c33c3906a2 (diff) | |
download | guix-36c00c61fa257f5177ba9bc54a2d57191b70909f.tar guix-36c00c61fa257f5177ba9bc54a2d57191b70909f.tar.gz |
emacs: Add 'guix-with-indent'.
* emacs/guix-utils.el (guix-with-indent): New macro.
(guix-memoized-font-lock-keywords): Rename to...
(guix-utils-font-lock-keywords): ... this. Add it.
* emacs/guix-info.el (guix-info-insert-entry-default): Use it.
Diffstat (limited to 'emacs/guix-info.el')
-rw-r--r-- | emacs/guix-info.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/emacs/guix-info.el b/emacs/guix-info.el index 1c7e79b954..c9054e18be 100644 --- a/emacs/guix-info.el +++ b/emacs/guix-info.el @@ -219,13 +219,11 @@ ENTRIES should have a form of `guix-entries'." "Insert ENTRY of ENTRY-TYPE into the current info buffer. If INDENT-LEVEL is non-nil, indent displayed information by this number of `guix-info-indent' spaces." - (let ((region-beg (point))) + (guix-with-indent (* (or indent-level 0) + guix-info-indent) (mapc (lambda (param) (guix-info-insert-param param entry entry-type)) - (guix-info-get-displayed-params entry-type)) - (when indent-level - (indent-rigidly region-beg (point) - (* indent-level guix-info-indent))))) + (guix-info-get-displayed-params entry-type)))) (defun guix-info-insert-entry (entry entry-type &optional indent-level) "Insert ENTRY of ENTRY-TYPE into the current info buffer. |