diff options
| author | Carsten Dominik | 2007-10-25 14:24:43 +0000 |
|---|---|---|
| committer | Carsten Dominik | 2007-10-25 14:24:43 +0000 |
| commit | 557f46f04b87f68c2587bc6c8ecc7d7806f7d22f (patch) | |
| tree | 2aed4e9507c83bd83a249e6d2bb566f50edfdc85 | |
| parent | 429f0457ea0da2452b56360a06959b5dc7198bd3 (diff) | |
| download | emacs-557f46f04b87f68c2587bc6c8ecc7d7806f7d22f.tar.gz emacs-557f46f04b87f68c2587bc6c8ecc7d7806f7d22f.zip | |
(org-no-warnings): New macro.
(org-columns-eval): Use `org-no-warnings'.
| -rw-r--r-- | lisp/textmodes/org.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index 449e2604235..4ba90216d85 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el | |||
| @@ -15611,14 +15611,15 @@ Where possible, use the standard interface for changing this line." | |||
| 15611 | org-columns-top-level-marker)) | 15611 | org-columns-top-level-marker)) |
| 15612 | key1 nval))) | 15612 | key1 nval))) |
| 15613 | 15613 | ||
| 15614 | (defmacro org-no-warnings (&rest body) | ||
| 15615 | (cons (if (fboundp 'with-no-warnings) 'with-no-warnings 'progn) body)) | ||
| 15616 | |||
| 15614 | (defun org-columns-eval (form) | 15617 | (defun org-columns-eval (form) |
| 15615 | (let (hidep) | 15618 | (let (hidep) |
| 15616 | (save-excursion | 15619 | (save-excursion |
| 15617 | (beginning-of-line 1) | 15620 | (beginning-of-line 1) |
| 15618 | ;; `next-line' is needed here, because it skips invisible line. | 15621 | ;; `next-line' is needed here, because it skips invisible line. |
| 15619 | ;; FIXME: RMS says this should be wrapped into `with-no-warnings' | 15622 | (condition-case nil (org-no-warnings (next-line 1)) (error nil)) |
| 15620 | ;; but I don't know how to do this and keep the code XEmacs compatible. | ||
| 15621 | (condition-case nil (next-line 1) (error nil)) | ||
| 15622 | (setq hidep (org-on-heading-p 1))) | 15623 | (setq hidep (org-on-heading-p 1))) |
| 15623 | (eval form) | 15624 | (eval form) |
| 15624 | (and hidep (hide-entry)))) | 15625 | (and hidep (hide-entry)))) |
| @@ -26486,3 +26487,4 @@ Respect keys that are already there." | |||
| 26486 | ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd | 26487 | ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd |
| 26487 | ;;; org.el ends here | 26488 | ;;; org.el ends here |
| 26488 | 26489 | ||
| 26490 | |||