* Please test: Fix global variables names
@ 2012-03-30 21:11 Bastien
2012-04-01 10:03 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Bastien @ 2012-03-30 21:11 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
Here is a patch against hotfix to fix warnings about wrong
variables names (with Emacs 24).
Please test it heavily.
Thanks a lot to Martyn Jago for a preliminary set of patches
for this!
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix-glo-var.patch --]
[-- Type: text/x-patch, Size: 20163 bytes --]
diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el
index 63f1e32..8da20af 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 81377ca..f706050 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)
@@ -4530,8 +4530,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)
@@ -4936,7 +4936,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 e6084d2..7882b27 100644
--- a/lisp/org-beamer.el
+++ b/lisp/org-beamer.el
@@ -235,7 +235,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))
@@ -266,10 +266,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}" ""))
@@ -294,10 +294,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 "]") ""))))
@@ -321,31 +321,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 17cdbc2..c1788b4 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" ())
@@ -467,7 +467,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."
@@ -485,7 +485,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 feca16d..b113302 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1691,7 +1691,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,
@@ -1700,9 +1700,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 b1d9f22..5a87bd6 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 fc882a3..d7dad88 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<div class=\"" (match-string 1 line) "\">")
+ (insert "\n<div class=\"" (match-string 1 org-special-blocks-line) "\">")
(org-open-par))
- (when (equal (match-string 2 line) "END")
+ (when (equal (match-string 2 org-special-blocks-line) "END")
(org-close-par-maybe)
(insert "\n</div>")
(org-open-par))
diff --git a/lisp/org-table.el b/lisp/org-table.el
index a523eac..9018bb4 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2364,7 +2364,7 @@ of the new mark."
(looking-at org-table-auto-recalculate-regexp))
(org-table-recalculate) t))
-(defvar modes)
+(defvar org-table-modes)
(defsubst org-set-calc-mode (var &optional value)
(if (stringp var)
(setq var (assoc var '(("D" calc-angle-mode deg)
@@ -2372,10 +2372,10 @@ of the new mark."
("F" calc-prefer-frac t)
("S" calc-symbolic-mode t)))
value (nth 2 var) var (nth 1 var)))
- (if (memq var modes)
- (setcar (cdr (memq var modes)) value)
- (cons var (cons value modes)))
- modes)
+ (if (memq var org-table-modes)
+ (setcar (cdr (memq var org-table-modes)) value)
+ (cons var (cons value org-table-modes)))
+ org-table-modes)
(defun org-table-eval-formula (&optional arg equation
suppress-align suppress-const
diff --git a/lisp/org.el b/lisp/org.el
index 800778e..9e00bae 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4841,8 +4841,8 @@ This is for getting out of special buffers like remember.")
;; FIXME: Occasionally check by commenting these, to make sure
;; no other functions uses these, forgetting to let-bind them.
-(defvar entry)
-(defvar last-state)
+(defvar org-entry)
+(defvar org-last-state)
(defvar date)
;; Defined somewhere in this file, but used before definition.
@@ -4892,6 +4892,8 @@ sure that we are at the beginning of the line.")
"Matches an headline, putting stars and text into groups.
Stars are put in group 1 and the trimmed body in group 2.")
+(defvar buffer-face-mode-face)
+
;;;###autoload
(define-derived-mode org-mode outline-mode "Org"
"Outline-based notes management and organizer, alias
@@ -10380,8 +10382,8 @@ on the system \"/user@host:\"."
targets tgs txt re files f desc descre fast-path-p level pos0)
(message "Getting targets...")
(with-current-buffer (or default-buffer (current-buffer))
- (while (setq entry (pop entries))
- (setq files (car entry) desc (cdr entry))
+ (while (setq org-entry (pop entries))
+ (setq files (car org-entry) desc (cdr org-entry))
(setq fast-path-p nil)
(cond
((null files) (setq files (list (current-buffer))))
@@ -11870,7 +11872,7 @@ of repeating deadline/scheduled time stamps to new date.
This function is run automatically after each state change to a DONE state."
;; last-state is dynamically scoped into this function
(let* ((repeat (org-get-repeat))
- (aa (assoc last-state org-todo-kwd-alist))
+ (aa (assoc org-last-state org-todo-kwd-alist))
(interpret (nth 1 aa))
(head (nth 2 aa))
(whata '(("d" . day) ("m" . month) ("y" . year)))
@@ -11883,7 +11885,7 @@ This function is run automatically after each state change to a DONE state."
(setq to-state (or (org-entry-get nil "REPEAT_TO_STATE")
org-todo-repeat-to-state))
(unless (and to-state (member to-state org-todo-keywords-1))
- (setq to-state (if (eq interpret 'type) last-state head)))
+ (setq to-state (if (eq interpret 'type) org-last-state head)))
(org-todo to-state)
(when (or org-log-repeat (org-entry-get nil "CLOCK"))
(org-entry-put nil "LAST_REPEAT" (format-time-string
@@ -11897,7 +11899,7 @@ This function is run automatically after each state change to a DONE state."
(setq org-log-note-how 'note))
;; Set up for taking a record
(org-add-log-setup 'state (or done-word (car org-done-keywords))
- last-state
+ org-last-state
'findpos org-log-repeat)))
(org-back-to-heading t)
(org-add-planning-info nil nil 'closed)
@@ -14899,7 +14901,7 @@ So these are more for recording a certain time/date."
(defvar org-read-date-analyze-futurep nil)
(defvar org-read-date-analyze-forced-year nil)
-(defun org-read-date (&optional with-time to-time from-string prompt
+(defun org-read-date (&optional org-with-time to-time from-string prompt
default-time default-input)
"Read a date, possibly a time, and make things smooth for the user.
The prompt will suggest to enter an ISO date, but you can also enter anything
@@ -14953,24 +14955,24 @@ the time/date that is used for everything that is not specified by the
user."
(require 'parse-time)
(let* ((org-time-stamp-rounding-minutes
- (if (equal with-time '(16)) '(0 0) org-time-stamp-rounding-minutes))
+ (if (equal org-with-time '(16)) '(0 0) org-time-stamp-rounding-minutes))
(org-dcst org-display-custom-times)
(ct (org-current-time))
- (def (or org-overriding-default-time default-time ct))
- (defdecode (decode-time def))
+ (org-def (or org-overriding-default-time default-time ct))
+ (org-defdecode (decode-time org-def))
(dummy (progn
- (when (< (nth 2 defdecode) org-extend-today-until)
- (setcar (nthcdr 2 defdecode) -1)
- (setcar (nthcdr 1 defdecode) 59)
- (setq def (apply 'encode-time defdecode)
- defdecode (decode-time def)))))
+ (when (< (nth 2 org-defdecode) org-extend-today-until)
+ (setcar (nthcdr 2 org-defdecode) -1)
+ (setcar (nthcdr 1 org-defdecode) 59)
+ (setq org-def (apply 'encode-time org-defdecode)
+ org-defdecode (decode-time org-def)))))
(calendar-frame-setup nil)
(calendar-setup nil)
(calendar-move-hook nil)
(calendar-view-diary-initially-flag nil)
(calendar-view-holidays-initially-flag nil)
(timestr (format-time-string
- (if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") def))
+ (if org-with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") org-def))
(prompt (concat (if prompt (concat prompt " ") "")
(format "Date+time [%s]: " timestr)))
ans (org-ans0 "") org-ans1 org-ans2 final)
@@ -14983,7 +14985,7 @@ user."
(calendar)
(unwind-protect
(progn
- (calendar-forward-day (- (time-to-days def)
+ (calendar-forward-day (- (time-to-days org-def)
(calendar-absolute-from-gregorian
(calendar-current-date))))
(org-eval-in-calendar nil t)
@@ -15069,7 +15071,7 @@ user."
(delete-overlay org-read-date-overlay)
(setq org-read-date-overlay nil)))))
- (setq final (org-read-date-analyze ans def defdecode))
+ (setq final (org-read-date-analyze ans org-def org-defdecode))
(when org-read-date-analyze-forced-year
(message "Year was forced into %s"
@@ -15091,9 +15093,9 @@ user."
(nth 2 final) (nth 1 final))
(format "%04d-%02d-%02d" (nth 5 final) (nth 4 final) (nth 3 final))))))
-(defvar def)
-(defvar defdecode)
-(defvar with-time)
+(defvar org-def)
+(defvar org-defdecode)
+(defvar org-with-time)
(defun org-read-date-display ()
"Display the current date prompt interpretation in the minibuffer."
(when org-read-date-display-live
@@ -15109,11 +15111,11 @@ user."
(let* ((ans (concat (buffer-substring (point-at-bol) (point-max))
" " (or org-ans1 org-ans2)))
(org-end-time-was-given nil)
- (f (org-read-date-analyze ans def defdecode))
+ (f (org-read-date-analyze ans org-def org-defdecode))
(fmts (if org-dcst
org-time-stamp-custom-formats
org-time-stamp-formats))
- (fmt (if (or with-time
+ (fmt (if (or org-with-time
(and (boundp 'org-time-was-given) org-time-was-given))
(cdr fmts)
(car fmts)))
@@ -15129,7 +15131,7 @@ user."
(make-overlay (1- (point-at-eol)) (point-at-eol)))
(org-overlay-display org-read-date-overlay txt 'secondary-selection))))
-(defun org-read-date-analyze (ans def defdecode)
+(defun org-read-date-analyze (ans org-def org-defdecode)
"Analyze the combined answer of the date prompt."
;; FIXME: cleanup and comment
(let ((nowdecode (decode-time (current-time)))
@@ -15141,7 +15143,7 @@ user."
(when (string-match "\\`[ \t]*\\.[ \t]*\\'" ans)
(setq ans "+0"))
- (when (setq delta (org-read-date-get-relative ans (current-time) def))
+ (when (setq delta (org-read-date-get-relative ans (current-time) org-def))
(setq ans (replace-match "" t t ans)
deltan (car delta)
deltaw (nth 1 delta)
@@ -15235,19 +15237,19 @@ user."
(substring ans (match-end 7))))))
(setq tl (parse-time-string ans)
- day (or (nth 3 tl) (nth 3 defdecode))
+ day (or (nth 3 tl) (nth 3 org-defdecode))
month (or (nth 4 tl)
(if (and org-read-date-prefer-future
(nth 3 tl) (< (nth 3 tl) (nth 3 nowdecode)))
(prog1 (1+ (nth 4 nowdecode)) (setq futurep t))
- (nth 4 defdecode)))
+ (nth 4 org-defdecode)))
year (or (and (not kill-year) (nth 5 tl))
(if (and org-read-date-prefer-future
(nth 4 tl) (< (nth 4 tl) (nth 4 nowdecode)))
(prog1 (1+ (nth 5 nowdecode)) (setq futurep t))
- (nth 5 defdecode)))
- hour (or (nth 2 tl) (nth 2 defdecode))
- minute (or (nth 1 tl) (nth 1 defdecode))
+ (nth 5 org-defdecode)))
+ hour (or (nth 2 tl) (nth 2 org-defdecode))
+ minute (or (nth 1 tl) (nth 1 org-defdecode))
second (or (nth 0 tl) 0)
wday (nth 6 tl))
@@ -15318,7 +15320,7 @@ user."
(condition-case nil
(ignore (encode-time second minute hour day month year))
(error
- (setq year (nth 5 defdecode))
+ (setq year (nth 5 org-defdecode))
(setq org-read-date-analyze-forced-year t))))
(setq org-read-date-analyze-futurep futurep)
(list second minute hour day month year)))
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Bastien
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-01 10:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30 21:11 Please test: Fix global variables names Bastien
2012-04-01 10:03 ` Bastien
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.