[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: News from the lexical world
From: |
Andrew Cohen |
Subject: |
Re: News from the lexical world |
Date: |
Tue, 27 Apr 2021 07:31:30 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>>>>> "SM" == Stefan Monnier <monnier@iro.umontreal.ca> writes:
[...]
>> (add-hook 'sc-attribs-postselect-hook (lambda () (setq
>> bbdb-sc-last-attrib (if sc-downcase-p (downcase attribution)
>> attribution))))
SM> Hmm... I can't find this code in the BBDB copy I have (from
SM> elpa.git). Which version of BBDB do you have?
I have the git version from
https://git.savannah.nongnu.org/cgit/bbdb.git/
The code is in bbdb-sc.el
;; Insert our hooks
;; Dammit, supercite! It runs `sc-attribs-postselect-hook' in an
;; environment with the local variable `attribution' that we rely on.
(with-no-warnings (defvar attribution))
;;;###autoload
(defun bbdb-insinuate-sc ()
"Hook BBDB into Supercite.
Do not call this in your init file. Use `bbdb-initialize'.
However, this is not the full story. See bbdb-sc.el for how to fully hook
BBDB into Supercite."
(add-hook 'sc-post-hook 'bbdb-sc-set-attrib)
(add-hook 'sc-attribs-postselect-hook
(lambda ()
(setq bbdb-sc-last-attrib
(if sc-downcase-p
(downcase attribution)
attribution)))))
But I guess this is a more generic problem? Any function added to
sc-attribs-postselect-hook will need access to 'attribution and/or
'citation which are not in scope.
Best,
Andy
--
Andrew Cohen
- Re: News from the lexical world, (continued)
- Re: News from the lexical world, Stefan Monnier, 2021/04/11
- Re: News from the lexical world, Andrea Corallo, 2021/04/12
- Re: News from the lexical world, Eli Zaretskii, 2021/04/12
- Re: News from the lexical world, Andrea Corallo, 2021/04/12
- Re: News from the lexical world, Stefan Kangas, 2021/04/12
- Re: News from the lexical world, Eli Zaretskii, 2021/04/12
Re: News from the lexical world, Andrew Cohen, 2021/04/26