emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/callint.c,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/src/callint.c,v
Date: Wed, 02 Apr 2008 20:14:40 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/04/02 20:14:40

Index: callint.c
===================================================================
RCS file: /sources/emacs/emacs/src/callint.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -b -r1.164 -r1.165
--- callint.c   29 Mar 2008 22:58:17 -0000      1.164
+++ callint.c   2 Apr 2008 20:14:40 -0000       1.165
@@ -51,6 +51,8 @@
    even if mark_active is 0.  */
 Lisp_Object Vmark_even_if_inactive;
 
+Lisp_Object Vshift_select_mode, Qhandle_shift_selection;
+
 Lisp_Object Vmouse_leave_buffer_hook, Qmouse_leave_buffer_hook;
 
 Lisp_Object Qlist, Qlet, Qletx, Qsave_excursion, Qprogn, Qif, Qwhen;
@@ -115,14 +117,16 @@
 X -- Lisp expression read and evaluated.
 z -- Coding system.
 Z -- Coding system, nil if no prefix arg.
-In addition, if the string begins with `*'
- then an error is signaled if the buffer is read-only.
- This happens before reading any arguments.
-If the string begins with `@', then Emacs searches the key sequence
- which invoked the command for its first mouse click (or any other
- event which specifies a window), and selects that window before
- reading any arguments.  You may use both `@' and `*'; they are
- processed in the order that they appear.
+
+In addition, if the string begins with `*', an error is signaled if
+  the buffer is read-only.
+If the string begins with `@', Emacs searches the key sequence which
+ invoked the command for its first mouse click (or any other event
+ which specifies a window).
+If the string begins with `^' and `shift-select-mode' is non-nil,
+ Emacs first calls the function `handle-shift-select'.
+You may use `@', `*', and `^' together.  They are processed in the
+ order that they appear, before reading any arguments.
 usage: (interactive ARGS)  */)
      (args)
      Lisp_Object args;
@@ -447,6 +451,12 @@
            }
          string++;
        }
+      else if (*string == '^')
+       {
+         if (! NILP (Vshift_select_mode))
+           call0 (Qhandle_shift_selection);
+         string++;
+       }
       else break;
     }
 
@@ -905,6 +915,9 @@
   Qplus = intern ("+");
   staticpro (&Qplus);
 
+  Qhandle_shift_selection = intern ("handle-shift-selection");
+  staticpro (&Qhandle_shift_selection);
+
   Qcall_interactively = intern ("call-interactively");
   staticpro (&Qcall_interactively);
 
@@ -962,6 +975,20 @@
 behave as if the mark were still active.  */);
   Vmark_even_if_inactive = Qt;
 
+  DEFVAR_LISP ("shift-select-mode", &Vshift_select_mode,
+              doc: /* When non-nil, shifted motion keys activate the mark 
momentarily.
+
+While the mark is activated in this way, any shift-translated point
+motion key extends the region, and if Transient Mark mode was off, it
+is temporarily turned on.  Furthermore, the mark will be deactivated
+by any subsequent point motion key that was not shift-translated, or
+by any action that normally deactivates the mark in Transient Mark
+mode.
+
+See `this-command-keys-shift-translated' for the meaning of
+shift-translation.  */);
+  Vshift_select_mode = Qt;
+
   DEFVAR_LISP ("mouse-leave-buffer-hook", &Vmouse_leave_buffer_hook,
               doc: /* Hook to run when about to switch windows with a mouse 
command.
 Its purpose is to give temporary modes such as Isearch mode




reply via email to

[Prev in Thread] Current Thread [Next in Thread]