Hi,
I've used the following code, from
http://www.emacswiki.org/emacs/WholeLineOrRegion, to copy a whole line:
(put 'kill-ring-save 'interactive-form
'(interactive
(if (use-region-p)
(list (region-beginning) (region-end))
(list (line-beginning-position) (line-beginning-position 2)))))
Basically, it allows the use of "meta-w" to copy the entire line where the cursor is currently located, as long as no text is visually selected. (Transient Mark Mode must be enabled for this to work.) However, after upgrading to emacs version 24.3.1 (from 24.2.1), this fails to work.
When I visit a file for the first time and hit "meta-w", I get the error: “Wrong type argument: integer-or-marker-p, nil”, although it does
successfully copy the line. However, further “meta-w” presses copy from
the current position to the last mark, regardless of whether the region
is highlighted.
Any thoughts on getting the “Meta-w” to work? Thanks.