[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master fa76ec7b5f0 5/6: Merge from origin/emacs-30
From: |
Eli Zaretskii |
Subject: |
master fa76ec7b5f0 5/6: Merge from origin/emacs-30 |
Date: |
Sat, 31 Aug 2024 08:21:08 -0400 (EDT) |
branch: master
commit fa76ec7b5f0e509655662e684ab974a91288695b
Merge: e176ec4a8f2 5fd75133cfe
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Merge from origin/emacs-30
5fd75133cfe Make 'python-shell--with-environment' respect buffer-loca...
e27849ecf6e Avoid ANSI escape characters in Python output (bug#45938)
4f521fa14c1 Fix handling of hook variables in 'use-package'
bb5576fc907 Work around Gnuplot bug in displaying plots
---
lisp/calc/calc-graph.el | 4 +++-
lisp/progmodes/python.el | 13 ++++++++-----
lisp/use-package/use-package-core.el | 12 +++++++-----
3 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el
index fb817b1bc3d..804ee3944c7 100644
--- a/lisp/calc/calc-graph.el
+++ b/lisp/calc/calc-graph.el
@@ -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
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index fb4b9afc073..669638544ce 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -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')
diff --git a/lisp/use-package/use-package-core.el
b/lisp/use-package/use-package-core.el
index f30e85e65ec..4df7fee3bdd 100644
--- a/lisp/use-package/use-package-core.el
+++ b/lisp/use-package/use-package-core.el
@@ -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))))
- master updated (a9889b8eece -> ca8170d906f), Eli Zaretskii, 2024/08/31
- master fa00e4a10c8 2/6: ; Merge from origin/emacs-30, Eli Zaretskii, 2024/08/31
- master d1f896b5f89 3/6: Merge from origin/emacs-30, Eli Zaretskii, 2024/08/31
- master ca8170d906f 6/6: ; Fix merge problem in etc/NEWS.30., Eli Zaretskii, 2024/08/31
- master a18c29a7ebe 1/6: Merge from origin/emacs-30, Eli Zaretskii, 2024/08/31
- master e176ec4a8f2 4/6: ; Merge from origin/emacs-30, Eli Zaretskii, 2024/08/31
- master fa76ec7b5f0 5/6: Merge from origin/emacs-30,
Eli Zaretskii <=