[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/positioned-lambdas c3b3fc82e8a 3/3: Make branch work again after
From: |
Alan Mackenzie |
Subject: |
feature/positioned-lambdas c3b3fc82e8a 3/3: Make branch work again after merge from master |
Date: |
Sun, 10 Mar 2024 14:53:08 -0400 (EDT) |
branch: feature/positioned-lambdas
commit c3b3fc82e8a59c2b4db6db46c28a16ec62e90ac7
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>
Make branch work again after merge from master
* lisp/emacs-lisp/bytecomp.el
(byte-compile--docstring-style-warn): Ignore the position info
at the start of the doc string (this contains non-printable
characters).
* lisp/emacs-lisp/pcase.el (top level): Prevent the
with-eval-after-load being applied too early in the bootstrap
procedure.
* src/data.c (Fbare_symbol): Apply temporary fix for the
function not working when symbols-with-pos-enabled is nil.
---
lisp/emacs-lisp/bytecomp.el | 4 +++-
lisp/emacs-lisp/pcase.el | 9 +++++----
src/data.c | 3 ++-
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 6e040346988..09e890839df 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1781,7 +1781,9 @@ It is too wide if it has any lines longer than the
largest of
"%sdocstring wider than %s characters" (funcall prefix) col)))
(when (byte-compile-warning-enabled-p 'docstrings-control-chars)
- (let ((start 0)
+ (let ((start (if (string-match "\\`;POS\36\1\1\1 [^\n]+\n" docs)
+ (match-end 0)
+ 0))
(len (length docs)))
(while (and (< start len)
(string-match (rx (intersection (in (0 . 31) 127)
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index c2fe1233b3e..796a48916e7 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -167,10 +167,11 @@ Emacs Lisp manual for more information and examples."
(defconst pcase--find-macro-def-regexp "(pcase-defmacro[\s\t\n]+%s[\s\t\n]*(")
-(with-eval-after-load 'find-func
- (defvar find-function-regexp-alist)
- (add-to-list 'find-function-regexp-alist
- `(pcase-macro . pcase--find-macro-def-regexp)))
+(unless (boundp 'base-loaded) ; Too early in bootstrap.
+ (with-eval-after-load 'find-func
+ (defvar find-function-regexp-alist)
+ (add-to-list 'find-function-regexp-alist
+ `(pcase-macro . pcase--find-macro-def-regexp))))
;; FIXME: Obviously, this will collide with nadvice's use of
;; function-documentation if we happen to advise `pcase'.
diff --git a/src/data.c b/src/data.c
index 41c592cb119..00e33ec3d8c 100644
--- a/src/data.c
+++ b/src/data.c
@@ -792,7 +792,8 @@ DEFUN ("bare-symbol", Fbare_symbol, Sbare_symbol, 1, 1, 0,
doc: /* Extract, if need be, the bare symbol from SYM, a symbol. */)
(register Lisp_Object sym)
{
- CHECK_SYMBOL (sym);
+ if (!SYMBOL_WITH_POS_P (sym))
+ CHECK_SYMBOL (sym);
return BARE_SYMBOL_P (sym) ? sym : XSYMBOL_WITH_POS_SYM (sym);
}