forked from mirrors/org-mode
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:
parent
bf024eed8d
commit
9290395405
|
@ -202,11 +202,11 @@ return the value of the last statement in BODY."
|
||||||
(with-temp-file stdin-file (insert (or stdin "")))
|
(with-temp-file stdin-file (insert (or stdin "")))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(call-process-shell-command
|
(call-process-shell-command
|
||||||
(if shebang
|
(concat (if shebang script-file
|
||||||
script-file
|
(format "%s %s" shell-file-name script-file))
|
||||||
(format "%s %s" shell-file-name script-file))
|
(and cmdline (concat " " cmdline)))
|
||||||
stdin-file
|
stdin-file
|
||||||
(current-buffer) nil cmdline)
|
(current-buffer))
|
||||||
(buffer-string))))
|
(buffer-string))))
|
||||||
(session ; session evaluation
|
(session ; session evaluation
|
||||||
(mapconcat
|
(mapconcat
|
||||||
|
|
|
@ -1093,9 +1093,11 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling
|
||||||
(defvar org-x11idle-exists-p
|
(defvar org-x11idle-exists-p
|
||||||
;; Check that x11idle exists
|
;; Check that x11idle exists
|
||||||
(and (eq window-system 'x)
|
(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
|
;; 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 ()
|
(defun org-x11-idle-seconds ()
|
||||||
"Return the current X11 idle time in seconds."
|
"Return the current X11 idle time in seconds."
|
||||||
|
|
|
@ -215,8 +215,7 @@ this function is called. Otherwise, the current major mode menu is used."
|
||||||
(when (not (org-mouse-mark-active))
|
(when (not (org-mouse-mark-active))
|
||||||
(goto-char (posn-point (event-start event)))
|
(goto-char (posn-point (event-start event)))
|
||||||
(when (not (eolp)) (save-excursion (run-hooks 'post-command-hook)))
|
(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)
|
(if (functionp org-mouse-context-menu-function)
|
||||||
(funcall org-mouse-context-menu-function event)
|
(funcall org-mouse-context-menu-function event)
|
||||||
(if (fboundp 'mouse-menu-major-mode-map)
|
(if (fboundp 'mouse-menu-major-mode-map)
|
||||||
|
|
45
lisp/org.el
45
lisp/org.el
|
@ -10499,32 +10499,27 @@ from."
|
||||||
|
|
||||||
(defun org-icompleting-read (&rest args)
|
(defun org-icompleting-read (&rest args)
|
||||||
"Completing-read using `ido-mode' or `iswitchb' speedups if available.
|
"Completing-read using `ido-mode' or `iswitchb' speedups if available.
|
||||||
|
|
||||||
Should be called like `completing-read'."
|
Should be called like `completing-read'."
|
||||||
(let ((default-completion (or completing-read-function
|
(org-without-partial-completion
|
||||||
completion-read)))
|
(if (not (listp (nth 1 args)))
|
||||||
(org-without-partial-completion
|
;; Ido only supports lists as the COLLECTION argument. Use
|
||||||
(if (not (listp (second args)))
|
;; default completion function when second argument is not
|
||||||
;; Ido only supports lists as the COLLECTION argument. Use
|
;; a list.
|
||||||
;; default completion function when second argument is not a
|
(apply #'completing-read args)
|
||||||
;; list.
|
(let ((ido-enter-matching-directory nil))
|
||||||
(apply default-completion args)
|
(apply (cond ((and org-completion-use-ido
|
||||||
(let ((ido-enter-matching-directory nil))
|
(fboundp 'ido-completing-read)
|
||||||
(apply (cond ((and org-completion-use-ido
|
(org-bound-and-true-p ido-mode))
|
||||||
(fboundp 'ido-completing-read)
|
#'ido-completing-read)
|
||||||
(boundp 'ido-mode)
|
((and org-completion-use-iswitchb
|
||||||
ido-mode)
|
(org-bound-and-true-p iswitchb-mode))
|
||||||
'ido-completing-read)
|
#'org-iswitchb-completing-read)
|
||||||
((and org-completion-use-iswitchb
|
(t #'completing-read))
|
||||||
(boundp 'iswitchb-mode)
|
(pop args)
|
||||||
iswitchb-mode)
|
(if (org-some #'consp (car args))
|
||||||
'org-iswitchb-completing-read)
|
(mapcar #'car (pop args))
|
||||||
(t default-completion))
|
(pop args))
|
||||||
(pop args)
|
args)))))
|
||||||
(if (org-some 'consp (car args))
|
|
||||||
(mapcar 'car (pop args))
|
|
||||||
(pop args))
|
|
||||||
args))))))
|
|
||||||
|
|
||||||
(defun org-extract-attributes (s)
|
(defun org-extract-attributes (s)
|
||||||
"Extract the attributes cookie from a string and set as text property."
|
"Extract the attributes cookie from a string and set as text property."
|
||||||
|
|
Loading…
Reference in a new issue