[Top][All Lists]

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


From: Juanma Barranquero
Subject: momentary-string-display
Date: Wed, 27 Dec 2006 02:18:29 +0100

`momentary-string-display' is a little weird function, or at least it
*acts* a little weird in my tests:

 1) It does not check that POS is valid.

 2) It does not check whether POS satisfies any restriction, nor uses
`widen' and `save-restriction' to circumvent it.

 3) Its docstring says: "Momentarily display STRING in the buffer at
POS.", which could be taken as this being valid:

 (momentary-string-display "test"
                           (with-current-buffer MY-BUFFER

  which isn't; the buffer temporarily modified is (current-buffer),

 4) From its docstring, it seems as if STRING should always be
displayed, which isn't true (STRING is only shown when POS and point
both can be simultaneously displayed on the window).

Worse yet, in cases 1) to 3), `momentary-string-display' can err out
after displaying STRING, leaving the buffer modified and with
`buffer-file-name' set to nil.


reply via email to

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