Thanks so much for your help. Your code works. I just have a couple follow up questions:
1. Although your code does copy the line, the behavior is a little different from what I had in emacs version 24.2.1. In 24.2.1, when I hit "M-w", the cursor would bounce to the beginning of the line, then back to its original position while copying. It's just a visual thing, but I like it because it tells me the line was definitely copied. Is there some way to mimic that behavior?
2. This is less relevant, but in the original wiki page from which I copied the code,
http://www.emacswiki.org/emacs/WholeLineOrRegion, there lists another function that kills the current line:
(put 'kill-region 'interactive-form
'(interactive
(if (use-region-p)
(list (region-beginning) (region-end))
(list (line-beginning-position) (line-beginning-position 2)))))
This code works for me in the newest emacs version of 24.3.1. How come this code works and not the "copy whole line" code in my original message?
Thanks.