unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / 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 related	[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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).