When non-nil, some commands like 'describe-symbol' show more detailed
completions with more information in completion prefix and suffix.
+---
+*** User option 'completions-format' supports a new value 'one-column'.
+
---
*** New user option 'bibtex-unify-case-convert'.
This new option allows the user to customize how case is converted
"Define the appearance and sorting of completions.
If the value is `vertical', display completions sorted vertically
in columns in the *Completions* buffer.
-If the value is `horizontal', display completions sorted
-horizontally in alphabetical order, rather than down the screen."
- :type '(choice (const horizontal) (const vertical))
+If the value is `horizontal', display completions sorted in columns
+horizontally in alphabetical order, rather than down the screen.
+If the value is `one-column', display completions down the screen
+in one column."
+ :type '(choice (const horizontal) (const vertical) (const one-column))
:version "23.2")
(defcustom completions-detailed nil
(apply #'+ (mapcar #'string-width str))
(string-width str))))
(cond
+ ((eq completions-format 'one-column)
+ ;; Nothing special
+ )
((eq completions-format 'vertical)
;; Vertical format
(when (> row rows)
(font-lock-prepend-text-property
beg end 'face 'completions-annotations)))))
(cond
+ ((eq completions-format 'one-column)
+ (insert "\n"))
((eq completions-format 'vertical)
;; Vertical format
(if (> column 0)
(completions
(mapcar (lambda (s)
(let* ((s (query-replace-descr s))
- (b 0))
+ (b 0)
+ (limit (frame-width)))
;; Add ellipsis on leading whitespace
(when (string-match "\\`[[:space:]]+" s)
(setq b (match-end 0))
(add-text-properties 0 b `(display ,ellipsis) s))
;; Add ellipsis at the end of a long string
- (when (> (length s) (+ 40 b))
+ (when (> (length s) (+ limit b))
(add-text-properties
- (min (+ 40 b) (length s)) (length s)
+ (min (+ limit b) (length s)) (length s)
`(display ,ellipsis) s))
s))
read-from-kill-ring-history)))