diff options
author | William Carroll <wpcarro@gmail.com> | 2017-06-26T14·30-0400 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2017-06-26T14·30-0400 |
commit | e52c4330c7dcf30d0a9c65d06c7c27d17198090b (patch) | |
tree | 0721ad7c070f75a5943a8413d85c43835e7971ad | |
parent | 6dc3c703aaeb086f62df7177fe67b917d286c3aa (diff) |
Disables QuickEdit prototype
-rw-r--r-- | emacs/wc-helper-functions.el | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/emacs/wc-helper-functions.el b/emacs/wc-helper-functions.el index e393b1247c6c..2d5924f5e1ff 100644 --- a/emacs/wc-helper-functions.el +++ b/emacs/wc-helper-functions.el @@ -1,11 +1,5 @@ (require 'cl) -(defun wc/edit-file-in-emacs (file) - "Edits a file in a buffer in Emacs. On :wq, the buffer is deleted and the previous term session restored." - (find-file file) - (quick-edit-file-mode)) - - (defun wc/open-in-pager (file) "Opens a file in a simulated pager in emacs." (find-file file) @@ -19,25 +13,34 @@ (kill-this-buffer)) -(defvar quick-edit-file-mode-map - (let ((map (make-sparse-keymap))) - (define-key map (kbd "q") 'wc/write-quit-kill-buffer) - map) - "Keymap for emacs quick-edit file mode.") +;; (defun wc/edit-file-in-emacs (file) +;; "Edits a file in a buffer in Emacs. On :wq, the buffer is deleted and the previous term session restored." +;; (find-file file) +;; (quick-edit-file-mode)) -(define-derived-mode quick-edit-file-mode fundamental-mode "QuickEdit" - "Mode quickly editing files." - (setq-local make-backup-files nil) - (setq buffer-name "*quick-edit*")) +;; (defvar quick-edit-file-mode-map +;; (let ((map (make-sparse-keymap))) +;; (define-key map (kbd "q") 'wc/write-quit-kill-buffer) +;; map) +;; "Keymap for emacs quick-edit file mode.") + + +;; (define-derived-mode quick-edit-file-mode fundamental-mode "QuickEdit" +;; "Mode quickly editing files." +;; (setq-local make-backup-files nil) +;; (setq buffer-name "*quick-edit*")) + +;; (defun wc/quick-edit-evil-quit (old-fun &rest args) +;; (if (eq major-mode 'quick-edit-file-mode) +;; (wc/write-quit-kill-buffer) +;; (apply old-fun args))) -(defun wc/quick-edit-evil-quit (old-fun &rest args) - (if (eq major-mode 'quick-edit-file-mode) - (wc/write-quit-kill-buffer) - (apply old-fun args))) -(advice-add #'evil-quit :around #'wc/quick-edit-evil-quit) +;; (defadvice evil-quit +;; (around wc/quick-edit-quick activate) +;; (wc/quick-edit-evil-quit)) (defvar emacs-pager-mode-map |