* bug#34956: Fix for define-compilation-mode
@ 2019-03-23 13:26 Troy Hinckley
2019-04-04 23:42 ` Noam Postavsky
0 siblings, 1 reply; 2+ messages in thread
From: Troy Hinckley @ 2019-03-23 13:26 UTC (permalink / raw)
To: 34956
[-- Attachment #1.1: Type: text/plain, Size: 506 bytes --]
Hello,
This a is small patch that removes compilation-buffer-name-function-from
define-compilation-mode. compilation-buffer-name-function is used before
the major-mode is loaded, therefore overriding it in
define-compilation-mode is ineffectual. Removing it from the list of
overridden variables will ensure that it is not mistaken for a variable
that can be major mode specific. Also the function compilation-start takes
an optional argument name-function, so there is already a mechanism to
override it.
[-- Attachment #1.2: Type: text/html, Size: 540 bytes --]
[-- Attachment #2: 0001-Remove-compilation-buffer-name-function-from-derived.patch --]
[-- Type: application/octet-stream, Size: 1117 bytes --]
From f705fe6a21bd27f17b5e13239909a083b9a887b1 Mon Sep 17 00:00:00 2001
From: Troy Hinckley <t.macman@gmail.com>
Date: Wed, 16 Jan 2019 14:47:07 -0800
Subject: [PATCH] Remove compilation-buffer-name-function from derived mode
Because this variable is used to create the buffer name, which happens
before the major-mode is loaded, overriding it with a mode specific
version is ineffectual.
---
lisp/progmodes/compile.el | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 3650b05607..e135cd3a28 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2066,8 +2066,7 @@ by replacing the first word, e.g., `compilation-scroll-output' from
(if (boundp 'byte-compile-bound-variables)
(memq (cdr v) byte-compile-bound-variables)))
`(set (make-local-variable ',(car v)) ,(cdr v))))
- '(compilation-buffer-name-function
- compilation-directory-matcher
+ '(compilation-directory-matcher
compilation-error
compilation-error-regexp-alist
compilation-error-regexp-alist-alist
--
2.12.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#34956: Fix for define-compilation-mode
2019-03-23 13:26 bug#34956: Fix for define-compilation-mode Troy Hinckley
@ 2019-04-04 23:42 ` Noam Postavsky
0 siblings, 0 replies; 2+ messages in thread
From: Noam Postavsky @ 2019-04-04 23:42 UTC (permalink / raw)
To: Troy Hinckley; +Cc: 34956
severity 34956 minor
tags 34956 fixed
close 34956 27.1
quit
Troy Hinckley <t.macman@gmail.com> writes:
> This a is small patch that removes compilation-buffer-name-function-from
> define-compilation-mode. compilation-buffer-name-function is used before
> the major-mode is loaded, therefore overriding it in
> define-compilation-mode is ineffectual. Removing it from the list of
> overridden variables will ensure that it is not mistaken for a variable
> that can be major mode specific. Also the function compilation-start takes
> an optional argument name-function, so there is already a mechanism to
> override it.
Pushed to master.
[1: 905f619519]: 2019-04-04 19:39:42 -0400
Don't check comp-buffer-name-function in derived mode (Bug#34956)
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=905f6195191a518b7bb2dbdf6eacae41d31fc54e
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-04 23:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-23 13:26 bug#34956: Fix for define-compilation-mode Troy Hinckley
2019-04-04 23:42 ` Noam Postavsky
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.