1294 |
(let ((delay-mode-hooks t)) |
(let ((delay-mode-hooks t)) |
1295 |
,@body))) |
,@body))) |
1296 |
|
|
1297 |
|
;; PUBLIC: find if the current mode derives from another. |
1298 |
|
|
1299 |
|
(defun derived-mode-p (&rest modes) |
1300 |
|
"Non-nil if the current major mode is derived from one of MODES. |
1301 |
|
Uses the `derived-mode-parent' property of the symbol to trace backwards." |
1302 |
|
(let ((parent major-mode)) |
1303 |
|
(while (and (not (memq parent modes)) |
1304 |
|
(setq parent (get parent 'derived-mode-parent)))) |
1305 |
|
parent)) |
1306 |
|
|
1307 |
(defmacro with-syntax-table (table &rest body) |
(defmacro with-syntax-table (table &rest body) |
1308 |
"Evaluate BODY with syntax table of current buffer set to a copy of TABLE. |
"Evaluate BODY with syntax table of current buffer set to a copy of TABLE. |
1309 |
The syntax table of the current buffer is saved, BODY is evaluated, and the |
The syntax table of the current buffer is saved, BODY is evaluated, and the |