add more buttons
This commit is contained in:
@@ -42,6 +42,15 @@
|
||||
"Button to run `keyboard-escape-quit'.")
|
||||
;; "Button to run `keyboard-quit'."
|
||||
|
||||
(defun my-tool-bar-function-revert (event)
|
||||
"Run `revert-buffer'."
|
||||
(interactive "e")
|
||||
(let ()
|
||||
(revert-buffer)))
|
||||
|
||||
(defvar my-tool-bar-button-revert "Revert "
|
||||
"Button to run `revert-buffer'.")
|
||||
|
||||
(defun my-tool-bar-function-fill (event)
|
||||
"Run `fill-region'."
|
||||
(interactive "e")
|
||||
@@ -92,6 +101,9 @@ You can hide these buttons by customizing `tab-bar-format' and removing
|
||||
menu-item ,my-tool-bar-button-cancle my-tool-bar-function-cancle
|
||||
:help "Cancle `keyboard-escape-quit'")
|
||||
(sep-1 menu-item ,(tab-bar-separator) ignore)
|
||||
(revert
|
||||
menu-item ,my-tool-bar-button-revert my-tool-bar-function-revert
|
||||
:help "Re-read current buffer from its file `revert-buffer'")
|
||||
(fill
|
||||
menu-item ,my-tool-bar-button-fill my-tool-bar-function-fill
|
||||
:help "Fill text in region to fit between left and right margin `fill-region'")
|
||||
@@ -155,6 +167,19 @@ See `icon-preference' for the order of type preference."
|
||||
:version "29.1"))
|
||||
(setq my-tool-bar-button-cancle (icon-string 'my-tool-bar-icon-cancle))
|
||||
|
||||
(unless (iconp 'my-tool-bar-icon-revert)
|
||||
(define-icon my-tool-bar-icon-revert nil
|
||||
`((image "refresh.xpm"
|
||||
:height (1.5 . em)
|
||||
:margin ,tab-bar-button-margin
|
||||
:ascent center)
|
||||
(text "Revert"
|
||||
;; :face tab-bar-tab-inactive
|
||||
))
|
||||
"Icon for revert buffer."
|
||||
:version "29.1"))
|
||||
(setq my-tool-bar-button-revert (icon-string 'my-tool-bar-icon-revert))
|
||||
|
||||
(unless (iconp 'my-tool-bar-icon-fill)
|
||||
(define-icon my-tool-bar-icon-fill nil
|
||||
`((image "newsticker/narrow.xpm"
|
||||
|
||||
Reference in New Issue
Block a user