unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrew Cohen <acohen@ust.hk>
To: emacs-devel@gnu.org
Subject: Re: News from the lexical world
Date: Tue, 27 Apr 2021 07:31:30 +0800	[thread overview]
Message-ID: <877dkor5bh.fsf@ust.hk> (raw)
In-Reply-To: jwv8s55qbj4.fsf-monnier+emacs@gnu.org

>>>>> "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	other threads:[~2021-04-26 23:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 16:23 News from the lexical world Stefan Monnier
2021-02-12 16:49 ` Stefan Kangas
2021-02-13 11:06   ` Lars Ingebrigtsen
2021-02-12 21:37 ` Andrea Corallo via Emacs development discussions.
2021-02-15 19:18 ` Phillip Lord
2021-04-10 21:32 ` Stefan Monnier
2021-04-11  6:37   ` Lars Ingebrigtsen
2021-04-11  7:20   ` Andrea Corallo via Emacs development discussions.
2021-04-11 13:44     ` T.V Raman
2021-04-11 14:39       ` Stefan Monnier
2021-04-11 15:10         ` T.V Raman
2021-04-11 15:42         ` Eli Zaretskii
2021-04-11 16:34           ` Stefan Monnier
2021-04-12  8:34             ` Andrea Corallo via Emacs development discussions.
2021-04-12 11:58               ` Eli Zaretskii
2021-04-12 12:58                 ` Andrea Corallo via Emacs development discussions.
2021-04-12 13:23                   ` Stefan Kangas
2021-04-12 13:24                   ` Eli Zaretskii
2021-04-26  6:47   ` Andrew Cohen
2021-04-26 10:08     ` Stefan Kangas
2021-04-26 12:06       ` Andrew Cohen
2021-04-26 16:06         ` Stefan Monnier
2021-04-26 23:31           ` Andrew Cohen [this message]
2021-04-29 22:06             ` Stefan Monnier
2021-04-30  0:17               ` Andrew Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877dkor5bh.fsf@ust.hk \
    --to=acohen@ust.hk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).