mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-07 14:31:41 -08:00
Fix downcasing of mode-name in compile.el
* lisp/progmodes/compile.el (compilation--downcase-mode-name): New function. (compilation-start, kill-compilation): Use it instead of calling 'downcase' on 'mode-name'. (Bug#68795)
This commit is contained in:
parent
37efb63a3d
commit
492e16f2ff
1 changed files with 12 additions and 4 deletions
|
|
@ -1890,6 +1890,12 @@ process from additional information inserted by Emacs."
|
|||
(defvar-local compilation--start-time nil
|
||||
"The time when the compilation started as returned by `float-time'.")
|
||||
|
||||
(defun compilation--downcase-mode-name (mode)
|
||||
"Downcase the name of major MODE, even if MODE is not a string.
|
||||
The function `downcase' will barf if passed the name of a `major-mode'
|
||||
which is not a string, but instead a symbol or a list."
|
||||
(downcase (format-mode-line mode)))
|
||||
|
||||
;;;###autoload
|
||||
(defun compilation-start (command &optional mode name-function highlight-regexp
|
||||
continue)
|
||||
|
|
@ -2081,11 +2087,12 @@ Returns the compilation buffer created."
|
|||
(get-buffer-process
|
||||
(with-no-warnings
|
||||
(comint-exec
|
||||
outbuf (downcase mode-name)
|
||||
outbuf (compilation--downcase-mode-name mode-name)
|
||||
shell-file-name
|
||||
nil `(,shell-command-switch ,command)))))
|
||||
(start-file-process-shell-command (downcase mode-name)
|
||||
outbuf command))))
|
||||
(start-file-process-shell-command
|
||||
(compilation--downcase-mode-name mode-name)
|
||||
outbuf command))))
|
||||
;; Make the buffer's mode line show process state.
|
||||
(setq mode-line-process
|
||||
'((:propertize ":%s" face compilation-mode-line-run)
|
||||
|
|
@ -2790,7 +2797,8 @@ Prefix arg N says how many files to move backwards (or forwards, if negative)."
|
|||
(let ((buffer (compilation-find-buffer)))
|
||||
(if (get-buffer-process buffer)
|
||||
(interrupt-process (get-buffer-process buffer))
|
||||
(error "The %s process is not running" (downcase mode-name)))))
|
||||
(error "The %s process is not running"
|
||||
(compilation--downcase-mode-name mode-name)))))
|
||||
|
||||
(defalias 'compile-mouse-goto-error 'compile-goto-error)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue