unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Fiddling with the menus (was: bug#4043: 23.1; thanks for emacs  23!)
@ 2009-08-10  2:34 Xah Lee
  0 siblings, 0 replies; 51+ messages in thread
From: Xah Lee @ 2009-08-10  2:34 UTC (permalink / raw)
  To: Stephen J. Turnbull, Lennart Borgman, Eli Zaretskii,
	monnier@iro.umontreal.ca, "emacs-d

[-- Attachment #1: Type: text/plain, Size: 7226 bytes --]

just wanted to chime in to say thanks for considering this.

I'm more inclined to agree with Stephan Monnier's message at the start of
the thread.

possibly adding a menu that lists most popular computer language modes for
people to switch to might be nice. Because that way user can have a glance
of what modes are supported, and when they open a empty file (say, code
copied from the web, which happens a lot in at least web dev), they can
switch to that mode thru the menu. One problem i find about calling the mode
name directly wiht M-x for new users is that the command name is not always
intuitive e.g. cperl-mode, nxml-mode, js2-mode etc.

Here're some personal code diddling with the menu. It's probably not useful
for implementation in source, only as a graft on ... maybe can be used as a
quick What It Looks Like thing.

 Xah

-----------------------------------------
;; file menu

(define-key global-map [menu-bar file open-file] '("Open file or folder" .
find-file))
(define-key global-map [menu-bar file kill-buffer] '("Close" .
close-current-buffer))
(define-key global-map [menu-bar file new-file] '("New" . new-empty-buffer))

(define-key global-map [menu-bar file dired] nil)
(define-key global-map [menu-bar file insert-file] nil)
(define-key global-map [menu-bar file make-frame-on-display] nil)

;; edit menu
(define-key global-map [menu-bar edit search search-forward] nil)
(define-key global-map [menu-bar edit search search-backward] nil)
(define-key global-map [menu-bar edit search re-search-forward] nil)
(define-key global-map [menu-bar edit search re-search-backward] nil)
(define-key global-map [menu-bar edit search repeat-search-fwd] nil)
(define-key global-map [menu-bar edit search repeat-search-back] nil)

(define-key global-map [menu-bar edit goto go-to-pos] nil)
(define-key global-map [menu-bar edit goto beg-of-buf] nil)
(define-key global-map [menu-bar edit goto end-of-buf] nil)

;; options menu
(define-key global-map [menu-bar options cua-mode] nil)
(define-key global-map [menu-bar options transient-mark-mode] nil)

(define-key global-map [menu-bar options blink-cursor-mode] nil)
(define-key global-map [menu-bar options debug-on-error] nil)
(define-key global-map [menu-bar options debug-on-quit] nil)

(define-key global-map [menu-bar options showhide showhide-tool-bar] nil)
(define-key global-map [menu-bar options showhide showhide-scroll-bar] nil)
(define-key global-map [menu-bar options showhide showhide-fringe] nil)

(define-key global-map [menu-bar options showhide mac-font-panel-mode] nil)
(define-key global-map [menu-bar options showhide showhide-battery] nil)
(define-key global-map [menu-bar options showhide showhide-date-time] nil)
(define-key global-map [menu-bar options showhide size-indication-mode] nil)

(define-key global-map (kbd "<S-down-mouse-1>") nil)

;; buffers menu
(define-key global-map [menu-bar buffer next-buffer] '("Next User Buffer" .
next-user-buffer))
(define-key global-map [menu-bar buffer previous-buffer] '("Previous User
Buffer" . previous-user-buffer))
(define-key global-map [menu-bar buffer next-emacs-buffer] '("Next Emacs
Buffer" . next-emacs-buffer))
(define-key global-map [menu-bar buffer previous-emacs-buffer] '("Previous
Emacs Buffer" . previous-emacs-buffer))

(define-key global-map [menu-bar buffer list-all-buffers] '("List All
Buffers" . ibuffer))

;; tools menu
(define-key global-map [menu-bar tools gnus] nil)
(define-key global-map [menu-bar tools rmail] nil)
(define-key global-map [menu-bar tools compose-mail] nil)
(define-key global-map [menu-bar tools games] nil)

;; obsolete, outdated contents. Much replaced by web.
(define-key global-map [menu-bar help-menu getting-new-versions] nil)
(define-key global-map [menu-bar help-menu describe-distribution] nil)

(define-key global-map [menu-bar help-menu external-packages] nil)
(define-key global-map [menu-bar help-menu more] nil)

(define-key global-map [menu-bar help-menu emacs-known-problems] nil)
(define-key global-map [menu-bar help-menu emacs-problems] nil)
(define-key global-map [menu-bar help-menu find-emacs-packages] nil)

;; outdated humor and tech
(define-key global-map [menu-bar help-menu eliza] nil) (define-key
global-map [menu-bar help-menu emacs-psychotherapist] nil)

;; antiquated tutorial. If it needs a tutorial, something is wrong with UI.
(define-key global-map [menu-bar help-menu emacs-tutorial] nil)
(define-key global-map [menu-bar help-menu emacs-tutorial-language-specific]
nil)
(define-key global-map [menu-bar help-menu emacs-faq] nil)
(define-key global-map [menu-bar help-menu search-documentation
emacs-terminology] nil)

;; remove some FSF philosophy. (already linked in About Emacs)
(define-key global-map [menu-bar help-menu about-gnu-project] nil)
(define-key global-map [menu-bar help-menu describe-copying] nil)
(define-key global-map [menu-bar help-menu describe-no-warranty] nil)
(define-key global-map [menu-bar help-menu more-manuals order-emacs-manuals]
nil)
(define-key global-map [menu-bar help-menu manuals order-emacs-manuals] nil)
(define-key global-map [menu-bar help-menu about-gnu-project] nil)


;; Create language modes menu
(define-key-after global-map [menu-bar file lang-modes] (cons "Language
Modes" (make-sparse-keymap "major modes")) 'kill-buffer )

(define-key global-map [menu-bar file lang-modes bash] '("Bash" . sh-mode))
(define-key global-map [menu-bar file lang-modes tcl] '("TCL" . tcl-mode))
(define-key global-map [menu-bar file lang-modes ruby] '("Ruby" .
ruby-mode))
(define-key global-map [menu-bar file lang-modes python] '("Python" .
python-mode))
(define-key global-map [menu-bar file lang-modes php] '("PHP" . php-mode))
(define-key global-map [menu-bar file lang-modes perl] '("Perl" .
cperl-mode))
(define-key global-map [menu-bar file lang-modes separator1] '("--"))
(define-key global-map [menu-bar file lang-modes haskell] '("Haskell" .
haskell-mode))
(define-key global-map [menu-bar file lang-modes ocaml] '("OCaml" .
tuareg-mode))
(define-key global-map [menu-bar file lang-modes elisp] '("Emacs Lisp" .
emacs-lisp-mode))
(define-key global-map [menu-bar file lang-modes separator2] '("--"))
(define-key global-map [menu-bar file lang-modes latex] '("LaTeX" .
latex-mode))
(define-key global-map [menu-bar file lang-modes js] '("Javascript" .
js2-mode))
(define-key global-map [menu-bar file lang-modes xml] '("XML (xml-mode)" .
xml-mode))
(define-key global-map [menu-bar file lang-modes nxml] '("XML (nxml-mode)" .
nxml-mode))
(define-key global-map [menu-bar file lang-modes html] '("HTML" .
html-mode))
(define-key global-map [menu-bar file lang-modes css] '("CSS" . css-mode))
(define-key global-map [menu-bar file lang-modes separator3] '("--"))
(define-key global-map [menu-bar file lang-modes java] '("Java" .
java-mode))
(define-key global-map [menu-bar file lang-modes c++] '("C++" . c++-mode))
(define-key global-map [menu-bar file lang-modes c] '("C" . c-mode))

;; TO DO:
;; • remove dividers
;; • move incremental search menus one level up.
;; • reorg the help menu and submenu.

 Xah

[-- Attachment #2: Type: text/html, Size: 8961 bytes --]

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2009-08-11 13:03 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <D26C2A6A-F1CF-4820-ACBB-97F0592FB9CC@xahlee.org>
     [not found] ` <E1MYsVp-0002ps-S1@fencepost.gnu.org>
     [not found]   ` <C2633D79FA454AE3B8A24E3F8890F67A@xahPC>
2009-08-09  3:36     ` Fiddling with the menus (was: bug#4043: 23.1; thanks for emacs 23!) Stefan Monnier
2009-08-09  3:53       ` Lennart Borgman
2009-08-09  5:13         ` Fiddling with the menus (was: bug#4043: 23.1; thanks for emacs Stefan Monnier
2009-08-09 17:20         ` Fiddling with the menus (was: bug#4043: 23.1; thanks for emacs 23!) Eli Zaretskii
2009-08-09 17:56           ` Lennart Borgman
2009-08-09 18:02             ` Eli Zaretskii
2009-08-09 18:10               ` Lennart Borgman
2009-08-09 18:15                 ` Eli Zaretskii
2009-08-09 18:21                   ` Lennart Borgman
2009-08-09 18:51                     ` Eli Zaretskii
2009-08-09 18:54                       ` Lennart Borgman
2009-08-09 18:57                         ` Eli Zaretskii
2009-08-09 18:55                 ` Eli Zaretskii
2009-08-09 19:07                   ` Lennart Borgman
2009-08-09 20:36                     ` Lennart Borgman
2009-08-09 23:00                       ` Fiddling with the menus Jason Rumney
2009-08-09 23:14                         ` Lennart Borgman
2009-08-09 23:46                           ` Jason Rumney
2009-08-10  1:51                       ` Fiddling with the menus (was: bug#4043: 23.1; thanks for emacs 23!) Stephen J. Turnbull
2009-08-10  3:03                       ` Eli Zaretskii
2009-08-10  3:26                         ` Lennart Borgman
2009-08-10  2:27               ` Fiddling with the menus Stefan Monnier
2009-08-10  2:32                 ` Lennart Borgman
2009-08-09  5:05       ` Stefan Monnier
2009-08-09  9:51         ` CHENG Gao
2009-08-09 17:38           ` Eli Zaretskii
2009-08-09 18:06             ` CHENG Gao
2009-08-09 18:17               ` Eli Zaretskii
2009-08-09 18:24                 ` Lennart Borgman
2009-08-09 18:54                   ` Eli Zaretskii
2009-08-09 18:59                     ` Lennart Borgman
2009-08-09 22:54                     ` Jason Rumney
2009-08-10  1:12               ` Stefan Monnier
2009-08-09 17:50         ` Eli Zaretskii
2009-08-09 23:14           ` Juri Linkov
2009-08-10  2:32             ` Stefan Monnier
2009-08-10  3:07             ` Eli Zaretskii
2009-08-11  5:06         ` Dan Nicolaescu
2009-08-11 13:03           ` Lennart Borgman
2009-08-09 12:37       ` Fiddling with the menus (was: bug#4043: 23.1; thanks for emacs 23!) Florian Beck
2009-08-09 17:52         ` Eli Zaretskii
2009-08-09 17:26       ` Eli Zaretskii
2009-08-09 18:05         ` Fiddling with the menus Richard Riley
2009-08-09 18:14           ` Eli Zaretskii
2009-08-10  2:09         ` Stefan Monnier
2009-08-10  3:16           ` Eli Zaretskii
2009-08-09 23:09       ` Juri Linkov
2009-08-09 23:29         ` Lennart Borgman
2009-08-10  0:10           ` Drew Adams
2009-08-10  2:22           ` Stefan Monnier
2009-08-10  2:34 Fiddling with the menus (was: bug#4043: 23.1; thanks for emacs 23!) Xah Lee

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).