all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Slava Akhmechet <coffeemug@gmail.com>
To: "João Távora" <joaotavora@gmail.com>
Cc: 68145@debbugs.gnu.org,
	Felician Nemeth <felician.nemeth@gmail.com>,
	Stefan Kangas <stefankangas@gmail.com>
Subject: bug#68145: [PATCH] * doc/misc/eglot.texi: Fix broken function calls
Date: Sat, 30 Dec 2023 12:32:17 -0800	[thread overview]
Message-ID: <CAF0hMrzLpE4zyawHec_78oTwL4Jqs63we5cqXU-MN9wH21C0CQ@mail.gmail.com> (raw)
In-Reply-To: <CALDnm50UkHcmacGkzp5euarTF=H3NFdwmQhHUyaU9cdNvcGKJw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 195 bytes --]

On Sat, Dec 30, 2023 at 6:46 AM João Távora <joaotavora@gmail.com> wrote:
> The remaining simplification is welcome.

Ack. Attached is a small patch that just cleans up overlay handling.

[-- Attachment #1.2: Type: text/html, Size: 291 bytes --]

[-- Attachment #2: 0001-doc-misc-eglot.texi-Simplify-overlay-handling.patch --]
[-- Type: application/octet-stream, Size: 1528 bytes --]

From c3e961d99639b3d85b733257135d74958ef1b845 Mon Sep 17 00:00:00 2001
From: Slava Akhmechet <coffeemug@gmail.com>
Date: Sat, 30 Dec 2023 12:27:51 -0800
Subject: [PATCH] doc/misc/eglot.texi: Simplify overlay handling

---
 doc/misc/eglot.texi | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi
index a338677e844..6895cd671f5 100644
--- a/doc/misc/eglot.texi
+++ b/doc/misc/eglot.texi
@@ -1405,8 +1405,6 @@ The remainder of the implementation consists of standard Elisp
 techniques to loop over arrays, manage buffers and overlays.
 
 @lisp
-(defvar-local eglot-clangd-inactive-region-overlays '())
-
 (cl-defmethod eglot-handle-notification
   (_server (_method (eql textDocument/inactiveRegions))
            &key regions textDocument &allow-other-keys)
@@ -1414,14 +1412,14 @@ techniques to loop over arrays, manage buffers and overlays.
                                      (cl-getf textDocument :uri))))
             (buffer (find-buffer-visiting path)))
       (with-current-buffer buffer
-        (mapc #'delete-overlay eglot-clangd-inactive-region-overlays)
+        (remove-overlays nil nil 'inactive-code t)
         (cl-loop
          for r across regions
          for (beg . end) = (eglot-range-region r)
          for ov = (make-overlay beg end)
          do
          (overlay-put ov 'face 'shadow)
-         (push ov eglot-clangd-inactive-region-overlays)))))
+         (overlay-put ov 'inactive-code t)))))
 @end lisp
 
 @end itemize
-- 
2.43.0


  parent reply	other threads:[~2023-12-30 20:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-30  9:05 bug#68145: [PATCH] * doc/misc/eglot.texi: Fix broken function calls Vyacheslav Akhmechet
2023-12-30 13:45 ` Felician Nemeth
2023-12-30 14:46   ` João Távora
2023-12-30 18:16     ` Stefan Kangas
2024-01-01 18:17       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-30 20:32     ` Slava Akhmechet [this message]
2024-01-11 20:58       ` Stefan Kangas
2024-01-11 21:52         ` João Távora
2024-01-13 10:56           ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAF0hMrzLpE4zyawHec_78oTwL4Jqs63we5cqXU-MN9wH21C0CQ@mail.gmail.com \
    --to=coffeemug@gmail.com \
    --cc=68145@debbugs.gnu.org \
    --cc=felician.nemeth@gmail.com \
    --cc=joaotavora@gmail.com \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.