add tool bar icons next and prev. buffer
This commit is contained in:
@@ -50,6 +50,22 @@
|
||||
"Button to run `keyboard-escape-quit'.")
|
||||
;; "Button to run `keyboard-quit'."
|
||||
|
||||
(defun my-tool-bar-function-previous-buffer (event)
|
||||
"Run `previous-buffer'."
|
||||
(interactive "e")
|
||||
(let ()
|
||||
(previous-buffer)))
|
||||
(defvar my-tool-bar-button-previous-buffer "Previous buffer "
|
||||
"Button to run `previous-buffer'.")
|
||||
|
||||
(defun my-tool-bar-function-next-buffer (event)
|
||||
"Run `next-buffer'."
|
||||
(interactive "e")
|
||||
(let ()
|
||||
(next-buffer)))
|
||||
(defvar my-tool-bar-button-next-buffer "Next buffer "
|
||||
"Button to run `next-buffer'.")
|
||||
|
||||
(defun my-tool-bar-function-revert (event)
|
||||
"Run `revert-buffer'."
|
||||
(interactive "e")
|
||||
@@ -116,6 +132,14 @@
|
||||
(defvar my-tool-bar-button-fill "Comment "
|
||||
"Button to run `comment-or-uncomment-region'.")
|
||||
|
||||
(defun my-tool-bar-function-hide (event)
|
||||
"Run `my-org-hide'."
|
||||
(interactive "e")
|
||||
(let ()
|
||||
(my-org-hide) ))
|
||||
(defvar my-tool-bar-button-fill "(Un)hide "
|
||||
"Button to run `my-org-hide'.")
|
||||
|
||||
(defun my-tool-bar-function-spell (event)
|
||||
"Run `flyspell-mode' and `flyspell-buffer'."
|
||||
(interactive "e")
|
||||
@@ -171,19 +195,30 @@ You can hide these buttons by customizing `tab-bar-format' and removing
|
||||
:help (concat "Save as "
|
||||
(propertize "`my-org-export'"
|
||||
'face 'font-lock-constant-face)))
|
||||
(prev
|
||||
menu-item ,my-tool-bar-button-previous-buffer my-tool-bar-function-previous-buffer
|
||||
:help (concat "Previous buffer "
|
||||
(propertize "`previous-buffer'"
|
||||
'face 'font-lock-constant-face)))
|
||||
(next
|
||||
menu-item ,my-tool-bar-button-buffer-next my-tool-bar-function-buffer-next
|
||||
:help (concat "Next buffer "
|
||||
(propertize "`next-buffer'"
|
||||
'face 'font-lock-constant-face)))
|
||||
(cancle
|
||||
menu-item ,my-tool-bar-button-cancle my-tool-bar-function-cancle
|
||||
:help (concat "Cancle "
|
||||
(propertize "`keyboard-escape-quit'"
|
||||
'face 'font-lock-constant-face)))
|
||||
|
||||
(sep-1 menu-item ,(tab-bar-separator) ignore)
|
||||
|
||||
(revert
|
||||
menu-item ,my-tool-bar-button-revert my-tool-bar-function-revert
|
||||
:help (concat "Re-read current buffer from its file "
|
||||
(propertize "`revert-buffer'"
|
||||
'face 'font-lock-constant-face)))
|
||||
|
||||
(sep-1 menu-item ,(tab-bar-separator) ignore)
|
||||
|
||||
(undo
|
||||
menu-item ,my-tool-bar-button-undo my-tool-bar-function-undo
|
||||
:help (concat "Undo "
|
||||
@@ -219,6 +254,11 @@ You can hide these buttons by customizing `tab-bar-format' and removing
|
||||
:help (concat "Comment text in region "
|
||||
(propertize "`comment-or-uncomment-region'"
|
||||
'face 'font-lock-constant-face)))
|
||||
(comment
|
||||
menu-item ,my-tool-bar-button-hide my-tool-bar-function-hide
|
||||
:help (concat "(Un)hide elements "
|
||||
(propertize "`my-org-hide'"
|
||||
'face 'font-lock-constant-face)))
|
||||
|
||||
(sep-2 menu-item ,(tab-bar-separator) ignore)
|
||||
;; (sep-2 menu-item ,my-tool-bar-separator ignore
|
||||
@@ -324,6 +364,32 @@ 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-previous-buffer)
|
||||
(define-icon my-tool-bar-icon-previous-buffer nil
|
||||
`((image "Fluent-dark/go-previous-symbolic.svg"
|
||||
:height (1.5 . em)
|
||||
:margin ,tab-bar-button-margin
|
||||
:ascent center)
|
||||
(symbol "♺ ") ; ⮔ ♺
|
||||
(text "Prev-buffer "
|
||||
))
|
||||
"Icon for previous buffer."
|
||||
:version "29.1"))
|
||||
(setq my-tool-bar-button-previous-buffer (icon-string 'my-tool-bar-icon-previous-buffer))
|
||||
|
||||
(unless (iconp 'my-tool-bar-icon-next-buffer)
|
||||
(define-icon my-tool-bar-icon-next-buffer nil
|
||||
`((image "Fluent-dark/go-next-symbolic.svg"
|
||||
:height (1.5 . em)
|
||||
:margin ,tab-bar-button-margin
|
||||
:ascent center)
|
||||
(symbol "♺ ") ; ⮔ ♺
|
||||
(text "Next-buffer "
|
||||
))
|
||||
"Icon for next buffer."
|
||||
:version "29.1"))
|
||||
(setq my-tool-bar-button-next-buffer (icon-string 'my-tool-bar-icon-next-buffer))
|
||||
|
||||
(unless (iconp 'my-tool-bar-icon-revert)
|
||||
(define-icon my-tool-bar-icon-revert nil
|
||||
`((image ;; "refresh.xpm"
|
||||
@@ -449,6 +515,17 @@ See `icon-preference' for the order of type preference."
|
||||
:version "29.1"))
|
||||
(setq my-tool-bar-button-comment (icon-string 'my-tool-bar-icon-comment))
|
||||
|
||||
(unless (iconp 'my-tool-bar-icon-hide)
|
||||
(define-icon my-tool-bar-icon-hide nil
|
||||
`((image "Fluent-dark/display-no-filter-symbolic.svg"
|
||||
:height (1.5 . em)
|
||||
:margin ,tab-bar-button-margin
|
||||
:ascent center)
|
||||
(text "(Un)hide " ))
|
||||
"Icon for (un)hide elements."
|
||||
:version "29.1"))
|
||||
(setq my-tool-bar-button-hide (icon-string 'my-tool-bar-icon-hide))
|
||||
|
||||
(unless (iconp 'my-tool-bar-icon-spell)
|
||||
(define-icon my-tool-bar-icon-spell nil
|
||||
`((image ;; "spell.xpm"
|
||||
|
||||
Reference in New Issue
Block a user