emacs-devel
[Top][All Lists]
Advanced

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

Re: Contiguous redisplay of the menu and beeps


From: Stephen Berman
Subject: Re: Contiguous redisplay of the menu and beeps
Date: Sat, 26 May 2007 17:19:37 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

On Sat, 26 May 2007 16:49:51 +0200 martin rudalics <address@hidden> wrote:

> What happens if you change `sgml-point-entered' to the following
> non-sensical?  My Emacs consumes 100% CPU and won't react to C-g.
> Occasionally I can see `my-count' going up though.
>
> (defvar my-count 0)
>
> (defun sgml-point-entered (x y)
>   ;; Show preceding or following hidden tag, depending of cursor direction.
>   (let ((inhibit-point-motion-hooks t)
>       (tag-string
>        (save-excursion
>          ;; Strip properties, otherwise, the text is invisible.
>          (buffer-substring-no-properties
>           (point)
>           (if (or (and (> x y)
>                        (not (eq (following-char) ?<)))
>                   (and (< x y)
>                        (eq (preceding-char) ?>)))
>               (condition-case nil
>                   (backward-list)
>                 (error (progn (message "... %s" (setq my-count (1+ my-count)))
>                               (sit-for 1) (ding)
>                               (point))))
>             (condition-case nil
>                 (forward-list)
>               (error (progn (message "... %s" (setq my-count (1+ my-count)))
>                             (sit-for 1) (ding)
>                             (point)))))))))
>     (unless (string-equal tag-string "")
>       (message "Invisible tag: %s" tag-string))))

For me it's not nonsensical at all:
1. emacs -Q
2. M-x html-mode
3. M-x column-number-mode
4. eval the above defvar and defun
5. insert <html></html>
6. put the cursor on the leftmost `>'
7. C-c C-i
=> I hear two beeps, then "<html></html>" disappears and I see "... 2"
in the echo area.  No further beeps or CPU consumption.  

When I repeat C-c C-i the tags reappear, when I repeat C-c C-i again,
they again vanish after two beeps and the message is now "... 4".  And
so on, each time incrementing by two.

Steve Berman





reply via email to

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