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: Mon, 28 May 2007 12:09:14 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> I couldn't reproduce it on Mac OS X.  It only shows an error like
>
>   forward-list: Scan error: "Containing expression ends prematurely"

OK.  To prevent this I'd apply something like the attached patch (low
priority).

We also might consider not running point-entered/-left hooks when
running a point-entered/-left hook
(as with before-/after-change-functions).
*** sgml-mode.el        Mon May 14 23:19:20 2007
--- sgml-mode.el        Mon May 28 11:51:12 2007
***************
*** 894,911 ****

  (defun sgml-point-entered (x y)
    ;; Show preceding or following hidden tag, depending of cursor direction.
!   (let ((inhibit-point-motion-hooks t))
!     (save-excursion
!       (message "Invisible tag: %s"
!              ;; 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) ?>)))
!                   (backward-list)
!                 (forward-list)))))))

  
  (defun sgml-validate (command)
--- 894,917 ----

  (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 (point)))
!              (condition-case nil
!                  (forward-list)
!                (error (point))))))))
!     (unless (string-equal tag-string "")
!       (message "Invisible tag: %s" tag-string))))

  
  (defun sgml-validate (command)

reply via email to

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