From 92903954051dc8da131773e3a2f10c143c61f5ca Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 22 Apr 2015 09:51:52 +0200 Subject: [PATCH] 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. --- lisp/ob-shell.el | 8 ++++---- lisp/org-clock.el | 6 ++++-- lisp/org-mouse.el | 3 +-- lisp/org.el | 45 ++++++++++++++++++++------------------------- 4 files changed, 29 insertions(+), 33 deletions(-) diff --git a/lisp/ob-shell.el b/lisp/ob-shell.el index 4d6d7c42a..5b74821de 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 125209ebf..c013734f3 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 53b798fa3..e6ccb6ebe 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 0375b474e..98c1df929 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." -- 2.11.4.GIT