Skip to content

Commit

Permalink
Fixing MELPA style issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosemer committed Nov 22, 2023
1 parent 6f4ed86 commit 3219c6c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions window-tool-bar.el
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,20 @@

;;;###autoload
(defun window-tool-bar-string ()
"Return a (propertized) string for the tool bar.
This is for when you want more customizations than
`window-tool-bar-mode' provides. Commonly added to
`tab-line-format', `header-line-format', or `mode-line-format'"
(let ((toolbar-menu (cdr (keymap-global-lookup "<tool-bar>"))))

Check failure on line 26 in window-tool-bar.el

View workflow job for this annotation

GitHub Actions / test (29.1, true)

You should depend on (emacs "29.1") or the compat package if you need ‘keymap-global-lookup’.
(mapconcat #'window-tool-bar--keymap-entry-to-string toolbar-menu " ")))

(defun window-tool-bar--keymap-entry-to-string (menu-item)
"Convert MENU-ITEM into a (propertized) string representation."
"Convert MENU-ITEM into a (propertized) string representation.
MENU-ITEM: Menu item to convert. See info node (elisp)Tool Bar."
(pcase menu-item

Check failure on line 33 in window-tool-bar.el

View workflow job for this annotation

GitHub Actions / test (29.1, true)

You should depend on (emacs "24.1") if you need ‘pcase’.
(`(,key menu-item ,name . ,props)
(`(,key menu-item ,name . ,_)
;; Normal menu item, turn into propertized string button
(let* ((str (format "[%s]" name))
(enable-form (plist-get menu-item :enable))
Expand Down Expand Up @@ -71,6 +78,7 @@
(setq tab-line-format nil)))

(defun window-tool-bar--turn-on ()
"Internal function called by `global-window-tool-bar-mode'."
(window-tool-bar-mode 1))

;;;###autoload
Expand Down

0 comments on commit 3219c6c

Please sign in to comment.