Browse Source

Bug fixes.

Carsten Dominik 17 năm trước cách đây
mục cha
commit
bea87922ca
3 tập tin đã thay đổi với 16 bổ sung7 xóa
  1. 7 0
      ChangeLog
  2. 4 5
      lisp/org-table.el
  3. 5 2
      lisp/org.el

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2008-04-15  Carsten Dominik  <dominik@science.uva.nl>
+
+	* 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  <dominik@science.uva.nl>
 
 	* lisp/org-exp.el (org-export-run-in-background): New option.

+ 4 - 5
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)

+ 5 - 2
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)]