unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Doug Davis <ddavis@ddavis.io>
To: 46721@debbugs.gnu.org
Subject: bug#46721: [PATCH] Interactive tag byte compilation functions in emacs-lisp-mode
Date: Tue, 23 Feb 2021 11:13:40 -0500	[thread overview]
Message-ID: <m2ft1mkbij.fsf@cern.ch> (raw)

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


             reply	other threads:[~2021-02-23 16:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 16:13 Doug Davis [this message]
2021-02-24 16:46 ` bug#46721: [PATCH] Interactive tag byte compilation functions in emacs-lisp-mode Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2ft1mkbij.fsf@cern.ch \
    --to=ddavis@ddavis.io \
    --cc=46721@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).