1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00

auto upstream

This commit is contained in:
Joakim Verona 2013-03-26 16:14:01 +01:00
commit 48c226c2c2
203 changed files with 3510 additions and 81948 deletions

View File

@ -1,3 +1,27 @@
2013-03-25 Jan Djärv <jan.h.d@swipnet.se>
* configure.ac (HAVE_XKB): Define if Xkb is present.
2013-03-24 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:
2013-03-21 sys_select, sys_time: port 2013-01-30 fix to Cygwin
2013-03-18 Paul Eggert <eggert@cs.ucla.edu>
Fix bug when building Emacs with a GNU Make submake (Bug#13962).
* Makefile.in (QUIET_SUBMAKE): New macro.
(install-info, uninstall): Use it.
Emacs crashes with ImageMagick 6.8.2-3 through 6.8.3-9 (Bug#13867).
* configure.ac (IMAGEMAGICK_MODULE): Reject 6.8.2.
We want to reject 6.8.2-3 through 6.8.3-9, but there seems to be
no way to do this in pkg-config, so make do with a reasonable
approximation.
Automate the build of ja-dic.el (Bug#13984).
* .bzrignore: Add leim/ja-dic/.
2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
File synchronization fixes (Bug#13944).

View File

@ -67,6 +67,10 @@ CDPATH=
# If Make doesn't predefine MAKE, set it here.
@SET_MAKE@
# Prevent submakes from outputting "Entering directory ..." and
# "Leaving directory..." diagnostics that would mess up 'make echo-info'.
QUIET_SUBMAKE = MAKELEVEL=0
# ==================== Things `configure' Might Edit ====================
cache_file = @cache_file@
@ -609,7 +613,9 @@ install-info: info
[ -f dir ] || \
(cd $${thisdir}; \
${INSTALL_DATA} ${srcdir}/info/dir $(DESTDIR)${infodir}/dir) ; \
info_misc=`cd $${thisdir}/doc/misc; ${MAKE} -s echo-info`; \
info_misc=`cd $${thisdir}/doc/misc && \
$(QUIET_SUBMAKE) $(MAKE) -s echo-info \
`; \
cd ${srcdir}/info ; \
for elt in ${INFO_NONMISC} $${info_misc}; do \
test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \
@ -702,7 +708,7 @@ uninstall:
done
-rm -rf $(DESTDIR)${libexecdir}/emacs/${version}
thisdir=`/bin/pwd`; \
(info_misc=`cd doc/misc; ${MAKE} -s echo-info`; \
(info_misc=`cd doc/misc && $(QUIET_SUBMAKE) $(MAKE) -s echo-info`; \
if cd $(DESTDIR)${infodir}; then \
for elt in ${INFO_NONMISC} $${info_misc}; do \
(cd $${thisdir}; \

View File

@ -1,3 +1,18 @@
2013-03-18 Paul Eggert <eggert@cs.ucla.edu>
* notes/unicode: Mention some more iso-2022-7bit files (Bug#13936).
Automate the build of ja-dic.el (Bug#13984).
* notes/unicode: ja-dic.el is now UTF-8.
2013-03-16 Glenn Morris <rgm@gnu.org>
* admin.el (manual-pdf, manual-dvi): Pass -I to texi2pdf, texi2dvi.
2013-03-16 Glenn Morris <rgm@gnu.org>
* admin.el (manual-html-mono, manual-html-node): Add -DWWW_GNU_ORG.
2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
File synchronization fixes (Bug#13944).

View File

@ -285,6 +285,7 @@ This function also edits the HTML files so that they validate as
HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
the @import directive."
(call-process "makeinfo" nil nil nil
"-D" "WWW_GNU_ORG"
"-I" (expand-file-name "../emacs"
(file-name-directory texi-file))
"-I" (expand-file-name "../misc"
@ -310,6 +311,7 @@ the @import directive."
(unless (file-exists-p texi-file)
(error "Manual file %s not found" texi-file))
(call-process "makeinfo" nil nil nil
"-D" "WWW_GNU_ORG"
"-I" (expand-file-name "../emacs"
(file-name-directory texi-file))
"-I" (expand-file-name "../misc"
@ -354,12 +356,22 @@ the @import directive."
(defun manual-pdf (texi-file dest)
"Run texi2pdf on TEXI-FILE, emitting plaintext output to DEST."
(call-process "texi2pdf" nil nil nil texi-file "-o" dest))
(call-process "texi2pdf" nil nil nil
"-I" (expand-file-name "../emacs"
(file-name-directory texi-file))
"-I" (expand-file-name "../misc"
(file-name-directory texi-file))
texi-file "-o" dest))
(defun manual-dvi (texi-file dest ps-dest)
"Run texi2dvi on TEXI-FILE, emitting dvi output to DEST.
Also generate PostScript output in PS-DEST."
(call-process "texi2dvi" nil nil nil texi-file "-o" dest)
(call-process "texi2dvi" nil nil nil
"-I" (expand-file-name "../emacs"
(file-name-directory texi-file))
"-I" (expand-file-name "../misc"
(file-name-directory texi-file))
texi-file "-o" dest)
(call-process "dvips" nil nil nil dest "-o" ps-dest)
(call-process "gzip" nil nil nil dest)
(call-process "gzip" nil nil nil ps-dest))

View File

@ -50,7 +50,7 @@ The list returned is sorted by oldest-first."
(call-process "bzr" nil t nil "status" "-v")
(goto-char (point-min))
(when (re-search-forward "^conflicts:\n" nil t)
(error "You still have unresolved conflicts"))
(user-error "You still have unresolved conflicts"))
(let ((merges ())
found)
(if (not (re-search-forward "^pending merges:\n" nil t))
@ -62,7 +62,7 @@ The list returned is sorted by oldest-first."
(setq found
(not (equal "unknown" (match-string 1)))))))
found)
(error "You still have uncommitted changes"))
(user-error "You still have uncommitted changes"))
;; This is really stupid, but it seems there's no easy way to figure
;; out which revisions have been merged already. The only info I can
;; find is the "pending merges" from "bzr status -v", which is not
@ -171,7 +171,7 @@ Type `y' to skip this revision,
(enable-local-eval nil))
(find-file-noselect file))
(if (buffer-modified-p)
(error "Unsaved changes in %s" (current-buffer)))
(user-error "Unsaved changes in %s" (current-buffer)))
(save-excursion
(cond
((derived-mode-p 'change-log-mode)
@ -323,7 +323,7 @@ Does not make other difference."
BEWARE! Important metadata is kept in this Emacs session!
Do not commit without re-running `M-x bzrmerge' first!"
:warning bzrmerge-warning-buffer))
(error "Resolve conflicts manually")))))
(user-error "Resolve conflicts manually")))))
(cons merge skip)))))
(defun bzrmerge (from)

View File

@ -170,11 +170,9 @@ nontrivial changes to the build process.
* japanese-iso-8bit
SKK-JISYO.L is a verbatim copy of a file taken from an external source.
ja-dic.el is generated automatically by skkdic-convert; this process
hasn't been converted to use UTF-8.
It hasn't been converted to UTF-8.
leim/SKK-DIC/SKK-JISYO.L
leim/ja-dic/ja-dic.el
* japanese-shift-jis
@ -192,11 +190,35 @@ nontrivial changes to the build process.
* iso-2022-7bit
This file contains significant charset information, which is not
encoded in UTF-8.
This file switches between CJK charsets, which is not encoded in UTF-8.
etc/HELLO
Each of these files contains just one CJK charset, but Emacs
currently has no easy way to specify set-charset-priority on a
per-file basis, so converting any of these files to UTF-8 might
change the file's appearance when viewed by an Emacs that is
operating in some other language environment.
etc/tutorials/TUTORIAL.ja
etc/tutorials/TUTORIAL.ko
leim/quail/cyril-jis.el
leim/quail/hanja-jis.el
leim/quail/hanja.el
leim/quail/hanja3.el
leim/quail/japanese.el
leim/quail/py-punct.el
leim/quail/pypunct-b5.el
leim/quail/symbol-ksc.el
lisp/international/ja-dic-cnv.el
lisp/international/ja-dic-utl.el
lisp/international/kinsoku.el
lisp/international/kkc.el
lisp/international/titdic-cnv.el
lisp/language/japan-util.el
lisp/language/japanese.el
lisp/term/x-win.el
These files contain characters that cannot be encoded in UTF-8.
leim/quail/tibetan.el

View File

@ -1106,6 +1106,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if XIM is available */
#undef HAVE_XIM
/* Define to 1 if you have the Xkb extension. */
#undef HAVE_XKB
/* Define to 1 if you have the XkbGetKeyboard function. */
#undef HAVE_XKBGETKEYBOARD

6
autogen/configure vendored
View File

@ -10636,6 +10636,9 @@ $as_echo "$emacs_xkb" >&6; }
$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
$as_echo "#define HAVE_XKB 1" >>confdefs.h
fi
for ac_func in XrmSetDatabase XScreenResourceString \
@ -10785,7 +10788,8 @@ if test "${HAVE_X11}" = "yes"; then
## 6.2.8 is the earliest version known to work, but earlier versions
## might work - let us know if you find one.
## 6.0.7 does not work. See bug#7955.
IMAGEMAGICK_MODULE="Wand >= 6.2.8"
## 6.8.2 makes Emacs crash; see Bug#13867.
IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
succeeded=no

View File

@ -1824,6 +1824,7 @@ if test "${HAVE_X11}" = "yes"; then
AC_MSG_RESULT($emacs_xkb)
if test $emacs_xkb = yes; then
AC_DEFINE(HAVE_XKBGETKEYBOARD, 1, [Define to 1 if you have the XkbGetKeyboard function.])
AC_DEFINE(HAVE_XKB, 1, [Define to 1 if you have the Xkb extension.])
fi
AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \
@ -1882,7 +1883,8 @@ if test "${HAVE_X11}" = "yes"; then
## 6.2.8 is the earliest version known to work, but earlier versions
## might work - let us know if you find one.
## 6.0.7 does not work. See bug#7955.
IMAGEMAGICK_MODULE="Wand >= 6.2.8"
## 6.8.2 makes Emacs crash; see Bug#13867.
IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :)
AC_SUBST(IMAGEMAGICK_CFLAGS)
AC_SUBST(IMAGEMAGICK_LIBS)

View File

@ -1,3 +1,22 @@
2013-03-17 Paul Eggert <eggert@cs.ucla.edu>
doc: convert some TeX accents to UTF-8
* ack.texi (Acknowledgments):
* emacs.texi (Acknowledgments):
Convert some TeX accents (e.g., '@l{}') to UTF-8 (e.g., 'ł').
Apparently the TeX accents cause problems when generating gnu.org
web pages, e.g., @l{} is rendered as '/l' on
<http://www.gnu.org/software/emacs/manual/html_node/
emacs/Acknowledgments.html>.
2013-03-16 Glenn Morris <rgm@gnu.org>
* emacs.texi (Top): Add some stuff specific to www.gnu.org.
2013-03-16 Glenn Morris <rgm@gnu.org>
* Version 24.3 released.
2013-03-04 Paul Eggert <eggert@cs.ucla.edu>
Prefer UTF-8 for documentation.

View File

@ -166,7 +166,7 @@ David M. Brown wrote @file{array.el}, for editing arrays and other
tabular data.
@item
W@l{}odek Bzyl and Ryszard Kubiak wrote @file{ogonek.el}, a package for
Włodek Bzyl and Ryszard Kubiak wrote @file{ogonek.el}, a package for
changing the encoding of Polish characters.
@item
@ -605,7 +605,7 @@ files and running a PostScript interpreter interactively from within
Emacs.
@item
Karel Klí@v{c} contributed SELinux support, for preserving the
Karel Klíč contributed SELinux support, for preserving the
Security-Enhanced Linux context of files on backup and copy.
@item
@ -635,7 +635,7 @@ R. Dodd. He also wrote @file{ls-lisp.el}, a Lisp emulation of the
program.
@item
David K@ringaccent{a}gedal wrote @file{tempo.el}, providing support for
David Kågedal wrote @file{tempo.el}, providing support for
easy insertion of boilerplate text and other common constructions.
@item
@ -694,7 +694,7 @@ directory-local variables; and the @code{info-finder} feature that
creates a virtual Info manual of package keywords.
@item
Károly L@H{o}rentey wrote the ``multi-terminal'' code, which allows
Károly Lőrentey wrote the ``multi-terminal'' code, which allows
Emacs to run on graphical and text terminals simultaneously.
@item
@ -1224,7 +1224,7 @@ Olaf Sylvester wrote @file{bs.el}, a package for manipulating Emacs
buffers.
@item
Tibor @v{S}imko and Milan Zamazal wrote @file{slovak.el}, support for
Tibor Šimko and Milan Zamazal wrote @file{slovak.el}, support for
editing text in Slovak language.
@item

View File

@ -111,10 +111,21 @@ Cover art by Etienne Suvasa; cover design by Matt Lee.
@top The Emacs Editor
Emacs is the extensible, customizable, self-documenting real-time
display editor. This Info file describes how to edit with Emacs and
display editor. This manual describes how to edit with Emacs and
some of the ways to customize it; it corresponds to GNU Emacs version
@value{EMACSVER}.
@ifset WWW_GNU_ORG
@html
The homepage for GNU Emacs is at
<a href="/software/emacs/">http://www.gnu.org/software/emacs/</a>.<br>
To view this manual in other formats, click
<a href="/software/emacs/manual/emacs.html">here</a>.<br>
You can also purchase a printed copy from the
<a href="http://shop.fsf.org/product/emacs-manual/">FSF store</a>.
@end html
@end ifset
@ifinfo
If you are reading this in Emacs, type @kbd{h} to read a basic
introduction to the Info documentation system.
@ -1359,7 +1370,7 @@ Berry, Anna M. Bigatti, Ray Blaak, Martin Blais, Jim Blandy, Johan
Bockgård, Jan Böcker, Joel Boehland, Lennart Borgman, Per Bothner,
Terrence Brannon, Frank Bresz, Peter Breton, Emmanuel Briot, Kevin
Broadey, Vincent Broman, Michael Brouwer, David M. Brown, Stefan Bruda,
Georges Brun-Cottan, Joe Buehler, Scott Byer, W@l{}odek Bzyl,
Georges Brun-Cottan, Joe Buehler, Scott Byer, Włodek Bzyl,
Bill Carpenter, Per Cederqvist, Hans Chalupsky, Chris Chase, Bob
Chassell, Andrew Choi, Chong Yidong, Sacha Chua, Stewart Clamen, James
Clark, Mike Clarkson, Glynn Clements, Andrew Cohen, Daniel Colascione,
@ -1392,14 +1403,14 @@ Josefsson, Alexandre Julliard, Arne Jørgensen, Tomoji Kagatani,
Brewster Kahle, Tokuya Kameshima, Lute Kamstra, Ivan Kanis, David
Kastrup, David Kaufman, Henry Kautz, Taichi Kawabata, Taro Kawagishi,
Howard Kaye, Michael Kifer, Richard King, Peter Kleiweg, Karel
Klí@v{c}, Shuhei Kobayashi, Pavel Kobyakov, Larry K. Kolodney, David
Klíč, Shuhei Kobayashi, Pavel Kobyakov, Larry K. Kolodney, David
M. Koppelman, Koseki Yoshinori, Robert Krawitz, Sebastian Kremer,
Ryszard Kubiak, Igor Kuzmin, David Kågedal, Daniel LaLiberte, Karl
Landstrom, Mario Lang, Aaron Larson, James R. Larus, Vinicius Jose
Latorre, Werner Lemberg, Frederic Lepied, Peter Liljenberg, Christian
Limpach, Lars Lindberg, Chris Lindblad, Anders Lindgren, Thomas Link,
Juri Linkov, Francis Litterio, Sergey Litvinov, Emilio C. Lopes,
Martin Lorentzon, Dave Love, Eric Ludlam, Károly L@H{o}rentey, Sascha
Martin Lorentzon, Dave Love, Eric Ludlam, Károly Lőrentey, Sascha
Lüdecke, Greg McGary, Roland McGrath, Michael McNamara, Alan Mackenzie,
Christopher J. Madsen, Neil M. Mager, Ken Manheimer, Bill Mann,
Brian Marick, Simon Marshall, Bengt Martensson, Charlie Martin,
@ -1430,7 +1441,7 @@ Philippe Schnoebelen, Jan Schormann, Alex Schroeder, Stefan Schoef,
Rainer Schoepf, Raymond Scholz, Eric Schulte, Andreas Schwab, Randal
Schwartz, Oliver Seidel, Manuel Serrano, Paul Sexton, Hovav Shacham,
Stanislav Shalunov, Marc Shapiro, Richard Sharman, Olin Shivers, Tibor
@v{S}imko, Espen Skoglund, Rick Sladkey, Lynn Slater, Chris Smith,
Šimko, Espen Skoglund, Rick Sladkey, Lynn Slater, Chris Smith,
David Smith, Paul D. Smith, Wilson Snyder, William Sommerfeld, Simon
South, Andre Spiegel, Michael Staats, Thomas Steffen, Ulf Stegemann,
Reiner Steib, Sam Steingold, Ake Stenhoff, Peter Stephenson, Ken

View File

@ -1,3 +1,11 @@
2013-03-16 Glenn Morris <rgm@gnu.org>
* emacs-lisp-intro.texi: Add some stuff specific to www.gnu.org.
2013-03-16 Glenn Morris <rgm@gnu.org>
* Version 24.3 released.
2013-03-03 Glenn Morris <rgm@gnu.org>
* emacs-lisp-intro.texi (Digression into C): Update example.

View File

@ -227,6 +227,14 @@ This is an @cite{Introduction to Programming in Emacs Lisp}, for
people who are not programmers.
@sp 1
Edition @value{edition-number}, @value{update-date}
@ifset WWW_GNU_ORG
@html
<p>The homepage for GNU Emacs is at
<a href="http://www.gnu.org/software/emacs/">http://www.gnu.org/software/emacs/</a>.
<br>To view this manual in other formats, click
<a href="/software/emacs/emacs-lisp-intro/emacs-lisp-intro.html">here</a>.
@end html
@end ifset
@sp 1
Copyright @copyright{} 1990--1995, 1997, 2001--2013 Free Software
Foundation, Inc.

View File

@ -1,3 +1,24 @@
2013-03-24 Eli Zaretskii <eliz@gnu.org>
* compile.texi (Byte-Code Objects): Add index entry.
(Disassembly): Add cross-references.
2013-03-23 Eli Zaretskii <eliz@gnu.org>
* frames.texi (Size Parameters): More accurate description of the
difference between 'fullboth' and 'maximized'. (Bug#13935)
2013-03-17 Christopher Schmidt <christopher@ch.ristopher.com>
* symbols.texi (Standard Properties): Document pure. (Bug#13823)
2013-03-16 Glenn Morris <rgm@gnu.org>
* elisp.texi: Add some stuff specific to www.gnu.org.
2013-03-16 Glenn Morris <rgm@gnu.org>
* Version 24.3 released.
2013-03-11 Teodor Zlatanov <tzz@lifelogs.com>
* control.texi (Pattern matching case statement): Fix typo.

View File

@ -514,6 +514,7 @@ one you intend to suppress.
@section Byte-Code Function Objects
@cindex compiled function
@cindex byte-code function
@cindex byte-code object
Byte-compiled functions have a special data type: they are
@dfn{byte-code function objects}. Whenever such an object appears as
@ -606,8 +607,9 @@ name of an existing buffer. Then the output goes there, at point, and
point is left before the output.
The argument @var{object} can be a function name, a lambda expression
or a byte-code object. If it is a lambda expression, @code{disassemble}
compiles it and disassembles the resulting compiled code.
(@pxref{Lambda Expressions}), or a byte-code object (@pxref{Byte-Code
Objects}). If it is a lambda expression, @code{disassemble} compiles
it and disassembles the resulting compiled code.
@end deffn
Here are two examples of using the @code{disassemble} function. We

View File

@ -97,6 +97,16 @@ This is edition @value{VERSION} of the @cite{GNU Emacs Lisp Reference Manual},@*
This is the @cite{GNU Emacs Lisp Reference Manual}
@end ifnottex
corresponding to Emacs version @value{EMACSVER}.
@ifset WWW_GNU_ORG
@html
<p>The homepage for GNU Emacs is at
<a href="/software/emacs/">http://www.gnu.org/software/emacs/</a>.<br>
For information on using Emacs, refer to
the <a href="/software/emacs/manual/html_node/emacs/index.html">Emacs
Manual</a>.<br> To view this manual in other formats,
click <a href="/software/emacs/manual/elisp.html">here</a>.
@end html
@end ifset
Copyright @copyright{} 1990--1996, 1998--2013 Free Software Foundation, Inc.

View File

@ -539,8 +539,9 @@ deleted from the local value of a hook variable when changing major
modes. @xref{Setting Hooks}.
@item pure
This property is used internally to mark certain named functions for
byte compiler optimization. Do not set it.
If the value is non-@code{nil}, the named function is considered to be
side-effect free. Calls with constant arguments can be evaluated at
compile time. This may shift run time errors to compile time.
@item risky-local-variable
If the value is non-@code{nil}, the named variable is considered risky

View File

@ -1,3 +1,17 @@
2013-03-18 Michael Albinus <michael.albinus@gmx.de>
* tramp.texi (Filename Syntax): Host names are not allowed to be
any method name, unless method name is specified explicitly.
Remove restriction on unibyte filenames.
* trampver.texi: Update release number.
2013-03-17 Paul Eggert <eggert@cs.ucla.edu>
doc: convert some TeX accents to UTF-8
* emacs-mime.texi (Interface Functions): Use 'ï' rather than
'@"{@dotless{i}}'.
2013-03-15 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.2.7.

View File

@ -1221,7 +1221,7 @@ Return the value of the field under point.
@item mail-encode-encoded-word-region
@findex mail-encode-encoded-word-region
Encode the non-@acronym{ASCII} words in the region. For instance,
@samp{Na@"{@dotless{i}}ve} is encoded as @samp{=?iso-8859-1?q?Na=EFve?=}.
@samp{Naïve} is encoded as @samp{=?iso-8859-1?q?Na=EFve?=}.
@item mail-encode-encoded-word-buffer
@findex mail-encode-encoded-word-buffer
@ -1234,7 +1234,7 @@ Encode the words that need encoding in a string, and return the result.
@example
(mail-encode-encoded-word-string
"This is na@"{@dotless{i}}ve, baby")
"This is naïve, baby")
@result{} "This is =?iso-8859-1?q?na=EFve,?= baby"
@end example
@ -1249,7 +1249,7 @@ Decode the encoded words in the string and return the result.
@example
(mail-decode-encoded-word-string
"This is =?iso-8859-1?q?na=EFve,?= baby")
@result{} "This is na@"{@dotless{i}}ve, baby"
@result{} "This is naïve, baby"
@end example
@end table

View File

@ -2406,13 +2406,18 @@ using the @option{ssh} method to transfer files, and edit
@file{.emacs} in my home directory I would specify the filename
@file{@trampfn{ssh, daniel, melancholia, .emacs}}.
@ifset emacs
A remote filename containing a host name only, which is equal to a
method name, is not allowed. If such a host name is used, it must
always be preceded by an explicit method name, like
@file{@value{prefix}ssh@value{postfixhop}ssh@value{postfix}}.
@end ifset
Finally, for some methods it is possible to specify a different port
number than the default one, given by the method. This is specified
by adding @file{#<port>} to the host name, like in @file{@trampfn{ssh,
daniel, melancholia#42, .emacs}}.
Note that @value{tramp} supports only filenames encoded in unibyte.
@node Alternative Syntax
@section URL-like filename syntax

View 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.7
@set trampver 2.2.8-pre
@c Other flags from configuration
@set instprefix /usr/local

View File

@ -1,3 +1,24 @@
2013-03-21 Eric Ludlam <zappo@gnu.org>
* srecode/ede-autoconf.srt: Change Copyright to FSF.
(ede-empty): Change AC_INIT to use PROJECT_NAME, and
PROJECT_VERSION.
* srecode/ede-make.srt (ede-empty): Add a dependency on :project.
Add header comment specifying the project's relative path.
* srecode/c.srt (header_guard): Upcase the filename symbol.
2013-03-21 Vladimir Kazanov <vkazanov@inbox.ru>
* srecode/java.srt (empty-main): New.
(class-tag): Decapitalize class.
2013-03-18 Paul Eggert <eggert@cs.ucla.edu>
Emacs crashes with ImageMagick 6.8.2-3 through 6.8.3-9 (Bug#13867).
* PROBLEMS: Mention problem with ImageMagick 6.8.2-3 through 6.8.3-9.
2013-03-12 Paul Eggert <eggert@cs.ucla.edu>
Add coding tags for iso-2022-7bit files that are not already tagged.

View File

@ -174,6 +174,12 @@ When toggling, it restores the frame's previous window configuration.
It also has an optional frame argument, which can be used by Lisp
callers to fit the image to a frame other than the selected frame.
** Info
*** New face `info-index-match' is used to highlight matches in index
entries displayed by `Info-index-next', `Info-virtual-index' and
`info-apropos'.
** Isearch
*** `C-x 8 RET' in Isearch mode reads a character by its Unicode name

View File

@ -206,6 +206,10 @@ added a line like this at the beginning of files of Lisp code:
If your tar has this problem, install GNU tar--if you can manage to
untar it :-).
** Emacs can crash when displaying PNG images with transparency.
This is due to a bug introduced in ImageMagick 6.8.2-3. The bug
should be fixed in ImageMagick 6.8.3-10. Please see Bug#13867.
** Crashes when displaying GIF images in Emacs built with version
libungif-4.1.0 are resolved by using version libungif-4.1.0b1.
Configure checks for the correct version, but this problem could occur

View File

@ -46,12 +46,12 @@ template empty :time :user :file :c
template header_guard :file :blank
----
#ifndef {{FILENAME_SYMBOL}}
#define {{FILENAME_SYMBOL}} 1
#ifndef {{FILENAME_SYMBOL:upcase}}
#define {{FILENAME_SYMBOL:upcase}} 1
{{^}}
#endif // {{FILENAME_SYMBOL}}
#endif // {{FILENAME_SYMBOL:upcase}}
----
context misc

View File

@ -1,6 +1,6 @@
;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE.
;;
;; Copyright (C) 2010 Eric M. Ludlam
;; Copyright (C) 2010, 2013 Free Software Foundation, Inc.
;;
;; Author: Eric M. Ludlam <eric@siege-engine.com>
;;
@ -26,7 +26,7 @@ set application "ede"
context file
template ede-empty
template ede-empty :project
"Start a new EDE generated configure.in/ac file."
----
{{comment_prefix}} Automatically Generated/Maintained {{FILE}} by EDE.
@ -40,7 +40,7 @@ template ede-empty
{{comment_prefix}}
{{comment_prefix}} Process this file with autoconf to produce a configure script
AC_INIT({{TEST_FILE}})
AC_INIT({{PROJECT_NAME}}, {{PROJECT_VERSION}})
AM_INIT_AUTOMAKE([{{PROGRAM}}], 0)
AM_CONFIG_HEADER(config.h)

View File

@ -26,10 +26,11 @@ set application "ede"
context file
template ede-empty :file
template ede-empty :file :project
----
# Automatically Generated {{FILE}} by EDE.
# For use with: {{MAKETYPE}}
# Relative File Name: {{PROJECT_FILENAME}}
#
# DO NOT MODIFY THIS FILE OR YOUR CHANGES MAY BE LOST.
# EDE is the Emacs Development Environment.

View File

@ -43,6 +43,23 @@ package {{FILENAME_AS_PACKAGE}};
----
bind "e"
template empty-main :file :user :time :java :indent
"Fill out an empty file with a class having a static main method"
sectiondictionary "CLASSSECTION"
set NAME macro "FILENAME_AS_CLASS"
----
{{>:filecomment}}
package {{FILENAME_AS_PACKAGE}};
{{<CLASSSECTION:declaration:class}}
public static void main(String args[]) {
{{^}}
}
{{/CLASSSECTION}}
----
bind "l"
context declaration
template import :blank :indent
@ -74,8 +91,8 @@ Override this to affect applications, or the outer class structure for
the user-facing template."
----
{{>:declaration:javadoc-class}}
public Class {{?NAME}} {{#PARENTS}}{{#FIRST}}extends {{/FIRST}}{{#NOTFIRST}}implements {{/NOTFIRST}}{{NAME}}{{/PARENTS}}
{
public class {{?NAME}} {{#PARENTS}}{{#FIRST}}extends {{/FIRST}}{{#NOTFIRST}}implements {{/NOTFIRST}}{{NAME}}{{/PARENTS}}
{
{{^}}
};
----

View File

@ -1,3 +1,38 @@
2013-03-20 Paul Eggert <eggert@cs.ucla.edu>
* Makefile.in ($(srcdir)/ja-dic/ja-dic.el): Use batch-skkdic-convert.
2013-03-18 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in ($(srcdir)/ja-dic/ja-dic.el): New target.
2013-03-18 Paul Eggert <eggert@cs.ucla.edu>
Automate the build of ja-dic.el (Bug#13984).
ja-dic.el no longer needs to be in the repository: it's now
generated as part of the build from bzr. Also, update SKK-JISYO.L to
match the upstream source exactly.
* ja-dic/ja-dic.el: Remove from repository. It is still distributed
as part of the Emacs tarball.
* Makefile.in ($(srcdir)/ja-dic/ja-dic.el): New rule.
(compile-main): Depend on it.
* SKK-DIC/README: Update to reflect new build procedure.
* SKK-DIC/SKK-JISYO.L: Update to match source exactly.
This is now the annotated version, to match the upstream file name;
the unannotated one is built from it automatically.
2013-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
* quail/latin-ltx.el: Resolve conflicts (bug#13950).
(latin-ltx--mark-map, latin-ltx--mark-re): New constants.
(latin-ltx--define-rules): Check for conflicts. Eval `re's.
(rules): Use tighter regexps to avoid conflicts.
Consolidate the various rules for combining marks.
2013-03-16 Glenn Morris <rgm@gnu.org>
* Version 24.3 released.
2013-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
* quail/latin-ltx.el: Add greek superscripts.

View File

@ -144,6 +144,12 @@ leim-list.el: ${TIT_MISC} ${srcdir}/leim-ext.el
fi
sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@
$(srcdir)/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
@$(MKDIR_P) $(srcdir)/ja-dic
$(RUN_EMACS) -batch -l $(buildlisppath)/international/ja-dic-cnv \
-f batch-skkdic-convert -dir "$(srcdir)/ja-dic" \
"$(srcdir)/SKK-DIC/SKK-JISYO.L"
## Following adapted from lisp/Makefile.in.
setwins=wins="${srcdir}/ja-dic quail"; \
[ `cd ${srcdir} && /bin/pwd` != `/bin/pwd` ] && \
@ -156,7 +162,7 @@ compile-targets: $(TARGETS)
# Compile all the Elisp files that need it. Beware: it approximates
# `no-byte-compile', so watch out for false-positives!
.PHONY: compile-main
compile-main: ${TIT_MISC}
compile-main: ${TIT_MISC} $(srcdir)/ja-dic/ja-dic.el
@($(setwins); \
els=`echo "$$wins " | sed -e 's| |/*.el |g'`; \
for el in $$els; do \

View File

@ -1,4 +1,6 @@
The file SKK-JISYO.L is renamed from SKK-JISYO.L.unannotated which is
distributed at http://openlab.ring.gr.jp/skk/skk/dic/.
SKK-JISYO.L.unannotated is free software distributed under the terms
This directory contains a copy of the following file:
http://openlab.ring.gr.jp/skk/skk/dic/SKK-JISYO.L
This file is free software distributed under the terms
of the GNU General Public License.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -189,6 +189,13 @@ $(MISC_DIC):
$(ARGQUOTE)$(buildlisppath)/international/quail$(ARGQUOTE) \
-f batch-byte-compile $(MISC_DIC:.elc=.el)
# Rule to generate ja-dic/ja-dic.el from SKK-DIC/SKK-JISYO.L.
$(srcdir)/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
- mkdir ja-dic
$(RUN_EMACS) -l \
$(ARGQUOTE)$(buildlisppath)/international/ja-dic-cnv$(ARGQUOTE) \
-f batch-skkdic-convert -dir ja-dic $(srcdir)/SKK-DIC/SKK-JISYO.L
#
# WARNING: Do NOT split the parts inside $(ARGQUOTE)s into multiple lines as
# this can break with GNU Make 3.81 and later if sh.exe is used.

View File

@ -43,6 +43,26 @@ system, including many technical ones. Examples:
t t nil nil nil nil nil nil nil t)
(eval-when-compile
(require 'cl-lib)
(defconst latin-ltx--mark-map
'(("DOT BELOW" . "d")
("DOT ABOVE" . ".")
("OGONEK" . "k")
("CEDILLA" . "c")
("CARON" . "v")
;; ("HOOK ABOVE" . ??)
("MACRON" . "=")
("BREVE" . "u")
("TILDE" . "~")
("GRAVE" . "`")
("CIRCUMFLEX" . "^")
("DIAERESIS" . "\"")
("DOUBLE ACUTE" . "H")
("ACUTE" . "'")))
(defconst latin-ltx--mark-re (regexp-opt (mapcar #'car latin-ltx--mark-map)))
(defun latin-ltx--ascii-p (char)
(and (characterp char) (< char 128)))
@ -53,7 +73,8 @@ system, including many technical ones. Examples:
(pcase rule
(`(,_ ,(pred characterp)) (push rule newrules)) ;; Normal quail rule.
(`(,seq ,re)
(let ((count 0))
(let ((count 0)
(re (eval re t)))
(dolist (pair (ucs-names))
(let ((name (car pair))
(char (cdr pair)))
@ -68,9 +89,27 @@ system, including many technical ones. Examples:
(push (list x char) newrules))
(setq count (1+ count))
(push (list keys char) newrules))))))
;(message "latin-ltx: %d mapping for %S" count re)
;; (message "latin-ltx: %d mappings for %S" count re)
))))
`(quail-define-rules ,@(nreverse (delete-dups newrules))))))
(setq newrules (delete-dups newrules))
(let ((rules (copy-sequence newrules)))
(while rules
(let ((rule (pop rules)))
(when (assoc (car rule) rules)
(let ((conflicts (list (cadr rule)))
(tail rules)
c)
(while (setq c (assoc (car rule) tail))
(push (cadr c) conflicts)
(setq tail (cdr (memq c tail)))
(setq rules (delq c rules)))
(message "Conflict for %S: %S"
(car rule) (apply #'string conflicts)))))))
(let ((inputs (mapcar #'car newrules)))
(setq inputs (delete-dups inputs))
(message "latin-ltx: %d rules (+ %d conflicts)!"
(length inputs) (- (length newrules) (length inputs))))
`(quail-define-rules ,@(nreverse newrules)))))
(latin-ltx--define-rules
("!`" )
@ -89,69 +128,35 @@ system, including many technical ones. Examples:
("$^o$" )
("?`" ?¿)
("\\`" )
("\\`{}" ?`)
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\`{%s}" c) (format "\\`%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH GRAVE")
(let* ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name)))
(mark1 (cdr (assoc (match-string 3 name) latin-ltx--mark-map)))
(mark2 (if (match-end 4)
(cdr (assoc (match-string 4 name) latin-ltx--mark-map))))
(marks (if mark2 (concat mark1 "\\" mark2) mark1)))
(cl-assert mark1)
(cons (format "\\%s{%s}" marks c)
;; Exclude "d" because we use "\\dh" for something else.
(unless (member (or mark2 mark1) '("d"));; "k"
(list (format "\\%s%s" marks c))))))
(concat "\\`LATIN \\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH \\("
latin-ltx--mark-re "\\)\\(?: AND \\("
latin-ltx--mark-re "\\)\\)?\\'"))
("\\'" )
("\\'{}" ?´)
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\'{%s}" c) (format "\\'%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH ACUTE")
(let* ((mark (cdr (assoc (match-string 1 name) latin-ltx--mark-map))))
(cl-assert mark)
(list (format "\\%s" mark))))
(concat "\\`COMBINING \\(" latin-ltx--mark-re "\\)\\(?: ACCENT\\)?\\'"))
("\\^" )
("\\^{}" ?^)
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\^{%s}" c) (format "\\^%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH CIRCUMFLEX")
("\\~" )
("\\~{}" ?˜)
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\~{%s}" c) (format "\\~%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH TILDE")
("\\\"" )
("\\\"{}" )
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\\"{%s}" c) (format "\\\"%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH DIAERESIS")
("\\k" )
("\\k{}" ?˛)
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\k{%s}" c) ;; (format "\\k%s" c)
)))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH OGONEK")
("\\c" )
("\\c{}" ?¸)
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\c{%s}" c) (format "\\c%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH CEDILLA")
(unless (latin-ltx--ascii-p char)
(let* ((mark (cdr (assoc (match-string 1 name) latin-ltx--mark-map))))
(cl-assert mark)
(list (format "\\%s{}" mark)))))
(concat "\\`\\(?:SPACING \\)?\\(" latin-ltx--mark-re "\\)\\(?: ACCENT\\)?\\'"))
("\\AA" ) ;; ("{\\AA}" ?Å)
("\\AE" ) ;; ("{\\AE}" ?Æ)
@ -166,42 +171,6 @@ system, including many technical ones. Examples:
("$\\div$" ) ("\\div" )
("\\o" ) ;; ("{\\o}" ?ø)
("\\=" )
("\\={}" )
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\={%s}" c) (format "\\=%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH MACRON")
("\\u" )
("\\u{}" )
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\u{%s}" c) (format "\\u%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH BREVE")
("\\." )
("\\.{}" )
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\.{%s}" c) (format "\\.%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH DOT ABOVE")
("\\v" )
("\\v{}" )
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\v{%s}" c) (format "\\v%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH CARON")
("\\~{\\i}" )
("\\={\\i}" )
("\\u{\\i}" )
@ -214,12 +183,6 @@ system, including many technical ones. Examples:
("\\H" )
("\\H{}" )
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\H{%s}" c) (format "\\H%s" c))))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH DOUBLE ACUTE")
("\\U{o}" ) ("\\Uo" ) ;; FIXME: Was it just a typo?
("\\OE" ) ;; ("{\\OE}" ?Œ)
@ -248,19 +211,11 @@ system, including many technical ones. Examples:
(string (if (match-end 2) ?^ ?_) basechar))))
"\\(.*\\)SU\\(?:B\\|\\(PER\\)\\)SCRIPT \\(.*\\)")
((lambda (name char)
((lambda (name _char)
(let* ((basename (match-string 2 name))
(lbase (format "LATIN %s LETTER %s"
(match-string 1 name) basename))
(gbase (format "GREEK %s LETTER %s"
(match-string 1 name) basename))
tmp)
(cond
((assoc gbase (ucs-names)) (concat "^\\" (downcase basename)))
((latin-ltx--ascii-p (setq tmp (cdr (assoc lbase (ucs-names)))))
(string ?^ tmp))
(t (message "Unknown modifier letter %s" basename)))))
"MODIFIER LETTER \\(SMALL\\|CAPITAL\\) \\(.*\\)")
(name (if (match-end 1) (capitalize basename) (downcase basename))))
(concat "^" (if (> (length name) 1) "\\") name)))
"\\`MODIFIER LETTER \\(?:SMALL\\|CAPITA\\(L\\)\\) \\([[:ascii:]]+\\)\\'")
;; ((lambda (name char) (format "^%s" (downcase (match-string 1 name))))
;; "\\`MODIFIER LETTER SMALL \\(.\\)\\'")
@ -272,22 +227,14 @@ system, including many technical ones. Examples:
("\\b" )
("\\d" )
;; ("\\d{}" ?) ;; FIXME: can't find the DOT BELOW character.
((lambda (name char)
(let ((c (if (match-end 1)
(downcase (match-string 2 name))
(match-string 2 name))))
(list (format "\\d{%s}" c) ;; (format "\\d%s" c)
)))
"\\(?:CAPITAL\\|SMAL\\(L\\)\\) LETTER \\(.\\) WITH DOT BELOW")
("\\rq" ?)
;; FIXME: Provides some useful entries (yen, euro, copyright, registered,
;; currency, minus, micro), but also a lot of dubious ones.
((lambda (name char)
(unless (latin-ltx--ascii-p char)
(unless (or (latin-ltx--ascii-p char)
;; We prefer COMBINING LONG SOLIDUS OVERLAY for \not.
(member name '("NOT SIGN")))
(concat "\\" (downcase (match-string 1 name)))))
"\\`\\([^- ]+\\) SIGN\\'")
@ -377,7 +324,6 @@ system, including many technical ones. Examples:
("\\circledcirc" ?⊚)
("\\circleddash" ?⊝)
("\\clubsuit" ?♣)
("\\colon" ?:) ;FIXME: Conflict with "COLON SIGN" ₡.
("\\coloneq" ?≔)
("\\complement" ?∁)
("\\cong" ?≅)
@ -400,7 +346,6 @@ system, including many technical ones. Examples:
("\\ddots" ?⋱)
("\\diamond" ?⋄)
("\\diamondsuit" ?♢)
("\\digamma" ?Ϝ)
("\\divideontimes" ?⋇)
("\\doteq" ?≐)
("\\doteqdot" ?≑)

View File

@ -1,3 +1,23 @@
2013-03-26 Eli Zaretskii <eliz@gnu.org>
Fix incompatibilities between MinGW.org and MinGW64 headers.
* ntlib.c (struct timespec) [!_TIMEZONE_DEFINED]: Define the
struct only if _TIMEZONE_DEFINED is not defined.
2013-03-23 cg <chengang31@gmail.com> (tiny change)
* makefile.w32-in (LIB_SRC): Move before first use.
2013-03-16 Paul Eggert <eggert@cs.ucla.edu>
* pop.c: Fix ERRMAX typo (Bug#13925).
(socket_connection) [!HAVE_KRB5_ERROR_TEXT && HAVE_KRB5_ERROR_E_TEXT]:
Use ERROR_MAX, not ERRMAX.
2013-03-16 Glenn Morris <rgm@gnu.org>
* Version 24.3 released.
2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
File synchronization fixes (Bug#13944).
@ -6,8 +26,8 @@
* emacsclient.c (main): Use fdatasync, not fsync, since we don't
care about metadata. Keep trying if interrupted.
* movemail.c (main, popmail): Don't worry about BSD_SYSTEM, since
fsync is available everywhere (or there is a substitute). Don't
report an error if fsync returns EINVAL.
fsync is available everywhere (or there is a substitute).
Don't report an error if fsync returns EINVAL.
Static checking by Sun C 5.12.
* etags.c (analyse_regex): Omit unreachable code.
@ -5182,7 +5202,7 @@
(longopts): New long options without short counterpart are
globals, members, no-globals, no-members. Regexp options are now
defined conditionally to ETAGS_REGEXPS.
(print_help): Updated.
(print_help): Update.
1997-05-22 Francesco Potortì <F.Potorti@cnuce.cnr.it>

View File

@ -27,6 +27,7 @@ LOCAL_FLAGS = -DNO_LDAV=1 -DNO_ARCHIVES=1 -I../lib \
-I../nt/inc -I../src $(EMACS_EXTRA_C_FLAGS)
LIBS = $(BASE_LIBS) $(ADVAPI32)
LIB_SRC = .
# The following target is used by makefile.w32-in files in other directories.
make-docfile: $(BLD)/make-docfile.exe
@ -360,7 +361,6 @@ TAGS: $(BLD)/etags.exe *.c *.h
### DEPENDENCIES ###
EMACS_ROOT = ..
LIB_SRC = .
SRC = $(EMACS_ROOT)/src
NT_INC = $(EMACS_ROOT)/nt/inc
GNU_LIB = $(EMACS_ROOT)/lib

View File

@ -34,11 +34,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "ntlib.h"
/* MinGW64 defines _TIMEZONE_DEFINED and defines 'struct timespec' in
its system headers. */
#ifndef _TIMEZONE_DEFINED
struct timezone
{
int tz_minuteswest; /* minutes west of Greenwich */
int tz_dsttime; /* type of dst correction */
};
#endif
#define MAXPATHLEN _MAX_PATH

View File

@ -1198,7 +1198,7 @@ socket_connection (char *host, int flags)
}
#elif defined HAVE_KRB5_ERROR_E_TEXT
if (err_ret && err_ret->e_text && **err_ret->e_text)
snprintf (pop_error + pop_error_len, ERRMAX - pop_error_len,
snprintf (pop_error + pop_error_len, ERROR_MAX - pop_error_len,
" [server says '%s']", *err_ret->e_text);
#endif
if (err_ret)

View File

@ -21,23 +21,27 @@
/* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h>
both include <sys/select.h>.
On Cygwin, <sys/time.h> includes <sys/select.h>.
Simply delegate to the system's header in this case. */
#if (@HAVE_SYS_SELECT_H@ \
&& ((defined __osf__ && defined _SYS_TYPES_H_ && defined _OSF_SOURCE) \
&& ((defined __osf__ && defined _SYS_TYPES_H_ \
&& !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \
&& defined _OSF_SOURCE) \
|| (defined __sun && defined _SYS_TYPES_H \
&& (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
|| defined __EXTENSIONS__))) \
&& !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H)
|| defined __EXTENSIONS__))))
# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H
# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
#elif (@HAVE_SYS_SELECT_H@ \
&& ((defined __osf__ && defined _SYS_TIME_H_ && defined _OSF_SOURCE) \
&& (defined _CYGWIN_SYS_TIME_H \
|| (defined __osf__ && defined _SYS_TIME_H_ \
&& !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \
&& defined _OSF_SOURCE) \
|| (defined __sun && defined _SYS_TIME_H \
&& (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
|| defined __EXTENSIONS__))) \
&& !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H)
|| defined __EXTENSIONS__))))
# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H
# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@

View File

@ -24,6 +24,14 @@
#endif
@PRAGMA_COLUMNS@
/* On Cygwin, <sys/time.h> includes itself recursively via <sys/select.h>.
Simply delegate to the system's header in this case; it is a no-op.
Without this extra ifdef, the C++ gettimeofday declaration below
would be a forward declaration in gnulib's nested <sys/time.h>. */
#ifdef _CYGWIN_SYS_TIME_H
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
#else
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_SYS_TIME_H@
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
@ -200,4 +208,5 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
#endif
#endif /* _@GUARD_PREFIX@_SYS_TIME_H */
#endif /* _CYGWIN_SYS_TIME_H */
#endif /* _@GUARD_PREFIX@_SYS_TIME_H */

View File

@ -1,3 +1,269 @@
2013-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
* desktop.el (desktop--v2s): Rename from desktop-internal-v2s.
Change return value to be a sexp. Delay `get-buffer' to after
restoring the desktop (bug#13951).
2013-03-26 Leo Liu <sdl.web@gmail.com>
* register.el: Move semantic tag handling back to
cedet/semantic/senator.el. (Bug#14052)
2013-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
* eshell/em-prompt.el (eshell-emit-prompt): Make sure we can't insert
into the prompt either (bug#13963).
2013-03-25 Stefan Monnier <monnier@iro.umontreal.ca>
* font-lock.el (lisp-font-lock-keywords-2): Don't highlight the "error"
part of "(error-foo)".
2013-03-24 Juri Linkov <juri@jurta.org>
* replace.el (list-matching-lines-prefix-face): New defcustom.
(occur-1): Pass `list-matching-lines-prefix-face' to the function
`occur-engine' if `face-differs-from-default-p' returns t.
(occur-engine): Add `,' inside backquote construct to evaluate
`prefix-face'. Propertize the prefix with the `prefix-face' face.
Pass `prefix-face' to the functions `occur-context-lines' and
`occur-engine-add-prefix'.
(occur-engine-add-prefix, occur-context-lines): Add optional arg
`prefix-face' and propertize the prefix with `prefix-face'.
(Bug#14017)
2013-03-24 Leo Liu <sdl.web@gmail.com>
* nxml/rng-valid.el (rng-validate-while-idle)
(rng-validate-quick-while-idle): Guard against deleted buffer.
(Bug#13999)
* emacs-lisp/edebug.el (edebug-mode): Make sure edebug-kill-buffer
is the last entry in kill-buffer-hook.
* files.el (kill-buffer-hook): Doc fix.
2013-03-23 Dmitry Gutov <dgutov@yandex.ru>
* emacs-lisp/lisp-mode.el (emacs-lisp-docstring-fill-column):
Make it safe-local.
* vc/diff-mode.el (diff-mode-shared-map): Unbind "/" (Bug#14034).
2013-03-23 Leo Liu <sdl.web@gmail.com>
* nxml/nxml-util.el (nxml-with-unmodifying-text-property-changes):
Remove.
* nxml/rng-valid.el (rng-validate-mode)
(rng-after-change-function, rng-do-some-validation):
* nxml/rng-maint.el (rng-validate-buffer):
* nxml/nxml-rap.el (nxml-tokenize-forward, nxml-ensure-scan-up-to-date):
* nxml/nxml-outln.el (nxml-show-all, nxml-set-outline-state):
* nxml/nxml-mode.el (nxml-mode, nxml-degrade, nxml-after-change)
(nxml-extend-after-change-region): Use with-silent-modifications.
* nxml/rng-nxml.el (rng-set-state-after): Do not let-bind
timer-idle-list.
* nxml/rng-valid.el (rng-validate-while-idle-continue-p)
(rng-next-error-1, rng-previous-error-1): Do not let-bind
timer-idle-list. (Bug#13999)
2013-03-23 Juri Linkov <juri@jurta.org>
* info.el (info-index-match): New face.
(Info-index, Info-apropos-matches): Add a nested subgroup to the
main pattern and add text properties with the new face to matches
in index entries relative to the beginning of the index entry.
(Bug#14015)
2013-03-21 Eric Ludlam <zappo@gnu.org>
* eieio/eieio-datadebug.el (data-debug/eieio-insert-slots):
Inhibit read only while inserting objects.
2013-03-22 Teodor Zlatanov <tzz@lifelogs.com>
* progmodes/cfengine.el: Update docs to mention
`cfengine-auto-mode'. Use \_> and \_< instead of \> and \< for
symbol motion. Remove "_" from the word syntax.
2013-03-21 Teodor Zlatanov <tzz@lifelogs.com>
* progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word
syntax for both `cfengine2-mode' and `cfengine3-mode'.
2013-03-20 Juri Linkov <juri@jurta.org>
* info.el (Info-next-reference-or-link)
(Info-prev-reference-or-link): New functions.
(Info-next-reference, Info-prev-reference): Use them.
(Info-try-follow-nearest-node): Handle footnote navigation.
(Info-fontify-node): Fontify footnotes. (Bug#13989)
2013-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (posn-point, posn-string): Fix it here instead (bug#13979).
* mouse.el (mouse-on-link-p): Undo scroll-bar fix.
2013-03-20 Paul Eggert <eggert@cs.ucla.edu>
Suppress unnecessary non-ASCII chatter during build process.
* international/ja-dic-cnv.el (skkdic-collect-okuri-nasi)
(batch-skkdic-convert): Suppress most of the chatter.
It's not needed so much now that machines are faster,
and its non-ASCII component was confusing; see Dmitry Gutov in
<http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00508.html>.
2013-03-20 Leo Liu <sdl.web@gmail.com>
* ido.el (ido-chop): Fix bug#10994.
2013-03-19 Dmitry Gutov <dgutov@yandex.ru>
* whitespace.el (whitespace-font-lock, whitespace-font-lock-mode):
Remove vars.
(whitespace-color-on, whitespace-color-off):
Use `font-lock-fontify-buffer' (Bug#13817).
2013-03-19 Stefan Monnier <monnier@iro.umontreal.ca>
* mouse.el (mouse--down-1-maybe-follows-link): Fix follow-link
remapping in mode-line.
(mouse-on-link-p): Also check [mode-line follow-link] bindings.
2013-03-19 Dmitry Gutov <dgutov@yandex.ru>
* whitespace.el (whitespace-color-on): Use `prepend' OVERRIDE
value for `whitespace-line' face (Bug#13875).
(whitespace-font-lock-keywords): Change description.
(whitespace-color-on): Don't save `font-lock-keywords' value, save
the constructed keywords instead.
(whitespace-color-off): Use `font-lock-remove-keywords' (Bug#13817).
2013-03-19 Leo Liu <sdl.web@gmail.com>
* progmodes/compile.el (compilation-display-error): New command.
(compilation-mode-map, compilation-minor-mode-map): Bind it to
C-o. (Bug#13992)
2013-03-18 Paul Eggert <eggert@cs.ucla.edu>
* term/x-win.el (x-keysym-pair): Add a Fixme (Bug#13936).
2013-03-18 Jan Djärv <jan.h.d@swipnet.se>
* mouse.el (mouse-on-link-p): Check for scroll bar (Bug#13979).
2013-03-18 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-compat.el (tramp-compat-user-error): New defun.
* net/tramp-adb.el (tramp-adb-handle-shell-command):
* net/tramp-gvfs.el (top):
* net/tramp.el (tramp-find-method, tramp-dissect-file-name)
(tramp-handle-shell-command): Use it.
(tramp-dissect-file-name): Raise an error when hostname is a
method name, and neither method nor user is specified.
* net/trampver.el: Update release number.
2013-03-18 Leo Liu <sdl.web@gmail.com>
Make sure eldoc can be turned off properly.
* emacs-lisp/eldoc.el (eldoc-schedule-timer): Conditionalize on
eldoc-mode.
(eldoc-display-message-p): Revert last change.
(eldoc-display-message-no-interference-p)
(eldoc-print-current-symbol-info): Tweak.
2013-03-18 Tassilo Horn <tsdh@gnu.org>
* doc-view.el (doc-view-new-window-function): Check the new window
overlay's display property instead the char property of the
buffer's first char. Use `with-selected-window' instead of
`save-window-excursion' with `select-window'.
(doc-view-document->bitmap): Check the current doc-view overlay's
display property instead the char property of the buffer's first char.
2013-03-18 Paul Eggert <eggert@cs.ucla.edu>
Automate the build of ja-dic.el (Bug#13984).
* international/ja-dic-cnv.el (skkdic-convert): Remove the annotations
from the input, rather than assume that it's been done for us by the
SKK script unannotate.awk. Switch ja-dic.el to UTF-8. Don't put
the current date into a ja-dic.el comment, as that complicates
regression testing.
2013-03-18 Stefan Monnier <monnier@iro.umontreal.ca>
* whitespace.el: Fix double evaluation.
(whitespace-space, whitespace-hspace, whitespace-tab)
(whitespace-newline, whitespace-trailing, whitespace-line)
(whitespace-space-before-tab, whitespace-indentation)
(whitespace-empty, whitespace-space-after-tab): Turn defcustoms into
obsolete defvars.
(whitespace-hspace-regexp): Fix regexp for emacs-unicode.
(whitespace-color-on): Use a single font-lock-add-keywords call.
Fix double-evaluation of face variables.
2013-03-17 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-adb.el (tramp-adb-parse-device-names):
Use `start-process' instead of `call-process'. Otherwise, the
function might be blocked under MS Windows. (Bug#13299)
2013-03-17 Leo Liu <sdl.web@gmail.com>
Extend eldoc to display info in the mode-line. (Bug#13978)
* emacs-lisp/eldoc.el (eldoc-post-insert-mode): New minor mode.
(eldoc-mode-line-string): New variable.
(eldoc-minibuffer-message): New function.
(eldoc-message-function): New variable.
(eldoc-message): Use it.
(eldoc-display-message-p)
(eldoc-display-message-no-interference-p):
Support eldoc-post-insert-mode.
* simple.el (eval-expression-minibuffer-setup-hook): New hook.
(eval-expression): Run it.
2013-03-17 Roland Winkler <winkler@gnu.org>
* emacs-lisp/crm.el (completing-read-multiple): Ignore empty
strings in the list of return values.
2013-03-17 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-ext.el (math-read-number-fancy): Check for an explicit
radix before checking for HMS forms.
2013-03-16 Leo Liu <sdl.web@gmail.com>
* progmodes/scheme.el: Add indentation and font-locking for λ.
(Bug#13975)
2013-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/smie.el (smie-auto-fill): Don't inf-loop if there's no
token before point (bug#13942).
2013-03-16 Leo Liu <sdl.web@gmail.com>
* thingatpt.el (end-of-sexp): Fix bug#13952. Use syntax-after.
2013-03-16 Glenn Morris <rgm@gnu.org>
* Version 24.3 released.
2013-03-16 Eli Zaretskii <eliz@gnu.org>
* startup.el (command-line-normalize-file-name): Fix handling of
backslashes in DOS and Windows file names. Reported by Xue Fuqiao
<xfq.free@gmail.com> in
http://lists.gnu.org/archive/html/help-gnu-emacs/2013-03/msg00245.html.
2013-03-15 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.2.7.
@ -564,6 +830,11 @@
Let-bind `isearch-other-end' to `start', `isearch-forward' to t
and `isearch-error' to nil.
2013-03-16 Fabián Ezequiel Gallina <fgallina@cuca>
* progmodes/python.el (python-info-current-defun):
Enhance match-data cluttering prevention.
2013-02-22 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-tramp-file-p): Fix docstring.

View File

@ -2945,50 +2945,6 @@ If X is not an error form, return 1."
(and x sigma (math-scalarp x) (math-anglep sigma)
(list 'sdev x sigma))))
;; Hours (or degrees)
((or (string-match "^\\([^#^]+\\)[@oOhH]\\(.*\\)$" s)
(string-match "^\\([^#^]+\\)[dD][eE]?[gG]?\\(.*\\)$" s))
(let* ((hours (math-match-substring s 1))
(minsec (math-match-substring s 2))
(hours (math-read-number hours))
(minsec (if (> (length minsec) 0) (math-read-number minsec) 0)))
(and hours minsec
(math-num-integerp hours)
(not (math-negp hours)) (not (math-negp minsec))
(cond ((math-num-integerp minsec)
(and (Math-lessp minsec 60)
(list 'hms hours minsec 0)))
((and (eq (car-safe minsec) 'hms)
(math-zerop (nth 1 minsec)))
(math-add (list 'hms hours 0 0) minsec))
(t nil)))))
;; Minutes
((string-match "^\\([^'#^]+\\)[mM']\\(.*\\)$" s)
(let* ((minutes (math-match-substring s 1))
(seconds (math-match-substring s 2))
(minutes (math-read-number minutes))
(seconds (if (> (length seconds) 0) (math-read-number seconds) 0)))
(and minutes seconds
(math-num-integerp minutes)
(not (math-negp minutes)) (not (math-negp seconds))
(cond ((math-realp seconds)
(and (Math-lessp minutes 60)
(list 'hms 0 minutes seconds)))
((and (eq (car-safe seconds) 'hms)
(math-zerop (nth 1 seconds))
(math-zerop (nth 2 seconds)))
(math-add (list 'hms 0 minutes 0) seconds))
(t nil)))))
;; Seconds
((string-match "^\\([^\"#^]+\\)[sS\"]$" s)
(let ((seconds (math-read-number (math-match-substring s 1))))
(and seconds (math-realp seconds)
(not (math-negp seconds))
(Math-lessp seconds 60)
(list 'hms 0 0 seconds))))
;; Integer+fraction with explicit radix
((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]\\)$" s)
(let ((radix (string-to-number (math-match-substring s 1)))
@ -3061,6 +3017,50 @@ If X is not an error form, return 1."
(let ((digs (math-match-substring s 1)))
(math-read-radix digs 16)))
;; Hours (or degrees)
((or (string-match "^\\([^#^]+\\)[@oOhH]\\(.*\\)$" s)
(string-match "^\\([^#^]+\\)[dD][eE]?[gG]?\\(.*\\)$" s))
(let* ((hours (math-match-substring s 1))
(minsec (math-match-substring s 2))
(hours (math-read-number hours))
(minsec (if (> (length minsec) 0) (math-read-number minsec) 0)))
(and hours minsec
(math-num-integerp hours)
(not (math-negp hours)) (not (math-negp minsec))
(cond ((math-num-integerp minsec)
(and (Math-lessp minsec 60)
(list 'hms hours minsec 0)))
((and (eq (car-safe minsec) 'hms)
(math-zerop (nth 1 minsec)))
(math-add (list 'hms hours 0 0) minsec))
(t nil)))))
;; Minutes
((string-match "^\\([^'#^]+\\)[mM']\\(.*\\)$" s)
(let* ((minutes (math-match-substring s 1))
(seconds (math-match-substring s 2))
(minutes (math-read-number minutes))
(seconds (if (> (length seconds) 0) (math-read-number seconds) 0)))
(and minutes seconds
(math-num-integerp minutes)
(not (math-negp minutes)) (not (math-negp seconds))
(cond ((math-realp seconds)
(and (Math-lessp minutes 60)
(list 'hms 0 minutes seconds)))
((and (eq (car-safe seconds) 'hms)
(math-zerop (nth 1 seconds))
(math-zerop (nth 2 seconds)))
(math-add (list 'hms 0 minutes 0) seconds))
(t nil)))))
;; Seconds
((string-match "^\\([^\"#^]+\\)[sS\"]$" s)
(let ((seconds (math-read-number (math-match-substring s 1))))
(and seconds (math-realp seconds)
(not (math-negp seconds))
(Math-lessp seconds 60)
(list 'hms 0 0 seconds))))
;; Fraction using "/" instead of ":"
((string-match "^\\([0-9]+\\)/\\([0-9/]+\\)$" s)
(math-read-number (concat (math-match-substring s 1) ":"

View File

@ -1,3 +1,180 @@
2013-03-26 Leo Liu <sdl.web@gmail.com>
* semantic/senator.el (senator-copy-tag-to-register): Move
register handling logic from register.el. (Bug#14052)
2013-03-21 Eric Ludlam <zappo@gnu.org>
* semantic.el (navigate-menu): Yank Tag :enable. Make sure
`senator-tag-ring' is bound.
(semantic-parse-region-default): Stop reversing the output of
parse-whole-stream.
(semantic-repeat-parse-whole-stream): Append returned tags
differently, so they come out in the right order.
* semantic/sb.el (semantic-sb-filter-tags-of-class): New option.
(semantic-sb-fetch-tag-table): Filter tags being bucketed to
exclude tags belonging to above filtered classes.
* semantic/find.el (semantic-filter-tags-by-class): New function.
* semantic/tag-ls.el (semantic-tag-similar-p-default): Add
short-circuit in case tag1 and 2 are identical.
* semantic/analyze/fcn.el
(semantic-analyze-dereference-metatype-stack): Use
`semantic-tag-similar-p' instead of 'eq' when comparing two tags
during metatype evaluation in case they are the same, but not the
same node. (Tweaked patch from Tomasz Gajewski) (Tiny change)
* semantic/db-find.el (semanticdb-partial-synchronize): Fix
require to semantic/db-typecache to be correct.
(semanticdb-find-tags-external-children-of-type): Make this a
brutish search by default.
* semantic/sort.el
(semantic-tag-external-member-children-default): When calling
`semanticdb-find-tags-external-children-of-type', pass in the
input tag as the place to start searching for externally defined
methods.
* semantic/db-file.el (semanticdb-default-save-directory): Doc
fix: Add ref to default value.
* semantic/complete.el (semantic-complete-post-command-hook): When
detecting if cursor is outside completion area, do so if cursor
moves before start of overlay, or the original starting location
of the overlay (i.e., if user deletes past beginning of the
overlay region).
(semantic-complete-inline-tag-engine): Initialize original start
of `semantic-complete-inline-overlay'.
* semantic/bovine/c.el (semantic-c-describe-environment): Update
some section titles. Test semanticdb table before printing it.
(semantic-c-reset-preprocessor-symbol-map): Update
`semantic-lex-spp-macro-symbol-obarray' outside the loop over all
the files contributing to its value.
(semantic-c-describe-environment): If there is an EDE project but
no spp symbols from it, say so.
* srecode/args.el (srecode-semantic-handle-:project): New argument
handler. Provide variable values if not in an EDE project.
* srecode/srt-mode.el (srecode-template-mode): Fix typo on srecode
name.
* srecode/cpp.el (srecode-semantic-handle-:c): Replace all
characters in FILENAME_SYMBOL that aren't valid CPP symbol chars.
* srecode/map.el (srecode-map-validate-file-for-mode): Force
semantic to load if it is not active in the template being added
to the map.
* srecode/srt.el: Add local variables for setting the autoload
file name.
(srecode-semantic-handle-:srt): New autoload cookie
* ede.el (ede-apply-preprocessor-map): Apply map to
`semantic-lex-spp-project-macro-symbol-obarray' instead of the
system one. Add require for semantic.
* ede/proj-elisp.el (ede-update-version-in-source): In case a file
has both a version variable and a Version: comment, always use
`call-next-method'.
* ede/cpp-root.el (ede-set-project-variables): Deleted.
`ede-preprocessor-map' does the job this function was attempting
to do with :spp-table.
(ede-preprocessor-map): Update file tests to provide better
messages. Do not try to get symbols from a file that is the file
in the current buffer.
* ede/base.el (ede-project-placeholder): Add more documentation to
:file slot.
(ede-load-cache): Use `insert-file-contents' instead of
`find-file-noselect' in order to avoid activating other tools.
2013-03-21 David Engster <deng@randomsample.de>
* semantic/bovine/c.el (semantic-get-local-variables): Also add a
new variable 'this' if we are in an inline member function. For
detecting this, we check overlays at point if there is a class
spanning the current function. Also, the variable 'this' has to
be a pointer.
* semantic/bovine/gcc.el (semantic-gcc-setup): Fail gracefully
when querying g++ for defines returns an error.
* srecode/srt-mode.el:
* srecode/compile.el:
* semantic/elp.el:
* semantic/db-el.el:
* semantic/complete.el:
* ede.el:
* cogre.el:
* srecode/table.el:
* srecode/mode.el:
* srecode/insert.el:
* srecode/compile.el:
* semantic/decorate/include.el:
* semantic/db.el:
* semantic/adebug.el:
* ede/auto.el:
* srecode/dictionary.el:
* semantic/ede-grammar.el:
* semantic/db.el:
* semantic/db-find.el:
* semantic/db-file.el:
* semantic/complete.el:
* semantic/bovine/c.el:
* semantic/analyze.el:
* ede/util.el:
* ede/proj.el:
* ede/proj-elisp.el:
* ede/pconf.el:
* ede/locate.el:
* ede.el: Adapt to EIEIO namespace cleanup: Rename `object-name'
to `eieio-object-name', `object-set-name-string' to
`eieio-object-set-name-string', `object-class' to
`eieio-object-class', `class-parent' to `eieio-class-parent',
`class-parents' to `eieio-class-parents', `class-children' to
`eieio-class-children', `object-name-string' to
`eieio-object-name-string', `object-class-fast' to
`eieio--object-class'. Also replace direct access with new
accessor functions.
2013-03-21 Tomasz Gajewski <tomga@wp.pl> (tiny change)
* ede/cpp-root.el (ede-project-autoload, initialize-instance): Fix
EDE file symbol to match rename. Fix ede-cpp-root symbol to
include -project in name.
2013-03-21 Alex Ott <alexott@gmail.com>
* cedet-files.el (cedet-files-list-recursively): New. Recursively
find files whose names are matching to given regex
* ede.el (ede-current-project): Rewrite to avoid imperative style.
* ede/files.el (ede-find-file): Simplify code.
* ede/base.el (ede-normalize-file/directory): Add function to
normalize :file or :directory slots if they are missing.
* ede/cpp-root.el (ede-cpp-root-project): Add compile-command
slot.
(project-compile-project): Compiles project using value specified
in :compule-command slot or in compile-command local variable.
Value of slot or local variable could be string or function that
receives project and should return string that will be invoked as
command.
(project-compile-target): Invokes compilation of whole project
* ede/files.el (ede-find-project-root): New function to
find root of project that contains specific file.
(ede-files-find-existing): New function which checks presence of
given directory in the list of registered projects.
2013-03-04 Paul Eggert <eggert@cs.ucla.edu>
* semantic/wisent/wisent.el (wisent): Stick to ASCII in the ASCII art.

View File

@ -88,6 +88,24 @@ specific conversions during tests."
(setq file (concat "//" (substring file 1)))))
file))
(defun cedet-files-list-recursively (dir re)
"Returns list of files in directory matching to given regex"
(when (file-accessible-directory-p dir)
(let ((files (directory-files dir t))
matched)
(dolist (file files matched)
(let ((fname (file-name-nondirectory file)))
(cond
((or (string= fname ".")
(string= fname "..")) nil)
((and (file-regular-p file)
(string-match re fname))
(setq matched (cons file matched)))
((file-directory-p file)
(let ((tfiles (cedet-files-list-recursively file re)))
(when tfiles (setq matched (append matched tfiles)))))))))))
(provide 'cedet-files)
;;; cedet-files.el ends here

View File

@ -330,14 +330,14 @@ Argument MENU-DEF is the menu definition to use."
(easy-menu-create-menu
"Project Forms"
(let* ((obj (ede-current-project))
(class (if obj (object-class obj)))
(class (if obj (eieio-object-class obj)))
(menu nil))
(condition-case err
(progn
(while (and class (slot-exists-p class 'menu))
;;(message "Looking at class %S" class)
(setq menu (append menu (oref class menu))
class (class-parent class))
class (eieio-class-parent class))
(if (listp class) (setq class (car class))))
(append
'( [ "Add Target" ede-new-target (ede-current-project) ]
@ -382,7 +382,7 @@ but can also be used interactively."
(oref proj configuration-default)))))
(oset (ede-current-project) configuration-default newconfig)
(message "%s will now build in %s mode."
(object-name (ede-current-project))
(eieio-object-name (ede-current-project))
newconfig))
(defun ede-customize-forms-menu (menu-def)
@ -727,7 +727,7 @@ Optional argument NAME is the name to give this project."
'name
(let* ((l ede-project-class-files)
(cp (ede-current-project))
(cs (when cp (object-class cp)))
(cs (when cp (eieio-object-class cp)))
(r nil))
(while l
(if cs
@ -779,7 +779,7 @@ Optional argument NAME is the name to give this project."
:targets nil)))
(inits (oref obj initializers)))
;; Force the name to match for new objects.
(object-set-name-string nobj (oref nobj :name))
(eieio-object-set-name-string nobj (oref nobj :name))
;; Handle init args.
(while inits
(eieio-oset nobj (car inits) (car (cdr inits)))
@ -885,7 +885,7 @@ a string \"y\" or \"n\", which answers the y/n question done interactively."
(when (not ede-object)
(error "Can't add %s to target %s: Wrong file type"
(file-name-nondirectory (buffer-file-name))
(object-name target)))
(eieio-object-name target)))
(ede-apply-target-options))
(defun ede-remove-file (&optional force)
@ -979,12 +979,12 @@ Argument PROMPT is the prompt to use when querying the user for a target."
(defmethod project-add-file ((ot ede-target) file)
"Add the current buffer into project project target OT.
Argument FILE is the file to add."
(error "add-file not supported by %s" (object-name ot)))
(error "add-file not supported by %s" (eieio-object-name ot)))
(defmethod project-remove-file ((ot ede-target) fnnd)
"Remove the current buffer from project target OT.
Argument FNND is an argument."
(error "remove-file not supported by %s" (object-name ot)))
(error "remove-file not supported by %s" (eieio-object-name ot)))
(defmethod project-edit-file-target ((ot ede-target))
"Edit the target OT associated with this file."
@ -992,45 +992,45 @@ Argument FNND is an argument."
(defmethod project-new-target ((proj ede-project) &rest args)
"Create a new target. It is up to the project PROJ to get the name."
(error "new-target not supported by %s" (object-name proj)))
(error "new-target not supported by %s" (eieio-object-name proj)))
(defmethod project-new-target-custom ((proj ede-project))
"Create a new target. It is up to the project PROJ to get the name."
(error "New-target-custom not supported by %s" (object-name proj)))
(error "New-target-custom not supported by %s" (eieio-object-name proj)))
(defmethod project-delete-target ((ot ede-target))
"Delete the current target OT from its parent project."
(error "add-file not supported by %s" (object-name ot)))
(error "add-file not supported by %s" (eieio-object-name ot)))
(defmethod project-compile-project ((obj ede-project) &optional command)
"Compile the entire current project OBJ.
Argument COMMAND is the command to use when compiling."
(error "compile-project not supported by %s" (object-name obj)))
(error "compile-project not supported by %s" (eieio-object-name obj)))
(defmethod project-compile-target ((obj ede-target) &optional command)
"Compile the current target OBJ.
Argument COMMAND is the command to use for compiling the target."
(error "compile-target not supported by %s" (object-name obj)))
(error "compile-target not supported by %s" (eieio-object-name obj)))
(defmethod project-debug-target ((obj ede-target))
"Run the current project target OBJ in a debugger."
(error "debug-target not supported by %s" (object-name obj)))
(error "debug-target not supported by %s" (eieio-object-name obj)))
(defmethod project-run-target ((obj ede-target))
"Run the current project target OBJ."
(error "run-target not supported by %s" (object-name obj)))
(error "run-target not supported by %s" (eieio-object-name obj)))
(defmethod project-make-dist ((this ede-project))
"Build a distribution for the project based on THIS project."
(error "Make-dist not supported by %s" (object-name this)))
(error "Make-dist not supported by %s" (eieio-object-name this)))
(defmethod project-dist-files ((this ede-project))
"Return a list of files that constitute a distribution of THIS project."
(error "Dist-files is not supported by %s" (object-name this)))
(error "Dist-files is not supported by %s" (eieio-object-name this)))
(defmethod project-rescan ((this ede-project))
"Rescan the EDE project THIS."
(error "Rescanning a project is not supported by %s" (object-name this)))
(error "Rescanning a project is not supported by %s" (eieio-object-name this)))
(defun ede-ecb-project-paths ()
"Return a list of all paths for all active EDE projects.
@ -1157,18 +1157,15 @@ Optional argument OBJ is an object to find the parent of."
(defun ede-current-project (&optional dir)
"Return the current project file.
If optional DIR is provided, get the project for DIR instead."
(let ((ans nil))
;; If it matches the current directory, do we have a pre-existing project?
(when (and (or (not dir) (string= dir default-directory))
ede-object-project)
(setq ans ede-object-project)
)
;; If it matches the current directory, do we have a pre-existing project?
(let ((proj (when (and (or (not dir) (string= dir default-directory))
ede-object-project)
ede-object-project)))
;; No current project.
(when (not ans)
(if proj
proj
(let* ((ldir (or dir default-directory)))
(setq ans (ede-directory-get-open-project ldir))))
;; Return what we found.
ans))
(ede-directory-get-open-project ldir)))))
(defun ede-buffer-object (&optional buffer projsym)
"Return the target object for BUFFER.
@ -1372,20 +1369,24 @@ and <root>/doc for doc sources."
;; C/C++
(defun ede-apply-preprocessor-map ()
"Apply preprocessor tables onto the current buffer."
;; TODO - what if semantic-mode isn't enabled?
;; what if we never want to load a C mode? Does this matter?
;; Note: This require is needed for the case where EDE ends up
;; in the hook order before Semantic based hooks.
(require 'semantic/lex-spp)
(when (and ede-object
(boundp 'semantic-lex-spp-macro-symbol-obarray)
semantic-lex-spp-macro-symbol-obarray)
(boundp 'semantic-lex-spp-project-macro-symbol-obarray))
(let* ((objs ede-object)
(map (ede-preprocessor-map (if (consp objs)
(car objs)
objs))))
(when map
;; We can't do a require for the below symbol.
(setq semantic-lex-spp-macro-symbol-obarray
(setq semantic-lex-spp-project-macro-symbol-obarray
(semantic-lex-make-spp-table map)))
(when (consp objs)
(message "Choosing preprocessor syms for project %s"
(object-name (car objs)))))))
(eieio-object-name (car objs)))))))
(defmethod ede-system-include-path ((this ede-project))
"Get the system include path used by project THIS."

View File

@ -199,8 +199,8 @@ added. Possible values are:
front of the list so more generic projects don't get priority."
;; First, can we identify PROJAUTO as already in the list? If so, replace.
(let ((projlist ede-project-class-files)
(projname (object-name-string projauto)))
(while (and projlist (not (string= (object-name-string (car projlist)) projname)))
(projname (eieio-object-name-string projauto)))
(while (and projlist (not (string= (eieio-object-name-string (car projlist)) projname)))
(setq projlist (cdr projlist)))
(if projlist

View File

@ -135,7 +135,9 @@ other desired outcome.")
(dirinode :documentation "The inode id for :directory.")
(file :type string
:initarg :file
:documentation "File name where this project is stored.")
:documentation "The File uniquely tagging this project instance.
For some project types, this will be the file that stores the project configuration.
In other projects types, this file is merely a unique identifier to this type of project.")
(rootproject ; :initarg - no initarg, don't save this slot!
:initform nil
:type (or null ede-project-placeholder-child)
@ -350,12 +352,12 @@ All specific project types must derive from this project."
(defun ede-load-cache ()
"Load the cache of EDE projects."
(save-excursion
(let ((cachebuffer nil))
(let ((cachebuffer (get-buffer-create "*ede cache*")))
(condition-case nil
(progn
(setq cachebuffer
(find-file-noselect ede-project-placeholder-cache-file t))
(set-buffer cachebuffer)
(with-current-buffer cachebuffer
(erase-buffer)
(when (file-exists-p ede-project-placeholder-cache-file)
(insert-file-contents ede-project-placeholder-cache-file))
(goto-char (point-min))
(let ((c (read (current-buffer)))
(new nil)
@ -609,6 +611,28 @@ instead of the current project."
(setq cp (ede-parent-project cp)))
cp)))))
;;; Utility functions
;;
(defun ede-normalize-file/directory (this project-file-name)
"Fills :directory or :file slots if they're missing in project THIS.
The other slot will be used to calculate values.
PROJECT-FILE-NAME is a name of project file (short name, like 'pom.xml', etc."
(when (and (or (not (slot-boundp this :file))
(not (oref this :file)))
(slot-boundp this :directory)
(oref this :directory))
(oset this :file (expand-file-name project-file-name (oref this :directory))))
(when (and (or (not (slot-boundp this :directory))
(not (oref this :directory)))
(slot-boundp this :file)
(oref this :file))
(oset this :directory (file-name-directory (oref this :file))))
)
;;; Hooks & Autoloads
;;

View File

@ -242,11 +242,11 @@ ROOTPROJ is nil, since there is only one project."
(ede-add-project-autoload
(ede-project-autoload "cpp-root"
:name "CPP ROOT"
:file 'ede-cpp-root
:file 'ede/cpp-root
:proj-file 'ede-cpp-root-project-file-for-dir
:proj-root 'ede-cpp-root-project-root
:load-type 'ede-cpp-root-load
:class-sym 'ede-cpp-root
:class-sym 'ede-cpp-root-project
:new-p nil
:safe-p t)
;; When a user creates one of these, it should override any other project
@ -272,10 +272,12 @@ ROOTPROJ is nil, since there is only one project."
;; level include paths, and PreProcessor macro tables.
(defclass ede-cpp-root-target (ede-target)
()
((project :initform nil
:initarg :project))
"EDE cpp-root project target.
All directories need at least one target.")
;;;###autoload
(defclass ede-cpp-root-project (ede-project eieio-instance-tracker)
((tracking-symbol :initform 'ede-cpp-root-project-list)
(include-path :initarg :include-path
@ -339,6 +341,15 @@ The function symbol must take two arguments:
It should return the fully qualified file name passed in from NAME. If that file does not
exist, it should return nil."
)
(compile-command :initarg :compile-command
:initform nil
:type (or null string function)
:documentation
"Compilation command that will be used for this project.
It could be string or function that will accept proj argument and should return string.
The string will be passed to 'compuile' function that will be issued in root
directory of project."
)
)
"EDE cpp-root project class.
Each directory needs a project file to control it.")
@ -366,7 +377,7 @@ Each directory needs a project file to control it.")
(when (or (not (file-exists-p f))
(file-directory-p f))
(delete-instance this)
(error ":file for ede-cpp-root must be a file"))
(error ":file for ede-cpp-root-project must be a file"))
(oset this :file f)
(oset this :directory (file-name-directory f))
(ede-project-directory-remove-hash (file-name-directory f))
@ -404,7 +415,8 @@ If one doesn't exist, create a new one for this directory."
:name (file-name-nondirectory
(directory-file-name dir))
:path dir
:source nil))
:source nil
:project proj))
(object-add-to-list proj :targets ans)
)
ans))
@ -481,15 +493,6 @@ This is for project include paths and spp source files."
filename))
(defmethod ede-set-project-variables ((project ede-cpp-root-project) &optional buffer)
"Set variables local to PROJECT in BUFFER.
Also set up the lexical preprocessor map."
(call-next-method)
(when (and (featurep 'semantic/bovine/c) (featurep 'semantic/lex-spp))
(setq semantic-lex-spp-project-macro-symbol-obarray
(semantic-lex-make-spp-table (oref project spp-table)))
))
(defmethod ede-system-include-path ((this ede-cpp-root-project))
"Get the system include path used by project THIS."
(oref this system-include-path))
@ -506,11 +509,18 @@ Also set up the lexical preprocessor map."
(table (when expfile
(semanticdb-file-table-object expfile)))
)
(if (not table)
(message "Cannot find file %s in project." F)
(cond
((not (file-exists-p expfile))
(message "Cannot find file %s in project." F))
((string= expfile (buffer-file-name))
;; Don't include this file in it's own spp table.
)
((not table)
(message "No db table available for %s." expfile))
(t
(when (semanticdb-needs-refresh-p table)
(semanticdb-refresh-table table))
(setq spp (append spp (oref table lexical-table))))))
(setq spp (append spp (oref table lexical-table)))))))
(oref this spp-files))
spp))
@ -522,6 +532,29 @@ Also set up the lexical preprocessor map."
"Get the pre-processor map for project THIS."
(ede-preprocessor-map (ede-target-parent this)))
(defmethod project-compile-project ((proj ede-cpp-root-project) &optional command)
"Compile the entire current project PROJ.
Argument COMMAND is the command to use when compiling."
;; we need to be in the proj root dir for this to work
(let* ((cmd (oref proj :compile-command))
(ov (oref proj :local-variables))
(lcmd (when ov (cdr (assoc 'compile-command ov))))
(cmd-str (cond
((stringp cmd) cmd)
((functionp cmd) (funcall cmd proj))
((stringp lcmd) lcmd)
((functionp lcmd) (funcall lcmd proj)))))
(when cmd-str
(let ((default-directory (ede-project-root-directory proj)))
(compile cmd-str)))))
(defmethod project-compile-target ((obj ede-cpp-root-target) &optional command)
"Compile the current target OBJ.
Argument COMMAND is the command to use for compiling the target."
(when (oref obj :project)
(project-compile-project (oref obj :project) command)))
;;; Quick Hack
(defun ede-create-lots-of-projects-under-dir (dir projfile &rest attributes)
"Create a bunch of projects under directory DIR.

View File

@ -59,7 +59,7 @@ DIR is the directory to search from."
"Get the root directory for DIR."
(when (not dir) (setq dir default-directory))
(let ((case-fold-search t)
(proj (ede-emacs-file-existing dir)))
(proj (ede-files-find-existing dir ede-emacs-project-list)))
(if proj
(ede-up-directory (file-name-directory
(oref proj :file)))
@ -134,7 +134,7 @@ m4_define(\\[SXEM4CS_BETA_VERSION\\], \\[\\([0-9]+\\)\\])")
Return nil if there isn't one.
Argument DIR is the directory it is created for.
ROOTPROJ is nil, since there is only one project."
(or (ede-emacs-file-existing dir)
(or (ede-files-find-existing dir ede-emacs-project-list)
;; Doesn't already exist, so let's make one.
(let* ((vertuple (ede-emacs-version dir))
(proj (ede-emacs-project

View File

@ -50,12 +50,13 @@
There is no completion at the prompt. FILE is searched for within
the current EDE project."
(interactive "sFile: ")
(let ((fname (ede-expand-filename (ede-current-project) file))
(let* ((proj (ede-current-project))
(fname (ede-expand-filename proj file))
)
(unless fname
(error "Could not find %s in %s"
file
(ede-project-root-directory (ede-current-project))))
(ede-project-root-directory proj)))
(find-file fname)))
(defun ede-flush-project-hash ()
@ -508,6 +509,26 @@ Argument DIR is the directory to trim upwards."
nil
fnd)))
(defun ede-find-project-root (prj-file-name &optional dir)
"Tries to find directory with given project file"
(let ((prj-dir (locate-dominating-file (or dir default-directory)
prj-file-name)))
(when prj-dir
(expand-file-name prj-dir))))
(defun ede-files-find-existing (dir prj-list)
"Find a project in the list of projects stored in given variable.
DIR is the directory to search from."
(let ((projs prj-list)
(ans nil))
(while (and projs (not ans))
(let ((root (ede-project-root-directory (car projs))))
(when (string-match (concat "^" (regexp-quote root)) dir)
(setq ans (car projs))))
(setq projs (cdr projs)))
ans))
(provide 'ede/files)
;; Local variables:

View File

@ -163,7 +163,7 @@ that created this EDE locate object."
"Create or update the database for the current project.
You cannot create projects for the baseclass."
(error "Cannot create/update a database of type %S"
(object-name loc)))
(eieio-object-name loc)))
;;; LOCATE
;;

View File

@ -152,7 +152,7 @@ don't do it. A value of nil means to just do it.")
(defmethod ede-proj-configure-recreate ((this ede-proj-project))
"Delete project THIS's configure script and start over."
(if (not (ede-proj-configure-file this))
(error "Could not determine configure.ac for %S" (object-name this)))
(error "Could not determine configure.ac for %S" (eieio-object-name this)))
(let ((b (get-file-buffer (ede-proj-configure-file this))))
;; Destroy all evidence of the old configure.ac
(delete-file (ede-proj-configure-file this))

View File

@ -170,7 +170,7 @@ Bonus: Return a cons cell: (COMPILED . UPTODATE)."
(setq utd (1+ utd)))))))
(oref obj source))
(message "All Emacs Lisp sources are up to date in %s" (object-name obj))
(message "All Emacs Lisp sources are up to date in %s" (eieio-object-name obj))
(cons comp utd)))
(defmethod ede-update-version-in-source ((this ede-proj-target-elisp) version)
@ -194,7 +194,8 @@ is found, such as a `-version' variable, or the standard header."
(goto-char (match-beginning 1))
(insert version)))))
(setq vs (cdr vs)))
(if (not match) (call-next-method)))))
;; The next method will include comments such as "Version:"
(call-next-method))))
;;; Makefile generation functions

View File

@ -512,11 +512,11 @@ Optional argument COMMAND is the s the alternate command to use."
(defmethod project-debug-target ((obj ede-proj-target))
"Run the current project target OBJ in a debugger."
(error "Debug-target not supported by %s" (object-name obj)))
(error "Debug-target not supported by %s" (eieio-object-name obj)))
(defmethod project-run-target ((obj ede-proj-target))
"Run the current project target OBJ."
(error "Run-target not supported by %s" (object-name obj)))
(error "Run-target not supported by %s" (eieio-object-name obj)))
(defmethod ede-proj-makefile-target-name ((this ede-proj-target))
"Return the name of the main target for THIS target."

View File

@ -49,7 +49,7 @@ Argument NEWVERSION is the version number to use in the current project."
(defmethod project-update-version ((ot ede-project))
"The :version of the project OT has been updated.
Handle saving, or other detail."
(error "project-update-version not supported by %s" (object-name ot)))
(error "project-update-version not supported by %s" (eieio-object-name ot)))
(defmethod ede-update-version-in-source ((this ede-project) version)
"Change occurrences of a version string in sources.

View File

@ -466,11 +466,10 @@ unterminated syntax."
(widen)
(when (or (< end start) (> end (point-max)))
(error "Invalid parse region bounds %S, %S" start end))
(nreverse
(semantic-repeat-parse-whole-stream
(semantic-repeat-parse-whole-stream
(or (cdr (assq start semantic-lex-block-streams))
(semantic-lex start end depth))
nonterminal returnonerror))))
nonterminal returnonerror)))
;;; Parsing functions
;;
@ -756,7 +755,7 @@ This function returns semantic tags without overlays."
tag 'reparse-symbol nonterm))
tag)
(semantic--tag-expand tag))
result (append tag result))
result (append result tag))
;; No error in this case, a purposeful nil means don't
;; store anything.
)
@ -934,7 +933,8 @@ Throw away all the old tags, and recreate the tag database."
'("--"))
(define-key edit-menu [senator-yank-tag]
'(menu-item "Yank Tag" senator-yank-tag
:enable (not (ring-empty-p senator-tag-ring))
:enable (and (boundp 'senator-tag-ring)
(not (ring-empty-p senator-tag-ring)))
:help "Yank the head of the tag ring into the buffer"))
(define-key edit-menu [senator-copy-tag-to-register]
'(menu-item "Copy Tag To Register" senator-copy-tag-to-register

View File

@ -800,7 +800,7 @@ CONTEXT's content is described in `semantic-analyze-current-context'."
(semantic-analyze-pulse context)
(with-output-to-temp-buffer "*Semantic Context Analysis*"
(princ "Context Type: ")
(princ (object-name context))
(princ (eieio-object-name context))
(princ "\n")
(princ "Bounds: ")
(princ (oref context bounds))

View File

@ -255,7 +255,7 @@ Optional argument TYPE-DECLARATION is how TYPE was found referenced."
(nexttype (semantic-analyze-dereference-metatype type scope type-declaration))
(idx 0))
(catch 'metatype-recursion
(while (and nexttype (not (eq (car nexttype) lasttype)))
(while (and nexttype (not (semantic-tag-similar-p (car nexttype) lasttype)))
(setq lasttype (car nexttype)
lasttypedeclaration (cadr nexttype))
(setq nexttype (semantic-analyze-dereference-metatype lasttype scope lasttypedeclaration))

View File

@ -155,15 +155,16 @@ part of the preprocessor map.")
;; not be in a buffer.
(semanticdb-refresh-table table t)
(error (message "Error updating tables for %S"
(object-name table)))))
(eieio-object-name table)))))
(setq filemap (append filemap (oref table lexical-table)))
;; Update symbol obarray
(setq-mode-local c-mode
semantic-lex-spp-macro-symbol-obarray
(semantic-lex-make-spp-table
(append semantic-lex-c-preprocessor-symbol-map-builtin
semantic-lex-c-preprocessor-symbol-map
filemap)))))))))))
)))))
;; Update symbol obarray
(setq-mode-local c-mode
semantic-lex-spp-macro-symbol-obarray
(semantic-lex-make-spp-table
(append semantic-lex-c-preprocessor-symbol-map-builtin
semantic-lex-c-preprocessor-symbol-map
filemap))))))
;; Make sure the preprocessor symbols are set up when mode-local kicks
;; in.
@ -1946,15 +1947,17 @@ have to be wrapped in that namespace."
"Do what `semantic-get-local-variables' does, plus add `this' if needed."
(let* ((origvar (semantic-get-local-variables-default))
(ct (semantic-current-tag))
(p (semantic-tag-function-parent ct)))
(p (when (semantic-tag-of-class-p ct 'function)
(or (semantic-tag-function-parent ct)
(car-safe (semantic-find-tags-by-type
"class" (semantic-find-tag-by-overlay)))))))
;; If we have a function parent, then that implies we can
(if (and p (semantic-tag-of-class-p ct 'function))
;; Append a new tag THIS into our space.
(cons (semantic-tag-new-variable "this" p nil)
(if p
;; Append a new tag THIS into our space.
(cons (semantic-tag-new-variable "this" p nil :pointer 1)
origvar)
;; No parent, just return the usual
origvar)
))
origvar)))
(define-mode-local-override semantic-idle-summary-current-symbol-info
c-mode ()
@ -2151,14 +2154,18 @@ actually in their parent which is not accessible.")
(princ "\n")))
(princ "\n\nMacro Summary:\n")
(when semantic-lex-c-preprocessor-symbol-file
(princ "\n Your CPP table is primed from these files:\n")
(princ "\n Your CPP table is primed from these system files:\n")
(dolist (file semantic-lex-c-preprocessor-symbol-file)
(princ " ")
(princ file)
(princ "\n")
(princ " in table: ")
(princ (object-print (semanticdb-file-table-object file)))
(let ((fto (semanticdb-file-table-object file)))
(if fto
(princ (object-print fto))
(princ "No Table")))
(princ "\n")
))
@ -2173,7 +2180,7 @@ actually in their parent which is not accessible.")
))
(when semantic-lex-c-preprocessor-symbol-map
(princ "\n User symbol map:\n")
(princ "\n User symbol map (primed from system files):\n")
(dolist (S semantic-lex-c-preprocessor-symbol-map)
(princ " ")
(princ (car S))
@ -2183,25 +2190,27 @@ actually in their parent which is not accessible.")
))
(when (and (boundp 'ede-object)
ede-object
(arrayp semantic-lex-spp-project-macro-symbol-obarray))
ede-object)
(princ "\n Project symbol map:\n")
(when (and (boundp 'ede-object) ede-object)
(princ " Your project symbol map is derived from the EDE object:\n ")
(princ " Your project symbol map is also derived from the EDE object:\n ")
(princ (object-print ede-object)))
(princ "\n\n")
(let ((macros nil))
(mapatoms
#'(lambda (symbol)
(setq macros (cons symbol macros)))
semantic-lex-spp-project-macro-symbol-obarray)
(dolist (S macros)
(princ " ")
(princ (symbol-name S))
(princ " = ")
(princ (symbol-value S))
(princ "\n")
)))
(if (arrayp semantic-lex-spp-project-macro-symbol-obarray)
(let ((macros nil))
(mapatoms
#'(lambda (symbol)
(setq macros (cons symbol macros)))
semantic-lex-spp-project-macro-symbol-obarray)
(dolist (S macros)
(princ " ")
(princ (symbol-name S))
(princ " = ")
(princ (symbol-value S))
(princ "\n")
))
;; Else, not map
(princ " No Symbols.\n")))
(princ "\n\n Use: M-x semantic-lex-spp-describe RET\n")
(princ "\n to see the complete macro table.\n")

View File

@ -157,7 +157,11 @@ It should also include other symbols GCC was compiled with.")
;; `cpp' command in `semantic-gcc-setup' doesn't work on
;; Mac, try `gcc'.
(apply 'semantic-gcc-query "gcc" cpp-options))))
(defines (semantic-cpp-defs query))
(defines (if (stringp query)
(semantic-cpp-defs query)
(message (concat "Could not query gcc for defines. "
"Maybe g++ is not installed."))
nil))
(ver (cdr (assoc 'version fields)))
(host (or (cdr (assoc 'target fields))
(cdr (assoc '--target fields))

View File

@ -678,7 +678,8 @@ a reasonable distance."
;;(message "Inline Hook installed, but overlay deleted.")
(semantic-complete-inline-exit))
;; Exit if commands caused us to exit the area of interest
(let ((s (semantic-overlay-start semantic-complete-inline-overlay))
(let ((os (semantic-overlay-get semantic-complete-inline-overlay 'semantic-original-start))
(s (semantic-overlay-start semantic-complete-inline-overlay))
(e (semantic-overlay-end semantic-complete-inline-overlay))
(b (semantic-overlay-buffer semantic-complete-inline-overlay))
(txt nil)
@ -686,8 +687,10 @@ a reasonable distance."
(cond
;; EXIT when we are no longer in a good place.
((or (not (eq b (current-buffer)))
(<= (point) s)
(> (point) e))
(< (point) s)
(< (point) os)
(> (point) e)
)
;;(message "Exit: %S %S %S" s e (point))
(semantic-complete-inline-exit)
)
@ -710,7 +713,6 @@ a reasonable distance."
(t
;; Else, show completions now
(semantic-complete-inline-force-display)
))))
;; If something goes terribly wrong, clean up after ourselves.
(error (semantic-complete-inline-exit))))
@ -761,6 +763,10 @@ END is at the end of the current symbol being completed."
(semantic-overlay-put semantic-complete-inline-overlay
'window-config-start
(current-window-configuration))
;; Save the original start. We need to exit completion if START
;; moves.
(semantic-overlay-put semantic-complete-inline-overlay
'semantic-original-start start)
;; Install our command hooks
(add-hook 'pre-command-hook 'semantic-complete-pre-command-hook)
(add-hook 'post-command-hook 'semantic-complete-post-command-hook)
@ -1171,7 +1177,7 @@ These collectors track themselves on a per-buffer basis."
(let ((old nil)
(bl semantic-collector-per-buffer-list))
(while (and bl (null old))
(if (eq (object-class (car bl)) this)
(if (eq (eieio-object-class (car bl)) this)
(setq old (car bl))))
(unless old
(let ((new (call-next-method)))
@ -1510,7 +1516,7 @@ one in the source buffer."
(insert (semantic-format-tag-summarize tag nil t) "\n\n")
(when table
(insert "From table: \n")
(insert (object-name table) "\n\n"))
(insert (eieio-object-name table) "\n\n"))
(when buf
(insert "In buffer: \n\n")
(insert (format "%S" buf)))

View File

@ -216,9 +216,8 @@ TOKTYPE is a hint to the type of tag desired."
(symbol-name sym)
"class"
(semantic-elisp-desymbolify
(aref (class-v semanticdb-project-database)
class-public-a)) ;; slots
(semantic-elisp-desymbolify (class-parents sym)) ;; parents
(eieio--class-public-a (class-v semanticdb-project-database))) ;; slots
(semantic-elisp-desymbolify (eieio-class-parents sym)) ;; parents
))
((not toktype)
;; Figure it out on our own.

View File

@ -44,6 +44,8 @@
(defcustom semanticdb-default-save-directory
(locate-user-emacs-file "semanticdb" ".semanticdb")
"Directory name where semantic cache files are stored.
By default, it is either ~/.emacs.d/semanticdb, or ~/.semanticdb depending
on which exists.
If this value is nil, files are saved in the current directory. If the value
is a valid directory, then it overrides `semanticdb-default-file-name' and
stores caches in a coded file name in this directory."
@ -316,7 +318,7 @@ Argument OBJ is the object to write."
(data-debug-new-buffer (concat "*SEMANTICDB ERROR*"))
(data-debug-insert-thing obj "*" "")
(setq semanticdb-data-debug-on-write-error nil))
(message "Error Writing Table: %s" (object-name obj))
(message "Error Writing Table: %s" (eieio-object-name obj))
(error "%S" (car (cdr tableerror)))))
;; Clear the dirty bit.

View File

@ -244,7 +244,7 @@ This class will cache data derived during various searches.")
(let ((tab-idx (semanticdb-get-table-index tab)))
;; Not a full reset?
(when (oref tab-idx type-cache)
(require 'db-typecache)
(require 'semantic/db-typecache)
(semanticdb-typecache-notify-reset
(oref tab-idx type-cache)))
)))
@ -919,7 +919,7 @@ but should be good enough for debugging assertions."
(if (< (length result) 2)
(concat "#<FIND RESULT "
(mapconcat (lambda (a)
(concat "(" (object-name (car a) ) " . "
(concat "(" (eieio-object-name (car a) ) " . "
"#<TAG LIST " (number-to-string (length (cdr a))) ">)"))
result
" ")
@ -1285,7 +1285,7 @@ associated with that tag should be loaded into a buffer."
(semanticdb-find-tags-collector
(lambda (table tags)
(semanticdb-find-tags-external-children-of-type-method table type tags))
path find-file-match))
path find-file-match t))
(defun semanticdb-find-tags-subclasses-of-type
(type &optional path find-file-match)

View File

@ -190,7 +190,7 @@ If one doesn't exist, create it."
(oref obj index)
(let ((idx nil))
(setq idx (funcall semanticdb-default-find-index-class
(concat (object-name obj) " index")
(concat (eieio-object-name obj) " index")
;; Fill in the defaults
:table obj
))
@ -469,7 +469,7 @@ other than :table."
(let ((cache (oref table cache))
(obj nil))
(while (and (not obj) cache)
(if (eq (object-class-fast (car cache)) desired-class)
(if (eq (eieio--object-class (car cache)) desired-class)
(setq obj (car cache)))
(setq cache (cdr cache)))
(if obj
@ -520,7 +520,7 @@ other than :table."
(let ((cache (oref db cache))
(obj nil))
(while (and (not obj) cache)
(if (eq (object-class-fast (car cache)) desired-class)
(if (eq (eieio--object-class (car cache)) desired-class)
(setq obj (car cache)))
(setq cache (cdr cache)))
(if obj

View File

@ -797,7 +797,7 @@ Argument EVENT describes the event that caused this function to be called."
(dolist (p path)
(if (slot-boundp p 'tags)
(princ (format "\n %s :\t%d tags, %d are includes. %s"
(object-name-string p)
(eieio-object-name-string p)
(length (oref p tags))
(length (semantic-find-tags-by-class
'include p))
@ -810,7 +810,7 @@ Argument EVENT describes the event that caused this function to be called."
" Needs to be parsed.")
(t ""))))
(princ (format "\n %s :\tUnparsed"
(object-name-string p))))
(eieio-object-name-string p))))
)))
)))

View File

@ -162,7 +162,7 @@ Lays claim to all -by.el, and -wy.el files."
(setq comp (1+ comp))
(setq utd (1+ utd))))))))
(oref obj source))
(message "All Semantic Grammar sources are up to date in %s" (object-name obj))
(message "All Semantic Grammar sources are up to date in %s" (eieio-object-name obj))
(cons comp utd)))
;;; Makefile generation functions

View File

@ -313,6 +313,15 @@ TABLE is a tag table. See `semantic-something-to-tag-table'."
(eq ,class (semantic-tag-class (car tags)))
,table))
(defmacro semantic-filter-tags-by-class (class &optional table)
"Find all tags of class not in the list CLASS in TABLE.
CLASS is a list of symbols representing the class of the token,
such as 'variable, of 'function..
TABLE is a tag table. See `semantic-something-to-tag-table'."
`(semantic--find-tags-by-macro
(not (memq (semantic-tag-class (car tags)) ,class))
,table))
(defmacro semantic-find-tags-by-type (type &optional table)
"Find all tags of with a type TYPE in TABLE.
TYPE is a string or tag representing a data type as defined in the

View File

@ -51,6 +51,9 @@
(declare-function semantic-grammar-wy--install-parser
"semantic/gram-wy-fallback")
(declare-function semantic-grammar-wy--install-parser
"semantic/gram-wy-fallback")
;;;;
;;;; Set up lexer

View File

@ -43,6 +43,11 @@ This will replace the named bucket that would have usually occurred here."
:group 'speedbar
:type 'integer)
(defvar semantic-sb-filter-tags-of-class '(code)
"Tags classes to not display in speedbar.
Make this buffer local for modes that have different types of tags
that should be ignored.")
(defcustom semantic-sb-button-format-tag-function 'semantic-format-tag-abbreviate
"*Function called to create the text for a but from a token."
:group 'speedbar
@ -405,7 +410,12 @@ Returns the tag list, or t for an error."
(setq out (semantic-adopt-external-members out))
;; Dump all the tokens into buckets.
(semantic-sb-with-tag-buffer (car out)
(semantic-bucketize out)))
(semantic-bucketize out nil
(lambda (tagsin)
;; Remove all boring tags.
(semantic-filter-tags-by-class
semantic-sb-filter-tags-of-class
tagsin)))))
(error t))
t)))

View File

@ -727,7 +727,13 @@ kill ring."
(semantic-fetch-tags)
(let ((ft (semantic-obtain-foreign-tag)))
(when ft
(set-register register ft)
(set-register
register (registerv-make
ft
:insert-func #'semantic-insert-foreign-tag
:jump-func (lambda (v)
(switch-to-buffer (semantic-tag-buffer v))
(goto-char (semantic-tag-start v)))))
(if kill-flag
(kill-region (semantic-tag-start ft)
(semantic-tag-end ft))))))

View File

@ -522,7 +522,7 @@ See `semantic-tag-external-member-children' for details."
(semanticdb-minor-mode-p)
(require 'semantic/db-find))
(let ((m (semanticdb-find-tags-external-children-of-type
(semantic-tag-name tag))))
(semantic-tag-name tag) tag)))
(if m (apply #'append (mapcar #'cdr m))))
(semantic--find-tags-by-function
`(lambda (tok)

View File

@ -146,36 +146,42 @@ are the same.
IGNORABLE-ATTRIBUTES are tag attributes that can be ignored.
See `semantic-tag-similar-p' for details."
(let* ((ignore (append ignorable-attributes semantic-tag-similar-ignorable-attributes))
(A1 (and (semantic--tag-similar-names-p tag1 tag2 (memq :name ignore))
(semantic--tag-similar-types-p tag1 tag2)
(semantic-tag-of-class-p tag1 (semantic-tag-class tag2))))
(attr1 (semantic-tag-attributes tag1))
(attr2 (semantic-tag-attributes tag2))
(A2 t)
(A3 t)
)
;; Test if there are non-ignorable attributes in A2 which are not present in A1
(while (and A2 attr2)
(let ((a (car attr2)))
(unless (or (eq a :type) (memq a ignore))
(setq A2 (semantic-tag-get-attribute tag1 a)))
(setq attr2 (cdr (cdr attr2)))))
(while (and A2 attr1 A3)
(let ((a (car attr1)))
(or
;; Tags are similar if they have the exact same lisp object
;; Added for performance when testing a relatively common case in some uses
;; of this code.
(eq tag1 tag2)
;; More complex similarness test.
(let* ((ignore (append ignorable-attributes semantic-tag-similar-ignorable-attributes))
(A1 (and (semantic--tag-similar-names-p tag1 tag2 (memq :name ignore))
(semantic--tag-similar-types-p tag1 tag2)
(semantic-tag-of-class-p tag1 (semantic-tag-class tag2))))
(attr1 (semantic-tag-attributes tag1))
(attr2 (semantic-tag-attributes tag2))
(A2 t)
(A3 t)
)
;; Test if there are non-ignorable attributes in A2 which are not present in A1
(while (and A2 attr2)
(let ((a (car attr2)))
(unless (or (eq a :type) (memq a ignore))
(setq A2 (semantic-tag-get-attribute tag1 a)))
(setq attr2 (cdr (cdr attr2)))))
(while (and A2 attr1 A3)
(let ((a (car attr1)))
(cond ((or (eq a :type) ;; already tested above.
(memq a ignore)) ;; Ignore them...
nil)
(cond ((or (eq a :type) ;; already tested above.
(memq a ignore)) ;; Ignore them...
nil)
(t
(setq A3
(semantic--tag-attribute-similar-p
a (car (cdr attr1)) (semantic-tag-get-attribute tag2 a)
ignorable-attributes)))
))
(setq attr1 (cdr (cdr attr1))))
(and A1 A2 A3)))
(t
(setq A3
(semantic--tag-attribute-similar-p
a (car (cdr attr1)) (semantic-tag-get-attribute tag2 a)
ignorable-attributes)))
))
(setq attr1 (cdr (cdr attr1))))
(and A1 A2 A3))))
;;; FULL NAMES
;;

View File

@ -157,6 +157,30 @@ do not contain any text from preceding or following text."
(srecode-dictionary-show-section dict "RCS")
)))
;;; :project ARGUMENT HANDLING
;;
;; When the :project argument is required, fill the dictionary with
;; information that the current project (from EDE) might know
(defun srecode-semantic-handle-:project (dict)
"Add macros into the dictionary DICT based on the current ede project."
(let* ((bfn (buffer-file-name))
(dir (file-name-directory bfn)))
(if (ede-toplevel)
(let* ((projecttop (ede-toplevel-project default-directory))
(relfname (file-relative-name bfn projecttop))
(reldir (file-relative-name dir projecttop))
)
(srecode-dictionary-set-value dict "PROJECT_FILENAME" relfname)
(srecode-dictionary-set-value dict "PROJECT_DIRECTORY" reldir)
(srecode-dictionary-set-value dict "PROJECT_NAME" (ede-name (ede-toplevel)))
(srecode-dictionary-set-value dict "PROJECT_VERSION" (oref (ede-toplevel) :version))
)
;; If there is no EDE project, then put in some base values.
(srecode-dictionary-set-value dict "PROJECT_FILENAME" bfn)
(srecode-dictionary-set-value dict "PROJECT_DIRECTORY" dir)
(srecode-dictionary-set-value dict "PROJECT_NAME" "N/A")
(srecode-dictionary-set-value dict "PROJECT_VERSION" "1.0"))))
;;; :system ARGUMENT HANDLING
;;
;; When a :system argument is required, fill the dictionary with

View File

@ -510,12 +510,12 @@ to the inserter constructor."
;;(message "Compile: %s %S" name props)
(if (not key)
(apply 'srecode-template-inserter-variable name props)
(let ((classes (class-children srecode-template-inserter))
(let ((classes (eieio-class-children srecode-template-inserter))
(new nil))
;; Loop over the various subclasses and
;; create the correct inserter.
(while (and (not new) classes)
(setq classes (append classes (class-children (car classes))))
(setq classes (append classes (eieio-class-children (car classes))))
;; Do we have a match?
(when (and (not (class-abstract-p (car classes)))
(equal (oref (car classes) key) key))
@ -594,7 +594,7 @@ A list of defined variables VARS provides a variable table."
(defmethod srecode-dump ((tmp srecode-template))
"Dump the contents of the SRecode template tmp."
(princ "== Template \"")
(princ (object-name-string tmp))
(princ (eieio-object-name-string tmp))
(princ "\" in context ")
(princ (oref tmp context))
(princ "\n")
@ -640,12 +640,12 @@ Argument INDENT specifies the indentation level for the list."
(defmethod srecode-dump ((ins srecode-template-inserter) indent)
"Dump the state of the SRecode template inserter INS."
(princ "INS: \"")
(princ (object-name-string ins))
(princ (eieio-object-name-string ins))
(when (oref ins :secondname)
(princ "\" : \"")
(princ (oref ins :secondname)))
(princ "\" type \"")
(let* ((oc (symbol-name (object-class ins)))
(let* ((oc (symbol-name (eieio-object-class ins)))
(junk (string-match "srecode-template-inserter-" oc))
(on (if junk
(substring oc (match-end 0))

View File

@ -70,8 +70,7 @@ HEADER - Shown section if in a header file."
(srecode-dictionary-show-section dict "NOTHEADER"))
;; Strip out bad characters
(while (string-match "\\.\\| " fsym)
(setq fsym (replace-match "_" t t fsym)))
(setq fsym (replace-regexp-in-string "[^a-zA-Z0-9_]" "_" fsym))
(srecode-dictionary-set-value dict "FILENAME_SYMBOL" fsym)
)
)

View File

@ -175,7 +175,7 @@ associated with a buffer or parent."
((srecode-dictionary-child-p buffer-or-parent)
(setq parent buffer-or-parent
buffer (oref buffer-or-parent buffer)
origin (concat (object-name buffer-or-parent) " in "
origin (concat (eieio-object-name buffer-or-parent) " in "
(if buffer (buffer-name buffer)
"no buffer")))
(when buffer
@ -454,12 +454,12 @@ If you subclass `srecode-dictionary-compound-value' then this
method could return nil, but if it does that, it must insert
the value itself using `princ', or by detecting if the current
standard out is a buffer, and using `insert'."
(object-name cp))
(eieio-object-name cp))
(defmethod srecode-dump ((cp srecode-dictionary-compound-value)
&optional indent)
"Display information about this compound value."
(princ (object-name cp))
(princ (eieio-object-name cp))
)
(defmethod srecode-compound-toString ((cp srecode-dictionary-compound-variable)
@ -654,7 +654,7 @@ STATE is the current compiler state."
4)))
(while entry
(princ " --> SUBDICTIONARY ")
(princ (object-name dict))
(princ (eieio-object-name dict))
(princ "\n")
(srecode-dump (car entry) newindent)
(setq entry (cdr entry))

View File

@ -809,7 +809,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use."
(srecode-insert-report-error
dict
"Only section dictionaries allowed for `%s'"
(object-name-string sti)))
(eieio-object-name-string sti)))
;; Output the code from the sub-template.
(srecode-insert-method (slot-value sti slot) dict))
@ -866,7 +866,7 @@ Return the remains of INPUT."
(let* ((out (srecode-compile-split-code tag input STATE
(oref ins :object-name))))
(oset ins template (srecode-template
(object-name-string ins)
(eieio-object-name-string ins)
:context nil
:args nil
:code (cdr out)))

View File

@ -42,9 +42,24 @@ FILENAME_AS_CLASS - file converted to a Java class name."
)
(while (string-match "\\.\\| " fpak)
(setq fpak (replace-match "_" t t fpak)))
(if (string-match "src/" dir)
(setq dir (substring dir (match-end 0)))
(setq dir (file-name-nondirectory (directory-file-name dir))))
;; We can extract package from:
;; 1) a java EDE project source paths,
(cond ((ede-current-project)
(let* ((proj (ede-current-project))
(pths (ede-source-paths proj 'java-mode))
(pth)
(res))
(while (and (not res)
(setq pth (expand-file-name (car pths))))
(when (string-match pth dir)
(setq res (substring dir (match-end 0))))
(setq pths (cdr pths)))
(setq dir res)))
;; 2) a simple heuristic
((string-match "src/" dir)
(setq dir (substring dir (match-end 0))))
;; 3) outer directory as a fallback
(t (setq dir (file-name-nondirectory (directory-file-name dir)))))
(setq dir (directory-file-name dir))
(while (string-match "/" dir)
(setq dir (replace-match "." t t dir)))

View File

@ -363,6 +363,9 @@ Return non-nil if the map changed."
(let ((semantic-init-hook nil))
(semantic-new-buffer-fcn))
)
;; Force semantic to be enabled in this buffer.
(unless (semantic-active-p)
(semantic-new-buffer-fcn))
(semantic-fetch-tags)
(let* ((mode-tag

View File

@ -225,7 +225,7 @@ MENU-DEF is the menu to bind this into."
(ctxtcons (assoc ctxt alltabs))
(bind (if (slot-boundp temp 'binding)
(oref temp binding)))
(name (object-name-string temp)))
(name (eieio-object-name-string temp)))
(when (not ctxtcons)
(if (string= context ctxt)

View File

@ -187,7 +187,7 @@ we can tell font lock about them.")
"Keymap used in srecode mode.")
;;;###autoload
(define-derived-mode srecode-template-mode fundamental-mode "SRecorder"
(define-derived-mode srecode-template-mode fundamental-mode "SRecode"
"Major-mode for writing SRecode macros."
(set (make-local-variable 'comment-start) ";;")
(set (make-local-variable 'comment-end) "")
@ -232,7 +232,7 @@ we can tell font lock about them.")
"Provide help for working with macros in a template."
(interactive)
(let* ((root 'srecode-template-inserter)
(chl (aref (class-v root) class-children))
(chl (eieio--class-children (class-v root)))
(ess (srecode-template-get-escape-start))
(ees (srecode-template-get-escape-end))
)
@ -248,7 +248,7 @@ we can tell font lock about them.")
(showexample t)
)
(setq chl (cdr chl))
(setq chl (append (aref (class-v C) class-children) chl))
(setq chl (append (eieio--class-children (class-v C)) chl))
(catch 'skip
(when (eq C 'srecode-template-inserter-section-end)

View File

@ -69,6 +69,7 @@ DEFAULT is the default if RET is hit."
nil initial (or hist 'srecode-read-major-mode-history))
)
;;;###autoload
(defun srecode-semantic-handle-:srt (dict)
"Add macros into the dictionary DICT based on the current SRT file.
Adds the following:
@ -104,4 +105,9 @@ MODE - The mode of this buffer. If not declared yet, guess."
(provide 'srecode/srt)
;; Local variables:
;; generated-autoload-file: "loaddefs.el"
;; generated-autoload-load-name: "srecode/srt"
;; End:
;;; srecode/srt.el ends here

View File

@ -251,7 +251,7 @@ Use PREDICATE is the same as for the `sort' function."
(defmethod srecode-dump ((tab srecode-template-table))
"Dump the contents of the SRecode template table TAB."
(princ "Template Table for ")
(princ (object-name-string tab))
(princ (eieio-object-name-string tab))
(princ "\nPriority: ")
(prin1 (oref tab :priority))
(when (oref tab :application)

View File

@ -697,83 +697,69 @@ is nil, ask the user where to save the desktop."
ll)))
;; ----------------------------------------------------------------------------
(defun desktop-internal-v2s (value)
"Convert VALUE to a pair (QUOTE . TXT); (eval (read TXT)) gives VALUE.
TXT is a string that when read and evaluated yields VALUE.
(defun desktop--v2s (value)
"Convert VALUE to a pair (QUOTE . SEXP); (eval SEXP) gives VALUE.
SEXP is an sexp that when evaluated yields VALUE.
QUOTE may be `may' (value may be quoted),
`must' (value must be quoted), or nil (value must not be quoted)."
(cond
((or (numberp value) (null value) (eq t value) (keywordp value))
(cons 'may (prin1-to-string value)))
(cons 'may value))
((stringp value)
(let ((copy (copy-sequence value)))
(set-text-properties 0 (length copy) nil copy)
;; Get rid of text properties because we cannot read them
(cons 'may (prin1-to-string copy))))
;; Get rid of text properties because we cannot read them.
(cons 'may copy)))
((symbolp value)
(cons 'must (prin1-to-string value)))
(cons 'must value))
((vectorp value)
(let* ((special nil)
(pass1 (mapcar
(lambda (el)
(let ((res (desktop-internal-v2s el)))
(if (null (car res))
(setq special t))
res))
value)))
(let* ((pass1 (mapcar #'desktop--v2s value))
(special (assq nil pass1)))
(if special
(cons nil (concat "(vector "
(mapconcat (lambda (el)
(if (eq (car el) 'must)
(concat "'" (cdr el))
(cdr el)))
pass1
" ")
")"))
(cons 'may (concat "[" (mapconcat 'cdr pass1 " ") "]")))))
(cons nil `(vector
,@(mapcar (lambda (el)
(if (eq (car el) 'must)
`',(cdr el) (cdr el)))
pass1)))
(cons 'may `[,@(mapcar #'cdr pass1)]))))
((consp value)
(let ((p value)
newlist
use-list*
anynil)
(while (consp p)
(let ((q.txt (desktop-internal-v2s (car p))))
(or anynil (setq anynil (null (car q.txt))))
(setq newlist (cons q.txt newlist)))
(let ((q.sexp (desktop--v2s (car p))))
(push q.sexp newlist))
(setq p (cdr p)))
(if p
(let ((last (desktop-internal-v2s p)))
(or anynil (setq anynil (null (car last))))
(or anynil
(setq newlist (cons '(must . ".") newlist)))
(setq use-list* t)
(setq newlist (cons last newlist))))
(setq newlist (nreverse newlist))
(if anynil
(when p
(let ((last (desktop--v2s p)))
(setq use-list* t)
(push last newlist)))
(if (assq nil newlist)
(cons nil
(concat (if use-list* "(desktop-list* " "(list ")
(mapconcat (lambda (el)
(if (eq (car el) 'must)
(concat "'" (cdr el))
(cdr el)))
newlist
" ")
")"))
`(,(if use-list* 'desktop-list* 'list)
,@(mapcar (lambda (el)
(if (eq (car el) 'must)
`',(cdr el) (cdr el)))
(nreverse newlist))))
(cons 'must
(concat "(" (mapconcat 'cdr newlist " ") ")")))))
`(,@(mapcar #'cdr
(nreverse (if use-list* (cdr newlist) newlist)))
,@(if use-list* (cdar newlist)))))))
((subrp value)
(cons nil (concat "(symbol-function '"
(substring (prin1-to-string value) 7 -1)
")")))
(cons nil `(symbol-function
',(intern-soft (substring (prin1-to-string value) 7 -1)))))
((markerp value)
(let ((pos (prin1-to-string (marker-position value)))
(buf (prin1-to-string (buffer-name (marker-buffer value)))))
(cons nil (concat "(let ((mk (make-marker)))"
" (add-hook 'desktop-delay-hook"
" (list 'lambda '() (list 'set-marker mk "
pos " (get-buffer " buf ")))) mk)"))))
(t ; save as text
(cons 'may "\"Unprintable entity\""))))
(let ((pos (marker-position value))
(buf (buffer-name (marker-buffer value))))
(cons nil
`(let ((mk (make-marker)))
(add-hook 'desktop-delay-hook
`(lambda ()
(set-marker ,mk ,,pos (get-buffer ,,buf))))
mk))))
(t ; Save as text.
(cons 'may "Unprintable entity"))))
;; ----------------------------------------------------------------------------
(defun desktop-value-to-string (value)
@ -781,9 +767,11 @@ QUOTE may be `may' (value may be quoted),
Not all types of values are supported."
(let* ((print-escape-newlines t)
(float-output-format nil)
(quote.txt (desktop-internal-v2s value))
(quote (car quote.txt))
(txt (cdr quote.txt)))
(quote.sexp (desktop--v2s value))
(quote (car quote.sexp))
(txt
(let ((print-quoted t))
(prin1-to-string (cdr quote.sexp)))))
(if (eq quote 'must)
(concat "'" txt)
txt)))

View File

@ -326,7 +326,7 @@ of the page moves to the previous page."
(delete-overlay ol))
(image-mode-window-put 'overlay ol winprops)
(when (windowp (car winprops))
(if (stringp (get-char-property (point-min) 'display))
(if (stringp (overlay-get ol 'display))
;; We're not already displaying an image, so this is the
;; initial window showing the document.
(run-with-timer nil nil
@ -338,12 +338,11 @@ of the page moves to the previous page."
(with-selected-window (car winprops)
(doc-view-goto-page 1)))))
;; We've split the window showing the document. All we need
;; to do is selecting the new window to make the image appear
;; there, too.
;; to do is selecting the new window to cause a redisplay to
;; make the image appear there, too.
(run-with-timer nil nil
(lambda ()
(save-window-excursion
(select-window (car winprops)))))))))
(with-selected-window (car winprops))))))))
(defvar doc-view-current-files nil
"Only used internally.")
@ -1026,7 +1025,7 @@ Start by converting PAGES, and then the rest."
;; not sufficient.
(dolist (win (get-buffer-window-list (current-buffer) nil 'visible))
(with-selected-window win
(when (stringp (get-char-property (point-min) 'display))
(when (stringp (overlay-get (doc-view-current-overlay) 'display))
(doc-view-goto-page (doc-view-current-page)))))
;; Convert the rest of the pages.
(doc-view-pdf/ps->png pdf png)))))))

View File

@ -287,7 +287,8 @@ INHERIT-INPUT-METHOD."
prompt initial-input map
nil hist def inherit-input-method)))
(and def (string-equal input "") (setq input def))
(split-string input crm-separator)))
;; Ignore empty strings in the list of return values.
(split-string input crm-separator t)))
(remove-hook 'choose-completion-string-functions
'crm--choose-completion-string)))

View File

@ -3875,7 +3875,10 @@ Options:
;; If the user kills the buffer in which edebug is currently active,
;; exit to top level, because the edebug command loop can't usefully
;; continue running in such a case.
(add-hook 'kill-buffer-hook 'edebug-kill-buffer nil t)
;;
;; Append `edebug-kill-buffer' to the hook to avoid interfering with
;; other entries that are ungarded against deleted buffer.
(add-hook 'kill-buffer-hook 'edebug-kill-buffer t t)
(use-local-map edebug-mode-map))
(defun edebug-kill-buffer ()

View File

@ -80,38 +80,39 @@ PREBUTTONTEXT is some text between PREFIX and the object button."
;; Each object should have an opportunity to show stuff about itself.
(defmethod data-debug/eieio-insert-slots ((obj eieio-default-superclass)
prefix)
prefix)
"Insert the slots of OBJ into the current DDEBUG buffer."
(data-debug-insert-thing (eieio-object-name-string obj)
prefix
"Name: ")
(let* ((cl (eieio-object-class obj))
(cv (class-v cl)))
(data-debug-insert-thing (class-constructor cl)
prefix
"Class: ")
;; Loop over all the public slots
(let ((publa (eieio--class-public-a cv))
)
(while publa
(if (slot-boundp obj (car publa))
(let* ((i (class-slot-initarg cl (car publa)))
(v (eieio-oref obj (car publa))))
(data-debug-insert-thing
v prefix (concat
(if i (symbol-name i)
(symbol-name (car publa)))
" ")))
;; Unbound case
(let ((i (class-slot-initarg cl (car publa))))
(data-debug-insert-custom
"#unbound" prefix
(concat (if i (symbol-name i)
(symbol-name (car publa)))
" ")
'font-lock-keyword-face))
)
(setq publa (cdr publa))))))
(let ((inhibit-read-only t))
(data-debug-insert-thing (eieio-object-name-string obj)
prefix
"Name: ")
(let* ((cl (eieio-object-class obj))
(cv (class-v cl)))
(data-debug-insert-thing (class-constructor cl)
prefix
"Class: ")
;; Loop over all the public slots
(let ((publa (eieio--class-public-a cv))
)
(while publa
(if (slot-boundp obj (car publa))
(let* ((i (class-slot-initarg cl (car publa)))
(v (eieio-oref obj (car publa))))
(data-debug-insert-thing
v prefix (concat
(if i (symbol-name i)
(symbol-name (car publa)))
" ")))
;; Unbound case
(let ((i (class-slot-initarg cl (car publa))))
(data-debug-insert-custom
"#unbound" prefix
(concat (if i (symbol-name i)
(symbol-name (car publa)))
" ")
'font-lock-keyword-face))
)
(setq publa (cdr publa)))))))
;;; Augment the Data debug thing display list.
(data-debug-add-specialized-thing (lambda (thing) (object-p thing))

View File

@ -146,6 +146,10 @@ directly. Instead, use `eldoc-add-command' and `eldoc-remove-command'.")
"Idle time delay currently in use by timer.
This is used to determine if `eldoc-idle-delay' is changed by the user.")
(defvar eldoc-message-function 'eldoc-minibuffer-message
"The function used by `eldoc-message' to display messages.
It should receive the same arguments as `message'.")
;;;###autoload
(define-minor-mode eldoc-mode
@ -169,6 +173,20 @@ expression point is on."
(remove-hook 'post-command-hook 'eldoc-schedule-timer)
(remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area)))
;;;###autoload
(define-minor-mode eldoc-post-insert-mode nil
:group 'eldoc :lighter (:eval (if eldoc-mode ""
(concat eldoc-minor-mode-string "|i")))
(setq eldoc-last-message nil)
(let ((prn-info (lambda ()
(unless eldoc-mode
(eldoc-print-current-symbol-info)))))
(if eldoc-post-insert-mode
(add-hook 'post-self-insert-hook prn-info nil t)
(remove-hook 'post-self-insert-hook prn-info t))))
(add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-post-insert-mode)
;;;###autoload
(defun turn-on-eldoc-mode ()
"Unequivocally turn on ElDoc mode (see command `eldoc-mode')."
@ -180,14 +198,46 @@ expression point is on."
(or (and eldoc-timer
(memq eldoc-timer timer-idle-list))
(setq eldoc-timer
(run-with-idle-timer eldoc-idle-delay t
'eldoc-print-current-symbol-info)))
(run-with-idle-timer
eldoc-idle-delay t
(lambda () (and eldoc-mode (eldoc-print-current-symbol-info))))))
;; If user has changed the idle delay, update the timer.
(cond ((not (= eldoc-idle-delay eldoc-current-idle-delay))
(setq eldoc-current-idle-delay eldoc-idle-delay)
(timer-set-idle-time eldoc-timer eldoc-idle-delay t))))
(defvar eldoc-mode-line-string nil)
(put 'eldoc-mode-line-string 'risky-local-variable t)
(defun eldoc-minibuffer-message (format-string &rest args)
"Display messages in the mode-line when in the minibuffer.
Otherwise work like `message'."
(if (minibufferp)
(progn
(with-current-buffer
(window-buffer
(or (window-in-direction 'above (minibuffer-window))
(minibuffer-selected-window)
(get-largest-window)))
(unless (and (listp mode-line-format)
(assq 'eldoc-mode-line-string mode-line-format))
(setq mode-line-format
(list "" '(eldoc-mode-line-string
(" " eldoc-mode-line-string " "))
mode-line-format))))
(add-hook 'minibuffer-exit-hook
(lambda () (setq eldoc-mode-line-string nil))
nil t)
(cond
((null format-string)
(setq eldoc-mode-line-string nil))
((stringp format-string)
(setq eldoc-mode-line-string
(apply 'format format-string args))))
(force-mode-line-update))
(apply 'message format-string args)))
(defun eldoc-message (&rest args)
(let ((omessage eldoc-last-message))
(setq eldoc-last-message
@ -203,8 +253,9 @@ expression point is on."
;; they are Legion.
;; Emacs way of preventing log messages.
(let ((message-log-max nil))
(cond (eldoc-last-message (message "%s" eldoc-last-message))
(omessage (message nil)))))
(cond (eldoc-last-message
(funcall eldoc-message-function "%s" eldoc-last-message))
(omessage (funcall eldoc-message-function nil)))))
eldoc-last-message)
;; This function goes on pre-command-hook for XEmacs or when using idle
@ -236,11 +287,7 @@ expression point is on."
(defun eldoc-display-message-no-interference-p ()
(and eldoc-mode
(not executing-kbd-macro)
(not (and (boundp 'edebug-active) edebug-active))
;; Having this mode operate in an active minibuffer/echo area causes
;; interference with what's going on there.
(not cursor-in-echo-area)
(not (eq (selected-window) (minibuffer-window)))))
(not (and (boundp 'edebug-active) edebug-active))))
;;;###autoload
@ -262,7 +309,7 @@ Emacs Lisp mode) that support ElDoc.")
(defun eldoc-print-current-symbol-info ()
(condition-case err
(and (eldoc-display-message-p)
(and (or (eldoc-display-message-p) eldoc-post-insert-mode)
(if eldoc-documentation-function
(eldoc-message (funcall eldoc-documentation-function))
(let* ((current-symbol (eldoc-current-symbol))

View File

@ -1436,6 +1436,8 @@ Any non-integer value means do not use a different value of
:type '(choice (integer)
(const :tag "Use the current `fill-column'" t))
:group 'lisp)
(put 'emacs-lisp-docstring-fill-column 'safe-local-variable
(lambda (x) (or (eq x t) (integerp x))))
(defun lisp-fill-paragraph (&optional justify)
"Like \\[fill-paragraph], but handle Emacs Lisp comments and docstrings.

View File

@ -1631,31 +1631,34 @@ to which that point should be aligned, if we were to reindent it.")
(defun smie-auto-fill ()
(let ((fc (current-fill-column)))
(while (and fc (> (current-column) fc))
(cond
((not (or (nth 8 (save-excursion
(syntax-ppss (line-beginning-position))))
(nth 8 (syntax-ppss))))
(save-excursion
(beginning-of-line)
(smie-indent-forward-token)
(let ((bsf (point))
(gain 0)
curcol)
(while (<= (setq curcol (current-column)) fc)
;; FIXME? `smie-indent-calculate' can (and often will)
;; return a result that actually depends on the presence/absence
;; of a newline, so the gain computed here may not be accurate,
;; but in practice it seems to works well enough.
(let* ((newcol (smie-indent-calculate))
(newgain (- curcol newcol)))
(when (> newgain gain)
(setq gain newgain)
(setq bsf (point))))
(smie-indent-forward-token))
(when (> gain 0)
(goto-char bsf)
(newline-and-indent)))))
(t (do-auto-fill))))))
(or (unless (or (nth 8 (save-excursion
(syntax-ppss (line-beginning-position))))
(nth 8 (syntax-ppss)))
(save-excursion
(let ((end (point))
(bsf (progn (beginning-of-line)
(smie-indent-forward-token)
(point)))
(gain 0)
curcol)
(while (and (<= (point) end)
(<= (setq curcol (current-column)) fc))
;; FIXME? `smie-indent-calculate' can (and often will)
;; return a result that actually depends on the
;; presence/absence of a newline, so the gain computed here
;; may not be accurate, but in practice it seems to works
;; well enough.
(let* ((newcol (smie-indent-calculate))
(newgain (- curcol newcol)))
(when (> newgain gain)
(setq gain newgain)
(setq bsf (point))))
(smie-indent-forward-token))
(when (> gain 0)
(goto-char bsf)
(newline-and-indent)
'done))))
(do-auto-fill)))))
(defun smie-setup (grammar rules-function &rest keywords)

View File

@ -122,6 +122,7 @@ arriving, or after."
(add-text-properties 0 (length prompt)
'(read-only t
face eshell-prompt
front-sticky (face read-only)
rear-nonsticky (face read-only))
prompt))
(eshell-interactive-print prompt)))

View File

@ -1516,7 +1516,10 @@ expand wildcards (if any) and replace the file with multiple files."
(defvar kill-buffer-hook nil
"Hook run when a buffer is killed.
The buffer being killed is current while the hook is running.
See `kill-buffer'.")
See `kill-buffer'.
Note: Be careful with let-binding this hook considering it is
frequently used for cleanup.")
(defun find-alternate-file (filename &optional wildcards)
"Find file FILENAME, select its buffer, kill previous buffer.

View File

@ -2323,12 +2323,12 @@ in which C preprocessor directives are used. e.g. `asm-mode' and
"\\_>")
. 1)
;; Exit/Feature symbols as constants.
(,(concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\>"
(,(concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\_>"
"[ \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)?")
(1 font-lock-keyword-face)
(2 font-lock-constant-face nil t))
;; Erroneous structures.
("(\\(abort\\|assert\\|warn\\|check-type\\|cerror\\|error\\|signal\\)\\>" 1 font-lock-warning-face)
("(\\(abort\\|assert\\|warn\\|check-type\\|cerror\\|error\\|signal\\)\\_>" 1 font-lock-warning-face)
;; Words inside \\[] tend to be for `substitute-command-keys'.
("\\\\\\\\\\[\\(\\(?:\\sw\\|\\s_\\)+\\)\\]"
(1 font-lock-constant-face prepend))

View File

@ -1,3 +1,15 @@
2013-03-26 Andrew Cohen <cohen@bu.edu>
* nnir.el: Major rewrite. Cleaner separation between searches and group
management. Marks are now shown in nnir summary buffers. Rudimentary
support for real (i.e. not ephemeral) nnir groups.
(gnus-summary-make-nnir-group): New function for initiating searches
from a summary buffer.
2013-03-18 Sam Steingold <sds@gnu.org>
* message.el (message-bury): Minor cleanup.
2013-03-06 Katsumi Yamaoka <yamaoka@jpl.org>
* nndir.el (nndir-request-list): Remove 2nd argument passed to

View File

@ -4097,11 +4097,9 @@ Instead, just auto-save the buffer and then bury it."
(defun message-bury (buffer)
"Bury this mail BUFFER."
(if message-return-action
(progn
(bury-buffer buffer)
(apply (car message-return-action) (cdr message-return-action)))
(with-current-buffer buffer (bury-buffer))))
(bury-buffer buffer)
(when message-return-action
(apply (car message-return-action) (cdr message-return-action))))
(defun message-send (&optional arg)
"Send the message in the current buffer.

View File

@ -29,10 +29,6 @@
;;; Commentary:
;; TODO: Documentation in the Gnus manual
;; Where in the existing gnus manual would this fit best?
;; What does it do? Well, it allows you to search your mail using
;; some search engine (imap, namazu, swish-e, gmane and others -- see
;; later) by typing `G G' in the Group buffer. You will then get a
@ -136,17 +132,26 @@
;; other backend.
;; The interface between the two layers consists of the single
;; function `nnir-run-query', which just selects the appropriate
;; function for the search engine one is using. The input to
;; `nnir-run-query' is a string, representing the query as input by
;; the user. The output of `nnir-run-query' is supposed to be a
;; vector, each element of which should in turn be a three-element
;; vector. The first element should be full group name of the article,
;; the second element should be the article number, and the third
;; element should be the Retrieval Status Value (RSV) as returned from
;; the search engine. An RSV is the score assigned to the document by
;; the search engine. For Boolean search engines, the
;; RSV is always 1000 (or 1 or 100, or whatever you like).
;; function `nnir-run-query', which dispatches the search to the
;; proper search function. The argument of `nnir-run-query' is an
;; alist with two keys: 'nnir-query-spec and 'nnir-group-spec. The
;; value for 'nnir-query-spec is an alist. The only required key/value
;; pair is (query . "query") specifying the search string to pass to
;; the query engine. Individual engines may have other elements. The
;; value of 'nnir-group-spec is a list with the specification of the
;; groups/servers to search. The format of the 'nnir-group-spec is
;; (("server1" ("group11" "group12")) ("server2" ("group21"
;; "group22"))). If any of the group lists is absent then all groups
;; on that server are searched.
;; The output of `nnir-run-query' is supposed to be a vector, each
;; element of which should in turn be a three-element vector. The
;; first element should be full group name of the article, the second
;; element should be the article number, and the third element should
;; be the Retrieval Status Value (RSV) as returned from the search
;; engine. An RSV is the score assigned to the document by the search
;; engine. For Boolean search engines, the RSV is always 1000 (or 1
;; or 100, or whatever you like).
;; The sorting order of the articles in the summary buffer created by
;; nnir is based on the order of the articles in the above mentioned
@ -179,26 +184,21 @@
;;; Internal Variables:
(defvar nnir-current-query nil
"Internal: stores current query (= group name).")
(defvar nnir-memo-query nil
"Internal: stores current query.")
(defvar nnir-current-server nil
"Internal: stores current server (does it ever change?).")
(defvar nnir-current-group-marked nil
"Internal: stores current list of process-marked groups.")
(defvar nnir-memo-server nil
"Internal: stores current server.")
(defvar nnir-artlist nil
"Internal: stores search result.")
(defvar nnir-tmp-buffer " *nnir*"
"Internal: temporary buffer.")
(defvar nnir-search-history ()
"Internal: the history for querying search options in nnir")
(defvar nnir-extra-parms nil
"Internal: stores request for extra search parms")
(defconst nnir-tmp-buffer " *nnir*"
"Internal: temporary buffer.")
;; Imap variables
@ -290,14 +290,14 @@ is `(valuefunc member)'."
(autoload 'nnimap-command "nnimap")
(autoload 'nnimap-possibly-change-group "nnimap")
(autoload 'nnimap-make-thread-query "nnimap")
(autoload 'gnus-registry-action "gnus-registry"))
(autoload 'gnus-registry-action "gnus-registry")
(autoload 'gnus-registry-get-id-key "gnus-registry")
(autoload 'gnus-group-topic-name "gnus-topic"))
(nnoo-declare nnir)
(nnoo-define-basics nnir)
(defvoo nnir-address nil
"The address of the nnir server.")
(gnus-declare-backend "nnir" 'mail 'virtual)
@ -344,7 +344,7 @@ result, `gnus-retrieve-headers' will be called instead."
(defcustom nnir-imap-default-search-key "whole message"
"*The default IMAP search key for an nnir search. Must be one of
the keys in `nnir-imap-search-arguments'. To use raw imap queries
by default set this to \"Imap\"."
by default set this to \"imap\"."
:version "24.1"
:type `(choice ,@(mapcar (lambda (elem) (list 'const (car elem)))
nnir-imap-search-arguments))
@ -546,17 +546,17 @@ that it is for notmuch, not Namazu."
,nnir-imap-default-search-key ; default
)))
(gmane nnir-run-gmane
((author . "Gmane Author: ")))
((gmane-author . "Gmane Author: ")))
(swish++ nnir-run-swish++
((group . "Swish++ Group spec: ")))
((swish++-group . "Swish++ Group spec: ")))
(swish-e nnir-run-swish-e
((group . "Swish-e Group spec: ")))
((swish-e-group . "Swish-e Group spec: ")))
(namazu nnir-run-namazu
())
(notmuch nnir-run-notmuch
())
(hyrex nnir-run-hyrex
((group . "Hyrex Group spec: ")))
((hyrex-group . "Hyrex Group spec: ")))
(find-grep nnir-run-find-grep
((grep-options . "Grep options: "))))
"Alist of supported search engines.
@ -576,69 +576,113 @@ needs the variables `nnir-namazu-program',
Add an entry here when adding a new search engine.")
(defcustom nnir-method-default-engines
'((nnimap . imap)
(nntp . gmane))
(defcustom nnir-method-default-engines '((nnimap . imap) (nttp . gmane))
"*Alist of default search engines keyed by server method."
:version "24.1"
:group 'nnir
:type `(repeat (cons (choice (const nnimap) (const nttp) (const nnspool)
(const nneething) (const nndir) (const nnmbox)
(const nnml) (const nnmh) (const nndraft)
(const nnfolder) (const nnmaildir))
(choice
,@(mapcar (lambda (elem) (list 'const (car elem)))
nnir-engines))))
:group 'nnir)
nnir-engines)))))
;; Gnus glue.
(defun gnus-group-make-nnir-group (nnir-extra-parms &optional parms)
"Create an nnir group. Asks for query."
(defun gnus-group-make-nnir-group (nnir-extra-parms &optional specs)
"Create an nnir group. Prompt for a search query and determine
the groups to search as follows: if called from the *Server*
buffer search all groups belonging to the server on the current
line; if called from the *Group* buffer search any marked groups,
or the group on the current line, or all the groups under the
current topic. Calling with a prefix-arg prompts for additional
search-engine specific constraints. A non-nil `specs' arg must be
an alist with `nnir-query-spec' and `nnir-group-spec' keys, and
skips all prompting."
(interactive "P")
(setq nnir-current-query nil
nnir-current-server nil
nnir-current-group-marked nil
nnir-artlist nil)
(let* ((query (unless parms (read-string "Query: " nil 'nnir-search-history)))
(parms (or parms (list (cons 'query query))))
(srv (or (cdr (assq 'server parms)) (gnus-server-server-name) "nnir")))
(add-to-list 'parms (cons 'unique-id (message-unique-id)) t)
(let* ((group-spec
(or (cdr (assoc 'nnir-group-spec specs))
(if (gnus-server-server-name)
(list (list (gnus-server-server-name)))
(nnir-categorize
(or gnus-group-marked
(if (gnus-group-group-name)
(list (gnus-group-group-name))
(cdr (assoc (gnus-group-topic-name) gnus-topic-alist))))
gnus-group-server))))
(query-spec
(or (cdr (assoc 'nnir-query-spec specs))
(apply
'append
(list (cons 'query
(read-string "Query: " nil 'nnir-search-history)))
(when nnir-extra-parms
(mapcar
(lambda (x)
(nnir-read-parms (nnir-server-to-search-engine (car x))))
group-spec))))))
(gnus-group-read-ephemeral-group
(concat "nnir:" (prin1-to-string parms)) (list 'nnir srv) t
(cons (current-buffer) gnus-current-window-configuration)
nil)))
(concat "nnir-" (message-unique-id))
(list 'nnir "nnir")
nil
; (cons (current-buffer) gnus-current-window-configuration)
nil
nil nil
(list
(cons 'nnir-specs (list (cons 'nnir-query-spec query-spec)
(cons 'nnir-group-spec group-spec)))
(cons 'nnir-artlist nil)))))
(defun gnus-summary-make-nnir-group (nnir-extra-parms)
"Search a group from the summary buffer."
(interactive "P")
(gnus-warp-to-article)
(let ((spec
(list
(cons 'nnir-group-spec
(list (list
(gnus-group-server gnus-newsgroup-name)
(list gnus-newsgroup-name)))))))
(gnus-group-make-nnir-group nnir-extra-parms spec)))
;; Gnus backend interface functions.
(deffoo nnir-open-server (server &optional definitions)
;; Just set the server variables appropriately.
(add-hook 'gnus-summary-mode-hook 'nnir-mode)
(nnoo-change-server 'nnir server definitions))
(let ((backend (car (gnus-server-to-method server))))
(if backend
(nnoo-change-server backend server definitions)
(add-hook 'gnus-summary-mode-hook 'nnir-mode)
(nnoo-change-server 'nnir server definitions))))
(deffoo nnir-request-group (group &optional server fast info)
"GROUP is the query string."
(nnir-possibly-change-server server)
;; Check for cache and return that if appropriate.
(if (and (equal group nnir-current-query)
(equal gnus-group-marked nnir-current-group-marked)
(or (null server)
(equal server nnir-current-server)))
nnir-artlist
;; Cache miss.
(setq nnir-artlist (nnir-run-query group)))
(with-current-buffer nntp-server-buffer
(setq nnir-current-query group)
(when server (setq nnir-current-server server))
(setq nnir-current-group-marked gnus-group-marked)
(if (zerop (length nnir-artlist))
(nnheader-report 'nnir "Search produced empty results.")
;; Remember data for cache.
(nnheader-insert "211 %d %d %d %s\n"
(nnir-artlist-length nnir-artlist) ; total #
1 ; first #
(nnir-artlist-length nnir-artlist) ; last #
group)))) ; group name
(deffoo nnir-request-group (group &optional server dont-check info)
(nnir-possibly-change-group group server)
(let ((pgroup (if (gnus-group-prefixed-p group)
group
(gnus-group-prefixed-name group '(nnir "nnir"))))
length)
;; Check for cached search result or run the query and cache the
;; result.
(unless (and nnir-artlist dont-check)
(gnus-group-set-parameter
pgroup 'nnir-artlist
(setq nnir-artlist
(nnir-run-query
(gnus-group-get-parameter pgroup 'nnir-specs t))))
(nnir-request-update-info pgroup (gnus-get-info pgroup)))
(with-current-buffer nntp-server-buffer
(if (zerop (setq length (nnir-artlist-length nnir-artlist)))
(progn
(nnir-close-group group)
(nnheader-report 'nnir "Search produced empty results."))
(nnheader-insert "211 %d %d %d %s\n"
length ; total #
1 ; first #
length ; last #
group)))) ; group name
nnir-artlist)
(deffoo nnir-retrieve-headers (articles &optional group server fetch-old)
(with-current-buffer nntp-server-buffer
@ -654,13 +698,7 @@ Add an entry here when adding a new search engine.")
(server (gnus-group-server artgroup))
(gnus-override-method (gnus-server-to-method server))
parsefunc)
;; (or (numberp art)
;; (nnheader-report
;; 'nnir
;; "nnir-retrieve-headers doesn't grok message ids: %s"
;; art))
(nnir-possibly-change-server server)
;; is this needed?
;; (nnir-possibly-change-group nil server)
(erase-buffer)
(case (setq gnus-headers-retrieved-by
(or
@ -694,6 +732,7 @@ Add an entry here when adding a new search engine.")
'nov)))
(deffoo nnir-request-article (article &optional group server to-buffer)
(nnir-possibly-change-group group server)
(if (and (stringp article)
(not (eq 'nnimap (car (gnus-server-to-method server)))))
(nnheader-report
@ -702,35 +741,35 @@ Add an entry here when adding a new search engine.")
server)
(save-excursion
(let ((article article)
query)
(when (stringp article)
(setq gnus-override-method (gnus-server-to-method server))
(setq query
(list
(cons 'query (format "HEADER Message-ID %s" article))
(cons 'unique-id article)
(cons 'criteria "")
(cons 'shortcut t)))
(unless (and (equal query nnir-current-query)
(equal server nnir-current-server))
(setq nnir-artlist (nnir-run-imap query server))
(setq nnir-current-query query)
(setq nnir-current-server server))
(setq article 1))
(unless (zerop (length nnir-artlist))
(let ((artfullgroup (nnir-article-group article))
(artno (nnir-article-number article)))
(message "Requesting article %d from group %s"
artno artfullgroup)
(if to-buffer
(with-current-buffer to-buffer
(let ((gnus-article-decode-hook nil))
(gnus-request-article-this-buffer artno artfullgroup)))
(gnus-request-article artno artfullgroup))
(cons artfullgroup artno)))))))
query)
(when (stringp article)
(setq gnus-override-method (gnus-server-to-method server))
(setq query
(list
(cons 'query (format "HEADER Message-ID %s" article))
(cons 'criteria "")
(cons 'shortcut t)))
(unless (and nnir-artlist (equal query nnir-memo-query)
(equal server nnir-memo-server))
(setq nnir-artlist (nnir-run-imap query server)
nnir-memo-query query
nnir-memo-server server))
(setq article 1))
(unless (zerop (nnir-artlist-length nnir-artlist))
(let ((artfullgroup (nnir-article-group article))
(artno (nnir-article-number article)))
(message "Requesting article %d from group %s"
artno artfullgroup)
(if to-buffer
(with-current-buffer to-buffer
(let ((gnus-article-decode-hook nil))
(gnus-request-article-this-buffer artno artfullgroup)))
(gnus-request-article artno artfullgroup))
(cons artfullgroup artno)))))))
(deffoo nnir-request-move-article (article group server accept-form
&optional last internal-move-group)
(nnir-possibly-change-group group server)
(let* ((artfullgroup (nnir-article-group article))
(artno (nnir-article-number article))
(to-newsgroup (nth 1 accept-form))
@ -751,6 +790,7 @@ Add an entry here when adding a new search engine.")
(gnus-group-real-name to-newsgroup)))))
(deffoo nnir-request-expire-articles (articles group &optional server force)
(nnir-possibly-change-group group server)
(if force
(let ((articles-by-group (nnir-categorize
articles nnir-article-group nnir-article-ids))
@ -772,20 +812,79 @@ Add an entry here when adding a new search engine.")
articles))
(deffoo nnir-warp-to-article ()
(nnir-possibly-change-group gnus-newsgroup-name)
(let* ((cur (if (> (gnus-summary-article-number) 0)
(gnus-summary-article-number)
(error "This is not a real article")))
(error "Can't warp to a pseudo-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)
;; what should we do here? we could leave all the buffers around
;; and assume that we have to exit from them one by one. or we can
;; try to clean up directly
;;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))
; (when (not (eq (cdr quit-config) 'group))
; (gnus-summary-exit))
(gnus-summary-read-group-1 backend-article-group t t nil
nil (list backend-article-number))))
nil (list backend-article-number))))
(deffoo nnir-request-update-info (group info &optional server)
(let ((articles-by-group
(nnir-categorize
(number-sequence 1 (nnir-artlist-length nnir-artlist))
nnir-article-group nnir-article-ids)))
(gnus-set-active group
(cons 1 (nnir-artlist-length nnir-artlist)))
(while (not (null articles-by-group))
(let* ((group-articles (pop articles-by-group))
(articleids (reverse (cadr group-articles)))
(group-info (gnus-get-info (car group-articles)))
(marks (gnus-info-marks group-info))
(read (gnus-info-read group-info)))
(gnus-info-set-read
info
(gnus-add-to-range
(gnus-info-read info)
(remove nil (mapcar (lambda (art)
(let ((num (cdr art)))
(when (gnus-member-of-range num read)
(car art)))) articleids))))
(mapc (lambda (mark)
(let ((type (car mark))
(range (cdr mark)))
(gnus-add-marked-articles
group
type
(remove nil
(mapcar
(lambda (art)
(let ((num (cdr art)))
(when (gnus-member-of-range num range)
(car art))))
articleids))))) marks)))))
(deffoo nnir-close-group (group &optional server)
(let ((pgroup (if (gnus-group-prefixed-p group)
group
(gnus-group-prefixed-name group '(nnir "nnir")))))
(when (and nnir-artlist (not (gnus-ephemeral-group-p pgroup)))
(gnus-group-set-parameter pgroup 'nnir-artlist nnir-artlist))
(setq nnir-artlist nil)
(when (gnus-ephemeral-group-p pgroup)
(gnus-kill-ephemeral-group pgroup)
(setq gnus-ephemeral-servers
(delq (assq 'nnir gnus-ephemeral-servers)
gnus-ephemeral-servers)))))
;; (gnus-opened-servers-remove
;; (car (assoc '(nnir "nnir-ephemeral" (nnir-address "nnir"))
;; gnus-opened-servers))))
(nnoo-define-skeleton nnir)
@ -813,7 +912,7 @@ ready to be added to the list of search results."
;; remove trailing slash and, for nnmaildir, cur/new/tmp
(setq dirnam
(substring dirnam 0
(if (string-match "^nnmaildir:" (gnus-group-server server))
(if (string-match "\\`nnmaildir:" (gnus-group-server server))
-5 -1)))
;; Set group to dirnam without any leading dots or slashes,
@ -823,7 +922,7 @@ ready to be added to the list of search results."
"[/\\]" "." t)))
(vector (gnus-group-full-name group server)
(if (string-match "^nnmaildir:" (gnus-group-server server))
(if (string-match "\\`nnmaildir:" (gnus-group-server server))
(nnmaildir-base-name-to-article-number
(substring article 0 (string-match ":" article))
group nil)
@ -850,35 +949,36 @@ details on the language and supported extensions."
(apply
'vconcat
(catch 'found
(mapcar
(lambda (group)
(let (artlist)
(condition-case ()
(when (nnimap-possibly-change-group
(gnus-group-short-name group) server)
(with-current-buffer (nnimap-buffer)
(message "Searching %s..." group)
(let ((arts 0)
(result (nnimap-command "UID SEARCH %s"
(if (string= criteria "")
qstring
(nnir-imap-make-query
criteria qstring)))))
(mapc
(lambda (artnum)
(let ((artn (string-to-number artnum)))
(when (> artn 0)
(push (vector group artn 100)
artlist)
(when (assq 'shortcut query)
(throw 'found (list artlist)))
(setq arts (1+ arts)))))
(and (car result) (cdr (assoc "SEARCH" (cdr result)))))
(message "Searching %s... %d matches" group arts)))
(message "Searching %s...done" group))
(quit nil))
(nreverse artlist)))
groups))))))
(mapcar
(lambda (group)
(let (artlist)
(condition-case ()
(when (nnimap-possibly-change-group
(gnus-group-short-name group) server)
(with-current-buffer (nnimap-buffer)
(message "Searching %s..." group)
(let ((arts 0)
(result (nnimap-command "UID SEARCH %s"
(if (string= criteria "")
qstring
(nnir-imap-make-query
criteria qstring)))))
(mapc
(lambda (artnum)
(let ((artn (string-to-number artnum)))
(when (> artn 0)
(push (vector group artn 100)
artlist)
(when (assq 'shortcut query)
(throw 'found (list artlist)))
(setq arts (1+ arts)))))
(and (car result)
(cdr (assoc "SEARCH" (cdr result)))))
(message "Searching %s... %d matches" group arts)))
(message "Searching %s...done" group))
(quit nil))
(nreverse artlist)))
groups))))))
(defun nnir-imap-make-query (criteria qstring)
"Parse the query string and criteria into an appropriate IMAP search
@ -1073,14 +1173,14 @@ Windows NT 4.0."
(save-excursion
(let ( (qstring (cdr (assq 'query query)))
(groupspec (cdr (assq 'group query)))
(groupspec (cdr (assq 'swish++-group query)))
(prefix (nnir-read-server-parm 'nnir-swish++-remove-prefix server))
artlist
;; nnml-use-compressed-files might be any string, but probably this
;; is sufficient. Note that we can't only use the value of
;; nnml-use-compressed-files because old articles might have been
;; saved with a different value.
(article-pattern (if (string-match "^nnmaildir:"
(article-pattern (if (string-match "\\`nnmaildir:"
(gnus-group-server server))
":[0-9]+"
"^[0-9]+\\(\\.[a-z0-9]+\\)?$"))
@ -1247,7 +1347,7 @@ Tested with swish-e-2.0.1 on Windows NT 4.0."
(defun nnir-run-hyrex (query server &optional group)
(save-excursion
(let ((artlist nil)
(groupspec (cdr (assq 'group query)))
(groupspec (cdr (assq 'hyrex-group query)))
(qstring (cdr (assq 'query query)))
(prefix (nnir-read-server-parm 'nnir-hyrex-remove-prefix server))
score artno dirnam)
@ -1323,7 +1423,7 @@ Tested with Namazu 2.0.6 on a GNU/Linux system."
;; (when group
;; (error "The Namazu backend cannot search specific groups"))
(save-excursion
(let ((article-pattern (if (string-match "^nnmaildir:"
(let ((article-pattern (if (string-match "\\`nnmaildir:"
(gnus-group-server server))
":[0-9]+"
"^[0-9]+$"))
@ -1394,10 +1494,10 @@ actually)."
(save-excursion
(let ( (qstring (cdr (assq 'query query)))
(groupspec (cdr (assq 'group query)))
(groupspec (cdr (assq 'notmuch-group query)))
(prefix (nnir-read-server-parm 'nnir-notmuch-remove-prefix server))
artlist
(article-pattern (if (string-match "^nnmaildir:"
(article-pattern (if (string-match "\\`nnmaildir:"
(gnus-group-server server))
":[0-9]+"
"^[0-9]+$"))
@ -1467,24 +1567,23 @@ actually)."
(directory (cadr (assoc sym (cddr method))))
(regexp (cdr (assoc 'query query)))
(grep-options (cdr (assoc 'grep-options query)))
(grouplist (or grouplist (nnir-get-active server)))
artlist)
(grouplist (or grouplist (nnir-get-active server))))
(unless directory
(error "No directory found in method specification of server %s"
server))
(apply
'vconcat
(mapcar (lambda (x)
(let ((group x))
(let ((group x)
artlist)
(message "Searching %s using find-grep..."
(or group server))
(save-window-excursion
(set-buffer (get-buffer-create nnir-tmp-buffer))
(erase-buffer)
(if (> gnus-verbose 6)
(pop-to-buffer (current-buffer)))
(cd directory) ; Using relative paths simplifies
; postprocessing.
; postprocessing.
(let ((group
(if (not group)
"."
@ -1507,7 +1606,8 @@ actually)."
(save-excursion
(apply
'call-process "find" nil t
"find" group "-type" "f" "-name" "[0-9]*" "-exec"
"find" group "-maxdepth" "1" "-type" "f"
"-name" "[0-9]*" "-exec"
"grep"
`("-l" ,@(and grep-options
(split-string grep-options "\\s-" t))
@ -1557,8 +1657,8 @@ actually)."
(error "Can't search non-gmane groups: %s" x)))
groups " "))
(authorspec
(if (assq 'author query)
(format "author:%s" (cdr (assq 'author query))) ""))
(if (assq 'gmane-author query)
(format "author:%s" (cdr (assq 'gmane-author query))) ""))
(search (format "%s %s %s"
qstring groupspec authorspec))
(gnus-inhibit-demon t)
@ -1594,11 +1694,10 @@ actually)."
;;; Util Code:
(defun nnir-read-parms (query nnir-search-engine)
(defun nnir-read-parms (nnir-search-engine)
"Reads additional search parameters according to `nnir-engines'."
(let ((parmspec (caddr (assoc nnir-search-engine nnir-engines))))
(append query
(mapcar 'nnir-read-parm parmspec))))
(mapcar 'nnir-read-parm parmspec)))
(defun nnir-read-parm (parmspec)
"Reads a single search parameter.
@ -1612,46 +1711,23 @@ actually)."
(cons sym (format (cdr mapping) result)))
(cons sym (read-string prompt)))))
(autoload 'gnus-group-topic-name "gnus-topic")
(defun nnir-run-query (specs)
"Invoke appropriate search engine function (see `nnir-engines')."
(apply 'vconcat
(mapcar
(lambda (x)
(let* ((server (car x))
(search-engine (nnir-server-to-search-engine server))
(search-func (cadr (assoc search-engine nnir-engines))))
(and search-func
(funcall search-func (cdr (assq 'nnir-query-spec specs))
server (cadr x)))))
(cdr (assq 'nnir-group-spec specs)))))
(defun nnir-run-query (query)
"Invoke appropriate search engine function (see `nnir-engines').
If some groups were process-marked, run the query for each of the groups
and concat the results."
(let ((q (car (read-from-string query)))
(groups (if (not (string= "nnir" nnir-address))
(list (list nnir-address))
(nnir-categorize
(or gnus-group-marked
(if (gnus-group-group-name)
(list (gnus-group-group-name))
(cdr (assoc (gnus-group-topic-name)
gnus-topic-alist))))
gnus-group-server))))
(apply 'vconcat
(mapcar
(lambda (x)
(let* ((server (car x))
(nnir-search-engine
(or (nnir-read-server-parm 'nnir-search-engine
server t)
(cdr (assoc (car
(gnus-server-to-method server))
nnir-method-default-engines))))
search-func)
(setq search-func (cadr (assoc nnir-search-engine
nnir-engines)))
(if search-func
(funcall
search-func
(if nnir-extra-parms
(or (and (eq nnir-search-engine 'imap)
(assq 'criteria q) q)
(setq q (nnir-read-parms q nnir-search-engine)))
q)
server (cadr x))
nil)))
groups))))
(defun nnir-server-to-search-engine (server)
(or (nnir-read-server-parm 'nnir-search-engine server t)
(cdr (assoc (car (gnus-server-to-method server))
nnir-method-default-engines))))
(defun nnir-read-server-parm (key server &optional not-global)
"Returns the parameter value corresponding to `key' for
@ -1663,36 +1739,43 @@ environment unless `not-global' is non-nil."
((and (not not-global) (boundp key)) (symbol-value key))
(t nil))))
(defun nnir-possibly-change-group (group &optional server)
(or (not server) (nnir-server-opened server) (nnir-open-server server))
(when (and group (string-match "\\`nnir" group))
(setq nnir-artlist (gnus-group-get-parameter
(gnus-group-prefixed-name
(gnus-group-short-name group) '(nnir "nnir"))
'nnir-artlist t))))
(defun nnir-possibly-change-server (server)
(unless (and server (nnir-server-opened server))
(nnir-open-server server)))
(defun nnir-server-opened (&optional server)
(let ((backend (car (gnus-server-to-method server))))
(nnoo-current-server-p (or backend 'nnir) server)))
(defun nnir-search-thread (header)
"Make an nnir group based on the thread containing the article header"
(let ((parm (list
(cons 'query
(nnimap-make-thread-query header))
(cons 'criteria "")
(cons 'server (gnus-method-to-server
(gnus-find-method-for-group
gnus-newsgroup-name))))))
(gnus-group-make-nnir-group nil parm)
"Make an nnir group based on the thread containing the article
header. The current server will be searched. If the registry is
installed, the server that the registry reports the current
article came from is also searched."
(let* ((query
(list (cons 'query (nnimap-make-thread-query header))
(cons 'criteria "")))
(server
(list (list (gnus-method-to-server
(gnus-find-method-for-group gnus-newsgroup-name)))))
(registry-group (and
(gnus-bound-and-true-p 'gnus-registry-enabled)
(car (gnus-registry-get-id-key
(mail-header-id header) 'group))))
(registry-server
(and registry-group
(gnus-method-to-server
(gnus-find-method-for-group registry-group)))))
(when registry-server (add-to-list 'server (list registry-server)))
(gnus-group-make-nnir-group nil (list
(cons 'nnir-query-spec query)
(cons 'nnir-group-spec server)))
(gnus-summary-goto-subject (gnus-id-to-article (mail-header-id header)))))
;; unused?
(defun nnir-artlist-groups (artlist)
"Returns a list of all groups in the given ARTLIST."
(let ((res nil)
(with-dups nil))
;; from each artitem, extract group component
(setq with-dups (mapcar 'nnir-artitem-group artlist))
;; remove duplicates from above
(mapc (function (lambda (x) (add-to-list 'res x)))
with-dups)
res))
(defun nnir-get-active (srv)
(let ((method (gnus-server-to-method srv))
groups)
@ -1758,6 +1841,46 @@ environment unless `not-global' is non-nil."
(deffoo nnir-request-create-group (group &optional server args)
(message "Creating nnir group %s" group)
(let ((group (gnus-group-prefixed-name group '(nnir "nnir")))
(query-spec
(list (cons 'query
(read-string "Query: " nil 'nnir-search-history))))
(group-spec (list (list (read-string "Server: " nil nil)))))
(gnus-group-set-parameter
group 'nnir-specs
(list (cons 'nnir-query-spec query-spec)
(cons 'nnir-group-spec group-spec)))
(gnus-group-set-parameter
group 'nnir-artlist
(setq nnir-artlist
(nnir-run-query
(list (cons 'nnir-query-spec query-spec)
(cons 'nnir-group-spec group-spec)))))
(nnir-request-update-info group (gnus-get-info group)))
t)
(deffoo nnir-request-delete-group (group &optional force server)
t)
(deffoo nnir-request-list (&optional server)
t)
(deffoo nnir-request-scan (group method)
(if group
(let ((pgroup (if (gnus-group-prefixed-p group)
group
(gnus-group-prefixed-name group '(nnir "nnir")))))
(gnus-group-set-parameter
pgroup 'nnir-artlist
(setq nnir-artlist
(nnir-run-query
(gnus-group-get-parameter pgroup 'nnir-specs t))))
(nnir-request-update-info pgroup (gnus-get-info pgroup)))
t))
;; The end.
(provide 'nnir)

Some files were not shown because too many files have changed in this diff Show More