* Newbie to Emacs-Lisp: Using the fill-paragraph function
@ 2007-04-24 21:20 Taylor Jones
2007-04-24 21:28 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Taylor Jones @ 2007-04-24 21:20 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 823 bytes --]
I'm trying to write a function that inserts C function headers for me with a
little interactive prompting. This is a snippet of what I'm trying to do:
(if (> (length return) 0)
(progn
(insert " *\n")
(insert " * @return ")
(insert return)
(insert "\n")
(fill-paragraph))
)
As you can see, after I insert the " * @return <description of return
value>" I want to use the fill-paragraph function, just as I would do if I
were manually typing the line and using the M-q keybinding. When the
fill-parargraph function runs, I get an error message "wrong number of
arguments" and a bunch of gibberish. I've tried a bunch of different
combinations of things and checked the C-h f help page for the
fill-paragraph function, but I'm still stuck.
Any help would be greatly appreciated!
Taylor
[-- Attachment #1.2: Type: text/html, Size: 1090 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Newbie to Emacs-Lisp: Using the fill-paragraph function
2007-04-24 21:20 Newbie to Emacs-Lisp: Using the fill-paragraph function Taylor Jones
@ 2007-04-24 21:28 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2007-04-24 21:28 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Tue, 24 Apr 2007 14:20:36 -0700
> From: "Taylor Jones" <taylor.jones@gmail.com>
>
> (if (> (length return) 0)
> (progn
> (insert " *\n")
> (insert " * @return ")
> (insert return)
> (insert "\n")
> (fill-paragraph))
> )
>
> As you can see, after I insert the " * @return <description of return
> value>" I want to use the fill-paragraph function, just as I would do if I
> were manually typing the line and using the M-q keybinding. When the
> fill-parargraph function runs, I get an error message "wrong number of
> arguments" and a bunch of gibberish.
Did you see in "C-h f" that fill-parargraph requires an argument? You
need to supply it, otherwise Emacs will rightfully complain.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-24 21:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-24 21:20 Newbie to Emacs-Lisp: Using the fill-paragraph function Taylor Jones
2007-04-24 21:28 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).