From 7931cbaadbb9393dc4b17e4e3f8d03988fb9275c Mon Sep 17 00:00:00 2001 From: Jessie Hildebrandt Date: Sat, 9 Dec 2023 05:49:49 -0500 Subject: [PATCH] Fix compatibility with Emacs 28.1 --- eldoc-frame.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/eldoc-frame.el b/eldoc-frame.el index e9ed506..7cff1bd 100644 --- a/eldoc-frame.el +++ b/eldoc-frame.el @@ -213,9 +213,10 @@ All functions are run with the eldoc child frame selected." (defun eldoc-frame--remove-hr () "Remove horizontal rules from the current buffer." (goto-char (point-min)) - (while-let ((prop (text-property-search-forward 'markdown-hr))) - (goto-char (prop-match-beginning prop)) - (delete-char (- (prop-match-end prop) (prop-match-beginning prop))))) + (let ((prop)) + (while (setq prop (text-property-search-forward 'markdown-hr)) + (goto-char (prop-match-beginning prop)) + (delete-char (- (prop-match-end prop) (prop-match-beginning prop)))))) (defun eldoc-frame--remove-gaps () "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 "The original buffer-local value of ‘eldoc-display-functions’.") -(defvar-keymap eldoc-frame-mode-map - :doc "Keymap used when `eldoc-frame-mode' is active.") +(defvar eldoc-frame-mode-map (make-sparse-keymap) + "Keymap used when `eldoc-frame-mode' is active.") ;; ---------------------------------- ;; ;; Activation