]> git.eshelyaron.com Git - emacs.git/commitdiff
(table--point-entered-cell-function)
authorMartin Rudalics <rudalics@gmx.at>
Tue, 29 May 2007 06:14:19 +0000 (06:14 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Tue, 29 May 2007 06:14:19 +0000 (06:14 +0000)
(table--point-left-cell-function): Bind
`inhibit-point-motion-hooks' to t.

lisp/ChangeLog
lisp/textmodes/table.el

index 2aa045826f5d75aed688f302172b1ce83fd7e884..b8f8423ea74f8a64fb333b12e72c28250d6d6f05 100644 (file)
@@ -1,3 +1,9 @@
+2007-05-29  Martin Rudalics  <rudalics@gmx.at>
+
+       * textmodes/table.el (table--point-entered-cell-function)
+       (table--point-left-cell-function): Bind
+       `inhibit-point-motion-hooks' to t.
+
 2007-05-29  Nikolaj Schumacher  <n_schumacher@web.de>  (tiny change)
 
        * emacs-lisp/rx.el (rx): Doc fix.
index c0a85eeb68c18534c56990e2065f4e9834bf70fc..69c3c60f912af646afd20056cb2ebec34a826ccb 100644 (file)
@@ -5333,21 +5333,25 @@ instead of the current buffer and returns the OBJECT."
 (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)))
+  ;; Avoid calling point-motion-hooks recursively.
+  (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."
-  (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)))
+  ;; Avoid calling point-motion-hooks recursively.
+  (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.