[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: describe-mode "some-mode": (documentation some-mode)
From: |
lee |
Subject: |
Re: describe-mode "some-mode": (documentation some-mode) |
Date: |
Sat, 30 Aug 2014 13:42:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Emanuel Berg <embe8573@student.uu.se> writes:
> lee <lee@yun.yagibdah.de> writes:
>
>> (defun my-describe-mode () "Display the documentation
>> of MODE." (interactive) (let ((mode (list (intern
>> (read-string "Mode: "))))) (unless (functionp mode)
>> (with-current-buffer (switch-to-buffer-other-window
>> "my-describe-mode") (insert (documentation mode))))))
>>
>> This inserts "Keyboard macro." into the buffer
>> (without the quotes). I'm not too sure about what I'm
>> doing here ...
>
> What are you trying to do?
I was trying to insert the documentation for a mode into a buffer.
Instead of returning the docstring for the mode, (insert (documentation
mode)) inserts "Keybaord macro." into the buffer with the function I
defined to do this.
I'm wondering why apparently (documentation mode) returns "Keyboard
macro." instead of the docstring ...
>> When I use (help-buffer) instead of
>> "my-describe-mode" for a buffer, the (help-buffer)
>> might be read-only?
>
> The help buffers are read-only, yes.
Ah, interesting: because when I tried to insert into the help-buffer,
"Keyboard macro." was inserted in the current buffer instead. That's
why I changed the function to use (switch-to-buffer-other-window
"my-describe-mode") instead.
What's the defined or supposed behaviour of 'insert when the buffer to
insert something into is read-only?
--
GNU Emacs 24.4.50.2 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2014-08-17 on yun.yagibdah.de
- Re: describe-mode "some-mode"?, (continued)
- Re: describe-mode "some-mode"?, lee, 2014/08/30
- Message not available
- Re: describe-mode "some-mode"?, Emanuel Berg, 2014/08/23
- RE: describe-mode "some-mode"?, Drew Adams, 2014/08/23
- Message not available
- Re: describe-mode "some-mode"?, Emanuel Berg, 2014/08/31
- RE: describe-mode "some-mode"?, Drew Adams, 2014/08/31
- Message not available
- Re: describe-mode "some-mode"?, Emanuel Berg, 2014/08/23
Message not available
- Re: describe-mode "some-mode"?, Emanuel Berg, 2014/08/22
- IELM (was: Re: describe-mode "some-mode"?), Emanuel Berg, 2014/08/22
- describe-mode "some-mode": (documentation some-mode) (was: IELM), lee, 2014/08/23
- Message not available
- Re: describe-mode "some-mode": (documentation some-mode) (was: IELM), Emanuel Berg, 2014/08/23
- Re: describe-mode "some-mode": (documentation some-mode),
lee <=
- Re: describe-mode "some-mode": (documentation some-mode), Michael Heerdegen, 2014/08/30
Re: describe-mode "some-mode"?, Rusi, 2014/08/23