Opened 12 years ago

Last modified 3 years ago

#15 closed enhancement

Implement Greg's mode recognition — at Version 3

Reported by: Andreas Schnellbacher Owned by: Andreas Schnellbacher
Priority: minor Milestone: Unsorted
Component: Mode config Version: 1.14
Keywords: Cc:

Description (last modified by Andreas Schnellbacher)

Greg Jarvis changed the previous NEPMD mode recognition to add
the following:

o recognize Unix shebang
o fully configurable mode detection
o ...

Unfortunately the provided code has at least one severe bug,
that I'm not able to debug in shortness. That might be the
reason that Greg had problems to get it implemented for some
modes in the past. Moreover, it would lead to a much slower mode
detection as it was before. The method before was also far from
being optimal (e.g. mode files were read at every file load or
settings were written at every load or every load causes the
mode config files being read twice).

OTOH, I would like to have that implemented.

Change History (3)

comment:1 by Andreas Schnellbacher, 12 years ago

Owner: set to Andreas Schnellbacher
Status: newaccepted

comment:2 by Andreas Schnellbacher, 11 years ago

Details about what's not working with Greg's version of MODE.C of his fork:

File: MODE.C, Func: _getModeInfo

For mode = SHELL, pszKeywordDir is set to 'perl' instead
of 'F:\Apps\NEPMD\netlabs\mode'. For mode = CMD, pszKeywordDir is set to
a string of 72x 0xAA = '¬'.

After commenting the block

// extproc check                                        
if ((pmi->pszDefExtProc) &&                             
    (*pmi->pszDefExtProc) &&                            
    (_isExtProcFile( pszFilename, pmi->pszDefExtProc))) 
   iPoints = 5;                                         

out, mode CMD works, but SHELL still doesn't.

Last edited 11 years ago by Andreas Schnellbacher (previous) (diff)

comment:3 by Andreas Schnellbacher, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.