help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: indent-according-to-mode


From: Kevin Rodgers
Subject: Re: indent-according-to-mode
Date: Tue, 01 Aug 2006 09:32:09 -0600
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)

wenbinye@gmail.com wrote:
You can do like this:
C-x ( M-h C-M-\ C-x )
C-x C-k b my-indent-paragraph
M-x insert-kbd-macro

The code will insert to current buffer:
(fset 'my-indent-paragraph
   (lambda (&optional arg) "Keyboard macro." (interactive "p")
(kmacro-exec-ring-item (quote ("\350\234" 0 "%d")) arg)))

Then you can write this to .emacs:
(defun my-indent-paragraph (&optional arg)
  "Keyboard macro."
  (interactive "p")
  (kmacro-exec-ring-item (quote ("\350\234" 0 "%d")) arg)))
(global-set-key (kbd "<f5>") 'my-indent-region)

or just:
(global-set-key (kbd "<f5>")
   (lambda (&optional arg) "Keyboard macro." (interactive "p")
(kmacro-exec-ring-item (quote ("\350\234" 0 "%d")) arg)))

What is all that "\350\234" cruft?

--
Kevin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]