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: martin rudalics
Subject: Re: Contiguous redisplay of the menu and beeps
Date: Sat, 26 May 2007 16:49:51 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> That is, I get continuous beeping and Emacs consumes the CPU, but I
> don't see menu redisplay.  And in fact, I can stop the beeping and CPU
> consumption by clicking on clicking the SGML menu and toggling tag
> visibility.  Clicking on the HTML menu stops the beeping but it
> resumes when the menu is closed.  Clicking on the other menues does
> not seem to stop the beeping.  I'm not sure these observations are
> reliably reproducible.
>
> Steve Berman

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))))





reply via email to

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