|
From: | Emanuel Berg |
Subject: | Re: Help setting nadvice for indent-region |
Date: | Sat, 06 Feb 2016 01:30:25 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Kaushal Modi <kaushal.modi@gmail.com> writes: > So looks like I'll need to advice the whole > interactive? What would be a better solution? Advices are always tricky. Instead I'd do something like this: (defun indent-region-dwim () (interactive) (if mark-active (indent-region (mark) (point)) (indent-region (point-min) (point-max) ))) And then rebind shortcuts, or use this method: (define-key (current-global-map) [remap w3m-quit] #'no-confirm-w3m-quit) -- underground experts united http://user.it.uu.se/~embe8573
[Prev in Thread] | Current Thread | [Next in Thread] |