Merge from origin/emacs-29
07f3236133
* src/profiler.c (malloc_probe): Make it safe for GC (bug...1f1d36fa80
* lisp/emacs-lisp/debug-early.el (debug-early-backtrace):...99df815c15
Revert "Don't disable eldoc when doing edebug"0a4b1c0102
; Eglot: improve bug-reference-url-format/bug-reference-u...40c9fc8e3b
Eglot: work around Tramp instability bug#613504a6db125b9
Fix treesit-indent-region7ef9a8210c
Replace C++ comments with C style equivalents
This commit is contained in:
commit
c9b0f1df0d
8 changed files with 51 additions and 18 deletions
|
@ -46,10 +46,10 @@ of the build process."
|
|||
(print-escape-control-characters t)
|
||||
(print-escape-nonascii t)
|
||||
(prin1 (if (and (fboundp 'cl-prin1)
|
||||
;; If we're being called while
|
||||
;; bootstrapping, we won't be able to load
|
||||
;; cl-print.
|
||||
(require 'cl-print nil t))
|
||||
(fboundp 'cl-defmethod) ;Used by `cl-print'.
|
||||
(condition-case nil
|
||||
(require 'cl-print)
|
||||
(error nil)))
|
||||
#'cl-prin1
|
||||
#'prin1)))
|
||||
(mapbacktrace
|
||||
|
|
|
@ -388,6 +388,7 @@ Also store it in `eldoc-last-message' and return that value."
|
|||
(defun eldoc-display-message-no-interference-p ()
|
||||
"Return nil if displaying a message would cause interference."
|
||||
(not (or executing-kbd-macro
|
||||
(bound-and-true-p edebug-active)
|
||||
;; The following configuration shows "Matches..." in the
|
||||
;; echo area when point is after a closing bracket, which
|
||||
;; conflicts with eldoc.
|
||||
|
|
|
@ -130,7 +130,8 @@
|
|||
(defvar markdown-fontify-code-blocks-natively)
|
||||
(defvar company-backends)
|
||||
(defvar company-tooltip-align-annotations)
|
||||
|
||||
(defvar tramp-ssh-controlmaster-options)
|
||||
(defvar tramp-use-ssh-controlmaster-options)
|
||||
|
||||
|
||||
;;; User tweakable stuff
|
||||
|
@ -1249,7 +1250,15 @@ This docstring appeases checkdoc, that's all."
|
|||
(contact (cl-subseq contact 0 probe)))
|
||||
`(:process
|
||||
,(lambda ()
|
||||
(let ((default-directory default-directory))
|
||||
(let ((default-directory default-directory)
|
||||
;; bug#61350: Tramp turns on a feature
|
||||
;; by default that can't (yet) handle
|
||||
;; very much data so we turn it off
|
||||
;; unconditionally -- just for our
|
||||
;; process.
|
||||
(tramp-use-ssh-controlmaster-options t)
|
||||
(tramp-ssh-controlmaster-options
|
||||
"-o ControlMaster=no -o ControlPath=none"))
|
||||
(make-process
|
||||
:name readable-name
|
||||
:command (setq server-info (eglot--cmd contact))
|
||||
|
@ -3652,6 +3661,15 @@ If NOERROR, return predicate, else erroring function."
|
|||
(with-eval-after-load 'desktop
|
||||
(add-to-list 'desktop-minor-mode-handlers '(eglot--managed-mode . ignore)))
|
||||
|
||||
|
||||
;;; Misc
|
||||
;;;
|
||||
(defun eglot--debbugs-or-github-bug-uri ()
|
||||
(format (if (string= (match-string 2) "github")
|
||||
"https://github.com/joaotavora/eglot/issues/%s"
|
||||
"https://debbugs.gnu.org/%s")
|
||||
(match-string 3)))
|
||||
(put 'eglot--debbugs-or-github-bug-uri 'bug-reference-url-format t)
|
||||
|
||||
;;; Obsolete
|
||||
;;;
|
||||
|
@ -3662,8 +3680,8 @@ If NOERROR, return predicate, else erroring function."
|
|||
|
||||
|
||||
;; Local Variables:
|
||||
;; bug-reference-bug-regexp: "\\(github#\\([0-9]+\\)\\)"
|
||||
;; bug-reference-url-format: "https://github.com/joaotavora/eglot/issues/%s"
|
||||
;; bug-reference-bug-regexp: "\\(\\(github\\|bug\\)#\\([0-9]+\\)\\)"
|
||||
;; bug-reference-url-format: eglot--debbugs-or-github-bug-uri
|
||||
;; checkdoc-force-docstrings-flag: nil
|
||||
;; End:
|
||||
|
||||
|
|
|
@ -1532,14 +1532,24 @@ Similar to `treesit-indent', but indent a region instead."
|
|||
(aref meta-vec (+ 1 (* idx meta-len))) nil)
|
||||
(pcase-let* ((`(,anchor . ,offset) (treesit--indent-1))
|
||||
(marker (aref meta-vec (* idx meta-len))))
|
||||
;; Set ANCHOR.
|
||||
(when anchor
|
||||
(if (not (and anchor offset))
|
||||
;; No indent for this line, either...
|
||||
(if (markerp marker)
|
||||
(progn
|
||||
;; ... Set marker and offset to do a dummy
|
||||
;; indent, or...
|
||||
(back-to-indentation)
|
||||
(move-marker marker (point))
|
||||
(setf (aref meta-vec (+ 1 (* idx meta-len))) 0))
|
||||
;; ...Set anchor to nil so no indent is performed.
|
||||
(setf (aref meta-vec (* idx meta-len)) nil))
|
||||
;; Set ANCHOR.
|
||||
(if (markerp marker)
|
||||
(move-marker marker anchor)
|
||||
(setf (aref meta-vec (* idx meta-len))
|
||||
(copy-marker anchor t))))
|
||||
;; SET OFFSET.
|
||||
(setf (aref meta-vec (+ 1 (* idx meta-len))) offset)))
|
||||
(copy-marker anchor t)))
|
||||
;; SET OFFSET.
|
||||
(setf (aref meta-vec (+ 1 (* idx meta-len))) offset))))
|
||||
(cl-incf idx)
|
||||
(setq lines-left-to-move (forward-line 1)))
|
||||
;; Now IDX = last valid IDX + 1.
|
||||
|
|
|
@ -3729,7 +3729,8 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT
|
|||
&& FIXNATP (args[COMPILED_STACK_DEPTH])))
|
||||
error ("Invalid byte-code object");
|
||||
|
||||
pin_string (args[COMPILED_BYTECODE]); // Bytecode must be immovable.
|
||||
/* Bytecode must be immovable. */
|
||||
pin_string (args[COMPILED_BYTECODE]);
|
||||
|
||||
/* We used to purecopy everything here, if purify-flag was set. This worked
|
||||
OK for Emacs-23, but with Emacs-24's lexical binding code, it can be
|
||||
|
@ -5930,7 +5931,7 @@ purecopy (Lisp_Object obj)
|
|||
memcpy (vec, objp, nbytes);
|
||||
for (i = 0; i < size; i++)
|
||||
vec->contents[i] = purecopy (vec->contents[i]);
|
||||
// Byte code strings must be pinned.
|
||||
/* Byte code strings must be pinned. */
|
||||
if (COMPILEDP (obj) && size >= 2 && STRINGP (vec->contents[1])
|
||||
&& !STRING_MULTIBYTE (vec->contents[1]))
|
||||
pin_string (vec->contents[1]);
|
||||
|
|
|
@ -789,10 +789,10 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
|
|||
Lisp_Object template;
|
||||
Lisp_Object bytecode;
|
||||
if (COMPILEDP (call_fun)
|
||||
// Lexical binding only.
|
||||
/* Lexical binding only. */
|
||||
&& (template = AREF (call_fun, COMPILED_ARGLIST),
|
||||
FIXNUMP (template))
|
||||
// No autoloads.
|
||||
/* No autoloads. */
|
||||
&& (bytecode = AREF (call_fun, COMPILED_BYTECODE),
|
||||
!CONSP (bytecode)))
|
||||
{
|
||||
|
|
|
@ -505,6 +505,9 @@ Before returning, a new log is allocated for future samples. */)
|
|||
void
|
||||
malloc_probe (size_t size)
|
||||
{
|
||||
if (EQ (backtrace_top_function (), QAutomatic_GC)) /* bug#60237 */
|
||||
/* FIXME: We should do something like what we did with `cpu_gc_count`. */
|
||||
return;
|
||||
eassert (HASH_TABLE_P (memory_log));
|
||||
record_backtrace (XHASH_TABLE (memory_log), min (size, MOST_POSITIVE_FIXNUM));
|
||||
}
|
||||
|
|
|
@ -4583,7 +4583,7 @@ face_at_pos (const struct it *it, enum lface_attribute_index attr_filter)
|
|||
&next_stop,
|
||||
base_face_id, false,
|
||||
attr_filter);
|
||||
} // !STRINGP (it->string))
|
||||
} /* !STRINGP (it->string) */
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue