all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#14546: 24.3.50; semantic/bovine/el.el + return value of `which-function'
  2013-06-03  6:09 bug#14546: 24.3.50; semantic/bovine/el.el + return value of `which-function' Jambunathan K
@ 2002-01-01  0:29 ` Jambunathan K
  0 siblings, 0 replies; 2+ messages in thread
From: Jambunathan K @ 2002-01-01  0:29 UTC (permalink / raw)
  To: 14546-done


If this is problematic for someone, he will report it.  So closing it.






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

* bug#14546: 24.3.50; semantic/bovine/el.el + return value of `which-function'
@ 2013-06-03  6:09 Jambunathan K
  2002-01-01  0:29 ` Jambunathan K
  0 siblings, 1 reply; 2+ messages in thread
From: Jambunathan K @ 2013-06-03  6:09 UTC (permalink / raw)
  To: 14546


I see that when Emacs lisp files are parsed by semantic, the return
value of `which-function' has extra decorations. 

1. Put the below snippet in your .emacs
2. emacs -Q
3. Examine *Messages* buffer. You will see

     {declare-function}
     (find-file)

   The `{}' and `()' are what I call decorations.  

4. Comment  `load-library' line in .emacs. Restart emacs.
5. You will see

     ;; null-device
     ;; find-file


Semantic intelligently identifies the `declare-function' rightly while
Emacs naively identifies a preceding `defvar'.  (Thumbs up for semantic
parsing)

But, please clarify how to interpret the extra decorations (or remove
them if they are spurious).

--8<---------------cut here---------------start------------->8---
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(semantic-mode t)
 '(which-function-mode t))

(load-library "semantic/bovine/el.el")


(find-library "files.el")

(re-search-forward "declare-function")
(forward-char 5)
(message (which-function))

(find-function 'find-file)
(forward-line 1)
(message (which-function))

(view-echo-area-messages)
--8<---------------cut here---------------end--------------->8---




In GNU Emacs 24.3.50.2 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2013-06-03 on debian-6.05
Bzr revision: 112824 rgm@gnu.org-20130602182638-wbn53t13ukjyzxq5
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
Important settings:
  value of $LANG: en_IN
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t






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

end of thread, other threads:[~2013-06-03  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-03  6:09 bug#14546: 24.3.50; semantic/bovine/el.el + return value of `which-function' Jambunathan K
2002-01-01  0:29 ` Jambunathan K

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.