diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-03-15 13:39:56 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-03-15 13:39:56 -0400 |
commit | 0adf561883e07549e657a39d0a4a95cafa4d04fd (patch) | |
tree | 6a22754da903e82912e1144668cb98ff44e76783 /lisp/org | |
parent | d72700e549c5006c24f368f6c35db0464593b1f0 (diff) | |
download | emacs-0adf561883e07549e657a39d0a4a95cafa4d04fd.tar.gz |
Fix misuse of quote in `case'.
* lisp/progmodes/ruby-mode.el (ruby-backward-sexp):
* lisp/progmodes/ebrowse.el (ebrowse-draw-file-member-info):
* lisp/play/gamegrid.el (gamegrid-make-face):
* lisp/play/bubbles.el (bubbles--grid-width, bubbles--grid-height)
(bubbles--colors, bubbles--shift-mode, bubbles--initialize-images):
* lisp/notifications.el (notifications-notify):
* lisp/net/xesam.el (xesam-search-engines):
* lisp/net/quickurl.el (quickurl-list-insert):
* lisp/vc/vc-hg.el (vc-hg-dir-printer): Fix use of case.
* lisp/gnus/auth-source.el (auth-source-netrc-create):
* lisp/gnus/message.el (message-yank-original): Fix use of `case'.
* lisp/org/org-src.el (org-src-switch-to-buffer):
* lisp/org/org-plot.el (org-plot/gnuplot-script, org-plot/gnuplot):
* lisp/org/org-mouse.el (org-mouse-agenda-type):
* lisp/org/org-freemind.el (org-freemind-node-to-org):
* lisp/org/ob-sql.el (org-babel-execute:sql):
* lisp/org/ob-exp.el (org-babel-exp-do-export, org-babel-exp-code):
* lisp/org/ob-ref.el (org-babel-ref-resolve): Fix use of case.
Diffstat (limited to 'lisp/org')
-rw-r--r-- | lisp/org/ChangeLog | 10 | ||||
-rw-r--r-- | lisp/org/ob-exp.el | 14 | ||||
-rw-r--r-- | lisp/org/ob-ref.el | 12 | ||||
-rw-r--r-- | lisp/org/ob-sql.el | 22 | ||||
-rw-r--r-- | lisp/org/org-freemind.el | 6 | ||||
-rw-r--r-- | lisp/org/org-mouse.el | 10 | ||||
-rw-r--r-- | lisp/org/org-plot.el | 24 | ||||
-rw-r--r-- | lisp/org/org-src.el | 14 |
8 files changed, 61 insertions, 51 deletions
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index e75821b6860..44a2cb15b7e 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -1,3 +1,13 @@ +2011-03-15 Stefan Monnier <monnier@iro.umontreal.ca> + + * org-src.el (org-src-switch-to-buffer): + * org-plot.el (org-plot/gnuplot-script, org-plot/gnuplot): + * org-mouse.el (org-mouse-agenda-type): + * org-freemind.el (org-freemind-node-to-org): + * ob-sql.el (org-babel-execute:sql): + * ob-exp.el (org-babel-exp-do-export, org-babel-exp-code): + * ob-ref.el (org-babel-ref-resolve): Fix use of case. + 2011-03-06 Juanma Barranquero <lekktu@gmail.com> * org.el (org-blank-before-new-entry, org-context-in-file-links) diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el index 1be45198e0d..3215bcf4d8a 100644 --- a/lisp/org/ob-exp.el +++ b/lisp/org/ob-exp.el @@ -231,10 +231,10 @@ The function respects the value of the :exports header argument." (org-babel-exp-results info type 'silent)))) (clean () (org-babel-remove-result info))) (case (intern (or (cdr (assoc :exports (nth 2 info))) "code")) - ('none (silently) (clean) "") - ('code (silently) (clean) (org-babel-exp-code info type)) - ('results (org-babel-exp-results info type)) - ('both (concat (org-babel-exp-code info type) + (none (silently) (clean) "") + (code (silently) (clean) (org-babel-exp-code info type)) + (results (org-babel-exp-results info type)) + (both (concat (org-babel-exp-code info type) "\n\n" (org-babel-exp-results info type)))))) @@ -250,8 +250,8 @@ The code block is not evaluated." (name (nth 4 info)) (args (mapcar #'cdr (org-babel-get-header (nth 2 info) :var)))) (case type - ('inline (format "=%s=" body)) - ('block + (inline (format "=%s=" body)) + (block (let ((str (format "#+BEGIN_SRC %s %s\n%s%s#+END_SRC\n" lang switches body (if (and body (string-match "\n$" body)) @@ -265,7 +265,7 @@ The code block is not evaluated." (mapconcat #'identity args ", "))) str)) str)) - ('lob + (lob (let ((call-line (and (string-match "results=" (car args)) (substring (car args) (match-end 0))))) (cond diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el index 7b06e90f924..96819df8ea1 100644 --- a/lisp/org/ob-ref.el +++ b/lisp/org/ob-ref.el @@ -147,12 +147,12 @@ the variable." (let ((params (append args '((:results . "silent"))))) (setq result (case type - ('results-line (org-babel-read-result)) - ('table (org-babel-read-table)) - ('list (org-babel-read-list)) - ('file (org-babel-read-link)) - ('source-block (org-babel-execute-src-block nil nil params)) - ('lob (org-babel-execute-src-block nil lob-info params))))) + (results-line (org-babel-read-result)) + (table (org-babel-read-table)) + (list (org-babel-read-list)) + (file (org-babel-read-link)) + (source-block (org-babel-execute-src-block nil nil params)) + (lob (org-babel-execute-src-block nil lob-info params))))) (if (symbolp result) (format "%S" result) (if (and index (listp result)) diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el index 3bd10d6b2bd..49859d24a17 100644 --- a/lisp/org/ob-sql.el +++ b/lisp/org/ob-sql.el @@ -66,18 +66,18 @@ This function is called by `org-babel-execute-src-block'." (out-file (or (cdr (assoc :out-file params)) (org-babel-temp-file "sql-out-"))) (command (case (intern engine) - ('msosql (format "osql %s -s \"\t\" -i %s -o %s" - (or cmdline "") - (org-babel-process-file-name in-file) - (org-babel-process-file-name out-file))) - ('mysql (format "mysql %s -e \"source %s\" > %s" + (msosql (format "osql %s -s \"\t\" -i %s -o %s" (or cmdline "") - (org-babel-process-file-name in-file) - (org-babel-process-file-name out-file))) - ('postgresql (format "psql -A -P footer=off -F \"\t\" -f %s -o %s %s" - (org-babel-process-file-name in-file) - (org-babel-process-file-name out-file) - (or cmdline ""))) + (org-babel-process-file-name in-file) + (org-babel-process-file-name out-file))) + (mysql (format "mysql %s -e \"source %s\" > %s" + (or cmdline "") + (org-babel-process-file-name in-file) + (org-babel-process-file-name out-file))) + (postgresql (format "psql -A -P footer=off -F \"\t\" -f %s -o %s %s" + (org-babel-process-file-name in-file) + (org-babel-process-file-name out-file) + (or cmdline ""))) (t (error "no support for the %s sql engine" engine))))) (with-temp-file in-file (insert (org-babel-expand-body:sql body params))) diff --git a/lisp/org/org-freemind.el b/lisp/org/org-freemind.el index c85b4bac36a..dccdf449296 100644 --- a/lisp/org/org-freemind.el +++ b/lisp/org/org-freemind.el @@ -1172,8 +1172,8 @@ PATH should be a list of steps, where each step has the form (when (< 0 (- level skip-levels)) (dolist (attrib attributes) (case (car attrib) - ('TEXT (setq text (cdr attrib))) - ('text (setq text (cdr attrib))))) + (TEXT (setq text (cdr attrib))) + (text (setq text (cdr attrib))))) (unless text ;; There should be a richcontent node holding the text: (setq text (org-freemind-get-richcontent-node-text node))) @@ -1193,7 +1193,7 @@ PATH should be a list of steps, where each step has the form (setq text (replace-regexp-in-string "\n $" "" text)) (insert text)) (case qname - ('node + (node (insert (make-string (- level skip-levels) ?*) " " text "\n") (when note (insert ":COMMENT:\n" note "\n:END:\n")) diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index d30f172f42f..cec19d89de1 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el @@ -476,11 +476,11 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:" (defun org-mouse-agenda-type (type) (case type - ('tags "Tags: ") - ('todo "TODO: ") - ('tags-tree "Tags tree: ") - ('todo-tree "TODO tree: ") - ('occur-tree "Occur tree: ") + (tags "Tags: ") + (todo "TODO: ") + (tags-tree "Tags tree: ") + (todo-tree "TODO tree: ") + (occur-tree "Occur tree: ") (t "Agenda command ???"))) diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el index c5f4bff24fa..10722403f7e 100644 --- a/lisp/org/org-plot.el +++ b/lisp/org/org-plot.el @@ -206,18 +206,18 @@ manner suitable for prepending to a user-specified script." (y-labels (plist-get params :ylabels)) (plot-str "'%s' using %s%d%s with %s title '%s'") (plot-cmd (case type - ('2d "plot") - ('3d "splot") - ('grid "splot"))) + (2d "plot") + (3d "splot") + (grid "splot"))) (script "reset") plot-lines) (flet ((add-to-script (line) (setf script (format "%s\n%s" script line)))) (when file ;; output file (add-to-script (format "set term %s" (file-name-extension file))) (add-to-script (format "set output '%s'" file))) (case type ;; type - ('2d ()) - ('3d (if map (add-to-script "set map"))) - ('grid (if map + (2d ()) + (3d (if map (add-to-script "set map"))) + (grid (if map (add-to-script "set pm3d map") (add-to-script "set pm3d")))) (when title (add-to-script (format "set title '%s'" title))) ;; title @@ -243,7 +243,7 @@ manner suitable for prepending to a user-specified script." "%Y-%m-%d-%H:%M:%S") "\""))) (unless preface (case type ;; plot command - ('2d (dotimes (col num-cols) + (2d (dotimes (col num-cols) (unless (and (equal type '2d) (or (and ind (equal (+ 1 col) ind)) (and deps (not (member (+ 1 col) deps))))) @@ -258,10 +258,10 @@ manner suitable for prepending to a user-specified script." with (or (nth col col-labels) (format "%d" (+ 1 col)))) plot-lines))))) - ('3d + (3d (setq plot-lines (list (format "'%s' matrix with %s title ''" data-file with)))) - ('grid + (grid (setq plot-lines (list (format "'%s' with %s title ''" data-file with))))) (add-to-script @@ -305,9 +305,9 @@ line directly before or after the table." (setf params (org-plot/collect-options params)))) ;; dump table to datafile (very different for grid) (case (plist-get params :plot-type) - ('2d (org-plot/gnuplot-to-data table data-file params)) - ('3d (org-plot/gnuplot-to-data table data-file params)) - ('grid (let ((y-labels (org-plot/gnuplot-to-grid-data + (2d (org-plot/gnuplot-to-data table data-file params)) + (3d (org-plot/gnuplot-to-data table data-file params)) + (grid (let ((y-labels (org-plot/gnuplot-to-grid-data table data-file params))) (when y-labels (plist-put params :ylabels y-labels))))) ;; check for timestamp ind column diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index 98fdb75423d..bd1c3802044 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -335,26 +335,26 @@ buffer." (defun org-src-switch-to-buffer (buffer context) (case org-src-window-setup - ('current-window + (current-window (switch-to-buffer buffer)) - ('other-window + (other-window (switch-to-buffer-other-window buffer)) - ('other-frame + (other-frame (case context - ('exit + (exit (let ((frame (selected-frame))) (switch-to-buffer-other-frame buffer) (delete-frame frame))) - ('save + (save (kill-buffer (current-buffer)) (switch-to-buffer buffer)) (t (switch-to-buffer-other-frame buffer)))) - ('reorganize-frame + (reorganize-frame (if (eq context 'edit) (delete-other-windows)) (org-switch-to-buffer-other-window buffer) (if (eq context 'exit) (delete-other-windows))) - ('switch-invisibly + (switch-invisibly (set-buffer buffer)) (t (message "Invalid value %s for org-src-window-setup" |