diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el index 63f1e3247..8da20af74 100644 --- a/lisp/ob-maxima.el +++ b/lisp/ob-maxima.el @@ -42,7 +42,8 @@ (defcustom org-babel-maxima-command (if (boundp 'maxima-command) maxima-command "maxima") - "Command used to call maxima on the shell.") + "Command used to call maxima on the shell." + :group 'org-babel) (defun org-babel-maxima-expand (body params) "Expand a block of Maxima code according to its header arguments." diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index baa8d80c7..268a34c64 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -91,7 +91,7 @@ (defvar org-agenda-buffer-name) (defvar org-agenda-overriding-header) (defvar org-agenda-title-append nil) -(defvar entry) +(defvar org-entry) (defvar date) (defvar org-agenda-undo-list) (defvar org-agenda-pending-undo-list) @@ -4551,8 +4551,8 @@ function from a program - use `org-agenda-get-day-entries' instead." (org-compile-prefix-format 'agenda) (org-set-sorting-strategy 'agenda) (setq args (or args '(:deadline :scheduled :timestamp :sexp))) - (let* ((files (if (and entry (stringp entry) (string-match "\\S-" entry)) - (list entry) + (let* ((files (if (and org-entry (stringp org-entry) (string-match "\\S-" org-entry)) + (list org-entry) (org-agenda-files t))) (time (org-float-time)) file rtn results) @@ -4957,7 +4957,7 @@ holiday will also be skipped." (not (member (car (calendar-iso-from-absolute d)) skip-weeks)))) (not (and (memq 'holidays skip-weeks) (calendar-check-holidays date))) - entry))) + org-entry))) (defun org-diary-class (m1 d1 y1 m2 d2 y2 dayname &rest skip-weeks) "Like `org-class', but honor `calendar-date-style'. diff --git a/lisp/org-beamer.el b/lisp/org-beamer.el index 5cc255f71..38e473d53 100644 --- a/lisp/org-beamer.el +++ b/lisp/org-beamer.el @@ -242,7 +242,7 @@ in org-export-latex-classes." (envs (append org-beamer-environments-extra org-beamer-environments-default)) (props (org-get-text-property-any 0 'org-props text)) - (in "") (out "") option action defaction environment extra + (in "") (out "") org-beamer-option org-beamer-action org-beamer-defaction org-beamer-environment org-beamer-extra columns-option column-option env have-text ass tmp) (if (= frame-level 0) (setq frame-level nil)) @@ -273,10 +273,10 @@ in org-export-latex-classes." (setq in (org-fill-template "\\begin{frame}%a%A%o%T%S%x" - (list (cons "a" (or action "")) - (cons "A" (or defaction "")) - (cons "o" (or option org-beamer-frame-default-options "")) - (cons "x" (if extra (concat "\n" extra) "")) + (list (cons "a" (or org-beamer-action "")) + (cons "A" (or org-beamer-defaction "")) + (cons "o" (or org-beamer-option org-beamer-frame-default-options "")) + (cons "x" (if org-beamer-extra (concat "\n" org-beamer-extra) "")) (cons "h" "%s") (cons "T" (if (string-match "\\S-" text) "\n\\frametitle{%s}" "")) @@ -301,10 +301,10 @@ in org-export-latex-classes." (setq have-text (string-match "\\S-" text)) (setq in (org-fill-template (nth 2 ass) - (list (cons "a" (or action "")) - (cons "A" (or defaction "")) - (cons "o" (or option "")) - (cons "x" (if extra (concat "\n" extra) "")) + (list (cons "a" (or org-beamer-action "")) + (cons "A" (or org-beamer-defaction "")) + (cons "o" (or org-beamer-option "")) + (cons "x" (if org-beamer-extra (concat "\n" org-beamer-extra) "")) (cons "h" "%s") (cons "H" (if have-text (concat "{" text "}") "")) (cons "U" (if have-text (concat "[" text "]") "")))) @@ -328,31 +328,31 @@ in org-export-latex-classes." (cons text (cdr (assoc level default)))) (t nil)))) -(defvar extra) -(defvar option) -(defvar action) -(defvar defaction) -(defvar environment) +(defvar org-beamer-extra) +(defvar org-beamer-option) +(defvar org-beamer-action) +(defvar org-beamer-defaction) +(defvar org-beamer-environment) (defun org-beamer-get-special (props) "Extract an option, action, and default action string from text. -The variables option, action, defaction, extra are all scoped into -this function dynamically." +The variables org-beamer-option, org-beamer-action, org-beamer-defaction, +org-beamer-extra are all scoped into this function dynamically." (let (tmp) - (setq environment (org-beamer-assoc-not-empty "BEAMER_env" props)) - (setq extra (org-beamer-assoc-not-empty "BEAMER_extra" props)) - (when extra - (setq extra (replace-regexp-in-string "\\\\n" "\n" extra))) + (setq org-beamer-environment (org-beamer-assoc-not-empty "BEAMER_env" props)) + (setq org-beamer-extra (org-beamer-assoc-not-empty "BEAMER_extra" props)) + (when org-beamer-extra + (setq org-beamer-extra (replace-regexp-in-string "\\\\n" "\n" org-beamer-extra))) (setq tmp (org-beamer-assoc-not-empty "BEAMER_envargs" props)) (when tmp (setq tmp (copy-sequence tmp)) (if (string-match "\\[<[^][<>]*>\\]" tmp) - (setq defaction (match-string 0 tmp) + (setq org-beamer-defaction (match-string 0 tmp) tmp (replace-match "" t t tmp))) (if (string-match "\\[[^][]*\\]" tmp) - (setq option (match-string 0 tmp) + (setq org-beamer-option (match-string 0 tmp) tmp (replace-match "" t t tmp))) (if (string-match "<[^<>]*>" tmp) - (setq action (match-string 0 tmp) + (setq org-beamer-action (match-string 0 tmp) tmp (replace-match "" t t tmp)))))) (defun org-beamer-assoc-not-empty (elt list) diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el index cebd6caeb..3ef5d1208 100644 --- a/lisp/org-bibtex.el +++ b/lisp/org-bibtex.el @@ -112,7 +112,7 @@ (eval-when-compile (require 'cl)) -(defvar description nil) ; dynamically scoped from org.el +(defvar org-bibtex-description nil) ; dynamically scoped from org.el (defvar org-id-locations) (declare-function bibtex-beginning-of-entry "bibtex" ()) @@ -476,7 +476,7 @@ With optional argument OPTIONAL, also prompt for optional fields." :btype (or (cdr (assoc "=type=" entry)) "[no type]") :type "bibtex" :link link - :description description)))) + :description org-bibtex-description)))) (defun org-create-file-search-in-bibtex () "Create the search string and description for a BibTeX database entry." @@ -494,7 +494,7 @@ With optional argument OPTIONAL, also prompt for optional fields." (bibtex-autokey-titleword-case-convert-function 'identity) (bibtex-autokey-titleword-length 'infty) (bibtex-autokey-year-title-separator ": ")) - (setq description (bibtex-generate-autokey))) + (setq org-bibtex-description (bibtex-generate-autokey))) ;; Now parse the entry, get the key and return it. (save-excursion (bibtex-beginning-of-entry) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 7c2c2ab60..a4b37d7fe 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1704,7 +1704,7 @@ from the `before-change-functions' in the current buffer." (remove-hook 'before-change-functions 'org-clock-remove-overlays 'local)))) -(defvar state) ;; dynamically scoped into this function +(defvar org-clock-state) ;; dynamically scoped into this function (defun org-clock-out-if-current () "Clock out if the current entry contains the running clock. This is used to stop the clock after a TODO entry is marked DONE, @@ -1713,9 +1713,9 @@ and is only done if the variable `org-clock-out-when-done' is not nil." org-clock-out-when-done (marker-buffer org-clock-marker) (or (and (eq t org-clock-out-when-done) - (member state org-done-keywords)) + (member org-clock-state org-done-keywords)) (and (listp org-clock-out-when-done) - (member state org-clock-out-when-done))) + (member org-clock-state org-clock-out-when-done))) (equal (or (buffer-base-buffer (org-clocking-buffer)) (org-clocking-buffer)) (or (buffer-base-buffer (current-buffer)) diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el index b1d9f22a4..5a87bd646 100644 --- a/lisp/org-mouse.el +++ b/lisp/org-mouse.el @@ -315,11 +315,11 @@ nor a function, elements of KEYWORDS are used directly." (replace-match "") (just-one-space)) -(defvar rest) +(defvar org-mouse-rest) (defun org-mouse-replace-match-and-surround (newtext &optional fixedcase literal string subexp) "The same as `replace-match', but surrounds the replacement with spaces." - (apply 'replace-match rest) + (apply 'replace-match org-mouse-rest) (save-excursion (goto-char (match-beginning (or subexp 0))) (just-one-space) @@ -990,7 +990,7 @@ This means, between the beginning of line and the point." (replace-match replace-text)) (forward-line)))) -(defvar _cmd) ;dynamically scoped from `org-with-remote-undo'. +(defvar org-mouse-cmd) ;dynamically scoped from `org-with-remote-undo'. (defun org-mouse-do-remotely (command) ; (org-agenda-check-no-diary) @@ -1021,7 +1021,7 @@ This means, between the beginning of line and the point." (setq marker (copy-marker (point))) (goto-char (max (point-at-bol) (- (point-at-eol) anticol))) (funcall command) - (message "_cmd: %S" _cmd) + (message "_cmd: %S" org-mouse-cmd) (message "this-command: %S" this-command) (unless (eq (marker-position marker) (marker-position endmarker)) (setq newhead (org-get-heading)))) diff --git a/lisp/org-special-blocks.el b/lisp/org-special-blocks.el index fc882a333..d7dad8854 100644 --- a/lisp/org-special-blocks.el +++ b/lisp/org-special-blocks.el @@ -79,17 +79,17 @@ seen. This is run after a few special cases are taken care of." (add-hook 'org-export-latex-after-blockquotes-hook 'org-special-blocks-convert-latex-special-cookies) -(defvar line) +(defvar org-special-blocks-line) (defun org-special-blocks-convert-html-special-cookies () "Converts the special cookies into div blocks." - ;; Uses the dynamically-bound variable `line'. - (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" line) + ;; Uses the dynamically-bound variable `org-special-blocks-line'. + (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-special-blocks-line) (message "%s" (match-string 1)) - (when (equal (match-string 2 line) "START") + (when (equal (match-string 2 org-special-blocks-line) "START") (org-close-par-maybe) - (insert "\n