Newer
Older
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
(get major-mode 'mode-class)))))
;; Emacs only
(write-file :image "saveas"
:command write-file
:enable (not
(window-minibuffer-p
(frame-selected-window menu-updating-frame)))
:insert [t nil]
:help "Write current buffer to another file"
:visible (or buffer-file-name
(not (eq 'special (get major-mode 'mode-class)))))
(undo :image ["undo" toolbar-undo-icon]
:command [undo toolbar-undo]
:enable [(and (not buffer-read-only)
(not (eq t buffer-undo-list))
(if (eq last-command 'undo)
pending-undo-list
(consp buffer-undo-list)))
t]
:help ["Undo last operation" "Undo edit"]
:visible (not (eq 'special (get major-mode 'mode-class))))
(cut :image ["cut" toolbar-cut-icon]
:help ["Delete text in region and copy it to the clipboard"
"Kill region"]
:command [clipboard-kill-region toolbar-cut]
:visible (not (eq 'special (get major-mode 'mode-class))))
(copy :image ["copy" toolbar-copy-icon]
:help ["Copy text in region to the clipboard" "Copy region"]
:command [clipboard-kill-ring-save toolbar-copy])
(paste :image ["paste" toolbar-paste-icon]
:help ["Paste text from clipboard" "Paste from clipboard"]
:command [clipboard-yank toolbar-paste]
:visible (not (eq 'special (get major-mode 'mode-class))))
;; Emacs only
(search-forward :command nonincremental-search-forward
:help "Search forward for a string"
:image "search"
:insert [t nil])
(search-replace
:image ["search-replace" toolbar-replace-icon]
:command [query-replace toolbar-replace]
:help ["Replace string interactively, ask about each occurrence"
"Search & Replace"])
(print-buffer :image ["print" toolbar-printer-icon]
:command [print-buffer toolbar-print]
:help ["Print current buffer with page headings"
"Print buffer"])
;; Emacs only
(customize :image "preferences"
:command customize
:help "Edit preferences (customize)"
:insert [t nil])
;; Emacs only
(help :image "help"
:command (lambda () (interactive) (popup-menu menu-bar-help-menu))
:help "Pop up the Help menu"
:insert [t nil])
;; Emacs only
(kill-buffer :command kill-this-buffer
:enable (kill-this-buffer-enabled-p)
:help "Discard current buffer"
:image "close"
:insert [t nil])
;; Emacs only
(exit-emacs :image "exit"
:command save-buffers-kill-emacs
:help "Offer to save unsaved buffers, then exit Emacs"
:insert [t nil])
(spell-buffer :image ["spell" toolbar-spell-icon]
:command [ispell-buffer toolbar-ispell]
:help ["Check spelling of selected buffer" "Check spelling"])
(info :image ["info" toolbar-info-icon]
:command [info toolbar-info]
:help ["Enter Info, the documentation browser" "Info documentation"])
;; XEmacs only
(mail :image toolbar-mail-icon
:command toolbar-mail
:help "Read mail"
:insert [nil t])
;; XEmacs only
(compile :image toolbar-compile-icon
:command toolbar-compile
:help "Start a compilation"
:insert [nil t])
;; XEmacs only
(debug :image toolbar-debug-icon
:command toolbar-debug
:help "Start a debugger"
:insert [nil t])
;; XEmacs only
(news :image toolbar-news-icon
:command toolbar-news
:help "Read news"
:insert [nil t]))
"A meaning alist with definition of the default buttons.
The following buttons are available:
* Both Emacs and XEmacs: `open-file', `dired', `save-buffer',
`undo', `cut', `copy', `paste', `search-replace', `print-buffer',
`spell-buffer', `info'.
* Emacs only: `write-file', `search-forward', `customize', `help',
`kill-buffer', `exit-emacs'.
* XEmacs only: `mail', `compile', `debug', `news'.
To reproduce the default toolbar in both editors with use as BUTTON
in `toolbarx-install-toolbar':
\(toolbarx-install-toolbar
'([(open-file dired kill-buffer save-buffer write-file undo cut
copy paste search-forward print-buffer customize help)
(open-file dired save-buffer print-buffer cut copy paste undo
spell-buffer search-replace mail info compile debug news)])
toolbarx-default-toolbar-meaning-alist)
Ps.: there are more buttons available than suggested in the
expression above.")
(provide 'toolbar-x)
;;; toolbar-x.el ends here