bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13467: 24.3.50; Problem with `advice' show-paren-function


From: Drew Adams
Subject: 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






reply via email to

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