[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bookmarks in EWW
From: |
Michael Heerdegen |
Subject: |
Re: Bookmarks in EWW |
Date: |
Mon, 20 Apr 2020 05:17:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Oh, right `byte-hunk-handler` is to handle top-level uses only
> (e.g. top-level uses of `require` trigger loading the file at
> compilation time, whereas they don't when not at top-level).
Yeah, I guess such stuff could be mentioned in the file header...
> I think you want to use `(byte-defop-compiler-1 make-local-variable)`
> and then define `byte-compile-make-local-variable`.
Oh, that's what I originally wanted to try first, but
`byte-defop-compiler-1' sounded too creepy. But that works now (unless
I've missed something else):
From a21a6af1dfb60db4ba1c028aff91902649eae920 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@web.de>
Date: Fri, 10 Apr 2020 01:21:33 +0200
Subject: [PATCH] WIP: My byte compile local patch
---
lisp/emacs-lisp/bytecomp.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 4f01918bdb..4fdb6e65b7 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -4752,6 +4752,14 @@ byte-compile-make-variable-buffer-local
(defun byte-compile-form-make-variable-buffer-local (form)
(byte-compile-keep-pending form 'byte-compile-normal-call))
+(byte-defop-compiler-1 make-local-variable
+ byte-compile-make-local-variable)
+(defun byte-compile-make-local-variable (form)
+ (let ((var-exp (car-safe (cdr-safe form))))
+ (when (eq 'quote (car-safe var-exp))
+ (byte-compile--declare-var (car (cdr var-exp)))))
+ (byte-compile-normal-call form))
+
(put 'function-put 'byte-hunk-handler 'byte-compile-define-symbol-prop)
(put 'define-symbol-prop 'byte-hunk-handler 'byte-compile-define-symbol-prop)
(defun byte-compile-define-symbol-prop (form)
--
2.26.1
Michael.
- Re: Bookmarks in EWW, Michael Heerdegen, 2020/04/18
- Re: Bookmarks in EWW, Stefan Monnier, 2020/04/19
- Re: Bookmarks in EWW,
Michael Heerdegen <=
- Re: Bookmarks in EWW, Stefan Monnier, 2020/04/20
- Re: Bookmarks in EWW, Michael Heerdegen, 2020/04/20
- Re: Bookmarks in EWW, Michael Heerdegen, 2020/04/29
- Re: Bookmarks in EWW, Stefan Monnier, 2020/04/29
- Re: Bookmarks in EWW, Michael Heerdegen, 2020/04/29
- Re: Bookmarks in EWW, Stefan Monnier, 2020/04/29
- Re: Bookmarks in EWW, Michael Heerdegen, 2020/04/30
Re: Bookmarks in EWW, Michael Heerdegen, 2020/04/26