summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2007-05-29 06:14:19 +0000
committerMartin Rudalics <rudalics@gmx.at>2007-05-29 06:14:19 +0000
commit250495a7193b1494d5a5d488d4134768709a5fb7 (patch)
tree731d1c0f39d8ea8650893a93b4771e974a205b2e
parente8f6c0ba907b16261b91688fd11afacb925b7fe6 (diff)
downloademacs-250495a7193b1494d5a5d488d4134768709a5fb7.tar.gz
(table--point-entered-cell-function)
(table--point-left-cell-function): Bind `inhibit-point-motion-hooks' to t.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/textmodes/table.el26
2 files changed, 21 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2aa045826f5..b8f8423ea74 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index c0a85eeb68c..69c3c60f912 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -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.