all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Guile's SCM_DEFINE and Semantic mode
@ 2014-11-01 15:13 Bruno Félix Rezende Ribeiro
  2014-11-02 23:30 ` Thien-Thi Nguyen
  0 siblings, 1 reply; 3+ messages in thread
From: Bruno Félix Rezende Ribeiro @ 2014-11-01 15:13 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

Hello users of the greatest editor of all times!

I'm working on a libguile-based project.  All function definitions that
are exported from C code to the Guile interpreter are define like this:
(meta-variables between '<' and '>')

SCM_DEFINE (<c-name>, <scheme-name>,
            <mandatory-args-count>, <optional-args-count>, <rest-bool>,
            <argument-list>,
	    <documentation-string>)
{
 <function-body>
}

At C preprocessing time the 'SCM_DEFINE (...)' function header gets
expanded to:

SCM
<c-name> <c-argument-list>

Unfortunately Semantic doesn't recognize it as a function definition.
How can I make Semantic recognize it as such?

-- 
 ,= ,-_-. =.  Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
((_/)o o(\_)) There is no system but GNU;
 `-'(. .)`-'  GNU Linux-Libre is one of its official kernels;
     \_/      All software must be free as in freedom;


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Guile's SCM_DEFINE and Semantic mode
  2014-11-01 15:13 Guile's SCM_DEFINE and Semantic mode Bruno Félix Rezende Ribeiro
@ 2014-11-02 23:30 ` Thien-Thi Nguyen
  2014-11-03 22:57   ` Bruno Félix Rezende Ribeiro
  0 siblings, 1 reply; 3+ messages in thread
From: Thien-Thi Nguyen @ 2014-11-02 23:30 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

() Bruno Félix Rezende Ribeiro <oitofelix@gnu.org>
() Sat, 01 Nov 2014 13:13:25 -0200

   Unfortunately Semantic doesn't recognize it as a function
   definition.  How can I make Semantic recognize it as such?

Perhaps you can first find out how Semantic handles Emacs C
source, which is full of similar constructs (named ‘DEFUN’)
and then tweak that method for ‘SCM_DEFINE’.
                
-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Guile's SCM_DEFINE and Semantic mode
  2014-11-02 23:30 ` Thien-Thi Nguyen
@ 2014-11-03 22:57   ` Bruno Félix Rezende Ribeiro
  0 siblings, 0 replies; 3+ messages in thread
From: Bruno Félix Rezende Ribeiro @ 2014-11-03 22:57 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

Thien-Thi Nguyen wrote:
> Perhaps you can first find out how Semantic handles Emacs C source,
> which is full of similar constructs (named ‘DEFUN’) and then tweak
> that method for ‘SCM_DEFINE’.

That's an interesting idea; thank you.  However, Ludovic Courtès pointed
out, at GNU Guile users' mailing list, that GNU GLOBAL handles
SCM_DEFINE'd functions.  So, I ended up using ggtags as it seems
Semantic doesn't use GNU GLOBAL database for 'semantic-complete-jump'
and 'semantic-ia-fast-jump', despite its use of it in searches of symbol
references.  I'm still using Semantic for other things, in particular
for mode-line documentation, as ggtags' Eldoc support is not working for
me, and Semantic is able to grab the prototype of SCM_DEFINE'd functions
from the header files.

-- 
 ,= ,-_-. =.  Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
((_/)o o(\_)) There is no system but GNU;
 `-'(. .)`-'  GNU Linux-Libre is one of its official kernels;
     \_/      All software must be free as in freedom;


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-03 22:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-01 15:13 Guile's SCM_DEFINE and Semantic mode Bruno Félix Rezende Ribeiro
2014-11-02 23:30 ` Thien-Thi Nguyen
2014-11-03 22:57   ` Bruno Félix Rezende Ribeiro

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.