]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from trunk.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 3 Aug 2011 05:05:38 +0000 (22:05 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 3 Aug 2011 05:05:38 +0000 (22:05 -0700)
60 files changed:
autogen/configure
doc/emacs/ChangeLog
doc/emacs/mini.texi
doc/misc/ChangeLog
doc/misc/trampver.texi
etc/ChangeLog
etc/grammars/README [new file with mode: 0644]
etc/grammars/bovine-grammar.el [new file with mode: 0644]
etc/grammars/c.by [new file with mode: 0644]
etc/grammars/java-tags.wy [new file with mode: 0644]
etc/grammars/js.wy [new file with mode: 0644]
etc/grammars/make.by [new file with mode: 0644]
etc/grammars/python.wy [new file with mode: 0644]
etc/grammars/scheme.by [new file with mode: 0644]
etc/grammars/wisent-grammar.el [new file with mode: 0644]
lisp/ChangeLog
lisp/cedet/ChangeLog
lisp/cedet/semantic/bovine/c-by.el
lisp/cedet/semantic/bovine/make-by.el
lisp/cedet/semantic/bovine/scm-by.el
lisp/cedet/semantic/grammar.el
lisp/cedet/semantic/wisent/javat-wy.el
lisp/cedet/semantic/wisent/js-wy.el
lisp/cedet/semantic/wisent/python-wy.el
lisp/cus-edit.el
lisp/dired-aux.el
lisp/dired.el
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/package.el
lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
lisp/gnus/gnus-sum.el
lisp/gnus/mm-decode.el
lisp/gnus/nnimap.el
lisp/gnus/nnir.el
lisp/gnus/nnmaildir.el
lisp/gnus/spam.el
lisp/gnus/starttls.el
lisp/ido.el
lisp/info.el
lisp/ldefs-boot.el
lisp/mail/sendmail.el
lisp/mail/smtpmail.el
lisp/net/network-stream.el
lisp/net/rcirc.el
lisp/net/trampver.el
lisp/org/ChangeLog
lisp/org/ob.el
lisp/progmodes/sh-script.el
lisp/window.el
src/ChangeLog
src/bidi.c
src/chartab.c
src/dispextern.h
src/image.c
src/keymap.c
src/lisp.h
src/regex.c
src/w32term.c
src/xdisp.c

index ec0764613f19ff45d11492e1b40f4fe72bb92469..074850731b0997821ed861caee601defb40d7767 100755 (executable)
@@ -10240,7 +10240,7 @@ fi
 
 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
 HAVE_RSVG=no
-if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
+if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
   if test "${with_rsvg}" != "no"; then
     RSVG_REQUIRED=2.11.0
     RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
index 794771e24d3678361fb1bb5d6b1f9b033f7100a1..8e5efc4f87d55530b21a86d6d44091aae0b304ad 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-30  Michael Albinus  <michael.albinus@gmx.de>
+
+       * mini.texi (Minibuffer File): Insert a reference to Tramp for
+       remote file name completion.  (Bug#9197)
+
 2011-07-28  Eli Zaretskii  <eliz@gnu.org>
 
        * mule.texi (Bidirectional Editing): Document the fact that
index ce0d396fd0d69da86d7085a1c4a5c8b66c6fac69..da1e88ab331c50bc0751c233d6e0e9679e3c7e6e 100644 (file)
@@ -125,6 +125,10 @@ file names, change the variable @code{insert-default-directory} to
 Nonetheless, relative file name arguments are still interpreted based
 on the same default directory.
 
+  For rules how to read remote file names in the minibuffer, see
+@ref{Filename completion, file name completion,, tramp}, in the Tramp
+manual.
+
 @node Minibuffer Edit
 @section Editing in the Minibuffer
 
@@ -491,7 +495,7 @@ argument (@code{previous-history-element}).
 Move to the next item in the minibuffer history
 (@code{next-history-element}).
 @item M-r @var{regexp} @key{RET}
-Move to an earlier item in the minibuffer history that 
+Move to an earlier item in the minibuffer history that
 matches @var{regexp} (@code{previous-matching-history-element}).
 @item M-s @var{regexp} @key{RET}
 Move to a later item in the minibuffer history that matches
index 75e39104dcbb3fa50e2bdaa1e2fe01aac4875f4f..967f457f3c4c6b9561b7b16d8cfa6666420e9899 100644 (file)
@@ -1,3 +1,9 @@
+2011-07-30  Michael Albinus  <michael.albinus@gmx.de>
+
+       Sync with Tramp 2.2.2.
+
+       * trampver.texi: Update release number.
+
 2011-07-28  Bastien Guerry  <bzg@gnu.org>
 
        * org.texi (Using the mapping API): mention 'region as a possible
index 6a245f9c28d26ae7b4b8ff7cc86a9b68556b84d8..043217a6c9e765691637d75ace3d1b3b39b56fe6 100644 (file)
@@ -8,7 +8,7 @@
 @c In the Tramp CVS, the version number is auto-frobbed from
 @c configure.ac, so you should edit that file and run
 @c "autoconf && ./configure" to change the version number.
-@set trampver 2.2.2-pre
+@set trampver 2.2.2
 
 @c Other flags from configuration
 @set instprefix /usr/local
index e54e8d81b8a3ed688cf6acb042ba70b87669f1a4..6d89746ed05901e9650a34b7ef253875b1844ddd 100644 (file)
@@ -1,3 +1,7 @@
+2011-07-30  Chong Yidong  <cyd@stupidchicken.com>
+
+       * grammars: New directory.
+
 2011-07-28  Andreas Schwab  <schwab@linux-m68k.org>
 
        * NEWS: Document ## and #:.
diff --git a/etc/grammars/README b/etc/grammars/README
new file mode 100644 (file)
index 0000000..c8328bb
--- /dev/null
@@ -0,0 +1,20 @@
+This directory contains grammar files in Bison and Wisent, used to
+generate the parser data in the lisp/semantic/bovine/ and
+lisp/semantic/wisent/ directories.  You can run the parser generators
+with
+
+emacs -batch --no-site-file -l bovine-grammar.el -f semantic-mode \
+ -f semantic-grammar-batch-build-packages *.by
+
+emacs -batch --no-site-file -l wisent-grammar.el -f semantic-mode \
+ -f semantic-grammar-batch-build-packages *.wy
+
+The output files were subsequently edited by hand to fix copyright
+headers, variable names (to follow library name conventions), and
+feature names.  These changes do not alter the code logic, and can be
+viewed by diffing to the files in lisp/semantic/bovine/ and
+lisp/semantic/wisent/.
+
+Currently, the parser files in lisp/ are not generated directly from
+these grammar files when making Emacs.  This state of affairs, and the
+contents of this directory, will change in a future version of Emacs.
diff --git a/etc/grammars/bovine-grammar.el b/etc/grammars/bovine-grammar.el
new file mode 100644 (file)
index 0000000..5a94860
--- /dev/null
@@ -0,0 +1,438 @@
+;;; bovine-grammar.el --- Bovine's input grammar mode
+;;
+;; Copyright (C) 2002-2011 Free Software Foundation, Inc.
+;;
+;; Author: David Ponce <david@dponce.com>
+;; Maintainer: David Ponce <david@dponce.com>
+;; Created: 26 Aug 2002
+;; Keywords: syntax
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; Major mode for editing Bovine's input grammar (.by) files.
+
+;;; History:
+
+;;; Code:
+(require 'semantic)
+(require 'semantic/grammar)
+(require 'semantic/find)
+(require 'semantic/lex)
+(require 'semantic/wisent)
+(require 'semantic/bovine)
+
+(defun bovine-grammar-EXPAND (bounds nonterm)
+  "Expand call to EXPAND grammar macro.
+Return the form to parse from within a nonterminal between BOUNDS.
+NONTERM is the nonterminal symbol to start with."
+  `(semantic-bovinate-from-nonterminal
+    (car ,bounds) (cdr ,bounds) ',nonterm))
+
+(defun bovine-grammar-EXPANDFULL (bounds nonterm)
+  "Expand call to EXPANDFULL grammar macro.
+Return the form to recursively parse the area between BOUNDS.
+NONTERM is the nonterminal symbol to start with."
+  `(semantic-parse-region
+    (car ,bounds) (cdr ,bounds) ',nonterm 1))
+
+(defun bovine-grammar-TAG (name class &rest attributes)
+  "Expand call to TAG grammar macro.
+Return the form to create a generic semantic tag.
+See the function `semantic-tag' for the meaning of arguments NAME,
+CLASS and ATTRIBUTES."
+  `(semantic-tag ,name ,class ,@attributes))
+
+(defun bovine-grammar-VARIABLE-TAG (name type default-value &rest attributes)
+  "Expand call to VARIABLE-TAG grammar macro.
+Return the form to create a semantic tag of class variable.
+See the function `semantic-tag-new-variable' for the meaning of
+arguments NAME, TYPE, DEFAULT-VALUE and ATTRIBUTES."
+  `(semantic-tag-new-variable ,name ,type ,default-value ,@attributes))
+
+(defun bovine-grammar-FUNCTION-TAG (name type arg-list &rest attributes)
+  "Expand call to FUNCTION-TAG grammar macro.
+Return the form to create a semantic tag of class function.
+See the function `semantic-tag-new-function' for the meaning of
+arguments NAME, TYPE, ARG-LIST and ATTRIBUTES."
+  `(semantic-tag-new-function ,name ,type ,arg-list ,@attributes))
+
+(defun bovine-grammar-TYPE-TAG (name type members parents &rest attributes)
+  "Expand call to TYPE-TAG grammar macro.
+Return the form to create a semantic tag of class type.
+See the function `semantic-tag-new-type' for the meaning of arguments
+NAME, TYPE, MEMBERS, PARENTS and ATTRIBUTES."
+  `(semantic-tag-new-type ,name ,type ,members ,parents ,@attributes))
+
+(defun bovine-grammar-INCLUDE-TAG (name system-flag &rest attributes)
+  "Expand call to INCLUDE-TAG grammar macro.
+Return the form to create a semantic tag of class include.
+See the function `semantic-tag-new-include' for the meaning of
+arguments NAME, SYSTEM-FLAG and ATTRIBUTES."
+  `(semantic-tag-new-include ,name ,system-flag ,@attributes))
+
+(defun bovine-grammar-PACKAGE-TAG (name detail &rest attributes)
+  "Expand call to PACKAGE-TAG grammar macro.
+Return the form to create a semantic tag of class package.
+See the function `semantic-tag-new-package' for the meaning of
+arguments NAME, DETAIL and ATTRIBUTES."
+  `(semantic-tag-new-package ,name ,detail ,@attributes))
+
+(defun bovine-grammar-CODE-TAG (name detail &rest attributes)
+  "Expand call to CODE-TAG grammar macro.
+Return the form to create a semantic tag of class code.
+See the function `semantic-tag-new-code' for the meaning of arguments
+NAME, DETAIL and ATTRIBUTES."
+  `(semantic-tag-new-code ,name ,detail ,@attributes))
+
+(defun bovine-grammar-ALIAS-TAG (name aliasclass definition &rest attributes)
+  "Expand call to ALIAS-TAG grammar macro.
+Return the form to create a semantic tag of class alias.
+See the function `semantic-tag-new-alias' for the meaning of arguments
+NAME, ALIASCLASS, DEFINITION and ATTRIBUTES."
+  `(semantic-tag-new-alias ,name ,aliasclass ,definition ,@attributes))
+
+;; Cache of macro definitions currently in use.
+(defvar bovine--grammar-macros nil)
+
+(defun bovine-grammar-expand-form (form quotemode &optional inplace)
+  "Expand FORM into a new one suitable to the bovine parser.
+FORM is a list in which we are substituting.
+Argument QUOTEMODE is non-nil if we are in backquote mode.
+When non-nil, optional argument INPLACE indicates that FORM is being
+expanded from elsewhere."
+  (when (eq (car form) 'quote)
+    (setq form (cdr form))
+    (cond
+     ((and (= (length form) 1) (listp (car form)))
+      (insert "\n(append")
+      (bovine-grammar-expand-form (car form) quotemode nil)
+      (insert ")")
+      (setq form nil inplace nil)
+      )
+     ((and (= (length form) 1) (symbolp (car form)))
+      (insert "\n'" (symbol-name (car form)))
+      (setq form nil inplace nil)
+      )
+     (t
+      (insert "\n(list")
+      (setq inplace t)
+      )))
+  (let ((macro (assq (car form) bovine--grammar-macros))
+        inlist first n q x)
+    (if macro
+        (bovine-grammar-expand-form
+         (apply (cdr macro) (cdr form))
+         quotemode t)
+      (if inplace (insert "\n("))
+      (while form
+        (setq first (car form)
+              form  (cdr form))
+        (cond
+         ((eq first nil)
+          (when (and (not inlist) (not inplace))
+            (insert "\n(list")
+            (setq inlist t))
+          (insert " nil")
+          )
+         ((listp first)
+          ;;(let ((fn (and (symbolp (caar form)) (fboundp (caar form)))))
+          (when (and (not inlist) (not inplace))
+            (insert "\n(list")
+            (setq inlist t))
+          ;;(if (and inplace (not fn) (not (eq (caar form) 'EXPAND)))
+          ;;    (insert " (append"))
+          (bovine-grammar-expand-form
+           first quotemode t) ;;(and fn (not (eq fn 'quote))))
+          ;;(if (and inplace (not fn) (not (eq (caar form) 'EXPAND)))
+          ;;    (insert  ")"))
+          ;;)
+          )
+         ((symbolp first)
+          (setq n (symbol-name first)   ;the name
+                q quotemode             ;implied quote flag
+                x nil)                  ;expand flag
+          (if (eq (aref n 0) ?,)
+              (if quotemode
+                  ;; backquote mode needs the @
+                  (if (eq (aref n 1) ?@)
+                      (setq n (substring n 2)
+                            q nil
+                            x t)
+                    ;; non backquote mode behaves normally.
+                    (setq n (substring n 1)
+                          q nil))
+                (setq n (substring n 1)
+                      x t)))
+          (if (string= n "")
+              (progn
+                ;; We expand only the next item in place (a list?)
+                ;; A regular inline-list...
+                (bovine-grammar-expand-form (car form) quotemode t)
+                (setq form (cdr form)))
+            (if (and (eq (aref n 0) ?$)
+                     ;; Don't expand $ tokens in implied quote mode.
+                     ;; This acts like quoting in other symbols.
+                     (not q))
+                (progn
+                  (cond
+                   ((and (not x) (not inlist) (not inplace))
+                    (insert "\n(list"))
+                   ((and x inlist (not inplace))
+                    (insert ")")
+                    (setq inlist nil)))
+                  (insert "\n(nth " (int-to-string
+                                     (1- (string-to-number
+                                          (substring n 1))))
+                          " vals)")
+                  (and (not x) (not inplace)
+                       (setq inlist t)))
+
+              (when (and (not inlist) (not inplace))
+                (insert "\n(list")
+                (setq inlist t))
+              (or (char-equal (char-before) ?\()
+                  (insert " "))
+              (insert (if (or inplace (eq first t))
+                          "" "'")
+                      n))) ;; " "
+          )
+         (t
+          (when (and (not inlist) (not inplace))
+            (insert "\n(list")
+            (setq inlist t))
+          (insert (format "\n%S" first))
+          )
+         ))
+      (if inlist (insert ")"))
+      (if inplace (insert ")")))
+    ))
+
+(defun bovine-grammar-expand-action (textform quotemode)
+  "Expand semantic action string TEXTFORM into Lisp code.
+QUOTEMODE is the mode in which quoted symbols are slurred."
+  (if (string= "" textform)
+      nil
+    (let ((sexp (read textform)))
+      ;; We converted the lambda string into a list.  Now write it
+      ;; out as the bovine lambda expression, and do macro-like
+      ;; conversion upon it.
+      (insert "\n")
+      (cond
+       ((eq (car sexp) 'EXPAND)
+        (insert ",(lambda (vals start end)")
+        ;; The EXPAND macro definition is mandatory
+        (bovine-grammar-expand-form
+         (apply (cdr (assq 'EXPAND bovine--grammar-macros)) (cdr sexp))
+         quotemode t)
+        )
+       ((and (listp (car sexp)) (eq (caar sexp) 'EVAL))
+        ;; The user wants to evaluate the following args.
+        ;; Use a simpler expander
+        )
+       (t
+        (insert ",(semantic-lambda")
+        (bovine-grammar-expand-form sexp quotemode)
+        ))
+      (insert ")\n")))
+)
+
+(defun bovine-grammar-parsetable-builder ()
+  "Return the parser table expression as a string value.
+The format of a bovine parser table is:
+
+ ( ( NONTERMINAL-SYMBOL1 MATCH-LIST1 )
+   ( NONTERMINAL-SYMBOL2 MATCH-LIST2 )
+   ...
+   ( NONTERMINAL-SYMBOLn MATCH-LISTn )
+
+Where each NONTERMINAL-SYMBOL is an artificial symbol which can appear
+in any child state.  As a starting place, one of the NONTERMINAL-SYMBOLS
+must be `bovine-toplevel'.
+
+A MATCH-LIST is a list of possible matches of the form:
+
+ ( STATE-LIST1
+   STATE-LIST2
+   ...
+   STATE-LISTN )
+
+where STATE-LIST is of the form:
+  ( TYPE1 [ \"VALUE1\" ] TYPE2 [ \"VALUE2\" ] ... LAMBDA )
+
+where TYPE is one of the returned types of the token stream.
+VALUE is a value, or range of values to match against.  For
+example, a SYMBOL might need to match \"foo\".  Some TYPES will not
+have matching criteria.
+
+LAMBDA is a lambda expression which is evaled with the text of the
+type when it is found.  It is passed the list of all buffer text
+elements found since the last lambda expression.  It should return a
+semantic element (see below.)
+
+For consistency between languages, try to use common return values
+from your parser.  Please reference the chapter \"Writing Parsers\" in
+the \"Language Support Developer's Guide -\" in the semantic texinfo
+manual."
+  (let* ((start      (semantic-grammar-start))
+         (scopestart (semantic-grammar-scopestart))
+         (quotemode  (semantic-grammar-quotemode))
+         (tags       (semantic-find-tags-by-class
+                      'token (current-buffer)))
+         (nterms     (semantic-find-tags-by-class
+                      'nonterminal (current-buffer)))
+         ;; Setup the cache of macro definitions.
+         (bovine--grammar-macros (semantic-grammar-macros))
+         nterm rules items item actn prec tag type regex)
+
+    ;; Check some trivial things
+    (cond
+     ((null nterms)
+      (error "Bad input grammar"))
+     (start
+      (if (cdr start)
+          (message "Extra start symbols %S ignored" (cdr start)))
+      (setq start (symbol-name (car start)))
+      (unless (semantic-find-first-tag-by-name start nterms)
+        (error "start symbol `%s' has no rule" start)))
+     (t
+      ;; Default to the first grammar rule.
+      (setq start (semantic-tag-name (car nterms)))))
+    (when scopestart
+      (setq scopestart (symbol-name scopestart))
+      (unless (semantic-find-first-tag-by-name scopestart nterms)
+        (error "scopestart symbol `%s' has no rule" scopestart)))
+
+    ;; Generate the grammar Lisp form.
+    (with-temp-buffer
+      (erase-buffer)
+      (insert "`(")
+      ;; Insert the start/scopestart rules
+      (insert "\n(bovine-toplevel \n("
+              start
+              ")\n) ;; end bovine-toplevel\n")
+      (when scopestart
+        (insert "\n(bovine-inner-scope \n("
+                scopestart
+                ")\n) ;; end bovine-inner-scope\n"))
+      ;; Process each nonterminal
+      (while nterms
+        (setq nterm  (car nterms)
+              ;; We can't use the override form because the current buffer
+              ;; is not the originator of the tag.
+              rules  (semantic-tag-components-semantic-grammar-mode nterm)
+              nterm  (semantic-tag-name nterm)
+              nterms (cdr nterms))
+        (when (member nterm '("bovine-toplevel" "bovine-inner-scope"))
+          (error "`%s' is a reserved internal name" nterm))
+        (insert "\n(" nterm)
+        ;; Process each rule
+        (while rules
+          (setq items (semantic-tag-get-attribute (car rules) :value)
+                prec  (semantic-tag-get-attribute (car rules) :prec)
+                actn  (semantic-tag-get-attribute (car rules) :expr)
+                rules (cdr rules))
+          ;; Process each item
+          (insert "\n(")
+          (if (null items)
+              ;; EMPTY rule
+              (insert ";;EMPTY" (if actn "" "\n"))
+            ;; Expand items
+            (while items
+              (setq item  (car items)
+                    items (cdr items))
+              (if (consp item) ;; mid-rule action
+                  (message "Mid-rule action %S ignored" item)
+                (or (char-equal (char-before) ?\()
+                    (insert "\n"))
+                (cond
+                 ((member item '("bovine-toplevel" "bovine-inner-scope"))
+                  (error "`%s' is a reserved internal name" item))
+                 ;; Replace ITEM by its %token definition.
+                 ;; If a '%token TYPE ITEM [REGEX]' definition exists
+                 ;; in the grammar, ITEM is replaced by TYPE [REGEX].
+                 ((setq tag (semantic-find-first-tag-by-name
+                             item tags)
+                        type  (semantic-tag-get-attribute tag :type))
+                  (insert type)
+                  (if (setq regex (semantic-tag-get-attribute tag :value))
+                      (insert (format "\n%S" regex))))
+                 ;; Don't change ITEM
+                 (t
+                  (insert (semantic-grammar-item-text item)))
+                 ))))
+          (if prec
+              (message "%%prec %S ignored" prec))
+          (if actn
+              (bovine-grammar-expand-action actn quotemode))
+          (insert ")"))
+        (insert "\n) ;; end " nterm "\n"))
+      (insert ")\n")
+      (buffer-string))))
+
+(defun bovine-grammar-setupcode-builder ()
+  "Return the text of the setup code."
+  (format
+   "(setq semantic--parse-table %s\n\
+          semantic-debug-parser-source %S\n\
+          semantic-debug-parser-class 'semantic-bovine-debug-parser
+          semantic-flex-keywords-obarray %s\n\
+          %s)"
+   (semantic-grammar-parsetable)
+   (buffer-name)
+   (semantic-grammar-keywordtable)
+   (let ((mode (semantic-grammar-languagemode)))
+     ;; Is there more than one major mode?
+     (if (and (listp mode) (> (length mode) 1))
+         (format "semantic-equivalent-major-modes '%S\n" mode)
+       ""))))
+
+(defvar bovine-grammar-menu
+  '("BY Grammar"
+    )
+  "BY mode specific grammar menu.
+Menu items are appended to the common grammar menu.")
+
+(define-derived-mode bovine-grammar-mode semantic-grammar-mode "BY"
+  "Major mode for editing Bovine grammars."
+  (semantic-grammar-setup-menu bovine-grammar-menu)
+  (semantic-install-function-overrides
+   '((grammar-parsetable-builder . bovine-grammar-parsetable-builder)
+     (grammar-setupcode-builder  . bovine-grammar-setupcode-builder)
+     )))
+
+(add-to-list 'auto-mode-alist '("\\.by$" . bovine-grammar-mode))
+
+(defvar-mode-local bovine-grammar-mode semantic-grammar-macros
+  '(
+    (ASSOC          . semantic-grammar-ASSOC)
+    (EXPAND         . bovine-grammar-EXPAND)
+    (EXPANDFULL     . bovine-grammar-EXPANDFULL)
+    (TAG            . bovine-grammar-TAG)
+    (VARIABLE-TAG   . bovine-grammar-VARIABLE-TAG)
+    (FUNCTION-TAG   . bovine-grammar-FUNCTION-TAG)
+    (TYPE-TAG       . bovine-grammar-TYPE-TAG)
+    (INCLUDE-TAG    . bovine-grammar-INCLUDE-TAG)
+    (PACKAGE-TAG    . bovine-grammar-PACKAGE-TAG)
+    (CODE-TAG       . bovine-grammar-CODE-TAG)
+    (ALIAS-TAG      . bovine-grammar-ALIAS-TAG)
+    )
+  "Semantic grammar macros used in bovine grammars.")
+
+(provide 'semantic/bovine/grammar)
+
+;;; bovine-grammar.el ends here
diff --git a/etc/grammars/c.by b/etc/grammars/c.by
new file mode 100644 (file)
index 0000000..1797827
--- /dev/null
@@ -0,0 +1,1202 @@
+;;; c.by -- LL grammar for C/C++ language specification
+
+;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;;
+;; Author: Eric M. Ludlam <zappo@gnu.org>
+;;         David Ponce <david@dponce.com>
+;;         Klaus Berndl <klaus.berndl@sdm.de>
+;;
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;; TODO:  From Nate Schley
+;; >  * Can't parse signature element: "const char* const rmc_ClrTxt"
+;; >  * Can't parse signature element: "char* const dellog_ClrTxt"
+;; >  * Can't parse signature element: "const char* dellog_SetTxt"
+;; >  * Can't parse signature element: "const RmcCmdSSPADetailedStatus& status"
+;; >
+;; > And FWIW I have seen the following argument cases not handled, even
+;; > with no leading/trailing spaces in the split:
+;; >
+;; >  * Can't parse signature element: "const bool currentAlarmStatus"
+;; >  * Can't parse signature element: "unsigned char mode"
+;; >  * Can't parse signature element: "TskTimingTask* tsktimingtask"
+;; >  * Can't parse signature element: "unsigned char htrStatus"
+;; >  * Can't parse signature element: "char trackPower[]"
+;; >  * Can't parse signature element: "const RmcCmdMCDetailedStatus& status"
+;; >  * Can't parse signature element: "RmcBucStatus* rftBucStatus"
+
+%package semantic-c-by
+
+%languagemode  c-mode c++-mode
+%start         declaration
+%scopestart    codeblock
+
+%token <punctuation>   HASH       "\\`[#]\\'"
+%token <punctuation>   PERIOD     "\\`[.]\\'"
+%token <punctuation>   COLON      "\\`[:]\\'"
+%token <punctuation>   SEMICOLON  "\\`[;]\\'"
+%token <punctuation>   STAR       "\\`[*]\\'"
+%token <punctuation>   AMPERSAND  "\\`[&]\\'"
+%token <punctuation>   DIVIDE     "\\`[/]\\'"
+%token <punctuation>   PLUS       "\\`[+]\\'"
+%token <punctuation>   MINUS      "\\`[-]\\'"
+%token <punctuation>   BANG       "\\`[!]\\'"
+%token <punctuation>   EQUAL      "\\`[=]\\'"
+%token <punctuation>   LESS       "\\`[<]\\'"
+%token <punctuation>   GREATER    "\\`[>]\\'"
+%token <punctuation>   COMA       "\\`[,]\\'"
+%token <punctuation>   TILDE      "\\`[~]\\'"
+%token <punctuation>   MOD        "\\`[%]\\'"
+%token <punctuation>   HAT        "\\`\\^\\'"
+%token <punctuation>   OR         "\\`[|]\\'"
+%token <string>        C          "\"C\""
+%token <string>        CPP        "\"C\\+\\+\""
+%token <number>        ZERO       "^0$"
+%token <symbol>        RESTRICT   "\\<\\(__\\)?restrict\\>"
+%token <open-paren>    LPAREN     "("
+%token <close-paren>   RPAREN     ")"
+%token <open-paren>    LBRACE     "{"
+%token <close-paren>   RBRACE     "}"
+%token <semantic-list> BRACK_BLCK "\\[.*\\]$"
+%token <semantic-list> PAREN_BLCK "^("
+%token <semantic-list> BRACE_BLCK "^{"
+%token <semantic-list> VOID_BLCK  "^(void)$"
+%token <semantic-list> PARENS     "()"
+%token <semantic-list> BRACKETS   "\\[\\]"
+
+%token EXTERN "extern"
+%put EXTERN summary "Declaration Modifier: extern <type> <name> ..."
+%token STATIC "static"
+%put STATIC summary "Declaration Modifier: static <type> <name> ..."
+%token CONST "const"
+%put CONST summary "Declaration Modifier: const <type> <name> ..."
+%token VOLATILE "volatile"
+%put VOLATILE summary "Declaration Modifier: volatile <type> <name> ..."
+%token REGISTER "register"
+%put REGISTER summary "Declaration Modifier: register <type> <name> ..."
+%token SIGNED "signed"
+%put SIGNED summary "Numeric Type Modifier: signed <numeric type> <name> ..."
+%token UNSIGNED "unsigned"
+%put UNSIGNED summary "Numeric Type Modifier: unsigned <numeric type> <name> ..."
+
+%token INLINE "inline"
+%put INLINE summary "Function Modifier: inline <return  type> <name>(...) {...};"
+%token VIRTUAL "virtual"
+%put VIRTUAL summary "Method Modifier: virtual <type> <name>(...) ..."
+%token MUTABLE "mutable"
+%put MUTABLE summary "Member Declaration Modifier: mutable <type> <name> ..."
+
+%token STRUCT "struct"
+%put STRUCT summary "Structure Type Declaration: struct [name] { ... };"
+%token UNION "union"
+%put UNION summary "Union Type Declaration: union [name] { ... };"
+%token ENUM "enum"
+%put ENUM summary "Enumeration Type Declaration: enum [name] { ... };"
+%token TYPEDEF "typedef"
+%put TYPEDEF summary "Arbitrary Type Declaration: typedef <typedeclaration> <name>;"
+%token CLASS "class"
+%put CLASS summary "Class Declaration: class <name>[:parents] { ... };"
+%token TYPENAME "typename"
+%put TYPENAME summary "typename is used to handle a qualified name as a typename;"
+%token NAMESPACE "namespace"
+%put NAMESPACE summary "Namespace Declaration: namespace <name> { ... };"
+%token USING "using"
+%put USING summary "using <namespace>;"
+
+%token NEW "new"
+%put NEW summary "new <classname>();"
+%token DELETE "delete"
+%put DELETE summary "delete <object>;"
+
+;; Despite this, this parser can find templates by ignoring the TEMPLATE
+;; keyword, and finding the class/method being templateized.
+%token TEMPLATE "template"
+%put TEMPLATE summary "template <class TYPE ...> TYPE_OR_FUNCTION"
+
+%token THROW "throw"
+%put THROW summary "<type> <methoddef> (<method args>) throw (<exception>) ..."
+%token REENTRANT "reentrant"
+%put REENTRANT summary "<type> <methoddef> (<method args>) reentrant ..."
+%token TRY "try"
+%token CATCH "catch"
+%put { TRY CATCH } summary "try { <body> } catch { <catch code> }"
+
+;; Leave these alone for now.
+%token OPERATOR "operator"
+%token PUBLIC "public"
+%token PRIVATE "private"
+%token PROTECTED "protected"
+%token FRIEND "friend"
+%put FRIEND summary "friend class <CLASSNAME>"
+
+;; These aren't used for parsing, but is a useful place to describe the keywords.
+%token IF "if"
+%token ELSE "else"
+%put {IF ELSE} summary  "if (<condition>) { code } [ else { code } ]"
+
+%token DO "do"
+%token WHILE "while"
+%put DO summary " do { code } while (<condition>);"
+%put WHILE summary "do { code } while (<condition>); or while (<condition>) { code };"
+
+%token FOR "for"
+%put FOR summary "for(<init>; <condition>; <increment>) { code }"
+
+%token SWITCH "switch"
+%token CASE "case"
+%token DEFAULT "default"
+%put {SWITCH CASE DEFAULT} summary
+"switch (<variable>) { case <constvalue>: code; ... default: code; }"
+
+%token RETURN "return"
+%put RETURN summary "return <value>;"
+
+%token BREAK "break"
+%put BREAK summary "Non-local exit within a loop or switch (for, do/while, switch): break;"
+%token CONTINUE "continue"
+%put CONTINUE summary "Non-local continue within a loop (for, do/while): continue;"
+
+%token SIZEOF "sizeof"
+%put SIZEOF summary "Compile time macro: sizeof(<type or variable>) // size in bytes"
+
+;; Types
+%token VOID "void"
+%put VOID summary "Built in typeless type: void"
+%token CHAR "char"
+%put CHAR summary "Integral Character Type: (0 to 256)"
+%token WCHAR "wchar_t"
+%put WCHAR summary "Wide Character Type"
+%token SHORT "short"
+%put SHORT summary "Integral Primitive Type: (-32768 to 32767)"
+%token INT "int"
+%put INT summary "Integral Primitive Type: (-2147483648 to 2147483647)"
+%token LONG "long"
+%put LONG summary "Integral primitive type (-9223372036854775808 to 9223372036854775807)"
+%token FLOAT "float"
+%put FLOAT summary "Primitive floating-point type (single-precision 32-bit IEEE 754)"
+%token DOUBLE "double"
+%put DOUBLE summary "Primitive floating-point type (double-precision 64-bit IEEE 754)"
+%token BOOL "bool"
+%put BOOL summary "Primitive boolean type"
+
+%token UNDERP "_P"
+%token UNDERUNDERP "__P"
+%put UNDERP summary "Common macro to eliminate prototype compatibility on some compilers"
+%put UNDERUNDERP summary "Common macro to eliminate prototype compatibility on some compilers"
+
+%%
+
+declaration
+  : macro
+  | type
+ ;; TODO: Klaus Berndl: Is the define here necessary or even wrong?
+ ;; Is this part not already covered by macro??
+  | define
+  | var-or-fun
+  | extern-c
+  | template
+  | using
+  ;
+
+codeblock
+  : define
+  | codeblock-var-or-fun
+  | type ;; type is less likely to be used here.
+  | using
+  ;
+
+extern-c-contents
+  : open-paren
+    ( nil )
+  | declaration
+  | close-paren
+    ( nil )
+  ;
+
+extern-c
+  : EXTERN C semantic-list
+ ;; Extern C commands which contain a list need to have the
+ ;; entries of the list extracted, and spliced into the main
+ ;; list of entries.  This must be done via the function
+ ;; that expands singular nonterminals, such as int x,y;
+    (TAG "C" 'extern :members (EXPANDFULL $3 extern-c-contents) )
+  | EXTERN CPP semantic-list
+    (TAG "C" 'extern :members (EXPANDFULL $3 extern-c-contents) )
+  | EXTERN C
+ ;; A plain extern "C" call should add something to the token,
+ ;; but just strip it from the buffer here for now.
+    ( nil )
+  | EXTERN CPP
+    ( nil )
+  ;
+
+macro
+  : spp-macro-def
+    (VARIABLE-TAG $1 nil nil :constant-flag t )
+  | spp-system-include
+    (INCLUDE-TAG $1 t)
+  | spp-include
+    (INCLUDE-TAG $1 nil)
+  ;
+
+;; This is used in struct parts.
+define
+  : spp-macro-def
+    (VARIABLE-TAG $1 nil nil :constant-flag t)
+  | spp-macro-undef
+    ( nil )
+  ;
+
+;; In C++, structures can have the same things as classes.
+;; So delete this somday in the figure.
+;;
+;;structparts : semantic-list
+;;            (EXPANDFULL $1 structsubparts)
+;;          ;
+;;
+;;structsubparts : LBRACE
+;;               ( nil )
+;;             | RBRACE
+;;               ( nil )
+;;             | var-or-fun
+;;             | define
+;;             ;; sometimes there are defines in structs.
+;;             ;
+
+unionparts
+  : semantic-list
+    (EXPANDFULL $1 classsubparts)
+  ;
+
+opt-symbol
+  : symbol
+  | ;;EMPTY
+  ;
+
+;; @todo - support 'friend' construct.
+classsubparts
+  : LBRACE
+    ( nil )
+  | RBRACE
+    ( nil )
+  | class-protection opt-symbol COLON
+ ;; For QT, they may put a `slot' keyword between the protection
+ ;; and the COLON.  @todo - Have the QT stuff use macros.
+    (TAG (car $1) 'label)
+  | var-or-fun
+  | FRIEND func-decl
+    (TAG (car $2) 'friend)
+  | FRIEND CLASS symbol
+    (TAG $3 'friend)
+  | type
+  | define
+  | template
+  | ;;EMPTY
+  ;
+
+opt-class-parents
+  : COLON class-parents opt-template-specifier
+    ( $2 )
+  | ;;EMPTY
+    ( )
+  ;
+
+one-class-parent
+  : opt-class-protection opt-class-declmods namespace-symbol
+    (TYPE-TAG (car $3) "class" nil nil :protection (car $1))
+  | opt-class-declmods opt-class-protection namespace-symbol
+    (TYPE-TAG (car $3) "class" nil nil :protection (car $2))
+  ;
+
+class-parents
+  : one-class-parent COMA class-parents
+    ( ,(cons ,$1 $3 ) )
+  | one-class-parent
+    ( $1 )
+  ;
+
+opt-class-declmods
+  : class-declmods opt-class-declmods
+    ( nil )
+  | ;;EMPTY
+  ;
+
+class-declmods
+  : VIRTUAL
+  ;
+
+class-protection
+  : PUBLIC
+  | PRIVATE
+  | PROTECTED
+  ;
+
+opt-class-protection
+  : class-protection
+    ( ,$1 )
+  | ;;EMPTY - Same as private
+    ( "unspecified" )
+  ;
+
+namespaceparts
+  : semantic-list
+    (EXPANDFULL $1 namespacesubparts)
+  ;
+
+namespacesubparts
+  : LBRACE
+    ( nil )
+  | RBRACE
+    ( nil )
+  | type
+  | var-or-fun
+  | define
+  | class-protection COLON
+    (TAG (car $1) 'label)
+ ;; In C++, this label in a classsubpart represents
+ ;; PUBLIC or PRIVATE bits.  Ignore them for now.
+  | template
+  | using
+  | ;;EMPTY
+  ;
+
+enumparts
+  : semantic-list
+    (EXPANDFULL $1 enumsubparts)
+  ;
+
+enumsubparts
+  : symbol opt-assign
+    (VARIABLE-TAG $1 "int" (car $2) :constant-flag t )
+  | LBRACE
+    ( nil )
+  | RBRACE
+    ( nil )
+  | COMA
+    ( nil )
+  ;
+
+opt-name
+  : symbol
+  | ;;EMPTY
+    ( "" )
+  ;
+
+typesimple
+  : struct-or-class opt-class opt-name opt-template-specifier
+    opt-class-parents semantic-list
+    (TYPE-TAG (car $3) (car $1)
+          (let ((semantic-c-classname (cons (car ,$3) (car ,$1))))
+            (EXPANDFULL $6 classsubparts))
+          $5
+          :template-specifier $4
+          :parent (car ,$2))
+  | struct-or-class opt-class opt-name opt-template-specifier
+    opt-class-parents
+    (TYPE-TAG (car $3) (car $1) nil $5
+              :template-specifier $4
+             :prototype t
+              :parent (car ,$2))
+  | UNION opt-class opt-name unionparts
+    (TYPE-TAG (car $3) $1 $4 nil
+              :parent (car ,$2))
+  | ENUM opt-class opt-name enumparts
+    (TYPE-TAG (car $3) $1 $4 nil
+              :parent (car ,$2))
+ ;; Klaus Berndl: a typedef can be a typeformbase with all this
+ ;; declmods stuff.
+  | TYPEDEF declmods typeformbase cv-declmods typedef-symbol-list
+ ;;;; We put the type this typedef renames into PARENT
+ ;;;; but will move it in the expand function.
+    (TYPE-TAG $5 $1 nil (list $3) )
+  ;
+
+typedef-symbol-list
+  : typedefname COMA typedef-symbol-list
+    ( ,(cons $1 $3) )
+  | typedefname
+    ( $1 )
+  ;
+
+;; TODO: Klaus Berndl: symbol -> namespace-symbol?!  Answer: Probably
+;; symbol is correct here!
+typedefname
+  : opt-stars symbol opt-bits opt-array
+    ( $1 $2 )
+  ;
+
+struct-or-class
+  : STRUCT
+  | CLASS
+  ;
+
+type
+  : typesimple SEMICOLON
+    ( ,$1 )
+ ;; named namespaces like "namespace XXX {"
+  | NAMESPACE symbol namespaceparts
+    (TYPE-TAG $2 $1 $3 nil )
+ ;; unnamed namespaces like "namespace {"
+  | NAMESPACE namespaceparts
+    (TYPE-TAG "unnamed" $1 $2 nil )
+ ;; David Engster: namespace alias like "namespace foo = bar;"
+  | NAMESPACE symbol EQUAL typeformbase SEMICOLON
+    (TYPE-TAG $2 $1 (list (TYPE-TAG (car $4) $1 nil nil)) nil :kind 'alias )
+  ;
+
+;; Klaus Berndl: We must parse "using namespace XXX" too
+
+;; Using is vaguely like an include statement in the named portions
+;; of the code.  We should probably specify a new token type for this.
+
+using
+  : USING usingname SEMICOLON
+    (TAG (car $2) 'using :type ,$2 )
+  ;
+
+;; Jan Moringen: Differentiate between 'using' and 'using namespace'
+;; Adapted to creating type tags by EML.
+usingname
+  : typeformbase
+    (TYPE-TAG (car $1) "class" nil nil :prototype t)
+  | NAMESPACE typeformbase
+    (TYPE-TAG (car $2) "namespace" nil nil :prototype t)
+  ;
+
+template
+  : TEMPLATE template-specifier opt-friend template-definition
+    ( ,(semantic-c-reconstitute-template $4 ,$2) )
+  ;
+
+opt-friend
+  : FRIEND
+  | ;;EMPTY
+  ;
+
+opt-template-specifier
+  : template-specifier
+    ( ,$1 )
+  | ;;EMPTY
+    ( )
+  ;
+
+template-specifier
+  : LESS template-specifier-types GREATER
+    ( ,$2 )
+  ;
+
+template-specifier-types
+  : template-var template-specifier-type-list
+    ( ,(cons ,$1 ,$2 ) )
+  | ;;EMPTY
+  ;
+
+template-specifier-type-list
+  : COMA template-specifier-types
+    ( ,$2 )
+  | ;;EMPTY
+    ( )
+  ;
+
+;; template-var
+;;   : template-type opt-stars opt-template-equal
+;;     ( ,(cons (concat (car $1) (make-string (car ,$2) ?*))
+;;              (cdr $1)))
+;;  ;; Klaus Berndl: for template-types the template-var can also be
+;;  ;; literals or constants.  Example: map<ClassX, ClassY, 10>
+;;  ;; map_size10_var; This parses also template<class T, 0> which is
+;;  ;; nonsense but who cares....
+;;   | string
+;;     ( $1 )
+;;   | number
+;;     ( $1 )
+;;   ;
+
+template-var
+  :
+ ;; Klaus Berndl: The following handles all template-vars of
+ ;; template-definitions
+    template-type opt-template-equal
+    ( ,(cons (car $1) (cdr $1)) )
+ ;; Klaus Berndl: for template-types the template-var can also be
+ ;; literals or constants.
+ ;; Example: map<ClassX, ClassY, 10> map_size10_var; This parses also
+ ;; template<class T, 0> which is nonsense but who cares....
+  | string
+    ( $1 )
+  | number
+    ( $1 )
+ ;; Klaus Berndl: In template-types arguments can be any symbols with
+ ;; optional address-operator (&) and optional dereferencing operator
+ ;; (*).  Example map<ClassX, ClassY, *size_var_ptr> sized_map_var.
+  | opt-stars opt-ref namespace-symbol
+    ( ,$3 )
+ ;; Some code can compile down into a number, but starts out as an
+ ;; expression, such as "sizeof(a)", or (sizeof(a)/sizeof(b))
+  | semantic-list
+    ( $1 )
+  | SIZEOF semantic-list
+    ( $2 )
+  ;
+
+opt-template-equal
+  : EQUAL symbol LESS template-specifier-types GREATER
+    ( $2 )
+  | EQUAL symbol
+    ( $2 )
+  | ;;EMPTY
+    ( )
+  ;
+
+template-type
+  : CLASS symbol
+    (TYPE-TAG $2 "class" nil nil )
+  | STRUCT symbol
+    (TYPE-TAG $2 "struct" nil nil )
+ ;; TODO: Klaus Berndl: For the moment is is ok, that we parse the C++
+ ;; keyword typename as a class....
+  | TYPENAME symbol
+    (TYPE-TAG $2 "class" nil nil)
+ ;; Klaus Berndl: template-types can be all flavors of variable-args
+ ;; but here the argument is ignored, only the type stuff is needed.
+  | declmods typeformbase cv-declmods opt-stars
+    opt-ref variablearg-opt-name
+    (TYPE-TAG (car $2) nil nil nil
+              :constant-flag (if (member "const" (append $1 $3)) t nil)
+              :typemodifiers (delete "const" (append $1 $3))
+              :reference (car ,$5)
+              :pointer (car $4)
+              )
+  ;
+
+template-definition
+  : type
+    ( ,$1 )
+  | var-or-fun
+    ( ,$1 )
+  ;
+
+opt-stars
+  : STAR opt-starmod opt-stars
+    ( (1+ (car $3)) )
+  | ;;EMPTY
+    ( 0 )
+  ;
+
+opt-starmod
+  : STARMOD opt-starmod
+    ( ,(cons (,car ,$1) $2) )
+  | ;;EMPTY
+    ()
+  ;
+
+STARMOD
+  : CONST
+  ;
+
+declmods
+  : DECLMOD declmods
+    ( ,(cons ,(car ,$1) $2 ) )
+  | DECLMOD
+    ( ,$1 )
+  | ;;EMPTY
+    ()
+  ;
+
+DECLMOD
+  : EXTERN
+  | STATIC
+  | CVDECLMOD
+ ;; Klaus Berndl: IMHO signed and unsigned are not decl-modes but
+ ;; these are only valid for some buildin-types like short, int
+ ;; etc... whereas "real" declmods are valid for all types, buildin
+ ;; and user-defined!  SIGNED UNSIGNED
+  | INLINE
+  | REGISTER
+  | FRIEND
+ ;; Klaus Berndl: There can be a few cases where TYPENAME is not
+ ;; allowed in C++-syntax but better than not recognizing the allowed
+ ;; situations.
+  | TYPENAME
+  | METADECLMOD
+ ;; This is a hack in case we are in a class.
+  | VIRTUAL
+  ;
+
+metadeclmod
+  : METADECLMOD
+    ()
+  | ;;EMPTY
+    ()
+  ;
+
+CVDECLMOD
+  : CONST
+  | VOLATILE
+  ;
+
+cv-declmods
+  : CVDECLMOD cv-declmods
+    ( ,(cons ,(car ,$1) $2 ) )
+  | CVDECLMOD
+    ( ,$1 )
+  | ;;EMPTY
+    ()
+  ;
+
+METADECLMOD
+  : VIRTUAL
+  | MUTABLE
+  ;
+
+;; C++: A type can be modified into a reference by "&"
+opt-ref
+  : AMPERSAND
+    ( 1 )
+  | ;;EMPTY
+    ( 0 )
+  ;
+
+typeformbase
+  : typesimple
+    ( ,$1 )
+  | STRUCT symbol
+    (TYPE-TAG $2 $1 nil nil )
+  | UNION symbol
+    (TYPE-TAG $2 $1 nil nil )
+  | ENUM symbol
+    (TYPE-TAG $2 $1 nil nil )
+  | builtintype
+    ( ,$1 )
+  | symbol template-specifier
+    (TYPE-TAG $1 "class" nil nil :template-specifier $2)
+ ;;| namespace-symbol opt-stars opt-template-specifier
+ ;;| namespace-symbol opt-template-specifier
+  | namespace-symbol-for-typeformbase opt-template-specifier
+    (TYPE-TAG (car $1) "class" nil nil
+             :template-specifier $2)
+  | symbol
+    ( $1 )
+  ;
+
+signedmod
+  : UNSIGNED
+  | SIGNED
+  ;
+
+;; Klaus Berndl: builtintype-types was builtintype
+builtintype-types
+  : VOID
+  | CHAR
+ ;; Klaus Berndl: Added WCHAR
+  | WCHAR
+  | SHORT INT
+    ( (concat $1 " " $2) )
+  | SHORT
+  | INT
+  | LONG INT
+    ( (concat $1 " " $2) )
+  | FLOAT
+  | DOUBLE
+  | BOOL
+  | LONG DOUBLE
+    ( (concat $1 " " $2) )
+ ;; TODO: Klaus Berndl: Is there a long long, i think so?!
+  | LONG LONG
+    ( (concat $1 " " $2) )
+  | LONG
+  ;
+
+builtintype
+  : signedmod builtintype-types
+    ( (concat (car $1) " " (car $2)) )
+  | builtintype-types
+    ( ,$1 )
+ ;; Klaus Berndl: unsigned is synonym for unsigned int and signed for
+ ;; signed int. To make this confusing stuff clear we add here the
+ ;; int.
+  | signedmod
+    ( (concat (car $1) " int") )
+  ;
+
+;; Klaus Berndl: This parses also nonsense like "const volatile int
+;; const volatile const const volatile a ..." but IMHO nobody writes
+;; such code. Normaly we shoud define a rule like typeformbase-mode
+;; which exactly defines the different allowed cases and combinations
+;; of declmods (minus the CVDECLMOD) typeformbase and cv-declmods so
+;; we could recognize more invalid code but IMHO this is not worth the
+;; effort...
+codeblock-var-or-fun
+  : declmods typeformbase declmods
+    opt-ref var-or-func-decl
+    ( ,(semantic-c-reconstitute-token ,$5 $1 $2 ) )
+  ;
+
+var-or-fun
+  : codeblock-var-or-fun
+    ( ,$1 )
+ ;; it is possible for a function to not have a type, and
+ ;; it is then assumed to be an int.  How annoying.
+ ;; In C++, this could be a constructor or a destructor.
+ ;; Even more annoying.  Only ever do this for regular
+ ;; top-level items.  Ignore this problem in code blocks
+ ;; so that we don't have to deal with regular code
+ ;; being erroneously converted into types.
+  | declmods var-or-func-decl
+    ( ,(semantic-c-reconstitute-token ,$2 $1 nil ) )
+  ;
+
+var-or-func-decl
+  : func-decl
+    ( ,$1 )
+  | var-decl
+    ( ,$1 )
+  ;
+
+func-decl
+  : opt-stars opt-class opt-destructor functionname
+    opt-template-specifier
+    opt-under-p
+    arg-list
+    opt-post-fcn-modifiers
+    opt-throw
+    opt-initializers
+    fun-or-proto-end
+    ( ,$4 'function
+          ;; Extra stuff goes in here.
+          ;; Continue with the stuff we found in
+          ;; this definition
+          $2 $3 $7 $9 $8 ,$1 ,$11 $5 ,$10)
+  | opt-stars opt-class opt-destructor functionname
+    opt-template-specifier
+    opt-under-p
+ ;; arg-list   - - ini this case, a try implies a fcn.
+    opt-post-fcn-modifiers
+    opt-throw
+    opt-initializers
+    fun-try-end
+    ( ,$4 'function
+          ;; Extra stuff goes in here.
+          ;; Continue with the stuff we found in
+          ;; this definition
+          $2 $3 nil $8 $7 ,$1 ,$10 $5 ,$9)
+  ;
+
+var-decl
+  : varnamelist SEMICOLON
+    ( $1 'variable )
+  ;
+
+opt-under-p
+  : UNDERP
+    ( nil )
+  | UNDERUNDERP
+    ( nil )
+  | ;;EMPTY
+  ;
+
+;; Klaus Berndl: symbol -> namespace-symbol
+opt-initializers
+  : COLON namespace-symbol semantic-list opt-initializers
+  | COMA namespace-symbol semantic-list opt-initializers
+  | ;;EMPTY
+  ;
+
+opt-post-fcn-modifiers
+  : post-fcn-modifiers opt-post-fcn-modifiers
+    ( ,(cons ,$1 $2) )
+  | ;;EMPTY
+    ( nil )
+  ;
+
+post-fcn-modifiers
+  : REENTRANT
+  | CONST
+  ;
+
+opt-throw
+  : THROW semantic-list
+    ( EXPAND $2 throw-exception-list )
+  | ;;EMPTY
+  ;
+
+;; Is this true?  I don't actually know.
+throw-exception-list
+  : namespace-symbol COMA throw-exception-list
+    ( ,(cons (car $1) $3) )
+  | namespace-symbol RPAREN
+    ( ,$1 )
+  | symbol RPAREN
+    ( $1 )
+  | LPAREN throw-exception-list
+    ( ,$2 )
+  | RPAREN
+    (  )
+  ;
+
+opt-bits
+  : COLON number
+    ( $2 )
+  | ;;EMPTY
+    ( nil )
+  ;
+
+opt-array
+  : BRACK_BLCK opt-array
+ ;; Eventually we want to replace the 1 below with a size
+ ;; (if available)
+    ( (cons 1 (car ,$2) ) )
+  | ;;EMPTY
+    ( nil )
+  ;
+
+opt-assign
+  : EQUAL expression
+    ( $2 )
+  | ;;EMPTY
+    ( nil )
+  ;
+
+opt-restrict
+  : RESTRICT
+  | ;;EMPTY
+  ;
+
+;; Klaus Berndl: symbol -> namespace-symbol?! I think so. Can be that
+;; then also some invalid C++-syntax is parsed but this is better than
+;; not parsing valid syntax.
+varname
+  : opt-stars opt-restrict namespace-symbol opt-bits opt-array
+    ( ,$3 ,$1 ,$4 ,$5 )
+  ;
+
+;; I should store more in this def, but leave it simple for now.
+;; Klaus Berndl: const and volatile can be written after the type!
+variablearg
+  : declmods typeformbase cv-declmods opt-ref variablearg-opt-name
+    ( VARIABLE-TAG (list $5) $2 nil
+                   :constant-flag (if (member "const" (append $1 $3)) t nil)
+                   :typemodifiers (delete "const" (append $1 $3))
+                   :reference (car ,$4)
+                   )
+  ;
+
+variablearg-opt-name
+  : varname
+    ( ,$1 )
+ ;; Klaus Berndl: This allows variableargs without a arg-name being
+ ;; parsed correct even if there several pointers (*)
+  | opt-stars
+    ( "" ,$1 nil nil nil )
+  ;
+
+varname-opt-initializer
+  : semantic-list
+  | opt-assign
+  | ;; EMPTY
+  ;
+
+varnamelist
+  : opt-ref varname varname-opt-initializer COMA varnamelist
+    ( ,(cons $2 $5) )
+  | opt-ref varname varname-opt-initializer
+    ( $2 )
+  ;
+
+;; Klaus Berndl: Is necessary to parse stuff like
+;;     class list_of_facts : public list<fact>, public entity
+;; and
+;;     list <shared_ptr<item> >::const_iterator l;
+;; Parses also invalid(?) and senseless(?) c++-syntax like
+;;     symbol<template-spec>::symbol1<template-spec1>::test_iterator
+;; but better parsing too much than to less
+namespace-symbol
+  : symbol opt-template-specifier COLON COLON namespace-symbol
+    ( (concat $1 "::" (car $5)) )
+  | symbol opt-template-specifier
+    ( $1 )
+  ;
+
+;; Don't pull an optional template specifier at the end of the
+;; namespace symbol so that it can be picked up by the type.
+namespace-symbol-for-typeformbase
+  : symbol opt-template-specifier COLON COLON namespace-symbol-for-typeformbase
+    ( (concat $1 "::" (car $5)) )
+  | symbol
+    ( $1 )
+  ;
+;; namespace-symbol
+;;   : symbol COLON COLON namespace-symbol
+;;     ( (concat $1 "::" (car $4)) )
+;;   | symbol
+;;     ( $1 )
+;;   ;
+
+namespace-opt-class
+  : symbol COLON COLON namespace-opt-class
+    ( (concat $1 "::" (car $4)) )
+ ;; Klaus Berndl: We must recognize template-specifiers here so we can
+ ;; parse correctly the method-implementations of template-classes
+ ;; outside the template-class-declaration Example:
+ ;; TemplateClass1<T>::method_1(...)
+  | symbol opt-template-specifier COLON COLON
+    ( $1 )
+  ;
+
+;; Klaus Berndl: The opt-class of a func-decl must be able to
+;; recognize opt-classes with namespaces, e.g.
+;; Test1::Test2::classname::
+opt-class
+  : namespace-opt-class
+    ( ,$1 )
+  | ;;EMPTY
+    ( nil )
+  ;
+
+opt-destructor
+  : TILDE
+    ( t )
+  | ;;EMPTY
+    ( nil )
+  ;
+
+arg-list
+  : PAREN_BLCK knr-arguments
+    ( ,$2 )
+  | PAREN_BLCK
+    (EXPANDFULL $1 arg-sub-list)
+  | VOID_BLCK
+    ( )
+  ;
+
+knr-varnamelist
+  : varname COMA knr-varnamelist
+    ( ,(cons $1 $3) )
+  | varname
+    ( $1 )
+  ;
+
+
+knr-one-variable-decl
+  : declmods typeformbase cv-declmods knr-varnamelist
+    ( VARIABLE-TAG (nreverse $4) $2 nil
+                   :constant-flag (if (member "const" (append $3)) t nil)
+                   :typemodifiers (delete "const" $3)
+                   )
+  ;
+
+knr-arguments
+  : knr-one-variable-decl SEMICOLON knr-arguments
+    ( ,(append (semantic-expand-c-tag ,$1) ,$3) )
+  | knr-one-variable-decl SEMICOLON
+    ( ,(semantic-expand-c-tag ,$1) )
+  ;
+
+arg-sub-list
+  : variablearg
+    ( ,$1 )
+  | PERIOD PERIOD PERIOD RPAREN
+    (VARIABLE-TAG "..." "vararg" nil)
+  | COMA
+    ( nil )
+  | LPAREN
+    ( nil )
+  | RPAREN
+    ( nil )
+  ;
+
+operatorsym
+  : LESS LESS EQUAL
+    ( "<<=" )
+  | GREATER GREATER EQUAL
+    ( ">>=" )
+  | LESS LESS
+    ( "<<" )
+  | GREATER GREATER
+    ( ">>" )
+  | EQUAL EQUAL
+    ( "==" )
+  | LESS EQUAL
+    ( "<=" )
+  | GREATER EQUAL
+    ( ">=" )
+  | BANG EQUAL
+    ( "!=" )
+  | PLUS EQUAL
+    ( "+=" )
+  | MINUS EQUAL
+    ( "-=" )
+  | STAR EQUAL
+    ( "*=" )
+  | DIVIDE EQUAL
+    ( "/=" )
+  | MOD EQUAL
+    ( "%=" )
+  | AMPERSAND EQUAL
+    ( "&=" )
+  | OR EQUAL
+    ( "|=" )
+  | MINUS GREATER STAR
+    ( "->*" )
+  | MINUS GREATER
+    ( "->" )
+  | PARENS
+    ( "()" )
+  | BRACKETS
+    ( "[]" )
+  | LESS
+  | GREATER
+  | STAR
+  | PLUS PLUS
+    ( "++" )
+  | PLUS
+  | MINUS MINUS
+    ( "--" )
+  | MINUS
+  | AMPERSAND AMPERSAND
+    ( "&&" )
+  | AMPERSAND
+  | OR OR
+    ( "||" )
+  | OR
+  | DIVIDE
+  | EQUAL
+  | BANG
+  | TILDE
+  | MOD
+  | COMA
+ ;; HAT EQUAL seems to have a really unpleasant result and
+ ;; breaks everything after it.  Leave it at the end, though it
+ ;; doesn't seem to work.
+  | HAT EQUAL
+    ( "^=" )
+  | HAT
+  ;
+
+functionname
+  : OPERATOR operatorsym
+    ( ,$2 )
+  | semantic-list
+    ( EXPAND $1 function-pointer )
+  | symbol
+    ( $1 )
+  ;
+
+function-pointer
+  : LPAREN STAR symbol RPAREN
+    ( (concat "*" $3) )
+  ;
+
+fun-or-proto-end
+  : SEMICOLON
+    ( t )
+  | semantic-list
+    ( nil )
+ ;; Here is an anoying feature of C++ pure virtual methods
+  | EQUAL ZERO SEMICOLON
+    ( :pure-virtual-flag )
+  | fun-try-end
+    ( nil )
+  ;
+
+fun-try-end
+  : TRY opt-initializers BRACE_BLCK fun-try-several-catches
+    ( nil )
+  ;
+
+fun-try-several-catches
+  : CATCH PAREN_BLCK BRACE_BLCK fun-try-several-catches
+    ( )
+  | CATCH BRACE_BLCK fun-try-several-catches
+    ( )
+  | ;; EMPTY
+    ( )
+  ;
+
+type-cast
+  : semantic-list
+    ( EXPAND $1 type-cast-list )
+  ;
+
+type-cast-list
+  : open-paren typeformbase close-paren
+  ;
+
+opt-stuff-after-symbol
+  : PAREN_BLCK
+  | BRACK_BLCK
+  | ;; EMPTY
+  ;
+
+multi-stage-dereference
+  : namespace-symbol opt-stuff-after-symbol PERIOD multi-stage-dereference ;; method call
+  | namespace-symbol opt-stuff-after-symbol MINUS GREATER multi-stage-dereference ;;method call
+  | namespace-symbol opt-stuff-after-symbol
+  ;
+
+string-seq
+  : string string-seq
+    ( (concat $1 (car $2)) )
+  | string
+    ( $1 )
+  ;
+
+expr-start
+  : MINUS
+  | PLUS
+  | STAR
+  | AMPERSAND
+  ;
+
+expr-binop
+  : MINUS
+  | PLUS
+  | STAR
+  | DIVIDE
+  | AMPERSAND AMPERSAND
+  | AMPERSAND
+  | OR OR
+  | OR
+ ;; There are more.
+  ;
+
+;; Use expression for parsing only.  Don't actually return anything
+;; for now.  Hopefully we can fix this later.
+expression
+  : unaryexpression expr-binop unaryexpression
+    ( (identity start) (identity end) )
+  | unaryexpression
+    ( (identity start) (identity end) )
+  ;
+
+unaryexpression
+  : number
+  | multi-stage-dereference
+  | NEW multi-stage-dereference
+  | NEW builtintype-types semantic-list
+ ;; Klaus Berndl: symbol -> namespace-symbol!
+  | namespace-symbol
+ ;; Klaus Berndl: C/C++ allows sequences of strings which are
+ ;; concatenated by the precompiler to one string
+  | string-seq
+  | type-cast expression  ;; A cast to some other type
+ ;; Casting the results of one expression to something else.
+  | semantic-list expression
+  | semantic-list
+  | expr-start expression
+  ;
+
+;;; c.by ends here
diff --git a/etc/grammars/java-tags.wy b/etc/grammars/java-tags.wy
new file mode 100644 (file)
index 0000000..99d2b9d
--- /dev/null
@@ -0,0 +1,750 @@
+;;; java-tags.wy -- Semantic LALR grammar for Java
+
+;; Copyright (C) 2002-2011 Free Software Foundation, Inc.
+;;
+;; Author: David Ponce <david@dponce.com>
+;; Maintainer: David Ponce <david@dponce.com>
+;; Created: 26 Aug 2002
+;; Keywords: syntax
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+%package wisent-java-tags-wy
+
+%languagemode  java-mode
+
+;; The default start symbol
+%start compilation_unit
+;; Alternate entry points
+;;    - Needed by partial re-parse
+%start package_declaration
+%start import_declaration
+%start class_declaration
+%start field_declaration
+%start method_declaration
+%start formal_parameter
+%start constructor_declaration
+%start interface_declaration
+;;    - Needed by EXPANDFULL clauses
+%start class_member_declaration
+%start interface_member_declaration
+%start formal_parameters
+
+;; -----------------------------
+;; Block & Parenthesis terminals
+;; -----------------------------
+%type  <block>       ;;syntax "\\s(\\|\\s)" matchdatatype block
+
+%token <block>       PAREN_BLOCK "(LPAREN RPAREN)"
+%token <block>       BRACE_BLOCK "(LBRACE RBRACE)"
+%token <block>       BRACK_BLOCK "(LBRACK RBRACK)"
+
+%token <open-paren>  LPAREN      "("
+%token <close-paren> RPAREN      ")"
+%token <open-paren>  LBRACE      "{"
+%token <close-paren> RBRACE      "}"
+%token <open-paren>  LBRACK      "["
+%token <close-paren> RBRACK      "]"
+
+;; ------------------
+;; Operator terminals
+;; ------------------
+%type  <punctuation> ;;syntax "\\(\\s.\\|\\s$\\|\\s'\\)+" matchdatatype string
+
+%token <punctuation> NOT         "!"
+%token <punctuation> NOTEQ       "!="
+%token <punctuation> MOD         "%"
+%token <punctuation> MODEQ       "%="
+%token <punctuation> AND         "&"
+%token <punctuation> ANDAND      "&&"
+%token <punctuation> ANDEQ       "&="
+%token <punctuation> MULT        "*"
+%token <punctuation> MULTEQ      "*="
+%token <punctuation> PLUS        "+"
+%token <punctuation> PLUSPLUS    "++"
+%token <punctuation> PLUSEQ      "+="
+%token <punctuation> COMMA       ","
+%token <punctuation> MINUS       "-"
+%token <punctuation> MINUSMINUS  "--"
+%token <punctuation> MINUSEQ     "-="
+%token <punctuation> DOT         "."
+%token <punctuation> DIV         "/"
+%token <punctuation> DIVEQ       "/="
+%token <punctuation> COLON       ":"
+%token <punctuation> SEMICOLON   ";"
+%token <punctuation> LT          "<"
+%token <punctuation> LSHIFT      "<<"
+%token <punctuation> LSHIFTEQ    "<<="
+%token <punctuation> LTEQ        "<="
+%token <punctuation> EQ          "="
+%token <punctuation> EQEQ        "=="
+%token <punctuation> GT          ">"
+%token <punctuation> GTEQ        ">="
+%token <punctuation> RSHIFT      ">>"
+%token <punctuation> RSHIFTEQ    ">>="
+%token <punctuation> URSHIFT     ">>>"
+%token <punctuation> URSHIFTEQ   ">>>="
+%token <punctuation> QUESTION    "?"
+%token <punctuation> XOR         "^"
+%token <punctuation> XOREQ       "^="
+%token <punctuation> OR          "|"
+%token <punctuation> OREQ        "|="
+%token <punctuation> OROR        "||"
+%token <punctuation> COMP        "~"
+
+;; -----------------
+;; Literal terminals
+;; -----------------
+%type  <symbol>      ;;syntax "\\(\\sw\\|\\s_\\)+"
+%token <symbol>      IDENTIFIER
+
+%type  <string>      ;;syntax "\\s\"" matchdatatype sexp
+%token <string>      STRING_LITERAL
+
+%type  <number>      ;;syntax semantic-lex-number-expression
+%token <number>      NUMBER_LITERAL
+
+%type <unicode>      syntax "\\\\u[0-9a-f][0-9a-f][0-9a-f][0-9a-f]"
+%token <unicode>     unicodecharacter
+
+;; -----------------
+;; Keyword terminals
+;; -----------------
+
+;; Generate a keyword analyzer
+%type  <keyword> ;;syntax "\\(\\sw\\|\\s_\\)+" matchdatatype keyword
+
+%keyword ABSTRACT     "abstract"
+%put     ABSTRACT summary
+"Class|Method declaration modifier: abstract {class|<type>} <name> ..."
+
+%keyword BOOLEAN      "boolean"
+%put     BOOLEAN summary
+"Primitive logical quantity type (true or false)"
+
+%keyword BREAK        "break"
+%put     BREAK summary
+"break [<label>] ;"
+
+%keyword BYTE         "byte"
+%put     BYTE summary
+"Integral primitive type (-128 to 127)"
+
+%keyword CASE         "case"
+%put     CASE summary
+"switch(<expr>) {case <const-expr>: <stmts> ... }"
+
+%keyword CATCH        "catch"
+%put     CATCH summary
+"try {<stmts>} catch(<parm>) {<stmts>} ... "
+
+%keyword CHAR         "char"
+%put     CHAR summary
+"Integral primitive type ('\u0000' to '\uffff') (0 to 65535)"
+
+%keyword CLASS        "class"
+%put     CLASS summary
+"Class declaration: class <name>"
+
+%keyword CONST        "const"
+%put     CONST summary
+"Unused reserved word"
+
+%keyword CONTINUE     "continue"
+%put     CONTINUE summary
+"continue [<label>] ;"
+
+%keyword DEFAULT      "default"
+%put     DEFAULT summary
+"switch(<expr>) { ... default: <stmts>}"
+
+%keyword DO           "do"
+%put     DO summary
+"do <stmt> while (<expr>);"
+
+%keyword DOUBLE       "double"
+%put     DOUBLE summary
+"Primitive floating-point type (double-precision 64-bit IEEE 754)"
+
+%keyword ELSE         "else"
+%put     ELSE summary
+"if (<expr>) <stmt> else <stmt>"
+
+%keyword EXTENDS      "extends"
+%put     EXTENDS summary
+"SuperClass|SuperInterfaces declaration: extends <name> [, ...]"
+
+%keyword FINAL        "final"
+%put     FINAL summary
+"Class|Member declaration modifier: final {class|<type>} <name> ..."
+
+%keyword FINALLY      "finally"
+%put     FINALLY summary
+"try {<stmts>} ... finally {<stmts>}"
+
+%keyword FLOAT        "float"
+%put     FLOAT summary
+"Primitive floating-point type (single-precision 32-bit IEEE 754)"
+
+%keyword FOR          "for"
+%put     FOR summary
+"for ([<init-expr>]; [<expr>]; [<update-expr>]) <stmt>"
+
+%keyword GOTO         "goto"
+%put     GOTO summary
+"Unused reserved word"
+
+%keyword IF           "if"
+%put     IF summary
+"if (<expr>) <stmt> [else <stmt>]"
+
+%keyword IMPLEMENTS   "implements"
+%put     IMPLEMENTS summary
+"Class SuperInterfaces declaration: implements <name> [, ...]"
+
+%keyword IMPORT       "import"
+%put     IMPORT summary
+"Import package declarations: import <package>"
+
+%keyword INSTANCEOF   "instanceof"
+
+%keyword INT          "int"
+%put     INT summary
+"Integral primitive type (-2147483648 to 2147483647)"
+
+%keyword INTERFACE    "interface"
+%put     INTERFACE summary
+"Interface declaration: interface <name>"
+
+%keyword LONG         "long"
+%put     LONG summary
+"Integral primitive type (-9223372036854775808 to 9223372036854775807)"
+
+%keyword NATIVE       "native"
+%put     NATIVE summary
+"Method declaration modifier: native <type> <name> ..."
+
+%keyword NEW          "new"
+
+%keyword PACKAGE      "package"
+%put     PACKAGE summary
+"Package declaration: package <name>"
+
+%keyword PRIVATE      "private"
+%put     PRIVATE summary
+"Access level modifier: private {class|interface|<type>} <name> ..."
+
+%keyword PROTECTED    "protected"
+%put     PROTECTED summary
+"Access level modifier: protected {class|interface|<type>} <name> ..."
+
+%keyword PUBLIC       "public"
+%put     PUBLIC summary
+"Access level modifier: public {class|interface|<type>} <name> ..."
+
+%keyword RETURN       "return"
+%put     RETURN summary
+"return [<expr>] ;"
+
+%keyword SHORT        "short"
+%put     SHORT summary
+"Integral primitive type (-32768 to 32767)"
+
+%keyword STATIC       "static"
+%put     STATIC summary
+"Declaration modifier: static {class|interface|<type>} <name> ..."
+
+%keyword STRICTFP     "strictfp"
+%put     STRICTFP summary
+"Declaration modifier: strictfp {class|interface|<type>} <name> ..."
+
+%keyword SUPER        "super"
+
+%keyword SWITCH       "switch"
+%put     SWITCH summary
+"switch(<expr>) {[case <const-expr>: <stmts> ...] [default: <stmts>]}"
+
+
+%keyword SYNCHRONIZED "synchronized"
+%put     SYNCHRONIZED summary
+"synchronized (<expr>) ... | Method decl. modifier: synchronized <type> <name> ..."
+
+%keyword THIS         "this"
+
+%keyword THROW        "throw"
+%put     THROW summary
+"throw <expr> ;"
+
+%keyword THROWS       "throws"
+%put     THROWS summary
+"Method|Constructor declaration: throws <classType>, ..."
+
+%keyword TRANSIENT    "transient"
+%put     TRANSIENT summary
+"Field declaration modifier: transient <type> <name> ..."
+
+%keyword TRY          "try"
+%put     TRY summary
+"try {<stmts>} [catch(<parm>) {<stmts>} ...] [finally {<stmts>}]"
+
+%keyword VOID         "void"
+%put     VOID summary
+"Method return type: void <name> ..."
+
+%keyword VOLATILE     "volatile"
+%put     VOLATILE summary
+"Field declaration modifier: volatile <type> <name> ..."
+
+%keyword WHILE        "while"
+%put     WHILE summary
+"while (<expr>) <stmt> | do <stmt> while (<expr>);"
+  
+;; --------------------------
+;; Official javadoc line tags
+;; --------------------------
+
+;; Javadoc tags are identified by a 'javadoc' keyword property.  The
+;; value of this property must be itself a property list where the
+;; following properties are recognized:
+;;
+;; - `seq' (mandatory) is the tag sequence number used to check if tags
+;;   are correctly ordered in a javadoc comment block.
+;;
+;; - `usage' (mandatory) is the list of token categories for which this
+;;   documentation tag is allowed.
+;;
+;; - `opt' (optional) if non-nil indicates this is an optional tag.
+;;   By default tags are mandatory.
+;;
+;; - `with-name' (optional) if non-nil indicates that this tag is
+;;   followed by an identifier like in "@param <var-name> description"
+;;   or "@exception <class-name> description".
+;;
+;; - `with-ref' (optional) if non-nil indicates that the tag is
+;;   followed by a reference like in "@see <reference>".
+
+%keyword _AUTHOR      "@author"
+%put     _AUTHOR      javadoc (seq 1 usage (type))
+%keyword _VERSION     "@version"
+%put     _VERSION     javadoc (seq 2 usage (type)) 
+%keyword _PARAM       "@param"
+%put     _PARAM       javadoc (seq 3 usage (function) with-name t) 
+%keyword _RETURN      "@return"
+%put     _RETURN      javadoc (seq 4 usage (function)) 
+%keyword _EXCEPTION   "@exception"
+%put     _EXCEPTION   javadoc (seq 5 usage (function) with-name t) 
+%keyword _THROWS      "@throws"
+%put     _THROWS      javadoc (seq 6 usage (function) with-name t) 
+%keyword _SEE         "@see"
+%put     _SEE         javadoc (seq 7 usage (type function variable) opt t with-ref t) 
+%keyword _SINCE       "@since"
+%put     _SINCE       javadoc (seq 8 usage (type function variable) opt t) 
+%keyword _SERIAL      "@serial"
+%put     _SERIAL      javadoc (seq 9 usage (variable) opt t) 
+%keyword _SERIALDATA  "@serialData"
+%put     _SERIALDATA  javadoc (seq 10 usage (function) opt t) 
+%keyword _SERIALFIELD "@serialField"
+%put     _SERIALFIELD javadoc (seq 11 usage (variable) opt t) 
+%keyword _DEPRECATED  "@deprecated"
+%put     _DEPRECATED  javadoc (seq 12 usage (type function variable) opt t) 
+
+%%
+
+;; ------------
+;; LALR Grammar
+;; ------------
+
+;; This grammar is not designed to fully parse correct Java syntax.  It
+;; is optimized to work in an interactive environment to extract tokens
+;; (tags) needed by Semantic.  In some cases a syntax not allowed by
+;; the Java Language Specification will be accepted by this grammar.
+
+compilation_unit
+  : package_declaration
+  | import_declaration
+  | type_declaration
+  ;
+
+;;; Package statement token
+;; ("NAME" package DETAIL "DOCSTRING")
+package_declaration
+  : PACKAGE qualified_name SEMICOLON
+    (PACKAGE-TAG $2 nil)
+  ;
+
+;;; Include file token
+;; ("FILE" include SYSTEM "DOCSTRING") 
+import_declaration
+  : IMPORT qualified_name SEMICOLON
+    (INCLUDE-TAG $2 nil)
+  | IMPORT qualified_name DOT MULT SEMICOLON
+    (INCLUDE-TAG (concat $2 $3 $4) nil)
+  ;
+
+type_declaration
+  : SEMICOLON
+    ()
+  | class_declaration
+  | interface_declaration
+  ;
+
+;;; Type Declaration token
+;; ("NAME" type "TYPE" ( PART-LIST ) ( PARENTS ) EXTRA-SPEC "DOCSTRING")
+class_declaration
+  : modifiers_opt CLASS qualified_name superc_opt interfaces_opt class_body
+    (TYPE-TAG $3 $2 $6 (if (or $4 $5) (cons $4 $5)) :typemodifiers $1)
+  ;
+
+superc_opt
+  : ;;EMPTY
+  | EXTENDS qualified_name
+    (identity $2)
+  ;
+
+interfaces_opt
+  : ;;EMPTY
+  | IMPLEMENTS qualified_name_list
+    (nreverse $2)
+  ;
+
+class_body
+  : BRACE_BLOCK
+    (EXPANDFULL $1 class_member_declaration)
+  ;
+
+class_member_declaration
+  : LBRACE
+    ()
+  | RBRACE
+    ()
+  | block
+    ()
+  | static_initializer
+    ()
+  | constructor_declaration
+  | interface_declaration
+  | class_declaration
+  | method_declaration
+  | field_declaration
+  ;
+
+;;; Type Declaration token
+;; ("NAME" type "TYPE" ( PART-LIST ) ( PARENTS ) EXTRA-SPEC "DOCSTRING")
+interface_declaration
+  : modifiers_opt INTERFACE IDENTIFIER extends_interfaces_opt interface_body
+    (TYPE-TAG $3 $2 $5 (if $4 (cons nil $4)) :typemodifiers $1)
+  ;
+
+extends_interfaces_opt
+  : ;;EMPTY
+  | EXTENDS qualified_name_list
+    (identity $2)
+  ;
+
+interface_body
+  : BRACE_BLOCK
+    (EXPANDFULL $1 interface_member_declaration)
+  ;
+
+interface_member_declaration
+  : LBRACE
+    ()
+  | RBRACE
+    ()
+  | interface_declaration
+  | class_declaration
+  | method_declaration
+  | field_declaration
+  ;
+
+static_initializer
+  : STATIC block
+  ;
+
+;;; Function token
+;; ("NAME" function "TYPE" ( ARG-LIST ) EXTRA-SPEC "DOCSTRING") 
+constructor_declaration
+  : modifiers_opt constructor_declarator throwsc_opt constructor_body
+    (FUNCTION-TAG (car $2) nil (cdr $2)
+                  :typemodifiers $1
+                  :throws $3
+                  :constructor-flag t)
+  ;
+
+constructor_declarator
+  : IDENTIFIER formal_parameter_list
+    (cons $1 $2)
+  ;
+
+constructor_body
+  : block 
+  ;
+
+;;; Function token
+;; ("NAME" function "TYPE" ( ARG-LIST ) EXTRA-SPEC "DOCSTRING") 
+method_declaration
+  : modifiers_opt VOID method_declarator throwsc_opt method_body
+    (FUNCTION-TAG (car $3) $2 (cdr $3) :typemodifiers $1 :throws $4)
+  | modifiers_opt type method_declarator throwsc_opt method_body
+    (FUNCTION-TAG (car $3) $2 (cdr $3) :typemodifiers $1 :throws $4)
+  ;
+
+method_declarator
+  : IDENTIFIER formal_parameter_list dims_opt
+    (cons (concat $1 $3) $2)
+  ;
+
+throwsc_opt
+  : ;;EMPTY
+  | THROWS qualified_name_list
+    (nreverse $2)
+  ;
+
+qualified_name_list
+  : qualified_name_list COMMA qualified_name
+    (cons $3 $1)
+  | qualified_name
+    (list $1)
+  ;
+
+method_body
+  : SEMICOLON
+  | block
+  ;
+
+;; Just eat {...} block!
+block
+  : BRACE_BLOCK
+  ;
+
+formal_parameter_list
+  : PAREN_BLOCK
+    (EXPANDFULL $1 formal_parameters)
+  ;
+
+formal_parameters
+  : LPAREN
+    ()
+  | RPAREN
+    ()
+  | formal_parameter COMMA
+  | formal_parameter RPAREN
+  ;
+
+;;; Variable token
+;; ("NAME" variable "TYPE" DEFAULT-VALUE EXTRA-SPEC "DOCSTRING")
+formal_parameter
+  : formal_parameter_modifier_opt type variable_declarator_id
+    (VARIABLE-TAG $3 $2 nil :typemodifiers $1)
+  ;
+
+formal_parameter_modifier_opt
+  : ;;EMPTY
+  | FINAL
+    (list $1)
+  ;
+
+;;; Variable token
+;; ("NAME" variable "TYPE" DEFAULT-VALUE EXTRA-SPEC "DOCSTRING")
+field_declaration
+  : modifiers_opt type variable_declarators SEMICOLON
+    (VARIABLE-TAG $3 $2 nil :typemodifiers $1)
+  ;
+
+variable_declarators
+  : variable_declarators COMMA variable_declarator
+    (progn
+      ;; Set the end of the compound declaration to the end of the
+      ;; COMMA delimiter.
+      (setcdr (cdr (car $1)) (cdr $region2))
+      (cons $3 $1))
+  | variable_declarator
+    (list $1)
+  ;
+
+variable_declarator
+  : variable_declarator_id EQ variable_initializer
+    (cons $1 $region)
+  | variable_declarator_id
+    (cons $1 $region)
+  ;
+
+variable_declarator_id
+  : IDENTIFIER dims_opt
+    (concat $1 $2)
+  ;
+
+variable_initializer
+  : expression
+  ;
+
+;; Just eat expression!
+expression
+  : expression term
+  | term
+  ;
+
+term
+  : literal
+  | operator
+  | primitive_type
+  | IDENTIFIER
+  | BRACK_BLOCK
+  | PAREN_BLOCK
+  | BRACE_BLOCK
+  | NEW
+  | CLASS
+  | THIS
+  | SUPER
+  ;
+
+literal
+;;   : NULL_LITERAL
+;;   | BOOLEAN_LITERAL
+  : STRING_LITERAL
+  | NUMBER_LITERAL
+  ;
+
+operator
+  : NOT
+  | PLUS
+  | PLUSPLUS
+  | MINUS
+  | MINUSMINUS
+  | NOTEQ
+  | MOD
+  | MODEQ
+  | AND
+  | ANDAND
+  | ANDEQ
+  | MULT
+  | MULTEQ
+  | PLUSEQ
+  | MINUSEQ
+  | DOT
+  | DIV
+  | DIVEQ
+  | COLON
+  | LT
+  | LSHIFT
+  | LSHIFTEQ
+  | LTEQ
+  | EQ
+  | EQEQ
+  | GT
+  | GTEQ
+  | RSHIFT
+  | RSHIFTEQ
+  | URSHIFT
+  | URSHIFTEQ
+  | QUESTION
+  | XOR
+  | XOREQ
+  | OR
+  | OREQ
+  | OROR
+  | COMP
+  | INSTANCEOF
+  ;
+
+primitive_type
+  : BOOLEAN
+  | CHAR
+  | LONG
+  | INT
+  | SHORT
+  | BYTE
+  | DOUBLE
+  | FLOAT
+  ;
+
+modifiers_opt
+  : ;;EMPTY
+  | modifiers
+    (nreverse $1)
+  ;
+
+modifiers
+  : modifiers modifier
+    (cons $2 $1)
+  | modifier
+    (list $1)
+  ;
+
+modifier
+  : STRICTFP
+  | VOLATILE
+  | TRANSIENT
+  | SYNCHRONIZED
+  | NATIVE
+  | FINAL
+  | ABSTRACT
+  | STATIC
+  | PRIVATE
+  | PROTECTED
+  | PUBLIC
+  ;
+
+type
+  : qualified_name dims_opt
+    (concat $1 $2)
+  | primitive_type dims_opt
+    (concat $1 $2)
+  ;
+
+qualified_name
+  : qualified_name DOT IDENTIFIER
+    (concat $1 $2 $3)
+  | IDENTIFIER
+  ;
+
+dims_opt
+  : ;;EMPTY
+    (identity "")
+  | dims
+  ;
+
+dims
+  : dims BRACK_BLOCK
+    (concat $1 "[]")
+  | BRACK_BLOCK
+    (identity "[]")
+  ;
+
+%%
+;; Define the lexer for this grammar
+(define-lex wisent-java-tags-lexer
+  "Lexical analyzer that handles Java buffers.
+It ignores whitespaces, newlines and comments."
+  semantic-lex-ignore-whitespace
+  semantic-lex-ignore-newline
+  semantic-lex-ignore-comments
+  ;;;; Auto-generated analyzers.
+  wisent-java-tags-wy--<number>-regexp-analyzer
+  wisent-java-tags-wy--<string>-sexp-analyzer
+  ;; Must detect keywords before other symbols
+  wisent-java-tags-wy--<keyword>-keyword-analyzer
+  wisent-java-tags-wy--<symbol>-regexp-analyzer
+  wisent-java-tags-wy--<punctuation>-string-analyzer
+  wisent-java-tags-wy--<block>-block-analyzer
+  ;; In theory, unicode chars should be turned into normal chars
+  ;; and then combined into regular ascii keywords and text.  This
+  ;; analyzer just keeps these things from making the lexer go boom.
+  wisent-java-tags-wy--<unicode>-regexp-analyzer
+  ;;;;
+  semantic-lex-default-action)
+
+;;; java-tags.wy ends here
diff --git a/etc/grammars/js.wy b/etc/grammars/js.wy
new file mode 100644 (file)
index 0000000..a13abf5
--- /dev/null
@@ -0,0 +1,526 @@
+;;; javascript-jv.wy -- LALR grammar for Javascript
+
+;; Copyright (C) 2005-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2011 Ecma International.
+
+;; Author: Joakim Verona
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; The grammar itself is transcribed from the ECMAScript Language
+;; Specification published at
+;;
+;; http://www.ecma-international.org/publications/standards/Ecma-262.htm
+;;
+;; and redistributed under the following license:
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+
+;; 1. Redistributions of source code must retain the above copyright
+;; notice, this list of conditions and the following disclaimer.
+
+;; 2. Redistributions in binary form must reproduce the above
+;; copyright notice, this list of conditions and the following
+;; disclaimer in the documentation and/or other materials provided
+;; with the distribution.
+
+;; 3. Neither the name of the authors nor Ecma International may be
+;; used to endorse or promote products derived from this software
+;; without specific prior written permission.  THIS SOFTWARE IS
+;; PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+;; ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR
+;; ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+;; OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+;; USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+;; DAMAGE.
+
+%package wisent-javascript-jv-wy
+;; JAVE I prefere ecmascript-mode
+%languagemode ecmascript-mode javascript-mode
+
+;; The default goal
+%start Program
+;; Other Goals
+%start FormalParameterList
+
+;; with the terminals stuff, I used the javacript.y names,
+;; but the semantic/wisent/java-tags.wy types
+;; when possible
+;; ------------------
+;; Operator terminals
+;; ------------------
+
+;;define-lex-string-type-analyzer gets called with the "syntax" comment
+%type <punctuation> ;;syntax "\\(\\s.\\|\\s$\\|\\s'\\)+" matchdatatype string
+
+%token <punctuation> ASSIGN_SYMBOL            "="
+%token <punctuation> BITWISE_AND              "&"
+%token <punctuation> BITWISE_AND_EQUALS       "&="
+%token <punctuation> BITWISE_EXCLUSIVE_OR     "^"
+%token <punctuation> BITWISE_EXCLUSIVE_OR_EQUALS "^="
+%token <punctuation> BITWISE_OR               "|"
+%token <punctuation> BITWISE_OR_EQUALS        "|="
+%token <punctuation> BITWISE_SHIFT_LEFT       "<<"
+%token <punctuation> BITWISE_SHIFT_LEFT_EQUALS "<<="
+%token <punctuation> BITWISE_SHIFT_RIGHT      ">>"
+%token <punctuation> BITWISE_SHIFT_RIGHT_EQUALS ">>="
+%token <punctuation> BITWISE_SHIFT_RIGHT_ZERO_FILL ">>>"
+%token <punctuation> BITWISE_SHIFT_RIGHT_ZERO_FILL_EQUALS ">>>="
+%token <punctuation> NOT_EQUAL "!="
+%token <punctuation> DIV_EQUALS "/="
+%token <punctuation> EQUALS "=="
+%token <punctuation> GREATER_THAN ">"
+%token <punctuation> GT_EQUAL ">="
+%token <punctuation> LOGICAL_AND "&&"
+%token <punctuation> LOGICAL_OR "||"
+%token <punctuation> LOGICAL_NOT "!!"
+%token <punctuation> LS_EQUAL "<="
+%token <punctuation> MINUS "-"
+%token <punctuation> MINUS_EQUALS "-="
+%token <punctuation> MOD "%"
+%token <punctuation> MOD_EQUALS "%="
+%token <punctuation> MULTIPLY "*"
+%token <punctuation> MULTIPLY_EQUALS "*="
+%token <punctuation> PLUS "+"
+%token <punctuation> PLUS_EQUALS "+="
+%token <punctuation> INCREMENT "++"
+%token <punctuation> DECREMENT "--"
+%token <punctuation> DIV "/"
+%token <punctuation> COLON ":"
+%token <punctuation> COMMA ","
+%token <punctuation> DOT "."
+%token <punctuation> LESS_THAN "<"
+%token <punctuation> LINE_TERMINATOR "\n"
+%token <punctuation> SEMICOLON ";"
+%token <punctuation> ONES_COMPLIMENT "~"
+
+
+;; -----------------------------
+;; Block & Parenthesis terminals
+;; -----------------------------
+%type  <block>       ;;syntax "\\s(\\|\\s)" matchdatatype block
+%token <block>       PAREN_BLOCK "(OPEN_PARENTHESIS CLOSE_PARENTHESIS)"
+%token <block>       BRACE_BLOCK "(START_BLOCK END_BLOCK)"
+%token <block>       BRACK_BLOCK "(OPEN_SQ_BRACKETS CLOSE_SQ_BRACKETS)"
+
+%token <open-paren>  OPEN_PARENTHESIS  "("
+%token <close-paren>  CLOSE_PARENTHESIS ")"
+
+%token <open-paren>  START_BLOCK       "{"
+%token <close-paren>  END_BLOCK         "}"
+
+%token <open-paren>  OPEN_SQ_BRACKETS  "["
+%token <close-paren>  CLOSE_SQ_BRACKETS "]"
+
+
+;; -----------------
+;; Keyword terminals
+;; -----------------
+
+;; Generate a keyword analyzer
+%type  <keyword> ;;syntax "\\(\\sw\\|\\s_\\)+" matchdatatype keyword
+
+%keyword IF           "if"
+%put     IF summary
+"if (<expr>) <stmt> [else <stmt>] (jv)"
+
+%keyword BREAK        "break"
+%put     BREAK summary
+"break [<label>] ;"
+
+%keyword CONTINUE     "continue"
+%put     CONTINUE summary
+"continue [<label>] ;"
+
+%keyword ELSE         "else"
+%put     ELSE summary
+"if (<expr>) <stmt> else <stmt>"
+
+
+%keyword FOR          "for"
+%put     FOR summary
+"for ([<init-expr>]; [<expr>]; [<update-expr>]) <stmt>"
+
+
+%keyword FUNCTION  "function"
+%put     FUNCTION summary
+"function declaration blah blah"
+
+%keyword THIS         "this"
+%put THIS summary
+"this"
+
+
+%keyword RETURN       "return"
+%put     RETURN summary
+"return [<expr>] ;"
+
+%keyword WHILE        "while"
+%put     WHILE summary
+"while (<expr>) <stmt> | do <stmt> while (<expr>);"
+
+%keyword VOID_SYMBOL         "void"
+%put     VOID_SYMBOL summary
+"Method return type: void <name> ..."
+
+
+
+%keyword NEW          "new"
+%put NEW summary
+"new <objecttype> - Creates a new object."
+
+%keyword DELETE "delete"
+%put DELETE summary
+"delete(<objectreference>) - Deletes the object."
+
+%keyword VAR "var"
+%put VAR  summary
+"var <variablename> [= value];"
+
+%keyword WITH "with"
+%put WITH summary
+"with "
+
+%keyword TYPEOF "typeof"
+%put TYPEOF summary
+"typeof "
+
+%keyword IN "in"
+%put IN  summary
+"in something"
+
+
+;; -----------------
+;; Literal terminals
+;; -----------------
+
+;;the .y file uses VARIABLE as IDENTIFIER, which seems a bit evil
+;; it think the normal .wy convention is better than this
+%type  <symbol>      ;;syntax "\\(\\sw\\|\\s_\\)+"
+%token <symbol>      VARIABLE
+
+%type  <string>      ;;syntax "\\s\"" matchdatatype sexp
+%token <string>      STRING
+
+%type  <number>      ;;syntax semantic-lex-number-expression
+%token <number>      NUMBER
+
+
+%token FALSE
+%token TRUE
+%token QUERY
+
+
+%token NULL_TOKEN
+
+;;%token UNDEFINED_TOKEN
+;;%token INFINITY
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; associativity and stuff
+%left PLUS MINUS
+%left MULTIPLY DIV MOD
+
+%nonassoc FALSE
+%nonassoc HIGHER_THAN_FALSE
+%nonassoc ELSE
+%nonassoc LOWER_THAN_CLOSE_PARENTHESIS
+%nonassoc CLOSE_PARENTHESIS
+
+%%
+
+Program : SourceElement
+        ;
+
+SourceElement : Statement
+              | FunctionDeclaration
+              ;
+
+Statement : Block
+          | VariableStatement
+          | EmptyStatement
+          | ExpressionStatement
+          | IfStatement
+          | IterationExpression
+          | ContinueStatement
+          | BreakStatement
+          | ReturnStatement
+          | WithStatement
+          ;   
+      
+FunctionDeclaration : FUNCTION VARIABLE FormalParameterListBlock Block
+                     (FUNCTION-TAG $2 nil $3)
+                    ;
+
+FormalParameterListBlock : PAREN_BLOCK
+                          (EXPANDFULL $1 FormalParameterList)
+                       ;
+
+FormalParameterList: OPEN_PARENTHESIS
+                    ()
+                  | VARIABLE
+                    (VARIABLE-TAG $1 nil nil)
+                  | CLOSE_PARENTHESIS
+                    ()
+                  | COMMA
+                    ()
+                  ;
+
+StatementList : Statement
+              | StatementList Statement
+              ;
+
+Block : BRACE_BLOCK
+     ;; If you want to parse the body of the function
+     ;; ( EXPANDFULL $1 BlockExpand )
+      ;
+
+BlockExpand: START_BLOCK StatementList END_BLOCK
+          | START_BLOCK END_BLOCK
+          ;
+
+VariableStatement : VAR VariableDeclarationList SEMICOLON
+                   (VARIABLE-TAG $2 nil nil)
+                  ;
+
+VariableDeclarationList : VariableDeclaration
+                         (list $1)
+                        | VariableDeclarationList COMMA VariableDeclaration
+                         (append $1 (list $3))
+                        ;
+
+VariableDeclaration : VARIABLE
+                     (append (list $1 nil) $region)
+                    | VARIABLE Initializer
+                     (append (cons $1 $2) $region)
+                    ;
+
+Initializer : ASSIGN_SYMBOL AssignmentExpression
+             (list $2)
+            ;
+
+EmptyStatement : SEMICOLON
+               ;
+
+ExpressionStatement : Expression SEMICOLON
+                    ;
+
+IfStatement : IF OPEN_PARENTHESIS Expression CLOSE_PARENTHESIS Statement  %prec HIGHER_THAN_FALSE
+            | IF OPEN_PARENTHESIS Expression CLOSE_PARENTHESIS Statement ELSE Statement
+            | IF OPEN_PARENTHESIS FALSE CLOSE_PARENTHESIS Statement
+            | IF OPEN_PARENTHESIS LeftHandSideExpression AssignmentOperator AssignmentExpression CLOSE_PARENTHESIS Statement
+            ;
+
+IterationExpression : WHILE OPEN_PARENTHESIS Expression CLOSE_PARENTHESIS Statement %prec HIGHER_THAN_FALSE
+                    | WHILE OPEN_PARENTHESIS FALSE CLOSE_PARENTHESIS Statement
+                    | WHILE OPEN_PARENTHESIS LeftHandSideExpression AssignmentOperator AssignmentExpression CLOSE_PARENTHESIS Statement
+                    | FOR OPEN_PARENTHESIS OptionalExpression SEMICOLON OptionalExpression SEMICOLON OptionalExpression CLOSE_PARENTHESIS Statement
+                    | FOR OPEN_PARENTHESIS VAR VariableDeclarationList SEMICOLON OptionalExpression SEMICOLON OptionalExpression CLOSE_PARENTHESIS Statement
+                    | FOR OPEN_PARENTHESIS LeftHandSideExpression IN Expression CLOSE_PARENTHESIS Statement
+                    | FOR OPEN_PARENTHESIS VAR VARIABLE OptionalInitializer IN Expression CLOSE_PARENTHESIS Statement
+                    ;
+
+ContinueStatement : CONTINUE SEMICOLON
+                  ;
+
+;;JAVE break needs labels 
+BreakStatement : BREAK SEMICOLON
+              ;;               | BREAK identifier SEMICOLON
+               ;
+
+ReturnStatement : RETURN Expression SEMICOLON
+                | RETURN SEMICOLON
+                ;
+
+WithStatement : WITH OPEN_PARENTHESIS Expression CLOSE_PARENTHESIS   Statement
+              ;
+
+OptionalInitializer : Initializer
+                    |
+                    ;
+
+PrimaryExpression : THIS
+                  | VARIABLE
+                  | NUMBER
+                  | STRING
+                  | NULL_TOKEN
+                  | TRUE
+                  | FALSE
+                  | OPEN_PARENTHESIS Expression CLOSE_PARENTHESIS
+                  ;
+
+MemberExpression : PrimaryExpression
+                 | MemberExpression OPEN_SQ_BRACKETS Expression  CLOSE_SQ_BRACKETS
+                 | MemberExpression DOT VARIABLE
+                 | NEW MemberExpression Arguments
+                 ;
+
+NewExpression : MemberExpression
+              | NEW NewExpression
+              ;
+
+CallExpression : MemberExpression Arguments
+               | CallExpression Arguments
+               | CallExpression OPEN_SQ_BRACKETS Expression  CLOSE_SQ_BRACKETS
+               | CallExpression DOT VARIABLE
+               ;
+
+Arguments : OPEN_PARENTHESIS CLOSE_PARENTHESIS
+          | OPEN_PARENTHESIS ArgumentList CLOSE_PARENTHESIS
+          ;
+
+ArgumentList : AssignmentExpression
+             | ArgumentList COMMA AssignmentExpression
+             ;
+
+LeftHandSideExpression : NewExpression
+                       | CallExpression
+                       ;
+
+PostfixExpression : LeftHandSideExpression
+                  | LeftHandSideExpression INCREMENT
+                  | LeftHandSideExpression DECREMENT
+                  ;
+
+UnaryExpression : PostfixExpression
+                | DELETE UnaryExpression
+                | VOID_SYMBOL UnaryExpression
+                | TYPEOF UnaryExpression
+                | INCREMENT UnaryExpression
+                | DECREMENT UnaryExpression
+                | PLUS UnaryExpression
+                | MINUS UnaryExpression
+                | ONES_COMPLIMENT UnaryExpression
+                | LOGICAL_NOT UnaryExpression
+                ;
+
+MultiplicativeExpression : UnaryExpression
+                         | MultiplicativeExpression MULTIPLY UnaryExpression
+                         | MultiplicativeExpression DIV UnaryExpression
+                         | MultiplicativeExpression MOD UnaryExpression
+                         ;
+
+AdditiveExpression : MultiplicativeExpression
+                   | AdditiveExpression PLUS MultiplicativeExpression
+                   | AdditiveExpression MINUS MultiplicativeExpression
+                   ;
+
+ShiftExpression : AdditiveExpression
+                | ShiftExpression BITWISE_SHIFT_LEFT AdditiveExpression
+                | ShiftExpression BITWISE_SHIFT_RIGHT AdditiveExpression
+                | ShiftExpression BITWISE_SHIFT_RIGHT_ZERO_FILL  AdditiveExpression
+                ;
+
+RelationalExpression : ShiftExpression
+                     | RelationalExpression LESS_THAN ShiftExpression
+                     | RelationalExpression GREATER_THAN ShiftExpression
+                     | RelationalExpression LS_EQUAL ShiftExpression
+                     | RelationalExpression GT_EQUAL ShiftExpression
+                     ;
+
+EqualityExpression : RelationalExpression
+                   | EqualityExpression EQUALS RelationalExpression
+                   | EqualityExpression NOT_EQUAL RelationalExpression
+                   ;
+
+BitwiseANDExpression : EqualityExpression
+                     | BitwiseANDExpression BITWISE_AND EqualityExpression
+                     ;
+
+BitwiseXORExpression : BitwiseANDExpression
+                     | BitwiseXORExpression BITWISE_EXCLUSIVE_OR     BitwiseANDExpression
+                     ;
+
+BitwiseORExpression : BitwiseXORExpression
+                    | BitwiseORExpression BITWISE_OR BitwiseXORExpression
+                    ;
+
+LogicalANDExpression : BitwiseORExpression
+                     | LogicalANDExpression LOGICAL_AND BitwiseORExpression
+                     ;
+
+LogicalORExpression : LogicalANDExpression
+                    | LogicalORExpression LOGICAL_OR LogicalANDExpression
+                    ;
+
+ConditionalExpression : LogicalORExpression
+                      | LogicalORExpression QUERY AssignmentExpression COLON    AssignmentExpression
+                      ;
+
+AssignmentExpression : ConditionalExpression
+                     | LeftHandSideExpression AssignmentOperator  AssignmentExpression %prec LOWER_THAN_CLOSE_PARENTHESIS
+                     ;
+
+AssignmentOperator : ASSIGN_SYMBOL
+                   | MULTIPLY_EQUALS
+                   | DIV_EQUALS
+                   | MOD_EQUALS
+                   | PLUS_EQUALS
+                   | MINUS_EQUALS
+                   | BITWISE_SHIFT_LEFT_EQUALS
+                   | BITWISE_SHIFT_RIGHT_EQUALS
+                   | BITWISE_SHIFT_RIGHT_ZERO_FILL_EQUALS
+                   | BITWISE_AND_EQUALS
+                   | BITWISE_EXCLUSIVE_OR_EQUALS
+                   | BITWISE_OR_EQUALS
+                   ;
+
+Expression : AssignmentExpression
+           | Expression COMMA AssignmentExpression
+           ;
+
+OptionalExpression : Expression
+                   |
+                   ;
+
+%%
+
+;;here something like:
+;;(define-lex wisent-java-tags-lexer
+;; should go
+(define-lex javascript-lexer-jv
+"javascript thingy"
+;;std stuff
+  semantic-lex-ignore-whitespace
+  semantic-lex-ignore-newline
+  semantic-lex-ignore-comments
+
+  ;;stuff generated from the wy file(one for each "type" declaration)
+  wisent-javascript-jv-wy--<number>-regexp-analyzer
+  wisent-javascript-jv-wy--<string>-sexp-analyzer
+
+  wisent-javascript-jv-wy--<keyword>-keyword-analyzer
+
+  wisent-javascript-jv-wy--<symbol>-regexp-analyzer
+  wisent-javascript-jv-wy--<punctuation>-string-analyzer
+  wisent-javascript-jv-wy--<block>-block-analyzer
+
+
+  ;;;;more std stuff
+  semantic-lex-default-action
+  )
+
+;;; javascript-jv.wy ends here
diff --git a/etc/grammars/make.by b/etc/grammars/make.by
new file mode 100644 (file)
index 0000000..dab4472
--- /dev/null
@@ -0,0 +1,168 @@
+;;; make.by -- BY notation for Makefiles.
+
+;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
+;;
+;; Author: Eric M. Ludlam <zappo@gnu.org>
+;;         David Ponce <david@dponce.com>
+;;         Klaus Berndl <klaus.berndl@sdm.de>
+;;
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+%package semantic-make-by
+
+%languagemode  makefile-mode
+%start         Makefile
+
+;; This was always a test case.
+%quotemode     backquote
+
+%token IF      "if"
+%token IFDEF   "ifdef"
+%token IFNDEF  "ifndef"
+%token IFEQ    "ifeq"
+%token IFNEQ   "ifneq"
+%token ELSE    "else"
+%token ENDIF   "endif"
+%token INCLUDE "include"
+
+%put { IF ELSE ENDIF } summary "Conditional: if (expression) ... else ... endif"
+%put IFDEF   summary "Conditional: ifdef (expression) ... else ... endif"
+%put IFNDEF  summary "Conditional: ifndef (expression) ... else ... endif"
+%put IFEQ    summary "Conditional: ifeq (expression) ... else ... endif"
+%put IFNEQ   summary "Conditional: ifneq (expression) ... else ... endif"
+%put INCLUDE summary "Macro: include filename1 filename2 ..."
+
+%token <punctuation> COLON     "\\`[:]\\'"
+%token <punctuation> PLUS      "\\`[+]\\'"
+%token <punctuation> EQUAL     "\\`[=]\\'"
+%token <punctuation> DOLLAR    "\\`[$]\\'"
+%token <punctuation> BACKSLASH "\\`[\\]\\'"
+
+%%
+
+Makefile : bol newline (nil)
+        | bol variable
+          ( ,@$2 )
+        | bol rule
+          ( ,@$2 )
+        | bol conditional
+          ( ,@$2 )
+        | bol include
+          ( ,@$2 )
+        | whitespace ( nil )
+        | newline ( nil )
+        ;
+
+variable: symbol opt-whitespace equals opt-whitespace element-list
+         (VARIABLE-TAG ,$1 nil ,$5)
+       ;
+
+rule: targets opt-whitespace colons opt-whitespace element-list commands
+      (FUNCTION-TAG ,$1 nil ,$5)
+    ;
+
+targets: target opt-whitespace targets
+        ( (car ,$1) (car ,@$3) )
+       | target
+        ( (car ,$1) )
+       ;
+
+target: sub-target target
+       ( (concat (car ,$1) (car ,@$3) ) )
+      | sub-target
+       ( (car ,$1) )
+      ;
+
+sub-target: symbol
+         | string
+         | varref
+         ;
+
+conditional: IF some-whitespace symbol newline
+            ( nil )
+          | IFDEF some-whitespace symbol newline
+            ( nil )
+          | IFNDEF some-whitespace symbol newline
+            ( nil )
+          | IFEQ some-whitespace expression newline
+            ( nil )
+          | IFNEQ some-whitespace expression newline
+            ( nil )
+          | ELSE newline
+            ( nil )
+          | ENDIF newline
+            ( nil )
+          ;
+
+expression : semantic-list
+          ;
+
+include: INCLUDE some-whitespace element-list
+        (INCLUDE-TAG ,$3 nil)
+       ;
+
+equals: COLON EQUAL ()
+      | PLUS EQUAL ()
+      | EQUAL ()
+      ;
+
+colons: COLON COLON ()
+      | COLON ()
+      ;
+
+element-list: elements newline
+             ( ,@$1 )
+           ;
+
+elements: element some-whitespace elements
+         ( ,@$1 ,@$3 )
+       | element
+         ( ,@$1 )
+       | ;;EMPTY
+       ;
+  
+element: sub-element element
+        ( (concat (car ,$1) (car ,$2)) )
+       | ;;EMPTY
+       ;
+
+sub-element: symbol
+          | string
+          | punctuation
+          | semantic-list
+            ( (buffer-substring-no-properties
+                (identity start) (identity end)) )
+          ;
+
+varref: DOLLAR semantic-list
+       ( (buffer-substring-no-properties (identity start) (identity end)) )
+      ;
+
+commands: bol shell-command newline commands
+         ( ,$1 ,@$2 )
+       | ;;EMPTY
+         ( )
+       ;
+
+opt-whitespace : some-whitespace ( nil )
+              | ;;EMPTY
+              ;
+
+some-whitespace : whitespace some-whitespace (nil)
+               | whitespace (nil)
+               ;
+
+;;; make.by ends here
diff --git a/etc/grammars/python.wy b/etc/grammars/python.wy
new file mode 100644 (file)
index 0000000..a0af813
--- /dev/null
@@ -0,0 +1,1132 @@
+;;; python.wy -- LALR grammar for Python
+
+;; Copyright (C) 2002-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2010 Python Software Foundation
+
+;; Author: Richard Kim <ryk@dspwiz.com>
+;; Maintainer: Richard Kim <ryk@dspwiz.com>
+;; Created: June 2002
+;; Keywords: syntax
+;;
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; This is an LALR python parser that follows the official python
+;; grammar closely with very few exceptions.  The Python grammar is
+;; used and reproduced under the following license:
+;;
+;; PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
+;; --------------------------------------------
+;; 1. This LICENSE AGREEMENT is between the Python Software Foundation
+;; ("PSF"), and the Individual or Organization ("Licensee") accessing
+;; and otherwise using this software ("Python") in source or binary
+;; form and its associated documentation.
+;;
+;; 2. Subject to the terms and conditions of this License Agreement,
+;; PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide
+;; license to reproduce, analyze, test, perform and/or display
+;; publicly, prepare derivative works, distribute, and otherwise use
+;; Python alone or in any derivative version, provided, however, that
+;; PSF's License Agreement and PSF's notice of copyright, i.e.,
+;; "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;; 2009, 2010 Python Software Foundation; All Rights Reserved" are
+;; retained in Python alone or in any derivative version prepared by
+;; Licensee.
+;;
+;; 3. In the event Licensee prepares a derivative work that is based
+;; on or incorporates Python or any part thereof, and wants to make
+;; the derivative work available to others as provided herein, then
+;; Licensee hereby agrees to include in any such work a brief summary
+;; of the changes made to Python.
+;;
+;; 4. PSF is making Python available to Licensee on an "AS IS"
+;; basis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+;; IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
+;; DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+;; FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
+;; INFRINGE ANY THIRD PARTY RIGHTS.
+;;
+;; 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+;; FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A
+;; RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR
+;; ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+;;
+;; 6. This License Agreement will automatically terminate upon a
+;; material breach of its terms and conditions.
+;;
+;; 7. Nothing in this License Agreement shall be deemed to create any
+;; relationship of agency, partnership, or joint venture between PSF
+;; and Licensee.  This License Agreement does not grant permission to
+;; use PSF trademarks or trade name in a trademark sense to endorse or
+;; promote products or services of Licensee, or any third party.
+;;
+;; 8. By copying, installing or otherwise using Python, Licensee
+;; agrees to be bound by the terms and conditions of this License
+;; Agreement.
+
+;;; To do:
+;;
+;; * Verify that semantic-lex-python-number regexp is correct.
+
+;; --------
+;; Settings
+;; --------
+
+%package wisent-python-wy
+
+%languagemode python-mode
+
+;; The default start symbol
+%start goal
+;; Alternate entry points
+;;    - Needed by partial re-parse
+%start function_parameter
+%start paren_class
+%start indented_block
+;;    - Needed by EXPANDFULL clauses
+%start function_parameters
+%start paren_classes
+%start indented_block_body
+
+;; -------------------------------
+;; Misc. Python specific terminals
+;; -------------------------------
+;; The value of these tokens are for documentation only, they are not
+;; used by the lexer.
+%token <charquote>   BACKSLASH           "\\"
+%token <newline>     NEWLINE      "\n"
+%token <indentation> INDENT       "^\\s-+"
+%token <indentation> DEDENT       "[^:INDENT:]"
+%token <indentation> INDENT_BLOCK "(INDENT DEDENT)"
+
+;; -----------------------------
+;; Block & Parenthesis terminals
+;; -----------------------------
+%type  <block>       ;;syntax "\\s(\\|\\s)" matchdatatype block
+
+%token <block>       PAREN_BLOCK "(LPAREN RPAREN)"
+%token <block>       BRACE_BLOCK "(LBRACE RBRACE)"
+%token <block>       BRACK_BLOCK "(LBRACK RBRACK)"
+
+%token <open-paren>  LPAREN      "("
+%token <close-paren> RPAREN      ")"
+%token <open-paren>  LBRACE      "{"
+%token <close-paren> RBRACE      "}"
+%token <open-paren>  LBRACK      "["
+%token <close-paren> RBRACK      "]"
+
+;; ------------------
+;; Operator terminals
+;; ------------------
+%type  <punctuation> ;;syntax "\\(\\s.\\|\\s$\\|\\s'\\)+" matchdatatype string
+
+%token <punctuation> LTLTEQ    "<<="
+%token <punctuation> GTGTEQ    ">>="
+%token <punctuation> EXPEQ     "**="
+%token <punctuation> DIVDIVEQ  "//="
+%token <punctuation> DIVDIV    "//"
+%token <punctuation> LTLT      "<<"
+%token <punctuation> GTGT      ">>"
+%token <punctuation> EXPONENT  "**"
+%token <punctuation> EQ        "=="
+%token <punctuation> GE        ">="
+%token <punctuation> LE        "<="
+%token <punctuation> PLUSEQ    "+="
+%token <punctuation> MINUSEQ   "-="
+%token <punctuation> MULTEQ    "*="
+%token <punctuation> DIVEQ     "/="
+%token <punctuation> MODEQ     "%="
+%token <punctuation> AMPEQ     "&="
+%token <punctuation> OREQ      "|="
+%token <punctuation> HATEQ     "^="
+%token <punctuation> LTGT      "<>"
+%token <punctuation> NE        "!="
+%token <punctuation> HAT       "^"
+%token <punctuation> LT        "<"
+%token <punctuation> GT        ">"
+%token <punctuation> AMP       "&"
+%token <punctuation> MULT      "*"
+%token <punctuation> DIV       "/"
+%token <punctuation> MOD       "%"
+%token <punctuation> PLUS      "+"
+%token <punctuation> MINUS     "-"
+%token <punctuation> PERIOD    "."
+%token <punctuation> TILDE     "~"
+%token <punctuation> BAR       "|"
+%token <punctuation> COLON     ":"
+%token <punctuation> SEMICOLON ";"
+%token <punctuation> COMMA     ","
+%token <punctuation> ASSIGN    "="
+%token <punctuation> BACKQUOTE "`"
+
+
+;; -----------------
+;; Literal terminals
+;; -----------------
+%token <string>      STRING_LITERAL
+
+%type  <number>      ;;syntax semantic-lex-number-expression
+%token <number>      NUMBER_LITERAL
+
+%type  <symbol>      ;;syntax "\\(\\sw\\|\\s_\\)+"
+%token <symbol>      NAME
+
+;; -----------------
+;; Keyword terminals
+;; -----------------
+%type  <keyword> ;;syntax "\\(\\sw\\|\\s_\\)+" matchdatatype keyword
+
+%keyword AND        "and"
+%put     AND summary
+"Logical AND binary operator ... "
+
+%keyword AS          "as"
+%put     AS summary
+"EXPR as NAME makes value of EXPR available as variable NAME"
+
+%keyword ASSERT             "assert"
+%put     ASSERT summary
+"Raise AssertionError exception if <expr> is false"
+
+%keyword BREAK      "break"
+%put     BREAK summary
+"Terminate 'for' or 'while' loop"
+
+%keyword CLASS      "class"
+%put     CLASS summary
+"Define a new class"
+
+%keyword CONTINUE           "continue"
+%put     CONTINUE summary
+"Skip to the next iteration of enclosing 'for' or 'while' loop"
+
+%keyword DEF        "def"
+%put     DEF summary
+"Define a new function"
+
+%keyword DEL        "del"
+%put     DEL summary
+"Delete specified objects, i.e., undo what assignment did"
+
+%keyword ELIF       "elif"
+%put     ELIF summary
+"Shorthand for 'else if' following an 'if' statement"
+
+%keyword ELSE       "else"
+%put     ELSE summary
+"Start the 'else' clause following an 'if' statement"
+
+%keyword EXCEPT             "except"
+%put     EXCEPT summary
+"Specify exception handlers along with 'try' keyword"
+
+%keyword EXEC       "exec"
+%put     EXEC summary
+"Dynamically execute Python code"
+
+%keyword FINALLY            "finally"
+%put     FINALLY summary
+"Specify code to be executed after 'try' statements whether or not an exception occurred"
+
+%keyword FOR        "for"
+%put     FOR summary
+"Start a 'for' loop"
+
+%keyword FROM       "from"
+%put     FROM summary
+"Modify behavior of 'import' statement"
+
+%keyword GLOBAL             "global"
+%put     GLOBAL summary
+"Declare one or more symbols as global symbols"
+
+%keyword IF         "if"
+%put     IF summary
+"Start 'if' conditional statement"
+
+%keyword IMPORT             "import"
+%put     IMPORT summary
+"Load specified modules"
+
+%keyword IN         "in"
+%put     IN summary
+"Part of 'for' statement "
+
+%keyword IS         "is"
+%put     IS summary
+"Binary operator that tests for object equality"
+
+%keyword LAMBDA             "lambda"
+%put     LAMBDA summary
+"Create anonymous function"
+
+%keyword NOT        "not"
+%put     NOT summary
+"Unary boolean negation operator"
+
+%keyword OR         "or"
+%put     OR summary
+"Binary logical 'or' operator"
+
+%keyword PASS       "pass"
+%put     PASS summary
+"Statement that does nothing"
+
+%keyword PRINT      "print"
+%put     PRINT summary
+"Print each argument to standard output"
+
+%keyword RAISE      "raise"
+%put     RAISE summary
+"Raise an exception"
+
+%keyword RETURN             "return"
+%put     RETURN summary
+"Return from a function"
+
+%keyword TRY        "try"
+%put     TRY summary
+"Start of statements protected by exception handlers"
+
+%keyword WHILE      "while"
+%put     WHILE summary
+"Start a 'while' loop"
+
+%keyword YIELD      "yield"
+%put     YIELD summary
+"Create a generator function"
+
+%%
+
+;;;****************************************************************************
+;;;@ goal
+;;;****************************************************************************
+
+;; simple_stmt are statements that do not involve INDENT tokens
+;; compound_stmt are statements that involve INDENT tokens
+goal
+  : NEWLINE
+  | simple_stmt
+  | compound_stmt
+  ;
+
+;;;****************************************************************************
+;;;@ simple_stmt
+;;;****************************************************************************
+
+;; simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE
+simple_stmt
+  : small_stmt_list semicolon_opt NEWLINE
+  ;
+
+;; small_stmt (';' small_stmt)*
+small_stmt_list
+  : small_stmt
+  | small_stmt_list SEMICOLON small_stmt
+  ;
+
+small_stmt
+  : expr_stmt
+  | print_stmt
+  | del_stmt
+  | pass_stmt
+  | flow_stmt
+  | import_stmt
+  | global_stmt
+  | exec_stmt
+  | assert_stmt
+  ;
+
+;;;============================================================================
+;;;@@ print_stmt
+;;;============================================================================
+
+;; print_stmt: 'print' [ test (',' test)* [','] ]
+;;           | '>>' test [ (',' test)+ [','] ]
+print_stmt
+  : PRINT print_stmt_trailer
+    (CODE-TAG $1 nil)
+  ;
+
+;; [ test (',' test)* [','] ] | '>>' test [ (',' test)+ [','] ]
+print_stmt_trailer
+  : test_list_opt
+    ()
+  | GTGT test trailing_test_list_with_opt_comma_opt
+    ()
+  ;
+
+;; [ (',' test)+ [','] ]
+trailing_test_list_with_opt_comma_opt
+  : ;;EMPTY
+  | trailing_test_list comma_opt
+    ()
+  ;
+
+;; (',' test)+
+trailing_test_list
+  : COMMA test
+    ()
+  | trailing_test_list COMMA test
+    ()
+  ;
+
+;;;============================================================================
+;;;@@ expr_stmt
+;;;============================================================================
+
+;; expr_stmt: testlist (augassign testlist | ('=' testlist)*)
+expr_stmt
+  : testlist expr_stmt_trailer
+    (if (and $2 (stringp $1) (string-match "^\\(\\sw\\|\\s_\\)+$" $1))
+       ;; If this is an assignment statement and left side is a symbol,
+       ;; then generate a 'variable token, else return 'code token.
+       (VARIABLE-TAG $1 nil nil)
+      (CODE-TAG $1 nil))
+  ;
+
+;; Could be EMPTY because of eq_testlist_zom.
+;; (augassign testlist | ('=' testlist)*)
+expr_stmt_trailer
+  : augassign testlist
+  | eq_testlist_zom
+  ;
+
+;; Could be EMPTY!
+;; ('=' testlist)*
+eq_testlist_zom
+  : ;;EMPTY
+  | eq_testlist_zom ASSIGN testlist
+    (identity $3)
+  ;
+
+;; augassign: '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^='
+;;          | '<<=' | '>>=' | '**=' | '//='
+augassign
+  : PLUSEQ | MINUSEQ | MULTEQ | DIVEQ | MODEQ
+  | AMPEQ  | OREQ    | HATEQ  | LTLTEQ
+  | GTGTEQ | EXPEQ   | DIVDIVEQ
+  ;
+
+;;;============================================================================
+;;;@@ del_stmt
+;;;============================================================================
+
+;; del_stmt: 'del' exprlist
+del_stmt
+  : DEL exprlist
+    (CODE-TAG $1 nil)
+  ;
+
+;; exprlist: expr (',' expr)* [',']
+exprlist
+  : expr_list comma_opt
+    ()
+  ;
+
+;; expr (',' expr)*
+expr_list
+  : expr
+    ()
+  | expr_list COMMA expr
+    ()
+  ;
+
+;;;============================================================================
+;;;@@ pass_stmt
+;;;============================================================================
+
+;; pass_stmt: 'pass'
+pass_stmt
+  : PASS
+    (CODE-TAG $1 nil)
+  ;
+
+;;;============================================================================
+;;;@@ flow_stmt
+;;;============================================================================
+
+flow_stmt
+  : break_stmt
+  | continue_stmt
+  | return_stmt
+  | raise_stmt
+  | yield_stmt
+  ;
+
+;; break_stmt: 'break'
+break_stmt
+  : BREAK
+    (CODE-TAG $1 nil)
+  ;
+
+;; continue_stmt: 'continue'
+continue_stmt
+  : CONTINUE
+    (CODE-TAG $1 nil)
+  ;
+
+;; return_stmt: 'return' [testlist]
+return_stmt
+  : RETURN testlist_opt
+    (CODE-TAG $1 nil)
+  ;
+
+;; [testlist]
+testlist_opt
+  : ;;EMPTY
+  | testlist
+    ()
+  ;
+
+;; yield_stmt: 'yield' testlist
+yield_stmt
+  : YIELD
+    (CODE-TAG $1 nil)
+  | YIELD testlist
+    (CODE-TAG $1 nil)
+  ;
+
+;; raise_stmt: 'raise' [test [',' test [',' test]]]
+raise_stmt
+  : RAISE zero_one_two_or_three_tests
+    (CODE-TAG $1 nil)
+  ;
+
+;; [test [',' test [',' test]]]
+zero_one_two_or_three_tests
+  : ;;EMPTY
+  | test zero_one_or_two_tests
+    ()
+  ;
+
+;; [',' test [',' test]]
+zero_one_or_two_tests
+  : ;;EMPTY
+  | COMMA test zero_or_one_comma_test
+    ()
+  ;
+
+;; [',' test]
+zero_or_one_comma_test
+  : ;;EMPTY
+  | COMMA test
+    ()
+  ;
+
+;;;============================================================================
+;;;@@ import_stmt
+;;;============================================================================
+
+;; import_stmt : 'import' dotted_as_name (',' dotted_as_name)*
+;;             | 'from' dotted_name 'import'
+;;               ('*' | import_as_name (',' import_as_name)*)
+import_stmt
+  : IMPORT dotted_as_name_list
+    (INCLUDE-TAG $2 nil)
+  | FROM dotted_name IMPORT star_or_import_as_name_list
+    (INCLUDE-TAG $2 nil)
+  ;
+
+;; dotted_as_name (',' dotted_as_name)*
+dotted_as_name_list
+  : dotted_as_name
+  | dotted_as_name_list COMMA dotted_as_name
+  ;
+
+;; ('*' | import_as_name (',' import_as_name)*)
+star_or_import_as_name_list
+  : MULT
+    ()
+  | import_as_name_list
+    ()
+  ;
+
+;; import_as_name (',' import_as_name)*
+import_as_name_list
+  : import_as_name
+    ()
+  | import_as_name_list COMMA import_as_name
+    ()
+  ;
+
+;; import_as_name: NAME [NAME NAME]
+import_as_name
+  : NAME as_name_opt
+    ()
+  ;
+
+;; dotted_as_name: dotted_name [AS NAME]
+dotted_as_name
+  : dotted_name as_name_opt
+  ;
+
+;; [AS NAME]
+as_name_opt
+  : ;;EMPTY
+  | AS NAME
+    (identity $2)
+  ;
+
+;; dotted_name: NAME ('.' NAME)*
+dotted_name
+  : NAME
+  | dotted_name PERIOD NAME
+    (format "%s.%s" $1 $3)
+  ;
+
+;;;============================================================================
+;;;@@ global_stmt
+;;;============================================================================
+
+;; global_stmt: 'global' NAME (',' NAME)*
+global_stmt
+  : GLOBAL comma_sep_name_list
+    (CODE-TAG $1 nil)
+  ;
+
+;; NAME (',' NAME)*
+comma_sep_name_list
+  : NAME
+  | comma_sep_name_list COMMA NAME
+  ;
+
+;;;============================================================================
+;;;@@ exec_stmt
+;;;============================================================================
+
+;; exec_stmt: 'exec' expr ['in' test [',' test]]
+exec_stmt
+  : EXEC expr exec_trailer
+    (CODE-TAG $1 nil)
+  ;
+
+;; ['in' test [',' test]]
+exec_trailer
+  : ;;EMPTY
+  | IN test comma_test_opt
+    ()
+  ;
+
+;; [',' test]
+comma_test_opt
+  : ;;EMPTY
+  | COMMA test
+    ()
+  ;
+
+;;;============================================================================
+;;;@@ assert_stmt
+;;;============================================================================
+
+;; assert_stmt: 'assert' test [',' test]
+assert_stmt
+  : ASSERT test comma_test_opt
+    (CODE-TAG $1 nil)
+  ;
+
+;;;****************************************************************************
+;;;@ compound_stmt
+;;;****************************************************************************
+
+compound_stmt
+  : if_stmt
+  | while_stmt
+  | for_stmt
+  | try_stmt
+  | funcdef
+  | class_declaration
+  ;
+
+;;;============================================================================
+;;;@@ if_stmt
+;;;============================================================================
+
+;; if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite]
+if_stmt
+  : IF test COLON suite elif_suite_pair_list else_suite_pair_opt
+    (CODE-TAG $1 nil)
+  ;
+
+;; ('elif' test ':' suite)*
+elif_suite_pair_list
+  : ;;EMPTY
+  | elif_suite_pair_list ELIF test COLON suite
+    ()
+  ;
+
+;; ['else' ':' suite]
+else_suite_pair_opt
+  : ;;EMPTY
+  | ELSE COLON suite
+    ()
+  ;
+
+;; This NT follows the COLON token for most compound statements.
+;; suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT
+suite
+  : simple_stmt
+    (list $1)
+  | NEWLINE indented_block
+    (progn $2)
+  ;
+
+indented_block
+  : INDENT_BLOCK
+    (EXPANDFULL $1 indented_block_body)
+  ;
+
+indented_block_body
+  : INDENT
+    ()
+  | DEDENT
+    ()
+  | simple_stmt
+  | compound_stmt
+  ;
+
+;;;============================================================================
+;;;@@ while_stmt
+;;;============================================================================
+
+;; while_stmt: 'while' test ':' suite ['else' ':' suite]
+while_stmt
+  : WHILE test COLON suite else_suite_pair_opt
+    (CODE-TAG $1 nil)
+  ;
+
+;;;============================================================================
+;;;@@ for_stmt
+;;;============================================================================
+
+;; for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]
+for_stmt
+  : FOR exprlist IN testlist COLON suite else_suite_pair_opt
+    (CODE-TAG $1 nil)
+  ;
+
+;;;============================================================================
+;;;@@ try_stmt
+;;;============================================================================
+
+;; try_stmt: ('try' ':' suite (except_clause ':' suite)+ #diagram:break
+;;            ['else' ':' suite] | 'try' ':' suite 'finally' ':' suite)
+try_stmt
+  : TRY COLON suite except_clause_suite_pair_list else_suite_pair_opt
+    (CODE-TAG $1 nil)
+  | TRY COLON suite FINALLY COLON suite
+    (CODE-TAG $1 nil)
+  ;
+
+;; (except_clause ':' suite)+
+except_clause_suite_pair_list
+  : except_clause COLON suite
+    ()
+  | except_clause_suite_pair_list except_clause COLON suite
+    ()
+  ;
+
+;; # NB compile.c makes sure that the default except clause is last
+;; except_clause: 'except' [test [',' test]]
+except_clause
+  : EXCEPT zero_one_or_two_test
+    ()
+  ;
+
+;; [test [',' test]]
+zero_one_or_two_test
+  : ;;EMPTY
+  | test zero_or_one_comma_test
+    ()
+  ;
+
+;;;============================================================================
+;;;@@ funcdef
+;;;============================================================================
+
+;; funcdef: 'def' NAME parameters ':' suite
+funcdef
+  : DEF NAME function_parameter_list COLON suite
+    (FUNCTION-TAG $2 nil $3)
+  ;
+
+function_parameter_list
+  : PAREN_BLOCK
+    (let ((wisent-python-EXPANDING-block t))
+      (EXPANDFULL $1 function_parameters))
+  ;
+
+;; parameters: '(' [varargslist] ')'
+function_parameters
+  : LPAREN
+    ()
+  | RPAREN
+    ()
+  | function_parameter COMMA
+  | function_parameter RPAREN
+  ;
+
+function_parameter
+  : fpdef_opt_test
+ ;;  : NAME
+ ;;    (VARIABLE-TAG $1 nil nil)
+  | MULT NAME
+    (VARIABLE-TAG $2 nil nil)
+  | EXPONENT NAME
+    (VARIABLE-TAG $2 nil nil)
+  ;
+
+;;;============================================================================
+;;;@@ class_declaration
+;;;============================================================================
+
+;; classdef: 'class' NAME ['(' testlist ')'] ':' suite
+class_declaration
+  : CLASS NAME paren_class_list_opt COLON suite
+    (TYPE-TAG $2 $1             ;; Name "class"
+              $5                ;; Members
+              (cons $3 nil)     ;; (SUPERCLASSES . INTERFACES)
+              )
+  ;
+
+;; ['(' testlist ')']
+paren_class_list_opt
+  : ;;EMPTY
+  | paren_class_list
+  ;
+
+paren_class_list
+  : PAREN_BLOCK
+    (let ((wisent-python-EXPANDING-block t))
+      (mapcar 'semantic-tag-name (EXPANDFULL $1 paren_classes)))
+  ;
+
+;; parameters: '(' [varargslist] ')'
+paren_classes
+  : LPAREN
+    ()
+  | RPAREN
+    ()
+  | paren_class COMMA
+    (VARIABLE-TAG $1 nil nil)
+  | paren_class RPAREN
+    (VARIABLE-TAG $1 nil nil)
+  ;
+
+;; In general, the base class can be specified by a general expression
+;; which evalue to a class object, i.e., base classes are not just names!
+;; However base classes are names in most cases.  Thus the
+;; non-terminals below work only with simple names.  Even if the
+;; parser can parse general expressions, I don't see much benefit in
+;; generating a string of expression as base class "name".
+paren_class
+  : dotted_name
+  ;
+
+;;;****************************************************************************
+;;;@ test
+;;;****************************************************************************
+
+;; test: and_test ('or' and_test)* | lambdef
+test
+  : test_test
+  | lambdef
+  ;
+
+;; and_test ('or' and_test)*
+test_test
+  : and_test
+  | test_test OR and_test
+    ()
+  ;
+
+;; and_test: not_test ('and' not_test)*
+and_test
+  : not_test
+  | and_test AND not_test
+    ()
+  ;
+
+;; not_test: 'not' not_test | comparison
+not_test
+  : NOT not_test
+    ()
+  | comparison
+  ;
+
+;; comparison: expr (comp_op expr)*
+comparison
+  : expr
+  | comparison comp_op expr
+    ()
+  ;
+
+;; comp_op: '<'|'>'|'=='|'>='|'<='|'<>'|'!='|'in'|'not' 'in'|'is'|'is' 'not'
+comp_op
+  : LT | GT | EQ | GE | LE | LTGT | NE | IN | NOT IN | IS | IS NOT
+  ;
+
+;; expr: xor_expr ('|' xor_expr)*
+expr
+  : xor_expr
+  | expr BAR xor_expr
+    ()
+  ;
+
+;; xor_expr: and_expr ('^' and_expr)*
+xor_expr
+  : and_expr
+  | xor_expr HAT and_expr
+    ()
+  ;
+
+;; and_expr: shift_expr ('&' shift_expr)*
+and_expr
+  : shift_expr
+  | and_expr AMP shift_expr
+    ()
+  ;
+
+;; shift_expr: arith_expr (('<<'|'>>') arith_expr)*
+shift_expr
+  : arith_expr
+  | shift_expr shift_expr_operators arith_expr
+    ()
+  ;
+
+;; ('<<'|'>>')
+shift_expr_operators
+  : LTLT
+  | GTGT
+  ;
+
+;; arith_expr: term (('+'|'-') term)*
+arith_expr
+  : term
+  | arith_expr plus_or_minus term
+    ()
+  ;
+
+;; ('+'|'-')
+plus_or_minus
+  : PLUS
+  | MINUS
+  ;
+
+;; term: factor (('*'|'/'|'%'|'//') factor)*
+term
+  : factor
+  | term term_operator factor
+    ()
+  ;
+
+term_operator
+  : MULT
+  | DIV
+  | MOD
+  | DIVDIV
+  ;
+
+;; factor: ('+'|'-'|'~') factor | power
+factor
+  : prefix_operators factor
+    ()
+  | power
+  ;
+
+;; ('+'|'-'|'~')
+prefix_operators
+  : PLUS
+  | MINUS
+  | TILDE
+  ;
+
+;; power: atom trailer* ('**' factor)*
+power
+  : atom trailer_zom exponent_zom
+    (concat $1
+           (if $2 (concat " " $2 " ") "")
+           (if $3 (concat " " $3) "")
+           )
+  ;
+
+trailer_zom
+  : ;;EMPTY
+  | trailer_zom trailer
+    ()
+  ;
+
+exponent_zom
+  : ;;EMPTY
+  | exponent_zom EXPONENT factor
+    ()
+  ;
+
+;; trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME
+trailer
+  : PAREN_BLOCK
+    ()
+  | BRACK_BLOCK
+    ()
+  | PERIOD NAME
+    ()
+  ;
+
+;; atom: '(' [testlist] ')' | '[' [listmaker] ']' | '{' [dictmaker] '}'
+;;     | '`' testlist '`'   | NAME | NUMBER | STRING+
+atom
+  : PAREN_BLOCK
+    ()
+  | BRACK_BLOCK
+    ()
+  | BRACE_BLOCK
+    ()
+  | BACKQUOTE testlist BACKQUOTE
+    ()
+  | NAME
+  | NUMBER_LITERAL
+  | one_or_more_string
+  ;
+
+test_list_opt
+  : ;;EMPTY
+  | testlist
+    ()
+  ;
+
+;; testlist: test (',' test)* [',']
+testlist
+  : comma_sep_test_list comma_opt
+  ;
+
+;; test (',' test)*
+comma_sep_test_list
+  : test
+  | comma_sep_test_list COMMA test
+    (format "%s, %s" $1 $3)
+  ;
+
+;; (read $1) and (read $2) were done before to peel away the double quotes.
+;; However that does not work for single quotes, so it was taken out.
+one_or_more_string
+  : STRING_LITERAL
+  | one_or_more_string STRING_LITERAL
+    (concat $1 $2)
+  ;
+
+;;;****************************************************************************
+;;;@ lambdef
+;;;****************************************************************************
+
+;; lambdef: 'lambda' [varargslist] ':' test
+lambdef
+  : LAMBDA varargslist_opt COLON test
+    (format "%s %s" $1 (or $2 ""))
+  ;
+
+;; [varargslist]
+varargslist_opt
+  : ;;EMPTY
+  | varargslist
+  ;
+
+;; varargslist: (fpdef ['=' test] ',')* ('*' NAME [',' '**' NAME] | '**' NAME)
+;;             | fpdef ['=' test] (',' fpdef ['=' test])* [',']
+varargslist
+  : fpdef_opt_test_list_comma_zom rest_args
+    (nconc $2 $1)
+  | fpdef_opt_test_list comma_opt
+  ;
+
+;; ('*' NAME [',' '**' NAME] | '**' NAME)
+rest_args
+  : MULT NAME multmult_name_opt
+    () ;;(VARIABLE-TAG $2 nil nil)
+  | EXPONENT NAME
+    () ;;(VARIABLE-TAG $2 nil nil)
+  ;
+
+;; [',' '**' NAME]
+multmult_name_opt
+  : ;;EMPTY
+  | COMMA EXPONENT NAME
+    (VARIABLE-TAG $3 nil nil)
+  ;
+
+fpdef_opt_test_list_comma_zom
+  : ;;EMPTY
+  | fpdef_opt_test_list_comma_zom fpdef_opt_test COMMA
+    (nconc $2 $1)
+  ;
+
+;; fpdef ['=' test] (',' fpdef ['=' test])*
+fpdef_opt_test_list
+  : fpdef_opt_test
+  | fpdef_opt_test_list COMMA fpdef_opt_test
+    (nconc $3 $1)
+  ;
+
+;; fpdef ['=' test]
+fpdef_opt_test
+  : fpdef eq_test_opt
+  ;
+
+;; fpdef: NAME | '(' fplist ')'
+fpdef
+  : NAME
+    (VARIABLE-TAG $1 nil nil)
+ ;; Below breaks the parser.  Don't know why, but my guess is that
+ ;; LPAREN/RPAREN clashes with the ones in function_parameters.
+ ;;  | LPAREN fplist RPAREN
+ ;;    (identity $2)
+  ;
+
+;; fplist: fpdef (',' fpdef)* [',']
+fplist
+  : fpdef_list comma_opt
+  ;
+
+;; fpdef (',' fpdef)*
+fpdef_list
+  : fpdef
+  | fpdef_list COMMA fpdef
+  ;
+
+;; ['=' test]
+eq_test_opt
+  : ;;EMPTY
+  | ASSIGN test
+    ()
+  ;
+
+;;;****************************************************************************
+;;;@ Misc
+;;;****************************************************************************
+
+;; [',']
+comma_opt
+  : ;;EMPTY
+  | COMMA
+  ;
+
+;; [';']
+semicolon_opt
+  : ;;EMPTY
+  | SEMICOLON
+  ;
+
+;;; python.wy ends here
diff --git a/etc/grammars/scheme.by b/etc/grammars/scheme.by
new file mode 100644 (file)
index 0000000..bc6612d
--- /dev/null
@@ -0,0 +1,84 @@
+;;; scheme.by -- Scheme BNF language specification
+
+;; Copyright (C) 2001-2011 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+%package semantic-scm-by
+
+%languagemode  scheme-mode
+%start         scheme
+
+%token DEFINE        "define"
+%token DEFINE-MODULE "define-module"
+%token LOAD          "load"
+
+%put DEFINE        summary "Function: (define symbol expression)"
+%put DEFINE-MODULE summary "Function: (define-module (name arg1 ...)) "
+%put LOAD          summary "Function: (load \"filename\")"
+
+%token <open-paren> OPENPAREN "("
+%token <close-paren> CLOSEPAREN ")"
+
+%%
+
+scheme : semantic-list
+        (EXPAND $1 scheme-list)
+       ;
+
+scheme-list : OPENPAREN scheme-in-list CLOSEPAREN
+             ( ,$2 )
+           ;
+
+scheme-in-list: DEFINE symbol expression
+               (VARIABLE-TAG $2 nil $3 )
+             | DEFINE name-args opt-doc sequence
+               (FUNCTION-TAG (car ,$2) nil (cdr ,$2) )
+             | DEFINE-MODULE name-args
+               (PACKAGE-TAG (nth (length $2) $2 ) nil)
+             | LOAD string
+               (INCLUDE-TAG (file-name-nondirectory (read $2)) (read $2) )
+             | symbol
+               (CODE-TAG $1 nil)
+             ;
+
+name-args: semantic-list
+          (EXPAND $1 name-arg-expand)
+        ;
+
+name-arg-expand : open-paren name-arg-expand
+                 ( ,$2 )
+               | symbol name-arg-expand
+                 ( ,(cons $1 ,$2) )
+               | ;; EMPTY
+                 (  )
+               ;
+
+opt-doc : string
+       | ;; EMPTY
+       ;
+
+sequence : expression sequence
+         | expression
+         ;
+
+expression : symbol
+          | semantic-list
+          | string
+          | number
+          ;
+
+;;; scheme.by ends here
diff --git a/etc/grammars/wisent-grammar.el b/etc/grammars/wisent-grammar.el
new file mode 100644 (file)
index 0000000..d7de1ee
--- /dev/null
@@ -0,0 +1,361 @@
+;;; wisent-grammar.el --- Wisent's input grammar mode
+
+;; Copyright (C) 2002-2011 Free Software Foundation, Inc.
+;;
+;; Author: David Ponce <david@dponce.com>
+;; Maintainer: David Ponce <david@dponce.com>
+;; Created: 26 Aug 2002
+;; Keywords: syntax
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; Major mode for editing Wisent's input grammar (.wy) files.
+
+;;; Code:
+(require 'semantic)
+(require 'semantic/grammar)
+(require 'semantic/find)
+(require 'semantic/lex)
+(require 'semantic/wisent)
+(require 'semantic/bovine)
+
+(defsubst wisent-grammar-region-placeholder (symb)
+  "Given a $N placeholder symbol in SYMB, return a $regionN symbol.
+Return nil if $N is not a valid placeholder symbol."
+  (let ((n (symbol-name symb)))
+    (if (string-match "^[$]\\([1-9][0-9]*\\)$" n)
+        (intern (concat "$region" (match-string 1 n))))))
+
+(defun wisent-grammar-EXPAND (symb nonterm)
+  "Expand call to EXPAND grammar macro.
+Return the form to parse from within a nonterminal.
+SYMB is a $I placeholder symbol that gives the bounds of the area to
+parse.
+NONTERM is the nonterminal symbol to start with."
+  (unless (member nonterm (semantic-grammar-start))
+    (error "EXPANDFULL macro called with %s, but not used with %%start"
+           nonterm))
+  (let (($ri (wisent-grammar-region-placeholder symb)))
+    (if $ri
+        `(semantic-bovinate-from-nonterminal
+          (car ,$ri) (cdr ,$ri) ',nonterm)
+      (error "Invalid form (EXPAND %s %s)" symb nonterm))))
+
+(defun wisent-grammar-EXPANDFULL (symb nonterm)
+  "Expand call to EXPANDFULL grammar macro.
+Return the form to recursively parse an area.
+SYMB is a $I placeholder symbol that gives the bounds of the area.
+NONTERM is the nonterminal symbol to start with."
+  (unless (member nonterm (semantic-grammar-start))
+    (error "EXPANDFULL macro called with %s, but not used with %%start"
+           nonterm))
+  (let (($ri (wisent-grammar-region-placeholder symb)))
+    (if $ri
+        `(semantic-parse-region
+          (car ,$ri) (cdr ,$ri) ',nonterm 1)
+      (error "Invalid form (EXPANDFULL %s %s)" symb nonterm))))
+
+(defun wisent-grammar-TAG (name class &rest attributes)
+  "Expand call to TAG grammar macro.
+Return the form to create a generic semantic tag.
+See the function `semantic-tag' for the meaning of arguments NAME,
+CLASS and ATTRIBUTES."
+  `(wisent-raw-tag
+    (semantic-tag ,name ,class ,@attributes)))
+
+(defun wisent-grammar-VARIABLE-TAG (name type default-value &rest attributes)
+  "Expand call to VARIABLE-TAG grammar macro.
+Return the form to create a semantic tag of class variable.
+See the function `semantic-tag-new-variable' for the meaning of
+arguments NAME, TYPE, DEFAULT-VALUE and ATTRIBUTES."
+  `(wisent-raw-tag
+    (semantic-tag-new-variable ,name ,type ,default-value ,@attributes)))
+
+(defun wisent-grammar-FUNCTION-TAG (name type arg-list &rest attributes)
+  "Expand call to FUNCTION-TAG grammar macro.
+Return the form to create a semantic tag of class function.
+See the function `semantic-tag-new-function' for the meaning of
+arguments NAME, TYPE, ARG-LIST and ATTRIBUTES."
+  `(wisent-raw-tag
+    (semantic-tag-new-function ,name ,type ,arg-list ,@attributes)))
+
+(defun wisent-grammar-TYPE-TAG (name type members parents &rest attributes)
+  "Expand call to TYPE-TAG grammar macro.
+Return the form to create a semantic tag of class type.
+See the function `semantic-tag-new-type' for the meaning of arguments
+NAME, TYPE, MEMBERS, PARENTS and ATTRIBUTES."
+  `(wisent-raw-tag
+    (semantic-tag-new-type ,name ,type ,members ,parents ,@attributes)))
+
+(defun wisent-grammar-INCLUDE-TAG (name system-flag &rest attributes)
+  "Expand call to INCLUDE-TAG grammar macro.
+Return the form to create a semantic tag of class include.
+See the function `semantic-tag-new-include' for the meaning of
+arguments NAME, SYSTEM-FLAG and ATTRIBUTES."
+  `(wisent-raw-tag
+    (semantic-tag-new-include ,name ,system-flag ,@attributes)))
+
+(defun wisent-grammar-PACKAGE-TAG (name detail &rest attributes)
+  "Expand call to PACKAGE-TAG grammar macro.
+Return the form to create a semantic tag of class package.
+See the function `semantic-tag-new-package' for the meaning of
+arguments NAME, DETAIL and ATTRIBUTES."
+  `(wisent-raw-tag
+    (semantic-tag-new-package ,name ,detail ,@attributes)))
+
+(defun wisent-grammar-CODE-TAG (name detail &rest attributes)
+  "Expand call to CODE-TAG grammar macro.
+Return the form to create a semantic tag of class code.
+See the function `semantic-tag-new-code' for the meaning of arguments
+NAME, DETAIL and ATTRIBUTES."
+  `(wisent-raw-tag
+    (semantic-tag-new-code ,name ,detail ,@attributes)))
+
+(defun wisent-grammar-ALIAS-TAG (name aliasclass definition &rest attributes)
+  "Expand call to ALIAS-TAG grammar macro.
+Return the form to create a semantic tag of class alias.
+See the function `semantic-tag-new-alias' for the meaning of arguments
+NAME, ALIASCLASS, DEFINITION and ATTRIBUTES."
+  `(wisent-raw-tag
+    (semantic-tag-new-alias ,name ,aliasclass ,definition ,@attributes)))
+
+(defun wisent-grammar-EXPANDTAG (raw-tag)
+  "Expand call to EXPANDTAG grammar macro.
+Return the form to produce a list of cooked tags from raw form of
+Semantic tag RAW-TAG."
+  `(wisent-cook-tag ,raw-tag))
+
+(defun wisent-grammar-AST-ADD (ast &rest nodes)
+  "Expand call to AST-ADD grammar macro.
+Return the form to update the abstract syntax tree AST with NODES.
+See also the function `semantic-ast-add'."
+  `(semantic-ast-add ,ast ,@nodes))
+
+(defun wisent-grammar-AST-PUT (ast &rest nodes)
+  "Expand call to AST-PUT grammar macro.
+Return the form to update the abstract syntax tree AST with NODES.
+See also the function `semantic-ast-put'."
+  `(semantic-ast-put ,ast ,@nodes))
+
+(defun wisent-grammar-AST-GET (ast node)
+  "Expand call to AST-GET grammar macro.
+Return the form to get, from the abstract syntax tree AST, the value
+of NODE.
+See also the function `semantic-ast-get'."
+  `(semantic-ast-get ,ast ,node))
+
+(defun wisent-grammar-AST-GET1 (ast node)
+  "Expand call to AST-GET1 grammar macro.
+Return the form to get, from the abstract syntax tree AST, the first
+value of NODE.
+See also the function `semantic-ast-get1'."
+  `(semantic-ast-get1 ,ast ,node))
+
+(defun wisent-grammar-AST-GET-STRING (ast node)
+  "Expand call to AST-GET-STRING grammar macro.
+Return the form to get, from the abstract syntax tree AST, the value
+of NODE as a string.
+See also the function `semantic-ast-get-string'."
+  `(semantic-ast-get-string ,ast ,node))
+
+(defun wisent-grammar-AST-MERGE (ast1 ast2)
+  "Expand call to AST-MERGE grammar macro.
+Return the form to merge the abstract syntax trees AST1 and AST2.
+See also the function `semantic-ast-merge'."
+  `(semantic-ast-merge ,ast1 ,ast2))
+
+(defun wisent-grammar-SKIP-BLOCK (&optional symb)
+  "Expand call to SKIP-BLOCK grammar macro.
+Return the form to skip a parenthesized block.
+Optional argument SYMB is a $I placeholder symbol that gives the
+bounds of the block to skip.  By default, skip the block at `$1'.
+See also the function `wisent-skip-block'."
+  (let ($ri)
+    (when symb
+      (unless (setq $ri (wisent-grammar-region-placeholder symb))
+        (error "Invalid form (SKIP-BLOCK %s)" symb)))
+    `(wisent-skip-block ,$ri)))
+
+(defun wisent-grammar-SKIP-TOKEN ()
+  "Expand call to SKIP-TOKEN grammar macro.
+Return the form to skip the lookahead token.
+See also the function `wisent-skip-token'."
+  `(wisent-skip-token))
+
+(defun wisent-grammar-assocs ()
+  "Return associativity and precedence level definitions."
+  (mapcar
+   #'(lambda (tag)
+       (cons (intern (semantic-tag-name tag))
+             (mapcar #'semantic-grammar-item-value
+                     (semantic-tag-get-attribute tag :value))))
+   (semantic-find-tags-by-class 'assoc (current-buffer))))
+
+(defun wisent-grammar-terminals ()
+  "Return the list of terminal symbols.
+Keep order of declaration in the WY file without duplicates."
+  (let (terms)
+    (mapcar
+     #'(lambda (tag)
+         (mapcar #'(lambda (name)
+                     (add-to-list 'terms (intern name)))
+                 (cons (semantic-tag-name tag)
+                       (semantic-tag-get-attribute tag :rest))))
+     (semantic--find-tags-by-function
+      #'(lambda (tag)
+          (memq (semantic-tag-class tag) '(token keyword)))
+      (current-buffer)))
+    (nreverse terms)))
+
+;; Cache of macro definitions currently in use.
+(defvar wisent--grammar-macros nil)
+
+(defun wisent-grammar-expand-macros (expr)
+  "Expand expression EXPR into a form without grammar macros.
+Return the expanded expression."
+  (if (or (atom expr) (semantic-grammar-quote-p (car expr)))
+      expr ;; Just return atom or quoted expression.
+    (let* ((expr  (mapcar 'wisent-grammar-expand-macros expr))
+           (macro (assq (car expr) wisent--grammar-macros)))
+      (if macro ;; Expand Semantic built-in.
+          (apply (cdr macro) (cdr expr))
+        expr))))
+
+(defun wisent-grammar-nonterminals ()
+  "Return the list form of nonterminal definitions."
+  (let ((nttags (semantic-find-tags-by-class
+                 'nonterminal (current-buffer)))
+        ;; Setup the cache of macro definitions.
+        (wisent--grammar-macros (semantic-grammar-macros))
+        rltags nterms rules rule elems elem actn sexp prec)
+    (while nttags
+      (setq rltags (semantic-tag-components (car nttags))
+            rules  nil)
+      (while rltags
+        (setq elems (semantic-tag-get-attribute (car rltags) :value)
+              prec  (semantic-tag-get-attribute (car rltags) :prec)
+              actn  (semantic-tag-get-attribute (car rltags) :expr)
+              rule  nil)
+        (when elems ;; not an EMPTY rule
+          (while elems
+            (setq elem  (car elems)
+                  elems (cdr elems))
+            (setq elem (if (consp elem) ;; mid-rule action
+                           (wisent-grammar-expand-macros (read (car elem)))
+                         (semantic-grammar-item-value elem)) ;; item
+                  rule (cons elem rule)))
+          (setq rule (nreverse rule)))
+        (if prec
+            (setq prec (vector (semantic-grammar-item-value prec))))
+        (if actn
+            (setq sexp (wisent-grammar-expand-macros (read actn))))
+        (setq rule (if actn
+                       (if prec
+                           (list rule prec sexp)
+                         (list rule sexp))
+                     (if prec
+                         (list rule prec)
+                       (list rule))))
+        (setq rules (cons rule rules)
+              rltags (cdr rltags)))
+      (setq nterms (cons (cons (intern (semantic-tag-name (car nttags)))
+                               (nreverse rules))
+                         nterms)
+            nttags (cdr nttags)))
+    (nreverse nterms)))
+
+(defun wisent-grammar-grammar ()
+  "Return Elisp form of the grammar."
+  (let* ((terminals    (wisent-grammar-terminals))
+         (nonterminals (wisent-grammar-nonterminals))
+         (assocs       (wisent-grammar-assocs)))
+    (cons terminals (cons assocs nonterminals))))
+
+(defun wisent-grammar-parsetable-builder ()
+  "Return the value of the parser table."
+  `(progn
+     ;; Ensure that the grammar [byte-]compiler is available.
+     (eval-when-compile (require 'semantic/wisent/comp))
+     (wisent-compile-grammar
+      ',(wisent-grammar-grammar)
+      ',(semantic-grammar-start))))
+
+(defun wisent-grammar-setupcode-builder ()
+  "Return the parser setup code."
+  (format
+   "(semantic-install-function-overrides\n\
+      '((parse-stream . wisent-parse-stream)))\n\
+    (setq semantic-parser-name \"LALR\"\n\
+          semantic--parse-table %s\n\
+          semantic-debug-parser-source %S\n\
+          semantic-flex-keywords-obarray %s\n\
+          semantic-lex-types-obarray %s)\n\
+    ;; Collect unmatched syntax lexical tokens\n\
+    (semantic-make-local-hook 'wisent-discarding-token-functions)\n\
+    (add-hook 'wisent-discarding-token-functions\n\
+              'wisent-collect-unmatched-syntax nil t)"
+   (semantic-grammar-parsetable)
+   (buffer-name)
+   (semantic-grammar-keywordtable)
+   (semantic-grammar-tokentable)))
+
+(defvar wisent-grammar-menu
+  '("WY Grammar"
+    ["LALR Compiler Verbose" wisent-toggle-verbose-flag
+     :style toggle :active (boundp 'wisent-verbose-flag)
+     :selected (and (boundp 'wisent-verbose-flag)
+                    wisent-verbose-flag)]
+    )
+  "WY mode specific grammar menu.
+Menu items are appended to the common grammar menu.")
+
+(define-derived-mode wisent-grammar-mode semantic-grammar-mode "WY"
+  "Major mode for editing Wisent grammars."
+  (semantic-grammar-setup-menu wisent-grammar-menu)
+  (semantic-install-function-overrides
+   '((grammar-parsetable-builder . wisent-grammar-parsetable-builder)
+     (grammar-setupcode-builder  . wisent-grammar-setupcode-builder)
+     )))
+
+(add-to-list 'auto-mode-alist '("\\.wy$" . wisent-grammar-mode))
+
+(defvar-mode-local wisent-grammar-mode semantic-grammar-macros
+  '(
+    (ASSOC          . semantic-grammar-ASSOC)
+    (EXPAND         . wisent-grammar-EXPAND)
+    (EXPANDFULL     . wisent-grammar-EXPANDFULL)
+    (TAG            . wisent-grammar-TAG)
+    (VARIABLE-TAG   . wisent-grammar-VARIABLE-TAG)
+    (FUNCTION-TAG   . wisent-grammar-FUNCTION-TAG)
+    (TYPE-TAG       . wisent-grammar-TYPE-TAG)
+    (INCLUDE-TAG    . wisent-grammar-INCLUDE-TAG)
+    (PACKAGE-TAG    . wisent-grammar-PACKAGE-TAG)
+    (EXPANDTAG      . wisent-grammar-EXPANDTAG)
+    (CODE-TAG       . wisent-grammar-CODE-TAG)
+    (ALIAS-TAG      . wisent-grammar-ALIAS-TAG)
+    (AST-ADD        . wisent-grammar-AST-ADD)
+    (AST-PUT        . wisent-grammar-AST-PUT)
+    (AST-GET        . wisent-grammar-AST-GET)
+    (AST-GET1       . wisent-grammar-AST-GET1)
+    (AST-GET-STRING . wisent-grammar-AST-GET-STRING)
+    (AST-MERGE      . wisent-grammar-AST-MERGE)
+    (SKIP-BLOCK     . wisent-grammar-SKIP-BLOCK)
+    (SKIP-TOKEN     . wisent-grammar-SKIP-TOKEN)
+    )
+  "Semantic grammar macros used in wisent grammars.")
+
+;;; wisent-grammar.el ends here
index 8b92eab8579082debfe9ee33a02b494f5b19b60a..6a4d4b9cc9c98ec8058160617d0d7373b154a9f0 100644 (file)
@@ -1,7 +1,70 @@
+2011-08-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/sh-script.el (sh-font-lock-paren): Don't mistake "main" for
+       "in" (bug#9190).
+
+2011-08-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * mail/sendmail.el (sendmail-query-once): Restore the current
+       buffer after querying (bug#9074).
+
+       * dired.el (dired-flagged): Use different faces for marked and
+       flagged files (bug#6117).
+
+       * emacs-lisp/cl-macs.el (dolist): Mention that there's a nil block
+       (bug#4433).
+
+       * ido.el (ido-mode): Switch off the message if called
+       non-interactively.
+
+       * mail/smtpmail.el (smtpmail-query-smtp-server): Try port 25
+       before 587, since it appears that that's more likely to work for
+       more people.
+
+       * cus-edit.el (custom-file): When running under emacs -q, always
+       refuse to save the customisations, even if the .emacs file doesn't
+       exist.
+
+       * info.el: Remove the `Info-beginning-of-buffer' function
+       (bug#8325).
+
+       * net/network-stream.el (network-stream-open-starttls):
+       Use `starttls-available-p' to see whether starttls.el can be used.
+
+2011-08-01  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (display-buffer-in-window): Don't set dedicated status
+       of window here (Bug#9215).
+       (display-buffer-pop-up-window, display-buffer-pop-up-frame)
+       (display-buffer-pop-up-side-window)
+       (display-buffer-in-side-window): Set dedicated status of window here.
+
+2011-08-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/package.el (package-generate-autoloads): Load autoloads
+       before binding generated-autoload-file.
+
+2011-08-01  Deniz Dogan  <deniz@dogan.se>
+
+       * net/rcirc.el (rcirc-handler-333): Clarify docstring.
+
+2011-07-30  Michael Albinus  <michael.albinus@gmx.de>
+
+       Sync with Tramp 2.2.2.
+
+       * net/trampver.el: Update release number.
+
+2011-07-30  Juri Linkov  <juri@jurta.org>
+
+       * dired-aux.el (dired-touch-initial): Remove function.
+       (dired-do-chxxx): For op-symbol `touch', set `initial' to the
+       current time, and `default' to the last modification time of the
+       current marked file (bug#6887).
+
 2011-07-28  Jose E. Marchesi  <jemarch@gnu.org>
 
        * simple.el (goto-line): Use string-to-number to provide a
-       numeric argument to read-number.
+       numeric argument to read-number (bug#9163).
 
 2011-07-27  Michael Albinus  <michael.albinus@gmx.de>
 
@@ -28,8 +91,8 @@
        QT keyword "more" to prevent "more slots: ...." being spuriously
        parsed as a bitfield declaraion.
 
-       * progmodes/cc-engine.el (c-beginning-of-statement-1): Refactor
-       and enhance to handle bitfield declarations.
+       * progmodes/cc-engine.el (c-beginning-of-statement-1):
+       Refactor and enhance to handle bitfield declarations.
        (c-punctuation-in): New function.
        (c-forward-decl-or-cast-1): Enhance CASE 3 to handle bitfield
        declarations properly.
 
        * calendar/icalendar.el (icalendar--all-events): Take care of
        multiple vcalendars in a single file.
-       (icalendar--convert-float-to-ical): checkdoc fixes.
+       (icalendar--convert-float-to-ical): Checkdoc fixes.
 
 2011-07-25  Deniz Dogan  <deniz@dogan.se>
 
        (display-buffer-pop-up-side-window)
        (display-buffer-in-side-window): Call display-buffer-set-height
        and display-buffer-set-width after setting the new window's
-       buffer so `fit-window-to-buffer' and friends work on the right
-       buffer.
+       buffer so `fit-window-to-buffer' and friends work on the right buffer.
 
 2011-07-20  Sam Steingold  <sds@gnu.org>
 
 2011-07-19  Martin Rudalics  <rudalics@gmx.at>
 
        * window.el (display-buffer-alist-of-strings-p)
-       (display-buffer-alist-set-1, display-buffer-alist-set-2): New
-       functions.
+       (display-buffer-alist-set-1, display-buffer-alist-set-2):
+       New functions.
        (display-buffer-alist-set): Rewrite to handle Emacs 23 options
        more accurately.
 
 
        * progmodes/cc-langs.el (c-symbol-chars): Correct a typo.
 
-       * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): New
-       function.
+       * progmodes/cc-fonts.el (c-font-lock-enclosing-decls):
+       New function.
        (c-complex-decl-matchers): Insert reference to
        c-font-lock-enclosing-decls.
 
 
 2011-07-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * net/gnutls.el (gnutls-log-level): Removed.
+       * net/gnutls.el (gnutls-log-level): Remove.
 
        * textmodes/fill.el (adaptive-fill-regexp): Include EN DASH as an
        indentation character (bug#6380).
 
 2011-07-16  Martin Rudalics  <rudalics@gmx.at>
 
-       * frame.el (select-frame-set-input-focus): New argument
-       NORECORD.
+       * frame.el (select-frame-set-input-focus): New argument NORECORD.
        * window.el (pop-to-buffer): Select window used even if it was
-       selected before, see discussion of (Bug#8615), (Bug#6954).  Pass
-       argument NORECORD on to select-frame-set-input-focus.
+       selected before, see discussion of (Bug#8615), (Bug#6954).
+       Pass argument NORECORD on to select-frame-set-input-focus.
 
 2011-07-15  Glenn Morris  <rgm@gnu.org>
 
 
 2011-07-15  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * net/gnutls.el (gnutls-negotiate): Upcase
-       `gnutls-algorithm-priority'.
+       * net/gnutls.el (gnutls-negotiate):
+       Upcase `gnutls-algorithm-priority'.
 
 2011-07-15  Glenn Morris  <rgm@gnu.org>
 
        * printing.el (pr-toggle-region): Clarify the documentation
        slightly (bug#7493).
 
-       * time.el (display-time-update): Allow
-       `display-time-mail-function' to return nil (bug#7158).  Fix
-       suggested by Detlev Zundel.
+       * time.el (display-time-update):
+       Allow `display-time-mail-function' to return nil (bug#7158).
+       Fix suggested by Detlev Zundel.
 
        * vc/diff.el (diff): Clarify the order the file names are read
        (bug#7111).
 
 2011-07-14  Martin Rudalics  <rudalics@gmx.at>
 
-       * window.el (display-buffer-normalize-special): Replace
-       `dedicated' by `dedicate' to dedicate window (Bug#9072).
+       * window.el (display-buffer-normalize-special):
+       Replace `dedicated' by `dedicate' to dedicate window (Bug#9072).
 
 2011-07-14  Eli Zaretskii  <eliz@gnu.org>
 
        switch-to-buffer.
 
        * net/tramp-compat.el (tramp-compat-pop-to-buffer-same-window):
-       Deleted.
+       Delete.
 
 2011-07-14  Juanma Barranquero  <lekktu@gmail.com>
 
 
 2011-07-13  Chong Yidong  <cyd@stupidchicken.com>
 
-       * window.el (switch-to-buffer): New arg FORCE-SAME-WINDOW.  Use
-       pop-to-buffer buffer-or-name if it is nil.
+       * window.el (switch-to-buffer): New arg FORCE-SAME-WINDOW.
+       Use pop-to-buffer buffer-or-name if it is nil.
 
        * emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions):
        Remove switch-to-buffer.
 
 2011-07-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * progmodes/cperl-mode.el (cperl-syntaxify-by-font-lock): Rewrite
-       to avoid awkward possessive "s" (bug#5986).
+       * progmodes/cperl-mode.el (cperl-syntaxify-by-font-lock):
+       Rewrite to avoid awkward possessive "s" (bug#5986).
 
 2011-07-13  Glenn Morris  <rgm@gnu.org>
 
 
 2011-07-12  Roland Winkler  <winkler@gnu.org>
 
-       * textmodes/bibtex.el (bibtex-initialize): Use
-       pop-to-buffer-same-window.
+       * textmodes/bibtex.el (bibtex-initialize):
+       Use pop-to-buffer-same-window.
        (bibtex-search-entries): Fix interactive call.
 
 2011-07-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * progmodes/compile.el (compilation-error-regexp-alist-alist):
-       Fontise bytecomp Error lines more correctly (bug#2490).  Fix
-       suggested by Johan BockgÃ¥rd.
+       Fontise bytecomp Error lines more correctly (bug#2490).
+       Fix suggested by Johan BockgÃ¥rd.
 
        * subr.el (remove-duplicates): Remove; `delete-dups' is sufficient.
 
 
 2011-07-11  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * mail/sendmail.el (sendmail-query-once): Use
-       `customize-save-variable' unconditionally, now that it works under
+       * mail/sendmail.el (sendmail-query-once):
+       Use `customize-save-variable' unconditionally, now that it works under
        emacs -Q.
 
        * mail/smtpmail.el (smtpmail-query-smtp-server): Ditto.
 
 2011-07-09  Bob Nnamtrop  <bobnnamtrop@gmail.com>  (tiny change)
 
-       * emulation/viper-cmd.el (viper-change-state-to-vi): Limit
-       triggering of abbrev expansion (Bug#9038).
+       * emulation/viper-cmd.el (viper-change-state-to-vi):
+       Limit triggering of abbrev expansion (Bug#9038).
 
 2011-07-09  Martin Rudalics  <rudalics@gmx.at>
 
        * window.el (display-buffer-default-specifiers): Remove.
        (display-buffer-macro-specifiers): Remove default specifiers.
        (display-buffer-alist): Default to nil.
-       (display-buffer-reuse-window): New optional argument
-       other-window.
+       (display-buffer-reuse-window): New optional argument other-window.
        (display-buffer-pop-up-window): Allow splitting internal
        windows.  Check whether a live window was created.
        (display-buffer-other-window-means-other-frame)
        (display-buffer): Process other-window specifier and call
        display-buffer-reuse-window with it.  Emulate Emacs 23 behavior
        more faithfully.
-       (pop-up-windows, even-window-heights): Restore Emacs 23 default
-       values.
+       (pop-up-windows, even-window-heights): Restore Emacs 23 default values.
        (display-buffer-alist-set): Don't handle 'unset default values.
-       (display-buffer-in-window, display-buffer-alist-set): Replace
-       symbol "dedicated" by "dedicate".  Reported by Tassilo Horn
+       (display-buffer-in-window, display-buffer-alist-set):
+       Replace symbol "dedicated" by "dedicate".  Reported by Tassilo Horn
        <tassilo@member.fsf.org>.
 
 2011-07-09  Leo Liu  <sdl.web@gmail.com>
index 60d7690a3c86a9266ba4167d58fb6b5aa3107fa6..093e592c475f49333f4d523f5c22967e7e4d786f 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-30  Chong Yidong  <cyd@stupidchicken.com>
+
+       * semantic/grammar.el (semantic-grammar-insert-defanalyzers): Fix
+       require.
+
 2011-07-04  Darren Hoo  <darren.hoo@gmail.com>  (tiny change)
 
        * semantic/db.el (semanticdb-file-table-object): Don't bug out on
index 8e1fe8d3617ca1bb3a48ffd82ab5cd788aaa86d6..31489a4f625c2e881e9b87e890d1618f88c8ccf7 100644 (file)
@@ -19,8 +19,7 @@
 
 ;;; Commentary:
 ;;
-;; This file was generated from the grammar file semantic/bovine/c.by
-;; in the CEDET repository.
+;; This file was generated from etc/grammars/c.by.
 
 ;;; Code:
 
index 3cc4e5b23a364a16251fc56b8af039df3ce2cb41..41da728d5372e0ace19bc6083b8e9d61e1116c29 100644 (file)
@@ -19,8 +19,7 @@
 
 ;;; Commentary:
 ;;
-;; This file was generated from the grammar file
-;; semantic/bovine/make.by in the CEDET repository.
+;; This file was generated from etc/grammars/make.by.
 
 ;;; Code:
 
index 87efe747a4c5a8870d91d8bf62d6f8074765799f..8dd170384bcf590aa854729006da5bddec9958a0 100644 (file)
@@ -19,8 +19,7 @@
 
 ;;; Commentary:
 ;;
-;; This file was generated from the grammar file
-;; semantic/bovine/scm.by in the CEDET repository.
+;; This file was generated from etc/grammars/scm.by.
 
 ;;; Code:
 
index 270668e29593a7cd0c9cff868cf597473876eeb6..1d1184e534f172f49c209a3c50f0419faa75fef7 100644 (file)
@@ -801,7 +801,7 @@ Block definitions are read from the current table of lexical types."
     (with-current-buffer semantic--grammar-input-buffer
       (setq tokens (semantic-grammar-tokens)
             props  (semantic-grammar-token-properties tokens)))
-    (insert "(require 'semantic-lex)\n\n")
+    (insert "(require 'semantic/lex)\n\n")
     (let ((semantic-lex-types-obarray
            (semantic-lex-make-type-table tokens props))
           semantic-grammar--lex-block-specs)
index adea4ef69323116f79875f94718bbc6b3eb5fb23..38c1938744027974f0bd79b74706f5df7e2206d1 100644 (file)
@@ -19,8 +19,7 @@
 
 ;;; Commentary:
 ;;
-;; This file was generated from the grammar file
-;; semantic/wisent/wisent-java-tags.wy in the CEDET repository.
+;; This file was generated from etc/java-tags.wy.
 
 ;;; Code:
 
index e982caf44853090870f5773efdae5cb2abbad86b..b523db8771be7ebe9818c29970471a4cebd71df9 100644 (file)
@@ -1,6 +1,7 @@
 ;;; semantic/wisent/js-wy.el --- Generated parser support file
 
 ;; Copyright (C) 2005, 2009-2011  Free Software Foundation, Inc.
+;; Copyright (C) Ecma International.
 
 ;; This file is part of GNU Emacs.
 
@@ -19,8 +20,7 @@
 
 ;;; Commentary:
 ;;
-;; This file was generated from the grammar file
-;; semantic/wisent/wisent-javascript-jv.wy in the CEDET repository.
+;; This file was generated from etc/grammars/javascript-jv.wy.
 
 ;;; Code:
 (require 'semantic/lex)
index 3a69078b02c276ccf3224c1d595d2aabe9c6e515..36965757a14e640c8077caa76809cb52cd26a48e 100644 (file)
@@ -1,6 +1,7 @@
 ;;; semantic/wisent/python-wy.el --- Generated parser support file
 
 ;; Copyright (C) 2002-2004, 2007, 2010-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2001-2010 Python Software Foundation
 
 ;; This file is part of GNU Emacs.
 
@@ -19,8 +20,7 @@
 
 ;;; Commentary:
 ;;
-;; This file was generated from the grammar file
-;; semantic/wisent/wisent-python.wy in the CEDET repository.
+;; This file was generated from etc/grammars/python.wy.
 
 ;;; Code:
 
index d443d6c160c041589c51ae5b5b15c0325eb6e693..3e41a304f43dd1c2be68a7222656d63f3364946e 100644 (file)
@@ -4409,25 +4409,14 @@ if only the first line of the docstring is shown."))
 
 (defun custom-file (&optional no-error)
   "Return the file name for saving customizations."
-  (let ((file
-        (or custom-file
-            (let ((user-init-file user-init-file)
-                  (default-init-file
-                    (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs")))
-              (when (null user-init-file)
-                (if (or (file-exists-p default-init-file)
-                        (and (eq system-type 'windows-nt)
-                             (file-exists-p "~/_emacs")))
-                    ;; Started with -q, i.e. the file containing
-                    ;; Custom settings hasn't been read.  Saving
-                    ;; settings there would overwrite other settings.
-                    (if no-error
-                        nil
-                      (error "Saving settings from \"emacs -q\" would overwrite existing customizations"))
-                  (setq user-init-file default-init-file)))
-              user-init-file))))
-    (and file
-        (file-chase-links file))))
+  (if (null user-init-file)
+      ;; Started with -q, i.e. the file containing Custom settings
+      ;; hasn't been read.  Saving settings there won't make much
+      ;; sense.
+      (if no-error
+         nil
+       (error "Saving settings from \"emacs -q\" would overwrite existing customizations"))
+    (file-chase-links (or custom-file user-init-file))))
 
 ;; If recentf-mode is non-nil, this is defined.
 (declare-function recentf-expand-file-name "recentf" (name))
index 3103fbd5a7fbd788eb329c41435cbea517e70b31..ec157fc4939e7df518e2dd622a1376b104ae1e71 100644 (file)
@@ -226,34 +226,28 @@ List has a form of (file-name full-file-name (attribute-list))."
              (file-attributes full-file-name))))
    (directory-files dir)))
 \f
-
-(defun dired-touch-initial (files)
-  "Create initial input value for `touch' command."
-  ;; Nobody can explain what this version is supposed to do.  (Bug#6887)
-  ;; Also, the manual says it uses "the present time".
-  ;;; (let (initial)
-  ;;;   (while files
-  ;;;     (let ((current (nth 5 (file-attributes (car files)))))
-  ;;;       (if (and initial (not (equal initial current)))
-  ;;;           (setq initial (current-time) files nil)
-  ;;;         (setq initial current))
-  ;;;       (setq files (cdr files))))
-  ;;;   (format-time-string "%Y%m%d%H%M.%S" initial)))
-  (format-time-string "%Y%m%d%H%M.%S" (current-time)))
+;;; Change file attributes
 
 (defun dired-do-chxxx (attribute-name program op-symbol arg)
-  ;; Change file attributes (mode, group, owner, timestamp) of marked files and
+  ;; Change file attributes (group, owner, timestamp) of marked files and
   ;; refresh their file lines.
   ;; ATTRIBUTE-NAME is a string describing the attribute to the user.
   ;; PROGRAM is the program used to change the attribute.
-  ;; OP-SYMBOL is the type of operation (for use in dired-mark-pop-up).
-  ;; ARG describes which files to use, as in dired-get-marked-files.
+  ;; OP-SYMBOL is the type of operation (for use in `dired-mark-pop-up').
+  ;; ARG describes which files to use, as in `dired-get-marked-files'.
   (let* ((files (dired-get-marked-files t arg))
+        (initial
+         (if (eq op-symbol 'touch)
+             (format-time-string "%Y%m%d%H%M.%S")))
+        (default
+          (if (eq op-symbol 'touch)
+              (and (stringp (car files))
+                   (format-time-string "%Y%m%d%H%M.%S"
+                                       (nth 5 (file-attributes (car files)))))))
         (new-attribute
          (dired-mark-read-string
           (concat "Change " attribute-name " of %s to: ")
-          (if (eq op-symbol 'touch) (dired-touch-initial files))
-          op-symbol arg files))
+          initial op-symbol arg files default))
         (operation (concat program " " new-attribute))
         failures)
     (setq failures
index 01d41bba27d513f1696227d19edf87e7f0938133..746c16ff148aab4858d431ef6abbcdfe22f06412 100644 (file)
@@ -350,7 +350,7 @@ Subexpression 2 must end right before the \\n or \\r.")
   "Face name used for marked files.")
 
 (defface dired-flagged
-  '((t (:inherit font-lock-warning-face)))
+  '((t (:inherit font-lock-variable-name-face)))
   "Face used for files flagged for deletion."
   :group 'dired-faces
   :version "22.1")
@@ -3663,7 +3663,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
 ;;;;;;  dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
 ;;;;;;  dired-clean-directory dired-do-print dired-do-touch dired-do-chown
 ;;;;;;  dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
-;;;;;;  dired-diff) "dired-aux" "dired-aux.el" "ab62f310329f404f96a29e4f0ab8df73")
+;;;;;;  dired-diff) "dired-aux" "dired-aux.el" "bbb53a5b6bf56c413fe0f898559bef8d")
 ;;; Generated autoloads from dired-aux.el
 
 (autoload 'dired-diff "dired-aux" "\
index d6b4643d6a4c4c13ebe96353b4d10e793420bc2e..6d242eda3abec818a71a8653a460186c263a656f 100644 (file)
@@ -1233,6 +1233,7 @@ Valid clauses are:
   "Loop over a list.
 Evaluate BODY with VAR bound to each `car' from LIST, in turn.
 Then evaluate RESULT to get return value, default nil.
+An implicit nil block is established around the loop.
 
 \(fn (VAR LIST [RESULT]) BODY...)"
   (let ((temp (make-symbol "--cl-dolist-temp--")))
index e42103a7a013891b38e41cb9fe7122ad040a8fb9..19e8375966b6448b7b5d3bcbf2d6b636b7812dab 100644 (file)
@@ -570,11 +570,11 @@ EXTRA-PROPERTIES is currently unused."
   file)
 
 (defun package-generate-autoloads (name pkg-dir)
+  (require 'autoload)         ;Load before we let-bind generated-autoload-file!
   (let* ((auto-name (concat name "-autoloads.el"))
         (ignore-name (concat name "-pkg.el"))
         (generated-autoload-file (expand-file-name auto-name pkg-dir))
         (version-control 'never))
-    (require 'autoload)
     (unless (fboundp 'autoload-ensure-default-file)
       (package-autoload-ensure-default-file generated-autoload-file))
     (update-directory-autoloads pkg-dir)))
index f90e180b128f7bae8c62022fc7e34b39f9097dd3..e88b5154c76d9e67a9929f1910ac73ffeb2d824a 100644 (file)
@@ -1,3 +1,50 @@
+2011-08-02  Andrew Cohen  <cohen@andy.bu.edu>
+
+       * nnir.el (nnir-search-thread): Position point on referring article
+       line.
+       (nnir-warp-to-article): Clean up summary buffers.
+
+       * nnimap.el (nnimap-request-thread): Whitespace fix.
+
+2011-08-02  Steve Purcell  <steve@sanityinc.com>  (tiny change)
+
+       * nnimap.el (nnimap-get-groups): Decode "&" correctly.
+
+2011-08-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * starttls.el (starttls-available-p): Renamed from
+       `starttls-any-program-available' and changed return convention.
+
+2011-07-31  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * nnmaildir.el (nnmaildir-request-accept-article): Don't call
+       `unix-sync' unless it's defined.
+
+2011-07-31  Marcus Harnisch  <marcus.harnisch@gmx.net>  (tiny change)
+
+       * gnus-art.el (gnus-article-stop-animations): Use `elt' instead of
+       `aref' for XEmacs compatibiltiy.
+
+2011-07-31  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * spam.el (spam-fetch-field-fast): Rewrite slightly for clarity.
+
+2011-07-31  Dave Abrahams  <dave@boostpro.com>  (tiny change)
+
+       * gnus-sum.el (gnus-summary-refer-thread): Since lambdas aren't
+       closures, quote the form properly (bug#9194).
+
+2011-07-31  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-sum.el (gnus-summary-insert-new-articles): Clean up slightly.
+       (gnus-summary-insert-new-articles): Protect against servers that are
+       down.
+
+2011-07-29  Daniel Dehennin  <daniel.dehennin@baby-gnu.org>
+
+       * mm-decode.el (mm-dissect-buffer): Add a default content-disposition
+       in mm handle if none is specified.
+
 2011-07-24  Andrew Cohen  <cohen@andy.bu.edu>
 
        * nnimap.el (nnimap-make-thread-query): Quote message-ids for gmail.
index c29000f4691e5d584af3f48a75dfa4f7f6e1fdea..28c6aca367c41afe9eebfeaa76699b1a4194ebbf 100644 (file)
@@ -4541,7 +4541,7 @@ commands:
 (defun gnus-article-stop-animations ()
   (dolist (timer (and (boundp 'timer-list)
                      timer-list))
-    (when (eq (aref timer 5) 'image-animate-timeout)
+    (when (eq (elt timer 5) 'image-animate-timeout)
       (cancel-timer timer))))
 
 ;; Set article window start at LINE, where LINE is the number of lines
index 5917c9d7cef88c712ec62f10b0de5b7c4f8d5402..a8cf5e7c4275d235456eb92c2bbc7a2e3de407f3 100644 (file)
@@ -9015,9 +9015,9 @@ non-numeric or nil fetch the number specified by the
                   (refs (split-string (or (mail-header-references header)
                                           "")))
                   (gnus-parse-headers-hook
-                   (lambda () (goto-char (point-min))
+                   `(lambda () (goto-char (point-min))
                      (keep-lines
-                      (regexp-opt (append refs (list id subject)))))))
+                      (regexp-opt ',(append refs (list id subject)))))))
              (gnus-fetch-headers (list last) (if (numberp limit)
                                                  (* 2 limit) limit) t)))))
     (when (listp new-headers)
@@ -12851,26 +12851,26 @@ If ALL is a number, fetch this number of articles."
 (defun gnus-summary-insert-new-articles ()
   "Insert all new articles in this group."
   (interactive)
-  (prog1
-      (let ((old (sort (mapcar 'car gnus-newsgroup-data) '<))
-           (old-high gnus-newsgroup-highest)
-           (nnmail-fetched-sources (list t))
-           i new)
-       (setq gnus-newsgroup-active
-             (gnus-copy-sequence
-              (gnus-activate-group gnus-newsgroup-name 'scan)))
-       (setq i (cdr gnus-newsgroup-active)
-             gnus-newsgroup-highest i)
-       (while (> i old-high)
-         (push i new)
-         (decf i))
-       (if (not new)
-           (message "No gnus is bad news")
-         (gnus-summary-insert-articles new)
-         (setq gnus-newsgroup-unreads
-               (gnus-sorted-nunion gnus-newsgroup-unreads new))
-         (gnus-summary-limit (gnus-sorted-nunion old new))))
-    (gnus-summary-position-point)))
+  (let ((old (sort (mapcar 'car gnus-newsgroup-data) '<))
+       (old-high gnus-newsgroup-highest)
+       (nnmail-fetched-sources (list t))
+       (new-active (gnus-activate-group gnus-newsgroup-name 'scan))
+       i new)
+    (unless new-active
+      (error "Couldn't fetch new data"))
+    (setq gnus-newsgroup-active (gnus-copy-sequence new-active))
+    (setq i (cdr gnus-newsgroup-active)
+         gnus-newsgroup-highest i)
+    (while (> i old-high)
+      (push i new)
+      (decf i))
+    (if (not new)
+       (message "No gnus is bad news")
+      (gnus-summary-insert-articles new)
+      (setq gnus-newsgroup-unreads
+           (gnus-sorted-nunion gnus-newsgroup-unreads new))
+      (gnus-summary-limit (gnus-sorted-nunion old new))))
+  (gnus-summary-position-point))
 
 ;;; Bookmark support for Gnus.
 (declare-function bookmark-make-record-default
index a51c6630ac510cab732b8f22e2c9a83365ca64c1..692175d471fc4d11596f5ba52d0118bb782cc777 100644 (file)
@@ -564,7 +564,13 @@ Postpone undisplaying of viewers for types in
          (setq ct (mail-fetch-field "content-type")
                ctl (and ct (mail-header-parse-content-type ct))
                cte (mail-fetch-field "content-transfer-encoding")
-               cd (mail-fetch-field "content-disposition")
+                cd (or (mail-fetch-field "content-disposition")
+                       (when (and ctl
+                                  (eq 'mm-inline-text
+                                      (cadr (mm-assoc-string-match
+                                             mm-inline-media-tests
+                                             (car ctl)))))
+                         "inline"))
                ;; Newlines in description should be stripped so as
                ;; not to break the MIME tag into two or more lines.
                description (message-fetch-field "content-description")
index 52de48869d854e12f8b45fa3fe955adface6c010..f41f4af71b46d2a17993799d50b99cfe6196162d 100644 (file)
@@ -1107,9 +1107,9 @@ textual parts.")
            (separator (read (current-buffer)))
            (group (read (current-buffer))))
        (unless (member '%NoSelect flags)
-         (push (if (stringp group)
-                   group
-                 (format "%s" group))
+         (push (utf7-decode (if (stringp group)
+                                group
+                              (format "%s" group)) t)
                groups))))
     (nreverse groups)))
 
@@ -1168,7 +1168,7 @@ textual parts.")
                       (nnimap-get-groups)))
        (unless (assoc group nnimap-current-infos)
          ;; Insert dummy numbers here -- they don't matter.
-         (insert (format "%S 0 1 y\n" group))))
+         (insert (format "%S 0 1 y\n" (utf7-encode group)))))
       t)))
 
 (deffoo nnimap-retrieve-group-data-early (server infos)
@@ -1566,7 +1566,7 @@ textual parts.")
                  (articles &optional limit force-new dependencies))
 
 (deffoo nnimap-request-thread (header &optional group server)
-  (if gnus-refer-thread-use-nnir 
+  (if gnus-refer-thread-use-nnir
       (nnir-search-thread header)
     (when (nnimap-possibly-change-group group server)
       (let* ((cmd (nnimap-make-thread-query header))
index e6420a4d7bbb469481a7bb8c36cd1a079a96816c..d35e6560e714bbe03f4c5f969ab1031eb95483e9 100644 (file)
@@ -767,11 +767,18 @@ Add an entry here when adding a new search engine.")
 (deffoo nnir-warp-to-article ()
   (let* ((cur (if (> (gnus-summary-article-number) 0)
                  (gnus-summary-article-number)
-               (error "This is not a real article.")))
-        (gnus-newsgroup-name (nnir-article-group cur))
-         (backend-number (nnir-article-number cur)))
-    (gnus-summary-read-group-1 gnus-newsgroup-name t t gnus-summary-buffer
-                              nil (list backend-number))))
+               (error "This is not a real article")))
+        (backend-article-group (nnir-article-group cur))
+         (backend-article-number (nnir-article-number cur))
+        (quit-config (gnus-ephemeral-group-p gnus-newsgroup-name)))
+    ;; first exit from the nnir summary buffer.
+    (gnus-summary-exit)
+    ;; and if the nnir summary buffer in turn came from another
+    ;; summary buffer we have to clean that summary up too.
+    (when (eq (cdr quit-config) 'summary)
+      (gnus-summary-exit))
+    (gnus-summary-read-group-1 backend-article-group t t  nil
+                              nil (list backend-article-number))))
 
 (nnoo-define-skeleton nnir)
 
@@ -1659,7 +1666,8 @@ server is of form 'backend:name'."
               (cons 'server (gnus-method-to-server
                              (gnus-find-method-for-group
                               gnus-newsgroup-name))))))
-    (gnus-group-make-nnir-group nil parm)))
+    (gnus-group-make-nnir-group nil parm)
+    (gnus-summary-goto-subject (gnus-id-to-article (mail-header-id header)))))
 
 ;; unused?
 (defun nnir-artlist-groups (artlist)
index 8e2cd4bdde34138c5dee91d4f5b02473f238504d..bbace7c784a4366d20e079e53104939f8539182c 100644 (file)
@@ -1381,7 +1381,8 @@ by nnmaildir-request-article.")
        (error
         (gmm-write-region (point-min) (point-max) tmpfile nil 'no-message nil
                           'excl)
-        (unix-sync))) ;; no fsync :(
+        (when (fboundp 'unix-sync)
+          (unix-sync)))) ;; no fsync :(
       (nnheader-cancel-timer 24h)
       (condition-case err
          (add-name-to-file tmpfile curfile)
index 33dbaaa1f0ce14e951fc4119cf8f9cc2cc4da4ce..c7f993d72938a7f406564a01320689dced59ddfa 100644 (file)
@@ -1581,31 +1581,31 @@ to find it out)."
   (when (numberp article)
     (let* ((data-header (or prepared-data-header
                             (spam-fetch-article-header article))))
-      (if (arrayp data-header)
-        (cond
-         ((equal field 'number)
-          (mail-header-number data-header))
-         ((equal field 'from)
-          (mail-header-from data-header))
-         ((equal field 'message-id)
-          (mail-header-message-id data-header))
-         ((equal field 'subject)
-          (mail-header-subject data-header))
-         ((equal field 'references)
-          (mail-header-references data-header))
-         ((equal field 'date)
-          (mail-header-date data-header))
-         ((equal field 'xref)
-          (mail-header-xref data-header))
-         ((equal field 'extra)
-          (mail-header-extra data-header))
-         (t
-          (gnus-error
-           5
-           "spam-fetch-field-fast: unknown field %s requested"
-           field)
-          nil))
-        (gnus-message 6 "Article %d has a nil data header" article)))))
+      (cond
+       ((not (arrayp data-header))
+        (gnus-message 6 "Article %d has a nil data header" article))
+       ((equal field 'number)
+       (mail-header-number data-header))
+       ((equal field 'from)
+       (mail-header-from data-header))
+       ((equal field 'message-id)
+       (mail-header-message-id data-header))
+       ((equal field 'subject)
+       (mail-header-subject data-header))
+       ((equal field 'references)
+       (mail-header-references data-header))
+       ((equal field 'date)
+       (mail-header-date data-header))
+       ((equal field 'xref)
+       (mail-header-xref data-header))
+       ((equal field 'extra)
+       (mail-header-extra data-header))
+       (t
+       (gnus-error
+        5
+        "spam-fetch-field-fast: unknown field %s requested"
+        field)
+       nil)))))
 
 (defun spam-fetch-field-from-fast (article &optional prepared-data-header)
   (spam-fetch-field-fast article 'from prepared-data-header))
index 4b4839a4df2b0a84debef9aa96ad5d0e6a209e73..c1caca90cf0bafdaabe1c24b0561a9d89bcc9d3e 100644 (file)
@@ -295,18 +295,11 @@ GNUTLS requires a port number."
       (starttls-set-process-query-on-exit-flag process nil)
       process)))
 
-(defun starttls-any-program-available ()
-  (let ((program (if starttls-use-gnutls
-                    starttls-gnutls-program
-                  starttls-program)))
-    (condition-case ()
-       (progn
-         (call-process program)
-         program)
-      (error (progn
-              (message "No STARTTLS program was available (tried '%s')"
-                       program)
-              nil)))))
+(defun starttls-available-p ()
+  "Say whether the STARTTLS programs are available."
+  (executable-find (if starttls-use-gnutls
+                      starttls-gnutls-program
+                    starttls-program)))
 
 (provide 'starttls)
 
index b50ddcc1254f9cb993c00fefd3475325de0904ce..4086000e3e94aa4a5a5d3bfe1e24db9446dbe5f5 100644 (file)
@@ -1557,7 +1557,8 @@ This function also adds a hook to the minibuffer."
        (setq ido-minor-mode-map-entry (cons 'ido-mode map))
        (add-to-list 'minor-mode-map-alist ido-minor-mode-map-entry))))
 
-  (message "Ido mode %s" (if ido-mode "enabled" "disabled")))
+  (when (called-interactively-p 'any)
+    (message "Ido mode %s" (if ido-mode "enabled" "disabled"))))
 
 
 ;;; IDO KEYMAP
index a4826ee8c2c2e3895e0a3bdc6fabf853e2aae7e5..447c86b3e9ec1a40f360418f261cf9ae5d7c2bee 100644 (file)
@@ -2789,11 +2789,6 @@ N is the digit argument used to invoke this command."
               (goto-char (point-max)))))
        (t (error "No previous nodes"))))
 
-(defun Info-beginning-of-buffer ()
-  "Go to the beginnning of the buffer."
-  (interactive)
-  (goto-char (point-min)))
-
 (defun Info-scroll-up ()
   "Scroll one screenful forward in Info, considering all nodes as one sequence.
 Once you scroll far enough in a node that its menu appears on the screen
@@ -3655,7 +3650,7 @@ If FORK is non-nil, it is passed to `Info-goto-node'."
 (defvar Info-mode-map
   (let ((map (make-keymap)))
     (suppress-keymap map)
-    (define-key map "." 'Info-beginning-of-buffer)
+    (define-key map "." 'beginning-of-buffer)
     (define-key map " " 'Info-scroll-up)
     (define-key map "\C-m" 'Info-follow-nearest-node)
     (define-key map "\t" 'Info-next-reference)
@@ -3676,8 +3671,8 @@ If FORK is non-nil, it is passed to `Info-goto-node'."
     (define-key map "[" 'Info-backward-node)
     (define-key map "<" 'Info-top-node)
     (define-key map ">" 'Info-final-node)
-    (define-key map "b" 'Info-beginning-of-buffer)
-    (put 'Info-beginning-of-buffer :advertised-binding "b")
+    (define-key map "b" 'beginning-of-buffer)
+    (put 'beginning-of-buffer :advertised-binding "b")
     (define-key map "d" 'Info-directory)
     (define-key map "e" 'Info-edit)
     (define-key map "f" 'Info-follow-reference)
@@ -3731,7 +3726,7 @@ If FORK is non-nil, it is passed to `Info-goto-node'."
     :help "Go backward one node, considering all as a sequence"]
    ["Forward" Info-forward-node
     :help "Go forward one node, considering all as a sequence"]
-   ["Beginning" Info-beginning-of-buffer
+   ["Beginning" beginning-of-buffer
     :help "Go to beginning of this node"]
    ["Top" Info-top-node
     :help "Go to top node of file"]
@@ -3937,7 +3932,7 @@ Moving within a node:
 \\[Info-scroll-down]   Normally, scroll backward.  If the beginning of the buffer is
          already visible, try to go to the previous menu entry, or up
          if there is none.
-\\[Info-beginning-of-buffer]   Go to beginning of node.
+\\[beginning-of-buffer]        Go to beginning of node.
 
 Advanced commands:
 \\[Info-search]        Search through this Info file for specified regexp,
index 75de9a9f9b247272a67b9d85043d9aba37672a49..bf3d2ddb15427859fb38bff21e6ec7a76d8539c7 100644 (file)
@@ -489,7 +489,7 @@ A replacement function for `newline-and-indent', aligning as it goes.
 \f
 ;;;### (autoloads (outlineify-sticky allout-mode allout-mode-p allout-auto-activation
 ;;;;;;  allout-setup allout-auto-activation-helper) "allout" "allout.el"
-;;;;;;  (19981 40664))
+;;;;;;  (19988 13913))
 ;;; Generated autoloads from allout.el
 
 (autoload 'allout-auto-activation-helper "allout" "\
@@ -749,6 +749,7 @@ without changes to the allout core.  Here are key ones:
 `allout-structure-deleted-hook'
 `allout-structure-shifted-hook'
 `allout-after-copy-or-kill-hook'
+`allout-post-undo-hook'
 
                             Terminology
 
@@ -847,7 +848,7 @@ for details on preparing emacs for automatic allout activation.
 \f
 ;;;### (autoloads (allout-widgets-mode allout-widgets-auto-activation
 ;;;;;;  allout-widgets-setup allout-widgets) "allout-widgets" "allout-widgets.el"
-;;;;;;  (19981 40664))
+;;;;;;  (19988 13913))
 ;;; Generated autoloads from allout-widgets.el
 
 (let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads))))
@@ -928,11 +929,11 @@ directory, so that Emacs will know its current contents.
 ;;;***
 \f
 ;;;### (autoloads (animate-birthday-present animate-sequence animate-string)
-;;;;;;  "animate" "play/animate.el" (19845 45374))
+;;;;;;  "animate" "play/animate.el" (19986 58615))
 ;;; Generated autoloads from play/animate.el
 
 (autoload 'animate-string "animate" "\
-Display STRING starting at position VPOS, HPOS, using animation.
+Display STRING animations starting at position VPOS, HPOS.
 The characters start at randomly chosen places,
 and all slide in parallel to their final positions,
 passing through `animate-n-steps' positions before the final ones.
@@ -942,14 +943,19 @@ in the current window.
 \(fn STRING VPOS &optional HPOS)" nil nil)
 
 (autoload 'animate-sequence "animate" "\
-Display strings from LIST-OF-STRING with animation in a new buffer.
+Display animation strings from LIST-OF-STRING with buffer *Animation*.
 Strings will be separated from each other by SPACE lines.
+ When the variable `animation-buffer-name' is non-nil display
+animation in the buffer named by variable's value, creating the
+buffer if one does not exist.
 
 \(fn LIST-OF-STRINGS SPACE)" nil nil)
 
 (autoload 'animate-birthday-present "animate" "\
-Display one's birthday present in a new buffer.
-You can specify the one's name by NAME; the default value is \"Sarah\".
+Return a birthday present in the buffer *Birthday-Present*.
+When optional arg NAME is non-nil or called-interactively, prompt for
+NAME of birthday present receiver and return a birthday present in
+the buffer *Birthday-Present-for-Name*.
 
 \(fn &optional NAME)" t nil)
 
@@ -1144,8 +1150,8 @@ Returns list of symbols and documentation found.
 
 ;;;***
 \f
-;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (19886
-;;;;;;  45771))
+;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (19990
+;;;;;;  55648))
 ;;; Generated autoloads from arc-mode.el
 
 (autoload 'archive-mode "arc-mode" "\
@@ -1472,7 +1478,7 @@ Special commands:
 ;;;***
 \f
 ;;;### (autoloads (auth-source-cache-expiry) "auth-source" "gnus/auth-source.el"
-;;;;;;  (19981 40664))
+;;;;;;  (19985 37722))
 ;;; Generated autoloads from gnus/auth-source.el
 
 (defvar auth-source-cache-expiry 7200 "\
@@ -1550,7 +1556,7 @@ Major mode for editing Autoconf configure.in files.
 ;;;***
 \f
 ;;;### (autoloads (auto-insert-mode define-auto-insert auto-insert)
-;;;;;;  "autoinsert" "autoinsert.el" (19845 45374))
+;;;;;;  "autoinsert" "autoinsert.el" (19988 13913))
 ;;; Generated autoloads from autoinsert.el
 
 (autoload 'auto-insert "autoinsert" "\
@@ -1827,7 +1833,7 @@ For non-interactive use see also `benchmark-run' and
 ;;;***
 \f
 ;;;### (autoloads (bibtex-search-entry bibtex-mode bibtex-initialize)
-;;;;;;  "bibtex" "textmodes/bibtex.el" (19971 4823))
+;;;;;;  "bibtex" "textmodes/bibtex.el" (19997 28887))
 ;;; Generated autoloads from textmodes/bibtex.el
 
 (autoload 'bibtex-initialize "bibtex" "\
@@ -2075,7 +2081,7 @@ a reflection.
 ;;;;;;  bookmark-save bookmark-write bookmark-delete bookmark-insert
 ;;;;;;  bookmark-rename bookmark-insert-location bookmark-relocate
 ;;;;;;  bookmark-jump-other-window bookmark-jump bookmark-set) "bookmark"
-;;;;;;  "bookmark.el" (19914 25180))
+;;;;;;  "bookmark.el" (19998 49767))
 ;;; Generated autoloads from bookmark.el
  (define-key ctl-x-r-map "b" 'bookmark-jump)
  (define-key ctl-x-r-map "m" 'bookmark-set)
@@ -2276,10 +2282,10 @@ Incremental search of bookmarks, hiding the non-matches as we go.
 ;;;;;;  browse-url-at-mouse browse-url-at-point browse-url browse-url-of-region
 ;;;;;;  browse-url-of-dired-file browse-url-of-buffer browse-url-of-file
 ;;;;;;  browse-url-browser-function) "browse-url" "net/browse-url.el"
-;;;;;;  (19973 46551))
+;;;;;;  (19997 54906))
 ;;; Generated autoloads from net/browse-url.el
 
-(defvar browse-url-browser-function (cond ((memq system-type '(windows-nt ms-dos cygwin)) 'browse-url-default-windows-browser) ((memq system-type '(darwin)) 'browse-url-default-macosx-browser) (t 'browse-url-default-browser)) "\
+(defvar browse-url-browser-function 'browse-url-default-browser "\
 Function to display the current buffer in a WWW browser.
 This is used by the `browse-url-at-point', `browse-url-at-mouse', and
 `browse-url-of-file' commands.
@@ -2598,7 +2604,7 @@ Return a vector containing the lines from `bruce-phrases-file'.
 ;;;***
 \f
 ;;;### (autoloads (bs-show bs-customize bs-cycle-previous bs-cycle-next)
-;;;;;;  "bs" "bs.el" (19976 22732))
+;;;;;;  "bs" "bs.el" (19998 49767))
 ;;; Generated autoloads from bs.el
 
 (autoload 'bs-cycle-next "bs" "\
@@ -2681,7 +2687,7 @@ Like `bug-reference-mode', but only buttonize in comments and strings.
 ;;;;;;  batch-byte-compile-if-not-done display-call-tree byte-compile
 ;;;;;;  compile-defun byte-compile-file byte-recompile-directory
 ;;;;;;  byte-force-recompile byte-compile-enable-warning byte-compile-disable-warning)
-;;;;;;  "bytecomp" "emacs-lisp/bytecomp.el" (19968 28627))
+;;;;;;  "bytecomp" "emacs-lisp/bytecomp.el" (19998 49767))
 ;;; Generated autoloads from emacs-lisp/bytecomp.el
 (put 'byte-compile-dynamic 'safe-local-variable 'booleanp)
 (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp)
@@ -3053,7 +3059,7 @@ Obsoletes `c-forward-into-nomenclature'.
 ;;;***
 \f
 ;;;### (autoloads (c-guess-basic-syntax) "cc-engine" "progmodes/cc-engine.el"
-;;;;;;  (19981 40664))
+;;;;;;  (20015 58840))
 ;;; Generated autoloads from progmodes/cc-engine.el
 
 (autoload 'c-guess-basic-syntax "cc-engine" "\
@@ -3165,7 +3171,7 @@ the absolute file name of the file if STYLE-NAME is nil.
 \f
 ;;;### (autoloads (awk-mode pike-mode idl-mode java-mode objc-mode
 ;;;;;;  c++-mode c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el"
-;;;;;;  (19981 40664))
+;;;;;;  (20010 40918))
 ;;; Generated autoloads from progmodes/cc-mode.el
 
 (autoload 'c-initialize-cc-mode "cc-mode" "\
@@ -3393,7 +3399,7 @@ and exists only for compatibility reasons.
 
 ;;;***
 \f
-;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (19845 45374))
+;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (19997 28887))
 ;;; Generated autoloads from progmodes/cc-vars.el
 (put 'c-basic-offset 'safe-local-variable 'integerp)
 (put 'c-backslash-column 'safe-local-variable 'integerp)
@@ -4291,8 +4297,8 @@ on third call it again advances points to the next difference and so on.
 ;;;;;;  compilation-shell-minor-mode compilation-mode compilation-start
 ;;;;;;  compile compilation-disable-input compile-command compilation-search-path
 ;;;;;;  compilation-ask-about-save compilation-window-height compilation-start-hook
-;;;;;;  compilation-mode-hook) "compile" "progmodes/compile.el" (19968
-;;;;;;  28627))
+;;;;;;  compilation-mode-hook) "compile" "progmodes/compile.el" (19997
+;;;;;;  28887))
 ;;; Generated autoloads from progmodes/compile.el
 
 (defvar compilation-mode-hook nil "\
@@ -4716,7 +4722,7 @@ If FIX is non-nil, run `copyright-fix-years' instead.
 ;;;***
 \f
 ;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode)
-;;;;;;  "cperl-mode" "progmodes/cperl-mode.el" (19975 1875))
+;;;;;;  "cperl-mode" "progmodes/cperl-mode.el" (19997 56302))
 ;;; Generated autoloads from progmodes/cperl-mode.el
 (put 'cperl-indent-level 'safe-local-variable 'integerp)
 (put 'cperl-brace-offset 'safe-local-variable 'integerp)
@@ -5064,7 +5070,7 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings.
 ;;;;;;  customize-mode customize customize-push-and-save customize-save-variable
 ;;;;;;  customize-set-variable customize-set-value custom-menu-sort-alphabetically
 ;;;;;;  custom-buffer-sort-alphabetically custom-browse-sort-alphabetically)
-;;;;;;  "cus-edit" "cus-edit.el" (19980 19797))
+;;;;;;  "cus-edit" "cus-edit.el" (19996 8027))
 ;;; Generated autoloads from cus-edit.el
 
 (defvar custom-browse-sort-alphabetically nil "\
@@ -5498,7 +5504,7 @@ If the argument is nil, we return the display table to its standard state.
 ;;;***
 \f
 ;;;### (autoloads (dabbrev-expand dabbrev-completion) "dabbrev" "dabbrev.el"
-;;;;;;  (19886 45771))
+;;;;;;  (19989 34789))
 ;;; Generated autoloads from dabbrev.el
 (put 'dabbrev-case-fold-search 'risky-local-variable t)
 (put 'dabbrev-case-replace 'risky-local-variable t)
@@ -5697,13 +5703,13 @@ There is some minimal font-lock support (see vars
 ;;;***
 \f
 ;;;### (autoloads (cancel-debug-on-entry debug-on-entry debug) "debug"
-;;;;;;  "emacs-lisp/debug.el" (19961 55377))
+;;;;;;  "emacs-lisp/debug.el" (19999 41685))
 ;;; Generated autoloads from emacs-lisp/debug.el
 
 (setq debugger 'debug)
 
 (autoload 'debug "debug" "\
-Enter debugger.  To return, type \\<debugger-mode-map>`\\[debugger-continue]'.
+Enter debugger.  \\<debugger-mode-map>`\\[debugger-continue]' returns from the debugger.
 Arguments are mainly for use when this is called from the internals
 of the evaluator.
 
@@ -5877,7 +5883,7 @@ any selection.
 ;;;***
 \f
 ;;;### (autoloads (derived-mode-init-mode-variables define-derived-mode)
-;;;;;;  "derived" "emacs-lisp/derived.el" (19849 29307))
+;;;;;;  "derived" "emacs-lisp/derived.el" (19988 13913))
 ;;; Generated autoloads from emacs-lisp/derived.el
 
 (autoload 'define-derived-mode "derived" "\
@@ -6232,7 +6238,7 @@ Major mode for editing the diary file.
 ;;;***
 \f
 ;;;### (autoloads (diff-buffer-with-file diff-backup diff diff-command
-;;;;;;  diff-switches) "diff" "vc/diff.el" (19903 54862))
+;;;;;;  diff-switches) "diff" "vc/diff.el" (19999 41597))
 ;;; Generated autoloads from vc/diff.el
 
 (defvar diff-switches (purecopy "-c") "\
@@ -6247,10 +6253,10 @@ The command to use to run diff.")
 
 (autoload 'diff "diff" "\
 Find and display the differences between OLD and NEW files.
-When called interactively, read OLD and NEW using the minibuffer;
-the default for NEW is the current buffer's file name, and the
-default for OLD is a backup file for NEW, if one exists.
-If NO-ASYNC is non-nil, call diff synchronously.
+When called interactively, read NEW, then OLD, using the
+minibuffer.  The default for NEW is the current buffer's file
+name, and the default for OLD is a backup file for NEW, if one
+exists.  If NO-ASYNC is non-nil, call diff synchronously.
 
 When called interactively with a prefix argument, prompt
 interactively for diff switches.  Otherwise, the switches
@@ -6316,7 +6322,7 @@ Optional arguments are passed to `dig-invoke'.
 ;;;***
 \f
 ;;;### (autoloads (dired-mode dired-noselect dired-other-frame dired-other-window
-;;;;;;  dired dired-listing-switches) "dired" "dired.el" (19966 16984))
+;;;;;;  dired dired-listing-switches) "dired" "dired.el" (20019 55931))
 ;;; Generated autoloads from dired.el
 
 (defvar dired-listing-switches (purecopy "-al") "\
@@ -6345,8 +6351,7 @@ Dired displays a list of files in DIRNAME (which may also have
 shell wildcards appended to select certain files).  If DIRNAME is a cons,
 its first element is taken as the directory name and the rest as an explicit
 list of files to make directory entries for.
-\\<dired-mode-map>You can move around in it with the usual commands.
-You can flag files for deletion with \\[dired-flag-file-deletion] and then
+\\<dired-mode-map>You can flag files for deletion with \\[dired-flag-file-deletion] and then
 delete them by typing \\[dired-do-flagged-delete].
 Type \\[describe-mode] after entering Dired for more info.
 
@@ -6382,8 +6387,8 @@ In Dired, you are \"editing\" a list of the files in a directory and
   files for later commands or \"flag\" them for deletion, either file
   by file or all files matching certain criteria.
 You can move using the usual cursor motion commands.\\<dired-mode-map>
-Letters no longer insert themselves.  Digits are prefix arguments.
-Instead, type \\[dired-flag-file-deletion] to flag a file for Deletion.
+The buffer is read-only.  Digits are prefix arguments.
+Type \\[dired-flag-file-deletion] to flag a file `D' for deletion.
 Type \\[dired-mark] to Mark a file or subdirectory for later commands.
   Most commands operate on the marked files and use the current file
   if no files are marked.  Use a numeric prefix argument to operate on
@@ -6391,9 +6396,9 @@ Type \\[dired-mark] to Mark a file or subdirectory for later commands.
   to operate on the current file only.  Prefix arguments override marks.
   Mark-using commands display a list of failures afterwards.  Type \\[dired-summary]
   to see why something went wrong.
-Type \\[dired-unmark] to Unmark a file or all files of a subdirectory.
-Type \\[dired-unmark-backward] to back up one line and unflag.
-Type \\[dired-do-flagged-delete] to eXecute the deletions requested.
+Type \\[dired-unmark] to Unmark a file or all files of an inserted subdirectory.
+Type \\[dired-unmark-backward] to back up one line and unmark or unflag.
+Type \\[dired-do-flagged-delete] to delete (eXecute) the files flagged `D'.
 Type \\[dired-find-file] to Find the current line's file
   (or dired it in another buffer, if it is a directory).
 Type \\[dired-find-file-other-window] to find file or dired directory in Other window.
@@ -6403,10 +6408,10 @@ Type \\[dired-do-copy] to Copy files.
 Type \\[dired-sort-toggle-or-edit] to toggle Sorting by name/date or change the `ls' switches.
 Type \\[revert-buffer] to read all currently expanded directories aGain.
   This retains all marks and hides subdirs again that were hidden before.
-SPC and DEL can be used to move down and up by lines.
+Use `SPC' and `DEL' to move down and up by lines.
 
 If Dired ever gets confused, you can either type \\[revert-buffer] to read the
-directories again, type \\[dired-do-redisplay] to relist a single or the marked files or a
+directories again, type \\[dired-do-redisplay] to relist the file at point or the marked files or a
 subdirectory, or type \\[dired-build-subdir-alist] to parse the buffer
 again for the directory tree.
 
@@ -6485,7 +6490,7 @@ redefine OBJECT if it is a symbol.
 ;;;;;;  standard-display-g1 standard-display-ascii standard-display-default
 ;;;;;;  standard-display-8bit describe-current-display-table describe-display-table
 ;;;;;;  set-display-table-slot display-table-slot make-display-table)
-;;;;;;  "disp-table" "disp-table.el" (19845 45374))
+;;;;;;  "disp-table" "disp-table.el" (19984 16846))
 ;;; Generated autoloads from disp-table.el
 
 (autoload 'make-display-table "disp-table" "\
@@ -6668,8 +6673,8 @@ Locate SOA record and increment the serial field.
 ;;;***
 \f
 ;;;### (autoloads (doc-view-bookmark-jump doc-view-minor-mode doc-view-mode-maybe
-;;;;;;  doc-view-mode doc-view-mode-p) "doc-view" "doc-view.el" (19953
-;;;;;;  8437))
+;;;;;;  doc-view-mode doc-view-mode-p) "doc-view" "doc-view.el" (20002
+;;;;;;  46800))
 ;;; Generated autoloads from doc-view.el
 
 (autoload 'doc-view-mode-p "doc-view" "\
@@ -7584,7 +7589,7 @@ Toggle edebugging of all forms.
 ;;;;;;  ediff-merge-directories-with-ancestor ediff-merge-directories
 ;;;;;;  ediff-directories3 ediff-directory-revisions ediff-directories
 ;;;;;;  ediff-buffers3 ediff-buffers ediff-backup ediff-current-file
-;;;;;;  ediff-files3 ediff-files) "ediff" "vc/ediff.el" (19845 45374))
+;;;;;;  ediff-files3 ediff-files) "ediff" "vc/ediff.el" (19996 8027))
 ;;; Generated autoloads from vc/ediff.el
 
 (autoload 'ediff-files "ediff" "\
@@ -7768,7 +7773,7 @@ buffer.
 \(fn &optional FILE STARTUP-HOOKS MERGE-BUFFER-FILE)" t nil)
 
 (autoload 'ediff-patch-file "ediff" "\
-Run Ediff by patching SOURCE-FILENAME.
+Query for a file name, and then run Ediff by patching that file.
 If optional PATCH-BUF is given, use the patch in that buffer
 and don't ask the user.
 If prefix argument, then: if even argument, assume that the patch is in a
@@ -8147,6 +8152,32 @@ displayed.
 
 \(fn)" t nil)
 
+;;;***
+\f
+;;;### (autoloads (emacs-lock-mode) "emacs-lock" "emacs-lock.el"
+;;;;;;  (19988 13913))
+;;; Generated autoloads from emacs-lock.el
+
+(autoload 'emacs-lock-mode "emacs-lock" "\
+Toggle Emacs Lock mode in the current buffer.
+
+With \\[universal-argument], ask for the locking mode to be used.
+With other prefix ARG, turn mode on if ARG is positive, off otherwise.
+
+Initially, if the user does not pass an explicit locking mode, it defaults
+to `emacs-lock-default-locking-mode' (which see); afterwards, the locking
+mode most recently set on the buffer is used instead.
+
+When called from Elisp code, ARG can be any locking mode:
+
+ exit   -- Emacs cannot exit while the buffer is locked
+ kill   -- the buffer cannot be killed, but Emacs can exit as usual
+ all    -- the buffer is locked against both actions
+
+Other values are interpreted as usual.
+
+\(fn &optional ARG)" t nil)
+
 ;;;***
 \f
 ;;;### (autoloads (report-emacs-bug) "emacsbug" "mail/emacsbug.el"
@@ -8579,7 +8610,7 @@ Look at CONFIG and try to expand GROUP.
 ;;;***
 \f
 ;;;### (autoloads (erc-handle-irc-url erc erc-select-read-args) "erc"
-;;;;;;  "erc/erc.el" (19981 40664))
+;;;;;;  "erc/erc.el" (19986 58615))
 ;;; Generated autoloads from erc/erc.el
 
 (autoload 'erc-select-read-args "erc" "\
@@ -9202,7 +9233,7 @@ corresponding to a successful execution.
 ;;;;;;  visit-tags-table tags-table-mode find-tag-default-function
 ;;;;;;  find-tag-hook tags-add-tables tags-compression-info-list
 ;;;;;;  tags-table-list tags-case-fold-search) "etags" "progmodes/etags.el"
-;;;;;;  (19936 52203))
+;;;;;;  (20007 64734))
 ;;; Generated autoloads from progmodes/etags.el
 
 (defvar tags-file-name nil "\
@@ -9459,7 +9490,11 @@ Search through all files listed in tags table for match for REGEXP.
 Stops when a match is found.
 To continue searching for next match, use command \\[tags-loop-continue].
 
-See documentation of variable `tags-file-name'.
+If FILE-LIST-FORM is non-nil, it should be a form that, when
+evaluated, will return a list of file names.  The search will be
+restricted to these files.
+
+Aleso see the documentation of the `tags-file-name' variable.
 
 \(fn REGEXP &optional FILE-LIST-FORM)" t nil)
 
@@ -10138,7 +10173,7 @@ Besides the choice of face, it is the same as `buffer-face-mode'.
 \f
 ;;;### (autoloads (feedmail-queue-reminder feedmail-run-the-queue
 ;;;;;;  feedmail-run-the-queue-global-prompt feedmail-run-the-queue-no-prompts
-;;;;;;  feedmail-send-it) "feedmail" "mail/feedmail.el" (19931 11784))
+;;;;;;  feedmail-send-it) "feedmail" "mail/feedmail.el" (19986 58615))
 ;;; Generated autoloads from mail/feedmail.el
 
 (autoload 'feedmail-send-it "feedmail" "\
@@ -10782,8 +10817,8 @@ to get the effect of a C-q.
 
 ;;;***
 \f
-;;;### (autoloads (flymake-mode-off flymake-mode-on flymake-mode)
-;;;;;;  "flymake" "progmodes/flymake.el" (19976 22732))
+;;;### (autoloads (flymake-find-file-hook flymake-mode-off flymake-mode-on
+;;;;;;  flymake-mode) "flymake" "progmodes/flymake.el" (19984 16846))
 ;;; Generated autoloads from progmodes/flymake.el
 
 (autoload 'flymake-mode "flymake" "\
@@ -10801,13 +10836,18 @@ Turn flymake mode on.
 (autoload 'flymake-mode-off "flymake" "\
 Turn flymake mode off.
 
+\(fn)" nil nil)
+
+(autoload 'flymake-find-file-hook "flymake" "\
+
+
 \(fn)" nil nil)
 
 ;;;***
 \f
 ;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off
 ;;;;;;  turn-off-flyspell turn-on-flyspell flyspell-mode flyspell-prog-mode)
-;;;;;;  "flyspell" "textmodes/flyspell.el" (19981 40664))
+;;;;;;  "flyspell" "textmodes/flyspell.el" (19982 3545))
 ;;; Generated autoloads from textmodes/flyspell.el
 
 (autoload 'flyspell-prog-mode "flyspell" "\
@@ -10877,7 +10917,7 @@ Flyspell whole buffer.
 \f
 ;;;### (autoloads (follow-delete-other-windows-and-split follow-mode
 ;;;;;;  turn-off-follow-mode turn-on-follow-mode) "follow" "follow.el"
-;;;;;;  (19886 45771))
+;;;;;;  (19998 49767))
 ;;; Generated autoloads from follow.el
 
 (autoload 'turn-on-follow-mode "follow" "\
@@ -11129,7 +11169,7 @@ and choose the directory as the fortune-file.
 ;;;***
 \f
 ;;;### (autoloads (gdb gdb-enable-debug) "gdb-mi" "progmodes/gdb-mi.el"
-;;;;;;  (19931 11784))
+;;;;;;  (19988 13913))
 ;;; Generated autoloads from progmodes/gdb-mi.el
 
 (defvar gdb-enable-debug nil "\
@@ -11337,7 +11377,7 @@ DEFAULT-MAP specifies the default key map for ICON-LIST.
 ;;;***
 \f
 ;;;### (autoloads (gnus gnus-other-frame gnus-slave gnus-no-server
-;;;;;;  gnus-slave-no-server) "gnus" "gnus/gnus.el" (19978 37530))
+;;;;;;  gnus-slave-no-server) "gnus" "gnus/gnus.el" (20006 43871))
 ;;; Generated autoloads from gnus/gnus.el
 (when (fboundp 'custom-autoload)
  (custom-autoload 'gnus-select-method "gnus"))
@@ -11481,7 +11521,7 @@ If CLEAN, obsolete (ignore).
 ;;;***
 \f
 ;;;### (autoloads (gnus-article-prepare-display) "gnus-art" "gnus/gnus-art.el"
-;;;;;;  (19981 40664))
+;;;;;;  (20022 32083))
 ;;; Generated autoloads from gnus/gnus-art.el
 
 (autoload 'gnus-article-prepare-display "gnus-art" "\
@@ -11699,7 +11739,7 @@ If gravatars are already displayed, remove them.
 ;;;***
 \f
 ;;;### (autoloads (gnus-fetch-group-other-frame gnus-fetch-group)
-;;;;;;  "gnus-group" "gnus/gnus-group.el" (19981 40664))
+;;;;;;  "gnus-group" "gnus/gnus-group.el" (20006 43871))
 ;;; Generated autoloads from gnus/gnus-group.el
 
 (autoload 'gnus-fetch-group "gnus-group" "\
@@ -11717,7 +11757,7 @@ Pop up a frame and enter GROUP.
 ;;;***
 \f
 ;;;### (autoloads (gnus-html-prefetch-images gnus-article-html) "gnus-html"
-;;;;;;  "gnus/gnus-html.el" (19917 1372))
+;;;;;;  "gnus/gnus-html.el" (20006 43871))
 ;;; Generated autoloads from gnus/gnus-html.el
 
 (autoload 'gnus-article-html "gnus-html" "\
@@ -11874,7 +11914,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns:
 ;;;***
 \f
 ;;;### (autoloads (gnus-button-reply gnus-button-mailto gnus-msg-mail)
-;;;;;;  "gnus-msg" "gnus/gnus-msg.el" (19978 37530))
+;;;;;;  "gnus-msg" "gnus/gnus-msg.el" (19990 55648))
 ;;; Generated autoloads from gnus/gnus-msg.el
 
 (autoload 'gnus-msg-mail "gnus-msg" "\
@@ -12051,7 +12091,7 @@ Update the format specification near point.
 ;;;***
 \f
 ;;;### (autoloads (gnus-declare-backend) "gnus-start" "gnus/gnus-start.el"
-;;;;;;  (19953 61266))
+;;;;;;  (19988 13913))
 ;;; Generated autoloads from gnus/gnus-start.el
 
 (autoload 'gnus-declare-backend "gnus-start" "\
@@ -12062,7 +12102,7 @@ Declare back end NAME with ABILITIES as a Gnus back end.
 ;;;***
 \f
 ;;;### (autoloads (gnus-summary-bookmark-jump) "gnus-sum" "gnus/gnus-sum.el"
-;;;;;;  (19981 40664))
+;;;;;;  (20022 32083))
 ;;; Generated autoloads from gnus/gnus-sum.el
 
 (autoload 'gnus-summary-bookmark-jump "gnus-sum" "\
@@ -12098,6 +12138,23 @@ Add the window configuration CONF to `gnus-buffer-configuration'.
 
 \(fn CONF)" nil nil)
 
+;;;***
+\f
+;;;### (autoloads (gnutls-min-prime-bits) "gnutls" "net/gnutls.el"
+;;;;;;  (20002 46800))
+;;; Generated autoloads from net/gnutls.el
+
+(defvar gnutls-min-prime-bits nil "\
+The minimum number of bits to be used in Diffie-Hellman key exchange.
+
+This sets the minimum accepted size of the key to be used in a
+client-server handshake.  If the server sends a prime with fewer than
+the specified number of bits the handshake will fail.
+
+A value of nil says to use the default gnutls value.")
+
+(custom-autoload 'gnutls-min-prime-bits "gnutls" t)
+
 ;;;***
 \f
 ;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (19889 21967))
@@ -12185,7 +12242,7 @@ Retrieve MAIL-ADDRESS gravatar and returns it.
 \f
 ;;;### (autoloads (zrgrep rgrep lgrep grep-find grep grep-mode grep-compute-defaults
 ;;;;;;  grep-process-setup grep-setup-hook grep-find-command grep-command
-;;;;;;  grep-window-height) "grep" "progmodes/grep.el" (19980 19797))
+;;;;;;  grep-window-height) "grep" "progmodes/grep.el" (19989 34789))
 ;;; Generated autoloads from progmodes/grep.el
 
 (defvar grep-window-height nil "\
@@ -12356,7 +12413,7 @@ the form \"WINDOW-ID PIXMAP-ID\".  Value is non-nil if successful.
 ;;;***
 \f
 ;;;### (autoloads (gud-tooltip-mode gdb-script-mode jdb pdb perldb
-;;;;;;  xdb dbx sdb gud-gdb) "gud" "progmodes/gud.el" (19931 11784))
+;;;;;;  xdb dbx sdb gud-gdb) "gud" "progmodes/gud.el" (19988 13913))
 ;;; Generated autoloads from progmodes/gud.el
 
 (autoload 'gud-gdb "gud" "\
@@ -13787,7 +13844,7 @@ FORMATS is the value to use for `ibuffer-formats'.
 \f
 ;;;### (autoloads (icalendar-import-buffer icalendar-import-file
 ;;;;;;  icalendar-export-region icalendar-export-file) "icalendar"
-;;;;;;  "calendar/icalendar.el" (19897 16090))
+;;;;;;  "calendar/icalendar.el" (20015 58840))
 ;;; Generated autoloads from calendar/icalendar.el
 
 (autoload 'icalendar-export-file "icalendar" "\
@@ -14353,7 +14410,7 @@ Toggle inline image minor mode.
 ;;;;;;  create-image image-type-auto-detected-p image-type-available-p
 ;;;;;;  image-type image-type-from-file-name image-type-from-file-header
 ;;;;;;  image-type-from-buffer image-type-from-data) "image" "image.el"
-;;;;;;  (19956 37456))
+;;;;;;  (20013 17118))
 ;;; Generated autoloads from image.el
 
 (autoload 'image-type-from-data "image" "\
@@ -14439,6 +14496,7 @@ IMAGE must be an image created with `create-image' or `defimage'.
 IMAGE is displayed by putting an overlay into the current buffer with a
 `before-string' STRING that has a `display' property whose value is the
 image.  STRING is defaulted if you omit it.
+The overlay created will have the `put-image' property set to t.
 POS may be an integer or marker.
 AREA is where to display the image.  AREA nil or omitted means
 display it in the text area, a value of `left-margin' means
@@ -14450,8 +14508,8 @@ means display it in the right marginal area.
 (autoload 'insert-image "image" "\
 Insert IMAGE into current buffer at point.
 IMAGE is displayed by inserting STRING into the current buffer
-with a `display' property whose value is the image.  STRING is
-defaulted if you omit it.
+with a `display' property whose value is the image.  STRING
+defaults to the empty string if you omit it.
 AREA is where to display the image.  AREA nil or omitted means
 display it in the text area, a value of `left-margin' means
 display it in the left marginal area, a value of `right-margin'
@@ -14749,7 +14807,7 @@ Image files are those whose name has an extension in
 ;;;***
 \f
 ;;;### (autoloads (image-bookmark-jump image-mode-as-text image-minor-mode
-;;;;;;  image-mode) "image-mode" "image-mode.el" (19951 19539))
+;;;;;;  image-mode) "image-mode" "image-mode.el" (19999 41597))
 ;;; Generated autoloads from image-mode.el
 
 (autoload 'image-mode "image-mode" "\
@@ -15007,7 +15065,7 @@ of `inferior-lisp-program').  Runs the hooks from
 ;;;;;;  Info-goto-emacs-key-command-node Info-goto-emacs-command-node
 ;;;;;;  Info-mode info-finder info-apropos Info-index Info-directory
 ;;;;;;  Info-on-current-buffer info-standalone info-emacs-manual
-;;;;;;  info info-other-window) "info" "info.el" (19967 7755))
+;;;;;;  info info-other-window) "info" "info.el" (20000 30124))
 ;;; Generated autoloads from info.el
 
 (autoload 'info-other-window "info" "\
@@ -15022,7 +15080,7 @@ Enter Info, the documentation browser.
 Optional argument FILE-OR-NODE specifies the file to examine;
 the default is the top-level directory of Info.
 Called from a program, FILE-OR-NODE may specify an Info node of the form
-`(FILENAME)NODENAME'.
+\"(FILENAME)NODENAME\".
 Optional argument BUFFER specifies the Info buffer name;
 the default buffer name is *info*.  If BUFFER exists,
 just switch to BUFFER.  Otherwise, create a new buffer
@@ -15130,7 +15188,7 @@ Moving within a node:
 \\[Info-scroll-down]   Normally, scroll backward.  If the beginning of the buffer is
          already visible, try to go to the previous menu entry, or up
          if there is none.
-\\[beginning-of-buffer]        Go to beginning of node.
+\\[Info-beginning-of-buffer]   Go to beginning of node.
 
 Advanced commands:
 \\[Info-search]        Search through this Info file for specified regexp,
@@ -15194,7 +15252,7 @@ Go to Info buffer that displays MANUAL, creating it if none already exists.
 \f
 ;;;### (autoloads (info-complete-file info-complete-symbol info-lookup-file
 ;;;;;;  info-lookup-symbol info-lookup-reset) "info-look" "info-look.el"
-;;;;;;  (19936 52203))
+;;;;;;  (19984 16846))
 ;;; Generated autoloads from info-look.el
 
 (autoload 'info-lookup-reset "info-look" "\
@@ -15837,7 +15895,7 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading.
 ;;;***
 \f
 ;;;### (autoloads (jka-compr-uninstall jka-compr-handler) "jka-compr"
-;;;;;;  "jka-compr.el" (19886 45771))
+;;;;;;  "jka-compr.el" (20000 30139))
 ;;; Generated autoloads from jka-compr.el
 
 (defvar jka-compr-inhibit nil "\
@@ -16346,8 +16404,8 @@ See `linum-mode' for more information on Linum mode.
 
 ;;;***
 \f
-;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (19975
-;;;;;;  1875))
+;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (19996
+;;;;;;  8027))
 ;;; Generated autoloads from loadhist.el
 
 (autoload 'unload-feature "loadhist" "\
@@ -16469,16 +16527,20 @@ Major mode for browsing CVS log output.
 
 ;;;***
 \f
-;;;### (autoloads (longlines-mode) "longlines" "longlines.el" (19886
-;;;;;;  45771))
+;;;### (autoloads (longlines-mode) "longlines" "longlines.el" (19984
+;;;;;;  16846))
 ;;; Generated autoloads from longlines.el
 
 (autoload 'longlines-mode "longlines" "\
-Toggle Long Lines mode.
+Minor mode to wrap long lines.
 In Long Lines mode, long lines are wrapped if they extend beyond
 `fill-column'.  The soft newlines used for line wrapping will not
 show up when the text is yanked or saved to disk.
 
+With no argument, this command toggles Flyspell mode.
+With a prefix argument ARG, turn Flyspell minor mode on if ARG is positive,
+otherwise turn it off.
+
 If the variable `longlines-auto-wrap' is non-nil, lines are automatically
 wrapped whenever the buffer is changed.  You can always call
 `fill-paragraph' to fill individual paragraphs.
@@ -17103,7 +17165,7 @@ Previous contents of that buffer are killed first.
 ;;;***
 \f
 ;;;### (autoloads (Man-bookmark-jump man-follow man) "man" "man.el"
-;;;;;;  (19870 57559))
+;;;;;;  (19999 41597))
 ;;; Generated autoloads from man.el
 
 (defalias 'manual-entry 'man)
@@ -17211,7 +17273,7 @@ Returns non-nil if the new state is enabled.
 ;;;;;;  message-forward-make-body message-forward message-recover
 ;;;;;;  message-supersede message-cancel-news message-followup message-wide-reply
 ;;;;;;  message-reply message-news message-mail message-mode) "message"
-;;;;;;  "gnus/message.el" (19980 19797))
+;;;;;;  "gnus/message.el" (20006 43871))
 ;;; Generated autoloads from gnus/message.el
 
 (define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook)
@@ -17439,7 +17501,7 @@ redisplayed as output is inserted.
 \f
 ;;;### (autoloads (mh-fully-kill-draft mh-send-letter mh-user-agent-compose
 ;;;;;;  mh-smail-batch mh-smail-other-window mh-smail) "mh-comp"
-;;;;;;  "mh-e/mh-comp.el" (19845 45374))
+;;;;;;  "mh-e/mh-comp.el" (19993 31832))
 ;;; Generated autoloads from mh-e/mh-comp.el
 
 (autoload 'mh-smail "mh-comp" "\
@@ -17486,7 +17548,7 @@ Elements look like (HEADER . VALUE) where both HEADER and VALUE
 are strings.
 
 CONTINUE, SWITCH-FUNCTION, YANK-ACTION, SEND-ACTIONS, and
-RETURN-ACTION are ignored.
+RETURN-ACTION and any additional arguments are IGNORED.
 
 \(fn &optional TO SUBJECT OTHER-HEADERS CONTINUE SWITCH-FUNCTION YANK-ACTION SEND-ACTIONS RETURN-ACTION &rest IGNORED)" nil nil)
 
@@ -17529,7 +17591,7 @@ delete the draft message.
 
 ;;;***
 \f
-;;;### (autoloads (mh-version) "mh-e" "mh-e/mh-e.el" (19931 11784))
+;;;### (autoloads (mh-version) "mh-e" "mh-e/mh-e.el" (20004 2139))
 ;;; Generated autoloads from mh-e/mh-e.el
 
 (put 'mh-progs 'risky-local-variable t)
@@ -17546,7 +17608,7 @@ Display version information about MH-E and the MH mail handling system.
 ;;;***
 \f
 ;;;### (autoloads (mh-folder-mode mh-nmail mh-rmail) "mh-folder"
-;;;;;;  "mh-e/mh-folder.el" (19845 45374))
+;;;;;;  "mh-e/mh-folder.el" (20004 2139))
 ;;; Generated autoloads from mh-e/mh-folder.el
 
 (autoload 'mh-rmail "mh-folder" "\
@@ -18041,8 +18103,8 @@ To test this function, evaluate:
 
 ;;;***
 \f
-;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (19886
-;;;;;;  45771))
+;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (19997
+;;;;;;  28887))
 ;;; Generated autoloads from mouse-sel.el
 
 (defvar mouse-sel-mode nil "\
@@ -18059,14 +18121,10 @@ Toggle Mouse Sel mode.
 With prefix ARG, turn Mouse Sel mode on if and only if ARG is positive.
 Returns the new status of Mouse Sel mode (non-nil means on).
 
-When Mouse Sel mode is enabled, mouse selection is enhanced in various ways:
-
-- Clicking mouse-1 starts (cancels) selection, dragging extends it.
-
-- Clicking or dragging mouse-3 extends the selection as well.
+When Mouse Sel mode is enabled, mouse selection is enhanced in
+various ways:
 
-- Double-clicking on word constituents selects words.
-Double-clicking on symbol constituents selects symbols.
+- Double-clicking on symbol constituents selects symbols.
 Double-clicking on quotes or parentheses selects sexps.
 Double-clicking on whitespace selects whitespace.
 Triple-clicking selects lines.
@@ -18081,14 +18139,8 @@ mouse-sel sets the variables `interprogram-cut-function' and
 - Clicking mouse-2 inserts the contents of the primary selection at
 the mouse position (or point, if `mouse-yank-at-point' is non-nil).
 
-- Pressing mouse-2 while selecting or extending copies selection
-to the kill ring.  Pressing mouse-1 or mouse-3 kills it.
-
-- Double-clicking mouse-3 also kills selection.
-
-- M-mouse-1, M-mouse-2 & M-mouse-3 work similarly to mouse-1, mouse-2
-& mouse-3, but operate on the X secondary selection rather than the
-primary selection and region.
+- mouse-2 while selecting or extending copies selection to the
+kill ring; mouse-1 or mouse-3 kills it.
 
 \(fn &optional ARG)" t nil)
 
@@ -18527,7 +18579,7 @@ listed in the PORTS list.
 ;;;***
 \f
 ;;;### (autoloads (open-network-stream) "network-stream" "net/network-stream.el"
-;;;;;;  (19976 22732))
+;;;;;;  (19990 55648))
 ;;; Generated autoloads from net/network-stream.el
 
 (autoload 'open-network-stream "network-stream" "\
@@ -18578,6 +18630,10 @@ values:
 
 :end-of-command specifies a regexp matching the end of a command.
 
+:end-of-capability specifies a regexp matching the end of the
+  response to the command specified for :capability-command.
+  It defaults to the regexp specified for :end-of-command.
+
 :success specifies a regexp matching a message indicating a
   successful STARTTLS negotiation.  For instance, the default
   should be \"^3\" for an NNTP connection.
@@ -19083,13 +19139,14 @@ the variable `nxml-enabled-unicode-blocks'.
 ;;;;;;  org-babel-next-src-block org-babel-goto-named-result org-babel-goto-named-src-block
 ;;;;;;  org-babel-goto-src-block-head org-babel-hide-result-toggle-maybe
 ;;;;;;  org-babel-sha1-hash org-babel-execute-subtree org-babel-execute-buffer
-;;;;;;  org-babel-map-src-blocks org-babel-open-src-block-result
-;;;;;;  org-babel-switch-to-session-with-code org-babel-switch-to-session
-;;;;;;  org-babel-initiate-session org-babel-load-in-session org-babel-expand-src-block
-;;;;;;  org-babel-execute-src-block org-babel-pop-to-session-maybe
-;;;;;;  org-babel-load-in-session-maybe org-babel-expand-src-block-maybe
+;;;;;;  org-babel-map-inline-src-blocks org-babel-map-src-blocks
+;;;;;;  org-babel-open-src-block-result org-babel-switch-to-session-with-code
+;;;;;;  org-babel-switch-to-session org-babel-initiate-session org-babel-load-in-session
+;;;;;;  org-babel-check-src-block org-babel-expand-src-block org-babel-execute-src-block
+;;;;;;  org-babel-pop-to-session-maybe org-babel-load-in-session-maybe
+;;;;;;  org-babel-expand-src-block-maybe org-babel-view-src-block-info
 ;;;;;;  org-babel-execute-maybe org-babel-execute-safely-maybe) "ob"
-;;;;;;  "org/ob.el" (19845 45374))
+;;;;;;  "org/ob.el" (20021 11227))
 ;;; Generated autoloads from org/ob.el
 
 (autoload 'org-babel-execute-safely-maybe "ob" "\
@@ -19100,6 +19157,13 @@ the variable `nxml-enabled-unicode-blocks'.
 (autoload 'org-babel-execute-maybe "ob" "\
 
 
+\(fn)" t nil)
+
+(autoload 'org-babel-view-src-block-info "ob" "\
+Display information on the current source block.
+This includes header arguments, language and name, and is largely
+a window into the `org-babel-get-src-block-info' function.
+
 \(fn)" t nil)
 
 (autoload 'org-babel-expand-src-block-maybe "ob" "\
@@ -19149,6 +19213,11 @@ arguments and pop open the results in a preview buffer.
 
 \(fn &optional ARG INFO PARAMS)" t nil)
 
+(autoload 'org-babel-check-src-block "ob" "\
+Check for misspelled header arguments in the current code block.
+
+\(fn)" t nil)
+
 (autoload 'org-babel-load-in-session "ob" "\
 Load the body of the current source-code block.
 Evaluate the header arguments for the source block before
@@ -19212,6 +19281,15 @@ end-body --------- point at the end of the body
 
 (put 'org-babel-map-src-blocks 'lisp-indent-function '1)
 
+(autoload 'org-babel-map-inline-src-blocks "ob" "\
+Evaluate BODY forms on each inline source-block in FILE.
+If FILE is nil evaluate BODY forms on source blocks in current
+buffer.
+
+\(fn FILE &rest BODY)" nil (quote macro))
+
+(put 'org-babel-map-inline-src-blocks 'lisp-indent-function '1)
+
 (autoload 'org-babel-execute-buffer "ob" "\
 Execute source code blocks in a buffer.
 Call `org-babel-execute-src-block' on every source block in
@@ -19271,7 +19349,7 @@ Mark current src block
 ;;;***
 \f
 ;;;### (autoloads (org-babel-describe-bindings) "ob-keys" "org/ob-keys.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/ob-keys.el
 
 (autoload 'org-babel-describe-bindings "ob-keys" "\
@@ -19282,7 +19360,7 @@ Describe all keybindings behind `org-babel-key-prefix'.
 ;;;***
 \f
 ;;;### (autoloads (org-babel-lob-get-info org-babel-lob-execute-maybe
-;;;;;;  org-babel-lob-ingest) "ob-lob" "org/ob-lob.el" (19845 45374))
+;;;;;;  org-babel-lob-ingest) "ob-lob" "org/ob-lob.el" (20018 35031))
 ;;; Generated autoloads from org/ob-lob.el
 
 (autoload 'org-babel-lob-ingest "ob-lob" "\
@@ -19307,7 +19385,7 @@ Return a Library of Babel function call as a string.
 \f
 ;;;### (autoloads (org-babel-tangle org-babel-tangle-file org-babel-load-file
 ;;;;;;  org-babel-tangle-lang-exts) "ob-tangle" "org/ob-tangle.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/ob-tangle.el
 
 (defvar org-babel-tangle-lang-exts '(("emacs-lisp" . "el")) "\
@@ -19344,7 +19422,7 @@ TARGET-FILE can be used to specify a default export file for all
 source blocks.  Optional argument LANG can be used to limit the
 exported source code blocks by language.
 
-\(fn &optional TARGET-FILE LANG)" t nil)
+\(fn &optional ONLY-THIS-BLOCK TARGET-FILE LANG)" t nil)
 
 ;;;***
 \f
@@ -19460,7 +19538,7 @@ including a reproducible test case and send the message.
 ;;;;;;  org-insert-link-global org-store-link org-run-like-in-org-mode
 ;;;;;;  turn-on-orgstruct++ turn-on-orgstruct orgstruct-mode org-global-cycle
 ;;;;;;  org-mode org-babel-do-load-languages) "org" "org/org.el"
-;;;;;;  (19931 11784))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org.el
 
 (autoload 'org-babel-do-load-languages "org" "\
@@ -19598,6 +19676,7 @@ SCOPE determines the scope of this command.  It can be any of:
 
 nil     The current buffer, respecting the restriction if any
 tree    The subtree started with the entry at point
+region  The entries within the active region, if any
 file    The current buffer, without restriction
 file-with-archives
         The current buffer, and any archives associated with it
@@ -19683,7 +19762,7 @@ Call the customize function with org as argument.
 ;;;;;;  org-diary org-agenda-list-stuck-projects org-tags-view org-todo-list
 ;;;;;;  org-search-view org-agenda-list org-batch-store-agenda-views
 ;;;;;;  org-store-agenda-views org-batch-agenda-csv org-batch-agenda
-;;;;;;  org-agenda) "org-agenda" "org/org-agenda.el" (19914 25180))
+;;;;;;  org-agenda) "org-agenda" "org/org-agenda.el" (20018 35031))
 ;;; Generated autoloads from org/org-agenda.el
 
 (autoload 'org-agenda "org-agenda" "\
@@ -19784,11 +19863,6 @@ Produce a daily/weekly view from all files in variable `org-agenda-files'.
 The view will be for the current day or week, but from the overview buffer
 you will be able to go to other days/weeks.
 
-With one \\[universal-argument] prefix argument INCLUDE-ALL,
-all unfinished TODO items will also be shown, before the agenda.
-This feature is considered obsolete, please use the TODO list or a block
-agenda instead.
-
 With a numeric prefix argument in an interactive call, the agenda will
 span INCLUDE-ALL days.  Lisp programs should instead specify SPAN to change
 the number of days.  SPAN defaults to `org-agenda-span'.
@@ -19933,7 +20007,7 @@ belonging to the \"Work\" category.
 \f
 ;;;### (autoloads (org-archive-subtree-default-with-confirmation
 ;;;;;;  org-archive-subtree-default) "org-archive" "org/org-archive.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org-archive.el
 
 (autoload 'org-archive-subtree-default "org-archive" "\
@@ -19953,8 +20027,8 @@ This command is set with the variable `org-archive-default-command'.
 ;;;### (autoloads (org-export-as-ascii org-export-region-as-ascii
 ;;;;;;  org-replace-region-by-ascii org-export-as-ascii-to-buffer
 ;;;;;;  org-export-as-utf8-to-buffer org-export-as-utf8 org-export-as-latin1-to-buffer
-;;;;;;  org-export-as-latin1) "org-ascii" "org/org-ascii.el" (19931
-;;;;;;  11784))
+;;;;;;  org-export-as-latin1) "org-ascii" "org/org-ascii.el" (20018
+;;;;;;  35031))
 ;;; Generated autoloads from org/org-ascii.el
 
 (autoload 'org-export-as-latin1 "org-ascii" "\
@@ -19968,7 +20042,7 @@ Like `org-export-as-ascii-to-buffer', use latin1 encoding for symbols.
 \(fn &rest ARGS)" t nil)
 
 (autoload 'org-export-as-utf8 "org-ascii" "\
-Like `org-export-as-ascii', use use encoding for special symbols.
+Like `org-export-as-ascii', use encoding for special symbols.
 
 \(fn &rest ARGS)" t nil)
 
@@ -20027,8 +20101,8 @@ publishing directory.
 
 ;;;***
 \f
-;;;### (autoloads (org-attach) "org-attach" "org/org-attach.el" (19931
-;;;;;;  11784))
+;;;### (autoloads (org-attach) "org-attach" "org/org-attach.el" (20018
+;;;;;;  35031))
 ;;; Generated autoloads from org/org-attach.el
 
 (autoload 'org-attach "org-attach" "\
@@ -20040,7 +20114,7 @@ Shows a list of commands and prompts for another key to execute a command.
 ;;;***
 \f
 ;;;### (autoloads (org-bbdb-anniversaries) "org-bbdb" "org/org-bbdb.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org-bbdb.el
 
 (autoload 'org-bbdb-anniversaries "org-bbdb" "\
@@ -20051,7 +20125,7 @@ Extract anniversaries from BBDB for display in the agenda.
 ;;;***
 \f
 ;;;### (autoloads (org-capture-import-remember-templates org-capture-insert-template-here
-;;;;;;  org-capture) "org-capture" "org/org-capture.el" (19845 45374))
+;;;;;;  org-capture) "org-capture" "org/org-capture.el" (20018 35031))
 ;;; Generated autoloads from org/org-capture.el
 
 (autoload 'org-capture "org-capture" "\
@@ -20089,7 +20163,7 @@ Set org-capture-templates to be similar to `org-remember-templates'.
 ;;;***
 \f
 ;;;### (autoloads (org-clock-persistence-insinuate org-get-clocktable)
-;;;;;;  "org-clock" "org/org-clock.el" (19845 45374))
+;;;;;;  "org-clock" "org/org-clock.el" (20018 35031))
 ;;; Generated autoloads from org/org-clock.el
 
 (autoload 'org-get-clocktable "org-clock" "\
@@ -20107,7 +20181,7 @@ Set up hooks for clock persistence.
 ;;;***
 \f
 ;;;### (autoloads (org-datetree-find-date-create) "org-datetree"
-;;;;;;  "org/org-datetree.el" (19845 45374))
+;;;;;;  "org/org-datetree.el" (20018 35031))
 ;;; Generated autoloads from org/org-datetree.el
 
 (autoload 'org-datetree-find-date-create "org-datetree" "\
@@ -20123,7 +20197,7 @@ tree can be found.
 ;;;### (autoloads (org-export-as-docbook org-export-as-docbook-pdf-and-open
 ;;;;;;  org-export-as-docbook-pdf org-export-region-as-docbook org-replace-region-by-docbook
 ;;;;;;  org-export-as-docbook-to-buffer org-export-as-docbook-batch)
-;;;;;;  "org-docbook" "org/org-docbook.el" (19845 45374))
+;;;;;;  "org-docbook" "org/org-docbook.el" (20018 35031))
 ;;; Generated autoloads from org/org-docbook.el
 
 (autoload 'org-export-as-docbook-batch "org-docbook" "\
@@ -20200,7 +20274,7 @@ publishing directory.
 \f
 ;;;### (autoloads (org-insert-export-options-template org-export-as-org
 ;;;;;;  org-export-visible org-export) "org-exp" "org/org-exp.el"
-;;;;;;  (19931 11784))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org-exp.el
 
 (autoload 'org-export "org-exp" "\
@@ -20213,6 +20287,10 @@ The prefix argument ARG will be passed to the exporter.  However, if
 ARG is a double universal prefix \\[universal-argument] \\[universal-argument], that means to inverse the
 value of `org-export-run-in-background'.
 
+If `org-export-initial-scope' is set to 'subtree, try to export
+the current subtree, otherwise try to export the whole buffer.
+Pressing `1' will switch between these two options.
+
 \(fn &optional ARG)" t nil)
 
 (autoload 'org-export-visible "org-exp" "\
@@ -20257,8 +20335,8 @@ Insert into the buffer a template with information for exporting.
 ;;;***
 \f
 ;;;### (autoloads (org-feed-show-raw-feed org-feed-goto-inbox org-feed-update
-;;;;;;  org-feed-update-all) "org-feed" "org/org-feed.el" (19845
-;;;;;;  45374))
+;;;;;;  org-feed-update-all) "org-feed" "org/org-feed.el" (20018
+;;;;;;  35031))
 ;;; Generated autoloads from org/org-feed.el
 
 (autoload 'org-feed-update-all "org-feed" "\
@@ -20286,34 +20364,58 @@ Show the raw feed buffer of a feed.
 ;;;***
 \f
 ;;;### (autoloads (org-footnote-normalize org-footnote-action) "org-footnote"
-;;;;;;  "org/org-footnote.el" (19845 45374))
+;;;;;;  "org/org-footnote.el" (20018 35031))
 ;;; Generated autoloads from org/org-footnote.el
 
 (autoload 'org-footnote-action "org-footnote" "\
 Do the right thing for footnotes.
-When at a footnote reference, jump to the definition.  When at a definition,
-jump to the references.  When neither at definition or reference,
-create a new footnote, interactively.
+
+When at a footnote reference, jump to the definition.
+
+When at a definition, jump to the references if they exist, offer
+to create them otherwise.
+
+When neither at definition or reference, create a new footnote,
+interactively.
+
 With prefix arg SPECIAL, offer additional commands in a menu.
 
 \(fn &optional SPECIAL)" t nil)
 
 (autoload 'org-footnote-normalize "org-footnote" "\
 Collect the footnotes in various formats and normalize them.
+
 This finds the different sorts of footnotes allowed in Org, and
 normalizes them to the usual [N] format that is understood by the
 Org-mode exporters.
+
 When SORT-ONLY is set, only sort the footnote definitions into the
 referenced sequence.
 
-\(fn &optional SORT-ONLY FOR-PREPROCESSOR)" nil nil)
+If Org is amidst an export process, EXPORT-PROPS will hold the
+export properties of the buffer.
+
+When EXPORT-PROPS is non-nil, the default action is to insert
+normalized footnotes towards the end of the pre-processing buffer.
+Some exporters like docbook, odt, etc. expect that footnote
+definitions be available before any references to them.  Such
+exporters can let bind `org-footnote-insert-pos-for-preprocessor' to
+symbol 'point-min to achieve the desired behaviour.
+
+Additional note on `org-footnote-insert-pos-for-preprocessor':
+1. This variable has not effect when FOR-PREPROCESSOR is nil.
+2. This variable (potentially) obviates the need for extra scan
+   of pre-processor buffer as witnessed in
+   `org-export-docbook-get-footnotes'.
+
+\(fn &optional SORT-ONLY EXPORT-PROPS)" nil nil)
 
 ;;;***
 \f
 ;;;### (autoloads (org-freemind-to-org-mode org-freemind-from-org-sparse-tree
 ;;;;;;  org-freemind-from-org-mode org-freemind-from-org-mode-node
 ;;;;;;  org-freemind-show org-export-as-freemind) "org-freemind"
-;;;;;;  "org/org-freemind.el" (19845 45374))
+;;;;;;  "org/org-freemind.el" (20018 35031))
 ;;; Generated autoloads from org/org-freemind.el
 
 (autoload 'org-export-as-freemind "org-freemind" "\
@@ -20374,7 +20476,7 @@ Convert FreeMind file MM-FILE to `org-mode' file ORG-FILE.
 ;;;### (autoloads (org-export-htmlize-generate-css org-export-as-html
 ;;;;;;  org-export-region-as-html org-replace-region-by-html org-export-as-html-to-buffer
 ;;;;;;  org-export-as-html-batch org-export-as-html-and-open) "org-html"
-;;;;;;  "org/org-html.el" (19931 11784))
+;;;;;;  "org/org-html.el" (20018 35031))
 ;;; Generated autoloads from org/org-html.el
 
 (put 'org-export-html-style-include-default 'safe-local-variable 'booleanp)
@@ -20468,7 +20570,7 @@ that uses these same face definitions.
 \f
 ;;;### (autoloads (org-export-icalendar-combine-agenda-files org-export-icalendar-all-agenda-files
 ;;;;;;  org-export-icalendar-this-file) "org-icalendar" "org/org-icalendar.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org-icalendar.el
 
 (autoload 'org-export-icalendar-this-file "org-icalendar" "\
@@ -20496,7 +20598,7 @@ The file is stored under the name `org-combined-agenda-icalendar-file'.
 ;;;### (autoloads (org-id-store-link org-id-find-id-file org-id-find
 ;;;;;;  org-id-goto org-id-get-with-outline-drilling org-id-get-with-outline-path-completion
 ;;;;;;  org-id-get org-id-copy org-id-get-create) "org-id" "org/org-id.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org-id.el
 
 (autoload 'org-id-get-create "org-id" "\
@@ -20565,7 +20667,7 @@ Store a link to the current entry, using its ID.
 ;;;***
 \f
 ;;;### (autoloads (org-indent-mode) "org-indent" "org/org-indent.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org-indent.el
 
 (autoload 'org-indent-mode "org-indent" "\
@@ -20580,7 +20682,7 @@ FIXME:  How to update when broken?
 ;;;***
 \f
 ;;;### (autoloads (org-irc-store-link) "org-irc" "org/org-irc.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org-irc.el
 
 (autoload 'org-irc-store-link "org-irc" "\
@@ -20593,7 +20695,7 @@ Dispatch to the appropriate function to store a link to an IRC session.
 ;;;### (autoloads (org-export-as-pdf-and-open org-export-as-pdf org-export-as-latex
 ;;;;;;  org-export-region-as-latex org-replace-region-by-latex org-export-as-latex-to-buffer
 ;;;;;;  org-export-as-latex-batch) "org-latex" "org/org-latex.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org-latex.el
 
 (autoload 'org-export-as-latex-batch "org-latex" "\
@@ -20673,8 +20775,8 @@ Export as LaTeX, then process through to PDF, and open.
 ;;;***
 \f
 ;;;### (autoloads (org-mobile-create-sumo-agenda org-mobile-pull
-;;;;;;  org-mobile-push) "org-mobile" "org/org-mobile.el" (19845
-;;;;;;  45374))
+;;;;;;  org-mobile-push) "org-mobile" "org/org-mobile.el" (20018
+;;;;;;  35031))
 ;;; Generated autoloads from org/org-mobile.el
 
 (autoload 'org-mobile-push "org-mobile" "\
@@ -20699,7 +20801,7 @@ Create a file that contains all custom agenda views.
 ;;;***
 \f
 ;;;### (autoloads (org-plot/gnuplot) "org-plot" "org/org-plot.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org-plot.el
 
 (autoload 'org-plot/gnuplot "org-plot" "\
@@ -20713,7 +20815,7 @@ line directly before or after the table.
 \f
 ;;;### (autoloads (org-publish-current-project org-publish-current-file
 ;;;;;;  org-publish-all org-publish) "org-publish" "org/org-publish.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org-publish.el
 
 (defalias 'org-publish-project 'org-publish)
@@ -20747,7 +20849,7 @@ the project.
 \f
 ;;;### (autoloads (org-remember-handler org-remember org-remember-apply-template
 ;;;;;;  org-remember-annotation org-remember-insinuate) "org-remember"
-;;;;;;  "org/org-remember.el" (19845 45374))
+;;;;;;  "org/org-remember.el" (20018 35031))
 ;;; Generated autoloads from org/org-remember.el
 
 (autoload 'org-remember-insinuate "org-remember" "\
@@ -20823,7 +20925,7 @@ See also the variable `org-reverse-note-order'.
 ;;;***
 \f
 ;;;### (autoloads (org-table-to-lisp orgtbl-mode turn-on-orgtbl)
-;;;;;;  "org-table" "org/org-table.el" (19914 25180))
+;;;;;;  "org-table" "org/org-table.el" (20018 35031))
 ;;; Generated autoloads from org/org-table.el
 
 (autoload 'turn-on-orgtbl "org-table" "\
@@ -20847,7 +20949,7 @@ The table is taken from the parameter TXT, or from the buffer at point.
 ;;;***
 \f
 ;;;### (autoloads (org-export-as-taskjuggler-and-open org-export-as-taskjuggler)
-;;;;;;  "org-taskjuggler" "org/org-taskjuggler.el" (19845 45374))
+;;;;;;  "org-taskjuggler" "org/org-taskjuggler.el" (20018 35031))
 ;;; Generated autoloads from org/org-taskjuggler.el
 
 (autoload 'org-export-as-taskjuggler "org-taskjuggler" "\
@@ -20875,7 +20977,7 @@ with the TaskJuggler GUI.
 \f
 ;;;### (autoloads (org-timer-set-timer org-timer-item org-timer-change-times-in-region
 ;;;;;;  org-timer org-timer-start) "org-timer" "org/org-timer.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org-timer.el
 
 (autoload 'org-timer-start "org-timer" "\
@@ -20936,7 +21038,7 @@ replace any running timer.
 ;;;***
 \f
 ;;;### (autoloads (org-export-as-xoxo) "org-xoxo" "org/org-xoxo.el"
-;;;;;;  (19845 45374))
+;;;;;;  (20018 35031))
 ;;; Generated autoloads from org/org-xoxo.el
 
 (autoload 'org-export-as-xoxo "org-xoxo" "\
@@ -21285,7 +21387,7 @@ Completion for the GNU tar utility.
 ;;;***
 \f
 ;;;### (autoloads (pcomplete/mount pcomplete/umount pcomplete/kill)
-;;;;;;  "pcmpl-linux" "pcmpl-linux.el" (19845 45374))
+;;;;;;  "pcmpl-linux" "pcmpl-linux.el" (19986 58615))
 ;;; Generated autoloads from pcmpl-linux.el
 
 (autoload 'pcomplete/kill "pcmpl-linux" "\
@@ -21660,8 +21762,8 @@ they are not defaultly assigned to keys.
 
 ;;;***
 \f
-;;;### (autoloads (plstore-open) "plstore" "gnus/plstore.el" (19981
-;;;;;;  40664))
+;;;### (autoloads (plstore-open) "plstore" "gnus/plstore.el" (19990
+;;;;;;  55648))
 ;;; Generated autoloads from gnus/plstore.el
 
 (autoload 'plstore-open "plstore" "\
@@ -21699,7 +21801,7 @@ pong-mode keybindings:\\<pong-mode-map>
 
 ;;;***
 \f
-;;;### (autoloads (pop3-movemail) "pop3" "gnus/pop3.el" (19940 49234))
+;;;### (autoloads (pop3-movemail) "pop3" "gnus/pop3.el" (19988 13913))
 ;;; Generated autoloads from gnus/pop3.el
 
 (autoload 'pop3-movemail "pop3" "\
@@ -21780,7 +21882,7 @@ Ignores leading comment characters.
 ;;;;;;  pr-ps-buffer-print pr-ps-buffer-using-ghostscript pr-ps-buffer-preview
 ;;;;;;  pr-ps-directory-ps-print pr-ps-directory-print pr-ps-directory-using-ghostscript
 ;;;;;;  pr-ps-directory-preview pr-interface) "printing" "printing.el"
-;;;;;;  (19845 45374))
+;;;;;;  (19999 41597))
 ;;; Generated autoloads from printing.el
 
 (autoload 'pr-interface "printing" "\
@@ -22222,7 +22324,7 @@ Toggle menu lock.
 \(fn)" t nil)
 
 (autoload 'pr-toggle-region "printing" "\
-Toggle auto region.
+Toggle whether the region is automagically detected.
 
 \(fn)" t nil)
 
@@ -22367,7 +22469,7 @@ are both set to t.
 
 ;;;***
 \f
-;;;### (autoloads (proced) "proced" "proced.el" (19975 1875))
+;;;### (autoloads (proced) "proced" "proced.el" (20006 43871))
 ;;; Generated autoloads from proced.el
 
 (autoload 'proced "proced" "\
@@ -23093,7 +23195,7 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'.
 ;;;***
 \f
 ;;;### (autoloads (rcirc-track-minor-mode rcirc-connect rcirc) "rcirc"
-;;;;;;  "net/rcirc.el" (19968 28627))
+;;;;;;  "net/rcirc.el" (20015 58840))
 ;;; Generated autoloads from net/rcirc.el
 
 (autoload 'rcirc "rcirc" "\
@@ -23187,7 +23289,7 @@ that were operated on recently.
 ;;;;;;  string-rectangle delete-whitespace-rectangle open-rectangle
 ;;;;;;  insert-rectangle yank-rectangle kill-rectangle extract-rectangle
 ;;;;;;  delete-extract-rectangle delete-rectangle) "rect" "rect.el"
-;;;;;;  (19886 45771))
+;;;;;;  (19999 41597))
 ;;; Generated autoloads from rect.el
  (define-key ctl-x-r-map "c" 'clear-rectangle)
  (define-key ctl-x-r-map "k" 'kill-rectangle)
@@ -23737,7 +23839,7 @@ variable.
 ;;;;;;  rmail-secondary-file-directory rmail-primary-inbox-list rmail-highlighted-headers
 ;;;;;;  rmail-retry-ignored-headers rmail-displayed-headers rmail-ignored-headers
 ;;;;;;  rmail-user-mail-address-regexp rmail-movemail-variant-p)
-;;;;;;  "rmail" "mail/rmail.el" (19976 23054))
+;;;;;;  "rmail" "mail/rmail.el" (19990 55648))
 ;;; Generated autoloads from mail/rmail.el
 
 (autoload 'rmail-movemail-variant-p "rmail" "\
@@ -24141,7 +24243,7 @@ Toggle the use of ROT13 encoding for the current window.
 ;;;***
 \f
 ;;;### (autoloads (rst-minor-mode rst-mode) "rst" "textmodes/rst.el"
-;;;;;;  (19932 55155))
+;;;;;;  (19986 58615))
 ;;; Generated autoloads from textmodes/rst.el
  (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode)))
 
@@ -24708,8 +24810,9 @@ Semantic mode.
 ;;;;;;  mail-citation-prefix-regexp mail-citation-hook mail-indentation-spaces
 ;;;;;;  mail-yank-prefix mail-setup-hook mail-personal-alias-file
 ;;;;;;  mail-default-reply-to mail-archive-file-name mail-header-separator
-;;;;;;  send-mail-function mail-interactive mail-self-blind mail-specify-envelope-from
-;;;;;;  mail-from-style) "sendmail" "mail/sendmail.el" (19980 19797))
+;;;;;;  sendmail-query-once send-mail-function mail-interactive mail-self-blind
+;;;;;;  mail-specify-envelope-from mail-from-style) "sendmail" "mail/sendmail.el"
+;;;;;;  (19996 8027))
 ;;; Generated autoloads from mail/sendmail.el
 
 (defvar mail-from-style 'default "\
@@ -24752,9 +24855,7 @@ Otherwise, let mailer send back a message to report errors.")
 
 (custom-autoload 'mail-interactive "sendmail" t)
 
-(put 'send-mail-function 'standard-value '((if (or (and window-system (eq system-type 'darwin)) (eq system-type 'windows-nt)) 'mailclient-send-it 'sendmail-send-it)))
-
-(defvar send-mail-function (if (or (and window-system (eq system-type 'darwin)) (eq system-type 'windows-nt)) 'mailclient-send-it 'sendmail-send-it) "\
+(defvar send-mail-function 'sendmail-query-once "\
 Function to call to send the current buffer as mail.
 The headers should be delimited by a line which is
 not a valid RFC822 header or continuation line,
@@ -24763,7 +24864,13 @@ This is used by the default mail-sending commands.  See also
 `message-send-mail-function' for use with the Message package.")
 
 (custom-autoload 'send-mail-function "sendmail" t)
-(custom-initialize-delay 'send-mail-function nil)
+
+(autoload 'sendmail-query-once "sendmail" "\
+Send an email via `sendmail-query-once-function'.
+If `sendmail-query-once-function' is `query', ask the user what
+function to use, and then save that choice.
+
+\(fn)" nil nil)
 
 (defvar mail-header-separator (purecopy "--text follows this line--") "\
 Line used to separate headers from text in messages being composed.")
@@ -24988,8 +25095,8 @@ Like `mail' command, but display mail buffer in another frame.
 ;;;***
 \f
 ;;;### (autoloads (server-save-buffers-kill-terminal server-mode
-;;;;;;  server-force-delete server-start) "server" "server.el" (19975
-;;;;;;  1875))
+;;;;;;  server-force-delete server-start) "server" "server.el" (19986
+;;;;;;  58615))
 ;;; Generated autoloads from server.el
 
 (put 'server-host 'risky-local-variable t)
@@ -25341,8 +25448,8 @@ Otherwise, one argument `-i' is passed to the shell.
 
 ;;;***
 \f
-;;;### (autoloads (shr-insert-document) "shr" "gnus/shr.el" (19976
-;;;;;;  22732))
+;;;### (autoloads (shr-insert-document) "shr" "gnus/shr.el" (20007
+;;;;;;  64734))
 ;;; Generated autoloads from gnus/shr.el
 
 (autoload 'shr-insert-document "shr" "\
@@ -25592,7 +25699,7 @@ interactively.  If there's no argument, do it at the current buffer.
 ;;;***
 \f
 ;;;### (autoloads (smtpmail-send-queued-mail smtpmail-send-it) "smtpmail"
-;;;;;;  "mail/smtpmail.el" (19978 37530))
+;;;;;;  "mail/smtpmail.el" (20002 46800))
 ;;; Generated autoloads from mail/smtpmail.el
 
 (autoload 'smtpmail-send-it "smtpmail" "\
@@ -25898,8 +26005,8 @@ From a program takes two point or marker arguments, BEG and END.
 
 ;;;***
 \f
-;;;### (autoloads (spam-initialize) "spam" "gnus/spam.el" (19976
-;;;;;;  22732))
+;;;### (autoloads (spam-initialize) "spam" "gnus/spam.el" (20022
+;;;;;;  32083))
 ;;; Generated autoloads from gnus/spam.el
 
 (autoload 'spam-initialize "spam" "\
@@ -26002,7 +26109,7 @@ Return a vector containing the lines from `spook-phrases-file'.
 ;;;;;;  sql-ms sql-ingres sql-solid sql-mysql sql-sqlite sql-informix
 ;;;;;;  sql-sybase sql-oracle sql-product-interactive sql-connect
 ;;;;;;  sql-mode sql-help sql-add-product-keywords) "sql" "progmodes/sql.el"
-;;;;;;  (19931 11784))
+;;;;;;  (19988 13913))
 ;;; Generated autoloads from progmodes/sql.el
 
 (autoload 'sql-add-product-keywords "sql" "\
@@ -26100,7 +26207,7 @@ their settings.
 The user will not be prompted for any login parameters if a value
 is specified in the connection settings.
 
-\(fn CONNECTION)" t nil)
+\(fn CONNECTION &optional NEW-NAME)" t nil)
 
 (autoload 'sql-product-interactive "sql" "\
 Run PRODUCT interpreter as an inferior process.
@@ -26778,7 +26885,7 @@ It relies on the `gpm' daemon being activated.
 
 ;;;***
 \f
-;;;### (autoloads (tabify untabify) "tabify" "tabify.el" (19845 45374))
+;;;### (autoloads (tabify untabify) "tabify" "tabify.el" (19998 49767))
 ;;; Generated autoloads from tabify.el
 
 (autoload 'untabify "tabify" "\
@@ -27639,7 +27746,7 @@ subprocess started.
 ;;;***
 \f
 ;;;### (autoloads (testcover-this-defun) "testcover" "emacs-lisp/testcover.el"
-;;;;;;  (19943 25429))
+;;;;;;  (19998 49767))
 ;;; Generated autoloads from emacs-lisp/testcover.el
 
 (autoload 'testcover-this-defun "testcover" "\
@@ -28137,33 +28244,39 @@ Compose Thai characters in the current buffer.
 \f
 ;;;### (autoloads (list-at-point number-at-point symbol-at-point
 ;;;;;;  sexp-at-point thing-at-point bounds-of-thing-at-point forward-thing)
-;;;;;;  "thingatpt" "thingatpt.el" (19980 19797))
+;;;;;;  "thingatpt" "thingatpt.el" (19990 55648))
 ;;; Generated autoloads from thingatpt.el
 
 (autoload 'forward-thing "thingatpt" "\
 Move forward to the end of the Nth next THING.
+THING should be a symbol specifying a type of syntactic entity.
+Possibilities include `symbol', `list', `sexp', `defun',
+`filename', `url', `email', `word', `sentence', `whitespace',
+`line', and `page'.
 
 \(fn THING &optional N)" nil nil)
 
 (autoload 'bounds-of-thing-at-point "thingatpt" "\
 Determine the start and end buffer locations for the THING at point.
-THING is a symbol which specifies the kind of syntactic entity you want.
-Possibilities include `symbol', `list', `sexp', `defun', `filename', `url',
-`email', `word', `sentence', `whitespace', `line', `page' and others.
+THING should be a symbol specifying a type of syntactic entity.
+Possibilities include `symbol', `list', `sexp', `defun',
+`filename', `url', `email', `word', `sentence', `whitespace',
+`line', and `page'.
 
-See the file `thingatpt.el' for documentation on how to define
-a symbol as a valid THING.
+See the file `thingatpt.el' for documentation on how to define a
+valid THING.
 
-The value is a cons cell (START . END) giving the start and end positions
-of the textual entity that was found.
+Return a cons cell (START . END) giving the start and end
+positions of the thing found.
 
 \(fn THING)" nil nil)
 
 (autoload 'thing-at-point "thingatpt" "\
 Return the THING at point.
-THING is a symbol which specifies the kind of syntactic entity you want.
-Possibilities include `symbol', `list', `sexp', `defun', `filename', `url',
-`email', `word', `sentence', `whitespace', `line', `page' and others.
+THING should be a symbol specifying a type of syntactic entity.
+Possibilities include `symbol', `list', `sexp', `defun',
+`filename', `url', `email', `word', `sentence', `whitespace',
+`line', and `page'.
 
 See the file `thingatpt.el' for documentation on how to define
 a symbol as a valid THING.
@@ -28332,7 +28445,7 @@ This function performs no refilling of the changed text.
 \f
 ;;;### (autoloads (emacs-init-time emacs-uptime display-time-world
 ;;;;;;  display-time-mode display-time display-time-day-and-date)
-;;;;;;  "time" "time.el" (19886 45771))
+;;;;;;  "time" "time.el" (19999 41597))
 ;;; Generated autoloads from time.el
 
 (defvar display-time-day-and-date nil "\
@@ -28778,7 +28891,7 @@ Show TODO list.
 \f
 ;;;### (autoloads (tool-bar-local-item-from-menu tool-bar-add-item-from-menu
 ;;;;;;  tool-bar-local-item tool-bar-add-item toggle-tool-bar-mode-from-frame)
-;;;;;;  "tool-bar" "tool-bar.el" (19886 45771))
+;;;;;;  "tool-bar" "tool-bar.el" (19994 52720))
 ;;; Generated autoloads from tool-bar.el
 
 (autoload 'toggle-tool-bar-mode-from-frame "tool-bar" "\
@@ -28961,7 +29074,7 @@ BUFFER defaults to `trace-buffer'.
 ;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion
 ;;;;;;  tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers
 ;;;;;;  tramp-file-name-handler tramp-syntax tramp-mode) "tramp"
-;;;;;;  "net/tramp.el" (19981 40664))
+;;;;;;  "net/tramp.el" (20010 40918))
 ;;; Generated autoloads from net/tramp.el
 
 (defvar tramp-mode t "\
@@ -29197,7 +29310,7 @@ First column's text    sSs  Second column's text
 ;;;;;;  type-break type-break-mode type-break-keystroke-threshold
 ;;;;;;  type-break-good-break-interval type-break-good-rest-interval
 ;;;;;;  type-break-interval type-break-mode) "type-break" "type-break.el"
-;;;;;;  (19981 40664))
+;;;;;;  (19985 37722))
 ;;; Generated autoloads from type-break.el
 
 (defvar type-break-mode nil "\
@@ -29601,7 +29714,7 @@ RATING   a rating between 1 and 10 of the strength of the authentication.
 ;;;***
 \f
 ;;;### (autoloads (url-cache-extract url-is-cached url-store-in-cache)
-;;;;;;  "url-cache" "url/url-cache.el" (19845 45374))
+;;;;;;  "url-cache" "url/url-cache.el" (19988 13913))
 ;;; Generated autoloads from url/url-cache.el
 
 (autoload 'url-store-in-cache "url-cache" "\
@@ -29732,7 +29845,7 @@ accessible.
 ;;;***
 \f
 ;;;### (autoloads (url-http-options url-http-file-attributes url-http-file-exists-p
-;;;;;;  url-http) "url-http" "url/url-http.el" (19882 48702))
+;;;;;;  url-http) "url-http" "url/url-http.el" (19997 54906))
 ;;; Generated autoloads from url/url-http.el
 
 (autoload 'url-http "url-http" "\
@@ -30210,8 +30323,8 @@ If FILE-NAME is non-nil, save the result to FILE-NAME.
 ;;;;;;  vc-print-log vc-retrieve-tag vc-create-tag vc-merge vc-insert-headers
 ;;;;;;  vc-revision-other-window vc-root-diff vc-ediff vc-version-ediff
 ;;;;;;  vc-diff vc-version-diff vc-register vc-next-action vc-before-checkin-hook
-;;;;;;  vc-checkin-hook vc-checkout-hook) "vc" "vc/vc.el" (19976
-;;;;;;  22732))
+;;;;;;  vc-checkin-hook vc-checkout-hook) "vc" "vc/vc.el" (19997
+;;;;;;  28887))
 ;;; Generated autoloads from vc/vc.el
 
 (defvar vc-checkout-hook nil "\
@@ -30531,7 +30644,7 @@ mode-specific menu.  `vc-annotate-color-map' and
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-arch" "vc/vc-arch.el" (19845 45374))
+;;;### (autoloads nil "vc-arch" "vc/vc-arch.el" (19984 16846))
 ;;; Generated autoloads from vc/vc-arch.el
  (defun vc-arch-registered (file)
   (if (vc-find-root file "{arch}/=tagging-method")
@@ -30541,7 +30654,7 @@ mode-specific menu.  `vc-annotate-color-map' and
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (19931 34253))
+;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (19991 42275))
 ;;; Generated autoloads from vc/vc-bzr.el
 
 (defconst vc-bzr-admin-dirname ".bzr" "\
@@ -31535,7 +31648,7 @@ Convert Vietnamese characters of the current buffer to `VIQR' mnemonics.
 ;;;;;;  view-mode view-buffer-other-frame view-buffer-other-window
 ;;;;;;  view-buffer view-file-other-frame view-file-other-window
 ;;;;;;  view-file kill-buffer-if-not-modified view-remove-frame-by-deleting)
-;;;;;;  "view" "view.el" (19958 33091))
+;;;;;;  "view" "view.el" (20006 43871))
 ;;; Generated autoloads from view.el
 
 (defvar view-remove-frame-by-deleting t "\
@@ -31929,7 +32042,7 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke
 ;;;***
 \f
 ;;;### (autoloads (which-function-mode) "which-func" "progmodes/which-func.el"
-;;;;;;  (19915 46047))
+;;;;;;  (19988 13913))
 ;;; Generated autoloads from progmodes/which-func.el
  (put 'which-func-format 'risky-local-variable t)
  (put 'which-func-current 'risky-local-variable t)
@@ -32488,7 +32601,7 @@ Default MODIFIER is 'shift.
 ;;;***
 \f
 ;;;### (autoloads (winner-mode winner-mode) "winner" "winner.el"
-;;;;;;  (19845 45374))
+;;;;;;  (19998 49767))
 ;;; Generated autoloads from winner.el
 
 (defvar winner-mode nil "\
@@ -32900,36 +33013,35 @@ Zone out, completely.
 ;;;;;;  "emacs-lisp/eieio.el" "emacs-lisp/find-gc.el" "emacs-lisp/gulp.el"
 ;;;;;;  "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" "emacs-lisp/regi.el"
 ;;;;;;  "emacs-lisp/smie.el" "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el"
-;;;;;;  "emacs-lock.el" "emulation/cua-gmrk.el" "emulation/cua-rect.el"
-;;;;;;  "emulation/edt-lk201.el" "emulation/edt-mapper.el" "emulation/edt-pc.el"
-;;;;;;  "emulation/edt-vt100.el" "emulation/tpu-extras.el" "emulation/viper-cmd.el"
-;;;;;;  "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el"
-;;;;;;  "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el"
-;;;;;;  "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el"
-;;;;;;  "erc/erc-lang.el" "eshell/em-alias.el" "eshell/em-banner.el"
-;;;;;;  "eshell/em-basic.el" "eshell/em-cmpl.el" "eshell/em-dirs.el"
-;;;;;;  "eshell/em-glob.el" "eshell/em-hist.el" "eshell/em-ls.el"
-;;;;;;  "eshell/em-pred.el" "eshell/em-prompt.el" "eshell/em-rebind.el"
-;;;;;;  "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el"
-;;;;;;  "eshell/em-unix.el" "eshell/em-xtra.el" "eshell/esh-arg.el"
-;;;;;;  "eshell/esh-cmd.el" "eshell/esh-ext.el" "eshell/esh-groups.el"
-;;;;;;  "eshell/esh-io.el" "eshell/esh-module.el" "eshell/esh-opt.el"
-;;;;;;  "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el"
-;;;;;;  "ezimage.el" "foldout.el" "format-spec.el" "forms-d2.el"
-;;;;;;  "forms-pass.el" "fringe.el" "generic-x.el" "gnus/compface.el"
-;;;;;;  "gnus/gnus-async.el" "gnus/gnus-bcklg.el" "gnus/gnus-cite.el"
-;;;;;;  "gnus/gnus-cus.el" "gnus/gnus-demon.el" "gnus/gnus-dup.el"
-;;;;;;  "gnus/gnus-eform.el" "gnus/gnus-ems.el" "gnus/gnus-int.el"
-;;;;;;  "gnus/gnus-logic.el" "gnus/gnus-mh.el" "gnus/gnus-salt.el"
-;;;;;;  "gnus/gnus-score.el" "gnus/gnus-setup.el" "gnus/gnus-srvr.el"
-;;;;;;  "gnus/gnus-topic.el" "gnus/gnus-undo.el" "gnus/gnus-util.el"
-;;;;;;  "gnus/gnus-uu.el" "gnus/gnus-vm.el" "gnus/gssapi.el" "gnus/ietf-drums.el"
-;;;;;;  "gnus/legacy-gnus-agent.el" "gnus/mail-parse.el" "gnus/mail-prsvr.el"
-;;;;;;  "gnus/mail-source.el" "gnus/mailcap.el" "gnus/messcompat.el"
-;;;;;;  "gnus/mm-bodies.el" "gnus/mm-decode.el" "gnus/mm-encode.el"
-;;;;;;  "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml-sec.el" "gnus/mml-smime.el"
-;;;;;;  "gnus/mml.el" "gnus/nnagent.el" "gnus/nnbabyl.el" "gnus/nndir.el"
-;;;;;;  "gnus/nndraft.el" "gnus/nneething.el" "gnus/nngateway.el"
+;;;;;;  "emulation/cua-gmrk.el" "emulation/cua-rect.el" "emulation/edt-lk201.el"
+;;;;;;  "emulation/edt-mapper.el" "emulation/edt-pc.el" "emulation/edt-vt100.el"
+;;;;;;  "emulation/tpu-extras.el" "emulation/viper-cmd.el" "emulation/viper-ex.el"
+;;;;;;  "emulation/viper-init.el" "emulation/viper-keym.el" "emulation/viper-macs.el"
+;;;;;;  "emulation/viper-mous.el" "emulation/viper-util.el" "erc/erc-backend.el"
+;;;;;;  "erc/erc-goodies.el" "erc/erc-ibuffer.el" "erc/erc-lang.el"
+;;;;;;  "eshell/em-alias.el" "eshell/em-banner.el" "eshell/em-basic.el"
+;;;;;;  "eshell/em-cmpl.el" "eshell/em-dirs.el" "eshell/em-glob.el"
+;;;;;;  "eshell/em-hist.el" "eshell/em-ls.el" "eshell/em-pred.el"
+;;;;;;  "eshell/em-prompt.el" "eshell/em-rebind.el" "eshell/em-script.el"
+;;;;;;  "eshell/em-smart.el" "eshell/em-term.el" "eshell/em-unix.el"
+;;;;;;  "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el"
+;;;;;;  "eshell/esh-ext.el" "eshell/esh-groups.el" "eshell/esh-io.el"
+;;;;;;  "eshell/esh-module.el" "eshell/esh-opt.el" "eshell/esh-proc.el"
+;;;;;;  "eshell/esh-util.el" "eshell/esh-var.el" "ezimage.el" "foldout.el"
+;;;;;;  "format-spec.el" "forms-d2.el" "forms-pass.el" "fringe.el"
+;;;;;;  "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el"
+;;;;;;  "gnus/gnus-cite.el" "gnus/gnus-cus.el" "gnus/gnus-demon.el"
+;;;;;;  "gnus/gnus-dup.el" "gnus/gnus-eform.el" "gnus/gnus-ems.el"
+;;;;;;  "gnus/gnus-int.el" "gnus/gnus-logic.el" "gnus/gnus-mh.el"
+;;;;;;  "gnus/gnus-salt.el" "gnus/gnus-score.el" "gnus/gnus-setup.el"
+;;;;;;  "gnus/gnus-srvr.el" "gnus/gnus-topic.el" "gnus/gnus-undo.el"
+;;;;;;  "gnus/gnus-util.el" "gnus/gnus-uu.el" "gnus/gnus-vm.el" "gnus/gssapi.el"
+;;;;;;  "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el" "gnus/mail-parse.el"
+;;;;;;  "gnus/mail-prsvr.el" "gnus/mail-source.el" "gnus/mailcap.el"
+;;;;;;  "gnus/messcompat.el" "gnus/mm-bodies.el" "gnus/mm-decode.el"
+;;;;;;  "gnus/mm-encode.el" "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml-sec.el"
+;;;;;;  "gnus/mml-smime.el" "gnus/mml.el" "gnus/nnagent.el" "gnus/nnbabyl.el"
+;;;;;;  "gnus/nndir.el" "gnus/nndraft.el" "gnus/nneething.el" "gnus/nngateway.el"
 ;;;;;;  "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el" "gnus/nnmail.el"
 ;;;;;;  "gnus/nnmaildir.el" "gnus/nnmairix.el" "gnus/nnmbox.el" "gnus/nnmh.el"
 ;;;;;;  "gnus/nnnil.el" "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el"
@@ -32963,60 +33075,62 @@ Zone out, completely.
 ;;;;;;  "mh-e/mh-utils.el" "mh-e/mh-xface.el" "mouse-copy.el" "mouse.el"
 ;;;;;;  "mwheel.el" "net/dns.el" "net/eudc-vars.el" "net/eudcb-bbdb.el"
 ;;;;;;  "net/eudcb-ldap.el" "net/eudcb-mab.el" "net/eudcb-ph.el"
-;;;;;;  "net/gnutls.el" "net/hmac-def.el" "net/hmac-md5.el" "net/imap.el"
-;;;;;;  "net/ldap.el" "net/mairix.el" "net/newsticker.el" "net/ntlm.el"
-;;;;;;  "net/sasl-cram.el" "net/sasl-digest.el" "net/sasl-ntlm.el"
-;;;;;;  "net/sasl.el" "net/soap-client.el" "net/soap-inspect.el"
-;;;;;;  "net/socks.el" "net/tls.el" "net/tramp-cache.el" "net/tramp-cmds.el"
-;;;;;;  "net/tramp-compat.el" "net/tramp-gvfs.el" "net/tramp-gw.el"
-;;;;;;  "net/tramp-loaddefs.el" "net/tramp-sh.el" "net/tramp-smb.el"
-;;;;;;  "net/tramp-uu.el" "net/trampver.el" "net/zeroconf.el" "notifications.el"
-;;;;;;  "nxml/nxml-enc.el" "nxml/nxml-maint.el" "nxml/nxml-ns.el"
-;;;;;;  "nxml/nxml-outln.el" "nxml/nxml-parse.el" "nxml/nxml-rap.el"
-;;;;;;  "nxml/nxml-util.el" "nxml/rng-dt.el" "nxml/rng-loc.el" "nxml/rng-maint.el"
-;;;;;;  "nxml/rng-match.el" "nxml/rng-parse.el" "nxml/rng-pttrn.el"
-;;;;;;  "nxml/rng-uri.el" "nxml/rng-util.el" "nxml/xsd-regexp.el"
-;;;;;;  "org/ob-C.el" "org/ob-R.el" "org/ob-asymptote.el" "org/ob-calc.el"
-;;;;;;  "org/ob-clojure.el" "org/ob-comint.el" "org/ob-css.el" "org/ob-ditaa.el"
-;;;;;;  "org/ob-dot.el" "org/ob-emacs-lisp.el" "org/ob-eval.el" "org/ob-exp.el"
-;;;;;;  "org/ob-gnuplot.el" "org/ob-haskell.el" "org/ob-js.el" "org/ob-latex.el"
-;;;;;;  "org/ob-ledger.el" "org/ob-lisp.el" "org/ob-matlab.el" "org/ob-mscgen.el"
-;;;;;;  "org/ob-ocaml.el" "org/ob-octave.el" "org/ob-org.el" "org/ob-perl.el"
-;;;;;;  "org/ob-plantuml.el" "org/ob-python.el" "org/ob-ref.el" "org/ob-ruby.el"
-;;;;;;  "org/ob-sass.el" "org/ob-scheme.el" "org/ob-screen.el" "org/ob-sh.el"
-;;;;;;  "org/ob-sql.el" "org/ob-sqlite.el" "org/ob-table.el" "org/org-beamer.el"
-;;;;;;  "org/org-bibtex.el" "org/org-colview.el" "org/org-compat.el"
-;;;;;;  "org/org-complete.el" "org/org-crypt.el" "org/org-ctags.el"
-;;;;;;  "org/org-docview.el" "org/org-entities.el" "org/org-exp-blocks.el"
-;;;;;;  "org/org-faces.el" "org/org-gnus.el" "org/org-habit.el" "org/org-info.el"
-;;;;;;  "org/org-inlinetask.el" "org/org-install.el" "org/org-jsinfo.el"
-;;;;;;  "org/org-list.el" "org/org-mac-message.el" "org/org-macs.el"
-;;;;;;  "org/org-mew.el" "org/org-mhe.el" "org/org-mks.el" "org/org-mouse.el"
-;;;;;;  "org/org-protocol.el" "org/org-rmail.el" "org/org-src.el"
-;;;;;;  "org/org-vm.el" "org/org-w3m.el" "org/org-wl.el" "patcomp.el"
-;;;;;;  "play/gamegrid.el" "play/gametree.el" "play/meese.el" "progmodes/ada-prj.el"
-;;;;;;  "progmodes/cc-align.el" "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el"
-;;;;;;  "progmodes/cc-cmds.el" "progmodes/cc-defs.el" "progmodes/cc-fonts.el"
-;;;;;;  "progmodes/cc-langs.el" "progmodes/cc-menus.el" "progmodes/ebnf-abn.el"
-;;;;;;  "progmodes/ebnf-bnf.el" "progmodes/ebnf-dtd.el" "progmodes/ebnf-ebx.el"
-;;;;;;  "progmodes/ebnf-iso.el" "progmodes/ebnf-otz.el" "progmodes/ebnf-yac.el"
-;;;;;;  "progmodes/idlw-complete-structtag.el" "progmodes/idlw-help.el"
-;;;;;;  "progmodes/idlw-toolbar.el" "progmodes/mantemp.el" "progmodes/xscheme.el"
-;;;;;;  "ps-def.el" "ps-mule.el" "ps-samp.el" "saveplace.el" "sb-image.el"
-;;;;;;  "scroll-bar.el" "select.el" "soundex.el" "subdirs.el" "tempo.el"
-;;;;;;  "textmodes/bib-mode.el" "textmodes/makeinfo.el" "textmodes/page-ext.el"
-;;;;;;  "textmodes/refbib.el" "textmodes/refer.el" "textmodes/reftex-auc.el"
-;;;;;;  "textmodes/reftex-dcr.el" "textmodes/reftex-ref.el" "textmodes/reftex-sel.el"
-;;;;;;  "textmodes/reftex-toc.el" "textmodes/texnfo-upd.el" "timezone.el"
-;;;;;;  "tooltip.el" "tree-widget.el" "uniquify.el" "url/url-about.el"
-;;;;;;  "url/url-cookie.el" "url/url-dired.el" "url/url-expand.el"
-;;;;;;  "url/url-ftp.el" "url/url-future.el" "url/url-history.el"
-;;;;;;  "url/url-imap.el" "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el"
-;;;;;;  "url/url-vars.el" "vc/ediff-diff.el" "vc/ediff-init.el" "vc/ediff-merg.el"
-;;;;;;  "vc/ediff-ptch.el" "vc/ediff-vers.el" "vc/ediff-wind.el"
-;;;;;;  "vc/pcvs-info.el" "vc/pcvs-parse.el" "vc/pcvs-util.el" "vc/vc-dav.el"
-;;;;;;  "vcursor.el" "vt-control.el" "vt100-led.el" "w32-fns.el"
-;;;;;;  "w32-vars.el" "x-dnd.el") (19981 41048 99944))
+;;;;;;  "net/hmac-def.el" "net/hmac-md5.el" "net/imap.el" "net/ldap.el"
+;;;;;;  "net/mairix.el" "net/newsticker.el" "net/ntlm.el" "net/sasl-cram.el"
+;;;;;;  "net/sasl-digest.el" "net/sasl-ntlm.el" "net/sasl.el" "net/soap-client.el"
+;;;;;;  "net/soap-inspect.el" "net/socks.el" "net/tls.el" "net/tramp-cache.el"
+;;;;;;  "net/tramp-cmds.el" "net/tramp-compat.el" "net/tramp-gvfs.el"
+;;;;;;  "net/tramp-gw.el" "net/tramp-loaddefs.el" "net/tramp-sh.el"
+;;;;;;  "net/tramp-smb.el" "net/tramp-uu.el" "net/trampver.el" "net/zeroconf.el"
+;;;;;;  "notifications.el" "nxml/nxml-enc.el" "nxml/nxml-maint.el"
+;;;;;;  "nxml/nxml-ns.el" "nxml/nxml-outln.el" "nxml/nxml-parse.el"
+;;;;;;  "nxml/nxml-rap.el" "nxml/nxml-util.el" "nxml/rng-dt.el" "nxml/rng-loc.el"
+;;;;;;  "nxml/rng-maint.el" "nxml/rng-match.el" "nxml/rng-parse.el"
+;;;;;;  "nxml/rng-pttrn.el" "nxml/rng-uri.el" "nxml/rng-util.el"
+;;;;;;  "nxml/xsd-regexp.el" "org/ob-C.el" "org/ob-R.el" "org/ob-asymptote.el"
+;;;;;;  "org/ob-awk.el" "org/ob-calc.el" "org/ob-clojure.el" "org/ob-comint.el"
+;;;;;;  "org/ob-css.el" "org/ob-ditaa.el" "org/ob-dot.el" "org/ob-emacs-lisp.el"
+;;;;;;  "org/ob-eval.el" "org/ob-exp.el" "org/ob-gnuplot.el" "org/ob-haskell.el"
+;;;;;;  "org/ob-java.el" "org/ob-js.el" "org/ob-latex.el" "org/ob-ledger.el"
+;;;;;;  "org/ob-lilypond.el" "org/ob-lisp.el" "org/ob-matlab.el"
+;;;;;;  "org/ob-maxima.el" "org/ob-mscgen.el" "org/ob-ocaml.el" "org/ob-octave.el"
+;;;;;;  "org/ob-org.el" "org/ob-perl.el" "org/ob-plantuml.el" "org/ob-python.el"
+;;;;;;  "org/ob-ref.el" "org/ob-ruby.el" "org/ob-sass.el" "org/ob-scheme.el"
+;;;;;;  "org/ob-screen.el" "org/ob-sh.el" "org/ob-sql.el" "org/ob-sqlite.el"
+;;;;;;  "org/ob-table.el" "org/org-beamer.el" "org/org-bibtex.el"
+;;;;;;  "org/org-colview.el" "org/org-compat.el" "org/org-crypt.el"
+;;;;;;  "org/org-ctags.el" "org/org-docview.el" "org/org-entities.el"
+;;;;;;  "org/org-exp-blocks.el" "org/org-faces.el" "org/org-gnus.el"
+;;;;;;  "org/org-habit.el" "org/org-info.el" "org/org-inlinetask.el"
+;;;;;;  "org/org-install.el" "org/org-jsinfo.el" "org/org-list.el"
+;;;;;;  "org/org-mac-message.el" "org/org-macs.el" "org/org-mew.el"
+;;;;;;  "org/org-mhe.el" "org/org-mks.el" "org/org-mouse.el" "org/org-pcomplete.el"
+;;;;;;  "org/org-protocol.el" "org/org-rmail.el" "org/org-special-blocks.el"
+;;;;;;  "org/org-src.el" "org/org-vm.el" "org/org-w3m.el" "org/org-wl.el"
+;;;;;;  "patcomp.el" "play/gamegrid.el" "play/gametree.el" "play/meese.el"
+;;;;;;  "progmodes/ada-prj.el" "progmodes/cc-align.el" "progmodes/cc-awk.el"
+;;;;;;  "progmodes/cc-bytecomp.el" "progmodes/cc-cmds.el" "progmodes/cc-defs.el"
+;;;;;;  "progmodes/cc-fonts.el" "progmodes/cc-langs.el" "progmodes/cc-menus.el"
+;;;;;;  "progmodes/ebnf-abn.el" "progmodes/ebnf-bnf.el" "progmodes/ebnf-dtd.el"
+;;;;;;  "progmodes/ebnf-ebx.el" "progmodes/ebnf-iso.el" "progmodes/ebnf-otz.el"
+;;;;;;  "progmodes/ebnf-yac.el" "progmodes/idlw-complete-structtag.el"
+;;;;;;  "progmodes/idlw-help.el" "progmodes/idlw-toolbar.el" "progmodes/mantemp.el"
+;;;;;;  "progmodes/xscheme.el" "ps-def.el" "ps-mule.el" "ps-samp.el"
+;;;;;;  "saveplace.el" "sb-image.el" "scroll-bar.el" "select.el"
+;;;;;;  "soundex.el" "subdirs.el" "tempo.el" "textmodes/bib-mode.el"
+;;;;;;  "textmodes/makeinfo.el" "textmodes/page-ext.el" "textmodes/refbib.el"
+;;;;;;  "textmodes/refer.el" "textmodes/reftex-auc.el" "textmodes/reftex-dcr.el"
+;;;;;;  "textmodes/reftex-ref.el" "textmodes/reftex-sel.el" "textmodes/reftex-toc.el"
+;;;;;;  "textmodes/texnfo-upd.el" "timezone.el" "tooltip.el" "tree-widget.el"
+;;;;;;  "uniquify.el" "url/url-about.el" "url/url-cookie.el" "url/url-dired.el"
+;;;;;;  "url/url-expand.el" "url/url-ftp.el" "url/url-future.el"
+;;;;;;  "url/url-history.el" "url/url-imap.el" "url/url-methods.el"
+;;;;;;  "url/url-nfs.el" "url/url-proxy.el" "url/url-vars.el" "vc/ediff-diff.el"
+;;;;;;  "vc/ediff-init.el" "vc/ediff-merg.el" "vc/ediff-ptch.el"
+;;;;;;  "vc/ediff-vers.el" "vc/ediff-wind.el" "vc/pcvs-info.el" "vc/pcvs-parse.el"
+;;;;;;  "vc/pcvs-util.el" "vc/vc-dav.el" "vcursor.el" "vt-control.el"
+;;;;;;  "vt100-led.el" "w32-fns.el" "w32-vars.el" "x-dnd.el") (20022
+;;;;;;  32281 188358))
 
 ;;;***
 \f
index fe20ad921dacbacfdfdf3dd34a0b2bb85e31914e..158435de86bfe00485ba0a83730f521847196d74 100644 (file)
@@ -165,7 +165,8 @@ This is used by the default mail-sending commands.  See also
 If `sendmail-query-once-function' is `query', ask the user what
 function to use, and then save that choice."
   (when (equal sendmail-query-once-function 'query)
-    (let* ((default
+    (let* ((mail-buffer (current-buffer))
+          (default
             (cond
              ((or (and window-system (eq system-type 'darwin))
                   (eq system-type 'windows-nt))
@@ -195,7 +196,8 @@ function to use, and then save that choice."
                    (if (y-or-n-p "Configure outgoing SMTP in Emacs? ")
                        'smtpmail-send-it
                      default))
-               (kill-buffer (current-buffer))))))
+               (kill-buffer (current-buffer))
+               (set-buffer mail-buffer)))))
       (customize-save-variable 'sendmail-query-once-function function)))
   (funcall sendmail-query-once-function))
 
index cc46660712f7c03cd935f8b1614d0e5abf420376..3b406fa9331b686524ba7fec2c4aee70006b6dbb 100644 (file)
@@ -589,7 +589,7 @@ The list is in preference order.")
 
 (defun smtpmail-query-smtp-server ()
   (let ((server (read-string "Outgoing SMTP mail server: "))
-       (ports '(587 "smtp"))
+       (ports '("smtp" 587))
        stream port)
     (when (and smtpmail-smtp-server
               (not (member smtpmail-smtp-server ports)))
index bb09d8945c962465494ebed0565da0f3c4d48eda..ceb094cded7a2ecd6dd078ff41704df3e9201890 100644 (file)
@@ -230,7 +230,7 @@ functionality.
               (or builtin-starttls
                   (and (or require-tls
                            (plist-get parameters :use-starttls-if-possible))
-                       (executable-find "gnutls-cli")))
+                       (starttls-available-p)))
               (not (eq (plist-get parameters :type) 'plain)))
       ;; If using external STARTTLS, drop this connection and start
       ;; anew with `starttls-open-stream'.
index 9e04abb8cd51f26913089b3be1f2919face66279..7d43c4f7547f83b1413d430ae61f9cc3ec899a88 100644 (file)
@@ -2695,7 +2695,8 @@ the only argument."
       (setq rcirc-topic (caddr args)))))
 
 (defun rcirc-handler-333 (process sender args text)
-  "Not in rfc1459.txt"
+  "333 says who set the topic and when.
+Not in rfc1459.txt"
   (let ((buffer (or (rcirc-get-buffer process (cadr args))
                    (rcirc-get-temp-buffer-create process (cadr args)))))
     (with-current-buffer buffer
index 7b4c6fd75b135bfa411b5585c4eb143dbba1c4fd..da51662b2164bb3484cd32d733d24869d05930c0 100644 (file)
@@ -31,7 +31,7 @@
 ;; should be changed only there.
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.2.2-pre"
+(defconst tramp-version "2.2.2"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
@@ -44,7 +44,7 @@
                      (= emacs-major-version 21)
                      (>= emacs-minor-version 4)))
             "ok"
-          (format "Tramp 2.2.2-pre is not fit for %s"
+          (format "Tramp 2.2.2 is not fit for %s"
                   (when (string-match "^.*$" (emacs-version))
                     (match-string 0 (emacs-version)))))))
   (unless (string-match "\\`ok\\'" x) (error "%s" x)))
index 0822f313ac49db77b7d2b88d3c9e307598d9118c..43e4ad30e0609aa3c42ec44eda10a60aba0a22b1 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-30  Carsten Dominik  <carsten.dominik@gmail.com>
+
+       * ob.el (org-babel-src-block-regexp): If a code block has a body,
+       its last character must be a newline.
+
 2011-07-28  Bastien Guerry  <bzg@gnu.org>
 
        * org-publish.el (org-publish-index-generate-theindex): rename
index 0de0aa661c5958339698b655319fde758f5e2674..44173fdb78940674534d975c3c641c23fd838e82 100644 (file)
@@ -137,7 +137,7 @@ remove code block execution from the C-c C-c keybinding."
    ;; (4) header arguments
    "\\([^\n]*\\)\n"
    ;; (5) body
-   "\\([^\000]*?\\)[ \t]*#\\+end_src")
+   "\\([^\000]*?\n\\)?[ \t]*#\\+end_src")
   "Regexp used to identify code blocks.")
 
 (defvar org-babel-inline-src-block-regexp
index 258f9be9237e06356d3a826ae44723a81cf8bb23..31a4fbaef4d171afa17d48414c76c070daef412e 100644 (file)
@@ -1028,45 +1028,45 @@ subshells can nest."
 
 (defun sh-font-lock-paren (start)
   (unless (nth 8 (syntax-ppss))
-  (save-excursion
-    (goto-char start)
-    ;; Skip through all patterns
-    (while
-       (progn
+    (save-excursion
+      (goto-char start)
+      ;; Skip through all patterns
+      (while
+          (progn
             (while
                 (progn
-         (forward-comment (- (point-max)))
+                  (forward-comment (- (point-max)))
                   (when (and (eolp) (sh-is-quoted-p (point)))
                     (forward-char -1)
                     t)))
-         ;; Skip through one pattern
-         (while
-             (or (/= 0 (skip-syntax-backward "w_"))
+            ;; Skip through one pattern
+            (while
+                (or (/= 0 (skip-syntax-backward "w_"))
                     (/= 0 (skip-chars-backward "-$=?[]*@/\\\\"))
-                 (and (sh-is-quoted-p (1- (point)))
-                      (goto-char (- (point) 2)))
+                    (and (sh-is-quoted-p (1- (point)))
+                         (goto-char (- (point) 2)))
                     (when (memq (char-before) '(?\" ?\' ?\}))
-                   (condition-case nil (progn (backward-sexp 1) t)
-                     (error nil)))))
-         ;; Patterns can be preceded by an open-paren (Bug#1320).
-         (if (eq (char-before (point)) ?\()
-             (backward-char 1))
-          (while (progn
-                   (forward-comment (- (point-max)))
-                   ;; Maybe we've bumped into an escaped newline.
-                   (sh-is-quoted-p (point)))
-            (backward-char 1))
-         (when (eq (char-before) ?|)
-           (backward-char 1) t)))
-    (when (progn (backward-char 2)
-                 (if (> start (line-end-position))
-                     (put-text-property (point) (1+ start)
-                                        'syntax-multiline t))
-                 ;; FIXME: The `in' may just be a random argument to
-                 ;; a normal command rather than the real `in' keyword.
-                 ;; I.e. we should look back to try and find the
-                 ;; corresponding `case'.
-                   (and (looking-at ";[;&]\\|in")
+                      (condition-case nil (progn (backward-sexp 1) t)
+                        (error nil)))))
+            ;; Patterns can be preceded by an open-paren (Bug#1320).
+            (if (eq (char-before (point)) ?\()
+                (backward-char 1))
+            (while (progn
+                     (forward-comment (- (point-max)))
+                     ;; Maybe we've bumped into an escaped newline.
+                     (sh-is-quoted-p (point)))
+              (backward-char 1))
+            (when (eq (char-before) ?|)
+              (backward-char 1) t)))
+      (when (progn (backward-char 2)
+                   (if (> start (line-end-position))
+                       (put-text-property (point) (1+ start)
+                                          'syntax-multiline t))
+                   ;; FIXME: The `in' may just be a random argument to
+                   ;; a normal command rather than the real `in' keyword.
+                   ;; I.e. we should look back to try and find the
+                   ;; corresponding `case'.
+                   (and (looking-at ";[;&]\\|\\_<in")
                         ;; ";; esac )" is a case that looks like a case-pattern
                         ;; but it's really just a close paren after a case
                         ;; statement.  I.e. if we skipped over `esac' just now,
index 905db8dc9b6b3867c48bd1a9ea9a8a8880a93ea6..215dbab7849177e3230f4adb6aa952f6850983dd 100644 (file)
@@ -4715,15 +4715,12 @@ documentation of `display-buffer-alist' for a description."
   (setq window (window-normalize-live-window window))
   (let* ((old-frame (selected-frame))
         (new-frame (window-frame window))
-        (dedicate (cdr (assq 'dedicate specifiers)))
         (no-other-window (cdr (assq 'no-other-window specifiers))))
     ;; Show BUFFER in WINDOW.
     (unless (eq buffer (window-buffer window))
       ;; If we show another buffer in WINDOW, undedicate it first.
       (set-window-dedicated-p window nil))
     (set-window-buffer window buffer)
-    (when dedicate
-      (set-window-dedicated-p window dedicate))
     (when no-other-window
       (set-window-parameter window 'no-other-window t))
     (unless (or (eq old-frame new-frame)
@@ -4965,7 +4962,7 @@ Return the new window, nil if it could not be created."
        (selected-window (selected-window))
        root new new-parent)
 
-      ;; We are in an atomic window.
+    ;; We are in an atomic window.
     (when (and (window-parameter window 'window-atom) (not nest))
       ;; Split the root window.
       (setq window (window-atom-root window)))
@@ -5059,6 +5056,10 @@ description."
              (setq display-buffer-window (cons window 'new-window))
              ;; Install BUFFER in the new window.
              (display-buffer-in-window buffer window specifiers)
+             (let ((dedicate (cdr (assq 'dedicate specifiers))))
+               (when dedicate
+                 ;; Dedicate window to buffer.
+                 (set-window-dedicated-p window dedicate)))
              ;; Adjust sizes if asked for (for `fit-window-to-buffer'
              ;; and friends BUFFER must be already shown in the new
              ;; window).
@@ -5094,7 +5095,12 @@ documentation of `display-buffer-alist' for a description."
          (set-window-parameter
           window 'quit-restore (list 'new-frame buffer selected-window))
          (setq display-buffer-window (cons window 'new-frame))
-         (display-buffer-in-window buffer window specifiers))))))
+         (display-buffer-in-window buffer window specifiers)
+         (let ((dedicate (cdr (assq 'dedicate specifiers))))
+           (when dedicate
+             ;; Dedicate window to buffer.
+             (set-window-dedicated-p window dedicate)))
+         window)))))
 
 (defun display-buffer-pop-up-side-window (buffer side slot &optional specifiers)
   "Display BUFFER in a new window on SIDE of the selected frame.
@@ -5142,6 +5148,10 @@ failed."
       (setq display-buffer-window (cons window 'new-window))
       ;; Install BUFFER in new window.
       (display-buffer-in-window buffer window specifiers)
+      (let ((dedicate (cdr (assq 'dedicate specifiers))))
+       (when dedicate
+         ;; Dedicate window to buffer.
+         (set-window-dedicated-p window dedicate)))
       ;; Adjust sizes of new window if asked for.
       (display-buffer-set-height window specifiers)
       (display-buffer-set-width window specifiers)
@@ -5282,6 +5292,10 @@ SPECIFIERS must be a list of buffer display specifiers."
          (set-window-parameter window 'window-slot slot))
        ;; Install BUFFER in the window.
        (display-buffer-in-window buffer window specifiers)
+       (let ((dedicate (cdr (assq 'dedicate specifiers))))
+         (when dedicate
+           ;; Dedicate window to buffer.
+           (set-window-dedicated-p window dedicate)))
        (when new-window
          ;; Adjust sizes if asked for (for `fit-window-to-buffer' and
          ;; friends BUFFER must be already shown in the new window).
index 3eaa3d5eadd298c193d7e5cdf32dab91571d9997..3717924ff68bd56c01900377dff5f6d2a48641d9 100644 (file)
@@ -1,3 +1,56 @@
+2011-08-02  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix slow cursor motion and scrolling in large buffers with
+       selective display, like Org Mode buffers.  (Bug#9218)
+
+       * dispextern.h (struct bidi_it): New member disp_prop_p.
+
+       * xdisp.c: Remove one-slot cache of display string positions.
+       (compute_display_string_pos): Accept an additional argument
+       DISP_PROP_P; callers changed. Scan at most 5K characters forward
+       for a display string or property.  If found, set DISP_PROP_P
+       non-zero.
+
+       * bidi.c (bidi_fetch_char): Accept an additional argument
+       DISP_PROP_P, and pass it to compute_display_string_pos.  Only
+       handle text covered by a display string if DISP_PROP_P is returned
+       non-zero.  All callers of bidi_fetch_char changed.
+
+2011-08-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
+
+2010-12-03  Don March  <don@ohspite.net>
+
+       * keymap.c (Fdefine_key): Fix non-prefix key error message when
+       last character M-[char] is translated to ESC [char] (bug#7541).
+
+2011-08-02  Kenichi Handa  <handa@m17n.org>
+
+       * lisp.h (uniprop_table): Extern it.
+
+       * chartab.c (uniprop_table): Make it non-static.
+
+2011-08-01  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (forward_to_next_line_start): Accept additional argument
+       BIDI_IT_PREV, and store into it the state of the bidi iterator had
+       on the newline.
+       (reseat_at_next_visible_line_start): Use the bidi iterator state
+       returned by forward_to_next_line_start to restore the state of
+       it->bidi_it after backing up to previous newline.  (Bug#9212)
+
+2011-07-30  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * regex.c (re_comp): Protoize.
+       (re_exec): Fix return type.
+       (regexec): Fix type of `ret'.  (Bug#9203)
+
+2011-07-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
+       This is needed if max-image-size is a floating-point number.
+
 2011-07-28  Andreas Schwab  <schwab@linux-m68k.org>
 
        * print.c (print_object): Print empty symbol as ##.
index 697ebb92856f903ceb66897d3314ddf616c4556e..ae5143b37e00631bf850ca068185e26c2df4f4e3 100644 (file)
@@ -792,6 +792,7 @@ bidi_init_it (EMACS_INT charpos, EMACS_INT bytepos, int frame_window_p,
     bidi_it->prev_for_neutral.orig_type = UNKNOWN_BT;
   bidi_it->sor = L2R;   /* FIXME: should it be user-selectable? */
   bidi_it->disp_pos = -1;      /* invalid/unknown */
+  bidi_it->disp_prop_p = 0;
   /* We can only shrink the cache if we are at the bottom level of its
      "stack".  */
   if (bidi_cache_start == 0)
@@ -874,14 +875,16 @@ bidi_char_at_pos (EMACS_INT bytepos, const unsigned char *s, int unibyte)
    covered characters as a single character u+FFFC, and return their
    combined length in CH_LEN and NCHARS.  DISP_POS specifies the
    character position of the next display string, or -1 if not yet
-   computed.  When the next character is at or beyond that position,
-   the function updates DISP_POS with the position of the next display
-   string.  STRING->s is the C string to iterate, or NULL if iterating
-   over a buffer or a Lisp string; in the latter case, STRING->lstring
-   is the Lisp string.  */
+   computed.  DISP_PROP_P non-zero means that there's really a display
+   string at DISP_POS, as opposed to when we searched till DISP_POS
+   without findingone.  When the next character is at or beyond that
+   position, the function updates DISP_POS with the position of the
+   next display string.  STRING->s is the C string to iterate, or NULL
+   if iterating over a buffer or a Lisp string; in the latter case,
+   STRING->lstring is the Lisp string.  */
 static inline int
 bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos,
-                struct bidi_string_data *string,
+                int *disp_prop_p, struct bidi_string_data *string,
                 int frame_window_p, EMACS_INT *ch_len, EMACS_INT *nchars)
 {
   int ch;
@@ -894,7 +897,8 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos,
   if (charpos < endpos && charpos > *disp_pos)
     {
       SET_TEXT_POS (pos, charpos, bytepos);
-      *disp_pos = compute_display_string_pos (&pos, string, frame_window_p);
+      *disp_pos = compute_display_string_pos (&pos, string, frame_window_p,
+                                             disp_prop_p);
     }
 
   /* Fetch the character at BYTEPOS.  */
@@ -904,8 +908,9 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos,
       *ch_len = 1;
       *nchars = 1;
       *disp_pos = endpos;
+      *disp_prop_p = 0;
     }
-  else if (charpos >= *disp_pos)
+  else if (charpos >= *disp_pos && *disp_prop_p)
     {
       EMACS_INT disp_end_pos;
 
@@ -972,10 +977,12 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos,
 
   /* If we just entered a run of characters covered by a display
      string, compute the position of the next display string.  */
-  if (charpos + *nchars <= endpos && charpos + *nchars > *disp_pos)
+  if (charpos + *nchars <= endpos && charpos + *nchars > *disp_pos
+      && *disp_prop_p)
     {
       SET_TEXT_POS (pos, charpos + *nchars, bytepos + *ch_len);
-      *disp_pos = compute_display_string_pos (&pos, string, frame_window_p);
+      *disp_pos = compute_display_string_pos (&pos, string, frame_window_p,
+                                             disp_prop_p);
     }
 
   return ch;
@@ -1083,6 +1090,7 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p)
       int ch;
       EMACS_INT ch_len, nchars;
       EMACS_INT pos, disp_pos = -1;
+      int disp_prop_p = 0;
       bidi_type_t type;
       const unsigned char *s;
 
@@ -1130,7 +1138,8 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p)
        bytepos = pstartbyte;
        if (!string_p)
          pos = BYTE_TO_CHAR (bytepos);
-       ch = bidi_fetch_char (bytepos, pos, &disp_pos, &bidi_it->string,
+       ch = bidi_fetch_char (bytepos, pos, &disp_pos, &disp_prop_p,
+                             &bidi_it->string,
                              bidi_it->frame_window_p, &ch_len, &nchars);
        type = bidi_get_type (ch, NEUTRAL_DIR);
 
@@ -1157,7 +1166,8 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it, int no_default_p)
                && bidi_at_paragraph_end (pos, bytepos) >= -1)
              break;
            /* Fetch next character and advance to get past it.  */
-           ch = bidi_fetch_char (bytepos, pos, &disp_pos, &bidi_it->string,
+           ch = bidi_fetch_char (bytepos, pos, &disp_pos,
+                                 &disp_prop_p, &bidi_it->string,
                                  bidi_it->frame_window_p, &ch_len, &nchars);
            pos += nchars;
            bytepos += ch_len;
@@ -1290,6 +1300,7 @@ bidi_resolve_explicit_1 (struct bidi_it *bidi_it)
       bidi_it->ch_len = 1;
       bidi_it->nchars = 1;
       bidi_it->disp_pos = (string_p ? bidi_it->string.schars : ZV);
+      bidi_it->disp_prop_p = 0;
     }
   else
     {
@@ -1297,8 +1308,8 @@ bidi_resolve_explicit_1 (struct bidi_it *bidi_it)
         display string, treat the entire run of covered characters as
         a single character u+FFFC.  */
       curchar = bidi_fetch_char (bidi_it->bytepos, bidi_it->charpos,
-                                &bidi_it->disp_pos, &bidi_it->string,
-                                bidi_it->frame_window_p,
+                                &bidi_it->disp_pos, &bidi_it->disp_prop_p,
+                                &bidi_it->string, bidi_it->frame_window_p,
                                 &bidi_it->ch_len, &bidi_it->nchars);
     }
   bidi_it->ch = curchar;
@@ -2032,12 +2043,13 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
       struct bidi_string_data bs = bidi_it->string;
       bidi_type_t chtype;
       int fwp = bidi_it->frame_window_p;
+      int dpp = bidi_it->disp_prop_p;
 
       if (bidi_it->nchars <= 0)
        abort ();
       do {
-       ch = bidi_fetch_char (bpos += clen, cpos += nc, &disp_pos, &bs, fwp,
-                             &clen, &nc);
+       ch = bidi_fetch_char (bpos += clen, cpos += nc, &disp_pos, &dpp, &bs,
+                             fwp, &clen, &nc);
        if (ch == '\n' || ch == BIDI_EOB /* || ch == LINESEP_CHAR */)
          chtype = NEUTRAL_B;
        else
index efe23eca83f87a5566103dd20a9ff24fb32b2c57..fb72004356e4537d68683beb3a2f94c3de46c8f2 100644 (file)
@@ -1310,7 +1310,7 @@ uniprop_get_encoder (Lisp_Object table)
    function may load a Lisp file and thus may cause
    garbage-collection.  */
 
-static Lisp_Object
+Lisp_Object
 uniprop_table (Lisp_Object prop)
 {
   Lisp_Object val, table, result;
index dc44c6981642a7bdfedbe7e56e67232a4e741dff..2e245479a81182fab8028c5358a8b2966ad730d8 100644 (file)
@@ -1868,6 +1868,8 @@ struct bidi_it {
   bidi_dir_t paragraph_dir;    /* current paragraph direction */
   EMACS_INT separator_limit;   /* where paragraph separator should end */
   EMACS_INT disp_pos;          /* position of display string after ch */
+  int disp_prop_p;             /* if non-zero, there really is a
+                                  `display' property/string at disp_pos */
   unsigned first_elt : 1;      /* if non-zero, examine current char first */
   unsigned new_paragraph : 1;  /* if non-zero, we expect a new paragraph */
   unsigned frame_window_p : 1; /* non-zero if displaying on a GUI frame */
@@ -3035,7 +3037,8 @@ extern Lisp_Object lookup_glyphless_char_display (int, struct it *);
 extern int calc_pixel_width_or_height (double *, struct it *, Lisp_Object,
                                        struct font *, int, int *);
 extern EMACS_INT compute_display_string_pos (struct text_pos *,
-                                            struct bidi_string_data *, int);
+                                            struct bidi_string_data *,
+                                            int, int *);
 extern EMACS_INT compute_display_string_end (EMACS_INT,
                                             struct bidi_string_data *);
 
index fb1d825fa5484a8a0aa236978bc9ae00761d44b8..d1091aec6f319320f1ccb732c889e65c0315c021 100644 (file)
@@ -1053,9 +1053,13 @@ check_image_size (struct frame *f, int width, int height)
            && height <= XINT (Vmax_image_size));
   else if (FLOATP (Vmax_image_size))
     {
-      xassert (f);
-      w = FRAME_PIXEL_WIDTH (f);
-      h = FRAME_PIXEL_HEIGHT (f);
+      if (f != NULL)
+       {
+         w = FRAME_PIXEL_WIDTH (f);
+         h = FRAME_PIXEL_HEIGHT (f);
+       }
+      else
+       w = h = 1024;  /* Arbitrary size for unknown frame. */
       return (width <= XFLOAT_DATA (Vmax_image_size) * w
              && height <= XFLOAT_DATA (Vmax_image_size) * h);
     }
index 0169276bef9e26c93c28124cbac426e9f1eccec1..c461fdddbbc4486cce657a21b89a68c786b852fa 100644 (file)
@@ -1216,13 +1216,20 @@ binding KEY to DEF is added at the front of KEYMAP.  */)
 
       keymap = get_keymap (cmd, 0, 1);
       if (!CONSP (keymap))
-       /* We must use Fkey_description rather than just passing key to
-          error; key might be a vector, not a string.  */
-       error ("Key sequence %s starts with non-prefix key %s",
-              SDATA (Fkey_description (key, Qnil)),
-              SDATA (Fkey_description (Fsubstring (key, make_number (0),
-                                                   make_number (idx)),
-                                       Qnil)));
+       {
+         const char *trailing_esc = ((EQ (c, meta_prefix_char) && metized)
+                                     ? (idx == 0 ? "ESC" : " ESC")
+                                     : "");
+
+         /* We must use Fkey_description rather than just passing key to
+            error; key might be a vector, not a string.  */
+         error ("Key sequence %s starts with non-prefix key %s%s",
+                SDATA (Fkey_description (key, Qnil)),
+                SDATA (Fkey_description (Fsubstring (key, make_number (0),
+                                                     make_number (idx)),
+                                         Qnil)),
+                trailing_esc);
+       }
     }
 }
 
index 1e141dbb5d09eb54e96bbe70b819c420f9c6b0d2..d82307b4332ab3310213eb67e58be40dca2f9345 100644 (file)
@@ -2861,6 +2861,7 @@ extern void map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Ob
                                        Lisp_Object, Lisp_Object,
                                        Lisp_Object, struct charset *,
                                        unsigned, unsigned);
+extern Lisp_Object uniprop_table (Lisp_Object);
 extern void syms_of_chartab (void);
 
 /* Defined in print.c */
index 862f848976c3a98981041358f723ecf4d1024f40..545a198acd7b93b0567a1295cdf4cf93c4b11bce 100644 (file)
@@ -6381,8 +6381,7 @@ char *
    regcomp/regexec below without link errors.  */
 weak_function
 # endif
-re_comp (s)
-    const char *s;
+re_comp (const char *s)
 {
   reg_errcode_t ret;
 
@@ -6421,7 +6420,7 @@ re_comp (s)
 }
 
 
-regoff_t
+int
 # ifdef _LIBC
 weak_function
 # endif
@@ -6558,7 +6557,7 @@ reg_errcode_t
 regexec (const regex_t *__restrict preg, const char *__restrict string,
         size_t nmatch, regmatch_t pmatch[__restrict_arr], int eflags)
 {
-  reg_errcode_t ret;
+  regoff_t ret;
   struct re_registers regs;
   regex_t private_preg;
   size_t len = strlen (string);
index b7c0d61b6334185627e08e098e43459f68640ff9..98c4a39195384b0b9c89117d96c4e74b5af37296 100644 (file)
@@ -1439,7 +1439,7 @@ x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
 
    Nominally, highlight colors for `3d' faces are calculated by
    brightening an object's color by a constant scale factor, but this
-   doesn't yield good results for dark colors, so for colors who's
+   doesn't yield good results for dark colors, so for colors whose
    brightness is less than this value (on a scale of 0-255) have to
    use an additional additive factor.
 
@@ -1618,8 +1618,9 @@ x_setup_relief_colors (struct glyph_string *s)
 
 static void
 w32_draw_relief_rect (struct frame *f,
-                     int left_x, int top_y, int right_x, int bottom_y, int width,
-                     int raised_p, int top_p, int bot_p, int left_p, int right_p,
+                     int left_x, int top_y, int right_x, int bottom_y,
+                     int width, int raised_p,
+                     int top_p, int bot_p, int left_p, int right_p,
                      RECT *clip_rect)
 {
   int i;
@@ -1880,7 +1881,8 @@ x_draw_image_relief (struct glyph_string *s)
   if (s->hl == DRAW_IMAGE_SUNKEN
       || s->hl == DRAW_IMAGE_RAISED)
     {
-      thick = tool_bar_button_relief >= 0 ? tool_bar_button_relief : DEFAULT_TOOL_BAR_BUTTON_RELIEF;
+      thick = tool_bar_button_relief >= 0 ? tool_bar_button_relief
+       : DEFAULT_TOOL_BAR_BUTTON_RELIEF;
       raised_p = s->hl == DRAW_IMAGE_RAISED;
     }
   else
@@ -3486,7 +3488,7 @@ my_destroy_window (struct frame * f, HWND hwnd)
 
 /* Create a scroll bar and return the scroll bar vector for it.  W is
    the Emacs window on which to create the scroll bar. TOP, LEFT,
-   WIDTH and HEIGHT are.the pixel coordinates and dimensions of the
+   WIDTH and HEIGHT are the pixel coordinates and dimensions of the
    scroll bar. */
 
 static struct scroll_bar *
@@ -3872,7 +3874,7 @@ w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg,
          si.fMask = SIF_POS;
          si.nPos = y;
          /* Remember apparent position (we actually lag behind the real
-            position, so don't set that directly.  */
+            position, so don't set that directly).  */
          last_scroll_bar_drag_pos = y;
 
          SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, FALSE);
@@ -4771,7 +4773,7 @@ w32_read_socket (struct terminal *terminal, int expected,
       pending_autoraise_frame = 0;
     }
 
-  /* Check which frames are still visisble, if we have enqueued any user
+  /* Check which frames are still visible, if we have enqueued any user
      events or been notified of events that may affect visibility.  We
      do this here because there doesn't seem to be any direct
      notification from Windows that the visibility of a window has
index 84c75bd91d99af31bac5de6ec9326bef00dc5a88..fa4b3c4f9ab10925976b85eeb13de2d22ce85f52 100644 (file)
@@ -899,7 +899,7 @@ static void init_to_row_start (struct it *, struct window *,
 static int init_to_row_end (struct it *, struct window *,
                             struct glyph_row *);
 static void back_to_previous_line_start (struct it *);
-static int forward_to_next_line_start (struct it *, int *);
+static int forward_to_next_line_start (struct it *, int *, struct bidi_it *);
 static struct text_pos string_pos_nchars_ahead (struct text_pos,
                                                 Lisp_Object, EMACS_INT);
 static struct text_pos string_pos (EMACS_INT, Lisp_Object);
@@ -3134,13 +3134,10 @@ next_overlay_change (EMACS_INT pos)
   return endpos;
 }
 
-/* Record one cached display string position found recently by
-   compute_display_string_pos.  */
-static EMACS_INT cached_disp_pos;
-static EMACS_INT cached_prev_pos = -1;
-static struct buffer *cached_disp_buffer;
-static int cached_disp_modiff;
-static int cached_disp_overlay_modiff;
+/* How many characters forward to search for a display property or
+   display string.  Enough for a screenful of 100 lines x 50
+   characters in a line.  */
+#define MAX_DISP_SCAN 5000
 
 /* Return the character position of a display string at or after
    position specified by POSITION.  If no display string exists at or
@@ -3152,57 +3149,33 @@ static int cached_disp_overlay_modiff;
    on a GUI frame.  */
 EMACS_INT
 compute_display_string_pos (struct text_pos *position,
-                           struct bidi_string_data *string, int frame_window_p)
+                           struct bidi_string_data *string,
+                           int frame_window_p, int *disp_prop_p)
 {
   /* OBJECT = nil means current buffer.  */
   Lisp_Object object =
     (string && STRINGP (string->lstring)) ? string->lstring : Qnil;
-  Lisp_Object pos, spec;
+  Lisp_Object pos, spec, limpos;
   int string_p = (string && (STRINGP (string->lstring) || string->s));
   EMACS_INT eob = string_p ? string->schars : ZV;
   EMACS_INT begb = string_p ? 0 : BEGV;
   EMACS_INT bufpos, charpos = CHARPOS (*position);
+  EMACS_INT lim =
+    (charpos < eob - MAX_DISP_SCAN) ? charpos + MAX_DISP_SCAN : eob;
   struct text_pos tpos;
   struct buffer *b;
 
+  *disp_prop_p = 1;
+
   if (charpos >= eob
       /* We don't support display properties whose values are strings
         that have display string properties.  */
       || string->from_disp_str
       /* C strings cannot have display properties.  */
       || (string->s && !STRINGP (object)))
-    return eob;
-
-  /* Check the cached values.  */
-  if (!STRINGP (object))
     {
-      if (NILP (object))
-       b = current_buffer;
-      else
-       b = XBUFFER (object);
-      if (b == cached_disp_buffer
-         && BUF_MODIFF (b) == cached_disp_modiff
-         && BUF_OVERLAY_MODIFF (b) == cached_disp_overlay_modiff
-         && !b->clip_changed)
-       {
-         if (cached_prev_pos >= 0
-             && cached_prev_pos < charpos && charpos <= cached_disp_pos)
-           return cached_disp_pos;
-         /* Handle overstepping either end of the known interval.  */
-         if (charpos > cached_disp_pos)
-           cached_prev_pos = cached_disp_pos;
-         else  /* charpos <= cached_prev_pos */
-           cached_prev_pos = max (charpos - 1, 0);
-       }
-
-      /* Record new values in the cache.  */
-      if (b != cached_disp_buffer)
-       {
-         cached_disp_buffer = b;
-         cached_prev_pos = max (charpos - 1, 0);
-       }
-      cached_disp_modiff = BUF_MODIFF (b);
-      cached_disp_overlay_modiff = BUF_OVERLAY_MODIFF (b);
+      *disp_prop_p = 0;
+      return eob;
     }
 
   /* If the character at CHARPOS is where the display string begins,
@@ -3221,22 +3194,24 @@ compute_display_string_pos (struct text_pos *position,
       && handle_display_spec (NULL, spec, object, Qnil, &tpos, bufpos,
                              frame_window_p))
     {
-      if (!STRINGP (object))
-       cached_disp_pos = charpos;
       return charpos;
     }
 
   /* Look forward for the first character with a `display' property
      that will replace the underlying text when displayed.  */
+  limpos = make_number (lim);
   do {
-    pos = Fnext_single_char_property_change (pos, Qdisplay, object, Qnil);
+    pos = Fnext_single_char_property_change (pos, Qdisplay, object, limpos);
     CHARPOS (tpos) = XFASTINT (pos);
+    if (CHARPOS (tpos) >= lim)
+      {
+       *disp_prop_p = 0;
+       break;
+      }
     if (STRINGP (object))
       BYTEPOS (tpos) = string_char_to_byte (object, CHARPOS (tpos));
     else
       BYTEPOS (tpos) = CHAR_TO_BYTE (CHARPOS (tpos));
-    if (CHARPOS (tpos) >= eob)
-      break;
     spec = Fget_char_property (pos, Qdisplay, object);
     if (!STRINGP (object))
       bufpos = CHARPOS (tpos);
@@ -3244,8 +3219,6 @@ compute_display_string_pos (struct text_pos *position,
           || !handle_display_spec (NULL, spec, object, Qnil, &tpos, bufpos,
                                    frame_window_p));
 
-  if (!STRINGP (object))
-    cached_disp_pos = CHARPOS (tpos);
   return CHARPOS (tpos);
 }
 
@@ -5494,6 +5467,9 @@ back_to_previous_line_start (struct it *it)
    continuously over the text).  Otherwise, don't change the value
    of *SKIPPED_P.
 
+   If BIDI_IT_PREV is non-NULL, store into it the state of the bidi
+   iterator on the newline, if it was found.
+
    Newlines may come from buffer text, overlay strings, or strings
    displayed via the `display' property.  That's the reason we can't
    simply use find_next_newline_no_quit.
@@ -5506,7 +5482,8 @@ back_to_previous_line_start (struct it *it)
    leads to wrong cursor motion.  */
 
 static int
-forward_to_next_line_start (struct it *it, int *skipped_p)
+forward_to_next_line_start (struct it *it, int *skipped_p,
+                           struct bidi_it *bidi_it_prev)
 {
   EMACS_INT old_selective;
   int newline_found_p, n;
@@ -5518,6 +5495,8 @@ forward_to_next_line_start (struct it *it, int *skipped_p)
       && it->c == '\n'
       && CHARPOS (it->position) == IT_CHARPOS (*it))
     {
+      if (it->bidi_p && bidi_it_prev)
+       *bidi_it_prev = it->bidi_it;
       set_iterator_to_next (it, 0);
       it->c = 0;
       return 1;
@@ -5539,6 +5518,8 @@ forward_to_next_line_start (struct it *it, int *skipped_p)
       if (!get_next_display_element (it))
        return 0;
       newline_found_p = it->what == IT_CHARACTER && it->c == '\n';
+      if (newline_found_p && it->bidi_p && bidi_it_prev)
+       *bidi_it_prev = it->bidi_it;
       set_iterator_to_next (it, 0);
     }
 
@@ -5573,6 +5554,8 @@ forward_to_next_line_start (struct it *it, int *skipped_p)
                 && !newline_found_p)
            {
              newline_found_p = ITERATOR_AT_END_OF_LINE_P (it);
+             if (newline_found_p && it->bidi_p && bidi_it_prev)
+               *bidi_it_prev = it->bidi_it;
              set_iterator_to_next (it, 0);
            }
        }
@@ -5696,8 +5679,9 @@ static void
 reseat_at_next_visible_line_start (struct it *it, int on_newline_p)
 {
   int newline_found_p, skipped_p = 0;
+  struct bidi_it bidi_it_prev;
 
-  newline_found_p = forward_to_next_line_start (it, &skipped_p);
+  newline_found_p = forward_to_next_line_start (it, &skipped_p, &bidi_it_prev);
 
   /* Skip over lines that are invisible because they are indented
      more than the value of IT->selective.  */
@@ -5708,7 +5692,8 @@ reseat_at_next_visible_line_start (struct it *it, int on_newline_p)
       {
        xassert (IT_BYTEPOS (*it) == BEGV
                 || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n');
-       newline_found_p = forward_to_next_line_start (it, &skipped_p);
+       newline_found_p =
+         forward_to_next_line_start (it, &skipped_p, &bidi_it_prev);
       }
 
   /* Position on the newline if that's what's requested.  */
@@ -5724,11 +5709,14 @@ reseat_at_next_visible_line_start (struct it *it, int on_newline_p)
                  --IT_STRING_BYTEPOS (*it);
                }
              else
-               /* Setting this flag will cause
-                  bidi_move_to_visually_next not to advance, but
-                  instead deliver the current character (newline),
-                  which is what the ON_NEWLINE_P flag wants.  */
-               it->bidi_it.first_elt = 1;
+               {
+                 /* We need to restore the bidi iterator to the state
+                    it had on the newline, and resync the IT's
+                    position with that.  */
+                 it->bidi_it = bidi_it_prev;
+                 IT_STRING_CHARPOS (*it) = it->bidi_it.charpos;
+                 IT_STRING_BYTEPOS (*it) = it->bidi_it.bytepos;
+               }
            }
        }
       else if (IT_CHARPOS (*it) > BEGV)
@@ -5738,9 +5726,14 @@ reseat_at_next_visible_line_start (struct it *it, int on_newline_p)
              --IT_CHARPOS (*it);
              --IT_BYTEPOS (*it);
            }
-         /* With bidi iteration, the call to `reseat' will cause
-            bidi_move_to_visually_next deliver the current character,
-            the newline, instead of advancing.  */
+         else
+           {
+             /* We need to restore the bidi iterator to the state it
+                had on the newline and resync IT with that.  */
+             it->bidi_it = bidi_it_prev;
+             IT_CHARPOS (*it) = it->bidi_it.charpos;
+             IT_BYTEPOS (*it) = it->bidi_it.bytepos;
+           }
          reseat (it, it->current.pos, 0);
        }
     }