[nongnu] elpa/evil 00fca68547: Add C-h in insert + replace states (fixes #1577)
branch: elpa/evil commit 00fca685479e772361765b13de4689099a328c28 Author: Tom Dalziel Commit: Tom Dalziel <33435574+tomd...@users.noreply.github.com> Add C-h in insert + replace states (fixes #1577) --- evil-maps.el | 4 evil-vars.el | 37 +++-- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/evil-maps.el b/evil-maps.el index a4d20aa87f..971cf7ab70 100644 --- a/evil-maps.el +++ b/evil-maps.el @@ -405,6 +405,8 @@ '("\C-w" . evil-window-map)) ,@(when evil-want-C-u-delete '(("\C-u" . evil-delete-back-to-indentation))) +,@(when evil-want-C-h-delete +'(("\C-h" . evil-delete-back-to-indentation))) ([mouse-2] . mouse-yank-primary)) "Evil's bindings for insert & replace states. Used in `evil-insert-state-map' and `evil-replace-state-map', @@ -446,6 +448,8 @@ included in `evil-insert-state-bindings' by default." (dolist (binding evil-insert-state-bindings) (define-key evil-replace-state-map (car binding) (cdr binding))) (define-key evil-replace-state-map (kbd "DEL") 'evil-replace-backspace) +(when evil-want-C-h-delete + (define-key evil-replace-state-map "\C-h" 'evil-replace-backspace)) (define-key evil-replace-state-map [escape] 'evil-normal-state) (define-key evil-replace-state-map [insert] 'evil-append) diff --git a/evil-vars.el b/evil-vars.el index 0a0b14d2ea..72003ecd9a 100644 --- a/evil-vars.el +++ b/evil-vars.el @@ -514,15 +514,18 @@ ubiquity of prefix arguments." :group 'evil :set #'(lambda (sym value) (set-default sym value) - (when (boundp 'evil-insert-state-map) + (when (and (boundp 'evil-insert-state-map) + (boundp 'evil-replace-state-map)) (cond ((and (not value) (eq (lookup-key evil-insert-state-map (kbd "C-u")) 'evil-delete-back-to-indentation)) - (define-key evil-insert-state-map (kbd "C-u") nil)) + (define-key evil-insert-state-map (kbd "C-u") nil) + (define-key evil-replace-state-map (kbd "C-u") nil)) ((and value (not (lookup-key evil-insert-state-map (kbd "C-u" - (define-key evil-insert-state-map (kbd "C-u") 'evil-delete-back-to-indentation)) + (define-key evil-insert-state-map (kbd "C-u") 'evil-delete-back-to-indentation) + (define-key evil-replace-state-map (kbd "C-u") 'evil-delete-back-to-indentation)) (defcustom evil-want-C-w-delete t "Whether `C-w' deletes a word in Insert state." @@ -530,16 +533,38 @@ ubiquity of prefix arguments." :group 'evil :set #'(lambda (sym value) (set-default sym value) - (when (boundp 'evil-insert-state-map) + (when (and (boundp 'evil-insert-state-map) + (boundp 'evil-replace-state-map)) (cond ((and (not value) (eq (lookup-key evil-insert-state-map (kbd "C-w")) 'evil-delete-backward-word)) - (define-key evil-insert-state-map (kbd "C-w") 'evil-window-map)) + (define-key evil-insert-state-map (kbd "C-w") 'evil-window-map) + (define-key evil-replace-state-map (kbd "C-w") 'evil-window-map)) ((and value (eq (lookup-key evil-insert-state-map (kbd "C-w")) 'evil-window-map)) - (define-key evil-insert-state-map (kbd "C-w") 'evil-delete-backward-word)) + (define-key evil-insert-state-map (kbd "C-w") 'evil-delete-backward-word) + (define-key evil-replace-state-map (kbd "C-w") 'evil-delete-backward-word)) + +(defcustom evil-want-C-h-delete nil + "Whether `C-h' deletes a char in Insert state." + :type 'boolean + :group 'evil + :set #'(lambda (sym value) + (set-default sym value) + (when (and (boundp 'evil-insert-state-map) + (boundp 'evil-replace-state-map)) + (cond + ((and (not value) +(eq (lookup-key evil-insert-state-map (kbd "C-h")) +'evil-delete-backward-char-and-join)) + (define-key evil-insert-state-map (kbd "C-h") nil) + (define-key evil-replace-state-map (kbd "C-h") nil)) + ((and value +(not (lookup-key evil-insert-state-map (kbd "C-h" + (define-key evil-insert-state-map (kbd "C-h") 'evil-delete-backward-char-and-join) + (define-key evil-replace-state-map (kbd "C-h") 'evil-replace-backspace)) (defcustom evil-want-C-g-bindings nil "Whether `C-g' postfix can be used in bindings."
[nongnu] elpa/helm c9e1c5b964 4/4: Fix paren error
branch: elpa/helm commit c9e1c5b964ffd0a0fa635f501adc5457914283a4 Author: Thierry Volpiatto Commit: Thierry Volpiatto Fix paren error --- helm-lib.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-lib.el b/helm-lib.el index 2b7b04f62f..6324042a03 100644 --- a/helm-lib.el +++ b/helm-lib.el @@ -58,7 +58,7 @@ (declare-function wdired-flag-for-deletion "wdired.el") (declare-function wdired-get-filename "wdired.el") (declare-function wdired-normalize-filename "wdired.el") -(declare-function helm-read-file-name "helm-mode.el)" +(declare-function helm-read-file-name "helm-mode.el") (declare-function find-function-library "find-func.el") (declare-function find-library-name "find-func.el")
[nongnu] elpa/helm updated (262ba579a9 -> c9e1c5b964)
elpasync pushed a change to branch elpa/helm. from 262ba579a9 Use helm-core.el instead of helm.el to store main code #2481 new b773289689 Remove obsolete and unneeded function new a2178e9b52 Update documentation about next-error new a998f3a0d6 Shut up byte compiler new c9e1c5b964 Fix paren error Summary of changes: helm-help.el | 18 -- helm-lib.el | 3 +++ helm-utils.el | 4 3 files changed, 19 insertions(+), 6 deletions(-)
[nongnu] elpa/helm b773289689 1/4: Remove obsolete and unneeded function
branch: elpa/helm commit b773289689c808329e303f15842181b0fa864a37 Author: Thierry Volpiatto Commit: Thierry Volpiatto Remove obsolete and unneeded function --- helm-utils.el | 4 1 file changed, 4 deletions(-) diff --git a/helm-utils.el b/helm-utils.el index ff958ab9e5..0bd6ed24ba 100644 --- a/helm-utils.el +++ b/helm-utils.el @@ -1040,10 +1040,6 @@ If FILE is a directory, open this directory." (dired (file-name-directory file)) (dired-goto-file file))) -(defun helm-require-or-error (feature function) - (or (require feature nil t) - (error "Need %s to use `%s'." feature function))) - (defun helm-find-file-as-root (candidate) (let* ((buf (helm-basename candidate)) (host (file-remote-p candidate 'host))
[nongnu] elpa/helm-core updated (262ba579a9 -> c9e1c5b964)
elpasync pushed a change to branch elpa/helm-core. from 262ba579a9 Use helm-core.el instead of helm.el to store main code #2481 adds b773289689 Remove obsolete and unneeded function adds a2178e9b52 Update documentation about next-error adds a998f3a0d6 Shut up byte compiler adds c9e1c5b964 Fix paren error No new revisions were added by this update. Summary of changes: helm-help.el | 18 -- helm-lib.el | 3 +++ helm-utils.el | 4 3 files changed, 19 insertions(+), 6 deletions(-)
[nongnu] elpa/helm a998f3a0d6 3/4: Shut up byte compiler
branch: elpa/helm commit a998f3a0d6d6614a0c4476c0ff2b142506c5ee82 Author: Thierry Volpiatto Commit: Thierry Volpiatto Shut up byte compiler --- helm-lib.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helm-lib.el b/helm-lib.el index 57c135edbd..2b7b04f62f 100644 --- a/helm-lib.el +++ b/helm-lib.el @@ -58,6 +58,9 @@ (declare-function wdired-flag-for-deletion "wdired.el") (declare-function wdired-get-filename "wdired.el") (declare-function wdired-normalize-filename "wdired.el") +(declare-function helm-read-file-name "helm-mode.el)" +(declare-function find-function-library "find-func.el") +(declare-function find-library-name "find-func.el") (defvar helm-sources) (defvar helm-initial-frame)
[nongnu] elpa/helm a2178e9b52 2/4: Update documentation about next-error
branch: elpa/helm commit a2178e9b5206698641335aa1c1825d87837e36bb Author: Thierry Volpiatto Commit: Thierry Volpiatto Update documentation about next-error --- helm-help.el | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/helm-help.el b/helm-help.el index 7198526486..4d5aea6b99 100644 --- a/helm-help.el +++ b/helm-help.el @@ -1769,6 +1769,14 @@ See [[Commands][commands]] below. Once in that buffer you can use [[https://github.com/mhayashi1120/Emacs-wgrep][emacs-wgrep]] (external package not bundled with Helm) to edit your changes, for Helm the package name is `wgrep-helm', it is hightly recommended. +Type `g' to update (revert) the buffer (after saving your buffer's changes to file). + +NOTE: `next-error' is available from this `helm-grep-mode' buffer. + +When you are running `next-error' from elsewhere, you can update +the buffer with `helm-revert-next-error-last-buffer' (up to you +to bind it to a convenient key). + *** Helm-grep supports multi-matching \(Starting from version 1.9.4.) @@ -2044,7 +2052,7 @@ your alias in the eshell alias file with e.g. \"alias foo $1 &\". |\\[helm-ff-run-delete-file]|Delete file. |\\[helm-ff-run-open-file-externally]|Open file externally.") -;;; Moccur help +;;; helm-occur help ;; ;; (defvar helm-moccur-help-message @@ -2115,7 +2123,11 @@ This can be done automatically by customizing `helm-moccur-auto-update-on-resume *** Refresh a saved buffer -Type `g' to update the buffer. +Type `g' to update (revert) the buffer. + +When you are running `next-error' from elsewhere, you can update +the buffer with `helm-revert-next-error-last-buffer' (up to you +to bind it to a convenient key). *** Edit a saved buffer @@ -2127,6 +2139,8 @@ First, install wgrep (https://github.com/mhayashi1120/Emacs-wgrep) and then: Tip: Use the excellent iedit (https://github.com/victorhge/iedit) to modify all occurences at once in the buffer. +NOTE: `next-error' is available from this `helm-occur-mode' buffer. + *** Search in region When searching in current-buffer with `helm-occur', if a region
[elpa] externals/compat edfc71a8b9 2/2: Remove unnecessary :max-version from require advice
branch: externals/compat commit edfc71a8b95ea0578a4f9375fc5ca2b2fc40ca56 Author: Philip Kaludercic Commit: Philip Kaludercic Remove unnecessary :max-version from require advice --- compat-25.1.el | 1 - 1 file changed, 1 deletion(-) diff --git a/compat-25.1.el b/compat-25.1.el index 266f7ecb22..9d2859dc40 100644 --- a/compat-25.1.el +++ b/compat-25.1.el @@ -113,7 +113,6 @@ Equality with KEY is tested by TESTFN, defaulting to `eq'." ;; As the compatibility advise around `require` is more a hack than ;; of of actual value, the highlighting is suppressed. :no-highlight t - :max-version "24.5" (if (eq feature 'subr-x) (let ((entry (assq feature after-load-alist))) (let ((load-file-name nil))
[nongnu] elpa/iedit b13f05b9f1 1/8: New feature: switch from rectangle-mark-mode to iedit-rect mode
branch: elpa/iedit commit b13f05b9f11017ccf2c2529404163160a9004e00 Author: Victor Ren Commit: Victor Ren New feature: switch from rectangle-mark-mode to iedit-rect mode The default key binding is changed to C-x r ; --- README.org | 11 ++- iedit-rect.el | 54 -- iedit-tests.el | 4 ++-- iedit.el | 13 +++-- 4 files changed, 39 insertions(+), 43 deletions(-) diff --git a/README.org b/README.org index 42ec044a7c..3bef865ea9 100644 --- a/README.org +++ b/README.org @@ -1,4 +1,4 @@ -* Iedit - Edit multiple regions in the same way simultaneously +* Iedit - Edit multiple occurrences in the same way simultaneously [[http://melpa.org/#/iedit][file:http://melpa.org/packages/iedit-badge.svg]] [[http://stable.melpa.org/#/iedit][file:http://stable.melpa.org/packages/iedit-badge.svg]] @@ -18,10 +18,11 @@ other occurrences changed in the same way, with visual feedback as you type. Normal work flow of Iedit mode is like: - - Move to certain point and press C-; (The default key binding) to enable - `iedit-mode'. All occurrences of a symbol, string or a region in the buffer - are highlighted corresponding to the thing under the point, current mark and - prefix argument. Refer to the document of `iedit-mode' for details. + - Move point to a target by `isearch' or other moving commands + + - Press C-;(The default key binding) to enable Iedit mode. The thing under + the point is recognized as an occurrence, and all the occurrences in the + buffer are highlighted - Edit one of the occurrences The change is applied to other occurrences simultaneously. diff --git a/iedit-rect.el b/iedit-rect.el index 689dfe0931..6bbb608ff5 100644 --- a/iedit-rect.el +++ b/iedit-rect.el @@ -2,7 +2,7 @@ ;; Copyright (C) 2010 - 2019, 2020 Victor Ren -;; Time-stamp: <2021-01-06 11:17:35 Victor Ren> +;; Time-stamp: <2022-01-12 13:22:55 Victor Ren> ;; Author: Victor Ren ;; Keywords: occurrence region simultaneous rectangle refactoring ;; Version: 0.9.9.9 @@ -55,14 +55,16 @@ ;;; Default key bindings: (when (null (where-is-internal 'iedit-rectangle-mode)) - (let ((key-def (lookup-key ctl-x-r-map "\r"))) + (let ((key-def (lookup-key ctl-x-r-map ";"))) (if key-def (display-warning 'iedit (format "Iedit rect default key %S is occupied by %s." (key-description [C-x r RET]) key-def) :warning) - (define-key ctl-x-r-map "\r" 'iedit-rectangle-mode) - (message "Iedit-rect default key binding is %s" (key-description [C-x r RET]) + (define-key ctl-x-r-map "\r" 'iedit-rectangle-mode) + (define-key ctl-x-r-map ";" 'iedit-rectangle-mode) + (define-key rectangle-mark-mode-map ";" 'iedit-rectangle-mode) + (message "Iedit-rect default key binding is %s" (key-description [C-x r \;]) (defvar iedit-rectangle nil "This buffer local variable which is the rectangle geometry if @@ -77,6 +79,7 @@ current mode is iedit-rect. Otherwise it is nil. (let ((map (make-sparse-keymap))) (set-keymap-parent map iedit-occurrence-keymap-default) (define-key map (kbd "M-K") 'iedit-kill-rectangle) + (define-key map (kbd "C-;") 'iedit-rectangle-mode) ; to exit iedit-rect mode map) "Keymap used within overlays in Iedit-rect mode.") @@ -102,7 +105,6 @@ Commands: (interactive (when (iedit-region-active) (list (region-beginning) (region-end - ;; enforce skip modification once, errors may happen to cause this to be ;; unset. (setq iedit-skip-modification-once t) @@ -110,36 +112,30 @@ Commands: (iedit-rectangle-done) (iedit-barf-if-lib-active) (if (and beg end) -(progn (setq mark-active nil) - (run-hooks 'deactivate-mark-hook) - (iedit-rectangle-start beg end)) +(progn + (iedit-rectangle-start beg end)) (error "no region available." +(defun iedit-rectangle-line (startcol endcol) + (push (iedit-make-occurrence-overlay + (progn + (move-to-column startcol t) + (point)) + (progn + (move-to-column endcol t) + (point))) +iedit-occurrences-overlays)) + (defun iedit-rectangle-start (beg end) "Start Iedit mode for the region as a rectangle." (barf-if-buffer-read-only) - (setq beg (copy-marker beg)) - (setq end (copy-marker end t)) + (setq iedit-rectangle (list (copy-marker beg) (copy-marker end t))) (setq iedit-occurrences-overlays nil) (setq iedit-occurrence-keymap iedit-rect-keymap) - (save-excursion -(let ((beg-col (progn (goto-char beg) (current-column))) - (end-col (progn (goto-char end) (current-column - (when (< end-col beg-col) -(cl-rotatef beg-col end-col)) - (goto-char beg) - (while -
[nongnu] elpa/iedit 3fb4762f84 4/8: Prefer defvar-local.
branch: elpa/iedit commit 3fb4762f844baae1db9c19c6c5506558bfaae323 Author: Jimmy Aguilar Mena Commit: Victor Ren Prefer defvar-local. Prefer defvar-local over defvar + make-variable-buffer-local. Also use :local t in defcustom. --- iedit-lib.el | 72 --- iedit-rect.el | 7 ++ iedit.el | 28 +-- 3 files changed, 36 insertions(+), 71 deletions(-) diff --git a/iedit-lib.el b/iedit-lib.el index eef9a0a39a..08862076aa 100644 --- a/iedit-lib.el +++ b/iedit-lib.el @@ -94,6 +94,7 @@ mode, set it as nil." "If no-nil, iedit-mode automatically starts buffering the changes. This could be a workaround for lag problem under certain modes." :type 'boolean + :local t :group 'iedit) (defcustom iedit-overlay-priority 200 @@ -114,19 +115,19 @@ This is used by `iedit-number-occurrences'." :type 'string :group 'iedit) -(defvar iedit-occurrences-overlays nil +(defvar-local iedit-occurrences-overlays nil "The occurrences slot contains a list of overlays used to indicate the position of each editable occurrence. In addition, the occurrence overlay is used to provide a different face configurable via `iedit-occurrence'.") -(defvar iedit-read-only-occurrences-overlays nil +(defvar-local iedit-read-only-occurrences-overlays nil "The occurrences slot contains a list of overlays used to indicate the position of each read-only occurrence. In addition, the occurrence overlay is used to provide a different face configurable via `iedit-ready-only-occurrence'.") -(defvar iedit-case-sensitive iedit-case-sensitive-default +(defvar-local iedit-case-sensitive iedit-case-sensitive-default "This is buffer local variable. If no-nil, matching is case sensitive. If nil and `case-replace' is no-nil, iedit try to preserve the case pattern of each @@ -137,108 +138,83 @@ occurrence.") Either nil, t, or 'open. 'open means the same as t except that opens hidden overlays. ") -(defvar iedit-lib-skip-invisible-count 0 +(defvar-local iedit-lib-skip-invisible-count 0 "This is buffer local variable which is the number of skipped invisible occurrence. ") -(defvar iedit-lib-skip-filtered-count 0 +(defvar-local iedit-lib-skip-filtered-count 0 "This is buffer local variable which is the number of filtered occurrence. ") -(defvar iedit-hiding nil +(defvar-local iedit-hiding nil "This is buffer local variable which indicates whether buffer lines are hided. ") -(defvar iedit-forward-success t +(defvar-local iedit-forward-success t "This is buffer local variable which indicates the moving forward or backward successful") -(defvar iedit-before-modification-string "" +(defvar-local iedit-before-modification-string "" "This is buffer local variable which is the buffer substring that is going to be changed.") -(defvar iedit-before-buffering-string "" +(defvar-local iedit-before-buffering-string "" "This is buffer local variable which is the buffer substring that is going to be changed.") -(defvar iedit-before-buffering-undo-list nil +(defvar-local iedit-before-buffering-undo-list nil "This is buffer local variable which is the buffer undo list before modification.") -(defvar iedit-before-buffering-point nil +(defvar-local iedit-before-buffering-point nil "This is buffer local variable which is the point before modification.") -(defvar iedit-buffering-overlay nil +(defvar-local iedit-buffering-overlay nil "This is buffer local variable which is the current overlay before starting recording kmacro.") -(defvar iedit-start-kmacro-offset nil +(defvar-local iedit-start-kmacro-offset nil "This is buffer local variable which is the offset from the current overlay start before starting recording kmacro.") ;; `iedit-record-changes' gets called twice when change==0 and ;; occurrence is zero-width (beg==end) -- for front and back insertion. -(defvar iedit-skip-modification-once t +(defvar-local iedit-skip-modification-once t "Variable used to skip first modification hook run when insertion against a zero-width occurrence.") -(defvar iedit-aborting nil +(defvar-local iedit-aborting nil "This is buffer local variable which indicates Iedit mode is aborting.") -(defvar iedit-lib-quit-func nil +(defvar-local iedit-lib-quit-func nil "Function to call to exit mode using `iedit-lib'. Should be set in `iedit-lib-start'.") -(defvar iedit-post-undo-hook-installed nil +(defvar-local iedit-post-undo-hook-installed nil "This is buffer local variable which indicated if `iedit-post-undo' is installed in `post-command-hook'.") -(defvar iedit-buffering nil +(defvar-local iedit-buffering nil "This is buffer local variable which indicates iedit-mode is buffering, which means the modification to the current occurrence is not applied to other occurrences when it is true.") -(defvar iedit-occurrence-context-lines 1 +(defvar-local iedit-occurrence-context-lin
[nongnu] elpa/iedit 48ab9e4be2 2/8: Add missing ;;;###autoload
branch: elpa/iedit commit 48ab9e4be2f1a1afe77e0d8a6ab4cc7c9c39 Author: Victor Ren Commit: Victor Ren Add missing ;;;###autoload --- iedit.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iedit.el b/iedit.el index 703cd64554..234ad7a15a 100755 --- a/iedit.el +++ b/iedit.el @@ -2,7 +2,7 @@ ;; Copyright (C) 2010 - 2019, 2020, 2021 Victor Ren -;; Time-stamp: <2022-01-12 13:43:27 Victor Ren> +;; Time-stamp: <2022-01-12 14:32:55 Victor Ren> ;; Author: Victor Ren ;; Keywords: occurrence region simultaneous refactoring ;; Version: 0.9.9.9 @@ -428,6 +428,7 @@ Keymap used within overlays: (unless (boundp 'isearch-regexp-function) (defvaralias 'isearch-regexp-function 'isearch-word)) +;;;###autoload (defun iedit-mode-from-isearch (&optional arg) "Start Iedit mode using last search string as the regexp." (interactive "P") @@ -628,6 +629,7 @@ the initial string globally." (iedit-done) (iedit-mode 0))) +;;;###autoload (defun iedit-execute-last-modification (&optional arg) "Apply last modification in Iedit mode to the current buffer or an active region." (interactive "*P")
[nongnu] elpa/iedit updated (d62dc47575 -> 27c61866b1)
elpasync pushed a change to branch elpa/iedit. from d62dc47575 Revert "Add license file with GPLv3" new b13f05b9f1 New feature: switch from rectangle-mark-mode to iedit-rect mode new 48ab9e4be2 Add missing ;;;###autoload new 699e179dac New version 0.9.9.9.9 new 3fb4762f84 Prefer defvar-local. new 44968bea9b Fixed a typo new dd5d75b38e remove :local introduced in the previous commit new 2fff88fe5d Fix a failed test case new 27c61866b1 Merge commit 'd62dc47575' Summary of changes: README.org | 11 + iedit-lib.el | 75 -- iedit-rect.el | 63 +--- iedit-tests.el | 7 +++--- iedit.el | 45 --- 5 files changed, 82 insertions(+), 119 deletions(-)
[nongnu] elpa/iedit 699e179dac 3/8: New version 0.9.9.9.9
branch: elpa/iedit commit 699e179dac18c78698cba1a2052bee6f0bbc6bf7 Author: Victor Ren Commit: Victor Ren New version 0.9.9.9.9 --- iedit-lib.el | 4 ++-- iedit-rect.el | 4 ++-- iedit-tests.el | 4 ++-- iedit.el | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/iedit-lib.el b/iedit-lib.el index 6857409dcd..eef9a0a39a 100644 --- a/iedit-lib.el +++ b/iedit-lib.el @@ -3,10 +3,10 @@ ;; Copyright (C) 2010 - 2019, 2020, 2021 Victor Ren -;; Time-stamp: <2022-01-01 00:43:44 skangas> +;; Time-stamp: <2022-01-14 12:33:36 Victor Ren> ;; Author: Victor Ren ;; Keywords: occurrence region simultaneous rectangle refactoring -;; Version: 0.9.9.9 +;; Version: 0.9.9.9.9 ;; X-URL: https://github.com/victorhge/iedit ;;https://www.emacswiki.org/emacs/Iedit ;; Compatibility: GNU Emacs: 22.x, 23.x, 24.x, 25.x diff --git a/iedit-rect.el b/iedit-rect.el index 6bbb608ff5..c6952ba73a 100644 --- a/iedit-rect.el +++ b/iedit-rect.el @@ -2,10 +2,10 @@ ;; Copyright (C) 2010 - 2019, 2020 Victor Ren -;; Time-stamp: <2022-01-12 13:22:55 Victor Ren> +;; Time-stamp: <2022-01-14 12:33:45 Victor Ren> ;; Author: Victor Ren ;; Keywords: occurrence region simultaneous rectangle refactoring -;; Version: 0.9.9.9 +;; Version: 0.9.9.9.9 ;; X-URL: https://github.com/victorhge/iedit ;;https://www.emacswiki.org/emacs/Iedit ;; Compatibility: GNU Emacs: 22.x, 23.x, 24.x, 25.x diff --git a/iedit-tests.el b/iedit-tests.el index b842cccacd..29f7029fd2 100644 --- a/iedit-tests.el +++ b/iedit-tests.el @@ -2,9 +2,9 @@ ;; Copyright (C) 2010 - 2019, 2020 Victor Ren -;; Time-stamp: <2022-01-12 11:48:28 Victor Ren> +;; Time-stamp: <2022-01-14 12:33:56 Victor Ren> ;; Author: Victor Ren -;; Version: 0.9.9.9 +;; Version: 0.9.9.9.9 ;; X-URL: https://github.com/victorhge/iedit ;;https://www.emacswiki.org/emacs/Iedit ;; Compatibility: GNU Emacs: 22.x, 23.x, 24.x, 25.x diff --git a/iedit.el b/iedit.el index 234ad7a15a..8fceb86e18 100755 --- a/iedit.el +++ b/iedit.el @@ -2,10 +2,10 @@ ;; Copyright (C) 2010 - 2019, 2020, 2021 Victor Ren -;; Time-stamp: <2022-01-12 14:32:55 Victor Ren> +;; Time-stamp: <2022-01-14 12:33:25 Victor Ren> ;; Author: Victor Ren ;; Keywords: occurrence region simultaneous refactoring -;; Version: 0.9.9.9 +;; Version: 0.9.9.9.9 ;; X-URL: https://github.com/victorhge/iedit ;;https://www.emacswiki.org/emacs/Iedit ;; Compatibility: GNU Emacs: 22.x, 23.x, 24.x, 25.x
[nongnu] elpa/iedit 44968bea9b 5/8: Fixed a typo
branch: elpa/iedit commit 44968bea9bff8fdd5bf9d227f53814c44bb9f619 Author: Victor Ren Commit: Victor Ren Fixed a typo --- iedit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iedit.el b/iedit.el index 0f34db1f9c..9e46e8f65e 100755 --- a/iedit.el +++ b/iedit.el @@ -130,7 +130,7 @@ from iedit mode." :type 'boolean :group 'iedit) -(defvar iedit-is-narrowed-local nil +(defvar-local iedit-is-narrowed nil "This is buffer local variable which indicates if the buffer is narrowed by iedit temporarily.")
[nongnu] elpa/iedit 2fff88fe5d 7/8: Fix a failed test case
branch: elpa/iedit commit 2fff88fe5d480089ef0b235901b3a5e4a1bcefc1 Author: Victor Ren Commit: Victor Ren Fix a failed test case It failed when running not from iedit root folder. Since the shell command relay on a correct default directory. --- iedit-tests.el | 1 + 1 file changed, 1 insertion(+) diff --git a/iedit-tests.el b/iedit-tests.el index 29f7029fd2..f23832d535 100644 --- a/iedit-tests.el +++ b/iedit-tests.el @@ -37,6 +37,7 @@ (ert-deftest iedit-batch-compile-test () (with-temp-buffer + (cd (file-name-directory (locate-library "iedit-tests"))) (call-process-shell-command "emacs -L . -Q --batch -f batch-byte-compile *.el" nil (current-buffer)) (should (string= (buffer-string) "Iedit default key binding is C-; Iedit-rect default key binding is <;>
[nongnu] elpa/iedit dd5d75b38e 6/8: remove :local introduced in the previous commit
branch: elpa/iedit commit dd5d75b38ee0c52ad81245a8e5c932d3f5c4772d Author: Victor Ren Commit: Victor Ren remove :local introduced in the previous commit It breaks emacs < 27.1 --- iedit-lib.el | 1 - 1 file changed, 1 deletion(-) diff --git a/iedit-lib.el b/iedit-lib.el index 08862076aa..6fa586b009 100644 --- a/iedit-lib.el +++ b/iedit-lib.el @@ -94,7 +94,6 @@ mode, set it as nil." "If no-nil, iedit-mode automatically starts buffering the changes. This could be a workaround for lag problem under certain modes." :type 'boolean - :local t :group 'iedit) (defcustom iedit-overlay-priority 200
[nongnu] elpa/iedit 27c61866b1 8/8: Merge commit 'd62dc47575'
branch: elpa/iedit commit 27c61866b1b9b8d77629ac702e5f48e67dfe0d3b Merge: 2fff88fe5d d62dc47575 Author: Victor Ren Commit: Victor Ren Merge commit 'd62dc47575'
[elpa] externals/compat 70b7db100c 1/2: Remove broken quoting in require advice
branch: externals/compat commit 70b7db100cfb492c1a2497515ccc79c4ded262fa Author: Philip Kaludercic Commit: Philip Kaludercic Remove broken quoting in require advice Thanks to Aaron Jensen for noticing this issue. --- compat-25.1.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat-25.1.el b/compat-25.1.el index 86ad10fc4f..266f7ecb22 100644 --- a/compat-25.1.el +++ b/compat-25.1.el @@ -114,7 +114,7 @@ Equality with KEY is tested by TESTFN, defaulting to `eq'." ;; of of actual value, the highlighting is suppressed. :no-highlight t :max-version "24.5" - (if (eq 'feature 'subr-x) + (if (eq feature 'subr-x) (let ((entry (assq feature after-load-alist))) (let ((load-file-name nil)) (dolist (form (cdr entry))
[elpa] externals/compat updated (972e5d3082 -> edfc71a8b9)
elpasync pushed a change to branch externals/compat. from 972e5d3082 Avoid generating an empty eval-after-load new 70b7db100c Remove broken quoting in require advice new edfc71a8b9 Remove unnecessary :max-version from require advice Summary of changes: compat-25.1.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
[elpa] externals/corfu 11c6d68799: corfu--capf-wrapper: During auto complete, check the completion prefix early on
branch: externals/corfu commit 11c6d687996c0901a854f65b78e993b6639d79b9 Author: Daniel Mendler Commit: Daniel Mendler corfu--capf-wrapper: During auto complete, check the completion prefix early on It turns out that for non-exclusive Capfs, the completion table was still called during the exclusivity check despite a larger prefix length `corfu-prefix`. Most of the sanity checking is also moved to the `corfu--capf-wrapper` now. See the discussion in #115. Thank you, @ronniedroid! --- corfu.el | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/corfu.el b/corfu.el index b92813c868..9048714ede 100644 --- a/corfu.el +++ b/corfu.el @@ -1147,12 +1147,7 @@ See `completion-in-region' for the arguments BEG, END, TABLE, PRED." (when (and (not completion-in-region-mode) (equal tick (corfu--auto-tick))) (pcase (while-no-input ;; Interruptible capf query (run-hook-wrapped 'completion-at-point-functions #'corfu--capf-wrapper)) - ((and `(,fun ,beg ,end ,table . ,plist) -(guard (integer-or-marker-p beg)) -(guard (<= beg (point) end)) -(guard - (let ((len (or (plist-get plist :company-prefix-length) (- (point) beg - (or (eq len t) (>= len corfu-auto-prefix) + (`(,fun ,beg ,end ,table . ,plist) (let ((completion-in-region-mode-predicate (lambda () (eq beg (car-safe (funcall fun) (completion-extra-properties plist)) @@ -1201,13 +1196,20 @@ Auto completion is only performed if the tick did not change." (remove-hook 'post-command-hook #'corfu--auto-post-command 'local) (kill-local-variable 'completion-in-region-function -(defun corfu--capf-wrapper (fun) +(defun corfu--capf-wrapper (fun &optional prefix) "Wrapper for `completion-at-point' FUN. -Determines if the capf is applicable at the current position." +The wrapper determines if the capf is applicable at the current position +and performs sanity checking on the returned result. PREFIX is a prefix +length override, set to t for manual completion." (pcase (funcall fun) ((and res `(,beg ,end ,table . ,plist)) (and (integer-or-marker-p beg) ;; Valid capf result - (<= beg (point) end) ;; Sanity checking + (<= beg (point) end) ;; Sanity checking + ;; When auto completing, check the prefix length! + (let ((len (or prefix + (plist-get plist :company-prefix-length) + (- (point) beg +(or (eq len t) (>= len corfu-auto-prefix))) ;; For non-exclusive capfs, check for valid completion. (or (not (eq 'no (plist-get plist :exclusive))) (let* ((str (buffer-substring-no-properties beg end)) @@ -1224,7 +1226,7 @@ Determines if the capf is applicable at the current position." (defun corfu--capf-wrapper-advice (orig fun which) "Around advice for `completion--capf-wrapper'. The ORIG function takes the FUN and WHICH arguments." - (if corfu-mode (corfu--capf-wrapper fun) (funcall orig fun which))) + (if corfu-mode (corfu--capf-wrapper fun t) (funcall orig fun which))) ;;;###autoload (define-globalized-minor-mode corfu-global-mode corfu-mode corfu--on :group 'corfu)
[elpa] externals/vertico 11717dda42: Use minibuffer-message
branch: externals/vertico commit 11717dda42f043246147300cc61917e02673dafb Author: Daniel Mendler Commit: Daniel Mendler Use minibuffer-message --- vertico.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vertico.el b/vertico.el index 8568c3e107..0350f5e539 100644 --- a/vertico.el +++ b/vertico.el @@ -668,7 +668,7 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and PRED." minibuffer-completion-predicate) (if (eq minibuffer--require-match 'confirm) (eq (ignore-errors (read-char "Confirm")) 13) -(and (message "Match required") nil +(and (minibuffer-message "Match required") nil (defun vertico-exit (&optional arg) "Exit minibuffer with current candidate or input if prefix ARG is given."
[elpa] externals/consult db8a7c98b4: consult-register-window: Use display-buffer-at-bottom
branch: externals/consult commit db8a7c98b4f17eb135fec947b020c24470f6efb4 Author: Daniel Mendler Commit: Daniel Mendler consult-register-window: Use display-buffer-at-bottom --- README.org | 2 +- consult-register.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 724a0c9796..d5180f1d20 100644 --- a/README.org +++ b/README.org @@ -847,7 +847,7 @@ configuration examples. ;; Optionally configure the register formatting. This improves the register ;; preview for `consult-register', `consult-register-load', ;; `consult-register-store' and the Emacs built-ins. - (setq register-preview-delay 0 + (setq register-preview-delay 0.5 register-preview-function #'consult-register-format) ;; Optionally tweak the register preview window. diff --git a/consult-register.el b/consult-register.el index c0e5fb8490..b4d7497d8e 100644 --- a/consult-register.el +++ b/consult-register.el @@ -54,7 +54,7 @@ SHOW-EMPTY must be t if the window should be shown for an empty register list." 'face '(:inherit consult-separator :height 1 :underline t) (when (or show-empty regs) (with-current-buffer-window buffer - (cons 'display-buffer-below-selected + (cons 'display-buffer-at-bottom '((window-height . fit-window-to-buffer) (preserve-size . (nil . t nil
[elpa] externals/consult updated (db8a7c98b4 -> 04286c40f8)
elpasync pushed a change to branch externals/consult. from db8a7c98b4 consult-register-window: Use display-buffer-at-bottom new 34aab9d44f consult-register: Simplify new 75e5ed267f consult-register-format: Add separator space new 04286c40f8 Add consult-register-prefix Summary of changes: CHANGELOG.org | 1 + README.org | 1 + consult-register.el | 53 ++--- 3 files changed, 32 insertions(+), 23 deletions(-)
[elpa] externals/consult 04286c40f8 3/3: Add consult-register-prefix
branch: externals/consult commit 04286c40f8d607b2760d1f5542d361297f9b78b1 Author: Daniel Mendler Commit: Daniel Mendler Add consult-register-prefix --- CHANGELOG.org | 1 + README.org | 1 + consult-register.el | 17 +++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index 50997881a2..f4fd5ef658 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -8,6 +8,7 @@ on project.el. - Add =consult-project-buffer=, a variant of =consult-buffer= restricted to the current project. +- Add =consult-register-prefix= option. * Version 0.15 (2022-01-31) diff --git a/README.org b/README.org index d5180f1d20..2a16ebf41c 100644 --- a/README.org +++ b/README.org @@ -953,6 +953,7 @@ configuration examples. | consult-project-root-function| Function which returns current project root | | consult-recent-file-filter | Filter for =consult-recent-file= | | consult-register-narrow | Narrowing configuration for =consult-register= | + | consult-register-prefix | Prefix string for register keys during completion | | consult-ripgrep-args | Command line arguments for ripgrep | | consult-themes | List of themes to be presented for selection | | consult-widen-key| Widening key during completion | diff --git a/consult-register.el b/consult-register.el index eb2e5d2e75..fe764d0845 100644 --- a/consult-register.el +++ b/consult-register.el @@ -25,6 +25,11 @@ (require 'consult) +(defcustom consult-register-prefix #("@" 0 1 (face consult-key)) + "Prepend prefix in front of register keys during completion." + :type '(choice (const nil) string) + :group 'consult) + (defcustom consult-register-narrow `((?n "Number" ,#'numberp) (?s "String" ,#'stringp) @@ -50,7 +55,7 @@ SHOW-EMPTY must be t if the window should be shown for an empty register list." (let ((regs (consult-register--alist 'noerror)) (separator (and (display-graphic-p) - (propertize (concat (propertize " " 'display '(space :align-to right)) "\n") + (propertize #(" \n" 0 1 (display (space :align-to right))) 'face '(:inherit consult-separator :height 1 :underline t) (when (or show-empty regs) (with-current-buffer-window buffer @@ -69,15 +74,15 @@ SHOW-EMPTY must be t if the window should be shown for an empty register list." regs nil)) ;;;###autoload -(defun consult-register-format (reg &optional no-newline) +(defun consult-register-format (reg &optional completion) "Enhanced preview of register REG. - This function can be used as `register-preview-function'. -Append newline if NO-NEWLINE is nil." +If COMPLETION is non-nil format the register for completion." (pcase-let ((`(,key . ,val) reg)) (let* ((key-str (propertize (single-key-description key) 'face 'consult-key)) (len (max 3 (length key-str (concat + (and completion consult-register-prefix) key-str (make-string (- len (length key-str)) ?\s) " " ;; Special printing for certain register types (cond @@ -107,7 +112,7 @@ Append newline if NO-NEWLINE is nil." (consult--line-with-cursor val)) ;; Default printing for the other types (t (register-describe-oneline key))) - (and (not no-newline) "\n") + (and (not completion) "\n") (defun consult-register--alist (&optional noerror) "Return sorted register list. @@ -120,7 +125,7 @@ Raise an error if the list is empty and NOERROR is nil." (defun consult-register--candidates () "Return list of formatted register candidates." (mapcar (lambda (reg) -(let ((str (consult-register-format reg 'no-newline))) +(let ((str (consult-register-format reg 'completion))) (add-text-properties 0 (length str) (list 'consult--candidate (car reg)
[elpa] externals/consult 34aab9d44f 1/3: consult-register: Simplify
branch: externals/consult commit 34aab9d44f5af870ffb0cdc56e93cc0d881f069d Author: Daniel Mendler Commit: Daniel Mendler consult-register: Simplify --- consult-register.el | 41 ++--- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/consult-register.el b/consult-register.el index b4d7497d8e..f956f63f27 100644 --- a/consult-register.el +++ b/consult-register.el @@ -47,7 +47,7 @@ Each element of the list must have the form '(char name predicate)." BUFFER is the window buffer. SHOW-EMPTY must be t if the window should be shown for an empty register list." - (let ((regs (seq-filter #'cdr register-alist)) + (let ((regs (consult-register--alist 'noerror)) (separator (and (display-graphic-p) (propertize (concat (propertize " " 'display '(space :align-to right)) "\n") @@ -66,17 +66,14 @@ SHOW-EMPTY must be t if the window should be shown for an empty register list." (insert (mapconcat (lambda (reg) (concat (funcall register-preview-function reg) separator)) - (seq-sort #'car-less-than-car regs) nil)) + regs nil)) ;;;###autoload -(defun consult-register-format (reg) +(defun consult-register-format (reg &optional no-newline) "Enhanced preview of register REG. -This function can be used as `register-preview-function'." - (concat (consult-register--format reg) "\n")) - -(defun consult-register--format (reg) - "Format register REG for preview." +This function can be used as `register-preview-function'. +Append newline if NO-NEWLINE is nil." (pcase-let ((`(,key . ,val) reg)) (let* ((key-str (propertize (single-key-description key) 'face 'consult-key)) (len (max 3 (length key-str @@ -110,24 +107,30 @@ This function can be used as `register-preview-function'." (consult--format-location (buffer-name) (line-number-at-pos) (consult--line-with-cursor val)) ;; Default printing for the other types -(t (register-describe-oneline key))) +(t (register-describe-oneline key))) + (and (not no-newline) "\n") -(defun consult-register--alist () - "Return register list or raise an error if the list is empty." +(defun consult-register--alist (&optional noerror) + "Return sorted register list. +Raise an error if the list is empty and NOERROR is nil." ;; Sometimes, registers are made without a `cdr'. ;; Such registers don't do anything, and can be ignored. - (or (seq-filter #'cdr register-alist) (user-error "All registers are empty"))) + (or (sort (seq-filter #'cdr register-alist) #'car-less-than-car) + (and (not noerror) (user-error "All registers are empty" (defun consult-register--candidates () "Return list of formatted register candidates." (mapcar (lambda (reg) -(propertize - (consult-register--format reg) - 'consult--candidate (car reg) - 'consult--type - (car (seq-find (lambda (x) (funcall (caddr x) (cdr reg))) -consult-register-narrow - (sort (consult-register--alist) #'car-less-than-car))) +(let ((str (consult-register-format reg 'no-newline))) + (add-text-properties + 0 (length str) + (list 'consult--candidate (car reg) + 'consult--type + (car (seq-find (lambda (x) (funcall (caddr x) (cdr reg))) +consult-register-narrow))) + str) + str)) + (consult-register--alist))) ;;;###autoload (defun consult-register (&optional arg)
[elpa] externals/consult 75e5ed267f 2/3: consult-register-format: Add separator space
branch: externals/consult commit 75e5ed267fb5a3bd4435b61e8f1eb8455e5288b6 Author: Daniel Mendler Commit: Daniel Mendler consult-register-format: Add separator space --- consult-register.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/consult-register.el b/consult-register.el index f956f63f27..eb2e5d2e75 100644 --- a/consult-register.el +++ b/consult-register.el @@ -78,8 +78,7 @@ Append newline if NO-NEWLINE is nil." (let* ((key-str (propertize (single-key-description key) 'face 'consult-key)) (len (max 3 (length key-str (concat - key-str - (make-string (- len (length key-str)) ?\s) + key-str (make-string (- len (length key-str)) ?\s) " " ;; Special printing for certain register types (cond ;; Display full string
[elpa] externals/devdocs 783e9a6d4b: Use a visible marking for entry disambiguation
branch: externals/devdocs commit 783e9a6d4b0a36dfb646e3b9dad19c54018f7195 Author: Augusto Stoffel Commit: Augusto Stoffel Use a visible marking for entry disambiguation The marking style is specified by `devdocs-disambiguated-entry-format'. In particular, it can be made invisible, as it used to be. --- devdocs.el | 57 ++--- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/devdocs.el b/devdocs.el index cf6508f09b..767b8a7f35 100644 --- a/devdocs.el +++ b/devdocs.el @@ -75,6 +75,16 @@ directory-local variable." "String used to format a documentation location, e.g. in header line." :type 'string) +(defcustom devdocs-disambiguated-entry-format #("%s (%s)" 3 7 (face italic)) + "How to disambiguate entries with identical names in `devdocs-lookup'. +This string is passed to `format' with two arguments, the entry +name and a count." + :type '(choice (const :tag "Count in parentheses, italicized" +#("%s (%s)" 3 7 (face italic))) + (const :tag "Invisible cookie" +#("%s (%s)" 2 7 (invisible t))) + string)) + (defcustom devdocs-fontify-code-blocks t "Whether to fontify code snippets inside pre tags. Fontification is done using the `org-src' library, which see." @@ -451,20 +461,26 @@ ARGS is passed as is to `browse-url'." (defun devdocs--entries (documents) "A list of entries in DOCUMENTS, as propertized strings." - (let* ((cookie #x10) ;; Disambiguate entries with identical names - (fmtcand (lambda (it) -(setq cookie (1+ cookie)) -(concat (alist-get 'name it) -(propertize (string cookie) -'invisible t -'devdocs--data it) -(mapcan (lambda (doc) - (mapcar fmtcand (alist-get 'entries (devdocs--index doc - documents))) + (let* ((counts (make-hash-table :test 'equal)) + (mkentry (lambda (it) +(let* ((name (alist-get 'name it)) + (count (1+ (gethash name counts 0 + (puthash name count counts) + `(,name ,count . ,it + (entries (mapcan (lambda (doc) +(mapcar mkentry +(alist-get 'entries (devdocs--index doc + documents))) +(mapcar (pcase-lambda (`(,name ,count . ,it)) + (propertize (if (= 1 (gethash name counts)) + name +(format devdocs-disambiguated-entry-format name count)) + 'devdocs--data it)) +entries))) (defun devdocs--get-data (str) "Get data stored as a string property in STR." - (get-text-property (1- (length str)) 'devdocs--data str)) + (get-text-property 0 'devdocs--data str)) (defun devdocs--annotate (cand) "Return an annotation for `devdocs--read-entry' candidate CAND." @@ -472,16 +488,6 @@ ARGS is passed as is to `browse-url'." (concat " " (propertize " " 'display '(space :align-to 40)) (devdocs--doc-title .doc) devdocs-separator .type))) -(defun devdocs--eat-cookie (&rest _) - "Eat the disambiguation cookie in the minibuffer." - (save-excursion -(goto-char (minibuffer-prompt-end)) -(while (and (not (eobp)) (<= (char-after) #x10)) - (forward-char)) -(unless (eobp) - (add-text-properties (point) (1+ (point)) - '(invisible t rear-nonsticky t) - (defun devdocs--relevant-docs (ask) "Return a list of relevant documents for the current buffer. May ask interactively for the desired documents. If ASK is @@ -508,12 +514,9 @@ INITIAL-INPUT is passed to `completing-read'" (if (eq action 'metadata) metadata (complete-with-action action cands string predicate - (cand (minibuffer-with-setup-hook - (lambda () - (add-hook 'after-change-functions 'devdocs--eat-cookie nil t)) - (completing-read prompt coll nil t initial-input -'devdocs-history -(thing-at-point 'symbol) + (cand (completing-read prompt coll nil t initial-input +'devdocs-history +(thing-at-point 'symbol (devdocs--get-data (car (member cand cands) ;;;###autoload
[elpa] externals/consult 44580944f9: README: Add link to @astoff's devdocs.el
branch: externals/consult commit 44580944f95d52bcd5a3ed79adef57e51aca7e31 Author: Daniel Mendler Commit: Daniel Mendler README: Add link to @astoff's devdocs.el This excellent package works well with the completion packages around Vertico, Consult, etc. Devdocs browsing came up a few times on the Consult issue tracker. --- README.org | 1 + 1 file changed, 1 insertion(+) diff --git a/README.org b/README.org index 2a16ebf41c..21e2196e7c 100644 --- a/README.org +++ b/README.org @@ -1057,6 +1057,7 @@ offer functionality based on ~completing-read~. - [[https://github.com/minad/cape][cape]]: Completion At Point Extensions, which can be used with =consult-completion-in-region= and [[https://github.com/minad/corfu][Corfu]]. - [[https://github.com/minad/bookmark-view][bookmark-view]]: Store window configuration as bookmarks, possible integration with =consult-buffer=. - [[https://github.com/bdarcus/citar][citar]]: Versatile package for citation insertion and bibliography management. +- [[https://github.com/astoff/devdocs.el][devdocs]]: Emacs viewer for DevDocs with a convenient completion interface. - [[https://github.com/d12frosted/flyspell-correct][flyspell-correct]]: Apply spelling corrections by selecting via =completing-read=. - [[https://github.com/mhayashi1120/Emacs-wgrep][wgrep]]: Editing of grep buffers, use together with =consult-grep= via =embark-export=. - [[https://github.com/iyefrat/all-the-icons-completion][all-the-icons-completion]]: Icons for the completion UI.
[nongnu] elpa/helm e17ad364b9: Fix helm-grep-hack-types for ack v3.3.1
branch: elpa/helm commit e17ad364b9ddc7b283b21df94b3ba2fa8bdc11e3 Author: Thierry Volpiatto Commit: Thierry Volpiatto Fix helm-grep-hack-types for ack v3.3.1 --- helm-grep.el | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/helm-grep.el b/helm-grep.el index 999e197fbd..6fa38df518 100644 --- a/helm-grep.el +++ b/helm-grep.el @@ -1037,14 +1037,13 @@ Special commands: ;; `helm-grep-use-ack-p'. (call-process (helm-grep-command t) nil t nil "--help-types") (goto-char (point-min)) -(cl-loop while (re-search-forward -"^ *--\\(\\[no\\]\\)\\([^. ]+\\) *\\(.*\\)" nil t) - collect (cons (concat (match-string 2) - " [" (match-string 3) "]") - (match-string 2)) - collect (cons (concat "no" (match-string 2) - " [" (match-string 3) "]") - (concat "no" (match-string 2)) +(cl-loop while (re-search-forward "^ +\\([^. ]+\\) +\\(.*\\)" nil t) + collect (cons (concat (match-string 1) + " [" (match-string 2) "]") + (match-string 1)) + collect (cons (concat "no" (match-string 1) + " [" (match-string 2) "]") + (concat "no" (match-string 1)) (defun helm-grep-ack-types-transformer (candidates _source) (cl-loop for i in candidates
[nongnu] elpa/helm-core updated (c9e1c5b964 -> e17ad364b9)
elpasync pushed a change to branch elpa/helm-core. from c9e1c5b964 Fix paren error adds e17ad364b9 Fix helm-grep-hack-types for ack v3.3.1 No new revisions were added by this update. Summary of changes: helm-grep.el | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-)
[elpa] externals/consult updated (44580944f9 -> 75a6a83159)
elpasync pushed a change to branch externals/consult. from 44580944f9 README: Add link to @astoff's devdocs.el new a10d59436f consult-register: Use cl-defgeneric/cl-defmethod new 75a6a83159 Update changelog Summary of changes: CHANGELOG.org | 1 + README.org | 1 - consult-register.el | 234 ++-- 3 files changed, 136 insertions(+), 100 deletions(-)
[elpa] externals/consult 75a6a83159 2/2: Update changelog
branch: externals/consult commit 75a6a831598f34aca348f8eddd495386ff31a631 Author: Daniel Mendler Commit: Daniel Mendler Update changelog --- CHANGELOG.org | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.org b/CHANGELOG.org index f4fd5ef658..75b8d9cacb 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -9,6 +9,7 @@ - Add =consult-project-buffer=, a variant of =consult-buffer= restricted to the current project. - Add =consult-register-prefix= option. +- Introduced a generic and extensible =consult-register= implementation. * Version 0.15 (2022-01-31)
[elpa] externals/consult a10d59436f 1/2: consult-register: Use cl-defgeneric/cl-defmethod
branch: externals/consult commit a10d59436f087f1bc79b009cb4dfb155a7ad5dea Author: Daniel Mendler Commit: Daniel Mendler consult-register: Use cl-defgeneric/cl-defmethod --- README.org | 1 - consult-register.el | 234 ++-- 2 files changed, 135 insertions(+), 100 deletions(-) diff --git a/README.org b/README.org index 21e2196e7c..cdf99d182c 100644 --- a/README.org +++ b/README.org @@ -952,7 +952,6 @@ configuration examples. | consult-project-buffer-sources | List of virtual project buffer sources | | consult-project-root-function| Function which returns current project root | | consult-recent-file-filter | Filter for =consult-recent-file= | - | consult-register-narrow | Narrowing configuration for =consult-register= | | consult-register-prefix | Prefix string for register keys during completion | | consult-ripgrep-args | Command line arguments for ripgrep | | consult-themes | List of themes to be presented for selection | diff --git a/consult-register.el b/consult-register.el index fe764d0845..4ac736fc66 100644 --- a/consult-register.el +++ b/consult-register.el @@ -30,21 +30,81 @@ :type '(choice (const nil) string) :group 'consult) -(defcustom consult-register-narrow - `((?n "Number" ,#'numberp) -(?s "String" ,#'stringp) -(?p "Point" ,#'markerp) -(?r "Rectangle" ,(lambda (x) (stringp (car-safe x -;; frameset-register-p and kmacro-register-p exists since 27.1 -(?t "Frameset" ,(lambda (x) (eq (type-of x) 'frameset-register))) -(?k "Kmacro" ,(lambda (x) (eq (type-of x) 'kmacro-register))) -(?f "File" ,(lambda (x) (memq (car-safe x) '(file file-query -(?w "Window" ,(lambda (x) (window-configuration-p (car-safe x) - "Register narrowing configuration. - -Each element of the list must have the form '(char name predicate)." - :type '(repeat (list character string function)) - :group 'consult) +(defvar consult-register--narrow + '((?n . "Number") +(?s . "String") +(?p . "Point") +(?r . "Rectangle") +(?t . "Frameset") +(?k . "Kmacro") +(?f . "File") +(?w . "Window")) + "Register type names. +Each element of the list must have the form '(char . name).") + +(cl-defun consult-register--format-value (val) + "Format generic register VAL as string." + (with-output-to-string (register-val-describe val nil))) + +(cl-defgeneric consult-register--describe (val) + "Describe generic register VAL." + (list (consult-register--format-value val))) + +(cl-defmethod consult-register--describe ((val number)) + "Describe numeric register VAL." + (list (consult-register--format-value val) 'consult--type ?n)) + +(cl-defmethod consult-register--describe ((val string)) + "Describe string register VAL." + (list val 'consult--type +(if (eq (car (get-text-property 0 'yank-handler val)) +'rectangle--insert-for-yank) +?r ?s))) + +(cl-defmethod consult-register--describe ((val marker)) + "Describe marker register VAL." + (with-current-buffer (marker-buffer val) +(save-restriction + (save-excursion +(widen) +(goto-char val) +(list + (consult--format-location + (buffer-name) (line-number-at-pos) + (consult--line-with-cursor val)) + 'consult--type ?p) + +(cl-defmethod consult-register--describe ((val kmacro-register)) + "Describe kmacro register VAL." + (list (consult-register--format-value val) 'consult--type ?k)) + +(cl-defmethod consult-register--describe ((val (head file))) + "Describe file register VAL." + (list (propertize (abbreviate-file-name (cdr val)) 'face 'consult-file) +'consult--type ?f 'multi-category `(file . ,(cdr val + +(cl-defmethod consult-register--describe ((val (head file-query))) + "Describe file-query register VAL." + (list (format "%s at position %d" +(propertize (abbreviate-file-name (cadr val)) +'face 'consult-file) +(caddr val)) +'consult--type ?f 'multi-category `(file . ,(cadr val + +(cl-defmethod consult-register--describe ((val cons)) + "Describe rectangle or window-configuration register VAL." + (cond + ((stringp (car val)) +(list (string-join val "\n") 'consult--type ?r)) + ((window-configuration-p (car val)) +(list (consult-register--format-value val) + 'consult--type ?w)) + (t (list (consult-register--format-value val) + +(with-eval-after-load 'frameset + (cl-defmethod consult-register--describe ((val frameset-register)) +"Describe frameset register VAL." +(list (consult-register--format-value val) 'consult--type ?t))) ;;;###autoload (defun consult-register-window (buffer &optional show-empty) @@ -78,41 +138,26 @@ SHOW-EMPTY must be t if the window sho
[nongnu] elpa/rust-mode e35a1800fc: bump version to 1.0.4
branch: elpa/rust-mode commit e35a1800fc0f9ed178539d6fb82ed885c1014fb5 Author: brotzeit Commit: brotzeit bump version to 1.0.4 --- rust-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-mode.el b/rust-mode.el index 09eefed081..beb52106f1 100644 --- a/rust-mode.el +++ b/rust-mode.el @@ -1,6 +1,6 @@ ;;; rust-mode.el --- A major-mode for editing Rust source code -*-lexical-binding: t-*- -;; Version: 1.0.3 +;; Version: 1.0.4 ;; Author: Mozilla ;; Url: https://github.com/rust-lang/rust-mode ;; Keywords: languages
[elpa] elpa-admin 3165af29ea: * elpa-admin.el (elpaa--release-email): `message` doesn't return nil
branch: elpa-admin commit 3165af29ea66a0c3354e30716470a0cc804f8799 Author: Stefan Monnier Commit: Stefan Monnier * elpa-admin.el (elpaa--release-email): `message` doesn't return nil --- elpa-admin.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elpa-admin.el b/elpa-admin.el index 3b1b6008c8..8b7ec1993a 100644 --- a/elpa-admin.el +++ b/elpa-admin.el @@ -2005,7 +2005,9 @@ If WITH-CORE is non-nil, it means we manage :core packages as well." (email (cdr-safe x))) (if (not (and (stringp email) (string-match "@" email))) - (message "Error, no email address: %S" x) + (progn +(message "Error, no email address: %S" x) +nil) (while (string-match "[<@>,]" name) (message "Error, weird char \"%s\" in name: %S" (match-string 0 name) name)
[elpa] externals/embark a0443e23b6 2/2: Merge pull request #463 from minad/remove-consult-register
branch: externals/embark commit a0443e23b6e7c2823099dda2494841ee5f38829f Merge: 29848fc3c8 198c5c9718 Author: Omar Antolín Camarena Commit: GitHub Merge pull request #463 from minad/remove-consult-register consult-register uses multi-category now --- embark-consult.el | 5 - 1 file changed, 5 deletions(-) diff --git a/embark-consult.el b/embark-consult.el index e70cab8f87..fd6ead9102 100644 --- a/embark-consult.el +++ b/embark-consult.el @@ -206,11 +206,6 @@ The elements of LINES are assumed to be values of category `consult-line'." (setf (alist-get 'consult-isearch embark-transformer-alist) #'embark-consult--target-strip) -;;; Support for consult-register - -(setf (alist-get 'consult-register embark-collect-initial-view-alist) - 'zebra) - ;;; Bindings for consult commands in embark keymaps (define-key embark-file-map "x" #'consult-file-externally)
[elpa] externals/embark-consult updated (29848fc3c8 -> a0443e23b6)
elpasync pushed a change to branch externals/embark-consult. from 29848fc3c8 Merge pull request #462 from minad/tab-actions adds 198c5c9718 consult-register uses multi-category now adds a0443e23b6 Merge pull request #463 from minad/remove-consult-register No new revisions were added by this update. Summary of changes: embark-consult.el | 5 - 1 file changed, 5 deletions(-)
[elpa] externals/embark 198c5c9718 1/2: consult-register uses multi-category now
branch: externals/embark commit 198c5c9718bff6ad7075639daf94961bad4acd46 Author: Daniel Mendler Commit: Daniel Mendler consult-register uses multi-category now See https://github.com/minad/consult/commit/a10d59436f087f1bc79b009cb4dfb155a7ad5dea --- embark-consult.el | 5 - 1 file changed, 5 deletions(-) diff --git a/embark-consult.el b/embark-consult.el index e70cab8f87..fd6ead9102 100644 --- a/embark-consult.el +++ b/embark-consult.el @@ -206,11 +206,6 @@ The elements of LINES are assumed to be values of category `consult-line'." (setf (alist-get 'consult-isearch embark-transformer-alist) #'embark-consult--target-strip) -;;; Support for consult-register - -(setf (alist-get 'consult-register embark-collect-initial-view-alist) - 'zebra) - ;;; Bindings for consult commands in embark keymaps (define-key embark-file-map "x" #'consult-file-externally)
[elpa] externals/consult 8083f7f314: Assign the consult-location category to marker registers
branch: externals/consult commit 8083f7f314e2d0bd5a4d424bf9b2cb2950f4310b Author: Daniel Mendler Commit: Daniel Mendler Assign the consult-location category to marker registers cc @oantolin --- consult-register.el | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/consult-register.el b/consult-register.el index 4ac736fc66..6bafebab3d 100644 --- a/consult-register.el +++ b/consult-register.el @@ -68,11 +68,12 @@ Each element of the list must have the form '(char . name).") (save-excursion (widen) (goto-char val) -(list - (consult--format-location - (buffer-name) (line-number-at-pos) - (consult--line-with-cursor val)) - 'consult--type ?p) +(let* ((line (line-number-at-pos)) + (str (propertize (consult--line-with-cursor val) +'consult-location (cons val line + (list (consult--format-location (buffer-name) line str) +'multi-category `(consult-location . ,str) +'consult--type ?p)) (cl-defmethod consult-register--describe ((val kmacro-register)) "Describe kmacro register VAL."
[nongnu] elpa/telephone-line aa7b1ec159 2/2: Merge pull request #125 from eshrh/meow-segment
branch: elpa/telephone-line commit aa7b1ec159252f8a25f3c75fcc346fa4b0b3c73d Merge: 4fd47989c4 b32047f32b Author: Daniel Bordak Commit: GitHub Merge pull request #125 from eshrh/meow-segment telephone-line-segments.el: add support for meow --- telephone-line-segments.el | 7 +++ 1 file changed, 7 insertions(+) diff --git a/telephone-line-segments.el b/telephone-line-segments.el index 8ff5f6147d..32d5bf2d3d 100644 --- a/telephone-line-segments.el +++ b/telephone-line-segments.el @@ -319,6 +319,13 @@ Configure the face group telephone-line-evil to change the colors per-mode." (seq-take tag 1) tag))) +(telephone-line-defsegment* telephone-line-meow-tag-segment () + (when (bound-and-true-p meow-mode) +(let ((tag (meow--get-state-name (meow--current-state + (if telephone-line-evil-use-short-tag + (seq-take tag 1) +tag + (telephone-line-defsegment* telephone-line-workgroups2-segment () (when (bound-and-true-p workgroups-mode) (telephone-line-raw (wg-mode-line-string) t)))
[nongnu] elpa/telephone-line b32047f32b 1/2: telephone-line-segments.el: add support for meow
branch: elpa/telephone-line commit b32047f32bbae937946a48f9fb5818d8e91c9ade Author: eshrh Commit: eshrh telephone-line-segments.el: add support for meow Adds a segment for the meow modal editing system. Respects telephone-line-evil-use-short-tag by shortening the state name to the first character. --- telephone-line-segments.el | 7 +++ 1 file changed, 7 insertions(+) diff --git a/telephone-line-segments.el b/telephone-line-segments.el index 8ff5f6147d..32d5bf2d3d 100644 --- a/telephone-line-segments.el +++ b/telephone-line-segments.el @@ -319,6 +319,13 @@ Configure the face group telephone-line-evil to change the colors per-mode." (seq-take tag 1) tag))) +(telephone-line-defsegment* telephone-line-meow-tag-segment () + (when (bound-and-true-p meow-mode) +(let ((tag (meow--get-state-name (meow--current-state + (if telephone-line-evil-use-short-tag + (seq-take tag 1) +tag + (telephone-line-defsegment* telephone-line-workgroups2-segment () (when (bound-and-true-p workgroups-mode) (telephone-line-raw (wg-mode-line-string) t)))
[elpa] externals/embark ed8cd7dc81: Ignore target for xref-find-definitions (fix #464)
branch: externals/embark commit ed8cd7dc81026a9e123c52d8c78fdb5f9329ee33 Author: Omar AntolÃn Camarena Commit: Omar AntolÃn Camarena Ignore target for xref-find-definitions (fix #464) --- embark.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/embark.el b/embark.el index ffae7d6057..80f6a3b9c7 100644 --- a/embark.el +++ b/embark.el @@ -422,7 +422,8 @@ replaced by the single `embark-allow-edit-actions' variable." (append-to-file embark--ignore-target) (shell-command-on-region embark--ignore-target) (format-encode-region embark--ignore-target) -(format-decode-region embark--ignore-target)) +(format-decode-region embark--ignore-target) +(xref-find-definitions embark--ignore-target)) "Alist associating commands with post-injection setup hooks. For commands appearing as keys in this alist, run the corresponding value as a setup hook after injecting the target
[elpa] externals/embark-consult updated (a0443e23b6 -> ed8cd7dc81)
elpasync pushed a change to branch externals/embark-consult. from a0443e23b6 Merge pull request #463 from minad/remove-consult-register adds ed8cd7dc81 Ignore target for xref-find-definitions (fix #464) No new revisions were added by this update. Summary of changes: embark.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)