Disables QuickEdit prototype
This commit is contained in:
parent
6dc3c703aa
commit
e52c4330c7
1 changed files with 23 additions and 20 deletions
|
@ -1,11 +1,5 @@
|
||||||
(require 'cl)
|
(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)
|
(defun wc/open-in-pager (file)
|
||||||
"Opens a file in a simulated pager in emacs."
|
"Opens a file in a simulated pager in emacs."
|
||||||
(find-file file)
|
(find-file file)
|
||||||
|
@ -19,25 +13,34 @@
|
||||||
(kill-this-buffer))
|
(kill-this-buffer))
|
||||||
|
|
||||||
|
|
||||||
(defvar quick-edit-file-mode-map
|
;; (defun wc/edit-file-in-emacs (file)
|
||||||
(let ((map (make-sparse-keymap)))
|
;; "Edits a file in a buffer in Emacs. On :wq, the buffer is deleted and the previous term session restored."
|
||||||
(define-key map (kbd "q") 'wc/write-quit-kill-buffer)
|
;; (find-file file)
|
||||||
map)
|
;; (quick-edit-file-mode))
|
||||||
"Keymap for emacs quick-edit file mode.")
|
|
||||||
|
|
||||||
|
|
||||||
(define-derived-mode quick-edit-file-mode fundamental-mode "QuickEdit"
|
;; (defvar quick-edit-file-mode-map
|
||||||
"Mode quickly editing files."
|
;; (let ((map (make-sparse-keymap)))
|
||||||
(setq-local make-backup-files nil)
|
;; (define-key map (kbd "q") 'wc/write-quit-kill-buffer)
|
||||||
(setq buffer-name "*quick-edit*"))
|
;; map)
|
||||||
|
;; "Keymap for emacs quick-edit file mode.")
|
||||||
|
|
||||||
|
|
||||||
(defun wc/quick-edit-evil-quit (old-fun &rest args)
|
;; (define-derived-mode quick-edit-file-mode fundamental-mode "QuickEdit"
|
||||||
(if (eq major-mode 'quick-edit-file-mode)
|
;; "Mode quickly editing files."
|
||||||
(wc/write-quit-kill-buffer)
|
;; (setq-local make-backup-files nil)
|
||||||
(apply old-fun args)))
|
;; (setq buffer-name "*quick-edit*"))
|
||||||
|
|
||||||
(advice-add #'evil-quit :around #'wc/quick-edit-evil-quit)
|
|
||||||
|
;; (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)))
|
||||||
|
|
||||||
|
|
||||||
|
;; (defadvice evil-quit
|
||||||
|
;; (around wc/quick-edit-quick activate)
|
||||||
|
;; (wc/quick-edit-evil-quit))
|
||||||
|
|
||||||
|
|
||||||
(defvar emacs-pager-mode-map
|
(defvar emacs-pager-mode-map
|
||||||
|
|
Loading…
Reference in a new issue