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 8160055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:07:36+00:00 2026-06-06T18:07:36+00:00

I’m new to Emacs and figuring out how to enable shift-click selection. On the

  • 0

I’m new to Emacs and figuring out how to enable shift-click selection. On the EmacsWiki page for CUA Mode, the following code snippet outlines how to do this:

;; shift + click select region
(define-key global-map (kbd "<S-down-mouse-1>") 'ignore) ; turn off font dialog
(define-key global-map (kbd "<S-mouse-1>") 'mouse-set-point)
(put 'mouse-set-point 'CUA 'move)

I don’t understand how the last line enables selection. I’ve looked into the definition of put:

put is a built-in function in `C source code'.

(put SYMBOL PROPNAME VALUE)

Store SYMBOL's PROPNAME property with value VALUE.
It can be retrieved with `(get SYMBOL PROPNAME)'.

and the definition of mouse-set-point:

mouse-set-point is an interactive compiled Lisp function in
`mouse.el'.

It is bound to <S-mouse-1>, <triple-mouse-1>, <double-mouse-1>,
<mouse-1>.

(mouse-set-point EVENT)

Move point to the position clicked on with the mouse.
This should be bound to a mouse click event type.

but none of them give any clues. I can’t find any variable nor function called move, and I’ve also looked into the source code of mouse.el, cua-base.el, cua-gmrk.el and cua-rect.el.

Would someone explain how the last line works, and how I can find more information by myself? Thanks.

  • 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-06-06T18:07:37+00:00Added an answer on June 6, 2026 at 6:07 pm

    I didn’t dig much too deep into CUA mode, but I understand what you are looking for. ‘put’ is a function for property lists of symbols. In this case, the symbol is mouse-set-point, and you are setting the property ‘CUA’ of that symbol to the value ‘move’. To read back a property value of a symbol, you can use the function ‘get’. You can find more documentation with examples in Elisp reference manual on GNU’s webpage.

    I looked for references to the CUA property in cua-*.el, and sure enough, found one in cua-base.el: (I am using Emacs 23.3.1)

        (defun cua--pre-command-handler-1 ()
      ;; Cancel prefix key timeout if user enters another key.
      (when cua--prefix-override-timer
        (if (timerp cua--prefix-override-timer)
        (cancel-timer cua--prefix-override-timer))
        (setq cua--prefix-override-timer nil))
    
      (cond
       ;; Only symbol commands can have necessary properties
       ((not (symbolp this-command))
        nil)
    
       ;; Handle delete-selection property on non-movement commands
       ((not (eq (get this-command 'CUA) 'move))
    

    I think you can figure it out from here on what the property is being used for. Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.