all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* delete-indentation should work on regions too
@ 2004-12-27 17:55 Dan Jacobson
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Jacobson @ 2004-12-27 17:55 UTC (permalink / raw)


delete-indentation should work on regions too.  Probably something
like (indent-region (region-beginning) (region-end) -99999)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: delete-indentation should work on regions too
       [not found] <mailman.9175.1104176543.27204.bug-gnu-emacs@gnu.org>
@ 2004-12-28 17:11 ` Kevin Rodgers
  2004-12-29 23:03   ` Dan Jacobson
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Rodgers @ 2004-12-28 17:11 UTC (permalink / raw)


Dan Jacobson wrote:
> delete-indentation should work on regions too.  Probably something
> like (indent-region (region-beginning) (region-end) -99999)

,----[ C-h k M-^ ]
| M-^ runs the command delete-indentation
|    which is an interactive compiled Lisp function in `simple'.
| (delete-indentation &optional ARG)
|
| Join this line to previous and fix up whitespace at join.
| If there is a fill prefix, delete it from the beginning of this line.
| With argument, join this line to following line.
`----

I've always wished that it would interpret a prefix argument to mean
"join this line and ARG preceding lines, or this line and ARG following
lines if ARG is negative".

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: delete-indentation should work on regions too
  2004-12-28 17:11 ` delete-indentation should work on regions too Kevin Rodgers
@ 2004-12-29 23:03   ` Dan Jacobson
  2005-01-03 23:07     ` Kevin Rodgers
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Jacobson @ 2004-12-29 23:03 UTC (permalink / raw)


Oops, as the two commands have different goals, I now mean:
delete-indentation's docstring should mention if one wants to
delete-indentation of a whole block, use indent-region with a negative
argument.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: delete-indentation should work on regions too
  2004-12-29 23:03   ` Dan Jacobson
@ 2005-01-03 23:07     ` Kevin Rodgers
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2005-01-03 23:07 UTC (permalink / raw)


Dan Jacobson wrote:
 > Oops, as the two commands have different goals, I now mean:
 > delete-indentation's docstring should mention if one wants to
 > delete-indentation of a whole block, use indent-region with a negative
 > argument.

Or perhaps it could do that for you automatically:

   (if (and mark-active transient-mark-mode)
       ;; C-h v most-negative-fixnum
       (indent-region (region-beginning) (region-end) (- -1 (lsh -1 -1)))
     (progn
       ;; normal body here
       ))

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-03 23:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.9175.1104176543.27204.bug-gnu-emacs@gnu.org>
2004-12-28 17:11 ` delete-indentation should work on regions too Kevin Rodgers
2004-12-29 23:03   ` Dan Jacobson
2005-01-03 23:07     ` Kevin Rodgers
2004-12-27 17:55 Dan Jacobson

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.