mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
This commit is contained in:
commit
b242394f24
137 changed files with 4819 additions and 2073 deletions
|
|
@ -340,7 +340,6 @@ typedef struct regexp
|
|||
struct re_pattern_buffer *pat; /* the compiled pattern */
|
||||
struct re_registers regs; /* re registers */
|
||||
bool error_signaled; /* already signaled for this regexp */
|
||||
bool force_explicit_name; /* do not allow implicit tag name */
|
||||
bool ignore_case; /* ignore case when matching */
|
||||
bool multi_line; /* do a multi-line match on the whole file */
|
||||
} regexp;
|
||||
|
|
@ -6910,7 +6909,6 @@ add_regex (char *regexp_pattern, language *lang)
|
|||
struct re_pattern_buffer *patbuf;
|
||||
regexp *rp;
|
||||
bool
|
||||
force_explicit_name = true, /* do not use implicit tag names */
|
||||
ignore_case = false, /* case is significant */
|
||||
multi_line = false, /* matches are done one line at a time */
|
||||
single_line = false; /* dot does not match newline */
|
||||
|
|
@ -6949,7 +6947,8 @@ add_regex (char *regexp_pattern, language *lang)
|
|||
case 'N':
|
||||
if (modifiers == name)
|
||||
error ("forcing explicit tag name but no name, ignoring");
|
||||
force_explicit_name = true;
|
||||
/* This option has no effect and is present only for backward
|
||||
compatibility. */
|
||||
break;
|
||||
case 'i':
|
||||
ignore_case = true;
|
||||
|
|
@ -7004,7 +7003,6 @@ add_regex (char *regexp_pattern, language *lang)
|
|||
p_head->pat = patbuf;
|
||||
p_head->name = savestr (name);
|
||||
p_head->error_signaled = false;
|
||||
p_head->force_explicit_name = force_explicit_name;
|
||||
p_head->ignore_case = ignore_case;
|
||||
p_head->multi_line = multi_line;
|
||||
}
|
||||
|
|
@ -7144,20 +7142,15 @@ regex_tag_multiline (void)
|
|||
name = NULL;
|
||||
else /* make a named tag */
|
||||
name = substitute (buffer, rp->name, &rp->regs);
|
||||
if (rp->force_explicit_name)
|
||||
{
|
||||
/* Force explicit tag name, if a name is there. */
|
||||
pfnote (name, true, buffer + linecharno,
|
||||
charno - linecharno + 1, lineno, linecharno);
|
||||
|
||||
if (debug)
|
||||
fprintf (stderr, "%s on %s:%"PRIdMAX": %s\n",
|
||||
name ? name : "(unnamed)", curfdp->taggedfname,
|
||||
lineno, buffer + linecharno);
|
||||
}
|
||||
else
|
||||
make_tag (name, strlen (name), true, buffer + linecharno,
|
||||
charno - linecharno + 1, lineno, linecharno);
|
||||
/* Force explicit tag name, if a name is there. */
|
||||
pfnote (name, true, buffer + linecharno,
|
||||
charno - linecharno + 1, lineno, linecharno);
|
||||
|
||||
if (debug)
|
||||
fprintf (stderr, "%s on %s:%"PRIdMAX": %s\n",
|
||||
name ? name : "(unnamed)", curfdp->taggedfname,
|
||||
lineno, buffer + linecharno);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -7471,18 +7464,14 @@ readline (linebuffer *lbp, FILE *stream)
|
|||
name = NULL;
|
||||
else /* make a named tag */
|
||||
name = substitute (lbp->buffer, rp->name, &rp->regs);
|
||||
if (rp->force_explicit_name)
|
||||
{
|
||||
/* Force explicit tag name, if a name is there. */
|
||||
pfnote (name, true, lbp->buffer, match, lineno, linecharno);
|
||||
if (debug)
|
||||
fprintf (stderr, "%s on %s:%"PRIdMAX": %s\n",
|
||||
name ? name : "(unnamed)", curfdp->taggedfname,
|
||||
lineno, lbp->buffer);
|
||||
}
|
||||
else
|
||||
make_tag (name, strlen (name), true,
|
||||
lbp->buffer, match, lineno, linecharno);
|
||||
|
||||
/* Force explicit tag name, if a name is there. */
|
||||
pfnote (name, true, lbp->buffer, match, lineno, linecharno);
|
||||
|
||||
if (debug)
|
||||
fprintf (stderr, "%s on %s:%"PRIdMAX": %s\n",
|
||||
name ? name : "(unnamed)", curfdp->taggedfname,
|
||||
lineno, lbp->buffer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -270,6 +270,7 @@ main (int argc, char **argv)
|
|||
You might also wish to verify that your system is one which
|
||||
uses lock files for this purpose. Some systems use other methods. */
|
||||
|
||||
bool lockname_unlinked = false;
|
||||
inname_len = strlen (inname);
|
||||
lockname = xmalloc (inname_len + sizeof ".lock");
|
||||
strcpy (lockname, inname);
|
||||
|
|
@ -312,15 +313,10 @@ main (int argc, char **argv)
|
|||
Five minutes should be good enough to cope with crashes
|
||||
and wedgitude, and long enough to avoid being fooled
|
||||
by time differences between machines. */
|
||||
if (stat (lockname, &st) >= 0)
|
||||
{
|
||||
time_t now = time (0);
|
||||
if (st.st_ctime < now - 300)
|
||||
{
|
||||
unlink (lockname);
|
||||
lockname = 0;
|
||||
}
|
||||
}
|
||||
if (!lockname_unlinked
|
||||
&& stat (lockname, &st) == 0
|
||||
&& st.st_ctime < time (0) - 300)
|
||||
lockname_unlinked = unlink (lockname) == 0 || errno == ENOENT;
|
||||
}
|
||||
|
||||
delete_lockname = lockname;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue