Compare commits

...

2 Commits

Author SHA1 Message Date
09d1408338 Lint comments 2023-12-09 05:50:00 -05:00
7931cbaadb Fix compatibility with Emacs 28.1 2023-12-09 05:49:49 -05:00

View File

@ -1,16 +1,16 @@
;;; eldoc-frame.el --- Display eldoc documentation in child frame -*- lexical-binding: t; -*- ;;; eldoc-frame.el --- Display eldoc documentation in child frame -*- lexical-binding: t; -*-
;;
;; Author: Jessie Hildebrandt <jessieh@jessieh.net> ;; Author: Jessie Hildebrandt <jessieh@jessieh.net>
;; Yuan Fu <casouri@gmail.com> ;; Yuan Fu <casouri@gmail.com>
;; Homepage: https://git.tty.dog/jessieh/eldoc-frame ;; Homepage: https://git.tty.dog/jessieh/eldoc-frame
;; Keywords: eldoc ;; Keywords: docs
;; Version: 1.0.0 ;; Version: 1.0.0
;; Package-Requires: ((emacs "28.1")) ;; Package-Requires: ((emacs "28.1"))
;;
;; Forked from eldoc-box: ;; Forked from eldoc-box:
;; https://github.com/casouri/eldoc-box ;; https://github.com/casouri/eldoc-box
;; eldoc-box Copyright (C) 2018 Yuan Fu ;; eldoc-box Copyright (C) 2018 Yuan Fu
;;
;; This file is not part of GNU Emacs. ;; This file is not part of GNU Emacs.
;;; Commentary: ;;; Commentary:
@ -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))
(goto-char (prop-match-beginning prop)) (while (setq prop (text-property-search-forward 'markdown-hr))
(delete-char (- (prop-match-end prop) (prop-match-beginning prop))))) (goto-char (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