
(byte-code "ÂÃ!ƒ
 À‚! ÄÅÁ\"†! ÄÆÁ\"… ÇÃ!†! ÄÈ!‡" [nil t featurep tags load "wtags" "tags" provide "etags"] 6)

(defvar smart-emacs-tags-file nil "\
*Full path name of etags file for GNU Emacs source.")

(defvar smart-c-cpp-include-dirs (quote ("/usr/include/")) "\
*Ordered list of include directories by default searched by C/C++ preprocessor.
Each directory must end with a directory separator.  See also
'smart-c-include-dirs'.")

(defvar smart-c-include-dirs nil "\
*Ordered list of directories to search for C/C++ include files.
Each directory must end with a directory separator.  Directories normally
searched by the C/C++ pre-processor should be set instead in
'smart-c-cpp-include-dirs'.")

(defvar smart-c-use-lib-man nil "\
When non-nil makes 'smart-c' and 'smart-c++' display man pages for recognized lib symbols.
When nil, 'smart-c' and 'smart-c++' look up only symbols defined in an etags
TAGS file.

Create the file ~/.CLIBS-LIST and populate it with the full pathnames (one per
line) of all of the C/C++ libraries whose symbols you want to match against.
Your MANPATH environment variable must include paths for the man pages of
these libraries also.

Your smart-clib-sym executable script must output a 1 if a symbol is from a
C/C++ library listed in ~/.CLIBS-LIST or 0 if not!  Otherwise, don't set this
variable to t.")

(defun smart-c (&optional identifier next) "\
Jumps to the definition of optional C IDENTIFIER or the one at point.
Optional second arg NEXT means jump to next matching C tag.

It assumes that its caller has already checked that the key was pressed in an
appropriate buffer and has moved the cursor to the selected buffer.

If:
 (1) on a '#include' statement, the include file is displayed;
 (2) on a C identifier, the identifier definition is displayed,
     assuming the identifier is found within an 'etags' generated tag file
     in the current directory or any of its ancestor directories.
 (3) if 'smart-c-use-lib-man' is non-nil, the C identifier is
     recognized as a library symbol, and a man page is found for the
     identifier, then the man page is displayed." (interactive) (byte-code "† Ä † Å
!† Æ ÇÈ	#ˆÉÊË�*‡" [identifier tags-file-name buffer-file-name tag smart-c-include-file smart-tags-file smart-c-at-tag-p message "Looking for '%s' in '%s'..." junk (byte-code "ÂÃÄ!…	 Ä ƒ Å‚ Æ	#ˆÇÈ\"‡" [tag next funcall fboundp br-in-browser find-tag find-tag-other-window message "Found definition for '%s'."] 6) ((error (byte-code "?ƒ ÈÉ	
#ˆÊ ‚] ÈË	\"ˆÌÍ!ÆŠqˆÆ‰ˆÎ ˆÏÐÑ\"ÆÆ	%ˆÒÓÔÕ\"Ö\"‰ˆ×Æ!ˆØ!)ˆƒT ÈÙ	\"ˆÚ	!‚\\ ÈÛ	
#ˆÊ *‡" [smart-c-use-lib-man tag tags-file-name buf found buffer-read-only nil hyperb:dir message "'%s' not found in '%s'." beep "Checking if '%s' is a C library function..." get-buffer-create "*junk*" erase-buffer call-process expand-file-name "smart-clib-sym" string= buffer-substring 1 2 "1" set-buffer-modified-p kill-buffer "C lib man page for '%s'." manual-entry "'%s' not found in '%s' or C libs."] 17)))] 7))

(defun smart-c-at-tag-p nil "\
Return C tag name that point is within, else nil." (byte-code "ÄÅÆQŠÇ!ˆÈ	!…. É`ÊË!\"‰ˆÌÍÂÃ#…, ÈÎ!…, Â‰ˆ	)*‡" [identifier-chars identifier nil t "_a-zA-Z0-9" "[_a-zA-Z][" "]*" skip-chars-backward looking-at buffer-substring match-end 0 re-search-backward "/\\*\\|\\*/" "/\\*"] 8))

(defun smart-c-include-file nil "\
If point is on an include file line, tries to display file.
Returns non-nil iff on an include file line, even if file is not found.
Look for include file in 'smart-c-cpp-include-dirs' and in directory list
'smart-c-include-dirs'." (byte-code "`Ì ˆÍ	!ƒ¯ ÎÏÐÑ!ÐÑ!T\"!ÏÐÒ!ÓÒ!\"ÊÊbˆ
ÔUƒ9 Õ\"‚? Ö	!B‰ˆ…a ×@\"Ø!‰ƒY Ê‚[ A‰ˆ‚B ˆƒ¢ Ù!…‘ Ú!ˆÛÜ!ƒ{ Ë‚‘ ÝÞÊß#ƒ‰ àÜ!‚‘ á ˆâã!ˆÊƒ˜ Ê‚Ÿ á ˆâä\"‚© á ˆâå\"ˆ-‚³ bˆÊ)‡" [opoint smart-c-include-regexp incl-type file path dir-list smart-c-include-dirs found smart-c-cpp-include-dirs buffer-file-name nil t beginning-of-line looking-at string-to-char buffer-substring match-beginning 2 3 match-end 60 append file-name-directory expand-file-name file-exists-p file-readable-p find-file-other-window featurep c-mode load "c-mode" nomessage provide beep message "(smart-c-include-file):  c-mode undefined." "(smart-c-include-file):  '%s' unreadable." "(smart-c-include-file):  '%s' not found."] 26))

(defun smart-emacs-lisp-mode-p nil (byte-code "Á=† Â=† Ã=‡" [major-mode emacs-lisp-mode lisp-interaction-mode debugger-mode] 2))

(defun smart-lisp (&optional next) "\
Jumps to the definition of any selected Lisp construct.
If on an Emacs Lisp require, load, or autoload clause and 'find-library'
from load-library package by Hallvard Furuseth (hallvard@ifi.uio.no) has
been loaded, jumps to library source, if possible.

Otherwise, the identifier must be found within an 'etags' generated tag file
in the current directory or any of its ancestor directories in order for its
definition to be located.

Optional NEXT means jump to next matching Lisp tag.  When matching to an Emacs
Lisp tag using 'wtags' (Bob Weiner's personal modifications to 'tags'), there
is no next tag, so display documentation for current tag instead.

This command assumes that its caller has already checked that the key was
pressed in an appropriate buffer and has moved the cursor to the selected
buffer." (interactive) (byte-code "ÈÉ!…= Ê …= Â`ËÌÂÃ#… ÍÎÏÐQ!‰ˆ	bˆ…< ÑÒÓ!ÔÓ!\"‰ˆÕÂÃ\"ˆÉ!ˆÃ*†‰ Ö!× …U Ê …U ØÙ!ƒ„ Ú!‰ˆÈ!ƒn Û!‚� Ü!ƒ| Ý!‚� Þß\"‚ˆ Âàá�*‡" [req opoint nil t tags-file-name default-directory tag next fboundp find-library smart-emacs-lisp-mode-p search-backward "(" looking-at "(\\(require\\|load\\|autoload\\)" "[ 	]+.*['\"]" "\\([^][() 	
`'\"]+\\)" buffer-substring match-beginning 2 match-end pop-to-buffer smart-tags-file smart-lisp-at-tag-p featurep wtags intern describe-function boundp describe-variable error "(smart-lisp): Unbound symbol: %s" (byte-code "ÂÃÄ!…	 Ä ƒ Å‚ Æ	#‡" [tag next funcall fboundp br-in-browser find-tag find-tag-other-window] 6) ((error (byte-code "Å	\"ƒ Â‚# 	‰ˆÆÇÈ!… È ƒ É‚  Ê#‡" [tags-file-name smart-emacs-tags-file nil tag next equal funcall fboundp br-in-browser find-tag find-tag-other-window] 7)))] 22))

(defun smart-lisp-at-tag-p nil "\
Returns Lisp tag name that point is within, else nil.
Returns nil when point is on the first line of a 'def' form past the first 4
characters." (byte-code "ÆÇÈQ`ŠÉ ˆÊË!… 
ÌÍ!Vƒ Ã‚H 
bˆÎ!ˆÊ	!…H Ï`ÌÍ!\"‰ˆ`É ˆÐÑÅ#ƒF Ã‚G 	))+‡" [identifier-chars identifier opoint nil pnt t "-_*:+%$#!<>a-zA-Z0-9" "[-<*a-zA-Z][" "]*" beginning-of-line looking-at "\\(;*[ 	]*\\)?(def" match-end 0 skip-chars-backward buffer-substring search-forward ";"] 12))

(defun smart-lisp-mode-p nil (byte-code "Á=† Â=† Ã=† Ä=† Å=‡" [major-mode lisp-mode emacs-lisp-mode debugger-mode scheme-mode lisp-interaction-mode] 2))

(defun smart-c++ (&optional identifier next) "\
Jumps to the definition of optional C++ IDENTIFIER or the one at point.
Optional second arg NEXT means jump to next matching C++ tag.

It assumes that its caller has already checked that the key was pressed in an
appropriate buffer and has moved the cursor to the selected buffer.

If:
 (1) on a '#include' statement, the include file is displayed;
 (2) on a C++ identifier, the identifier definition is displayed,
     assuming the identifier is found within an 'etags' generated tag file
     in the current directory or any of its ancestor directories.
 (3) if 'smart-c-use-lib-man' is non-nil, the C++ identifier is
     recognized as a library symbol, and a man page is found for the
     identifier, then the man page is displayed." (interactive) (byte-code "† Ä † Å
!† Æ ÇÈ	#ˆÉÊË�*‡" [identifier tags-file-name buffer-file-name tag smart-c-include-file smart-tags-file smart-c++-at-tag-p message "Looking for '%s' in '%s'..." junk (byte-code "ÂÃÄ!…	 Ä ƒ Å‚ Æ	#ˆÇÈ\"‡" [tag next funcall fboundp br-in-browser find-tag find-tag-other-window message "Found definition for '%s'."] 6) ((error (byte-code "?ƒ ÈÉ	
#ˆÊ ‚] ÈË	\"ˆÌÍ!ÆŠqˆÆ‰ˆÎ ˆÏÐÑ\"ÆÆ	%ˆÒÓÔÕ\"Ö\"‰ˆ×Æ!ˆØ!)ˆƒT ÈÙ	\"ˆÚ	!‚\\ ÈÛ	
#ˆÊ *‡" [smart-c-use-lib-man tag tags-file-name buf found buffer-read-only nil hyperb:dir message "'%s' not found in '%s'." beep "Checking if '%s' is a C++ library function..." get-buffer-create "*junk*" erase-buffer call-process expand-file-name "smart-clib-sym" string= buffer-substring 1 2 "1" set-buffer-modified-p kill-buffer "C++ lib man page for '%s'." manual-entry "'%s' not found in '%s' or C++ libs."] 17)))] 7))

(defun smart-c++-oobr (&optional junk) "\
Jumps to the definition of selected C++ construct via OO-Browser support.
Optional JUNK is ignored.  Does nothing if the OO-Browser is not available.

It assumes that its caller has already checked that the key was pressed in an
appropriate buffer and has moved the cursor to the selected buffer.

If key is pressed:
 (1) on a '#include' statement, the include file is displayed;
 (2) within a method declaration, its definition is displayed;
 (3) on a class name, the class definition is shown.

 (2) and (3) require that an OO-Browser Environment has been loaded with
     the {M-x br-env-load RTN} command." (interactive) (c++-to-definition (quote other-win)))

(defun smart-c++-at-tag-p nil "\
Return C++ tag name that point is within, else nil." (byte-code "ÄÅÆÇRŠÈ!ˆÉ	!…/ Ê`ËÌ!\"‰ˆÍÎÂÃ#…- ÉÏ!…- Â‰ˆ	)*‡" [identifier-chars identifier nil t "_:~<>a-zA-Z0-9" "\\([_~:<a-zA-Z][" "]*" "[ 	]*[^]) 	:;.,?~{}][^[( 	:;.,~^!|?{}]?[=*]?\\)[ 	
]*(" skip-chars-backward looking-at buffer-substring match-end 1 re-search-backward "/\\*\\|\\*/" "/\\*"] 8))

(defun smart-tags-file (curr-filename) "\
Return appropriate tags file name for CURR-FILENAME or 'tags-file-name'." (byte-code "	ÃÈÉÊË!!‰\"?… ÌÍÎ\"‰!?…% Ã‰ˆ‚ ˆ
?…= Ï=…= Ë	!ÐÃÑÒ\"\")…D ‰ˆ
†Q †Q ÓÔ!*‡" [path curr-filename tags-file nil major-mode load-path smart-emacs-tags-file tags-file-name string-match ":?/\\'" directory-file-name file-name-directory file-exists-p expand-file-name "TAGS" emacs-lisp-mode delq mapcar (lambda (p) (and p (equal (file-name-as-directory p) path))) call-interactively visit-tags-table] 11))

(defconst smart-c-include-regexp "[ 	/*]*#[ 	]*\\(include\\|import\\)[ 	]+\\([\"<]\\)\\([^\">]+\\)[\">]" "\
Regexp to match to C or Objective-C include file lines.
Include keyword matched is grouping 1.  Type of include, user-specified via
double quote, or system-related starting with '<' is given by grouping 2.
File name is grouping 3.")

(provide (quote hmouse-tag))
