Comment out emacs tags

This commit is contained in:
Anthony Scemama 2020-05-28 17:49:05 +02:00
parent f0cd410d49
commit e5af6c693a
1 changed files with 24 additions and 24 deletions

View File

@ -329,30 +329,30 @@ def run():
file.write(line) file.write(line)
file.close() file.close()
# Create emacs tags # # Create emacs tags
tags = {} # tags = {}
l = list(variables.keys()) # l = list(variables.keys())
for v in l: # for v in l:
line = variables[v].line # line = variables[v].line
if line.filename[0] not in tags: # if line.filename[0] not in tags:
tags[line.filename[0]] = [] # tags[line.filename[0]] = []
tags[line.filename[0]].append( (v,line) ) # tags[line.filename[0]].append( (v,line) )
l = list(subroutines.keys()) # l = list(subroutines.keys())
for v in l: # for v in l:
line = subroutines[v].line # line = subroutines[v].line
if line.filename not in tags: # if line.filename not in tags:
tags[line.filename] = [] # tags[line.filename] = []
tags[line.filename].append( (v,line) ) # tags[line.filename].append( (v,line) )
#
file = open("TAGS","w") # file = open("TAGS","w")
for f in tags: # for f in tags:
tags[f].sort() # tags[f].sort()
text = "" # text = ""
for v, line in tags[f]: # for v, line in tags[f]:
text += "%s\x7f%s\x01%d,0\n"%(line.text.split('!')[0].rstrip(),v,line.i) # text += "%s\x7f%s\x01%d,0\n"%(line.text.split('!')[0].rstrip(),v,line.i)
file.write("\x0c\n%s,%d\n"%(f, len(text))) # file.write("\x0c\n%s,%d\n"%(f, len(text)))
file.write(text) # file.write(text)
file.close() # file.close()
sys.exit(0) sys.exit(0)