@ref-see-also See also in %s.
@{{{}}}
@{{{  tags-mac-reference-file
@if-using ( complete )
@{{{  @tags-mac-ref Description
@if-using ( complete )
This is a libary file, supporting the standard (vi-known) tags file for
moving to other positions and tag-completion!

This package can only be  used,  if  Origami  is  compiled  to  support
regular expressions.

@{{{  @tags-mac conditional compilation
If this package is included more than once, all needed tags have to  be
defined at the first include! The following tags can be set:

@ref-start-tbl Tag 16 Function 50
E-G-T-ABUFF   @@ enter-and-go-tags-adjacent-buffer
E-G-T-BUFF    @@ enter-and-go-tags-buffer
E-O-T-ABUFF   @@ enter-and-open-tags-adjacent-buffer
E-O-T-BUFF    @@ enter-and-open-tags-buffer
F-G-T-ABUFF   @@ find-and-go-tags-adjacent-buffer
F-G-T-BUFF    @@ find-and-go-tags-buffer
F-O-T-ABUFF   @@ find-and-open-tags-adjacent-buffer
F-O-T-BUFF    @@ find-and-open-tags-buffer
FE-G-T-ABUFF  @@ find-or-enter-and-go-tags-adjacent-buffer
FE-G-T-BUFF   @@ find-or-enter-and-go-tags-buffer
FE-O-T-ABUFF  @@ find-or-enter-and-open-tags-adjacent-buffer
FE-O-T-BUFF   @@ find-or-enter-and-open-tags-buffer
GO-TAG-MARK   @@ go-tag-mark
I-T-FILE      @@ insert-tags-file
O-T-AFILE     @@ open-adjacent-buffer-tags-file
O-T-FILE      @@ open-buffer-tags-file
Q-U-G-T-BUFF  @@ quit-unchanged-to-other-buffer
S-N-I-T       @@ search-next-incorrect-tag-entry
S-U-T-FILE    @@ set-user-tag
T-COMP        @@ tag-completion
@ref-end-tbl

If your filesystems uses special names for  absolut  filenames,  define
the tag ROOT-TEST and a function,  returning true, if the word starting
at current cursor position is an absolute filename.
@}}}
@{{{  @tags-mac error/message return
The OCL-variable tags-error contains the error/message coding  for  the
tags actions:

@ref-start-tbl Value 5 Error/Message 50
0 @@ ok
1 @@ tagged file edited more than once
2 @@ no tag iven
3 @@ cannot open tags-file
4 @@ no valid tag in tags-file
5 @@ cannot open tagged file
6 @@ tag notfound in tagged file
7 @@ File edted only once
8 @@ Currentbuffer is changed
9 @@ position not found in other buffer (folds entered)
10 @@ position not found in other buffer
11 @@ using yur tags file first
12 @@ using dfault tags files
13 @@ Sorry, o regular expressions!
* @@ unspecified error
@ref-end-tbl
@}}}
@fi
@}}}
@fi
@if-using ( complete file-reference )
@{{{  @tags-mac-ref Tags file
@if-using ( complete file-reference )
If you want to use the tags facilities, Origami needs to read a special
tags file. The functions try to use the first of the following files:
@ref-start-tbl File 48
directory-of-file/tags or file/tags (*)
tags
~/tags
~/.oritags
@ref-end-tbl
@ref-start-item *
depending on the type of the current file.
@ref-end-item

During the editor session, you can specify  another  tags  file,  using
function set-user-tags-file.

Entries in the tags file are normal tags entries:
@{{{  @tags-mac tag filename search-exp
@ref-start-tbl Item 10 Meaning 48
tag @@ name of a tag, a string
filename @@ a string
search-exp @@ /^text$/
@@ ?^text$?
@@ /^text/
@@ ?^text?
@@ /text$/
@@ ?text$?
@@ /text/
@@ ?text?
@ref-end-tbl

These entries might be produced by ctags!
@}}}
@{{{  @tags-mac tag filename line-number
@ref-start-tbl Item 10 Meaning 48
tag @@ name of a tag, a string
filename @@ a string
line-number @@ a sequence of digits 0..9
@ref-end-tbl

These entries might be produced by ctags!
@}}}
@{{{  @tags-mac tag file Bexpression
@ref-start-tbl Item 10 Meaning 48
tag @@ name of a tag, a string
filename @@ a string
expression @@ a basic-regular search expression
@ref-end-tbl

These entries are an extension to the standard tags syntax!
@}}}
@{{{  @tags-mac tag file Eexpression
@ref-start-tbl Item 10 Meaning 48
tag @@ name of a tag, a string
filename @@ a string
expression @@ a extended-regular search expression
@ref-end-tbl

These entries are an extension to the standard tag syntax!
@}}}
@{{{  @tags-mac string
`tag-completion' reads only the first word on the lines. So a line
containing a simple string can be used to add keywords for tag-completion!
Such short entries cannot be used for jumping to a tagged position!
@}}}
@fi
@}}}
@fi
@if-using ( complete find-open-ref find-aopen-ref enter-open-ref enter-aopen-ref find-go-ref find-ago-ref enter-go-ref enter-ago-ref fe-open-ref fe-aopen-ref fe-go-ref fe-ago-ref go-tag-mark-ref )
@{{{  @tags-mac-ref Tags
@if-using ( complete find-open-ref find-aopen-ref enter-open-ref enter-aopen-ref find-go-ref find-ago-ref enter-go-ref enter-ago-ref fe-open-ref fe-aopen-ref fe-go-ref fe-ago-ref go-tag-mark-ref )
Tags are defined using two character sets:

@ref-start-item c-tags-x-word-set / c-tags-word-set
tag names are buildt using only these characters,
c-tags-x-word-set is only used, if language None is active.
@ref-end-item

@ref-start-item c-tags-start-word-set:
first character has to be in this set
@ref-end-item

Default values are:

@ref-start-picture
( defset c-tags-start-word-set ( alpha ) )
( defset c-tags-word-set ( alpha digit "_ ) )
( defset c-tags-x-word-set ( c-tags-word-set "- ) )
@ref-end-picture

Changing these sets at runtime, changes  the  tag-search  algorythm!
c-tags-start-word-set has to be a subset of c-tags-word-set!
@fi
@}}}
@fi
@if-using ( complete quit-unchanged-ref find-go-ref find-ago-ref enter-go-ref enter-ago-ref fe-go-ref fe-ago-ref go-tag-mark-ref find-open-ref find-aopen-ref enter-open-ref enter-aopen-ref find-go-ref find-ago-ref enter-go-ref enter-ago-ref fe-open-ref fe-aopen-ref fe-go-ref fe-ago-ref go-tag-mark-ref set-tf-ref in-tf-ref o-tf-ref ao-tf-ref tag-completion )
@{{{  @tags-mac-ref Functions and macros
@if-using ( complete quit-unchanged-ref find-go-ref find-ago-ref enter-go-ref enter-ago-ref fe-go-ref fe-ago-ref go-tag-mark-ref )
@{{{  @tags-mac-ref quit-unchanged-to-other-buffer
If the current buffer contains a  unchanged  file,  also  edited  in
other buffer[s], the  macro  tries to reach the same position in the
other  buffer.  Searching with a regular expression for the  current
line does not exit entered folds!
@}}}
@fi
@if-using ( complete find-open-ref find-aopen-ref enter-open-ref enter-aopen-ref find-go-ref find-ago-ref enter-go-ref enter-ago-ref fe-open-ref fe-aopen-ref fe-go-ref fe-ago-ref go-tag-mark-ref )
@if-using ( complete go-tag-mark-ref )
@{{{  @tags-mac-ref go-tag-mark
This is the function, used by all enter/find tags commands. It  uses
three boolean arguments:

@ref-start-item adjacent
open buffer adjacent
@ref-end-item
@ref-start-item unique
switch to existing buffer, if possible
@ref-end-item
@ref-start-item extend
is tags given as prefix
@ref-end-item

It uses the last value in search-history.

@{{{  @tags-mac-ref Tags
@}}}
@{{{  @tags-mac-ref quit-unchanged-to-other-buffer
@}}}
@}}}
@fi
@if-using ( complete find-open-ref find-aopen-ref enter-open-ref enter-aopen-ref )
@{{{  @tags-mac-ref open tags buffer
@if-using ( find-open-ref )
@{{{  @tags-mac-ref find-and-open-tags-buffer
Open a new buffer, using the word under the cursor as tag.

@{{{  @tags-mac-ref Tags
@}}}
@}}}
@fi
@if-using ( find-aopen-ref )
@{{{  @tags-mac-ref find-and-open-tags-adjacent-buffer
Open a new adjacent buffer, using the word under the cursor as tag.

@{{{  @tags-mac-ref Tags
@}}}
@}}}
@fi
@if-using ( enter-open-ref )
@{{{  @tags-mac-ref enter-and-open-tags-buffer
Open  a  new  buffer  for  a  tag,  the  macros  prompt  for.  Using
filename-completion will end the input and searches the  first  tag,
beginning with the given string!

@{{{  @tags-mac-ref Tags
@}}}

enter-and-open-tags-buffer calls the  hooks  begin-prompt-macro  and
end-prompt-macro, so they have to be defined here, if you need them!
@}}}
@fi
@if-using ( enter-aopen-ref )
@{{{  @tags-mac-ref enter-and-open-tags-adjacent-buffer
Open a new adjacent buffer for a tag, the macros prompt  for.  Using
filename-completion will end the input and  searches  the first tag,
beginning with the given string!

@{{{  @tags-mac-ref Tags
@}}}

enter-and-open-tags-adjacent     buffer     calls     the      hooks
begin-prompt-macro and end-prompt-macro, so they have to be  defined
here, if you need them!
@}}}
@fi
@}}}
@fi
@if-using ( complete find-go-ref find-ago-ref enter-go-ref enter-ago-ref )
@{{{  @tags-mac-ref go tags buffer
@if-using ( find-go-ref )
@{{{  @tags-mac-ref find-and-go-tags-buffer
Open a new buffer, using the word under the  cursor  as  tag.  Tries
quit-unchanged-to-other-buffer-ref to reduce the number of buffers.

@{{{  @tags-mac-ref Tags
@}}}
@{{{  @tags-mac-ref quit-unchanged-to-other-buffer
@}}}
@}}}
@fi
@if-using ( find-ago-ref )
@{{{  @tags-mac-ref find-and-go-tags-adjacent-buffer
Open a new adjacent buffer, using the word under the cursor as  tag.
Tries quit-unchanged-to-other-buffer-ref to  reduce  the  number  of
buffers.

@{{{  @tags-mac-ref Tags
@}}}
@{{{  @tags-mac-ref quit-unchanged-to-other-buffer
@}}}
@}}}
@fi
@if-using ( enter-go-ref )
@{{{  @tags-mac-ref enter-and-go-tags-buffer
Open  a  new  buffer  for  a  tag,  the  macros  prompt  for.  Using
filename-completion will end the input and searches the  first  tag,
beginning with the given string!

Tries quit-unchanged-to-other-buffer-ref to  reduce  the  number  of
buffers.

@{{{  @tags-mac-ref Tags
@}}}
@{{{  @tags-mac-ref quit-unchanged-to-other-buffer
@}}}

enter-and-go-tags-buffer  calls  the  hooks  begin-prompt-macro  and
end-prompt-macro, so they have to be defined here, if you need them!
@}}}
@fi
@if-using ( enter-ago-ref )
@{{{  @tags-mac-ref enter-and-go-tags-adjacent-buffer
Open  a  new  buffer  for  a  tag,  the  macros  prompt  for.  Using
filename-completion will end the input and searches the  first  tag,
beginning with the given string!

Tries quit-unchanged-to-other-buffer-ref to reduce the number  of
buffers.

@{{{  @tags-mac-ref Tags
@}}}
@{{{  @tags-mac-ref quit-unchanged-to-other-buffer
@}}}

enter-and-go-tags-adjacent-buffer calls the hooks begin-prompt-macro
and end-prompt-macro, so they have to be defined here, if  you  need
them!
@}}}
@fi
@}}}
@fi
@if-using ( complete fe-open-ref fe-aopen-ref fe-go-ref fe-ago-ref)
@{{{  @tags-mac-ref find or enter tags buffer
@if-using ( fe-open-ref )
@{{{  @tags-mac-ref find-or-enter-and-open-tags-buffer
Open a new buffer for a tag, using the word  under  the  cursor.  If
failling, the macros prompts for  a  tag.  Using filename-completion
will end the input  and  searches  the first tag, beginning with the
given string!

@{{{  @tags-mac-ref Tags
@}}}

find-or-enter-and-open-tags-buffer     calls        the        hooks
begin-prompt-macro and end-prompt-macro, so  they have to be defined
here, if you need them!
@}}}
@fi
@if-using ( fe-aopen-ref )
@{{{  @tags-mac-ref find-or-enter-and-open-tags-adjacent-buffer
Open a new adjacent buffer for a  tag,  using  the  word  under  the
cursor.  If  failling,   the   macros   prompts  for  a  tag.  Using
filename-completion  will end the input and searches the first  tag,
beginning with the given string!

@{{{  @tags-mac-ref Tags
@}}}

find-or-enter-and-open-tags-adjacent-buffer   calls    the     hooks
begin-prompt-macro and end-prompt-macro, so they  have to be defined
here, if you need them!
@}}}
@fi
@if-using ( fe-go-ref )
@{{{  @tags-mac-ref find-or-enter-and-go-tags-buffer
Open a new buffer for a tag, using the word  under  the  cursor.  If
failling, the macros prompts for  a  tag.  Using filename-completion
will end the input  and  searches  the first tag, beginning with the
given string!

Tries quit-unchanged-to-other-buffer-ref to  reduce  the  number  of
buffers.

@{{{  @tags-mac-ref Tags
@}}}
@{{{  @tags-mac-ref quit-unchanged-to-other-buffer
@}}}

find-or-enter-and-go-tags-buffer calls the hooks  begin-prompt-macro
and end-prompt-macro, so they have to  be  defined here, if you need
them!
@}}}
@fi
@if-using ( fe-ago-ref )
@{{{  @tags-mac-ref find-or-enter-and-go-tags-adjacent-buffer
Open a new adjacent buffer for a  tag,  using  the  word  under  the
cursor.  If  failling,   the   macros   prompts  for  a  tag.  Using
filename-completion  will end the input and searches the first  tag,
beginning with the given string!

Tries quit-unchanged-to-other-buffer-ref to  reduce  the  number  of
buffers.

@{{{  @tags-mac-ref Tags
@}}}
@{{{  @tags-mac-ref quit-unchanged-to-other-buffer
@}}}

find-or-enter-and-go-tags-adjacent-buffer    calls     the     hooks
begin-prompt-macro and end-prompt-macro,  so they have to be defined
here, if you need them!
@}}}
@fi
@}}}
@fi
@fi
@if-using ( complete set-tf-ref in-tf-ref o-tf-ref ao-tf-ref )
@if-using ( complete set-tf-ref in-tf-ref o-tf-ref ao-tf-ref )
@{{{  @tags-mac-ref handling tags file
@if-using ( set-tf-ref )
@{{{  @tags-mac-ref set-user-tag
Don't use the default  tags-file,  but  define  your  own.  You  can
control the  first  tags file by other funtions, setting the history
tags-file to the correct filename. This history will be used, if OCL
variable tags-user-tags-file is not set to false=0!
@}}}
@fi
@if-using ( in-tf-ref )
@{{{  @tags-mac-ref insert-tags-file
Like insert-file, but does not prompt for a filename.
@}}}
@fi
@if-using ( o-tf-ref )
@{{{  @tags-mac-ref open-buffer-tags-file
Like open-buffer, but does not prompt for a  filename.  If  no  tags
file can be reached, the command will be ignored.
@}}}
@fi
@if-using ( ao-tf-ref )
@{{{  @tags-mac-ref open-adjacent-buffer-tags-file
Like open-adjacent-buffer, but does not prompt for a filename. If no
tags file can be reached, the command will be ignored.
@}}}
@fi
@}}}
@fi
@fi
@if-using ( complete tag-completion )
@{{{  @tags-mac-ref tag-completion
Similar to origamis filename-completion. This function looks only at
the tag names. You may add your own symbols  for  completion.  These
entries may be lines containing only the completion string!

This function can not be used inside prompts!
@}}}
@fi
@}}}
@fi
@if-using ( complete )
@{{{  @tags-mac-ref Hooks
@if-using ( complete )
The libary defines a macro `abort-hook-add' and a OCL tag
ABORT-HOOK-ADD. This macro should be added to your abort-macro! If
needed, an existing macro `abort-hook-add' will be integrated!

The function `set-user-tags-file' can be simulated, by changing the
value of history `tags-file' and setting variable `tags-user-tags-file'
to non-zero. If `tags-user-tags-file' is zero, the default list is
used.
@fi
@}}}
@fi
@}}}
