emacs-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]