• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/emulation/

Lines Matching +defs:old +defs:mark

1 ;;; pc-select.el --- emulate mark, cut, copy and paste from Motif
31 ;; This package emulates the mark, copy, cut and paste look-and-feel of motif
34 ;; home and end keys. They will modify mark-active.
35 ;; You can still get the old behaviour of cursor moving with the
37 ;; This package uses transient-mark-mode and
48 ;; to add the -mark and -nomark functionality of cursor moving.
69 ;; the mark.
76 ;; They will be bound according to the "old" behaviour to S-delete (cut),
142 ;; The same goes for exchange-point-and-mark
144 ("\C-x\C-x" . exchange-point-and-mark-nomark)
145 ([S-right] . forward-char-mark)
147 ([C-S-right] . forward-word-mark)
149 ([S-left] . backward-char-mark)
151 ([C-S-left] . backward-word-mark)
153 ([S-down] . next-line-mark)
156 ([S-end] . end-of-line-mark)
158 ([S-C-end] . end-of-buffer-mark)
160 ([S-M-end] . end-of-buffer-mark)
163 ([S-next] . scroll-up-mark)
166 ([S-up] . previous-line-mark)
169 ([S-home] . beginning-of-line-mark)
171 ([S-C-home] . beginning-of-buffer-mark)
173 ([S-M-home] . beginning-of-buffer-mark)
176 ([M-S-down] . forward-line-mark)
178 ([M-S-up] . backward-line-mark)
181 ([S-prior] . scroll-down-mark)
187 ([S-C-down] . forward-paragraph-mark)
188 ([S-C-up] . backward-paragraph-mark))))
227 '((([M-S-right] . forward-sexp-mark)
229 ([M-S-left] . backward-sexp-mark)
231 (([M-S-right] . forward-word-mark)
233 ([M-S-left] . backward-word-mark)
251 (defvar pc-select-old-M-delete-binding nil
252 "Holds the old mapping of [M-delete] in the `function-key-map'.
264 "Save the region as if killed; but don't kill it; deactivate mark.
268 Deactivating mark is to avoid confusion with `delete-selection-mode'
269 and `transient-mark-mode'."
272 (setq mark-active nil)
275 (defun exchange-point-and-mark-nomark ()
276 "Like `exchange-point-and-mark' but without activating the mark."
278 (exchange-point-and-mark)
279 (setq mark-active nil))
284 (defun ensure-mark()
285 ;; make sure mark is active
287 (or mark-active (set-mark-command nil)))
290 ;;;;; forward and mark
293 (defun forward-char-mark (&optional arg)
294 "Ensure mark is active; move point right ARG characters (left if ARG negative).
297 (ensure-mark)
300 (defun forward-word-mark (&optional arg)
301 "Ensure mark is active; move point right ARG words (backward if ARG is negative).
306 (ensure-mark)
309 (defun forward-line-mark (&optional arg)
310 "Ensure mark is active; move cursor vertically down ARG lines."
312 (ensure-mark)
317 (defun forward-sexp-mark (&optional arg)
318 "Ensure mark is active; move forward across one balanced expression (sexp).
322 (ensure-mark)
325 (defun forward-paragraph-mark (&optional arg)
326 "Ensure mark is active; move forward to end of paragraph.
334 (ensure-mark)
337 (defun next-line-mark (&optional arg)
338 "Ensure mark is active; move cursor vertically down ARG lines.
353 (ensure-mark)
357 (defun end-of-line-mark (&optional arg)
358 "Ensure mark is active; move point to end of current line.
362 (ensure-mark)
366 (defun backward-line-mark (&optional arg)
367 "Ensure mark is active; move cursor vertically up ARG lines."
369 (ensure-mark)
376 (defun scroll-down-mark (&optional arg)
377 "Ensure mark is active; scroll down ARG lines; or near full screen if no ARG.
382 (ensure-mark)
388 (defun end-of-buffer-mark (&optional arg)
389 "Ensure mark is active; move point to the end of the buffer.
396 \(goto-char \(point-max)) is faster and avoids clobbering the mark."
398 (ensure-mark)
413 (if (let ((old-point (point)))
417 (< (point) old-point)))
423 ;;;;; no mark
427 "Deactivate mark; move point right ARG characters \(left if ARG negative).
430 (setq mark-active nil)
434 "Deactivate mark; move point right ARG words \(backward if ARG is negative).
439 (setq mark-active nil)
443 "Deactivate mark; move cursor vertically down ARG lines."
445 (setq mark-active nil)
451 "Deactivate mark; move forward across one balanced expression (sexp).
455 (setq mark-active nil)
459 "Deactivate mark; move forward to end of paragraph.
467 (setq mark-active nil)
471 "Deactivate mark; move cursor vertically down ARG lines.
486 (setq mark-active nil)
491 "Deactivate mark; move point to end of current line.
495 (setq mark-active nil)
500 "Deactivate mark; move cursor vertically up ARG lines."
502 (setq mark-active nil)
510 "Deactivate mark; scroll down ARG lines; or near full screen if no ARG.
515 (setq mark-active nil)
522 "Deactivate mark; move point to the end of the buffer.
529 \(goto-char (point-max)) is faster and avoids clobbering the mark."
531 (setq mark-active nil)
546 (if (let ((old-point (point)))
550 (< (point) old-point)))
557 ;;;;;; backwards and mark
560 (defun backward-char-mark (&optional arg)
561 "Ensure mark is active; move point left ARG characters (right if ARG negative).
564 (ensure-mark)
567 (defun backward-word-mark (&optional arg)
568 "Ensure mark is active; move backward until encountering the end of a word.
571 (ensure-mark)
574 (defun backward-sexp-mark (&optional arg)
575 "Ensure mark is active; move backward across one balanced expression (sexp).
579 (ensure-mark)
582 (defun backward-paragraph-mark (&optional arg)
583 "Ensure mark is active; move backward to start of paragraph.
594 (ensure-mark)
597 (defun previous-line-mark (&optional arg)
598 "Ensure mark is active; move cursor vertically up ARG lines.
611 (ensure-mark)
615 (defun beginning-of-line-mark (&optional arg)
616 "Ensure mark is active; move point to beginning of current line.
620 (ensure-mark)
624 (defun scroll-up-mark (&optional arg)
625 "Ensure mark is active; scroll upward ARG lines; or near full screen if no ARG.
630 (ensure-mark)
636 (defun beginning-of-buffer-mark (&optional arg)
637 "Ensure mark is active; move point to the beginning of the buffer.
644 \(goto-char (p\oint-min)) is faster and avoids clobbering the mark."
646 (ensure-mark)
659 ;;; no mark
663 "Deactivate mark; move point left ARG characters (right if ARG negative).
666 (setq mark-active nil)
670 "Deactivate mark; move backward until encountering the end of a word.
673 (setq mark-active nil)
677 "Deactivate mark; move backward across one balanced expression (sexp).
681 (setq mark-active nil)
685 "Deactivate mark; move backward to start of paragraph.
696 (setq mark-active nil)
700 "Deactivate mark; move cursor vertically up ARG lines.
709 (setq mark-active nil)
714 "Deactivate mark; move point to beginning of current line.
718 (setq mark-active nil)
722 "Deactivate mark; scroll upward ARG lines; or near full screen if no ARG.
727 (setq mark-active nil)
734 "Deactivate mark; move point to the beginning of the buffer.
741 \(goto-char (point-min)) is faster and avoids clobbering the mark."
743 (setq mark-active nil)
786 "Set VAR to NEWVAL; save the old value.
787 The old value is saved on the `pc-select-saved-settings-alist'."
793 "Call the function MODE; save the old value of the variable MODE.
829 "Change mark behavior to emulate Motif, MAC or MS-Windows cut and paste style.
834 which modify the status of the mark.
836 The ordinary arrow keys disable the mark.
837 The shift-arrow keys move, leaving the mark behind.
839 C-LEFT and C-RIGHT move back or forward one word, disabling the mark.
840 S-C-LEFT and S-C-RIGHT move back or forward one word, leaving the mark behind.
842 M-LEFT and M-RIGHT move back or forward one word or sexp, disabling the mark.
843 S-M-LEFT and S-M-RIGHT move back or forward one word or sexp, leaving the mark
848 C-DOWN and C-UP move back or forward a paragraph, disabling the mark.
849 S-C-DOWN and S-C-UP move back or forward a paragraph, leaving the mark behind.
851 HOME moves to beginning of line, disabling the mark.
852 S-HOME moves to beginning of line, leaving the mark behind.
855 END moves to end of line, disabling the mark.
856 S-END moves to end of line, leaving the mark behind.
859 PRIOR or PAGE-UP scrolls and disables the mark.
860 S-PRIOR or S-PAGE-UP scrolls and leaves the mark behind.
909 (setq pc-select-old-M-delete-binding
925 (pc-select-save-and-set-var transient-mark-mode t)
926 (pc-select-save-and-set-var mark-even-if-inactive t)
947 (setq transient-mark-mode t)
948 (setq mark-even-if-inactive t)
962 (pc-select-restore-var transient-mark-mode)
963 (pc-select-restore-var mark-even-if-inactive)
965 (and pc-select-old-M-delete-binding
967 pc-select-old-M-delete-binding))
975 Change mark behavior to emulate Motif, MAC or MS-Windows cut and paste style,