From: Xah Lee <xahlee@gmail.com>
To: "Stephen J. Turnbull" <stephen@xemacs.org>,
Lennart Borgman <lennart.borgman@gmail.com>,
Eli Zaretskii <eliz@gnu.org>,
"monnier@iro.umontreal.ca" <monnier@iro.umontreal.ca>,
"emacs-d
Subject: Re: Fiddling with the menus (was: bug#4043: 23.1; thanks for emacs 23!)
Date: Sun, 9 Aug 2009 19:34:16 -0700 [thread overview]
Message-ID: <aa6b5cbe0908091934m2b3fc6e8j2676b7b50aafd845@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2009-08-10 2:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-10 2:34 Xah Lee [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-08-05 3:22 bug#4043: 23.1; thanks for emacs 23! xah lee
2009-08-06 2:15 ` Richard Stallman
2009-08-08 16:11 ` Xah Lee
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 17:20 ` 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-10 1:51 ` Stephen J. Turnbull
2009-08-10 3:03 ` Eli Zaretskii
2009-08-10 3:26 ` Lennart Borgman
2009-08-09 12:37 ` Florian Beck
2009-08-09 17:52 ` Eli Zaretskii
2009-08-09 17:26 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aa6b5cbe0908091934m2b3fc6e8j2676b7b50aafd845@mail.gmail.com \
--to=xahlee@gmail.com \
--cc=eliz@gnu.org \
--cc=lennart.borgman@gmail.com \
--cc=monnier@iro.umontreal.ca \
--cc=stephen@xemacs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.