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.
This commit is contained in:
Nicolas Goaziou 2015-04-22 09:51:52 +02:00
parent bf024eed8d
commit 9290395405
4 changed files with 29 additions and 33 deletions

View File

@ -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

View File

@ -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."

View File

@ -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)

View File

@ -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."