diff --git a/ChangeLog b/ChangeLog index 636118780..dcf3be109 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-15 Carsten Dominik + + * lisp/org.el (org-tbl-menu): Protect the use of variables that + are only available when org-table.el gets loaded. + (org-read-agenda-file-list): Error if `org-agenda-files' is a + single directory. + 2008-04-14 Carsten Dominik * lisp/org-exp.el (org-export-run-in-background): New option. diff --git a/lisp/org-table.el b/lisp/org-table.el index 63e011943..5e5874e9f 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -506,6 +506,10 @@ This is being used to correctly align a single field after TAB or RET.") (defvar org-table-last-column-widths nil "List of max width of fields in each column. This is being used to correctly align a single field after TAB or RET.") +(defvar org-table-formula-debug nil + "Non-nil means, debug table formulas. +When nil, simply write \"#ERROR\" in corrupted fields.") +(make-variable-buffer-local 'org-table-formula-debug) (defvar org-table-overlay-coordinates nil "Overlay coordinates after each align of a table.") (make-variable-buffer-local 'org-table-overlay-coordinates) @@ -1963,11 +1967,6 @@ of the new mark." (looking-at org-table-auto-recalculate-regexp)) (org-table-recalculate) t)) -(defvar org-table-formula-debug nil - "Non-nil means, debug table formulas. -When nil, simply write \"#ERROR\" in corrupted fields.") -(make-variable-buffer-local 'org-table-formula-debug) - (defvar modes) (defsubst org-set-calc-mode (var &optional value) (if (stringp var) diff --git a/lisp/org.el b/lisp/org.el index 1b7432136..7c8f19ce9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11062,6 +11062,8 @@ the buffer and restores the previous window configuration." (defun org-read-agenda-file-list () "Read the list of agenda files from a file." + (when (file-directory-p org-agenda-files) + (error "`org-agenda-files' cannot be a single directory")) (when (stringp org-agenda-files) (with-temp-buffer (insert-file-contents org-agenda-files) @@ -12289,10 +12291,11 @@ See the individual commands for more information." ["Which Column?" org-table-current-column (org-at-table-p)]) ["Debug Formulas" org-table-toggle-formula-debugger - :style toggle :selected org-table-formula-debug] + :style toggle :selected (org-bound-and-true-p 'org-table-formula-debug)] ["Show Col/Row Numbers" org-table-toggle-coordinate-overlays - :style toggle :selected org-table-overlay-coordinates] + :style toggle + :selected (org-bound-and-true-p 'org-table-overlay-coordinates)] "--" ["Create" org-table-create (and (not (org-at-table-p)) org-enable-table-editor)]