Merge from origin/emacs-30

5fd75133cf Make 'python-shell--with-environment' respect buffer-loca...
e27849ecf6 Avoid ANSI escape characters in Python output (bug#45938)
4f521fa14c Fix handling of hook variables in 'use-package'
bb5576fc90 Work around Gnuplot bug in displaying plots
This commit is contained in:
Eli Zaretskii 2024-08-31 08:14:14 -04:00
commit fa76ec7b5f
3 changed files with 18 additions and 11 deletions

View file

@ -1417,7 +1417,9 @@ This \"dumb\" driver will be present in Gnuplot 3.0."
"Send ARGS to Gnuplot.
Returns nil if Gnuplot signaled an error."
(calc-graph-init)
(let ((cmd (concat (mapconcat 'identity args " ") "\n")))
;; We prepend the newline to work around a bug in Gnuplot, whereby it
;; sometimes does not display the plot, see bug#72778.
(let ((cmd (concat "\n" (mapconcat 'identity args " ") "\n")))
(or (calc-graph-w32-p)
(accept-process-output))
(with-current-buffer calc-gnuplot-buffer

View file

@ -3030,11 +3030,11 @@ machine then modifies `tramp-remote-process-environment' and
(tramp-dissect-file-name default-directory 'noexpand)))))
(if vec
(python-shell--tramp-with-environment vec extraenv bodyfun)
(let ((process-environment
(append extraenv process-environment))
(exec-path
;; FIXME: This is still Python-specific.
(python-shell-calculate-exec-path)))
(cl-letf (((default-value 'process-environment)
(append extraenv process-environment))
((default-value 'exec-path)
;; FIXME: This is still Python-specific.
(python-shell-calculate-exec-path)))
(funcall bodyfun)))))
(defun python-shell--tramp-with-environment (vec extraenv bodyfun)
@ -4549,6 +4549,9 @@ def __PYTHON_EL_native_completion_setup():
readline.parse_and_bind('tab: complete')
# Require just one tab to send output.
readline.parse_and_bind('set show-all-if-ambiguous on')
# Avoid ANSI escape characters in the output
readline.parse_and_bind('set colored-completion-prefix off')
readline.parse_and_bind('set colored-stats off')
# Avoid replacing common prefix with ellipsis.
readline.parse_and_bind('set completion-prefix-display-length 0')

View file

@ -1415,11 +1415,13 @@ enable gathering statistics."
(when fun
(mapcar
#'(lambda (sym)
`(add-hook
(quote ,(intern
(concat (symbol-name sym)
use-package-hook-name-suffix)))
(function ,fun)))
(if (boundp sym)
`(add-hook (quote ,sym) (function ,fun))
`(add-hook
(quote ,(intern
(concat (symbol-name sym)
use-package-hook-name-suffix)))
(function ,fun))))
(use-package-hook-handler-normalize-mode-symbols syms)))))
(use-package-normalize-commands args))))