Fix compatibility with Emacs 28.1

This commit is contained in:
Jessie Hildebrandt 2023-12-09 05:49:49 -05:00
parent a5caf7537f
commit 7931cbaadb

View File

@ -213,9 +213,10 @@ All functions are run with the eldoc child frame selected."
(defun eldoc-frame--remove-hr () (defun eldoc-frame--remove-hr ()
"Remove horizontal rules from the current buffer." "Remove horizontal rules from the current buffer."
(goto-char (point-min)) (goto-char (point-min))
(while-let ((prop (text-property-search-forward 'markdown-hr))) (let ((prop))
(while (setq prop (text-property-search-forward 'markdown-hr))
(goto-char (prop-match-beginning prop)) (goto-char (prop-match-beginning prop))
(delete-char (- (prop-match-end prop) (prop-match-beginning prop))))) (delete-char (- (prop-match-end prop) (prop-match-beginning prop))))))
(defun eldoc-frame--remove-gaps () (defun eldoc-frame--remove-gaps ()
"Truncate groups of two-or-more newlines from the current buffer." "Truncate groups of two-or-more newlines from the current buffer."
@ -497,8 +498,8 @@ reused. Otherwise, a new frame is created by `eldoc-frame--create-child-frame'."
(defvar-local eldoc-frame--old-eldoc-functions nil (defvar-local eldoc-frame--old-eldoc-functions nil
"The original buffer-local value of eldoc-display-functions.") "The original buffer-local value of eldoc-display-functions.")
(defvar-keymap eldoc-frame-mode-map (defvar eldoc-frame-mode-map (make-sparse-keymap)
:doc "Keymap used when `eldoc-frame-mode' is active.") "Keymap used when `eldoc-frame-mode' is active.")
;; ---------------------------------- ;; ;; ---------------------------------- ;;
;; Activation ;; Activation