unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: 69989@debbugs.gnu.org
Cc: "João Távora" <joaotavora@gmail.com>
Subject: bug#69989: [PATCH] Fix invocation of Java Language Server
Date: Sun, 24 Mar 2024 20:45:04 +0000	[thread overview]
Message-ID: <87ttkv8ilr.fsf@posteo.net> (raw)
In-Reply-To: <87y1a78j3h.fsf@posteo.net> (Philip Kaludercic's message of "Sun,  24 Mar 2024 20:34:26 +0000")

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

Philip Kaludercic <philipk@posteo.net> writes:

> Oh and this patch uses functions that are not available in Emacs 26.3,
> so it would make sense to apply my patch that adds Compat support to
> Eglot first.

Apparently my patch did not arrive on the mailing list, so I am
attaching it again here:


[-- Attachment #2: 0001-Add-Compat-as-an-Eglot-dependency.patch --]
[-- Type: text/x-diff, Size: 2355 bytes --]

From 8c1613a500a617c72b49905968c04e855fee9ee5 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Sat, 9 Mar 2024 08:11:03 +0100
Subject: [PATCH] Add Compat as an Eglot dependency

* lisp/progmodes/eglot.el (eglot--format-markup): Remove fboundp
check for 'text-property-search-forward'.

Additionally this should make 'package-get-version' available
for releases of Emacs previous to 27.1.  (bug#62198)
---
 lisp/progmodes/eglot.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 50820e81107..62606d8dbb2 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -7,7 +7,7 @@
 ;; Maintainer: João Távora <joaotavora@gmail.com>
 ;; URL: https://github.com/joaotavora/eglot
 ;; Keywords: convenience, languages
-;; Package-Requires: ((emacs "26.3") (jsonrpc "1.0.24") (flymake "1.2.1") (project "0.9.8") (xref "1.6.2") (eldoc "1.14.0") (seq "2.23") (external-completion "0.1"))
+;; Package-Requires: ((emacs "26.1") (jsonrpc "1.0.24") (flymake "1.2.1") (project "0.9.8") (xref "1.6.2") (eldoc "1.14.0") (seq "2.23") (external-completion "0.1") (compat "27.1"))
 
 ;; This is a GNU ELPA :core package.  Avoid adding functionality
 ;; that is not available in the version of Emacs recorded above or any
@@ -110,6 +110,7 @@
 (require 'text-property-search nil t)
 (require 'diff-mode)
 (require 'diff)
+(require 'compat)
 
 ;; These dependencies are also GNU ELPA core packages.  Because of
 ;; bug#62576, since there is a risk that M-x package-install, despite
@@ -1831,10 +1832,9 @@ eglot--format-markup
         (font-lock-ensure)
         (goto-char (point-min))
         (let ((inhibit-read-only t))
-          (when (fboundp 'text-property-search-forward) ;; FIXME: use compat
-            (while (setq match (text-property-search-forward 'invisible))
-              (delete-region (prop-match-beginning match)
-                             (prop-match-end match)))))
+          (while (setq match (text-property-search-forward 'invisible))
+            (delete-region (prop-match-beginning match)
+                           (prop-match-end match))))
         (string-trim (buffer-string))))))
 
 (defun eglot--read-server (prompt &optional dont-if-just-the-one)
-- 
2.44.0


[-- Attachment #3: Type: text/plain, Size: 35 bytes --]


-- 
	Philip Kaludercic on icterid

  reply	other threads:[~2024-03-24 20:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-24 20:34 bug#69989: [PATCH] Fix invocation of Java Language Server Philip Kaludercic
2024-03-24 20:45 ` Philip Kaludercic [this message]
2024-03-24 21:35 ` Felician Nemeth
2024-03-25  7:11   ` Philip Kaludercic

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87ttkv8ilr.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=69989@debbugs.gnu.org \
    --cc=joaotavora@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).