unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / Atom feed
* bug#46721: [PATCH] Interactive tag byte compilation functions in emacs-lisp-mode
@ 2021-02-23 16:13 Doug Davis
  2021-02-24 16:46 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Doug Davis @ 2021-02-23 16:13 UTC (permalink / raw)
  To: 46721

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

I've accidentally called `emacs-lisp-byte-compile-and-load' in buffers
that are not emacs-lisp-mode (due to M-x completion history), this patch
should fix that. There are a number of other interactive functions in
elisp-mode.el, but the two functions patched here I think are obviously
meant to be limited to emacs-lisp-mode.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Interactive-tag-byte-compilation-functions-in-emacs-.patch --]
[-- Type: text/x-patch, Size: 1230 bytes --]

From 871b01a62ea494b0d04fb744d2fc0f69f78ec2cc Mon Sep 17 00:00:00 2001
From: Doug Davis <ddavis@ddavis.io>
Date: Tue, 23 Feb 2021 10:54:01 -0500
Subject: [PATCH] Interactive tag byte compilation functions in emacs-lisp-mode

* lisp/progmodes/elisp-mode.el (emacs-lisp-byte-compile,
emacs-lisp-byte-compile-and-load): add interactive tagging.
---
 lisp/progmodes/elisp-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 397eb269a7..20c7f20d04 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -182,14 +182,14 @@ emacs-lisp-mode-map
 
 (defun emacs-lisp-byte-compile ()
   "Byte compile the file containing the current buffer."
-  (interactive)
+  (interactive nil emacs-lisp-mode)
   (if buffer-file-name
       (byte-compile-file buffer-file-name)
     (error "The buffer must be saved in a file first")))
 
 (defun emacs-lisp-byte-compile-and-load ()
   "Byte-compile the current file (if it has changed), then load compiled code."
-  (interactive)
+  (interactive nil emacs-lisp-mode)
   (or buffer-file-name
       (error "The buffer must be saved in a file first"))
   (require 'bytecomp)
-- 
2.30.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#46721: [PATCH] Interactive tag byte compilation functions in emacs-lisp-mode
  2021-02-23 16:13 bug#46721: [PATCH] Interactive tag byte compilation functions in emacs-lisp-mode Doug Davis
@ 2021-02-24 16:46 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-24 16:46 UTC (permalink / raw)
  To: Doug Davis; +Cc: 46721

Doug Davis <ddavis@ddavis.io> writes:

> I've accidentally called `emacs-lisp-byte-compile-and-load' in buffers
> that are not emacs-lisp-mode (due to M-x completion history), this patch
> should fix that. There are a number of other interactive functions in
> elisp-mode.el, but the two functions patched here I think are obviously
> meant to be limited to emacs-lisp-mode.

Thanks; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-24 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 16:13 bug#46721: [PATCH] Interactive tag byte compilation functions in emacs-lisp-mode Doug Davis
2021-02-24 16:46 ` Lars Ingebrigtsen

unofficial mirror of bug-gnu-emacs@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/emacs-bugs/0 emacs-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 emacs-bugs emacs-bugs/ https://yhetil.org/emacs-bugs \
		bug-gnu-emacs@gnu.org
	public-inbox-index emacs-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.bugs
	nntp://news.gmane.io/gmane.emacs.bugs


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git