Merge from emacs-24; up to 2012-11-30T04:44:52Z!cyd@gnu.org
This commit is contained in:
commit
727f973937
30 changed files with 4767 additions and 128 deletions
|
@ -1,3 +1,12 @@
|
|||
2012-12-13 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* info/dir: Add bovine, srecode, wisent.
|
||||
|
||||
2012-12-13 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* Makefile.in (install-info): Use `${MAKE} -s' for echo-info.
|
||||
(uninstall): Likewise. (Bug#13143)
|
||||
|
||||
2012-12-11 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Merge from gnulib for 'inline' (Bug#13040), incorporating:
|
||||
|
|
|
@ -603,7 +603,7 @@ install-info: info
|
|||
[ -f dir ] || \
|
||||
(cd $${thisdir}; \
|
||||
${INSTALL_DATA} ${srcdir}/info/dir $(DESTDIR)${infodir}/dir) ; \
|
||||
info_misc=`cd $${thisdir}/doc/misc; ${MAKE} echo-info | sed '/ing directory/d'`; \
|
||||
info_misc=`cd $${thisdir}/doc/misc; ${MAKE} -s echo-info`; \
|
||||
cd ${srcdir}/info ; \
|
||||
for elt in ${INFO_NONMISC} $${info_misc}; do \
|
||||
test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \
|
||||
|
@ -690,7 +690,7 @@ uninstall:
|
|||
done
|
||||
-rm -rf $(DESTDIR)${libexecdir}/emacs/${version}
|
||||
thisdir=`/bin/pwd`; \
|
||||
(info_misc=`cd doc/misc; ${MAKE} echo-info | sed '/ing directory/d'`; \
|
||||
(info_misc=`cd doc/misc; ${MAKE} -s echo-info`; \
|
||||
if cd $(DESTDIR)${infodir}; then \
|
||||
for elt in ${INFO_NONMISC} $${info_misc}; do \
|
||||
(cd $${thisdir}; \
|
||||
|
|
|
@ -1,3 +1,61 @@
|
|||
2012-12-13 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* wisent.texi: Small edits. Set copyright to FSF, update license to
|
||||
GFDL 1.3+.
|
||||
* Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add wisent.
|
||||
(wisent, $(buildinfodir)/wisent$(INFO_EXT), wisent.dvi, wisent.pdf):
|
||||
New targets.
|
||||
* makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add wisent.
|
||||
($(infodir)/wisent$(INFO_EXT), wisent.dvi): New targets.
|
||||
|
||||
* bovine.texi: Small edits. Set copyright to FSF, update license to
|
||||
GFDL 1.3+, remove empty index.
|
||||
* Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add bovine.
|
||||
(bovine, $(buildinfodir)/bovine$(INFO_EXT), bovine.dvi, bovine.pdf):
|
||||
New targets.
|
||||
* makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add bovine.
|
||||
($(infodir)/bovine$(INFO_EXT), bovine.dvi): New targets.
|
||||
|
||||
2012-12-13 Eric Ludlam <zappo@gnu.org>
|
||||
David Ponce <david@dponce.com>
|
||||
Richard Kim <emacs18@gmail.com>
|
||||
|
||||
* bovine.texi, wisent.texi: New files, imported from CEDET trunk.
|
||||
|
||||
2012-12-13 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* flymake.texi (Customizable variables, Locating the buildfile):
|
||||
Remove refs to flymake-buildfile-dirs, removed 2007-07-20. (Bug#13148)
|
||||
|
||||
* srecode.texi: Small edits. Set copyright to FSF, add explicit
|
||||
GFDL 1.3+ license, fix up index.
|
||||
* Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add srecode.
|
||||
(srecode, $(buildinfodir)/srecode$(INFO_EXT), srecode.dvi)
|
||||
(srecode.pdf): New targets.
|
||||
* makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add srecode.
|
||||
($(infodir)/srecode$(INFO_EXT), srecode.dvi): New targets.
|
||||
|
||||
2012-12-13 Eric Ludlam <zappo@gnu.org>
|
||||
|
||||
* srecode.texi: New file, imported from CEDET trunk.
|
||||
|
||||
2012-12-13 Bastien Guerry <bzg@gnu.org>
|
||||
|
||||
* org.texi (Summary, Code block specific header arguments)
|
||||
(Code block specific header arguments)
|
||||
(Header arguments in function calls, var, noweb)
|
||||
(Results of evaluation, Code evaluation security):
|
||||
Small reformatting: add a blank line before some example.
|
||||
|
||||
* org.texi (System-wide header arguments)
|
||||
(Header arguments in Org mode properties, Conflicts)
|
||||
(Dynamic blocks, Using the mapping API):
|
||||
Fix indentation of Elisp code examples.
|
||||
|
||||
* org.texi (Comment lines): Fix description of the comment syntax.
|
||||
|
||||
* org.texi (Installation): Mention "make test" in the correct section.
|
||||
|
||||
2012-12-06 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* doclicense.texi, gpl.texi: Update to latest version from FSF.
|
||||
|
|
|
@ -41,19 +41,20 @@ INFO_OPTS=@INFO_OPTS@
|
|||
MAKEINFO = @MAKEINFO@
|
||||
MAKEINFO_OPTS = --force -I$(emacsdir)
|
||||
|
||||
INFO_TARGETS = ada-mode auth autotype calc ccmode cl \
|
||||
INFO_TARGETS = ada-mode auth autotype bovine calc ccmode cl \
|
||||
dbus dired-x ebrowse ede ediff edt eieio \
|
||||
emacs-mime epa erc ert eshell eudc efaq \
|
||||
flymake forms gnus emacs-gnutls idlwave info.info \
|
||||
mairix-el message mh-e newsticker nxml-mode \
|
||||
org pcl-cvs pgg rcirc remember reftex sasl \
|
||||
sc semantic ses sieve smtpmail speedbar tramp \
|
||||
url vip viper widget woman
|
||||
sc semantic ses sieve smtpmail speedbar srecode tramp \
|
||||
url vip viper widget wisent woman
|
||||
|
||||
DVI_TARGETS = \
|
||||
ada-mode.dvi \
|
||||
auth.dvi \
|
||||
autotype.dvi \
|
||||
bovine.dvi \
|
||||
calc.dvi \
|
||||
cc-mode.dvi \
|
||||
cl.dvi \
|
||||
|
@ -95,17 +96,20 @@ DVI_TARGETS = \
|
|||
sieve.dvi \
|
||||
smtpmail.dvi \
|
||||
speedbar.dvi \
|
||||
srecode.dvi \
|
||||
tramp.dvi \
|
||||
url.dvi \
|
||||
vip.dvi \
|
||||
viper.dvi \
|
||||
widget.dvi \
|
||||
wisent.dvi \
|
||||
woman.dvi
|
||||
|
||||
PDF_TARGETS = \
|
||||
ada-mode.pdf \
|
||||
auth.pdf \
|
||||
autotype.pdf \
|
||||
bovine.pdf \
|
||||
calc.pdf \
|
||||
cc-mode.pdf \
|
||||
cl.pdf \
|
||||
|
@ -147,11 +151,13 @@ PDF_TARGETS = \
|
|||
sieve.pdf \
|
||||
smtpmail.pdf \
|
||||
speedbar.pdf \
|
||||
srecode.pdf \
|
||||
tramp.pdf \
|
||||
url.pdf \
|
||||
vip.pdf \
|
||||
viper.pdf \
|
||||
widget.pdf \
|
||||
wisent.pdf \
|
||||
woman.pdf
|
||||
|
||||
HTML_TARGETS = emacs-faq.html
|
||||
|
@ -218,6 +224,15 @@ autotype.dvi: ${srcdir}/autotype.texi
|
|||
autotype.pdf: ${srcdir}/autotype.texi
|
||||
$(ENVADD) $(TEXI2PDF) ${srcdir}/autotype.texi
|
||||
|
||||
bovine : $(buildinfodir)/bovine$(INFO_EXT)
|
||||
$(buildinfodir)/bovine$(INFO_EXT): ${srcdir}/bovine.texi
|
||||
$(mkinfodir)
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/bovine.texi
|
||||
bovine.dvi: ${srcdir}/bovine.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/bovine.texi
|
||||
bovine.pdf: ${srcdir}/bovine.texi
|
||||
$(ENVADD) $(TEXI2PDF) ${srcdir}/bovine.texi
|
||||
|
||||
calc : $(buildinfodir)/calc$(INFO_EXT)
|
||||
$(buildinfodir)/calc$(INFO_EXT): ${srcdir}/calc.texi $(emacsdir)/emacsver.texi
|
||||
$(mkinfodir)
|
||||
|
@ -606,6 +621,15 @@ speedbar.dvi: ${srcdir}/speedbar.texi
|
|||
speedbar.pdf: ${srcdir}/speedbar.texi
|
||||
$(ENVADD) $(TEXI2PDF) ${srcdir}/speedbar.texi
|
||||
|
||||
srecode : $(buildinfodir)/srecode$(INFO_EXT)
|
||||
$(buildinfodir)/srecode$(INFO_EXT): ${srcdir}/srecode.texi
|
||||
$(mkinfodir)
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/srecode.texi
|
||||
srecode.dvi: ${srcdir}/srecode.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/srecode.texi
|
||||
srecode.pdf: ${srcdir}/srecode.texi
|
||||
$(ENVADD) $(TEXI2PDF) ${srcdir}/srecode.texi
|
||||
|
||||
tramp : $(buildinfodir)/tramp$(INFO_EXT)
|
||||
$(buildinfodir)/tramp$(INFO_EXT): ${srcdir}/tramp.texi ${srcdir}/trampver.texi
|
||||
$(mkinfodir)
|
||||
|
@ -651,6 +675,15 @@ widget.dvi: ${srcdir}/widget.texi
|
|||
widget.pdf: ${srcdir}/widget.texi
|
||||
$(ENVADD) $(TEXI2PDF) ${srcdir}/widget.texi
|
||||
|
||||
wisent : $(buildinfodir)/wisent$(INFO_EXT)
|
||||
$(buildinfodir)/wisent$(INFO_EXT): ${srcdir}/wisent.texi
|
||||
$(mkinfodir)
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/wisent.texi
|
||||
wisent.dvi: ${srcdir}/wisent.texi
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/wisent.texi
|
||||
wisent.pdf: ${srcdir}/wisent.texi
|
||||
$(ENVADD) $(TEXI2PDF) ${srcdir}/wisent.texi
|
||||
|
||||
woman : $(buildinfodir)/woman$(INFO_EXT)
|
||||
$(buildinfodir)/woman$(INFO_EXT): ${srcdir}/woman.texi
|
||||
$(mkinfodir)
|
||||
|
|
475
doc/misc/bovine.texi
Normal file
475
doc/misc/bovine.texi
Normal file
|
@ -0,0 +1,475 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename ../../info/bovine
|
||||
@set TITLE Bovine parser development
|
||||
@set AUTHOR Eric M. Ludlam, David Ponce, and Richard Y. Kim
|
||||
@settitle @value{TITLE}
|
||||
|
||||
@c *************************************************************************
|
||||
@c @ Header
|
||||
@c *************************************************************************
|
||||
|
||||
@c Merge all indexes into a single index for now.
|
||||
@c We can always separate them later into two or more as needed.
|
||||
@syncodeindex vr cp
|
||||
@syncodeindex fn cp
|
||||
@syncodeindex ky cp
|
||||
@syncodeindex pg cp
|
||||
@syncodeindex tp cp
|
||||
|
||||
@c @footnotestyle separate
|
||||
@c @paragraphindent 2
|
||||
@c @@smallbook
|
||||
@c %**end of header
|
||||
|
||||
@copying
|
||||
Copyright @copyright{} 1999-2004, 2012 Free Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
|
||||
and with the Back-Cover Texts as in (a) below. A copy of the license
|
||||
is included in the section entitled ``GNU Free Documentation License''.
|
||||
|
||||
(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
|
||||
modify this GNU manual. Buying copies from the FSF supports it in
|
||||
developing GNU and promoting software freedom.''
|
||||
@end quotation
|
||||
@end copying
|
||||
|
||||
@dircategory Emacs misc features
|
||||
@direntry
|
||||
* Bovine: (bovine). Semantic bovine parser development.
|
||||
@end direntry
|
||||
|
||||
@iftex
|
||||
@finalout
|
||||
@end iftex
|
||||
|
||||
@c @setchapternewpage odd
|
||||
@c @setchapternewpage off
|
||||
|
||||
@titlepage
|
||||
@sp 10
|
||||
@title @value{TITLE}
|
||||
@author by @value{AUTHOR}
|
||||
@page
|
||||
@vskip 0pt plus 1 fill
|
||||
@insertcopying
|
||||
@end titlepage
|
||||
@page
|
||||
|
||||
@macro semantic{}
|
||||
@i{Semantic}
|
||||
@end macro
|
||||
|
||||
@c *************************************************************************
|
||||
@c @ Document
|
||||
@c *************************************************************************
|
||||
@contents
|
||||
|
||||
@node top
|
||||
@top @value{TITLE}
|
||||
|
||||
The @dfn{bovine} parser is the original @semantic{} parser, and is an
|
||||
implementation of an @acronym{LL} parser. It is good for simple
|
||||
languages. It has many conveniences making grammar writing easy. The
|
||||
conveniences make it less powerful than a Bison-like @acronym{LALR}
|
||||
parser. For more information, @inforef{top, the Wisent Parser Manual,
|
||||
wisent}.
|
||||
|
||||
Bovine @acronym{LL} grammars are stored in files with a @file{.by}
|
||||
extension. When compiled, the contents is converted into a file of
|
||||
the form @file{NAME-by.el}. This, in turn is byte compiled.
|
||||
@inforef{top, Grammar Framework Manual, grammar-fw}.
|
||||
|
||||
@ifnottex
|
||||
@insertcopying
|
||||
@end ifnottex
|
||||
|
||||
@menu
|
||||
* Starting Rules:: The starting rules for the grammar.
|
||||
* Bovine Grammar Rules:: Rules used to parse a language.
|
||||
* Optional Lambda Expression:: Actions to take when a rule is matched.
|
||||
* Bovine Examples:: Simple Samples.
|
||||
* GNU Free Documentation License:: The license for this documentation.
|
||||
@c * Index::
|
||||
@end menu
|
||||
|
||||
@node Starting Rules
|
||||
@chapter Starting Rules
|
||||
|
||||
In Bison, one and only one nonterminal is designated as the ``start''
|
||||
symbol. In @semantic{}, one or more nonterminals can be designated as
|
||||
the ``start'' symbol. They are declared following the @code{%start}
|
||||
keyword separated by spaces. @inforef{start Decl, ,grammar-fw}.
|
||||
|
||||
If no @code{%start} keyword is used in a grammar, then the very first
|
||||
is used. Internally the first start nonterminal is targeted by the
|
||||
reserved symbol @code{bovine-toplevel}, so it can be found by the
|
||||
parser harness.
|
||||
|
||||
To find locally defined variables, the local context handler needs to
|
||||
parse the body of functional code. The @code{scopestart} declaration
|
||||
specifies the name of a nonterminal used as the goal to parse a local
|
||||
context, @inforef{scopestart Decl, ,grammar-fw}. Internally the
|
||||
scopestart nonterminal is targeted by the reserved symbol
|
||||
@code{bovine-inner-scope}, so it can be found by the parser harness.
|
||||
|
||||
@node Bovine Grammar Rules
|
||||
@chapter Bovine Grammar Rules
|
||||
|
||||
The rules are what allow the compiler to create tags from a language
|
||||
file. Once the setup is done in the prologue, you can start writing
|
||||
rules. @inforef{Grammar Rules, ,grammar-fw}.
|
||||
|
||||
@example
|
||||
@var{result} : @var{components1} @var{optional-semantic-action1})
|
||||
| @var{components2} @var{optional-semantic-action2}
|
||||
;
|
||||
@end example
|
||||
|
||||
@var{result} is a nonterminal, that is a symbol synthesized in your grammar.
|
||||
@var{components} is a list of elements that are to be matched if @var{result}
|
||||
is to be made. @var{optional-semantic-action} is an optional sequence
|
||||
of simplified Emacs Lisp expressions for concocting the parse tree.
|
||||
|
||||
In bison, each time an element of @var{components} is found, it is
|
||||
@dfn{shifted} onto the parser stack. (The stack of matched elements.)
|
||||
When all @var{components}' elements have been matched, it is
|
||||
@dfn{reduced} to @var{result}. @xref{(bison)Algorithm}.
|
||||
|
||||
A particular @var{result} written into your grammar becomes
|
||||
the parser's goal. It is designated by a @code{%start} statement
|
||||
(@pxref{Starting Rules}). The value returned by the associated
|
||||
@var{optional-semantic-action} is the parser's result. It should be
|
||||
a tree of @semantic{} @dfn{tags}, @inforef{Semantic Tags, ,
|
||||
semantic-appdev}.
|
||||
|
||||
@var{components} is made up of symbols. A symbol such as @code{FOO}
|
||||
means that a syntactic token of class @code{FOO} must be matched.
|
||||
|
||||
@menu
|
||||
* How Lexical Tokens Match::
|
||||
* Grammar-to-Lisp Details::
|
||||
* Order of components in rules::
|
||||
@end menu
|
||||
|
||||
@node How Lexical Tokens Match
|
||||
@section How Lexical Tokens Match
|
||||
|
||||
A lexical rule must be used to define how to match a lexical token.
|
||||
|
||||
For instance:
|
||||
|
||||
@example
|
||||
%keyword FOO "foo"
|
||||
@end example
|
||||
|
||||
Means that @code{FOO} is a reserved language keyword, matched as such
|
||||
by looking up into a keyword table, @inforef{keyword Decl,
|
||||
,grammar-fw}. This is because @code{"foo"} will be converted to
|
||||
@code{FOO} in the lexical analysis stage. Thus the symbol @code{FOO}
|
||||
won't be available any other way.
|
||||
|
||||
If we specify our token in this way:
|
||||
|
||||
@example
|
||||
%token <symbol> FOO "foo"
|
||||
@end example
|
||||
|
||||
then @code{FOO} will match the string @code{"foo"} explicitly, but it
|
||||
won't do so at the lexical level, allowing use of the text
|
||||
@code{"foo"} in other forms of regular expressions.
|
||||
|
||||
In that case, @code{FOO} is a @code{symbol}-type token. To match, a
|
||||
@code{symbol} must first be encountered, and then it must
|
||||
@code{string-match "foo"}.
|
||||
|
||||
@table @strong
|
||||
@item Caution:
|
||||
Be especially careful to remember that @code{"foo"}, and more
|
||||
generally the %token's match-value string, is a regular expression!
|
||||
@end table
|
||||
|
||||
Non symbol tokens are also allowed. For example:
|
||||
|
||||
@example
|
||||
%token <punctuation> PERIOD "[.]"
|
||||
|
||||
filename : symbol PERIOD symbol
|
||||
;
|
||||
@end example
|
||||
|
||||
@code{PERIOD} is a @code{punctuation}-type token that will explicitly
|
||||
match one period when used in the above rule.
|
||||
|
||||
@table @strong
|
||||
@item Please Note:
|
||||
@code{symbol}, @code{punctuation}, etc., are predefined lexical token
|
||||
types, based on the @dfn{syntax class}-character associations
|
||||
currently in effect.
|
||||
@end table
|
||||
|
||||
@node Grammar-to-Lisp Details
|
||||
@section Grammar-to-Lisp Details
|
||||
|
||||
For the bovinator, lexical token matching patterns are @emph{inlined}.
|
||||
When the grammar-to-lisp converter encounters a lexical token
|
||||
declaration of the form:
|
||||
|
||||
@example
|
||||
%token <@var{type}> @var{token-name} @var{match-value}
|
||||
@end example
|
||||
|
||||
It substitutes every occurrences of @var{token-name} in rules, by its
|
||||
expanded form:
|
||||
|
||||
@example
|
||||
@var{type} @var{match-value}
|
||||
@end example
|
||||
|
||||
For example:
|
||||
|
||||
@example
|
||||
%token <symbol> MOOSE "moose"
|
||||
|
||||
find_a_moose: MOOSE
|
||||
;
|
||||
@end example
|
||||
|
||||
Will generate this pseudo equivalent-rule:
|
||||
|
||||
@example
|
||||
find_a_moose: symbol "moose" ;; invalid syntax!
|
||||
;
|
||||
@end example
|
||||
|
||||
Thus, from the bovinator point of view, the @var{components} part of a
|
||||
rule is made up of symbols and strings. A string in the mix means
|
||||
that the previous symbol must have the additional constraint of
|
||||
exactly matching it, as described in @ref{How Lexical Tokens Match}.
|
||||
|
||||
@table @strong
|
||||
@item Please Note:
|
||||
For the bovinator, this task was mixed into the language definition to
|
||||
simplify implementation, though Bison's technique is more efficient.
|
||||
@end table
|
||||
|
||||
@node Order of components in rules
|
||||
@section Order of components in rules
|
||||
|
||||
If a rule has multiple components, order is important, for example
|
||||
|
||||
@example
|
||||
headerfile : symbol PERIOD symbol
|
||||
| symbol
|
||||
;
|
||||
@end example
|
||||
|
||||
would match @samp{foo.h} or the @acronym{C++} header @samp{foo}.
|
||||
The bovine parser will first attempt to match the long form, and then
|
||||
the short form. If they were in reverse order, then the long form
|
||||
would never be tested.
|
||||
|
||||
@c @xref{Default syntactic tokens}.
|
||||
|
||||
@node Optional Lambda Expression
|
||||
@chapter Optional Lambda Expressions
|
||||
|
||||
The @acronym{OLE} (@dfn{Optional Lambda Expression}) is converted into
|
||||
a bovine lambda. This lambda has special short-cuts to simplify
|
||||
reading the semantic action definition. An @acronym{OLE} like this:
|
||||
|
||||
@example
|
||||
( $1 )
|
||||
@end example
|
||||
|
||||
results in a lambda return which consists entirely of the string
|
||||
or object found by matching the first (zeroth) element of match.
|
||||
An @acronym{OLE} like this:
|
||||
|
||||
@example
|
||||
( ,(foo $1) )
|
||||
@end example
|
||||
|
||||
executes @code{foo} on the first argument, and then splices its return
|
||||
into the return list whereas:
|
||||
|
||||
@example
|
||||
( (foo $1) )
|
||||
@end example
|
||||
|
||||
executes @code{foo}, and that is placed in the return list.
|
||||
|
||||
Here are other things that can appear inline:
|
||||
|
||||
@table @code
|
||||
@item $1
|
||||
The first object matched.
|
||||
|
||||
@item ,$1
|
||||
The first object spliced into the list (assuming it is a list from a
|
||||
non-terminal).
|
||||
|
||||
@item '$1
|
||||
The first object matched, placed in a list. i.e. @code{( $1 )}.
|
||||
|
||||
@item foo
|
||||
The symbol @code{foo} (exactly as displayed).
|
||||
|
||||
@item (foo)
|
||||
A function call to foo which is stuck into the return list.
|
||||
|
||||
@item ,(foo)
|
||||
A function call to foo which is spliced into the return list.
|
||||
|
||||
@item '(foo)
|
||||
A function call to foo which is stuck into the return list in a list.
|
||||
|
||||
@item (EXPAND @var{$1} @var{nonterminal} @var{depth})
|
||||
A list starting with @code{EXPAND} performs a recursive parse on the
|
||||
token passed to it (represented by @samp{$1} above.) The
|
||||
@dfn{semantic list} is a common token to expand, as there are often
|
||||
interesting things in the list. The @var{nonterminal} is a symbol in
|
||||
your table which the bovinator will start with when parsing.
|
||||
@var{nonterminal}'s definition is the same as any other nonterminal.
|
||||
@var{depth} should be at least @samp{1} when descending into a
|
||||
semantic list.
|
||||
|
||||
@item (EXPANDFULL @var{$1} @var{nonterminal} @var{depth})
|
||||
Is like @code{EXPAND}, except that the parser will iterate over
|
||||
@var{nonterminal} until there are no more matches. (The same way the
|
||||
parser iterates over the starting rule (@pxref{Starting Rules}). This
|
||||
lets you have much simpler rules in this specific case, and also lets
|
||||
you have positional information in the returned tokens, and error
|
||||
skipping.
|
||||
|
||||
@item (ASSOC @var{symbol1} @var{value1} @var{symbol2} @var{value2} @dots{})
|
||||
This is used for creating an association list. Each @var{symbol} is
|
||||
included in the list if the associated @var{value} is non-@code{nil}.
|
||||
While the items are all listed explicitly, the created structure is an
|
||||
association list of the form:
|
||||
|
||||
@example
|
||||
((@var{symbol1} . @var{value1}) (@var{symbol2} . @var{value2}) @dots{})
|
||||
@end example
|
||||
|
||||
@item (TAG @var{name} @var{class} [@var{attributes}])
|
||||
This creates one tag in the current buffer.
|
||||
|
||||
@table @var
|
||||
@item name
|
||||
Is a string that represents the tag in the language.
|
||||
|
||||
@item class
|
||||
Is the kind of tag being create, such as @code{function}, or
|
||||
@code{variable}, though any symbol will work.
|
||||
|
||||
@item attributes
|
||||
Is an optional set of labeled values such as @w{@code{:constant-flag t :parent
|
||||
"parenttype"}}.
|
||||
@end table
|
||||
|
||||
@item (TAG-VARIABLE @var{name} @var{type} @var{default-value} [@var{attributes}])
|
||||
@itemx (TAG-FUNCTION @var{name} @var{type} @var{arg-list} [@var{attributes}])
|
||||
@itemx (TAG-TYPE @var{name} @var{type} @var{members} @var{parents} [@var{attributes}])
|
||||
@itemx (TAG-INCLUDE @var{name} @var{system-flag} [@var{attributes}])
|
||||
@itemx (TAG-PACKAGE @var{name} @var{detail} [@var{attributes}])
|
||||
@itemx (TAG-CODE @var{name} @var{detail} [@var{attributes}])
|
||||
Create a tag with @var{name} of respectively the class
|
||||
@code{variable}, @code{function}, @code{type}, @code{include},
|
||||
@code{package}, and @code{code}.
|
||||
See @inforef{Creating Tags, , semantic-appdev} for the lisp
|
||||
functions these translate into.
|
||||
@end table
|
||||
|
||||
If the symbol @code{%quotemode backquote} is specified, then use
|
||||
@code{,@@} to splice a list in, and @code{,} to evaluate the expression.
|
||||
This lets you send @code{$1} as a symbol into a list instead of having
|
||||
it expanded inline.
|
||||
|
||||
@node Bovine Examples
|
||||
@chapter Examples
|
||||
|
||||
The rule:
|
||||
|
||||
@example
|
||||
any-symbol: symbol
|
||||
;
|
||||
@end example
|
||||
|
||||
is equivalent to
|
||||
|
||||
@example
|
||||
any-symbol: symbol
|
||||
( $1 )
|
||||
;
|
||||
@end example
|
||||
|
||||
which, if it matched the string @samp{"A"}, would return
|
||||
|
||||
@example
|
||||
( "A" )
|
||||
@end example
|
||||
|
||||
If this rule were used like this:
|
||||
|
||||
@example
|
||||
%token <punctuation> EQUAL "="
|
||||
@dots{}
|
||||
assign: any-symbol EQUAL any-symbol
|
||||
( $1 $3 )
|
||||
;
|
||||
@end example
|
||||
|
||||
it would match @samp{"A=B"}, and return
|
||||
|
||||
@example
|
||||
( ("A") ("B") )
|
||||
@end example
|
||||
|
||||
The letters @samp{A} and @samp{B} come back in lists because
|
||||
@samp{any-symbol} is a nonterminal, not an actual lexical element.
|
||||
|
||||
To get a better result with nonterminals, use @asis{,} to splice lists
|
||||
in like this:
|
||||
|
||||
@example
|
||||
%token <punctuation> EQUAL "="
|
||||
@dots{}
|
||||
assign: any-symbol EQUAL any-symbol
|
||||
( ,$1 ,$3 )
|
||||
;
|
||||
@end example
|
||||
|
||||
which would return
|
||||
|
||||
@example
|
||||
( "A" "B" )
|
||||
@end example
|
||||
|
||||
@node GNU Free Documentation License
|
||||
@appendix GNU Free Documentation License
|
||||
|
||||
@include doclicense.texi
|
||||
|
||||
@c There is nothing to index at the moment.
|
||||
@ignore
|
||||
@node Index
|
||||
@unnumbered Index
|
||||
@printindex cp
|
||||
@end ignore
|
||||
|
||||
@iftex
|
||||
@contents
|
||||
@summarycontents
|
||||
@end iftex
|
||||
|
||||
@bye
|
||||
|
||||
@c Following comments are for the benefit of ispell.
|
||||
|
||||
@c LocalWords: bovinator inlined
|
|
@ -291,9 +291,11 @@ A list of @code{(filename-regexp, init-function, cleanup-function
|
|||
getfname-function)} for configuring syntax check tools. @xref{Adding
|
||||
support for a new syntax check tool}.
|
||||
|
||||
@ignore
|
||||
@item flymake-buildfile-dirs
|
||||
A list of directories (relative paths) for searching a
|
||||
buildfile. @xref{Locating the buildfile}.
|
||||
@end ignore
|
||||
|
||||
@item flymake-master-file-dirs
|
||||
A list of directories for searching a master file. @xref{Locating a
|
||||
|
@ -675,10 +677,13 @@ buildfile to reference the 'project configuration' file.
|
|||
|
||||
Special function, @code{flymake-find-buildfile} is provided for locating buildfiles.
|
||||
Searching for a buildfile is done in a manner similar to that of searching
|
||||
for possible master files. A customizable variable
|
||||
for possible master files.
|
||||
@ignore
|
||||
A customizable variable
|
||||
@code{flymake-buildfile-dirs} holds a list of relative paths to the
|
||||
buildfile. They are checked sequentially until a buildfile is found. In case
|
||||
there's no build file, syntax check is aborted.
|
||||
buildfile. They are checked sequentially until a buildfile is found.
|
||||
@end ignore
|
||||
In case there's no build file, syntax check is aborted.
|
||||
|
||||
Buildfile values are also cached.
|
||||
|
||||
|
|
|
@ -54,7 +54,9 @@ INFO_TARGETS = $(infodir)/ccmode$(INFO_EXT) \
|
|||
$(infodir)/remember$(INFO_EXT) $(infodir)/nxml-mode$(INFO_EXT) \
|
||||
$(infodir)/epa$(INFO_EXT) $(infodir)/mairix-el$(INFO_EXT) $(infodir)/sasl$(INFO_EXT) \
|
||||
$(infodir)/auth$(INFO_EXT) $(infodir)/eieio$(INFO_EXT) $(infodir)/ede$(INFO_EXT) \
|
||||
$(infodir)/semantic$(INFO_EXT) $(infodir)/edt$(INFO_EXT) $(infodir)/emacs-gnutls$(INFO_EXT)
|
||||
$(infodir)/semantic$(INFO_EXT) $(infodir)/edt$(INFO_EXT) $(infodir)/emacs-gnutls$(INFO_EXT) \
|
||||
$(infodir)/srecode$(INFO_EXT) $(infodir)/bovine$(INFO_EXT) \
|
||||
$(infodir)/wisent$(INFO_EXT)
|
||||
DVI_TARGETS = calc.dvi cc-mode.dvi cl.dvi dbus.dvi dired-x.dvi \
|
||||
ediff.dvi forms.dvi gnus.dvi message.dvi emacs-mime.dvi \
|
||||
sieve.dvi pgg.dvi mh-e.dvi \
|
||||
|
@ -65,7 +67,8 @@ DVI_TARGETS = calc.dvi cc-mode.dvi cl.dvi dbus.dvi dired-x.dvi \
|
|||
newsticker.dvi rcirc.dvi erc.dvi ert.dvi \
|
||||
remember.dvi nxml-mode.dvi \
|
||||
epa.dvi mairix-el.dvi sasl.dvi auth.dvi eieio.dvi ede.dvi \
|
||||
semantic.dvi edt.dvi emacs-gnutls.dvi
|
||||
semantic.dvi edt.dvi emacs-gnutls.dvi srecode.dvi bovine.dvi \
|
||||
wisent.dvi
|
||||
INFOSOURCES = info.texi
|
||||
|
||||
# The following rule does not work with all versions of `make'.
|
||||
|
@ -358,6 +361,21 @@ $(infodir)/emacs-gnutls$(INFO_EXT): emacs-gnutls.texi doclicense.texi
|
|||
emacs-gnutls.dvi: emacs-gnutls.texi doclicense.texi
|
||||
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-gnutls.texi
|
||||
|
||||
$(infodir)/srecode$(INFO_EXT): srecode.texi doclicense.texi
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ srecode.texi
|
||||
srecode.dvi: srecode.texi doclicense.texi
|
||||
$(ENVADD) $(TEXI2DVI) $(srcdir)/srecode.texi
|
||||
|
||||
$(infodir)/bovine$(INFO_EXT): bovine.texi doclicense.texi
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ bovine.texi
|
||||
bovine.dvi: bovine.texi doclicense.texi
|
||||
$(ENVADD) $(TEXI2DVI) $(srcdir)/bovine.texi
|
||||
|
||||
$(infodir)/wisent$(INFO_EXT): wisent.texi doclicense.texi
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ wisent.texi
|
||||
wisent.dvi: wisent.texi doclicense.texi
|
||||
$(ENVADD) $(TEXI2DVI) $(srcdir)/wisent.texi
|
||||
|
||||
mostlyclean:
|
||||
- $(DEL) *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.*
|
||||
|
||||
|
@ -385,7 +403,9 @@ clean: mostlyclean
|
|||
$(infodir)/epa* $(infodir)/sasl* \
|
||||
$(infodir)/mairix-el* $(infodir)/auth* \
|
||||
$(infodir)/eieio* $(infodir)/ede* \
|
||||
$(infodir)/semantic* $(infodir)edt* $(infodir)/emacs-gnutls*
|
||||
$(infodir)/semantic* $(infodir)edt* \
|
||||
$(infodir)/emacs-gnutls* $(infodir)/srecode* \
|
||||
$(infodir)/bovine* $(infodir)/wisent*
|
||||
|
||||
distclean: clean
|
||||
- $(DEL) makefile
|
||||
|
|
|
@ -834,7 +834,6 @@ ends, for example:
|
|||
@r{@bullet{} an environment for literate programming}
|
||||
@end example
|
||||
|
||||
|
||||
@cindex FAQ
|
||||
There is a website for Org which provides links to the newest
|
||||
version of Org, as well as additional information, frequently asked
|
||||
|
@ -879,8 +878,6 @@ Lisp and Info files will be installed. If the Emacs binary is not in your
|
|||
path, give the full path to the executable. Avoid spaces in any path names.
|
||||
@item Run @code{make config}
|
||||
again to check the configuration.
|
||||
@item Optionally run @code{make test}
|
||||
to build Org mode and then run the full testsuite.
|
||||
@item Run @code{make install} or @code{sudo make install}
|
||||
to build and install Org mode on your system.
|
||||
@end itemize
|
||||
|
@ -903,6 +900,8 @@ Emacs binary is not in your path, you must give the full path to the
|
|||
executable. Avoid spaces in any path names.
|
||||
@item Run @code{make config}
|
||||
to check the configuration.
|
||||
@item Optionally run @code{make test}
|
||||
to build Org mode and then run the full testsuite.
|
||||
@item Run @code{make update2} or @code{make up2}
|
||||
to update the Git repository and build and install Org mode. The latter
|
||||
invocation runs the complete test suite before installation and installs only
|
||||
|
@ -947,7 +946,7 @@ description on Worg}.
|
|||
Installing Info files is system dependent, because of differences in the
|
||||
@file{install-info} program. The Info documentation is installed together
|
||||
with the rest of Org mode. If you don't install Org mode, it is possible to
|
||||
install the Info documentation separately (you need to have
|
||||
install the Info documentation seperately (you need to have
|
||||
install-info@footnote{The output from install-info (if any) is system
|
||||
dependent. In particular Debian and its derivatives use two different
|
||||
versions of install-info and you may see the message:
|
||||
|
@ -9222,11 +9221,11 @@ a horizontal line (@samp{<hr/>} in HTML and @code{\hrule} in @LaTeX{}).
|
|||
@cindex exporting, not
|
||||
@cindex #+BEGIN_COMMENT
|
||||
|
||||
Lines starting with zero or more whitespace characters followed by @samp{#}
|
||||
are treated as comments and will never be exported. Also entire subtrees
|
||||
starting with the word @samp{COMMENT} will never be exported. Finally,
|
||||
regions surrounded by @samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will
|
||||
not be exported.
|
||||
Lines starting with zero or more whitespace characters followed by one
|
||||
@samp{#} and a whitespace are treated as comments and will never be exported.
|
||||
Also entire subtrees starting with the word @samp{COMMENT} will never be
|
||||
exported. Finally, regions surrounded by @samp{#+BEGIN_COMMENT}
|
||||
... @samp{#+END_COMMENT} will not be exported.
|
||||
|
||||
@table @kbd
|
||||
@kindex C-c ;
|
||||
|
@ -13155,8 +13154,8 @@ blocks.
|
|||
|
||||
@lisp
|
||||
(setq org-babel-default-header-args
|
||||
(cons '(:noweb . "yes")
|
||||
(assq-delete-all :noweb org-babel-default-header-args)))
|
||||
(cons '(:noweb . "yes")
|
||||
(assq-delete-all :noweb org-babel-default-header-args)))
|
||||
@end lisp
|
||||
|
||||
@node Language-specific header arguments, Buffer-wide header arguments, System-wide header arguments, Using header arguments
|
||||
|
@ -13201,9 +13200,9 @@ blocks in the subtree rooted at the following heading:
|
|||
|
||||
@example
|
||||
* outline header
|
||||
:PROPERTIES:
|
||||
:cache: yes
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:cache: yes
|
||||
:END:
|
||||
@end example
|
||||
|
||||
@kindex C-c C-x p
|
||||
|
@ -13247,6 +13246,7 @@ Code block header arguments can span multiple lines using @code{#+HEADER:} or
|
|||
@cindex #+HEADERS:
|
||||
|
||||
Multi-line header arguments on an un-named code block:
|
||||
|
||||
@example
|
||||
#+HEADERS: :var data1=1
|
||||
#+BEGIN_SRC emacs-lisp :var data2=2
|
||||
|
@ -13258,6 +13258,7 @@ Multi-line header arguments on an un-named code block:
|
|||
@end example
|
||||
|
||||
Multi-line header arguments on a named code block:
|
||||
|
||||
@example
|
||||
#+NAME: named-block
|
||||
#+HEADER: :var data=2
|
||||
|
@ -13280,12 +13281,14 @@ blocks}.
|
|||
|
||||
The following will apply the @code{:exports results} header argument to the
|
||||
evaluation of the @code{#+CALL:} line.
|
||||
|
||||
@example
|
||||
#+CALL: factorial(n=5) :exports results
|
||||
@end example
|
||||
|
||||
The following will apply the @code{:session special} header argument to the
|
||||
evaluation of the @code{factorial} code block.
|
||||
|
||||
@example
|
||||
#+CALL: factorial[:session special](n=5)
|
||||
@end example
|
||||
|
@ -13366,6 +13369,7 @@ Here are examples of passing values by reference:
|
|||
|
||||
@item table
|
||||
an Org mode table named with either a @code{#+NAME:} or @code{#+TBLNAME:} line
|
||||
|
||||
@example
|
||||
#+TBLNAME: example-table
|
||||
| 1 |
|
||||
|
@ -13948,7 +13952,6 @@ This code block:
|
|||
-- <<example>>
|
||||
@end example
|
||||
|
||||
|
||||
expands to:
|
||||
|
||||
@example
|
||||
|
@ -14331,6 +14334,7 @@ process. For example, compare the following two blocks:
|
|||
@end example
|
||||
|
||||
In non-session mode, the `2' is not printed and does not appear.
|
||||
|
||||
@example
|
||||
#+BEGIN_SRC python :results output :session
|
||||
print "hello"
|
||||
|
@ -14705,6 +14709,7 @@ ask and nil not to ask.
|
|||
|
||||
For example, here is how to execute "ditaa" code (which is considered safe)
|
||||
without asking:
|
||||
|
||||
@example
|
||||
(defun my-org-confirm-babel-evaluate (lang body)
|
||||
(not (string= lang "ditaa"))) ; don't ask for ditaa
|
||||
|
@ -14806,7 +14811,7 @@ buffer, most useful for specifying the allowed values of a property.
|
|||
@item #+SETUPFILE: file
|
||||
This line defines a file that holds more in-buffer setup. Normally this is
|
||||
entirely ignored. Only when the buffer is parsed for option-setting lines
|
||||
(i.e., when starting Org mode for a file, when pressing @kbd{C-c C-c} in a
|
||||
(i.e.@: when starting Org mode for a file, when pressing @kbd{C-c C-c} in a
|
||||
settings line, or when exporting), then the contents of this file are parsed
|
||||
as if they had been included in the buffer. In particular, the file can be
|
||||
any other Org mode file with internal setup. You can visit the file the
|
||||
|
@ -15168,7 +15173,7 @@ example using the color @code{grey90} on a white background.
|
|||
Things become cleaner still if you skip all the even levels and use only odd
|
||||
levels 1, 3, 5..., effectively adding two stars to go from one outline level
|
||||
to the next@footnote{When you need to specify a level for a property search
|
||||
or refile targets, @samp{LEVEL=2} will correspond to 3 stars, etc.}. In this
|
||||
or refile targets, @samp{LEVEL=2} will correspond to 3 stars, etc@.}. In this
|
||||
way we get the outline view shown at the beginning of this section. In order
|
||||
to make the structure editing and export commands handle this convention
|
||||
correctly, configure the variable @code{org-odd-levels-only}, or set this on
|
||||
|
@ -15259,7 +15264,7 @@ names for natural constants or units. Instead of defining your own
|
|||
constants in the variable @code{org-table-formula-constants}, install
|
||||
the @file{constants} package which defines a large number of constants
|
||||
and units, and lets you use unit prefixes like @samp{M} for
|
||||
@samp{Mega}, etc. You will need version 2.0 of this package, available
|
||||
@samp{Mega}, etc@. You will need version 2.0 of this package, available
|
||||
at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for
|
||||
the function @code{constants-get}, which has to be autoloaded in your
|
||||
setup. See the installation instructions in the file
|
||||
|
@ -15401,7 +15406,7 @@ function:
|
|||
|
||||
@lisp
|
||||
(defun yas/org-very-safe-expand ()
|
||||
(let ((yas/fallback-behavior 'return-nil)) (yas/expand)))
|
||||
(let ((yas/fallback-behavior 'return-nil)) (yas/expand)))
|
||||
@end lisp
|
||||
|
||||
Then, tell Org mode what to do with the new function:
|
||||
|
@ -15409,10 +15414,10 @@ Then, tell Org mode what to do with the new function:
|
|||
@lisp
|
||||
(add-hook 'org-mode-hook
|
||||
(lambda ()
|
||||
(make-variable-buffer-local 'yas/trigger-key)
|
||||
(setq yas/trigger-key [tab])
|
||||
(add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
|
||||
(define-key yas/keymap [tab] 'yas/next-field)))
|
||||
(make-variable-buffer-local 'yas/trigger-key)
|
||||
(setq yas/trigger-key [tab])
|
||||
(add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
|
||||
(define-key yas/keymap [tab] 'yas/next-field)))
|
||||
@end lisp
|
||||
|
||||
@item @file{windmove.el} by Hovav Shacham
|
||||
|
@ -16053,9 +16058,9 @@ The corresponding block writer function could look like this:
|
|||
|
||||
@lisp
|
||||
(defun org-dblock-write:block-update-time (params)
|
||||
(let ((fmt (or (plist-get params :format) "%d. %m. %Y")))
|
||||
(insert "Last block update at: "
|
||||
(format-time-string fmt (current-time)))))
|
||||
(let ((fmt (or (plist-get params :format) "%d. %m. %Y")))
|
||||
(insert "Last block update at: "
|
||||
(format-time-string fmt (current-time)))))
|
||||
@end lisp
|
||||
|
||||
If you want to make sure that all dynamic blocks are always up-to-date,
|
||||
|
@ -16450,8 +16455,8 @@ Entries in comment trees and in archive trees will be ignored.
|
|||
|
||||
@lisp
|
||||
(org-map-entries
|
||||
'(org-todo "UPCOMING")
|
||||
"+TOMORROW" 'file 'archive 'comment)
|
||||
'(org-todo "UPCOMING")
|
||||
"+TOMORROW" 'file 'archive 'comment)
|
||||
@end lisp
|
||||
|
||||
The following example counts the number of entries with TODO keyword
|
||||
|
@ -16693,7 +16698,7 @@ on @file{org-element.el} and @file{org-export.el} has been outstanding, and
|
|||
opened the doors for many new ideas and features.
|
||||
|
||||
@item Jambunathan K
|
||||
Jambunathan contributed the ODT exporter, definitely a killer feature of
|
||||
Jambunathan contributed the ODT exporter, definitly a killer feature of
|
||||
Org mode. He also contributed the new HTML exporter, which is another core
|
||||
feature of Org. Here too, I knew I could rely on him to fix bugs in these
|
||||
areas and to patiently explain the users what was the problems and solutions.
|
||||
|
@ -16701,7 +16706,7 @@ areas and to patiently explain the users what was the problems and solutions.
|
|||
@item Achim Gratz
|
||||
Achim rewrote the building process of Org, turning some @emph{ad hoc} tools
|
||||
into a flexible and conceptually clean process. He patiently coped with the
|
||||
many hiccups that such a change can create for users.
|
||||
many hicups that such a change can create for users.
|
||||
|
||||
@item Nick Dokos
|
||||
The Org mode mailing list would not be such a nice place without Nick, who
|
||||
|
|
1799
doc/misc/srecode.texi
Normal file
1799
doc/misc/srecode.texi
Normal file
File diff suppressed because it is too large
Load diff
2048
doc/misc/wisent.texi
Normal file
2048
doc/misc/wisent.texi
Normal file
File diff suppressed because it is too large
Load diff
3
info/dir
3
info/dir
|
@ -79,6 +79,9 @@ Emacs misc features
|
|||
and citations.
|
||||
* Remember: (remember). Simple information manager for Emacs.
|
||||
* Semantic: (semantic). Source code parser library and utilities.
|
||||
* Bovine: (bovine). Semantic bovine parser development.
|
||||
* SRecode: (srecode). Template code generator.
|
||||
* Wisent: (wisent). Semantic Wisent parser development.
|
||||
* SES: (ses). Simple Emacs Spreadsheet.
|
||||
* Speedbar: (speedbar). File/Tag summarizing utility.
|
||||
* VIP: (vip). An older VI-emulation for Emacs.
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
2012-12-13 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
Make CC Mode not hang when _some_ lines end in CRLF. Bug #11841.
|
||||
* progmodes/cc-engine.el (c-backward-comments): Add code to work
|
||||
around `forward-comment' not recognizing ^M as whitespace.
|
||||
|
||||
2012-12-13 Fabián Ezequiel Gallina <fgallina@cuca>
|
||||
|
||||
* progmodes/python.el (python-skeleton-class)
|
||||
(python-skeleton-def): Do not add space after defun name.
|
||||
|
||||
2012-12-13 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/cl.el (letf): Make it an alias of cl-letf.
|
||||
|
|
|
@ -1,3 +1,89 @@
|
|||
2012-12-13 Bastien Guerry <bzg@gnu.org>
|
||||
|
||||
* org-latex.el (org-export-latex-links): Escape raw path when
|
||||
exporting links to files.
|
||||
|
||||
* org-src.el (org-src-native-tab-command-maybe): Fix bug: the
|
||||
S-TAB key should not trigger a native TAB command.
|
||||
|
||||
* org.el (org-open-at-point): Allow to open any link within
|
||||
footnotes definition, not only bracket links.
|
||||
|
||||
* org.el (org-sort-entries): Bugfix: keep track of the clock
|
||||
marker when sorting entries. Enhance the docstring.
|
||||
|
||||
* org-clock.el (org-clock-out): Use `user-error' when the user
|
||||
tries to clock out while there is no running clock.
|
||||
|
||||
* org-table.el (org-table-sort-lines): Ensure coordinates are
|
||||
correctly displayed when sorting.
|
||||
|
||||
* org.el (org-do-sort): Enhance prompt.
|
||||
|
||||
* org-agenda.el (org-agenda-finalize): Also activate plain links.
|
||||
|
||||
* org-timer.el (org-timer-stop): Add message.
|
||||
|
||||
* org-agenda.el (org-agenda-schedule, org-agenda-deadline):
|
||||
Fix redundant messages.
|
||||
|
||||
* org-agenda.el (org-agenda-finalize): Fix clock highlighting.
|
||||
|
||||
* org.el (org-additional-option-like-keywords): Add "INDEX:".
|
||||
|
||||
* org-install.el: Enhance warning.
|
||||
|
||||
2012-12-13 Erik Hetzner <egh@e6h.org> (tiny change)
|
||||
|
||||
* org.el (org-log-into-drawer): Honor the nil value for the
|
||||
:LOG_INTO_DRAWER: property.
|
||||
|
||||
2012-12-13 Le Wang <l26wang@gmail.com> (tiny change)
|
||||
|
||||
* org-src.el (org-edit-src-exit): Fix editing source section with
|
||||
blank lines.
|
||||
|
||||
2012-12-13 Le Wang <le.wang@agworld.com.au>
|
||||
|
||||
* org-src.el (org-edit-src-code): Use marker with insertion type
|
||||
t to track end and remove hack requiring delete from beg to (1- end).
|
||||
|
||||
2012-12-13 Nicolas Goaziou <n.goaziou@gmail.com>
|
||||
|
||||
* org-element.el (org-element-context): When point is between two
|
||||
objects, be sure to return the second one.
|
||||
|
||||
* org-list.el (org-list-separating-blank-lines-number): When
|
||||
computing number of blank lines separating items, also count those
|
||||
in unparsed blocks, like example blocks.
|
||||
|
||||
* org.el (org-end-of-line): When visual line mode is on, really
|
||||
move by visual lines. Small refactoring.
|
||||
|
||||
* org.el (org-end-of-line): On a hidden block make sure to
|
||||
delegate motion to `end-of-line' instead of `move-end-of-line' in
|
||||
order to stay on the current line.
|
||||
|
||||
2012-12-13 Rafael Laboissiere <rafael@laboissiere.net> (tiny change)
|
||||
|
||||
* org-bibtex.el: In the documentation section of the file, fix the
|
||||
broken URL to Andrew Roberts' document on BibTeX entries.
|
||||
|
||||
* org-remember.el (org-remember-handler): Correctly strip the
|
||||
comment lines in the temporary buffer *Remember* when handling a
|
||||
remember note.
|
||||
|
||||
* org-remember.el (org-remember-apply-template): Start the
|
||||
commented lines in the Remember temporary buffer with the
|
||||
appropriate characters.
|
||||
|
||||
2012-12-13 Toby S. Cubitt <tsc25@cantab.net>
|
||||
|
||||
* org.el (org-beginning-of-line): Check `visual-line-mode' instead
|
||||
of `line-visual-mode' to determine whether to move by visual lines.
|
||||
|
||||
* org.el (org-kill-line): Use the `org-bound-and-true-p' macro.
|
||||
|
||||
2012-12-04 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* org-bibtex.el (org-bibtex-ask): Use visual-line-mode instead of
|
||||
|
|
|
@ -3517,6 +3517,9 @@ generating a new one."
|
|||
(while (org-activate-bracket-links (point-max))
|
||||
(add-text-properties (match-beginning 0) (match-end 0)
|
||||
'(face org-link)))
|
||||
(while (org-activate-plain-links (point-max))
|
||||
(add-text-properties (match-beginning 0) (match-end 0)
|
||||
'(face org-link)))
|
||||
(org-agenda-align-tags)
|
||||
(unless org-agenda-with-colors
|
||||
(remove-text-properties (point-min) (point-max) '(face nil))))
|
||||
|
@ -3531,7 +3534,11 @@ generating a new one."
|
|||
(org-agenda-fontify-priorities))
|
||||
(when (and org-agenda-dim-blocked-tasks org-blocker-hook)
|
||||
(org-agenda-dim-blocked-tasks))
|
||||
(org-agenda-mark-clocking-task)
|
||||
;; We need to widen when `org-agenda-finalize' is called from
|
||||
;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in')
|
||||
(save-restriction
|
||||
(widen)
|
||||
(org-agenda-mark-clocking-task))
|
||||
(when org-agenda-entry-text-mode
|
||||
(org-agenda-entry-text-hide)
|
||||
(org-agenda-entry-text-show))
|
||||
|
@ -8602,7 +8609,7 @@ ARG is passed through to `org-schedule'."
|
|||
(goto-char pos)
|
||||
(setq ts (org-schedule arg time)))
|
||||
(org-agenda-show-new-time marker ts "S"))
|
||||
(message "Item scheduled for %s" ts)))
|
||||
(message "%s" ts)))
|
||||
|
||||
(defun org-agenda-deadline (arg &optional time)
|
||||
"Schedule the item at point.
|
||||
|
@ -8622,7 +8629,7 @@ ARG is passed through to `org-deadline'."
|
|||
(goto-char pos)
|
||||
(setq ts (org-deadline arg time)))
|
||||
(org-agenda-show-new-time marker ts "D"))
|
||||
(message "Deadline for this item set to %s" ts)))
|
||||
(message "%s" ts)))
|
||||
|
||||
(defun org-agenda-clock-in (&optional arg)
|
||||
"Start the clock on the currently selected item."
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
;;
|
||||
;; - All Bibtex information is taken from the document compiled by
|
||||
;; Andrew Roberts from the Bibtex manual, available at
|
||||
;; http://www.andy-roberts.net/misc/latex/sessions/bibtex/bibentries.pdf
|
||||
;; http://www.andy-roberts.net/res/writing/latex/bibentries.pdf
|
||||
;;
|
||||
;;; History:
|
||||
;;
|
||||
|
|
|
@ -1447,7 +1447,7 @@ to, overriding the existing value of `org-clock-out-switch-to-state'."
|
|||
(delq 'org-mode-line-string global-mode-string))
|
||||
(setq frame-title-format org-frame-title-format-backup)
|
||||
(force-mode-line-update)
|
||||
(if fail-quietly (throw 'exit t) (error "No active clock")))
|
||||
(if fail-quietly (throw 'exit t) (user-error "No active clock")))
|
||||
(let ((org-clock-out-switch-to-state
|
||||
(if switch-to-state
|
||||
(completing-read "Switch to state: "
|
||||
|
|
|
@ -4316,18 +4316,22 @@ and :post-blank properties."
|
|||
(funcall (intern (format "org-element-%s-parser"
|
||||
(car closest-cand))))))
|
||||
(cbeg (org-element-property :contents-begin object))
|
||||
(cend (org-element-property :contents-end object)))
|
||||
(cend (org-element-property :contents-end object))
|
||||
(obj-end (org-element-property :end object)))
|
||||
(cond
|
||||
;; ORIGIN is after OBJECT, so skip it.
|
||||
((< (org-element-property :end object) origin)
|
||||
(goto-char (org-element-property :end object)))
|
||||
;; ORIGIN is within a non-recursive object or at an
|
||||
;; object boundaries: Return that object.
|
||||
((<= obj-end origin)
|
||||
(if (/= obj-end end) (goto-char obj-end)
|
||||
(throw 'exit
|
||||
(org-element-put-property
|
||||
object :parent parent))))
|
||||
;; ORIGIN is within a non-recursive object or at
|
||||
;; an object boundaries: Return that object.
|
||||
((or (not cbeg) (> cbeg origin) (< cend origin))
|
||||
(throw 'exit
|
||||
(org-element-put-property object :parent parent)))
|
||||
;; Otherwise, move within current object and restrict
|
||||
;; search to the end of its contents.
|
||||
;; Otherwise, move within current object and
|
||||
;; restrict search to the end of its contents.
|
||||
(t (goto-char cbeg)
|
||||
(org-element-put-property object :parent parent)
|
||||
(setq parent object
|
||||
|
|
|
@ -2291,14 +2291,13 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
|
|||
(concat type ":" raw-path))
|
||||
((equal type "file")
|
||||
(if (and (org-file-image-p
|
||||
(expand-file-name
|
||||
raw-path)
|
||||
(expand-file-name (org-link-unescape raw-path))
|
||||
org-export-latex-inline-image-extensions)
|
||||
(or (get-text-property 0 'org-no-description
|
||||
raw-path)
|
||||
(or (get-text-property 0 'org-no-description raw-path)
|
||||
(equal desc full-raw-path)))
|
||||
(setq imgp t)
|
||||
(progn (when (string-match "\\(.+\\)::.+" raw-path)
|
||||
(progn (setq raw-path (org-link-unescape raw-path))
|
||||
(when (string-match "\\(.+\\)::.+" raw-path)
|
||||
(setq raw-path (match-string 1 raw-path)))
|
||||
(if (file-exists-p raw-path)
|
||||
(concat type "://" (expand-file-name raw-path))
|
||||
|
|
|
@ -1230,7 +1230,9 @@ some heuristics to guess the result."
|
|||
;; Are there blank lines inside the list so far?
|
||||
((save-excursion
|
||||
(goto-char (org-list-get-top-point struct))
|
||||
(org-list-search-forward
|
||||
;; Do not use `org-list-search-forward' so blank lines
|
||||
;; in blocks can be counted in.
|
||||
(re-search-forward
|
||||
"^[ \t]*$" (org-list-get-item-end-before-blank item struct) t))
|
||||
1)
|
||||
;; Default choice: no blank line.
|
||||
|
|
|
@ -472,12 +472,12 @@ to be run from that hook to function properly."
|
|||
(erase-buffer)
|
||||
(insert (substitute-command-keys
|
||||
(format
|
||||
"## %s \"%s\" -> \"* %s\"
|
||||
## C-u C-c C-c like C-c C-c, and immediately visit note at target location
|
||||
## C-0 C-c C-c \"%s\" -> \"* %s\"
|
||||
## %s to select file and header location interactively.
|
||||
## C-2 C-c C-c as child (C-3: as sibling) of the currently clocked item
|
||||
## To switch templates, use `\\[org-remember]'. To abort use `C-c C-k'.\n\n"
|
||||
"# %s \"%s\" -> \"* %s\"
|
||||
# C-u C-c C-c like C-c C-c, and immediately visit note at target location
|
||||
# C-0 C-c C-c \"%s\" -> \"* %s\"
|
||||
# %s to select file and header location interactively.
|
||||
# C-2 C-c C-c as child (C-3: as sibling) of the currently clocked item
|
||||
# To switch templates, use `\\[org-remember]'. To abort use `C-c C-k'.\n\n"
|
||||
(if org-remember-store-without-prompt " C-c C-c" " C-1 C-c C-c")
|
||||
(abbreviate-file-name (or file org-default-notes-file))
|
||||
(or headline "")
|
||||
|
@ -840,12 +840,12 @@ See also the variable `org-reverse-note-order'."
|
|||
(if (= end beg) (setq beg (1- beg)))
|
||||
(put-text-property beg end 'org-position-cursor t)))
|
||||
(goto-char (point-min))
|
||||
(while (looking-at "^[ \t]*\n\\|^##.*\n")
|
||||
(while (looking-at "^[ \t]*\n\\|^# .*\n")
|
||||
(replace-match ""))
|
||||
(when org-remember-delete-empty-lines-at-end
|
||||
(goto-char (point-max))
|
||||
(beginning-of-line 1)
|
||||
(while (and (looking-at "[ \t]*$\\|##.*") (> (point) 1))
|
||||
(while (and (looking-at "[ \t]*$\\|[ \t]*# .*") (> (point) 1))
|
||||
(delete-region (1- (point)) (point-max))
|
||||
(beginning-of-line 1)))
|
||||
(catch 'quit
|
||||
|
|
|
@ -215,11 +215,22 @@ buffer."
|
|||
(setq org-edit-src-saved-temp-window-config (current-window-configuration)))
|
||||
(let* ((mark (and (org-region-active-p) (mark)))
|
||||
(case-fold-search t)
|
||||
(info (org-edit-src-find-region-and-lang))
|
||||
(info
|
||||
;; If the src region consists in no lines, we insert a blank
|
||||
;; line.
|
||||
(let* ((temp (org-edit-src-find-region-and-lang))
|
||||
(beg (nth 0 temp))
|
||||
(end (nth 1 temp)))
|
||||
(if (>= end beg) temp
|
||||
(goto-char beg)
|
||||
(insert "\n")
|
||||
(org-edit-src-find-region-and-lang))))
|
||||
(full-info (org-babel-get-src-block-info 'light))
|
||||
(org-mode-p (derived-mode-p 'org-mode)) ;; derived-mode-p is reflexive
|
||||
(beg (make-marker))
|
||||
(end (make-marker))
|
||||
;; Move marker with inserted text for case when src block is
|
||||
;; just one empty line, i.e. beg == end.
|
||||
(end (copy-marker nil t))
|
||||
(allow-write-back-p (null code))
|
||||
block-nindent total-nindent ovl lang lang-f single lfmt buffer msg
|
||||
begline markline markcol line col transmitted-variables)
|
||||
|
@ -689,10 +700,9 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"."
|
|||
(kill-buffer buffer))
|
||||
(goto-char beg)
|
||||
(when allow-write-back-p
|
||||
(delete-region beg (max beg (1- end)))
|
||||
(unless (string-match "^[ \t]*$" code)
|
||||
(insert code)
|
||||
(delete-char 1))
|
||||
(delete-region beg (max beg end))
|
||||
(unless (string-match "\\`[ \t]*\\'" code)
|
||||
(insert code))
|
||||
(goto-char beg)
|
||||
(if single (just-one-space)))
|
||||
(if (memq t (mapcar (lambda (overlay)
|
||||
|
@ -820,6 +830,7 @@ issued in the language major mode buffer."
|
|||
Alter code block according to effect of TAB in the language major
|
||||
mode."
|
||||
(and org-src-tab-acts-natively
|
||||
(not (equal this-command 'org-shifttab))
|
||||
(let ((org-src-strip-leading-and-trailing-blank-lines nil))
|
||||
(org-babel-do-key-sequence-in-edit-buffer (kbd "TAB")))))
|
||||
|
||||
|
|
|
@ -1594,6 +1594,7 @@ should be done in reverse order."
|
|||
(interactive "P")
|
||||
(let* ((thisline (org-current-line))
|
||||
(thiscol (org-table-current-column))
|
||||
(otc org-table-overlay-coordinates)
|
||||
beg end bcol ecol tend tbeg column lns pos)
|
||||
(when (equal thiscol 0)
|
||||
(if (org-called-interactively-p 'any)
|
||||
|
@ -1642,12 +1643,15 @@ should be done in reverse order."
|
|||
x))
|
||||
(org-split-string (buffer-substring beg end) "\n")))
|
||||
(setq lns (org-do-sort lns "Table" with-case sorting-type))
|
||||
(when org-table-overlay-coordinates
|
||||
(org-table-toggle-coordinate-overlays))
|
||||
(delete-region beg end)
|
||||
(move-marker beg nil)
|
||||
(move-marker end nil)
|
||||
(insert (mapconcat 'cdr lns "\n") "\n")
|
||||
(org-goto-line thisline)
|
||||
(org-table-goto-column thiscol)
|
||||
(when otc (org-table-toggle-coordinate-overlays))
|
||||
(message "%d lines sorted, based on column %d" (length lns) column)))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -162,7 +162,8 @@ With prefix arg STOP, stop it entirely."
|
|||
(run-hooks 'org-timer-stop-hook)
|
||||
(setq org-timer-start-time nil
|
||||
org-timer-pause-time nil)
|
||||
(org-timer-set-mode-line 'off))
|
||||
(org-timer-set-mode-line 'off)
|
||||
(message "Timer stopped"))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-timer (&optional restart no-insert-p)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
(defun org-git-version ()
|
||||
"The Git version of org-mode.
|
||||
Inserted by installing org-mode or when a release is made."
|
||||
(let ((org-git-version "7.9.2+-GNU-Emacs-24-3"))
|
||||
(let ((org-git-version "7.9.2+-GNU-Emacs-24-3 (commit 488eea)"))
|
||||
org-git-version))
|
||||
;;;###autoload
|
||||
(defvar org-odt-data-dir "/usr/share/emacs/etc/org"
|
||||
|
|
|
@ -2498,9 +2498,10 @@ a subtree."
|
|||
"Return the value of `org-log-into-drawer', but let properties overrule.
|
||||
If the current entry has or inherits a LOG_INTO_DRAWER property, it will be
|
||||
used instead of the default value."
|
||||
(let ((p (org-entry-get nil "LOG_INTO_DRAWER" 'inherit)))
|
||||
(let ((p (org-entry-get nil "LOG_INTO_DRAWER" 'inherit t)))
|
||||
(cond
|
||||
((or (not p) (equal p "nil")) org-log-into-drawer)
|
||||
((not p) org-log-into-drawer)
|
||||
((equal p "nil") nil)
|
||||
((equal p "t") "LOGBOOK")
|
||||
(t p))))
|
||||
|
||||
|
@ -8016,11 +8017,12 @@ a time stamp, by a property or by priority.
|
|||
|
||||
The command prompts for the sorting type unless it has been given to the
|
||||
function through the SORTING-TYPE argument, which needs to be a character,
|
||||
\(?n ?N ?a ?A ?t ?T ?s ?S ?d ?D ?p ?P ?r ?R ?f ?F). Here is the
|
||||
\(?n ?N ?a ?A ?t ?T ?s ?S ?d ?D ?p ?P ?o ?O ?r ?R ?f ?F). Here is the
|
||||
precise meaning of each character:
|
||||
|
||||
n Numerically, by converting the beginning of the entry/item to a number.
|
||||
a Alphabetically, ignoring the TODO keyword and the priority, if any.
|
||||
o By order of TODO keywords.
|
||||
t By date/time, either the first active time stamp in the entry, or, if
|
||||
none exist, by the first inactive one.
|
||||
s By the scheduled date/time.
|
||||
|
@ -8040,6 +8042,13 @@ Comparing entries ignores case by default. However, with an optional argument
|
|||
WITH-CASE, the sorting considers case as well."
|
||||
(interactive "P")
|
||||
(let ((case-func (if with-case 'identity 'downcase))
|
||||
(cmstr
|
||||
;; The clock marker is lost when using `sort-subr', let's
|
||||
;; store the clocking string.
|
||||
(when (equal (marker-buffer org-clock-marker) (current-buffer))
|
||||
(save-excursion
|
||||
(goto-char org-clock-marker)
|
||||
(looking-back "^.*") (match-string-no-properties 0))))
|
||||
start beg end stars re re2
|
||||
txt what tmp)
|
||||
;; Find beginning and end of region to sort
|
||||
|
@ -8096,7 +8105,7 @@ WITH-CASE, the sorting considers case as well."
|
|||
(message
|
||||
"Sort %s: [a]lpha [n]umeric [p]riority p[r]operty todo[o]rder [f]unc
|
||||
[t]ime [s]cheduled [d]eadline [c]reated
|
||||
A/N/T/S/D/C/P/O/F means reversed:"
|
||||
A/N/P/R/O/F/T/S/D/C means reversed:"
|
||||
what)
|
||||
(setq sorting-type (read-char-exclusive))
|
||||
|
||||
|
@ -8193,6 +8202,12 @@ WITH-CASE, the sorting considers case as well."
|
|||
((= dcst ?f) compare-func)
|
||||
((member dcst '(?p ?t ?s ?d ?c)) '<)))))
|
||||
(run-hooks 'org-after-sorting-entries-or-items-hook)
|
||||
;; Reset the clock marker if needed
|
||||
(when cmstr
|
||||
(save-excursion
|
||||
(goto-char start)
|
||||
(search-forward cmstr nil t)
|
||||
(move-marker org-clock-marker (point))))
|
||||
(message "Sorting entries...done")))
|
||||
|
||||
(defun org-do-sort (table what &optional with-case sorting-type)
|
||||
|
@ -8204,7 +8219,7 @@ the car of the elements of the table.
|
|||
If WITH-CASE is non-nil, the sorting will be case-sensitive."
|
||||
(unless sorting-type
|
||||
(message
|
||||
"Sort %s: [a]lphabetic. [n]umeric. [t]ime. A/N/T means reversed:"
|
||||
"Sort %s: [a]lphabetic, [n]umeric, [t]ime. A/N/T means reversed:"
|
||||
what)
|
||||
(setq sorting-type (read-char-exclusive)))
|
||||
(let ((dcst (downcase sorting-type))
|
||||
|
@ -9644,7 +9659,7 @@ application the system uses for this file type."
|
|||
(not (org-in-regexp org-bracket-link-regexp)))
|
||||
(org-follow-timestamp-link))
|
||||
((and (or (org-footnote-at-reference-p) (org-footnote-at-definition-p))
|
||||
(not (org-in-regexp org-bracket-link-regexp)))
|
||||
(not (org-in-regexp org-any-link-re)))
|
||||
(org-footnote-action))
|
||||
(t
|
||||
(let (type path link line search (pos (point)))
|
||||
|
@ -11219,7 +11234,7 @@ This function can be used in a hook."
|
|||
"COLUMNS:" "PROPERTY:"
|
||||
"CAPTION:" "LABEL:"
|
||||
"SETUPFILE:"
|
||||
"INCLUDE:"
|
||||
"INCLUDE:" "INDEX:"
|
||||
"BIND:"
|
||||
"MACRO:"))
|
||||
|
||||
|
@ -21270,7 +21285,7 @@ beyond the end of the headline."
|
|||
(car org-special-ctrl-a/e)
|
||||
org-special-ctrl-a/e))
|
||||
refpos)
|
||||
(if (org-bound-and-true-p line-move-visual)
|
||||
(if (org-bound-and-true-p visual-line-mode)
|
||||
(beginning-of-visual-line 1)
|
||||
(beginning-of-line 1))
|
||||
(if (and arg (fboundp 'move-beginning-of-line))
|
||||
|
@ -21331,36 +21346,33 @@ the cursor is already beyond the end of the headline."
|
|||
(interactive "P")
|
||||
(let ((special (if (consp org-special-ctrl-a/e) (cdr org-special-ctrl-a/e)
|
||||
org-special-ctrl-a/e))
|
||||
(type (org-element-type
|
||||
(save-excursion (beginning-of-line) (org-element-at-point)))))
|
||||
(cond
|
||||
((or (not special) arg)
|
||||
(call-interactively
|
||||
(if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line)))
|
||||
((memq type '(headline inlinetask))
|
||||
(let ((pos (point)))
|
||||
(beginning-of-line 1)
|
||||
(if (looking-at (org-re ".*?\\(?:\\([ \t]*\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\)?$"))
|
||||
(if (eq special t)
|
||||
(if (or (< pos (match-beginning 1)) (= pos (match-end 0)))
|
||||
(goto-char (match-beginning 1))
|
||||
(goto-char (match-end 0)))
|
||||
(if (or (< pos (match-end 0))
|
||||
(not (eq this-command last-command)))
|
||||
(goto-char (match-end 0))
|
||||
(goto-char (match-beginning 1))))
|
||||
(call-interactively
|
||||
(if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line)))))
|
||||
((memq type
|
||||
'(center-block comment-block drawer dynamic-block example-block
|
||||
export-block item plain-list property-drawer
|
||||
quote-block special-block src-block verse-block))
|
||||
;; Never move past the ellipsis.
|
||||
(or (eolp) (move-end-of-line 1))
|
||||
(when (org-invisible-p2) (backward-char)))
|
||||
(t
|
||||
(call-interactively
|
||||
(if (fboundp 'move-end-of-line) 'move-end-of-line 'end-of-line))))
|
||||
(move-fun (cond ((org-bound-and-true-p visual-line-mode)
|
||||
'end-of-visual-line)
|
||||
((fboundp 'move-end-of-line) 'move-end-of-line)
|
||||
(t 'end-of-line))))
|
||||
(if (or (not special) arg) (call-interactively move-fun)
|
||||
(let* ((element (save-excursion (beginning-of-line)
|
||||
(org-element-at-point)))
|
||||
(type (org-element-type element)))
|
||||
(cond
|
||||
((memq type '(headline inlinetask))
|
||||
(let ((pos (point)))
|
||||
(beginning-of-line 1)
|
||||
(if (looking-at (org-re ".*?\\(?:\\([ \t]*\\)\\(:[[:alnum:]_@#%:]+:\\)?[ \t]*\\)?$"))
|
||||
(if (eq special t)
|
||||
(if (or (< pos (match-beginning 1)) (= pos (match-end 0)))
|
||||
(goto-char (match-beginning 1))
|
||||
(goto-char (match-end 0)))
|
||||
(if (or (< pos (match-end 0))
|
||||
(not (eq this-command last-command)))
|
||||
(goto-char (match-end 0))
|
||||
(goto-char (match-beginning 1))))
|
||||
(call-interactively move-fun))))
|
||||
((org-element-property :hiddenp element)
|
||||
;; If element is hidden, `move-end-of-line' would put point
|
||||
;; after it. Use `end-of-line' to stay on current line.
|
||||
(call-interactively 'end-of-line))
|
||||
(t (call-interactively move-fun)))))
|
||||
(org-no-warnings (and (featurep 'xemacs) (setq zmacs-region-stays t)))))
|
||||
|
||||
(define-key org-mode-map "\C-a" 'org-beginning-of-line)
|
||||
|
@ -21400,7 +21412,7 @@ depending on context."
|
|||
(not (y-or-n-p "Kill hidden subtree along with headline? ")))
|
||||
(error "C-k aborted - would kill hidden subtree")))
|
||||
(call-interactively
|
||||
(if (and (boundp 'visual-line-mode) visual-line-mode) 'kill-visual-line 'kill-line)))
|
||||
(if (org-bound-and-true-p visual-line-mode) 'kill-visual-line 'kill-line)))
|
||||
((looking-at (org-re ".*?\\S-\\([ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)[ \t]*$"))
|
||||
(kill-region (point) (match-beginning 1))
|
||||
(org-set-tags nil t))
|
||||
|
|
|
@ -1452,8 +1452,21 @@ comment at the start of cc-engine.el for more info."
|
|||
;; return t when moving backwards at bob.
|
||||
(not (bobp))
|
||||
|
||||
(if (let (open-paren-in-column-0-is-defun-start)
|
||||
(forward-comment -1))
|
||||
(if (let (open-paren-in-column-0-is-defun-start moved-comment)
|
||||
(while
|
||||
(and (not (setq moved-comment (forward-comment -1)))
|
||||
;; Cope specifically with ^M^J here -
|
||||
;; forward-comment sometimes gets stuck after ^Ms,
|
||||
;; sometimes after ^M^J.
|
||||
(or
|
||||
(when (eq (char-before) ?\r)
|
||||
(backward-char)
|
||||
t)
|
||||
(when (and (eq (char-before) ?\n)
|
||||
(eq (char-before (1- (point))) ?\r))
|
||||
(backward-char 2)
|
||||
t))))
|
||||
moved-comment)
|
||||
(if (looking-at "\\*/")
|
||||
;; Emacs <= 20 and XEmacs move back over the
|
||||
;; closer of a block comment that lacks an opener.
|
||||
|
|
|
@ -2692,17 +2692,17 @@ The skeleton will be bound to python-skeleton-NAME."
|
|||
|
||||
(python-skeleton-define def nil
|
||||
"Function name: "
|
||||
"def " str " (" ("Parameter, %s: "
|
||||
(unless (equal ?\( (char-before)) ", ")
|
||||
str) "):" \n
|
||||
"\"\"\"" - "\"\"\"" \n
|
||||
> _ \n)
|
||||
"def " str "(" ("Parameter, %s: "
|
||||
(unless (equal ?\( (char-before)) ", ")
|
||||
str) "):" \n
|
||||
"\"\"\"" - "\"\"\"" \n
|
||||
> _ \n)
|
||||
|
||||
(python-skeleton-define class nil
|
||||
"Class name: "
|
||||
"class " str " (" ("Inheritance, %s: "
|
||||
(unless (equal ?\( (char-before)) ", ")
|
||||
str)
|
||||
"class " str "(" ("Inheritance, %s: "
|
||||
(unless (equal ?\( (char-before)) ", ")
|
||||
str)
|
||||
& ")" | -2
|
||||
":" \n
|
||||
"\"\"\"" - "\"\"\"" \n
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
2012-12-13 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* search.c (search_buffer): Check the inverse translations of each
|
||||
character in pattern when the buffer being searched is unibyte.
|
||||
(Bug#13084)
|
||||
|
||||
2012-12-13 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* fileio.c (Fvisited_file_modtime): Return (-1 ...) for nonexistent
|
||||
files, fixing a regression from 24.2.
|
||||
(Fverify_visited_file_modtime): Don't read uninitialized st.st_size.
|
||||
|
||||
2012-12-13 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* fileio.c (Fcopy_file): Make fstat failure as serious as open failure.
|
||||
|
|
14
src/fileio.c
14
src/fileio.c
|
@ -5126,8 +5126,8 @@ See Info node `(elisp)Modification Time' for more details. */)
|
|||
? get_stat_mtime (&st)
|
||||
: time_error_value (errno));
|
||||
if (EMACS_TIME_EQ (mtime, b->modtime)
|
||||
&& (st.st_size == b->modtime_size
|
||||
|| b->modtime_size < 0))
|
||||
&& (b->modtime_size < 0
|
||||
|| st.st_size == b->modtime_size))
|
||||
return Qt;
|
||||
return Qnil;
|
||||
}
|
||||
|
@ -5154,7 +5154,15 @@ See Info node `(elisp)Modification Time' for more details. */)
|
|||
(void)
|
||||
{
|
||||
if (EMACS_NSECS (current_buffer->modtime) < 0)
|
||||
return make_number (0);
|
||||
{
|
||||
if (EMACS_NSECS (current_buffer->modtime) == NONEXISTENT_MODTIME_NSECS)
|
||||
{
|
||||
/* make_lisp_time won't work here if time_t is unsigned. */
|
||||
return list4 (make_number (-1), make_number (65535),
|
||||
make_number (0), make_number (0));
|
||||
}
|
||||
return make_number (0);
|
||||
}
|
||||
return make_lisp_time (current_buffer->modtime);
|
||||
}
|
||||
|
||||
|
|
16
src/search.c
16
src/search.c
|
@ -1406,7 +1406,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
|
|||
char_base = 0;
|
||||
while (--len >= 0)
|
||||
{
|
||||
int c, translated;
|
||||
int c, translated, inverse;
|
||||
|
||||
/* If we got here and the RE flag is set, it's because we're
|
||||
dealing with a regexp known to be trivial, so the backslash
|
||||
|
@ -1420,6 +1420,20 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
|
|||
c = *base_pat++;
|
||||
TRANSLATE (translated, trt, c);
|
||||
*pat++ = translated;
|
||||
/* Check that none of C's equivalents violates the
|
||||
assumptions of boyer_moore. */
|
||||
TRANSLATE (inverse, inverse_trt, c);
|
||||
while (1)
|
||||
{
|
||||
if (inverse >= 0200)
|
||||
{
|
||||
boyer_moore_ok = 0;
|
||||
break;
|
||||
}
|
||||
if (c == inverse)
|
||||
break;
|
||||
TRANSLATE (inverse, inverse_trt, inverse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue