summaryrefslogtreecommitdiff
path: root/emacs/guix-info.el
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-07-15 15:10:32 -0400
committerMark H Weaver <mhw@netris.org>2015-07-15 15:10:32 -0400
commit35995769b516d228793940c5333ad522de992a6c (patch)
tree366b81995e9afbf8f94ecf7d4237b325ec07a0a1 /emacs/guix-info.el
parentc6f909809aecb225b66dc27e4afd3ff46ec31a38 (diff)
parente03f6d5e956b348c142d0ffd9f89af845f05eb86 (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'emacs/guix-info.el')
-rw-r--r--emacs/guix-info.el17
1 files changed, 14 insertions, 3 deletions
diff --git a/emacs/guix-info.el b/emacs/guix-info.el
index bb21024c0c..f17ce01ab6 100644
--- a/emacs/guix-info.el
+++ b/emacs/guix-info.el
@@ -1,6 +1,7 @@
;;; guix-info.el --- Info buffers for displaying entries -*- lexical-binding: t -*-
-;; Copyright © 2014 Alex Kost <alezost@gmail.com>
+;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
+;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
;; This file is part of GNU Guix.
@@ -482,6 +483,12 @@ If nil, insert package in a default way.")
(defvar guix-package-info-heading-params '(synopsis description)
"List of parameters displayed in a heading along with name and version.")
+(defcustom guix-package-info-fill-heading t
+ "If nil, insert heading parameters in a raw form, without
+filling them to fit the window."
+ :type 'boolean
+ :group 'guix-package-info)
+
(defun guix-package-info-insert-heading (entry)
"Insert the heading for package ENTRY.
Show package name, version, and `guix-package-info-heading-params'."
@@ -494,8 +501,12 @@ Show package name, version, and `guix-package-info-heading-params'."
(face (guix-get-symbol (symbol-name param)
'info 'package)))
(when val
- (guix-format-insert val (and (facep face) face))
- (insert "\n\n"))))
+ (let* ((col (min (window-width) fill-column))
+ (val (if guix-package-info-fill-heading
+ (guix-get-filled-string val col)
+ val)))
+ (guix-format-insert val (and (facep face) face))
+ (insert "\n\n")))))
guix-package-info-heading-params))
(defun guix-package-info-insert-with-heading (entry)