summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2015-04-22 09:51:52 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-04-22 09:51:52 +0200
commit92903954051dc8da131773e3a2f10c143c61f5ca (patch)
tree006b90ee3607b6616fbd71dba828a32c0fe8e74e
parentbf024eed8d0fbbec6577e042b35ec2d5f25514cd (diff)
downloadorg-mode-92903954051dc8da131773e3a2f10c143c61f5ca.tar.gz
Silence byte-compiler
* lisp/ob-shell.el (org-babel-sh-evaluate): * lisp/org-clock.el (org-x11idle-exists-p): Do not use last `call-process-shell-command' arg. * lisp/org-mouse.el (org-mouse-show-context-menu): Ignore `redisplay-dont-pause'. * lisp/org.el (org-icompleting-read): Fix typo. Small refactoring.
-rw-r--r--lisp/ob-shell.el8
-rw-r--r--lisp/org-clock.el6
-rw-r--r--lisp/org-mouse.el3
-rwxr-xr-xlisp/org.el45
4 files changed, 29 insertions, 33 deletions
diff --git a/lisp/ob-shell.el b/lisp/ob-shell.el
index 4d6d7c4..5b74821 100644
--- a/lisp/ob-shell.el
+++ b/lisp/ob-shell.el
@@ -202,11 +202,11 @@ return the value of the last statement in BODY."
(with-temp-file stdin-file (insert (or stdin "")))
(with-temp-buffer
(call-process-shell-command
- (if shebang
- script-file
- (format "%s %s" shell-file-name script-file))
+ (concat (if shebang script-file
+ (format "%s %s" shell-file-name script-file))
+ (and cmdline (concat " " cmdline)))
stdin-file
- (current-buffer) nil cmdline)
+ (current-buffer))
(buffer-string))))
(session ; session evaluation
(mapconcat
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 125209e..c013734 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1093,9 +1093,11 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling
(defvar org-x11idle-exists-p
;; Check that x11idle exists
(and (eq window-system 'x)
- (eq (call-process-shell-command "command" nil nil nil "-v" org-clock-x11idle-program-name) 0)
+ (eq (call-process-shell-command
+ (format "command -v %s" org-clock-x11idle-program-name))
+ 0)
;; Check that x11idle can retrieve the idle time
- (eq (call-process-shell-command org-clock-x11idle-program-name nil nil nil) 0)))
+ (eq (call-process-shell-command org-clock-x11idle-program-name) 0)))
(defun org-x11-idle-seconds ()
"Return the current X11 idle time in seconds."
diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el
index 53b798f..e6ccb6e 100644
--- a/lisp/org-mouse.el
+++ b/lisp/org-mouse.el
@@ -215,8 +215,7 @@ this function is called. Otherwise, the current major mode menu is used."
(when (not (org-mouse-mark-active))
(goto-char (posn-point (event-start event)))
(when (not (eolp)) (save-excursion (run-hooks 'post-command-hook)))
- (let ((redisplay-dont-pause t))
- (sit-for 0)))
+ (sit-for 0))
(if (functionp org-mouse-context-menu-function)
(funcall org-mouse-context-menu-function event)
(if (fboundp 'mouse-menu-major-mode-map)
diff --git a/lisp/org.el b/lisp/org.el
index 0375b47..98c1df9 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -10499,32 +10499,27 @@ from."
(defun org-icompleting-read (&rest args)
"Completing-read using `ido-mode' or `iswitchb' speedups if available.
-
Should be called like `completing-read'."
- (let ((default-completion (or completing-read-function
- completion-read)))
- (org-without-partial-completion
- (if (not (listp (second args)))
- ;; Ido only supports lists as the COLLECTION argument. Use
- ;; default completion function when second argument is not a
- ;; list.
- (apply default-completion args)
- (let ((ido-enter-matching-directory nil))
- (apply (cond ((and org-completion-use-ido
- (fboundp 'ido-completing-read)
- (boundp 'ido-mode)
- ido-mode)
- 'ido-completing-read)
- ((and org-completion-use-iswitchb
- (boundp 'iswitchb-mode)
- iswitchb-mode)
- 'org-iswitchb-completing-read)
- (t default-completion))
- (pop args)
- (if (org-some 'consp (car args))
- (mapcar 'car (pop args))
- (pop args))
- args))))))
+ (org-without-partial-completion
+ (if (not (listp (nth 1 args)))
+ ;; Ido only supports lists as the COLLECTION argument. Use
+ ;; default completion function when second argument is not
+ ;; a list.
+ (apply #'completing-read args)
+ (let ((ido-enter-matching-directory nil))
+ (apply (cond ((and org-completion-use-ido
+ (fboundp 'ido-completing-read)
+ (org-bound-and-true-p ido-mode))
+ #'ido-completing-read)
+ ((and org-completion-use-iswitchb
+ (org-bound-and-true-p iswitchb-mode))
+ #'org-iswitchb-completing-read)
+ (t #'completing-read))
+ (pop args)
+ (if (org-some #'consp (car args))
+ (mapcar #'car (pop args))
+ (pop args))
+ args)))))
(defun org-extract-attributes (s)
"Extract the attributes cookie from a string and set as text property."