

" 113 do not slow things down 114 '(menu-bar-non-minibuffer-window-p) 115 ) ) 116 ( define-key-after menu-bar-file-menu 117 ` ( menu-item " Change Buffer Mode ", menu-bar-change-mode-menu 118 :help " Change to a specific major mode.

" 94 ( interactive ) 95 ( let ( ( the-mode ( or last-command-event mode ) ) 96 ( buffer ( if ( minibufferp ) ( window-buffer ( minibuffer-selected-window ) ) ( current-buffer ) ) ) ) 97 ( with-current-buffer buffer 98 ( if ( eq major-mode the-mode ) 99 ( fundamental-mode ) ) 100 ( funcall the-mode ) 101 ( message " Changed to %s Mode " ( aquamacs-pretty-mode-name major-mode ) ) 102 ) ) ) 103 104 105 106 ( defvar menu-bar-change-mode-menu nil ) 107 (aquamacs-update-change-mode-menu) 108 ( defun aquamacs-update-change-mode-menu ( ) 109 ( setq menu-bar-change-mode-menu 110 ( aquamacs-define-mode-menu ( make-sparse-keymap " Change Mode " ) 111 'aquamacs-change-major-mode 112 " Change the major mode of the current buffer to `%s'. " ) 71 ( defun aquamacs-record-mode-change ( ) 72 ( setq aquamacs-recent-major-modes 73 ( delete major-mode aquamacs-recent-major-modes ) ) 74 max 10 elements 75 ( if ( nthcdr 10 aquamacs-recent-major-modes ) 76 ( setcdr ( nthcdr 9 aquamacs-recent-major-modes ) nil ) ) 77 ( setq aquamacs-recent-major-modes 78 ( cons major-mode aquamacs-recent-major-modes ) ) 79 ( if ( fboundp 'aquamacs-update-new-file-menu ) 80 ( aquamacs-update-new-file-menu ) ) 81 ( if ( fboundp 'aquamacs-update-change-mode-menu ) 82 ( aquamacs-update-change-mode-menu ) ) ) 83 84 85 ( defun aquamacs-menu-new-empty-buffer-in-mode ( &optional mode ) 86 " Create a blan buffer in a given major mode " 87 ( interactive ) 88 ( let ( ( the-mode ( or last-command-event mode ) ) ) 89 ( new-empty-buffer nil the-mode ) 90 ( message " New %s buffer " ( aquamacs-pretty-mode-name major-mode ) ) ) ) 91 92 ( defun aquamacs-change-major-mode ( &optional mode ) 93 " Change the current buffer's major mode to another one. " ) 65 'make-tab ) ) ) 66 67 record recently used major modes 68 69 ( defvar aquamacs-recent-major-modes ( ) 70 " Recently used major modes. " ) ) 62 ( define-key-after menu-bar-file-menu 63 ( list 'menu-item " New Buffer in Mode " menu-bar-new-file-menu 64 :help " Create a new buffer with a specific major mode.

" 45 ( if ( consp list ) 46 ( let ( ( res nil ) ) 47 ( while ( consp list ) ( push ( pop list ) res ) ) 48 ( prog1 ( nreverse res ) ( setcdr res list ) ) ) 49 ( car list ) ) ) 50 51 ( defun aq-concat-symbol ( sym1 sym2 ) 52 ( intern ( concat ( if ( stringp sym1 ) sym1 ( symbol-name sym1 ) ) 53 ( if ( stringp sym2 ) sym2 ( symbol-name sym2 ) ) ) ) ) 54 55 ( defvar menu-bar-new-file-menu nil ) 56 ( defun aquamacs-update-new-file-menu ( ) 57 ( protect 58 ( setq menu-bar-new-file-menu 59 ( aquamacs-define-mode-menu ( make-sparse-keymap " New Buffer in Mode " ) 60 'aquamacs-menu-new-empty-buffer-in-mode 61 " Create a new buffer in `%s' mode. 32 33 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 David Reitter 34 35 36 ( require 'easymenu ) 37 38 39 40 ( eval-when-compile ( require 'aquamacs-macros ) ) 41 42 ( defun aq-copy-list ( list ) 43 " Return a copy of LIST, which may be a dotted list.Ĥ4 The elements of LIST are not copied, just the list structure itself.
AQUAMACS PATH SOFTWARE
If not, write to the 30 Free Software Foundation, Inc., 59 Temple Place - Suite 330, 31 Boston, MA 02111-1307, USA.
AQUAMACS PATH LICENSE
27 28 You should have received a copy of the GNU General Public License 29 along with GNU Emacs see the file COPYING. See the 26 GNU General Public License for more details. 22 23 Aquamacs is distributed in the hope that it will be useful, 24 but WITHOUT ANY WARRANTY without even the implied warranty of 25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 Apart from that, released under the GPL: 18 Aquamacs is free software you can redistribute it and/or modify 19 it under the terms of the GNU General Public License as published by 20 the Free Software Foundation either version 3, or (at your option) 21 any later version. 15 Attribution must be given in application About dialog or similar, 16 "Contains Aquamacs Menu by D Reitter" does the job.

AQUAMACS PATH FULL
Large files files are truncated, but you can click here to view the full file 1 -*-mode:emacs-lisp coding: utf-8 -*-' 2 3 utf-8-emacs 4 aquamacs-menu 5 redefines and modifies the menu bar 6 7 Author: David Reitter, 8 Maintainer: David Reitter 9 Keywords: aquamacs 10 11 This file is part of Aquamacs Emacs 12 13 14 Attribution: Leave this header intact in case you redistribute this file.
