From: Christian Heller Date: Sun, 10 Feb 2019 03:13:13 +0000 (+0100) Subject: Remove outcommented redo addempt code, add explanatory comment. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/git-logo.png?a=commitdiff_plain;h=f4218d944fac35691bf024696b5267ab09d98301;p=plomvi.el Remove outcommented redo addempt code, add explanatory comment. --- diff --git a/plomvi.el b/plomvi.el index 4d1b9e3..b98afc0 100644 --- a/plomvi.el +++ b/plomvi.el @@ -193,29 +193,6 @@ Note that this ignores killed rectangles." (interactive "cplomvi-replace-char") (delete-char 1) (insert-char c) (left-char)) -;;; some attempt at a redo feature, not very successful, documented here for -;;; research purposes -; -;(setq plomvi-in-redo nil) ; should be made buffer-local -;(setq plomvi-undo-count 0) ; should be made buffer-local -;(defun plomvi-undo() -; (interactive) -; (undo-only) -; (setq plomvi-in-redo nil) -; (setq plomvi-undo-count (+ plomvi-undo-count 1))) -;(defun plomvi-redo() -; (interactive) -; (if (> plomvi-undo-count 0) -; (progn -; (if (null plomvi-in-redo) -; (progn -; (insert-char ?\s 1) -; (undo) -; (setq plomvi-in-redo t))) -; (progn -; (undo) -; (setq plomvi-undo-count (- plomvi-undo-count 1)))))) - (defun plomvi-no-redo() "Tell user what to do, since implementing vim redo was too much of a hassle." (interactive) @@ -287,8 +264,6 @@ typing text outside of what would be Vim's Insert mode.") (define-key plomvi-mode-editable-map (kbd "r") 'plomvi-replace-char) (define-key plomvi-mode-editable-map (kbd "u") 'undo-only) (define-key plomvi-mode-editable-map (kbd "C-r") 'plomvi-no-redo) -;(define-key plomvi-mode-editable-map (kbd "u") 'plomvi-undo) -;(define-key plomvi-mode-editable-map (kbd "C-r") 'plomvi-redo) (define-key plomvi-mode-editable-map (kbd "I") 'string-insert-rectangle) (define-key plomvi-mode-editable-map (kbd "p") 'plomvi-paste-forward) (define-key plomvi-mode-editable-map (kbd "P") 'plomvi-paste-backward) @@ -320,9 +295,9 @@ or, on editable buffers, `plomvi-mode-editable'. The latter two's values in `minor-mode-map-alist' toggle either `plomvi-mode-basic-map' or `plomvi-mode-editable-map'." (interactive (list (or current-prefix-arg 'toggle))) - (let ((enable (if (eq arg 'toggle) - (not plomvi-mode) - (> (prefix-numeric-value arg) 0 )))) + (let ((enable (if (eq arg 'toggle) ; follow suggestions + (not plomvi-mode) ; from (elisp)Minor + (> (prefix-numeric-value arg) 0 )))) ; Mode Conventions (if enable (unless (minibufferp) (if buffer-read-only