GNU bug report logs - #13467
24.3.50; Problem with `advice' show-paren-function

Previous Next

Package: emacs;

Reported by: nyc4bos <at> aol.com

Date: Wed, 16 Jan 2013 22:24:02 UTC

Severity: normal

Tags: notabug

Found in version 24.3.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 13467 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 'Glenn Morris' <rgm <at> gnu.org>, nyc4bos <at> aol.com, 13467 <at> debbugs.gnu.org
Subject: RE: bug#13467: 24.3.50; Problem with `advice' show-paren-function
Date: Wed, 16 Jan 2013 16:04:45 -0800
> > (let ((matching-text nil)
> >       (cb            (char-before (point))))
> >   (when (and cb  (char-equal (char-syntax cb) ?\) ))
> >     (setq matching-text  (blink-matching-open)))
> >   (when matching-text (message matching-text)))
> 
> Aka
> 
>    (let* ((cb (char-before (point)))
>           (matching-text
>            (when (and cb  (char-equal (char-syntax cb) ?\) ))
>              (blink-matching-open))))
>      (when matching-text (message matching-text)))
>
> -- Stefan "always try to give the right value right away"

Yes.  Aka:

(let* ((cb (char-before (point)))
       (matching-text (and cb
                           (char-equal (char-syntax cb) ?\) )
                           (blink-matching-open))))
  (when matching-text (message matching-text)))

-- Drew "use `and' for value; use `when' for effect",
   who tried to keep things close to the OP code, to start





This bug report was last modified 12 years and 133 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.