emacs-devel
[Top][All Lists]
Advanced

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

Re: table cell menu does not appear at the menubar


From: martin rudalics
Subject: Re: table cell menu does not appear at the menubar
Date: Mon, 28 May 2007 14:56:40 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> It is quite random.  It happened in a few hours.  It happened after a
> few days.  I don't remember if it happened after 4 days.  I'll keep
> collecting more data.

I didn't verify this but considering the recent thread on
`sgml-mode-point-entered' I believe something similar might occur here.
Look at the following two functions:

(defun table--point-entered-cell-function (&optional old-point new-point)
  "Point has entered a cell.
Refresh the menu bar."
  (unless table-cell-entered-state
    (setq table-cell-entered-state t)
    (setq table-mode-indicator t)
    (force-mode-line-update)
    (table--warn-incompatibility)
    (run-hooks 'table-point-entered-cell-hook)))

(defun table--point-left-cell-function (&optional old-point new-point)
  "Point has left a cell.
Refresh the menu bar."
  (when table-cell-entered-state
    (setq table-cell-entered-state nil)
    (setq table-mode-indicator nil)
    (force-mode-line-update)
    (run-hooks 'table-point-left-cell-hook)))

Both do a `force-mode-line-update' which might recursively toggle
`table-cell-entered-state' for preceding cells on the same line.  In
that case the bug should get caught by Yamamoto's fix.  I would
nevertheless apply the attached patch.
*** table.el    Tue Jan 23 06:41:12 2007
--- table.el    Mon May 28 14:33:00 2007
***************
*** 6,12 ****
  ;; Keywords: wp, convenience
  ;; Author: Takaaki Ota <address@hidden>
  ;; Created: Sat Jul 08 2000 13:28:45 (PST)
! ;; Revised: Wed Jan 03 2007 13:23:46 (PST)

  ;; This file is part of GNU Emacs.

--- 6,12 ----
  ;; Keywords: wp, convenience
  ;; Author: Takaaki Ota <address@hidden>
  ;; Created: Sat Jul 08 2000 13:28:45 (PST)
! ;; Revised: Mon Mai 28 2007 14:33:01 ((MEZ) - Mitteleurop. Sommerzeit)

  ;; This file is part of GNU Emacs.

***************
*** 5333,5353 ****
  (defun table--point-entered-cell-function (&optional old-point new-point)
    "Point has entered a cell.
  Refresh the menu bar."
!   (unless table-cell-entered-state
!     (setq table-cell-entered-state t)
!     (setq table-mode-indicator t)
!     (force-mode-line-update)
!     (table--warn-incompatibility)
!     (run-hooks 'table-point-entered-cell-hook)))

  (defun table--point-left-cell-function (&optional old-point new-point)
    "Point has left a cell.
  Refresh the menu bar."
!   (when table-cell-entered-state
!     (setq table-cell-entered-state nil)
!     (setq table-mode-indicator nil)
!     (force-mode-line-update)
!     (run-hooks 'table-point-left-cell-hook)))

  (defun table--warn-incompatibility ()
    "If called from interactive operation warn the know incompatibilities.
--- 5333,5355 ----
  (defun table--point-entered-cell-function (&optional old-point new-point)
    "Point has entered a cell.
  Refresh the menu bar."
!   (let ((inhibit-point-motion-hooks t))
!     (unless table-cell-entered-state
!       (setq table-cell-entered-state t)
!       (setq table-mode-indicator t)
!       (force-mode-line-update)
!       (table--warn-incompatibility)
!       (run-hooks 'table-point-entered-cell-hook))))

  (defun table--point-left-cell-function (&optional old-point new-point)
    "Point has left a cell.
  Refresh the menu bar."
!   (let ((inhibit-point-motion-hooks t))
!     (when table-cell-entered-state
!       (setq table-cell-entered-state nil)
!       (setq table-mode-indicator nil)
!       (force-mode-line-update)
!       (run-hooks 'table-point-left-cell-hook))))

  (defun table--warn-incompatibility ()
    "If called from interactive operation warn the know incompatibilities.

reply via email to

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