diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2024-05-18 00:16:12 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2024-05-18 00:16:12 +0200 |
| commit | a71e5c96564163837810b96bd34322b42f6e4d9c (patch) | |
| tree | 83959ab9fd823b7001325735d5169926efdbe0af /cape.el | |
| parent | 826701cfc36dcc429ecb7174921be2085d04c1b9 (diff) | |
Don't use eshell-bol on Emacs 30
Diffstat (limited to 'cape.el')
| -rw-r--r-- | cape.el | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -354,7 +354,7 @@ string as first argument to the completion table." (declare-function ring-elements "ring") (declare-function eshell-bol "eshell") -(declare-function comint-bol "comint") +(declare-function comint-line-beginning-position "comint") (defvar eshell-history-ring) (defvar comint-input-ring) @@ -375,10 +375,12 @@ See also `consult-history' for a more flexible variant based on (cond ((derived-mode-p 'eshell-mode) (setq history eshell-history-ring - bol (save-excursion (eshell-bol) (point)))) + bol (if (eval-when-compile (< emacs-major-version 30)) + (save-excursion (eshell-bol) (point)) + (line-beginning-position)))) ((derived-mode-p 'comint-mode) (setq history comint-input-ring - bol (save-excursion (comint-bol) (point)))) + bol (comint-line-beginning-position))) ((and (minibufferp) (not (eq minibuffer-history-variable t))) (setq history (symbol-value minibuffer-history-variable) bol (line-beginning-position)))) |
