comparison lisp/simple.el @ 83527:c44562301a11

Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-289 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-290 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-291 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-292 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-293 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-567
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 24 May 2006 09:13:31 +0000
parents b6689e223e2f 8b271981e0c5
children 46b1096093f5
comparison
equal deleted inserted replaced
83526:f441150d61fa 83527:c44562301a11
2539 to make one entry in the kill ring. 2539 to make one entry in the kill ring.
2540 2540
2541 In Lisp code, optional third arg YANK-HANDLER, if non-nil, 2541 In Lisp code, optional third arg YANK-HANDLER, if non-nil,
2542 specifies the yank-handler text property to be set on the killed 2542 specifies the yank-handler text property to be set on the killed
2543 text. See `insert-for-yank'." 2543 text. See `insert-for-yank'."
2544 (interactive "r") 2544 ;; Pass point first, then mark, because the order matters
2545 ;; when calling kill-append.
2546 (interactive (list (point) (mark)))
2545 (condition-case nil 2547 (condition-case nil
2546 (let ((string (filter-buffer-substring beg end t))) 2548 (let ((string (filter-buffer-substring beg end t)))
2547 (when string ;STRING is nil if BEG = END 2549 (when string ;STRING is nil if BEG = END
2548 ;; Add that string to the kill ring, one way or another. 2550 ;; Add that string to the kill ring, one way or another.
2549 (if (eq last-command 'kill-region) 2551 (if (eq last-command 'kill-region)
3633 ;; Move to the desired column. 3635 ;; Move to the desired column.
3634 (line-move-to-column column) 3636 (line-move-to-column column)
3635 (setq new (point)) 3637 (setq new (point))
3636 3638
3637 ;; Process intangibility within a line. 3639 ;; Process intangibility within a line.
3638 ;; Move to the chosen destination position from above, 3640 ;; With inhibit-point-motion-hooks bound to nil, a call to
3639 ;; with intangibility processing enabled. 3641 ;; goto-char moves point past intangible text.
3640 3642
3641 ;; Avoid calling point-entered and point-left. 3643 ;; However, inhibit-point-motion-hooks controls both the
3644 ;; intangibility and the point-entered/point-left hooks. The
3645 ;; following hack avoids calling the point-* hooks
3646 ;; unnecessarily. Note that we move *forward* past intangible
3647 ;; text when the initial and final points are the same.
3642 (goto-char new) 3648 (goto-char new)
3643 (let ((inhibit-point-motion-hooks nil)) 3649 (let ((inhibit-point-motion-hooks nil))
3644 (goto-char new) 3650 (goto-char new)
3645 3651
3646 ;; If intangibility moves us to a different (later) place 3652 ;; If intangibility moves us to a different (later) place