[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sat, 29 Nov 2008 09:32:13 -0700
Thunderbird 126.96.36.199 (Macintosh/20081105)
Joe Casadonte wrote:
;; The primary use for this is to kill (cut) the current line if no
;; region is defined, and kill-region is invoked. It basically saves
;; you the effort of going to the begining of the line, selecting the
;; text up to the end of the line, and killing.
That seems to beg the question: Why isn't there a convenient command and
key binding to mark the current line?
;; Cribbed from mark-whole-buffer:
(defun mark-line ()
"Put point at beginning and mark at end of line.
You probably should not use this function in Lisp programs;
it is usually a mistake for a Lisp function to use any subroutine
that uses or sets the mark."
(let ((inhibit-field-text-motion t))
(push-mark (point-at-eol) nil t)
Keybinding suggestions? Here are the other mark commands:
C-x C-p mark-page
C-x h mark-whole-buffer
Denver, Colorado, USA