Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1082747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:20:39+00:00 2026-05-16T22:20:39+00:00

I currently bind compile to C-x c. I know I can run compile in

  • 0

I currently bind compile to C-x c. I know I can run compile in comint mode by using C-u C-x c but I’d prefer to just bind it to C-x c directly. I can’t fathom how to do this without copying the whole of the compile function from compile.el, tweaking it and binding that. Is there a better way?

Edit: To clarify my sloppy language, I don’t wish to bind C-x c whilst in comint mode. I wish to cause C-x c to run ‘compile using comint mode. I currently have C-x bound to ‘compile. I can do what I want by typing C-u C-x c but I’d prefer to just be able to type C-x c to do that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:20:40+00:00Added an answer on May 16, 2026 at 10:20 pm

    I think this works…

    (defun c-w-c ()
      (interactive)
      (call-interactively 'compile t (vector 21 (this-command-keys-vector))))
    
    (global-set-key (kbd "C-x c") 'c-w-c)
    

    the ’21’ prepended into the vector is the ctrl-u prefix key, and it seems to fool the compile function into thinking it was called with C-u C-x c.

    Edit:

    It didn’t work, but this does:

    (defun c-w-c ()
      (interactive)
      (setq current-prefix-arg '(4))
      (call-interactively 'compile))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently using the TextBlock below to bind the value of a property named
I am currently trying to figure out how you can bind multiple fields in
I'm currently trying to bind to certain items in a collection in wpf. This
I am currently able to register Jabber User ID from http://localhost:5280/xmpp-http-bind/register/ but i want
Currently I have this.. which works fine <asp:ImageButton ID=ImageButton1 runat=server Width=80 Height=60 ImageUrl='<%# Bind(ImageUrl)
I'm getting this error when I run my app (not at compile time): Could
I am currently using the EntityFramework to bind my ASP.NET MVC project to a
Currently I'm doing something like this in markup <input type=text ONKEYPRESS=InputNumeric(event); id=txtNumber /> But
I noticed that if I try to compile lines of Coffeescript like this: $note.find('a.close').bind
I currently copy the row to an empty datatable and bind that one, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.