Escrevendo Comandos

(defun \<command-name> (\<args>)
  "\<documentation>" (interactive "\<template>")
  \<body>)

Um exemplo:

(defun this-line-to-top-of-window (line)
  "Reposition line point is on to top of window.
With ARG, put point on line ARG."
  (interactive "P")
  (recenter (if (null line)
                0
              (prefix-numeric-value line))))

O comando interactivediz como ler os argumentos interativamente. Digite C-h f interactivepara maiores detalhes.



leon 2008-08-19