emacs-devel
[Top][All Lists]
Advanced

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

Re: eww


From: Nicolas Richard
Subject: Re: eww
Date: Tue, 14 Jan 2014 22:31:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Bastien <address@hidden> writes:

> Nicolas Richard <address@hidden> writes:
>
>> Put this in web.el :
>> ;; some useful comments
>> (define-alternatives web)
>> (setq web-alternatives '(("eww" . eww) ("w3m" . w3m)))
>> ;; End of file.
>>
>> now load it as emacs -Q -l /path/to/web.el
>>
>> and do:
>> C-h v web-alternatives RET
>> C-x b *Help* RET
>> TAB
>>
>> at this point, your echo area should read:
>>   mouse-2, RET: find variable's definition
>> now go ahead and hit RET. echo area now displays:
>>   Unable to find location in file
>> and point is in a buffer visiting web.el, at beginning of buffer.
>
> I cannot reproduce this, with the recipe above, RET jumps to the
> correct location.

Oops, I'm sorry, I made the test with the wrong file and thus gave the
wrong recipe.

Try this as a web.el:
;; some useful comments
(define-alternatives web)
;; End of file.

> See http://bzg.fr/u/emacs-web-alternatives-jump.ogv

Notice that point is moved in front of (setq ...), and not
(define-alternatives ...) although that is where the defcustom happens.
This is because the mechanism searches for the following regexp :
"^([^ ]+\\(?:\\s-\\|
\\|;.*
\\)+['(]?web-alternatives\\_>"

(this happens in find-function-search-for-symbol).

-- 
Nico.




reply via email to

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