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