branch: externals/ergoemacs-mode commit cbe3e19af7ff0de58174a4914229c4f4a715f941 Author: Walter Landry <wlan...@caltech.edu> Commit: Walter Landry <wlan...@caltech.edu>
Add create/delete frame to menu --- ergoemacs-functions.el | 8 ++++++++ ergoemacs-mode.el | 9 ++++++++- ergoemacs-themes.el | 11 ++++++----- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el index 21b90f7..fe62d80 100644 --- a/ergoemacs-functions.el +++ b/ergoemacs-functions.el @@ -1553,6 +1553,14 @@ Emacs buffers are those whose name starts with *." (funcall (and initial-major-mode)) (setq buffer-offer-save t))) +(defun ergoemacs-make-frame-command () + "Create a new frame. This is a thin wrapper so that menus will +show the ergoemacs key binding rather than the traditional +binding." + (interactive) + (make-frame-command) + ) + (defun ergoemacs-delete-frame () "Deletes frame or closes emacs (with prompt)." (interactive) diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el index da56d9f..bac238c 100644 --- a/ergoemacs-mode.el +++ b/ergoemacs-mode.el @@ -672,7 +672,14 @@ SYMBOL is the symbol to set, NEW-VALUE is it's value." (ergoemacs-mode-reset))) (defvar ergoemacs-override-keymap (make-sparse-keymap) - "ErgoEmacs override keymap.") + "ErgoEmacs override keymap. Modify this keymap to change the +basic ergoemacs functionality. For example, if you want M-t to +transpose words instead of running completion, call + + (ergoemacs-define-key ergoemacs-override-keymap (kbd \"M-t\") 'transpose-words) + +after initializing ergoemacs-mode. +") (ergoemacs :label ergoemacs-override-keymap) diff --git a/ergoemacs-themes.el b/ergoemacs-themes.el index 18392b6..552ccc6 100644 --- a/ergoemacs-themes.el +++ b/ergoemacs-themes.el @@ -321,8 +321,8 @@ calling any other ergoemacs-set-* function" (define-key keymap (kbd "C-S-s") 'write-file) (define-key keymap (kbd "C-p") 'pr-interface) - (define-key keymap (kbd "C-S-n") 'make-frame-command) - (define-key keymap (kbd "C-S-w") 'delete-frame) + (define-key keymap (kbd "C-S-n") 'ergoemacs-make-frame-command) + (define-key keymap (kbd "C-S-w") 'ergoemacs-delete-frame) (define-key keymap (kbd "C-l") 'goto-line) (define-key keymap (kbd "C-n") 'ergoemacs-new-empty-buffer) @@ -578,7 +578,6 @@ calling any other ergoemacs-set-* function" (cons "File" `(keymap (new-file menu-item "New" ergoemacs-new-empty-buffer) - (make-frame menu-item "New Frame" make-frame-command) (open-file menu-item "Open..." find-file) (open-recent menu-item "Open Recent" (keymap @@ -611,9 +610,11 @@ calling any other ergoemacs-set-* function" (revert-buffer menu-item "Revert to Saved" ergoemacs-revert-buffer) (print-buffer menu-item "Print" pr-interface) (separator4 menu-item "--") - (split-window-below menu-item "Split Window" + (create-frame-item menu-item "Create New Frame" ergoemacs-make-frame-command) + (delete-frame-item menu-item "Delete Frame" ergoemacs-delete-frame) + (split-window-below menu-item "Split Window Below" split-window-below) - (split-window-right menu-item "Split Window right" + (split-window-right menu-item "Split Window Right" split-window-right) (one-window menu-item "Unsplit Window" delete-other-windows)