From 004600e0142fb6f9c7ab492f855ee9668bb0421e Mon Sep 17 00:00:00 2001 From: shipmints Date: Mon, 27 Jan 2025 11:16:04 -0500 Subject: [PATCH] Add new user option bookmark-bmenu-type-column-width * lisp/bookmark.el (bookmark-bmenu-mode): Add new user option bookmark-bmenu-type-column-width, defaulting to 8 for backwards compatibility, and use it when creating the tabulated bookmark list. (Bug#75826) --- etc/NEWS | 8 ++++++++ lisp/bookmark.el | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 5b9e356737e..05008a5524b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -451,6 +451,14 @@ Such bindings make it possible to compute which function to bind to FUNC. If 'whitespace-style' includes 'missing-newline-at-eof' (which is the default), the 'whitespace-cleanup' function will now add the newline. +** Bookmark + +--- +*** New user option 'bookmark-bmenu-type-column-width'. +This user option controls the width of the type column on the bookmark +menu 'bookmark-bmenu-list'. The default value is 8 which is backwards +compatible. + ** Gnus --- diff --git a/lisp/bookmark.el b/lisp/bookmark.el index d68e9308208..c86101217d6 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -165,6 +165,10 @@ This includes the annotations column.") You can toggle whether files are shown with \\\\[bookmark-bmenu-toggle-filenames]." :type 'natnum) +(defcustom bookmark-bmenu-type-column-width 8 + "Column width for bookmark type in a buffer listing bookmarks." + :type 'natnum + :version "31.1") (defcustom bookmark-bmenu-toggle-filenames t "Non-nil means show filenames when listing bookmarks. @@ -2061,7 +2065,7 @@ At any time you may use \\[revert-buffer] to go back to sorting by creation orde `[("" 1) ;; Space to add "*" for bookmark with annotation ("Bookmark Name" ,bookmark-bmenu-file-column bookmark-bmenu--name-predicate) - ("Type" 8 bookmark-bmenu--type-predicate) + ("Type" ,bookmark-bmenu-type-column-width bookmark-bmenu--type-predicate) ,@(if bookmark-bmenu-toggle-filenames '(("File" 0 bookmark-bmenu--file-predicate)))]) (setq tabulated-list-padding bookmark-bmenu-marks-width)