Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!tektronix!uunet!munnari!vuwcomp!mark
From: mark@comp.vuw.ac.nz (Mark Davies)
Newsgroups: comp.emacs
Subject: Re: assorted questions
Message-ID: <14227@comp.vuw.ac.nz>
Date: 24 Sep 88 23:23:30 GMT
References:  <38598@yale-celray.yale.UUCP> <12205@steinmetz.ge.com>
Reply-To: mark@comp.vuw.ac.nz (Mark Davies)
Organization: Comp Sci. Dept., Victoria Univ., Wellington NZ.
Lines: 58

In article <38598@yale-celray.yale.UUCP> spolsky@yale.edu (Joel Spolsky) writes
>
>While we're on the subject, when I first started using emacs, I thought
>I would get used to ^K not deleting the newlines. Needless to say I
>still haven't gotten use to this: I generally delete paragraphs and
>other such regions by hitting ^K a few times (which is more
>instinctive, I think, than blocking it off), and the "stutter" effect
>is aggravating. Especially since this means that M-5 C-k does not mean
>the same thing as C-k C-k C-k C-k C-k ... 
>
>Any suggestions for fixes?

When we first switched to GNU from Gosling emacs I missed the
kill-lines-magic variable which if set caused a C-k at the beginning of a
line to kill the whole line (including newline) but used anywhere else to
behave traditionally, so I added it to GNU emacs.  We have been using this
successfully for the last 3 years.

Here are the diffs to add this to version 18.51

*** simple.el.orig	Tue May 24 02:49:48 1988
--- simple.el	Tue May 24 11:57:52 1988
***************
*** 1,5 ****
--- 1,6 ----
  ;; Basic editing commands for Emacs
  ;; Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc.
+ ;;  added variable kill-lines-magic    mark at vuw90x   17/12/85
  
  ;; This file is part of GNU Emacs.
  
***************
*** 491,496 ****
--- 492,502 ----
    (forward-line (- arg))
    (skip-chars-forward " \t"))
  
+ ; mwd vuw Dec 1985
+ (defconst kill-lines-magic nil
+   "*if non-nil a kill-line at the beginning of a line kills the entire line,
+ including the newline at the end")
+ 
  (defun kill-line (&optional arg)
    "Kill the rest of the current line; if no nonblanks there, kill thru newline.
  With prefix argument, kill that many lines from point.
***************
*** 499,504 ****
--- 505,512 ----
  When calling from a program, nil means \"no arg\",
  a number counts as a prefix arg."
    (interactive "*P")
+   (if (and kill-lines-magic (bolp) (not arg))    ; mwd vuw   dec 1985
+       (setq arg 1))
    (kill-region (point)
  	       (progn
  		 (if arg
-- 
Domainised:  mark@comp.vuw.ac.nz	Bang form: ...!uunet!vuwcomp!mark