chiark / gitweb /
el/dot-emacs.el: Fix `bbdb-canonicalize-address'.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 13 Apr 2016 16:22:08 +0000 (17:22 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 13 Apr 2016 16:22:08 +0000 (17:22 +0100)
commitd54a4cf35d90fe372d5b192ccd93bbd65ff4f25f
tree86845519c9826be47e517a7aaa870ff380d700ee
parentfda9b27ae6d639f6fb66238e03189fe47a585b45
el/dot-emacs.el: Fix `bbdb-canonicalize-address'.

The built-in definition uses `run-hook-with-args', and expects to get a
sensible return value out the far end.  This is badly broken for two
reasons.

  * The first one is that `run-hook-with-args' has an explicitly
    unspecified return value, so relying on it to be anything useful is
    obviously silly.

  * The second is that, if the hook list isn't just a singleton, it's
    not at all clear how we should choose which function's return value
    to actually use.

The new code explicitly threads the address through all of the hook
functions in turn, and continues until we've had a pass where all of
them declined to change it.
el/dot-emacs.el