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

Lines Matching +defs:save +defs:point

41 (defcustom mouse-yank-at-point nil
42 "*If non-nil, mouse yank commands yank at point instead of at click."
59 typically sets point where you click the mouse).
63 or perform the normal Mouse-1 action (typically set point).
90 point at the click position."
298 "Select the window clicked on; don't move point."
627 (defun mouse-set-point (event)
628 "Move point to the position clicked on with the mouse.
634 (posn-set-point (event-end event)))
655 (if (numberp (posn-point posn))
656 (goto-char (posn-point posn)))
663 (set-mark (point))
664 (if (numberp (posn-point end))
665 (goto-char (posn-point end)))
671 (copy-region-as-kill (mark) (point))))
707 Upon exit, point is at the far edge of the newly visible text."
713 (let ((opoint (point)))
718 (set-window-start window (point))
729 (move-overlay overlay start (point)))
731 ;; put point back where it was for the redisplay
741 (let ((ol (make-overlay (point-min) (point-min))))
762 (save-excursion
766 (goto-char (point-max))
783 (let ((w (posn-window pos)) (pt (posn-point pos))
814 from that call. Arg is \(posn-point POS) if POS is a mouse event.
844 (funcall action (posn-point pos)))
853 (save-match-data
875 ;; of intangible text, point jumps in the direction away from START.
883 (setq end (point)))
889 "Track mouse drags by highlighting area between point and cursor.
890 The region will be defined with mark and point, and the overlay
899 (_ (mouse-set-point start-event))
902 (start-point (posn-point start-posn))
916 ;; Use start-point before the intangibility
925 ;; when setting point near the right fringe (but see below).
931 (if (< (point) start-point)
932 (goto-char start-point))
933 (setq start-point (point))
936 (mouse-move-drag-overlay mouse-drag-overlay start-point start-point
940 (let (event end end-point last-end-point)
954 end-point (posn-point end))
955 (if (numberp end-point)
956 (setq last-end-point end-point))
961 (integer-or-marker-p end-point))
962 (mouse-move-drag-overlay mouse-drag-overlay start-point end-point click-count))
970 mouse-drag-overlay start-point))
973 mouse-drag-overlay start-point)))))))))
980 end-point (posn-point end))
982 (integer-or-marker-p end-point))
983 (mouse-move-drag-overlay mouse-drag-overlay start-point end-point click-count))
991 '(mouse-set-point
997 (let* ((stop-point
998 (if (numberp (posn-point (event-end event)))
999 (posn-point (event-end event))
1000 last-end-point))
1004 (if (and stop-point (< stop-point start-point))
1022 (copy-region-as-kill (point) (mark t))))
1033 ;; If a multiple click is not bound to mouse-set-point,
1036 (if do-multi-click (goto-char start-point))
1042 ;; the mouse-set-point for the down-mouse
1047 ;; and point is set again.
1048 (or end-point
1052 (or (not end-point) (= end-point start-point))
1119 If MODE is 0 then set point to (min START END), mark to (max START END).
1120 If MODE is 1 then set point to start of word at (min START END),
1135 (save-excursion
1138 (point))))
1143 (list (save-excursion
1146 (point))
1152 (let ((open (or (eq start (point-min))
1153 (save-excursion
1158 (save-excursion
1163 (point))
1165 (list (save-excursion
1170 (point))
1174 (list (save-excursion
1177 (point))
1178 (save-excursion
1181 (point))))
1183 (list (save-excursion
1186 (point))
1187 (save-excursion
1190 (point))))))
1199 (if (numberp (posn-point posn))
1200 (push-mark (posn-point posn) t t))))
1244 (move-overlay mouse-drag-overlay (point) (mark t)))
1255 (eq (posn-point (event-end event))
1263 (eq (posn-point (event-end event))
1300 ;; We don't use save-excursion because that preserves the mark too.
1301 (let ((point-save (point)))
1303 (progn (mouse-set-point click)
1307 (goto-char point-save))))
1310 "Kill the region between point and the mouse click.
1315 (click-posn (posn-point posn)))
1318 (kill-region (min (point) click-posn)
1319 (max (point) click-posn)))))
1323 Also move point to one end of the text thus inserted (normally the end),
1326 If `mouse-yank-at-point' is non-nil, insert at point
1331 (or mouse-yank-at-point (mouse-set-point click))
1336 (defun mouse-kill-ring-save (click)
1337 "Copy the region between point and the mouse click in the kill ring.
1338 This does not delete the region; it acts like \\[kill-ring-save]."
1342 (kill-ring-save (point) (mark t)))
1345 ;;; This function used to delete the text between point and the mouse
1350 ;;; invocation of mouse-save-then-kill.
1351 (defvar mouse-save-then-kill-posn nil)
1353 (defun mouse-save-then-kill-delete-region (beg end)
1375 (error "Lossage in mouse-save-then-kill-delete-region"))
1387 (defun mouse-save-then-kill (click)
1388 "Save text to point in kill ring; the second time, kill the text.
1389 If the text between point and the mouse is the same as what's
1391 Otherwise, it adds the text to the kill ring, like \\[kill-ring-save],
1401 point-before-scroll)))
1403 (let ((click-posn (posn-point (event-start click)))
1413 (if (not (and (eq last-command 'mouse-save-then-kill)
1415 (car (cdr-safe (cdr-safe mouse-save-then-kill-posn))))))
1423 (abs (- click-posn (point))))
1429 (kill-new (buffer-substring (point) (mark t)) t)
1432 (setq mouse-save-then-kill-posn
1433 (list (car kill-ring) (point) click-posn))
1437 (mouse-save-then-kill-delete-region (mark) (point))
1439 (setq mouse-save-then-kill-posn nil))
1440 (if (and (eq last-command 'mouse-save-then-kill)
1441 mouse-save-then-kill-posn
1442 (eq (car mouse-save-then-kill-posn) (car kill-ring))
1443 (equal (cdr mouse-save-then-kill-posn) (list (point) click-posn)))
1445 ;; mouse-save-then-kill, delete the text from the buffer.
1447 (mouse-save-then-kill-delete-region (point) (mark))
1449 (setq mouse-save-then-kill-posn nil))
1452 (if (or (and (eq last-command 'mouse-save-then-kill)
1453 mouse-save-then-kill-posn)
1461 (new (posn-point posn)))
1467 (if (<= (abs (- new (point))) (abs (- new (mark t))))
1471 (kill-new (buffer-substring (point) (mark t)) t))
1472 ;; Set the mark where point is, then move where clicked.
1476 (exchange-point-and-mark) ;Why??? --Stef
1477 (kill-new (buffer-substring (point) (mark t))))
1480 (setq mouse-save-then-kill-posn
1481 (list (car kill-ring) (point) click-posn)))))))
1487 (global-set-key [M-mouse-3] 'mouse-secondary-save-then-kill)
1491 (let ((ol (make-overlay (point-min) (point-min))))
1506 Use \\[mouse-secondary-save-then-kill] to set the other end
1514 (if (numberp (posn-point posn))
1518 (move-marker mouse-secondary-start (posn-point posn)))))))
1529 (if (numberp (posn-point posn))
1530 (setq beg (posn-point posn)))
1531 (move-overlay mouse-secondary-overlay beg (posn-point end))
1546 (start-point (posn-point start-posn))
1560 (let ((range (mouse-start-end start-point start-point click-count)))
1570 (set-marker mouse-secondary-start start-point)
1572 (let (event end end-point)
1582 end-point (posn-point end))
1586 (integer-or-marker-p end-point))
1587 (let ((range (mouse-start-end start-point end-point
1589 (if (or (/= start-point end-point)
1601 mouse-secondary-overlay start-point))
1604 mouse-secondary-overlay start-point)))))))))
1608 (save-window-excursion
1612 (save-excursion
1623 Move point to the end of the inserted text.
1624 If `mouse-yank-at-point' is non-nil, insert at point
1629 (or mouse-yank-at-point (mouse-set-point click))
1656 (defun mouse-secondary-save-then-kill (click)
1657 "Save text to point in kill ring; the second time, kill the text.
1662 Otherwise, it adds the text to the kill ring, like \\[kill-ring-save],
1672 (click-posn (posn-point (event-start click)))
1683 (if (not (and (eq last-command 'mouse-secondary-save-then-kill)
1685 (car (cdr-safe (cdr-safe mouse-save-then-kill-posn))))))
1706 (setq mouse-save-then-kill-posn
1707 (list (car kill-ring) (point) click-posn)))
1711 (mouse-save-then-kill-delete-region
1714 (setq mouse-save-then-kill-posn nil)
1717 (if (and (eq last-command 'mouse-secondary-save-then-kill)
1718 mouse-save-then-kill-posn
1719 (eq (car mouse-save-then-kill-posn) (car kill-ring))
1720 (equal (cdr mouse-save-then-kill-posn) (list (point) click-posn)))
1722 ;; mouse-secondary-save-then-kill, delete the text from the buffer.
1724 (mouse-save-then-kill-delete-region
1727 (setq mouse-save-then-kill-posn nil)
1744 (if (eq last-command 'mouse-secondary-save-then-kill)
1759 (kill-ring-save start click-posn)
1761 (setq mouse-save-then-kill-posn
1762 (list (car kill-ring) (point) click-posn))))
1917 (save-excursion
1921 (save-excursion
2090 ;;;!! ;; Dynamically put a box around the line indicated by point
2102 ;;;!! ;; (save-excursion
2107 ;;;!! ;; (save-excursion
2122 ;;;!! ;; (save-excursion
2238 ;;;!! "Kill the rectangle between point and the mouse cursor."
2240 ;;;!! (let ((point-save (point)))
2241 ;;;!! (save-excursion
2242 ;;;!! (mouse-set-point event)
2244 ;;;!! (if (> point-save (point))
2245 ;;;!! (kill-rectangle (point) point-save)
2246 ;;;!! (kill-rectangle point-save (point))))))
2249 ;;;!! "Kill the rectangle between point and the mouse cursor."
2251 ;;;!! (let ((point-save (point)))
2252 ;;;!! (save-excursion
2253 ;;;!! (mouse-set-point event)
2255 ;;;!! (if (> point-save (point))
2256 ;;;!! (open-rectangle (point) point-save)
2257 ;;;!! (open-rectangle point-save (point))))))
2269 ;;;!! "Move text from point to cursor position, inserting spaces."
2293 (save-excursion
2298 (save-excursion
2299 (goto-char (posn-point (event-start event)))
2301 (if (and (not (eobp)) (get-text-property (point) 'mouse-face))
2302 (setq end (point) beg (1+ (point))))
2307 (point-max)))
2376 ;; For these, we specify the point height.
2432 (global-set-key [mouse-1] 'mouse-set-point)
2436 (global-set-key [double-mouse-1] 'mouse-set-point)
2437 (global-set-key [triple-mouse-1] 'mouse-set-point)
2440 (global-set-key [left-fringe mouse-1] 'mouse-set-point)
2441 (global-set-key [right-fringe mouse-1] 'mouse-set-point)
2447 (global-set-key [mouse-3] 'mouse-save-then-kill)
2448 (global-set-key [right-fringe mouse-3] 'mouse-save-then-kill)
2449 (global-set-key [left-fringe mouse-3] 'mouse-save-then-kill)