* lib-src/etags.c (get_lispy_tag): New function.
(L_getit, Scheme_functions): Use get_lispy_tag (Bug#5624).
* test/manual/etags/CTAGS.good:
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/Makefile:
* test/manual/etags/el-src/TAGTEST.EL: Update tests.
* test/manual/etags/scm-src/test.scm: New tests for Scheme.
static long readline_internal (linebuffer *, FILE *, char const *);
static bool nocase_tail (const char *);
static void get_tag (char *, char **);
+static void get_lispy_tag (char *);
static void analyze_regex (char *);
static void free_regexps (void);
/* Ok, then skip "(" before name in (defstruct (foo)) */
dbp = skip_spaces (dbp);
}
- get_tag (dbp, NULL);
+ get_lispy_tag (dbp);
}
static void
if (strneq (bp, "(def", 4) || strneq (bp, "(DEF", 4))
{
bp = skip_non_spaces (bp+4);
- /* Skip over open parens and white space. Don't continue past
- '\0'. */
- while (*bp && notinname (*bp))
+ /* Skip over open parens and white space.
+ Don't continue past '\0' or '='. */
+ while (*bp && notinname (*bp) && *bp != '=')
bp++;
- get_tag (bp, NULL);
+ get_lispy_tag (bp);
}
if (LOOKING_AT (bp, "(SET!") || LOOKING_AT (bp, "(set!"))
- get_tag (bp, NULL);
+ get_lispy_tag (bp);
}
}
*namepp = savenstr (bp, cp - bp);
}
+/* Similar to get_tag, but include '=' as part of the tag. */
+static void
+get_lispy_tag (register char *bp)
+{
+ register char *cp = bp;
+
+ if (*bp != '\0')
+ {
+ /* Go till you get to white space or a syntactic break */
+ for (cp = bp + 1; !notinname (*cp) || *cp == '='; cp++)
+ continue;
+ make_tag (bp, cp - bp, true,
+ lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+ }
+}
+
/*
* Read a line of text from `stream' into `lbp', excluding the
* newline or CR-NL, if any. Return the number of characters read from
=\relax tex-src/texinfo.tex /^\\let\\subsubsection=\\relax$/
=\relax tex-src/texinfo.tex /^\\let\\appendix=\\relax$/
=\smartitalic tex-src/texinfo.tex /^\\let\\cite=\\smartitalic$/
+=starts-with-equals! scm-src/test.scm /^(define =starts-with-equals! #t)$/
> tex-src/texinfo.tex /^\\def>{{\\tt \\gtr}}$/
>field1 forth-src/test-forth.fth /^ 9 field >field1$/
>field2 forth-src/test-forth.fth /^ 5 field >field2$/
current-input-mode c-src/emacs/src/keyboard.c /^DEFUN ("current-input-mode", Fcurrent_input_mode, /
current_kboard c-src/emacs/src/keyboard.c 85
current_lb_is_new c-src/etags.c 2926
+curry-test scm-src/test.scm /^(define (((((curry-test a) b) c) d) e)$/
cursor_position cp-src/screen.cpp /^void cursor_position(void)$/
cursor_x cp-src/screen.cpp 15
cursor_y cp-src/screen.cpp 15
foo! ruby-src/test1.ru /^ def foo!$/
foo1 ruby-src/test1.ru /^ attr_reader(:foo1, :bar1, # comment$/
foo2 ruby-src/test1.ru /^ alias_method ( :foo2, #cmmt$/
+foo==bar el-src/TAGTEST.EL /^(defun foo==bar () (message "hi")) ; Bug#5624$/
foobar c-src/c.c /^int foobar() {;}$/
foobar c.c /^extern void foobar (void) __attribute__ ((section /
foobar2 c-src/h.h 20
header c-src/emacs/src/lisp.h 1826
header_size c-src/emacs/src/lisp.h 1471
heapsize c-src/emacs/src/gmalloc.c 361
+hello scm-src/test.scm /^(define hello "Hello, Emacs!")$/
+hello scm-src/test.scm /^(set! hello "Hello, world!")$/
+hello-world scm-src/test.scm /^(define (hello-world)$/
help c-src/etags.c 193
helpPanel objcpp-src/SimpleCalc.M /^- helpPanel:sender$/
help_char_p c-src/emacs/src/keyboard.c /^help_char_p (Lisp_Object c)$/
test go-src/test1.go /^func test(p plus) {$/
test make-src/Makefile /^test:$/
test php-src/ptest.php /^test $/
+test-begin scm-src/test.scm /^(define-syntax test-begin$/
test.me22b lua-src/test.lua /^ local function test.me22b (one)$/
test.me_22a lua-src/test.lua /^ function test.me_22a(one, two)$/
test_undefined c-src/emacs/src/keyboard.c /^test_undefined (Lisp_Object binding)$/
texttreelist prol-src/natded.prolog /^texttreelist([]).$/
+there-is-a-=-in-the-middle! scm-src/test.scm /^(define (there-is-a-=-in-the-middle!) #t)$/
this c-src/a/b/b.c 1
this-command-keys c-src/emacs/src/keyboard.c /^DEFUN ("this-command-keys", Fthis_command_keys, St/
this-command-keys-vector c-src/emacs/src/keyboard.c /^DEFUN ("this-command-keys-vector", Fthis_command_k/
class D \7f41,622
D(\7f43,659
\f
-el-src/TAGTEST.EL,148
+el-src/TAGTEST.EL,179
(foo::defmumble bletch \7f1,0
-(defalias 'pending-delete-mode \7fpending-delete-mode\ 15,102
-(defalias (quote explicitly-quoted-pending-delete-mode)\7f8,175
+(defun foo==bar \7ffoo==bar\ 12,33
+(defalias 'pending-delete-mode \7fpending-delete-mode\ 16,149
+(defalias (quote explicitly-quoted-pending-delete-mode)\7f9,222
\f
el-src/emacs/lisp/progmodes/etags.el,5069
(defvar tags-file-name \7f34,1034
alias_method ( :foo2,\7ffoo2\ 137,586
A::Constant \7fConstant\ 142,655
\f
+scm-src/test.scm,260
+(define hello \7f1,0
+(set! hello \7f3,32
+(define (hello-world)\7f5,62
+(define (there-is-a-=-in-the-middle!)\7fthere-is-a-=-in-the-middle!\ 110,128
+(define =starts-with-equals! \7f=starts-with-equals!\ 112,171
+(define (((((curry-test \7f14,205
+(define-syntax test-begin\7f17,265
+\f
tex-src/testenv.tex,52
\newcommand{\nm}\7f\nm\ 14,77
\section{blah}\7fblah\ 18,139
@node Overview,\7f83,2705
@node Sample,\7f166,7272
@node Invoking gzip,\7fInvoking gzip\ 1210,8828
-@node Advanced usage,\7fAdvanced usage\ 1357,13495
-@node Environment,\7f420,15207
-@node Tapes,\7f437,15768
-@node Problems,\7f460,16767
-@node Concept Index,\7fConcept Index\ 1473,17287
+@node Advanced usage,\7fAdvanced usage\ 1357,13496
+@node Environment,\7f420,15208
+@node Tapes,\7f437,15769
+@node Problems,\7f460,16768
+@node Concept Index,\7fConcept Index\ 1473,17288
\f
tex-src/texinfo.tex,30627
\def\texinfoversion{\7f\texinfoversion\ 126,1032
class D \7f41,622
D(\7f43,659
\f
-el-src/TAGTEST.EL,148
+el-src/TAGTEST.EL,179
(foo::defmumble bletch \7f1,0
-(defalias 'pending-delete-mode \7fpending-delete-mode\ 15,102
-(defalias (quote explicitly-quoted-pending-delete-mode)\7f8,175
+(defun foo==bar \7ffoo==bar\ 12,33
+(defalias 'pending-delete-mode \7fpending-delete-mode\ 16,149
+(defalias (quote explicitly-quoted-pending-delete-mode)\7f9,222
\f
el-src/emacs/lisp/progmodes/etags.el,5188
(defvar tags-file-name \7f34,1034
alias_method ( :foo2,\7ffoo2\ 137,586
A::Constant \7fConstant\ 142,655
\f
+scm-src/test.scm,260
+(define hello \7f1,0
+(set! hello \7f3,32
+(define (hello-world)\7f5,62
+(define (there-is-a-=-in-the-middle!)\7fthere-is-a-=-in-the-middle!\ 110,128
+(define =starts-with-equals! \7f=starts-with-equals!\ 112,171
+(define (((((curry-test \7f14,205
+(define-syntax test-begin\7f17,265
+\f
tex-src/testenv.tex,52
\newcommand{\nm}\7f\nm\ 14,77
\section{blah}\7fblah\ 18,139
@node Overview,\7f83,2705
@node Sample,\7f166,7272
@node Invoking gzip,\7fInvoking gzip\ 1210,8828
-@node Advanced usage,\7fAdvanced usage\ 1357,13495
-@node Environment,\7f420,15207
-@node Tapes,\7f437,15768
-@node Problems,\7f460,16767
-@node Concept Index,\7fConcept Index\ 1473,17287
+@node Advanced usage,\7fAdvanced usage\ 1357,13496
+@node Environment,\7f420,15208
+@node Tapes,\7f437,15769
+@node Problems,\7f460,16768
+@node Concept Index,\7fConcept Index\ 1473,17288
\f
tex-src/texinfo.tex,30627
\def\texinfoversion{\7f\texinfoversion\ 126,1032
D(\7f43,659
int x;\7f44,694
\f
-el-src/TAGTEST.EL,148
+el-src/TAGTEST.EL,179
(foo::defmumble bletch \7f1,0
-(defalias 'pending-delete-mode \7fpending-delete-mode\ 15,102
-(defalias (quote explicitly-quoted-pending-delete-mode)\7f8,175
+(defun foo==bar \7ffoo==bar\ 12,33
+(defalias 'pending-delete-mode \7fpending-delete-mode\ 16,149
+(defalias (quote explicitly-quoted-pending-delete-mode)\7f9,222
\f
el-src/emacs/lisp/progmodes/etags.el,5069
(defvar tags-file-name \7f34,1034
alias_method ( :foo2,\7ffoo2\ 137,586
A::Constant \7fConstant\ 142,655
\f
+scm-src/test.scm,260
+(define hello \7f1,0
+(set! hello \7f3,32
+(define (hello-world)\7f5,62
+(define (there-is-a-=-in-the-middle!)\7fthere-is-a-=-in-the-middle!\ 110,128
+(define =starts-with-equals! \7f=starts-with-equals!\ 112,171
+(define (((((curry-test \7f14,205
+(define-syntax test-begin\7f17,265
+\f
tex-src/testenv.tex,52
\newcommand{\nm}\7f\nm\ 14,77
\section{blah}\7fblah\ 18,139
@node Overview,\7f83,2705
@node Sample,\7f166,7272
@node Invoking gzip,\7fInvoking gzip\ 1210,8828
-@node Advanced usage,\7fAdvanced usage\ 1357,13495
-@node Environment,\7f420,15207
-@node Tapes,\7f437,15768
-@node Problems,\7f460,16767
-@node Concept Index,\7fConcept Index\ 1473,17287
+@node Advanced usage,\7fAdvanced usage\ 1357,13496
+@node Environment,\7f420,15208
+@node Tapes,\7f437,15769
+@node Problems,\7f460,16768
+@node Concept Index,\7fConcept Index\ 1473,17288
\f
tex-src/texinfo.tex,30627
\def\texinfoversion{\7f\texinfoversion\ 126,1032
class D \7f41,622
D(\7f43,659
\f
-el-src/TAGTEST.EL,148
+el-src/TAGTEST.EL,179
(foo::defmumble bletch \7f1,0
-(defalias 'pending-delete-mode \7fpending-delete-mode\ 15,102
-(defalias (quote explicitly-quoted-pending-delete-mode)\7f8,175
+(defun foo==bar \7ffoo==bar\ 12,33
+(defalias 'pending-delete-mode \7fpending-delete-mode\ 16,149
+(defalias (quote explicitly-quoted-pending-delete-mode)\7f9,222
\f
el-src/emacs/lisp/progmodes/etags.el,5069
(defvar tags-file-name \7f34,1034
alias_method ( :foo2,\7ffoo2\ 137,586
A::Constant \7fConstant\ 142,655
\f
+scm-src/test.scm,260
+(define hello \7f1,0
+(set! hello \7f3,32
+(define (hello-world)\7f5,62
+(define (there-is-a-=-in-the-middle!)\7fthere-is-a-=-in-the-middle!\ 110,128
+(define =starts-with-equals! \7f=starts-with-equals!\ 112,171
+(define (((((curry-test \7f14,205
+(define-syntax test-begin\7f17,265
+\f
tex-src/testenv.tex,52
\newcommand{\nm}\7f\nm\ 14,77
\section{blah}\7fblah\ 18,139
@node Overview,\7f83,2705
@node Sample,\7f166,7272
@node Invoking gzip,\7fInvoking gzip\ 1210,8828
-@node Advanced usage,\7fAdvanced usage\ 1357,13495
-@node Environment,\7f420,15207
-@node Tapes,\7f437,15768
-@node Problems,\7f460,16767
-@node Concept Index,\7fConcept Index\ 1473,17287
+@node Advanced usage,\7fAdvanced usage\ 1357,13496
+@node Environment,\7f420,15208
+@node Tapes,\7f437,15769
+@node Problems,\7f460,16768
+@node Concept Index,\7fConcept Index\ 1473,17288
\f
tex-src/texinfo.tex,30627
\def\texinfoversion{\7f\texinfoversion\ 126,1032
D(\7f43,659
int x;\7f44,694
\f
-el-src/TAGTEST.EL,148
+el-src/TAGTEST.EL,179
(foo::defmumble bletch \7f1,0
-(defalias 'pending-delete-mode \7fpending-delete-mode\ 15,102
-(defalias (quote explicitly-quoted-pending-delete-mode)\7f8,175
+(defun foo==bar \7ffoo==bar\ 12,33
+(defalias 'pending-delete-mode \7fpending-delete-mode\ 16,149
+(defalias (quote explicitly-quoted-pending-delete-mode)\7f9,222
\f
el-src/emacs/lisp/progmodes/etags.el,5188
(defvar tags-file-name \7f34,1034
alias_method ( :foo2,\7ffoo2\ 137,586
A::Constant \7fConstant\ 142,655
\f
+scm-src/test.scm,260
+(define hello \7f1,0
+(set! hello \7f3,32
+(define (hello-world)\7f5,62
+(define (there-is-a-=-in-the-middle!)\7fthere-is-a-=-in-the-middle!\ 110,128
+(define =starts-with-equals! \7f=starts-with-equals!\ 112,171
+(define (((((curry-test \7f14,205
+(define-syntax test-begin\7f17,265
+\f
tex-src/testenv.tex,52
\newcommand{\nm}\7f\nm\ 14,77
\section{blah}\7fblah\ 18,139
@node Overview,\7f83,2705
@node Sample,\7f166,7272
@node Invoking gzip,\7fInvoking gzip\ 1210,8828
-@node Advanced usage,\7fAdvanced usage\ 1357,13495
-@node Environment,\7f420,15207
-@node Tapes,\7f437,15768
-@node Problems,\7f460,16767
-@node Concept Index,\7fConcept Index\ 1473,17287
+@node Advanced usage,\7fAdvanced usage\ 1357,13496
+@node Environment,\7f420,15208
+@node Tapes,\7f437,15769
+@node Problems,\7f460,16768
+@node Concept Index,\7fConcept Index\ 1473,17288
\f
tex-src/texinfo.tex,30627
\def\texinfoversion{\7f\texinfoversion\ 126,1032
D(\7fD::D\ 143,659
int x;\7fD::x\ 144,694
\f
-el-src/TAGTEST.EL,148
+el-src/TAGTEST.EL,179
(foo::defmumble bletch \7f1,0
-(defalias 'pending-delete-mode \7fpending-delete-mode\ 15,102
-(defalias (quote explicitly-quoted-pending-delete-mode)\7f8,175
+(defun foo==bar \7ffoo==bar\ 12,33
+(defalias 'pending-delete-mode \7fpending-delete-mode\ 16,149
+(defalias (quote explicitly-quoted-pending-delete-mode)\7f9,222
\f
el-src/emacs/lisp/progmodes/etags.el,5188
(defvar tags-file-name \7f34,1034
alias_method ( :foo2,\7ffoo2\ 137,586
A::Constant \7fConstant\ 142,655
\f
+scm-src/test.scm,260
+(define hello \7f1,0
+(set! hello \7f3,32
+(define (hello-world)\7f5,62
+(define (there-is-a-=-in-the-middle!)\7fthere-is-a-=-in-the-middle!\ 110,128
+(define =starts-with-equals! \7f=starts-with-equals!\ 112,171
+(define (((((curry-test \7f14,205
+(define-syntax test-begin\7f17,265
+\f
tex-src/testenv.tex,52
\newcommand{\nm}\7f\nm\ 14,77
\section{blah}\7fblah\ 18,139
@node Overview,\7f83,2705
@node Sample,\7f166,7272
@node Invoking gzip,\7fInvoking gzip\ 1210,8828
-@node Advanced usage,\7fAdvanced usage\ 1357,13495
-@node Environment,\7f420,15207
-@node Tapes,\7f437,15768
-@node Problems,\7f460,16767
-@node Concept Index,\7fConcept Index\ 1473,17287
+@node Advanced usage,\7fAdvanced usage\ 1357,13496
+@node Environment,\7f420,15208
+@node Tapes,\7f437,15769
+@node Problems,\7f460,16768
+@node Concept Index,\7fConcept Index\ 1473,17288
\f
tex-src/texinfo.tex,30627
\def\texinfoversion{\7f\texinfoversion\ 126,1032
PROLSRC=$(addprefix ./prol-src/,ordsets.prolog natded.prolog)
PYTSRC=$(addprefix ./pyt-src/,server.py)
RBSRC=$(addprefix ./ruby-src/,test.rb test1.ru)
+SCMSRC=$(addprefix ./scm-src/,test.scm)
TEXSRC=$(addprefix ./tex-src/,testenv.tex gzip.texi texinfo.tex nonewline.tex)
YSRC=$(addprefix ./y-src/,parse.y parse.c atest.y cccp.c cccp.y)
SRCS=${ADASRC} ${ASRC} ${CSRC} ${CPSRC} ${ELSRC} ${ERLSRC} ${FSRC}\
${FORTHSRC} ${GOSRC} ${HTMLSRC} ${JAVASRC} ${LUASRC} ${MAKESRC}\
${OBJCSRC} ${OBJCPPSRC} ${PASSRC} ${PHPSRC} ${PERLSRC} ${PSSRC}\
- ${PROLSRC} ${PYTSRC} ${RBSRC} ${TEXSRC} ${YSRC}
+ ${PROLSRC} ${PYTSRC} ${RBSRC} ${SCMSRC} ${TEXSRC} ${YSRC}
NONSRCS=./f-src/entry.strange ./erl-src/lists.erl ./cp-src/clheir.hpp.gz
ETAGS_PROG=../../../lib-src/etags
(foo::defmumble bletch beuarghh)
+(defun foo==bar () (message "hi")) ; Bug#5624
;;; Ctags test file for lisp mode.
;; from emacs/lisp/delsel.el:76:
--- /dev/null
+(define hello "Hello, Emacs!")
+
+(set! hello "Hello, world!")
+
+(define (hello-world)
+ (display hello)
+ (newline))
+
+;; Bug 5624
+(define (there-is-a-=-in-the-middle!) #t)
+
+(define =starts-with-equals! #t)
+
+(define (((((curry-test a) b) c) d) e)
+ (list a b c d e))
+
+(define-syntax test-begin
+ (syntax-rules ()
+ ((test-begin exp ...)
+ ((lambda () exp ...)))))