1# Copyright: 2016 Masatake YAMATO 2# License: GPL-2 3CTAGS=$1 4 5echo '# FILE NAME ONLY' 6# extension `m' matches both matlab and objc. 7# matlab wins by the alphabetical order of parser names 8${CTAGS} --quiet --options=NONE -G --print-language input.m 9 10# extension `m' matches only objc because matlab is disabled. 11${CTAGS} --quiet --options=NONE -G --languages=-MatLab --print-language input.m 12 13# extension `m' matches only matlab because objc is disabled. 14${CTAGS} --quiet --options=NONE -G --languages=-ObjectiveC --print-language input.m 15 16# extension `m' matches no parser because the both objc and matlab 17# are disabled. 18${CTAGS} --quiet --options=NONE -G --languages=-ObjectiveC,-MatLab --print-language input.m 19${CTAGS} --quiet --options=NONE -G --languages=-MatLab,-ObjectiveC --print-language input.m 20 21echo '# EMACS MODE: MATLAB' 22# extension `m' matches both matlab and objc. 23# matlab wins by emacs modeline written in the input file. 24${CTAGS} --quiet --options=NONE -G --print-language input-matlab.m 25 26# extension `m' matches only objc. That's all. 27${CTAGS} --quiet --options=NONE -G --languages=-MatLab --print-language input-matlab.m 28 29# extension `m' matches only matlab. That's all. 30${CTAGS} --quiet --options=NONE -G --languages=-ObjectiveC --print-language input-matlab.m 31 32# extension `m' matches no parser because the both objc and matlab 33# are disabled. That's all. ctags has no chance to read the file contents. 34${CTAGS} --quiet --options=NONE -G --languages=-ObjectiveC,-MatLab --print-language input-matlab.m 35${CTAGS} --quiet --options=NONE -G --languages=-MatLab,-ObjectiveC --print-language input-matlab.m 36 37echo '# EMACS MODE: OBJC' 38# extension `m' matches both matlab and objc. 39# objc wins by emacs modeline written in the input file. 40${CTAGS} --quiet --options=NONE -G --print-language input-objc.m 41 42# extension `m' matches only objc. That's all. 43${CTAGS} --quiet --options=NONE -G --languages=-MatLab --print-language input-objc.m 44 45# extension `m' matches only matlab. That's all. 46${CTAGS} --quiet --options=NONE -G --languages=-ObjectiveC --print-language input-objc.m 47 48# extension `m' matches no parser because the both objc and matlab 49# are disabled. That's all. ctags has no chance to read the file contents. 50${CTAGS} --quiet --options=NONE -G --languages=-ObjectiveC,-MatLab --print-language input-objc.m 51${CTAGS} --quiet --options=NONE -G --languages=-MatLab,-ObjectiveC --print-language input-objc.m 52