1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-15 09:47:20 +00:00

Merge branch 'trunk' into xwidget

Conflicts:
	src/xdisp.c
This commit is contained in:
Joakim Verona 2013-07-14 11:04:49 +02:00
commit 0bb9bb0841
212 changed files with 7348 additions and 3365 deletions

View File

@ -1,3 +1,67 @@
2013-07-13 Paul Eggert <eggert@cs.ucla.edu>
* configure.ac: Simplify --with-file-notification handling.
2013-07-12 Glenn Morris <rgm@gnu.org>
* configure.ac: If with-file-notification=yes, if gfile not found,
go on to try inotify (not on MS Windows or Nextstep).
2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
Fix races with threads and file descriptors.
* configure.ac (PTY_TTY_NAME_SPRINTF): Use emacs_close, not close.
2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
* Makefile.in (removenullpaths): Remove adjacent null paths (Bug#14835).
2013-07-09 Peter Rosin <peda@lysator.liu.se> (tiny change>
* configure.ac (HAVE_W32): Avoid nested functions (the second
argument of AC_LANG_PROGRAM is already expanded inside a
function). (Bug#14830)
2013-07-09 Paul Eggert <eggert@cs.ucla.edu>
Port recent close-on-exec changes to Cygwin (Bug#14821).
* lib/binary-io.c, lib/binary-io.h: New files.
Merge from gnulib, incorporating:
2013-07-09 accept4, dup3, pipe2: port to Cygwin
* lib/pipe2.c: Update from gnulib, as part of this merge.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
Handle errno and exit status a bit more carefully.
* lib/ignore-value.h: Remove this gnulib-imported file.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
2013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change)
* configure.ac (HAVE_IMAGEMAGICK): Check on NS also (Bug#14798).
2013-07-08 Paul Eggert <eggert@cs.ucla.edu>
Try to fix FreeBSD 9.1 porting problem (Bug#14812).
This incorporates the following merge from gnulib:
2013-07-07 stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11
2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
Port to Ubuntu 10 (Bug#14803).
* configure.ac (accept4): New function to check for.
Make file descriptors close-on-exec when possible (Bug#14803).
* configure.ac (mkostemp): New function to check for.
(PTY_OPEN): Pass O_CLOEXEC to posix_openpt.
* lib/fcntl.c, lib/getdtablesize.c, lib/pipe2.c, m4/fcntl.m4:
* m4/getdtablesize.m4, m4/pipe2.m4: New files, taken from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
2013-07-03 Christoph Egger <christoph@debian.org> (tiny change)
* configure.ac (emacs_broken_SIGIO): Set on gnu-kfreebsd to avoid hang.
http://bugs.debian.org/712974
2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
Remove some unused macros from 'configure'.
@ -31,7 +95,7 @@
* Makefile.in (install-arch-indep): Do not create directories passed
with --enable-locallisppath.
2013-06-24 Glenn Morris <rgm@fencepost.gnu.org>
2013-06-24 Glenn Morris <rgm@gnu.org>
* configure.ac: Include X11/X.h when testing for Xft.h. (Bug#14684)

View File

@ -293,7 +293,7 @@ all: ${SUBDIR}
.PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 FRC
removenullpaths=sed -e 's/^://g' -e 's/:$$//g' -e 's/::/:/g'
removenullpaths=sed -e 's/^:*//' -e 's/:*$$//g' -e 's/::*/:/g'
# Generate epaths.h from epaths.in. This target is invoked by `configure'.
# See comments in configure.ac for why it is done this way, as opposed

View File

@ -1,3 +1,36 @@
2013-07-12 Glenn Morris <rgm@gnu.org>
* admin.el (manual-style-string): Use non-abbreviated url.
2013-07-09 Paul Eggert <eggert@cs.ucla.edu>
Port recent close-on-exec changes to Cygwin (Bug#14821).
* merge-gnulib (GNULIB_TOOL_FLAGS): Don't avoid binary-io.
Handle error numbers a bit more reliably.
* merge-gnulib (GNULIB_MODULES): Remove ignore-value.
2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
Make file descriptors close-on-exec when possible (Bug#14803).
* merge-gnulib (GNULIB_MODULES): Add fcntl, pipe2.
(GNULIB_TOOL_FLAGS): Avoid binary-io, close. Do not avoid fcntl.
2013-07-06 Glenn Morris <rgm@gnu.org>
* admin.el (manual-misc-manuals): New function.
(make-manuals): Avoid hard-coding list of misc manuals.
Add the option to only make certain type(s) of output.
(manual-misc-html): Special-case ccmode and efaq.
(manual-html-mono, manual-html-node, manual-pdf, manual-ps):
Move creation of output directory here from make-manuals.
(manual-html-fix-index-2): Avoid dynamic reference to `f'.
2013-07-05 Glenn Morris <rgm@gnu.org>
* admin.el (make-manuals): Use a standard location for lispintro.
Use a pdf/ subdirectory for pdf versions.
2013-06-29 Glenn Morris <rgm@gnu.org>
* admin.el (make-manuals): Don't bother with txt or dvi any more.

View File

@ -18,6 +18,20 @@ in the web pages repository. E.g.:
Redirect /software/emacs/manual/html_mono/automake.html /software/automake/manual/automake.html
Redirect /software/emacs/manual/html_node/automake/ /software/automake/manual/html_node/
Another tool you can use to check links is gnu.org's linc.py:
http://www.gnu.org/server/source/
You run this something like:
cd /path/to/cvs/emacs-www
linc.py -o /path/to/output-dir --url http://www.gnu.org/software/emacs/ .
Be warned that it is really, really slow (as in, can take ~ a full day
to check the manual/ directory). It is probably best to run it on a
single directory at a time from eg manual/html_node. It is very
inefficient, but may reveal a few things that info-xref does not.
make emacs.dvi, elisp.dvi, and deal with any errors (undefined
references etc) in the output. Break any overfull lines.
Underfull hboxes are not serious, but it can be nice to get rid of

View File

@ -193,58 +193,82 @@ Root must be the root of an Emacs source tree."
;;; Various bits of magic for generating the web manuals
(defun make-manuals (root)
"Generate the web manuals for the Emacs webpage."
(interactive "DEmacs root directory: ")
(defun manual-misc-manuals (root)
"Return doc/misc manuals as list of strings."
;; Like `make -C doc/misc echo-info', but works if unconfigured.
(with-temp-buffer
(insert-file-contents (expand-file-name "doc/misc/Makefile.in" root))
(search-forward "INFO_TARGETS = ")
(let ((start (point))
res)
(end-of-line)
(while (and (looking-back "\\\\")
(zerop (forward-line 1)))
(end-of-line))
(split-string (replace-regexp-in-string
"\\(\\\\\\|\\.info\\)" ""
(buffer-substring start (point)))))))
(defun make-manuals (root &optional type)
"Generate the web manuals for the Emacs webpage.
Interactively with a prefix argument, prompt for TYPE.
Optional argument TYPE is type of output (nil means all)."
(interactive (let ((root (read-directory-name "Emacs root directory: "
source-directory nil t)))
(list root
(if current-prefix-arg
(completing-read
"Type: "
(append
'("misc" "pdf" "ps")
(let (res)
(dolist (i '("emacs" "elisp" "eintr") res)
(dolist (j '("" "-mono" "-node" "-ps" "-pdf"))
(push (concat i j) res))))
(manual-misc-manuals root)))))))
(let* ((dest (expand-file-name "manual" root))
(html-node-dir (expand-file-name "html_node" dest))
(html-mono-dir (expand-file-name "html_mono" dest))
(ps-dir (expand-file-name "ps" dest)))
(ps-dir (expand-file-name "ps" dest))
(pdf-dir (expand-file-name "pdf" dest))
(emacs (expand-file-name "doc/emacs/emacs.texi" root))
(elisp (expand-file-name "doc/lispref/elisp.texi" root))
(eintr (expand-file-name "doc/lispintro/emacs-lisp-intro.texi" root))
(misc (manual-misc-manuals root)))
;; TODO this makes it non-continuable.
;; Instead, delete the individual dest directory each time.
(when (file-directory-p dest)
(if (y-or-n-p (format "Directory %s exists, delete it first?" dest))
(if (y-or-n-p (format "Directory %s exists, delete it first? " dest))
(delete-directory dest t)
(error "Aborted")))
(make-directory dest)
(make-directory html-node-dir)
(make-directory html-mono-dir)
(make-directory ps-dir)
;; Emacs manual
(let ((texi (expand-file-name "doc/emacs/emacs.texi" root)))
(manual-html-node texi (expand-file-name "emacs" html-node-dir))
(manual-html-mono texi (expand-file-name "emacs.html" html-mono-dir))
(manual-pdf texi (expand-file-name "emacs.pdf" dest))
(manual-ps texi (expand-file-name "emacs.ps" ps-dir)))
;; Lisp manual
(let ((texi (expand-file-name "doc/lispref/elisp.texi" root)))
(manual-html-node texi (expand-file-name "elisp" html-node-dir))
(manual-html-mono texi (expand-file-name "elisp.html" html-mono-dir))
(manual-pdf texi (expand-file-name "elisp.pdf" dest))
(manual-ps texi (expand-file-name "elisp.ps" ps-dir)))
(let ((texi (expand-file-name "doc/lispintro/emacs-lisp-intro.texi" root))
(dest (expand-file-name "emacs-lisp-intro" dest))
dest2)
;; Mimic the atypical directory layout used for emacs-lisp-intro.
(make-directory dest)
(make-directory (setq dest2 (expand-file-name "html_node" dest)))
(manual-html-node texi dest2)
(make-directory (setq dest2 (expand-file-name "html_mono" dest)))
(manual-html-mono texi (expand-file-name "emacs-lisp-intro.html" dest2))
(manual-pdf texi (expand-file-name "emacs-lisp-intro.pdf" dest))
(make-directory (setq dest2 (expand-file-name "ps" dest)))
(manual-ps texi (expand-file-name "emacs-lisp-intro.ps" dest2)))
(user-error "Aborted")))
(if (member type '(nil "emacs" "emacs-node"))
(manual-html-node emacs (expand-file-name "emacs" html-node-dir)))
(if (member type '(nil "emacs" "emacs-mono"))
(manual-html-mono emacs (expand-file-name "emacs.html" html-mono-dir)))
(if (member type '(nil "emacs" "emacs-pdf" "pdf"))
(manual-pdf emacs (expand-file-name "emacs.pdf" pdf-dir)))
(if (member type '(nil "emacs" "emacs-ps" "ps"))
(manual-ps emacs (expand-file-name "emacs.ps" ps-dir)))
(if (member type '(nil "elisp" "elisp-node"))
(manual-html-node elisp (expand-file-name "elisp" html-node-dir)))
(if (member type '(nil "elisp" "elisp-mono"))
(manual-html-mono elisp (expand-file-name "elisp.html" html-mono-dir)))
(if (member type '(nil "elisp" "elisp-pdf" "pdf"))
(manual-pdf elisp (expand-file-name "elisp.pdf" pdf-dir)))
(if (member type '(nil "elisp" "elisp-ps" "ps"))
(manual-ps elisp (expand-file-name "elisp.ps" ps-dir)))
(if (member type '(nil "eintr" "eintr-node"))
(manual-html-node eintr (expand-file-name "eintr" html-node-dir)))
(if (member type '(nil "eintr" "eintr-node"))
(manual-html-mono eintr (expand-file-name "eintr.html" html-mono-dir)))
(if (member type '(nil "eintr" "eintr-pdf" "pdf"))
(manual-pdf eintr (expand-file-name "eintr.pdf" pdf-dir)))
(if (member type '(nil "eintr" "eintr-ps" "ps"))
(manual-ps eintr (expand-file-name "eintr.ps" ps-dir)))
;; Misc manuals
(let ((manuals '("ada-mode" "auth" "autotype" "bovine" "calc" "cc-mode"
"cl" "dbus" "dired-x" "ebrowse" "ede" "ediff"
"edt" "eieio" "emacs-gnutls" "emacs-mime" "epa" "erc" "ert"
"eshell" "eudc" "faq" "flymake" "forms"
"gnus" "htmlfontify" "idlwave" "info"
"mairix-el" "message" "mh-e" "newsticker"
"nxml-mode" "org" "pcl-cvs" "pgg" "rcirc"
"reftex" "remember" "sasl" "sc" "semantic"
"ses" "sieve" "smtpmail" "speedbar" "srecode" "tramp"
"url" "vip" "viper" "widget" "wisent" "woman")))
(dolist (manual manuals)
(manual-misc-html manual root html-node-dir html-mono-dir)))
(dolist (manual misc)
(if (member type `(nil ,manual "misc"))
(manual-misc-html manual root html-node-dir html-mono-dir)))
(message "Manuals created in %s" dest)))
(defconst manual-doctype-string
@ -259,10 +283,15 @@ Root must be the root of an Emacs source tree."
<meta name=\"DC.title\" content=\"gnu.org\">\n\n")
(defconst manual-style-string "<style type=\"text/css\">
@import url('/s/emacs/manual.css');\n</style>\n")
@import url('/software/emacs/manual.css');\n</style>\n")
(defun manual-misc-html (name root html-node-dir html-mono-dir)
(let ((texi (expand-file-name (format "doc/misc/%s.texi" name) root)))
;; Hack to deal with the cases where .texi creates a different .info.
;; Blech. TODO Why not just rename the .texi files?
(let* ((texiname (cond ((equal name "ccmode") "cc-mode")
((equal name "efaq") "faq")
(t name)))
(texi (expand-file-name (format "doc/misc/%s.texi" texiname) root)))
(manual-html-node texi (expand-file-name name html-node-dir))
(manual-html-mono texi (expand-file-name (concat name ".html")
html-mono-dir))))
@ -272,6 +301,7 @@ Root must be the root of an Emacs source tree."
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."
(make-directory (or (file-name-directory dest) ".") t)
(call-process "makeinfo" nil nil nil
"-D" "WWW_GNU_ORG"
"-I" (expand-file-name "../emacs"
@ -298,6 +328,7 @@ HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
the @import directive."
(unless (file-exists-p texi-file)
(error "Manual file %s not found" texi-file))
(make-directory dir t)
(call-process "makeinfo" nil nil nil
"-D" "WWW_GNU_ORG"
"-I" (expand-file-name "../emacs"
@ -334,6 +365,7 @@ the @import directive."
(defun manual-pdf (texi-file dest)
"Run texi2pdf on TEXI-FILE, emitting pdf output to DEST."
(make-directory (or (file-name-directory dest) ".") t)
(let ((default-directory (file-name-directory texi-file)))
(call-process "texi2pdf" nil nil nil
"-I" "../emacs" "-I" "../misc"
@ -341,6 +373,7 @@ the @import directive."
(defun manual-ps (texi-file dest)
"Generate a PostScript version of TEXI-FILE as DEST."
(make-directory (or (file-name-directory dest) ".") t)
(let ((dvi-dest (concat (file-name-sans-extension dest) ".dvi"))
(default-directory (file-name-directory texi-file)))
(call-process "texi2dvi" nil nil nil
@ -452,7 +485,8 @@ the @import directive."
(setq done t))
(t
(if (eobp)
(error "Parse error in %s" f)) ; f is bound in manual-html-node
(error "Parse error in %s"
(file-name-nondirectory buffer-file-name)))
(unless open-td
(setq done t))))
(forward-line 1))))

View File

@ -29,11 +29,11 @@ GNULIB_MODULES='
alloca-opt c-ctype c-strcase
careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512
dtoastr dtotimespec dup2 environ execinfo faccessat
fcntl-h fdatasync fdopendir filemode fstatat fsync
fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync
getloadavg getopt-gnu gettime gettimeofday
ignore-value intprops largefile lstat
intprops largefile lstat
manywarnings memrchr mktime
pselect pthread_sigmask putenv qacl readlink readlinkat
pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat
sig2str socklen stat-time stdalign stdarg stdbool stdio
strftime strtoimax strtoumax symlink sys_stat
sys_time time timer-time timespec-add timespec-sub unsetenv utimens
@ -41,8 +41,8 @@ GNULIB_MODULES='
'
GNULIB_TOOL_FLAGS='
--avoid=dup
--avoid=fchdir --avoid=fcntl --avoid=fstat
--avoid=close --avoid=dup
--avoid=fchdir --avoid=fstat
--avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow
--avoid=open --avoid=openat-die --avoid=opendir
--avoid=raise

View File

@ -3,9 +3,10 @@ entry in their name, not yours.
http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg00793.html
http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00485.html
There is no need to make trivial change log entries for files such
as NEWS, MAINTAINERS, and FOR-RELEASE.
There is no need to make change log entries for files such as NEWS,
MAINTAINERS, and FOR-RELEASE.
"There is no need" means you don't have to, but you can if you want to.
http://lists.gnu.org/archive/html/emacs-devel/2006-12/msg01135.html
There is no need to indicate regeneration of files such as configure

View File

@ -59,7 +59,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dup --avoid=fchdir --avoid=fcntl --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
@ -192,19 +192,20 @@ DIST_COMMON = $(srcdir)/../nt/gnulib.mk $(srcdir)/Makefile.am \
@BUILDING_FOR_WINDOWSNT_FALSE@ ftoastr.h dup2.c errno.in.h \
@BUILDING_FOR_WINDOWSNT_FALSE@ euidaccess.c execinfo.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ execinfo.in.h at-func.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ faccessat.c fcntl.in.h \
@BUILDING_FOR_WINDOWSNT_FALSE@ faccessat.c fcntl.c fcntl.in.h \
@BUILDING_FOR_WINDOWSNT_FALSE@ fdatasync.c fdopendir.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ filemode.h fpending.c fpending.h \
@BUILDING_FOR_WINDOWSNT_FALSE@ at-func.c fstatat.c fsync.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ getgroups.c getloadavg.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ getopt.c getopt.in.h getopt1.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ getdtablesize.c getgroups.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ getloadavg.c getopt.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ getopt.in.h getopt1.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ getopt_int.h gettimeofday.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ group-member.c ignore-value.h \
@BUILDING_FOR_WINDOWSNT_FALSE@ intprops.h inttypes.in.h lstat.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ memrchr.c mktime-internal.h \
@BUILDING_FOR_WINDOWSNT_FALSE@ mktime.c openat.h pathmax.h \
@BUILDING_FOR_WINDOWSNT_FALSE@ pselect.c pthread_sigmask.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ putenv.c acl-internal.h acl.h \
@BUILDING_FOR_WINDOWSNT_FALSE@ group-member.c intprops.h \
@BUILDING_FOR_WINDOWSNT_FALSE@ inttypes.in.h lstat.c memrchr.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ mktime-internal.h mktime.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ openat.h pathmax.h pselect.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ pthread_sigmask.c putenv.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ acl-internal.h acl.h \
@BUILDING_FOR_WINDOWSNT_FALSE@ acl_entries.c readlink.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ at-func.c readlinkat.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ root-uid.h sig2str.c sig2str.h \
@ -239,10 +240,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/euidaccess.m4 \
$(top_srcdir)/m4/execinfo.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/extern-inline.m4 \
$(top_srcdir)/m4/faccessat.m4 $(top_srcdir)/m4/fcntl_h.m4 \
$(top_srcdir)/m4/fdatasync.m4 $(top_srcdir)/m4/fdopendir.m4 \
$(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/fpending.m4 \
$(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/fsync.m4 \
$(top_srcdir)/m4/faccessat.m4 $(top_srcdir)/m4/fcntl.m4 \
$(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdatasync.m4 \
$(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/filemode.m4 \
$(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fstatat.m4 \
$(top_srcdir)/m4/fsync.m4 $(top_srcdir)/m4/getdtablesize.m4 \
$(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/getloadavg.m4 \
$(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettime.m4 \
$(top_srcdir)/m4/gettimeofday.m4 \
@ -255,7 +257,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memrchr.m4 \
$(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \
$(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \
$(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/pselect.m4 \
$(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/pipe2.m4 \
$(top_srcdir)/m4/pselect.m4 \
$(top_srcdir)/m4/pthread_sigmask.m4 $(top_srcdir)/m4/putenv.m4 \
$(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/readlinkat.m4 \
$(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/sha1.m4 \
@ -288,16 +291,18 @@ CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
libgnu_a_AR = $(AR) $(ARFLAGS)
am__DEPENDENCIES_1 =
am__libgnu_a_SOURCES_DIST = allocator.c c-ctype.h c-ctype.c \
c-strcase.h c-strcasecmp.c c-strncasecmp.c careadlinkat.c \
close-stream.c md5.c sha1.c sha256.c sha512.c dtoastr.c \
dtotimespec.c filemode.c gettext.h gettime.c acl-errno-valid.c \
file-has-acl.c qcopy-acl.c qset-acl.c stat-time.c strftime.c \
timespec.c timespec-add.c timespec-sub.c u64.c unistd.c \
utimens.c openat-die.c save-cwd.c
am__libgnu_a_SOURCES_DIST = allocator.c binary-io.h binary-io.c \
c-ctype.h c-ctype.c c-strcase.h c-strcasecmp.c c-strncasecmp.c \
careadlinkat.c close-stream.c md5.c sha1.c sha256.c sha512.c \
dtoastr.c dtotimespec.c filemode.c gettext.h gettime.c pipe2.c \
acl-errno-valid.c file-has-acl.c qcopy-acl.c qset-acl.c \
stat-time.c strftime.c timespec.c timespec-add.c \
timespec-sub.c u64.c unistd.c utimens.c openat-die.c \
save-cwd.c
am__objects_1 =
@BUILDING_FOR_WINDOWSNT_FALSE@am_libgnu_a_OBJECTS = \
@BUILDING_FOR_WINDOWSNT_FALSE@ allocator.$(OBJEXT) \
@BUILDING_FOR_WINDOWSNT_FALSE@ binary-io.$(OBJEXT) \
@BUILDING_FOR_WINDOWSNT_FALSE@ c-ctype.$(OBJEXT) \
@BUILDING_FOR_WINDOWSNT_FALSE@ c-strcasecmp.$(OBJEXT) \
@BUILDING_FOR_WINDOWSNT_FALSE@ c-strncasecmp.$(OBJEXT) \
@ -311,6 +316,7 @@ am__objects_1 =
@BUILDING_FOR_WINDOWSNT_FALSE@ filemode.$(OBJEXT) \
@BUILDING_FOR_WINDOWSNT_FALSE@ $(am__objects_1) \
@BUILDING_FOR_WINDOWSNT_FALSE@ gettime.$(OBJEXT) \
@BUILDING_FOR_WINDOWSNT_FALSE@ pipe2.$(OBJEXT) \
@BUILDING_FOR_WINDOWSNT_FALSE@ acl-errno-valid.$(OBJEXT) \
@BUILDING_FOR_WINDOWSNT_FALSE@ file-has-acl.$(OBJEXT) \
@BUILDING_FOR_WINDOWSNT_FALSE@ qcopy-acl.$(OBJEXT) \
@ -346,13 +352,13 @@ am__objects_1 =
@BUILDING_FOR_WINDOWSNT_TRUE@ u64.$(OBJEXT) utimens.$(OBJEXT) \
@BUILDING_FOR_WINDOWSNT_TRUE@ $(am__objects_1)
am__EXTRA_libgnu_a_SOURCES_DIST = openat-proc.c ftoastr.c dup2.c \
euidaccess.c execinfo.c at-func.c faccessat.c fdatasync.c \
fdopendir.c fpending.c fstatat.c fsync.c getgroups.c \
getloadavg.c getopt.c getopt1.c gettimeofday.c group-member.c \
lstat.c memrchr.c mktime.c pselect.c pthread_sigmask.c \
putenv.c acl_entries.c readlink.c readlinkat.c sig2str.c \
stat.c strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \
strtoumax.c symlink.c time_r.c unsetenv.c
euidaccess.c execinfo.c at-func.c faccessat.c fcntl.c \
fdatasync.c fdopendir.c fpending.c fstatat.c fsync.c \
getdtablesize.c getgroups.c getloadavg.c getopt.c getopt1.c \
gettimeofday.c group-member.c lstat.c memrchr.c mktime.c \
pselect.c pthread_sigmask.c putenv.c acl_entries.c readlink.c \
readlinkat.c sig2str.c stat.c strtoimax.c strtol.c strtoll.c \
strtoul.c strtoull.c strtoumax.c symlink.c time_r.c unsetenv.c
libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
@ -1230,20 +1236,22 @@ noinst_LIBRARIES = $(am__append_2) $(am__append_7)
SUFFIXES =
AM_CFLAGS = $(PROFILING_CFLAGS) $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
DEFAULT_INCLUDES = -I. -I$(top_srcdir)/lib -I../src -I$(top_srcdir)/src
@BUILDING_FOR_WINDOWSNT_FALSE@libgnu_a_SOURCES = allocator.c c-ctype.h \
@BUILDING_FOR_WINDOWSNT_FALSE@ c-ctype.c c-strcase.h \
@BUILDING_FOR_WINDOWSNT_FALSE@libgnu_a_SOURCES = allocator.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ binary-io.h binary-io.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ c-ctype.h c-ctype.c c-strcase.h \
@BUILDING_FOR_WINDOWSNT_FALSE@ c-strcasecmp.c c-strncasecmp.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ careadlinkat.c close-stream.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ md5.c sha1.c sha256.c sha512.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ dtoastr.c dtotimespec.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ filemode.c $(am__append_10) \
@BUILDING_FOR_WINDOWSNT_FALSE@ gettime.c acl-errno-valid.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ file-has-acl.c qcopy-acl.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ qset-acl.c stat-time.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ strftime.c timespec.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ timespec-add.c timespec-sub.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ u64.c unistd.c utimens.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ openat-die.c save-cwd.c
@BUILDING_FOR_WINDOWSNT_FALSE@ gettime.c pipe2.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ acl-errno-valid.c file-has-acl.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ qcopy-acl.c qset-acl.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ stat-time.c strftime.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ timespec.c timespec-add.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ timespec-sub.c u64.c unistd.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ utimens.c openat-die.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ save-cwd.c
@BUILDING_FOR_WINDOWSNT_TRUE@libgnu_a_SOURCES = c-ctype.h c-ctype.c \
@BUILDING_FOR_WINDOWSNT_TRUE@ c-strcase.h c-strcasecmp.c \
@BUILDING_FOR_WINDOWSNT_TRUE@ c-strncasecmp.c close-stream.c \
@ -1262,9 +1270,10 @@ DEFAULT_INCLUDES = -I. -I$(top_srcdir)/lib -I../src -I$(top_srcdir)/src
@BUILDING_FOR_WINDOWSNT_FALSE@EXTRA_libgnu_a_SOURCES = openat-proc.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ ftoastr.c dup2.c euidaccess.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ execinfo.c at-func.c faccessat.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ fdatasync.c fdopendir.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ fcntl.c fdatasync.c fdopendir.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ fpending.c at-func.c fstatat.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ fsync.c getgroups.c getloadavg.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ fsync.c getdtablesize.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ getgroups.c getloadavg.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ getopt.c getopt1.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ gettimeofday.c group-member.c \
@BUILDING_FOR_WINDOWSNT_FALSE@ lstat.c memrchr.c mktime.c \
@ -1361,6 +1370,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acl_entries.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocator.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at-func.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary-io.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasecmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strncasecmp.Po@am__quote@
@ -1372,6 +1382,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/euidaccess.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execinfo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdatasync.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopendir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-has-acl.Po@am__quote@
@ -1380,6 +1391,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsync.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
@ -1393,6 +1405,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-die.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-proc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pselect.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pthread_sigmask.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@

3
autogen/aclocal.m4 vendored
View File

@ -999,6 +999,7 @@ m4_include([m4/execinfo.m4])
m4_include([m4/extensions.m4])
m4_include([m4/extern-inline.m4])
m4_include([m4/faccessat.m4])
m4_include([m4/fcntl.m4])
m4_include([m4/fcntl_h.m4])
m4_include([m4/fdatasync.m4])
m4_include([m4/fdopendir.m4])
@ -1006,6 +1007,7 @@ m4_include([m4/filemode.m4])
m4_include([m4/fpending.m4])
m4_include([m4/fstatat.m4])
m4_include([m4/fsync.m4])
m4_include([m4/getdtablesize.m4])
m4_include([m4/getgroups.m4])
m4_include([m4/getloadavg.m4])
m4_include([m4/getopt.m4])
@ -1027,6 +1029,7 @@ m4_include([m4/multiarch.m4])
m4_include([m4/nocrash.m4])
m4_include([m4/off_t.m4])
m4_include([m4/pathmax.m4])
m4_include([m4/pipe2.m4])
m4_include([m4/pselect.m4])
m4_include([m4/pthread_sigmask.m4])
m4_include([m4/putenv.m4])

View File

@ -90,9 +90,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Name of the default sound device. */
#undef DEFAULT_SOUND_DEVICE
/* Character that separates a device in a file name. */
#undef DEVICE_SEP
/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
#undef DGUX
@ -123,6 +120,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
enabled. */
#undef ENABLE_CHECKING
/* Define this to 1 if F_DUPFD behavior does not match POSIX */
#undef FCNTL_DUPFD_BUGGY
/* Letter to use in finding device name of first PTY, if PTYs are supported.
*/
#undef FIRST_PTY_LETTER
@ -209,6 +209,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
startup, if using GTK. */
#undef G_SLICE_ALWAYS_MALLOC
/* Define to 1 if you have the `accept4' function. */
#undef HAVE_ACCEPT4
/* Define to 1 if you have the `access' function. */
#undef HAVE_ACCESS
@ -281,9 +284,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if the ACL type ACL_TYPE_EXTENDED exists. */
#undef HAVE_ACL_TYPE_EXTENDED
/* Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists. */
#undef HAVE_AIX_SMT_EXP
/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
may be supplied by this distribution. */
#undef HAVE_ALLOCA
@ -412,12 +412,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
don't. */
#undef HAVE_DECL___SYS_SIGLIST
/* Define to 1 if you have the <des.h> header file. */
#undef HAVE_DES_H
/* Define to 1 if dynamic ptys are supported. */
#undef HAVE_DEV_PTMX
/* Define to 1 if you have the `difftime' function. */
#undef HAVE_DIFFTIME
@ -451,6 +445,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `facl' function. */
#undef HAVE_FACL
/* Define to 1 if you have the `fcntl' function. */
#undef HAVE_FCNTL
/* Define to 1 if you have the `fdatasync' function. */
#undef HAVE_FDATASYNC
@ -499,6 +496,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `getdelim' function. */
#undef HAVE_GETDELIM
/* Define to 1 if you have the `getdtablesize' function. */
#undef HAVE_GETDTABLESIZE
/* Define to 1 if you have the `getgrent' function. */
#undef HAVE_GETGRENT
@ -559,13 +559,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define if using GnuTLS. */
#undef HAVE_GNUTLS
/* Define if using GnuTLS certificate verification callbacks. */
#undef HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY
/* Define to 1 if you have the `gnutls_certificate_set_verify_function'
function. */
#undef HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION
/* Define to 1 if you have the gpm library (-lgpm). */
#undef HAVE_GPM
@ -635,15 +628,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the jpeg library (-ljpeg). */
#undef HAVE_JPEG
/* Define to 1 if you have the <kerberosIV/des.h> header file. */
#undef HAVE_KERBEROSIV_DES_H
/* Define to 1 if you have the <kerberosIV/krb.h> header file. */
#undef HAVE_KERBEROSIV_KRB_H
/* Define to 1 if you have the <kerberos/des.h> header file. */
#undef HAVE_KERBEROS_DES_H
/* Define to 1 if you have the <kerberos/krb.h> header file. */
#undef HAVE_KERBEROS_KRB_H
@ -662,18 +649,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
/* Define to 1 if you have the `com_err' library (-lcom_err). */
#undef HAVE_LIBCOM_ERR
/* Define to 1 if you have the `crypto' library (-lcrypto). */
#undef HAVE_LIBCRYPTO
/* Define to 1 if you have the `des' library (-ldes). */
#undef HAVE_LIBDES
/* Define to 1 if you have the `des425' library (-ldes425). */
#undef HAVE_LIBDES425
/* Define to 1 if you have the `dgc' library (-ldgc). */
#undef HAVE_LIBDGC
@ -683,21 +658,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the <libgen.h> header file. */
#undef HAVE_LIBGEN_H
/* Define to 1 if you have the hesiod library (-lhesiod). */
#undef HAVE_LIBHESIOD
/* Define to 1 if you have the `k5crypto' library (-lk5crypto). */
#undef HAVE_LIBK5CRYPTO
/* Define to 1 if you have the `krb' library (-lkrb). */
#undef HAVE_LIBKRB
/* Define to 1 if you have the `krb4' library (-lkrb4). */
#undef HAVE_LIBKRB4
/* Define to 1 if you have the `krb5' library (-lkrb5). */
#undef HAVE_LIBKRB5
/* Define to 1 if you have the `kstat' library (-lkstat). */
#undef HAVE_LIBKSTAT
@ -722,9 +682,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `pthreads' library (-lpthreads). */
#undef HAVE_LIBPTHREADS
/* Define to 1 if you have the resolv library (-lresolv). */
#undef HAVE_LIBRESOLV
/* Define to 1 if using SELinux. */
#undef HAVE_LIBSELINUX
@ -737,9 +694,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `Xmu' library (-lXmu). */
#undef HAVE_LIBXMU
/* Define to 1 if you have the <linux/version.h> header file. */
#undef HAVE_LINUX_VERSION_H
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
@ -796,15 +750,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
systems that support xmenu.c. */
#undef HAVE_MENUS
/* Define to 1 if you have the `mkostemp' function. */
#undef HAVE_MKOSTEMP
/* Define to 1 if you have the `mkstemp' function. */
#undef HAVE_MKSTEMP
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define to 1 if you have the <mmsystem.h> header file. */
#undef HAVE_MMSYSTEM_H
/* Define to 1 if you have the `nanotime' function. */
#undef HAVE_NANOTIME
@ -830,6 +784,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if personality LINUX32 can be set. */
#undef HAVE_PERSONALITY_LINUX32
/* Define to 1 if you have the `pipe2' function. */
#undef HAVE_PIPE2
/* Define to 1 if you have the png library (-lpng). */
#undef HAVE_PNG
@ -939,9 +896,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the <soundcard.h> header file. */
#undef HAVE_SOUNDCARD_H
/* Define to 1 if `speed_t' is declared by <termios.h>. */
#undef HAVE_SPEED_T
/* Define to 1 if you have the `statacl' function. */
#undef HAVE_STATACL
@ -1128,9 +1082,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `utimensat' function. */
#undef HAVE_UTIMENSAT
/* Define to 1 if you have the `utimes' function. */
#undef HAVE_UTIMES
/* Define to 1 if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
@ -1561,9 +1512,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define if the system is compatible with System III. */
#undef USG
/* Define if the system is compatible with System V. */
#undef USG5
/* Define if the system is compatible with System V Release 4. */
#undef USG5_4
@ -1797,9 +1745,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to enable asynchronous subprocesses. */
#undef subprocesses
/* Define to any substitute for sys_siglist. */
#undef sys_siglist
/* Define as a marker that can be attached to declarations that might not
be used. This helps to reduce warnings, such as from
GCC -Wunused-parameter. */

558
autogen/configure vendored
View File

@ -614,8 +614,6 @@ LIBGNU_LIBDEPS
gltests_WITNESS
gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE
gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE
gl_GNULIB_ENABLED_verify_FALSE
gl_GNULIB_ENABLED_verify_TRUE
gl_GNULIB_ENABLED_strtoull_FALSE
gl_GNULIB_ENABLED_strtoull_TRUE
gl_GNULIB_ENABLED_strtoll_FALSE
@ -634,6 +632,8 @@ gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
gl_GNULIB_ENABLED_getgroups_FALSE
gl_GNULIB_ENABLED_getgroups_TRUE
gl_GNULIB_ENABLED_getdtablesize_FALSE
gl_GNULIB_ENABLED_getdtablesize_TRUE
gl_GNULIB_ENABLED_euidaccess_FALSE
gl_GNULIB_ENABLED_euidaccess_TRUE
gl_GNULIB_ENABLED_dosname_FALSE
@ -3352,7 +3352,6 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
as_fn_append ac_header_list " linux/version.h"
as_fn_append ac_header_list " sys/systeminfo.h"
as_fn_append ac_header_list " coff.h"
as_fn_append ac_header_list " pty.h"
@ -3374,6 +3373,7 @@ as_fn_append ac_func_list " readlinkat"
as_fn_append ac_header_list " dirent.h"
as_fn_append ac_header_list " execinfo.h"
as_fn_append ac_func_list " faccessat"
as_fn_append ac_func_list " fcntl"
as_fn_append ac_func_list " fdopendir"
as_fn_append ac_header_list " stdio_ext.h"
as_fn_append ac_func_list " __fpending"
@ -3388,6 +3388,7 @@ as_fn_append ac_header_list " wchar.h"
as_fn_append ac_header_list " stdint.h"
as_fn_append ac_header_list " inttypes.h"
as_fn_append ac_func_list " lstat"
as_fn_append ac_func_list " pipe2"
as_fn_append ac_header_list " sys/select.h"
as_fn_append ac_func_list " pselect"
as_fn_append ac_func_list " pthread_sigmask"
@ -3403,6 +3404,7 @@ as_fn_append ac_func_list " futimesat"
as_fn_append ac_func_list " futimens"
as_fn_append ac_func_list " utimensat"
as_fn_append ac_func_list " lutimes"
as_fn_append ac_func_list " getdtablesize"
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@ -4349,7 +4351,8 @@ if test "${with_file_notification+set}" = set; then :
w | w3 | w32 ) val=w32 ;;
* ) as_fn_error "\`--with-file-notification=$withval' is invalid;
this option's value should be \`yes', \`no', \`gfile', \`inotify' or \`w32'.
\`yes' is a synonym for \`w32' on MS-Windows, and for \`gfile' otherwise." "$LINENO" 5
\`yes' is a synonym for \`w32' on MS-Windows, for \`no' on Nextstep,
otherwise for the first of \`gfile' or \`inotify' that is usable." "$LINENO" 5
;;
esac
with_file_notification=$val
@ -7226,6 +7229,7 @@ esac
# Code from module alloca-opt:
# Code from module allocator:
# Code from module at-internal:
# Code from module binary-io:
# Code from module c-ctype:
# Code from module c-strcase:
# Code from module careadlinkat:
@ -7248,6 +7252,7 @@ esac
# Code from module extern-inline:
# Code from module faccessat:
# Code from module fcntl:
# Code from module fcntl-h:
# Code from module fdatasync:
# Code from module fdopendir:
@ -7255,6 +7260,7 @@ esac
# Code from module fpending:
# Code from module fstatat:
# Code from module fsync:
# Code from module getdtablesize:
# Code from module getgroups:
# Code from module getloadavg:
# Code from module getopt-gnu:
@ -7263,7 +7269,6 @@ esac
# Code from module gettime:
# Code from module gettimeofday:
# Code from module group-member:
# Code from module ignore-value:
# Code from module include_next:
# Code from module intprops:
# Code from module inttypes-incomplete:
@ -7277,6 +7282,7 @@ esac
# Code from module nocrash:
# Code from module openat-h:
# Code from module pathmax:
# Code from module pipe2:
# Code from module pselect:
# Code from module pthread_sigmask:
# Code from module putenv:
@ -8991,7 +8997,7 @@ fi
if test "${with_sound}" != "no"; then
# Sound support for GNU/Linux, the free BSDs, and MinGW.
for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h mmsystem.h
for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
@ -9212,8 +9218,6 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
@ -9318,11 +9322,6 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
_ACEOF
if test $ac_cv_have_decl___sys_siglist = yes; then
$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
@ -9366,37 +9365,6 @@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
$as_echo_n "checking for speed_t... " >&6; }
if test "${emacs_cv_speed_t+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <termios.h>
int
main ()
{
speed_t x = 1;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
emacs_cv_speed_t=yes
else
emacs_cv_speed_t=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
$as_echo "$emacs_cv_speed_t" >&6; }
if test $emacs_cv_speed_t = yes; then
$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
fi
@ -10118,8 +10086,8 @@ $as_echo_n "checking whether Windows API headers are recent enough... " >&6; }
int
main ()
{
void test(PIMAGE_NT_HEADERS pHeader)
{PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}
PIMAGE_NT_HEADERS pHeader;
PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader)
;
return 0;
}
@ -11216,7 +11184,7 @@ $as_echo "#define HAVE_RSVG 1" >>confdefs.h
fi
HAVE_IMAGEMAGICK=no
if test "${HAVE_X11}" = "yes"; then
if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
if test "${with_imagemagick}" != "no"; then
## 6.2.8 is the earliest version known to work, but earlier versions
## might work - let us know if you find one.
@ -11960,7 +11928,6 @@ fi
HAVE_GNUTLS=no
HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
if test "${with_gnutls}" = "yes" ; then
succeeded=no
@ -12019,33 +11986,12 @@ $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
fi
OLD_CFLAGS=$CFLAGS
OLD_LIBS=$LIBS
CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
LIBS="$LIBGNUTLS_LIBS $LIBS"
for ac_func in gnutls_certificate_set_verify_function
do :
ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
_ACEOF
HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
fi
done
if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
fi
# Windows loads GnuTLS dynamically
if test "${opsys}" = "mingw32"; then
CFLAGS=$OLD_CFLAGS
LIBS=$OLD_LIBS
LIBGNUTLS_LIBS=
else
CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
LIBS="$LIBGNUTLS_LIBS $LIBS"
fi
fi
@ -12055,17 +12001,29 @@ fi
NOTIFY_OBJ=
NOTIFY_SUMMARY=no
if test "${with_file_notification}" = "yes"; then
if test "${opsys}" = "mingw32"; then
with_file_notification=w32
else
if test "${with_ns}" != yes; then
with_file_notification=gfile
fi
fi
if test "${with_ns}" = yes && test ${with_file_notification} = yes; then
with_file_notification=no
fi
if test "${with_file_notification}" = "gfile"; then
case $with_file_notification,$opsys in
w32,* | yes,mingw32)
ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
if test "x$ac_cv_header_windows_h" = x""yes; then :
fi
if test "$ac_cv_header_windows_h" = yes ; then
$as_echo "#define HAVE_W32NOTIFY 1" >>confdefs.h
NOTIFY_OBJ=w32notify.o
NOTIFY_SUMMARY="yes (w32)"
fi ;;
esac
case $with_file_notification,$NOTIFY_OBJ in
gfile, | yes,)
succeeded=no
@ -12117,51 +12075,44 @@ $as_echo "no" >&6; }
HAVE_GFILENOTIFY=no
fi
if test "$HAVE_GFILENOTIFY" = "yes"; then
if test "$HAVE_GFILENOTIFY" = "yes"; then
$as_echo "#define HAVE_GFILENOTIFY 1" >>confdefs.h
NOTIFY_OBJ=gfilenotify.o
NOTIFY_SUMMARY="yes -lgio (gfile)"
fi
fi
if test "${with_file_notification}" = "inotify"; then
ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
NOTIFY_OBJ=gfilenotify.o
NOTIFY_SUMMARY="yes -lgio (gfile)"
fi ;;
esac
case $with_file_notification,$NOTIFY_OBJ in
inotify, | yes,)
ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
fi
if test "$ac_cv_header_sys_inotify_h" = yes ; then
ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
if test "$ac_cv_header_sys_inotify_h" = yes ; then
ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
if test "x$ac_cv_func_inotify_init1" = x""yes; then :
fi
if test "$ac_cv_func_inotify_init1" = yes; then
if test "$ac_cv_func_inotify_init1" = yes; then
$as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
NOTIFY_OBJ=inotify.o
NOTIFY_SUMMARY="yes -lglibc (inotify)"
fi
fi
fi
if test "${with_file_notification}" = "w32"; then
ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
if test "x$ac_cv_header_windows_h" = x""yes; then :
NOTIFY_OBJ=inotify.o
NOTIFY_SUMMARY="yes -lglibc (inotify)"
fi
fi ;;
esac
fi
case $with_file_notification,$NOTIFY_OBJ in
yes,* | no,* | *,?*) ;;
*) as_fn_error "File notification \`$with_file_notification' requested but requirements not found." "$LINENO" 5 ;;
esac
if test "$ac_cv_header_windows_h" = yes ; then
$as_echo "#define HAVE_W32NOTIFY 1" >>confdefs.h
NOTIFY_OBJ=w32notify.o
NOTIFY_SUMMARY="yes (w32)"
fi
fi
if test -n "$NOTIFY_OBJ"; then
$as_echo "#define USE_FILE_NOTIFY 1" >>confdefs.h
@ -14716,14 +14667,14 @@ esac
for ac_func in gethostname \
for ac_func in accept4 gethostname \
getrusage get_current_dir_name \
lrand48 \
select getpagesize setlocale \
utimes getrlimit setrlimit shutdown getaddrinfo \
getrlimit setrlimit shutdown getaddrinfo \
strsignal setitimer \
sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
gai_strerror mkstemp getline getdelim sync \
gai_strerror mkostemp mkstemp getline getdelim sync \
difftime posix_memalign \
getpwent endpwent getgrent endgrent \
touchlock \
@ -15293,9 +15244,6 @@ fi
if test x"$hesiod" = xyes; then
$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
LIBHESIOD=-lhesiod
fi
fi
@ -15303,9 +15251,6 @@ fi
# Do we need libresolv (due to res_init or Hesiod)?
if test "$resolv" = yes && test $opsys != darwin; then
$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
LIBRESOLV=-lresolv
else
LIBRESOLV=
@ -15365,9 +15310,6 @@ fi
if test $have_com_err = yes; then
COM_ERRLIB=-lcom_err
LIBS="$COM_ERRLIB $LIBS"
$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
@ -15414,9 +15356,6 @@ fi
if test $have_crypto = yes; then
CRYPTOLIB=-lcrypto
LIBS="$CRYPTOLIB $LIBS"
$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
@ -15463,9 +15402,6 @@ fi
if test $have_k5crypto = yes; then
CRYPTOLIB=-lk5crypto
LIBS="$CRYPTOLIB $LIBS"
$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
@ -15512,9 +15448,6 @@ fi
if test $have_krb5=yes; then
KRB5LIB=-lkrb5
LIBS="$KRB5LIB $LIBS"
$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
fi
if test "${with_kerberos5}" = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
@ -15562,9 +15495,6 @@ fi
if test $have_des425 = yes; then
DESLIB=-ldes425
LIBS="$DESLIB $LIBS"
$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
@ -15611,9 +15541,6 @@ fi
if test $have_des = yes; then
DESLIB=-ldes
LIBS="$DESLIB $LIBS"
$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
@ -15661,9 +15588,6 @@ fi
if test $have_krb4 = yes; then
KRB4LIB=-lkrb4
LIBS="$KRB4LIB $LIBS"
$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
@ -15710,9 +15634,6 @@ fi
if test $have_krb = yes; then
KRB4LIB=-lkrb
LIBS="$KRB4LIB $LIBS"
$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
fi
fi
fi
@ -15751,44 +15672,6 @@ fi
done
else
for ac_header in des.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
if test "x$ac_cv_header_des_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_DES_H 1
_ACEOF
else
for ac_header in kerberosIV/des.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_KERBEROSIV_DES_H 1
_ACEOF
else
for ac_header in kerberos/des.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_KERBEROS_DES_H 1
_ACEOF
fi
done
fi
done
fi
done
for ac_header in krb.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
@ -15958,25 +15841,6 @@ $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
fi
if test -f /usr/lpp/X11/bin/smt.exp; then
$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
case $canonical in
*-solaris2.4 | *-solaris2.4.*)
: ${ac_cv_func_vfork_works=no};;
@ -16409,12 +16273,9 @@ $as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
$as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
if test "${opsys}" = "mingw32"; then
$as_echo "#define DEVICE_SEP ':'" >>confdefs.h
$as_echo "#define IS_DEVICE_SEP(_c_) ((_c_) == DEVICE_SEP)" >>confdefs.h
$as_echo "#define IS_DEVICE_SEP(_c_) ((_c_) == ':')" >>confdefs.h
@ -16466,7 +16327,7 @@ esac
emacs_broken_SIGIO=no
case $opsys in
hpux* | irix6-5 | openbsd | sol2* | unixware )
hpux* | irix6-5 | openbsd | sol2* | unixware | gnu-kfreebsd )
emacs_broken_SIGIO=yes
;;
@ -16581,10 +16442,10 @@ $as_echo "#define UNIX98_PTYS 1" >>confdefs.h
$as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
$as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
$as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
if test "x$ac_cv_func_posix_openpt" = xyes; then
$as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
$as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY)" >>confdefs.h
$as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
@ -16898,13 +16759,10 @@ esac
case $opsys in
aix4-2)
$as_echo "#define USG /**/" >>confdefs.h
$as_echo "#define USG5 /**/" >>confdefs.h
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -16953,8 +16811,6 @@ $as_echo "#define GNU_LINUX /**/" >>confdefs.h
hpux*)
$as_echo "#define USG /**/" >>confdefs.h
$as_echo "#define USG5 /**/" >>confdefs.h
$as_echo "#define HPUX /**/" >>confdefs.h
@ -16963,8 +16819,6 @@ $as_echo "#define HPUX /**/" >>confdefs.h
irix6-5)
$as_echo "#define USG /**/" >>confdefs.h
$as_echo "#define USG5 /**/" >>confdefs.h
$as_echo "#define USG5_4 /**/" >>confdefs.h
@ -16988,8 +16842,6 @@ $as_echo "#define EMACSDEBUG 1" >>confdefs.h
sol2*)
$as_echo "#define USG /**/" >>confdefs.h
$as_echo "#define USG5 /**/" >>confdefs.h
$as_echo "#define USG5_4 /**/" >>confdefs.h
@ -17000,8 +16852,6 @@ $as_echo "#define SOLARIS2 /**/" >>confdefs.h
unixware)
$as_echo "#define USG /**/" >>confdefs.h
$as_echo "#define USG5 /**/" >>confdefs.h
$as_echo "#define USG5_4 /**/" >>confdefs.h
;;
@ -18564,6 +18414,8 @@ $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
REPLACE_OPENAT=0;
ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
if test "x$ac_cv_type_mode_t" = x""yes; then :
@ -20854,6 +20706,8 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
GNULIB_PSELECT=0;
GNULIB_SELECT=0;
HAVE_PSELECT=1;
@ -22053,6 +21907,8 @@ _ACEOF
if false; then
GL_COND_LIBTOOL_TRUE=
GL_COND_LIBTOOL_FALSE='#'
@ -22603,6 +22459,169 @@ _ACEOF
if test $ac_cv_func_fcntl = no; then
if test $ac_cv_func_fcntl = no; then
HAVE_FCNTL=0
else
REPLACE_FCNTL=1
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
# Guess that it works on glibc systems
case $host_os in #((
*-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
*) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
esac
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <fcntl.h>
#include <errno.h>
int
main ()
{
int result = 0;
if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
if (errno != EINVAL) result |= 2;
return result;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
gl_cv_func_fcntl_f_dupfd_works=yes
else
gl_cv_func_fcntl_f_dupfd_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
case $gl_cv_func_fcntl_f_dupfd_works in
*yes) ;;
*)
if test $ac_cv_func_fcntl = no; then
HAVE_FCNTL=0
else
REPLACE_FCNTL=1
fi
$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <fcntl.h>
#ifndef F_DUPFD_CLOEXEC
choke me
#endif
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __linux__
/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
it to support the semantics on older kernels that failed with EINVAL. */
choke me
#endif
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
gl_cv_func_fcntl_f_dupfd_cloexec=yes
else
gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
gl_cv_func_fcntl_f_dupfd_cloexec=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
if test $ac_cv_func_fcntl = no; then
HAVE_FCNTL=0
else
REPLACE_FCNTL=1
fi
fi
fi
if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
fi
GNULIB_FCNTL=1
@ -24312,6 +24331,27 @@ $as_echo "$gl_cv_func_working_mktime" >&6; }
if test $ac_cv_func_pipe2 != yes; then
HAVE_PIPE2=0
fi
GNULIB_PIPE2=1
if test $ac_cv_func_pselect = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
@ -25799,7 +25839,8 @@ else
/* Test _Alignas only on platforms where gnulib can help. */
#if \
(__GNUC__ || __IBMC__ || __IBMCPP__ \
((defined __cplusplus && 201103 <= __cplusplus) \
|| __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
|| 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
struct alignas_test { char c; char alignas (8) alignas_8; };
char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
@ -27422,6 +27463,7 @@ $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
gl_gnulib_enabled_dosname=false
gl_gnulib_enabled_euidaccess=false
gl_gnulib_enabled_getdtablesize=false
gl_gnulib_enabled_getgroups=false
gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
@ -27431,7 +27473,6 @@ $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
gl_gnulib_enabled_stat=false
gl_gnulib_enabled_strtoll=false
gl_gnulib_enabled_strtoull=false
gl_gnulib_enabled_verify=false
gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
{
@ -27711,6 +27752,43 @@ done
fi
fi
}
func_gl_gnulib_m4code_getdtablesize ()
{
if ! $gl_gnulib_enabled_getdtablesize; then
if test $ac_cv_func_getdtablesize != yes; then
HAVE_GETDTABLESIZE=0
fi
if test $HAVE_GETDTABLESIZE = 0; then
gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
:
fi
GNULIB_GETDTABLESIZE=1
gl_gnulib_enabled_getdtablesize=true
fi
}
func_gl_gnulib_m4code_getgroups ()
{
if ! $gl_gnulib_enabled_getgroups; then
@ -28133,9 +28211,6 @@ $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
if test $REPLACE_STAT = 1; then
func_gl_gnulib_m4code_pathmax
fi
if test $REPLACE_STAT = 1; then
func_gl_gnulib_m4code_verify
fi
fi
}
func_gl_gnulib_m4code_strtoll ()
@ -28242,12 +28317,6 @@ done
gl_gnulib_enabled_strtoull=true
fi
}
func_gl_gnulib_m4code_verify ()
{
if ! $gl_gnulib_enabled_verify; then
gl_gnulib_enabled_verify=true
fi
}
func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
{
if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
@ -28266,6 +28335,9 @@ done
if test $HAVE_FACCESSAT = 0; then
func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
fi
if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
func_gl_gnulib_m4code_getdtablesize
fi
if test $HAVE_FDOPENDIR = 0; then
func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
fi
@ -28302,15 +28374,9 @@ done
if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
func_gl_gnulib_m4code_strtoll
fi
if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
func_gl_gnulib_m4code_verify
fi
if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
func_gl_gnulib_m4code_strtoull
fi
if test $ac_cv_func_strtoumax = no; then
func_gl_gnulib_m4code_verify
fi
if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
@ -28336,6 +28402,14 @@ else
gl_GNULIB_ENABLED_euidaccess_FALSE=
fi
if $gl_gnulib_enabled_getdtablesize; then
gl_GNULIB_ENABLED_getdtablesize_TRUE=
gl_GNULIB_ENABLED_getdtablesize_FALSE='#'
else
gl_GNULIB_ENABLED_getdtablesize_TRUE='#'
gl_GNULIB_ENABLED_getdtablesize_FALSE=
fi
if $gl_gnulib_enabled_getgroups; then
gl_GNULIB_ENABLED_getgroups_TRUE=
gl_GNULIB_ENABLED_getgroups_FALSE='#'
@ -28408,14 +28482,6 @@ else
gl_GNULIB_ENABLED_strtoull_FALSE=
fi
if $gl_gnulib_enabled_verify; then
gl_GNULIB_ENABLED_verify_TRUE=
gl_GNULIB_ENABLED_verify_FALSE='#'
else
gl_GNULIB_ENABLED_verify_TRUE='#'
gl_GNULIB_ENABLED_verify_FALSE=
fi
if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
@ -28877,6 +28943,10 @@ if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLE
as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${gl_GNULIB_ENABLED_getdtablesize_TRUE}" && test -z "${gl_GNULIB_ENABLED_getdtablesize_FALSE}"; then
as_fn_error "conditional \"gl_GNULIB_ENABLED_getdtablesize\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@ -28913,10 +28983,6 @@ if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_
as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5

View File

@ -211,7 +211,8 @@ AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
w | w3 | w32 ) val=w32 ;;
* ) AC_MSG_ERROR([`--with-file-notification=$withval' is invalid;
this option's value should be `yes', `no', `gfile', `inotify' or `w32'.
`yes' is a synonym for `w32' on MS-Windows, and for `gfile' otherwise.])
`yes' is a synonym for `w32' on MS-Windows, for `no' on Nextstep,
otherwise for the first of `gfile' or `inotify' that is usable.])
;;
esac
with_file_notification=$val
@ -1637,8 +1638,8 @@ if test "${opsys}" = "mingw32"; then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <windows.h>
#include <usp10.h>]],
[[void test(PIMAGE_NT_HEADERS pHeader)
{PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}]])],
[[PIMAGE_NT_HEADERS pHeader;
PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader)]])],
[emacs_cv_w32api=yes
HAVE_W32=yes],
emacs_cv_w32api=no)
@ -2043,7 +2044,7 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" =
fi
HAVE_IMAGEMAGICK=no
if test "${HAVE_X11}" = "yes"; then
if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
if test "${with_imagemagick}" != "no"; then
## 6.2.8 is the earliest version known to work, but earlier versions
## might work - let us know if you find one.
@ -2351,51 +2352,57 @@ AC_SUBST(LIBGNUTLS_CFLAGS)
NOTIFY_OBJ=
NOTIFY_SUMMARY=no
dnl Set defaults of $with_file_notification.
if test "${with_file_notification}" = "yes"; then
if test "${opsys}" = "mingw32"; then
with_file_notification=w32
else
if test "${with_ns}" != yes; then
with_file_notification=gfile
fi
fi
dnl FIXME? Don't auto-detect on NS, but do allow someone to specify
dnl a particular library. This doesn't make much sense?
if test "${with_ns}" = yes && test ${with_file_notification} = yes; then
with_file_notification=no
fi
dnl MS Windows native file monitor is available for mingw32 only.
case $with_file_notification,$opsys in
w32,* | yes,mingw32)
AC_CHECK_HEADER(windows.h)
if test "$ac_cv_header_windows_h" = yes ; then
AC_DEFINE(HAVE_W32NOTIFY, 1, [Define to 1 to use w32notify.])
NOTIFY_OBJ=w32notify.o
NOTIFY_SUMMARY="yes (w32)"
fi ;;
esac
dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED
dnl has been added in glib 2.24. It has been tested under
dnl GNU/Linux only. We take precedence over inotify, but this makes
dnl only sense when glib has been compiled with inotify support. How
dnl to check?
if test "${with_file_notification}" = "gfile"; then
PKG_CHECK_MODULES(GFILENOTIFY, gio-2.0 >= 2.24, HAVE_GFILENOTIFY=yes, HAVE_GFILENOTIFY=no)
if test "$HAVE_GFILENOTIFY" = "yes"; then
AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.])
NOTIFY_OBJ=gfilenotify.o
NOTIFY_SUMMARY="yes -lgio (gfile)"
fi
fi
case $with_file_notification,$NOTIFY_OBJ in
gfile, | yes,)
PKG_CHECK_MODULES(GFILENOTIFY, gio-2.0 >= 2.24, HAVE_GFILENOTIFY=yes, HAVE_GFILENOTIFY=no)
if test "$HAVE_GFILENOTIFY" = "yes"; then
AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.])
NOTIFY_OBJ=gfilenotify.o
NOTIFY_SUMMARY="yes -lgio (gfile)"
fi ;;
esac
dnl inotify is only available on GNU/Linux.
if test "${with_file_notification}" = "inotify"; then
AC_CHECK_HEADER(sys/inotify.h)
if test "$ac_cv_header_sys_inotify_h" = yes ; then
AC_CHECK_FUNC(inotify_init1)
if test "$ac_cv_func_inotify_init1" = yes; then
AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.])
NOTIFY_OBJ=inotify.o
NOTIFY_SUMMARY="yes -lglibc (inotify)"
fi
fi
fi
dnl MS Windows native file monitor is available for mingw32 only.
if test "${with_file_notification}" = "w32"; then
AC_CHECK_HEADER(windows.h)
if test "$ac_cv_header_windows_h" = yes ; then
AC_DEFINE(HAVE_W32NOTIFY, 1, [Define to 1 to use w32notify.])
NOTIFY_OBJ=w32notify.o
NOTIFY_SUMMARY="yes (w32)"
fi
fi
case $with_file_notification,$NOTIFY_OBJ in
inotify, | yes,)
AC_CHECK_HEADER(sys/inotify.h)
if test "$ac_cv_header_sys_inotify_h" = yes ; then
AC_CHECK_FUNC(inotify_init1)
if test "$ac_cv_func_inotify_init1" = yes; then
AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.])
NOTIFY_OBJ=inotify.o
NOTIFY_SUMMARY="yes -lglibc (inotify)"
fi
fi ;;
esac
case $with_file_notification,$NOTIFY_OBJ in
yes,* | no,* | *,?*) ;;
*) AC_MSG_ERROR([File notification `$with_file_notification' requested but requirements not found.]) ;;
esac
if test -n "$NOTIFY_OBJ"; then
AC_DEFINE(USE_FILE_NOTIFY, 1, [Define to 1 if using file notifications.])
fi
@ -3276,14 +3283,14 @@ esac
AC_SUBST(BLESSMAIL_TARGET)
AC_CHECK_FUNCS(gethostname \
AC_CHECK_FUNCS(accept4 gethostname \
getrusage get_current_dir_name \
lrand48 \
select getpagesize setlocale \
getrlimit setrlimit shutdown getaddrinfo \
strsignal setitimer \
sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
gai_strerror mkstemp getline getdelim sync \
gai_strerror mkostemp mkstemp getline getdelim sync \
difftime posix_memalign \
getpwent endpwent getgrent endgrent \
touchlock \
@ -3801,7 +3808,7 @@ emacs_broken_SIGIO=no
case $opsys in
dnl SIGIO exists, but the feature doesn't work in the way Emacs needs.
dnl See eg <http://article.gmane.org/gmane.os.openbsd.ports/46831>.
hpux* | irix6-5 | openbsd | sol2* | unixware )
hpux* | irix6-5 | openbsd | sol2* | unixware | gnu-kfreebsd )
emacs_broken_SIGIO=yes
;;
@ -3970,10 +3977,10 @@ case $opsys in
AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)])
dnl Note that grantpt and unlockpt may fork. We must block SIGCHLD
dnl to prevent sigchld_handler from intercepting the child's death.
AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); }])
AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, "%s", ptyname); }])
dnl if HAVE_POSIX_OPENPT
if test "x$ac_cv_func_posix_openpt" = xyes; then
AC_DEFINE(PTY_OPEN, [fd = posix_openpt (O_RDWR | O_NOCTTY)])
AC_DEFINE(PTY_OPEN, [fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY)])
AC_DEFINE(PTY_NAME_SPRINTF, [])
dnl if HAVE_GETPT
elif test "x$ac_cv_func_getpt" = xyes; then

View File

@ -1,3 +1,11 @@
2013-07-03 Glenn Morris <rgm@gnu.org>
* maintaining.texi (EDE): Fix cross-reference.
* programs.texi (Program Modes): Fix emacs-xtra reference.
* help.texi (Misc Help): Index describe-syntax.
2013-06-29 Eli Zaretskii <eliz@gnu.org>
* basic.texi (Moving Point): Document visual-order-cursor-movement

View File

@ -535,6 +535,8 @@ describes the commands and features that are changed in this mode.
@kindex C-h b
@findex describe-bindings
@kindex C-h s
@findex describe-syntax
@kbd{C-h b} (@code{describe-bindings}) and @kbd{C-h s}
(@code{describe-syntax}) show other information about the current
environment within Emacs. @kbd{C-h b} displays a list of all the key

View File

@ -2346,7 +2346,7 @@ directory trees. The @dfn{project root} is the topmost directory of a
project. To define a new project, visit a file in the desired project
root and type @kbd{M-x ede-new}. This command prompts for a
@dfn{project type}, which refers to the underlying method that EDE
will use to manage the project (@pxref{Creating a Project, EDE,, ede,
will use to manage the project (@pxref{Creating a project, EDE,, ede,
Emacs Development Environment}). The most common project types are
@samp{Make}, which uses Makefiles, and @samp{Automake}, which uses GNU
Automake (@pxref{Top, Automake,, automake, Automake}). In both cases,

View File

@ -119,17 +119,17 @@ those specified in the mode's own mode hook (@pxref{Major Modes}).
For instance, entering C mode runs the hooks @code{prog-mode-hook} and
@code{c-mode-hook}. @xref{Hooks}, for information about hooks.
@ifinfo
@ifnottex
Separate manuals are available for the modes for Ada (@pxref{Top,,
Ada Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba
IDL/Pike/AWK (@pxref{Top, , CC Mode, ccmode, CC Mode}), and IDLWAVE
(@pxref{Top,, IDLWAVE, idlwave, IDLWAVE User Manual}).
@end ifinfo
@ifnotinfo
@end ifnottex
@iftex
The Emacs distribution contains Info manuals for the major modes for
Ada, C/C++/Objective C/Java/Corba IDL/Pike/AWK, and IDLWAVE@. For
Fortran mode, @pxref{Fortran,,, emacs-xtra, Specialized Emacs Features}.
@end ifnotinfo
@end iftex
@node Defuns
@section Top-Level Definitions, or Defuns

View File

@ -1,3 +1,12 @@
2013-07-06 Glenn Morris <rgm@gnu.org>
* emacs-lisp-intro.texi (Top):
Move WWW_GNU_ORG section outside @copying, update URL.
2013-07-03 Glenn Morris <rgm@gnu.org>
* emacs-lisp-intro.texi (edebug): Fix cross-references.
2013-06-19 Glenn Morris <rgm@gnu.org>
* Makefile.in (dist): Edit more configure variables. (Bug#14660)

View File

@ -112,14 +112,6 @@ Edition @value{edition-number}, @value{update-date}
@ifnottex
Distributed with Emacs version @value{EMACSVER}.
@end ifnottex
@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.
@ -211,6 +203,15 @@ supports it in developing GNU and promoting software freedom.''
@node Top
@top An Introduction to Programming in Emacs Lisp
@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>
To view this manual in other formats, click
<a href="/software/emacs/manual/eintr.html">here</a>.
@end html
@end ifset
@insertcopying
This master menu first lists each chapter and index; then it lists
@ -18483,7 +18484,7 @@ shows which line you are currently executing.
You can walk through the execution of a function, line by line, or run
quickly until reaching a @dfn{breakpoint} where execution stops.
Edebug is described in @ref{edebug, , Edebug, elisp, The GNU Emacs
Edebug is described in @ref{Edebug, , , elisp, The GNU Emacs
Lisp Reference Manual}.
@need 1250
@ -18610,7 +18611,7 @@ error or at specified stopping points; you can cause it to display the
changing values of various expressions; you can find out how many
times a function is called, and more.
Edebug is described in @ref{edebug, , Edebug, elisp, The GNU Emacs
Edebug is described in @ref{Edebug, , , elisp, The GNU Emacs
Lisp Reference Manual}.
@need 1500

View File

@ -1,3 +1,26 @@
2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
Timestamp fixes for undo (Bug#14824).
* text.texi (Undo): Document (t . 0) and (t . -1) in buffer-undo-list.
2013-07-06 Eli Zaretskii <eliz@gnu.org>
* nonascii.texi (Text Representations): Document that
multibyte-string-p returns nil for non-string objects.
2013-07-06 Glenn Morris <rgm@gnu.org>
* elisp.texi (Top): Move WWW_GNU_ORG section outside @copying.
2013-07-03 Glenn Morris <rgm@gnu.org>
* debugging.texi (Debugging):
* files.texi (File Attributes, Changing Files): Fix cross-references.
* package.texi (Package Archives): Fix @url call.
* syntax.texi (Syntax Table Functions): Mention describe-syntax.
2013-06-29 Eli Zaretskii <eliz@gnu.org>
* display.texi (Bidirectional Display): Document move-point-visually.

View File

@ -32,7 +32,7 @@ program.
@item
You can use the ERT package to write regression tests for the program.
@xref{Top,the ERT manual,, ERT, ERT: Emacs Lisp Regression Testing}.
@xref{Top,the ERT manual,, ert, ERT: Emacs Lisp Regression Testing}.
@item
You can profile the program to get hints about how to make it more efficient.

View File

@ -97,16 +97,6 @@ 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.
@ -167,6 +157,17 @@ Cover art by Etienne Suvasa.
@node Top
@top Emacs Lisp
@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/emacs.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
@insertcopying
@end ifnottex

View File

@ -1115,7 +1115,7 @@ permissions} of @var{filename}, as an integer. It recursively follows
symbolic links in @var{filename} at all levels. If @var{filename}
does not exist, the return value is @code{nil}.
@xref{File Permissions,,, coreutils, The @sc{gnu} @code{Coreutils}
@xref{File permissions,,, coreutils, The @sc{gnu} @code{Coreutils}
Manual}, for a description of mode bits. If the low-order bit is 1,
then the file is executable by all users, if the second-lowest-order
bit is 1, then the file is writable by all users, etc. The highest
@ -1625,7 +1625,7 @@ octal numbers to enter @var{mode}. For example,
@noindent
specifies that the file should be readable and writable for its owner,
readable for group members, and readable for all other users.
@xref{File Permissions,,, coreutils, The @sc{gnu} @code{Coreutils}
@xref{File permissions,,, coreutils, The @sc{gnu} @code{Coreutils}
Manual}, for a description of mode bit specifications.
Interactively, @var{mode} is read from the minibuffer using
@ -1676,7 +1676,7 @@ the permissions on which the specification is based are taken from the
mode bits of @var{base-file}. If @var{base-file} is omitted or
@code{nil}, the function uses @code{0} as the base mode bits. The
complete and relative specifications can be combined, as in
@code{"u+r,g+rx,o+r,g-w"}. @xref{File Permissions,,, coreutils, The
@code{"u+r,g+rx,o+r,g-w"}. @xref{File permissions,,, coreutils, The
@sc{gnu} @code{Coreutils} Manual}, for a description of file mode
specifications.
@end defun

View File

@ -124,7 +124,8 @@ belong to the same character.
@defun multibyte-string-p string
Return @code{t} if @var{string} is a multibyte string, @code{nil}
otherwise.
otherwise. This function also returns @code{nil} if @var{string} is
some object other than a string.
@end defun
@defun string-bytes string

View File

@ -265,7 +265,7 @@ variable @code{load-file-name} (@pxref{Loading}). Here is an example:
Via the Package Menu, users may download packages from @dfn{package
archives}. Such archives are specified by the variable
@code{package-archives}, whose default value contains a single entry:
the archive hosted by the GNU project at @url{elpa.gnu.org}. This
the archive hosted by the GNU project at @url{http://elpa.gnu.org}. This
section describes how to set up and maintain a package archive.
@cindex base location, package archive

View File

@ -506,6 +506,11 @@ This function returns the current syntax table, which is the table for
the current buffer.
@end defun
@deffn Command describe-syntax &optional buffer
This command displays the contents of the syntax table of
@var{buffer} (by default, the current buffer) in a help buffer.
@end deffn
@defmac with-syntax-table table body@dots{}
This macro executes @var{body} using @var{table} as the current syntax
table. It returns the value of the last form in @var{body}, after

View File

@ -1250,14 +1250,18 @@ reinsert it is @code{(abs @var{position})}. If @var{position} is
positive, point was at the beginning of the deleted text, otherwise it
was at the end.
@item (t @var{sec-high} @var{sec-low} @var{microsec} @var{picosec})
@item (t . @var{time-flag})
This kind of element indicates that an unmodified buffer became
modified. The list @code{(@var{sec-high} @var{sec-low} @var{microsec}
modified. A @var{time-flag} of the form
@code{(@var{sec-high} @var{sec-low} @var{microsec}
@var{picosec})} represents the visited file's modification time as of
when it was previously visited or saved, using the same format as
@code{current-time}; see @ref{Time of Day}. @code{primitive-undo} uses those
@code{current-time}; see @ref{Time of Day}.
A @var{time-flag} of 0 means the buffer does not correspond to any file;
@minus{}1 means the visited file previously did not exist.
@code{primitive-undo} uses these
values to determine whether to mark the buffer as unmodified once again;
it does so only if the file's modification time matches those numbers.
it does so only if the file's status matches that of @var{time-flag}.
@item (nil @var{property} @var{value} @var{beg} . @var{end})
This kind of element records a change in a text property.

View File

@ -1,3 +1,62 @@
2013-07-08 Tassilo Horn <tsdh@gnu.org>
* gnus.texi (lines): Correct description of
`gnus-registry-track-extra's default value. Mention
`gnus-registry-remove-extra-data'.
2013-07-06 Lars Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Group Parameters): Mention regexp
substitutions (bug#11688).
2013-07-06 Nathan Trapuzzano <nbtrap@nbtrap.com> (tiny change)
* gnus.texi (Generic Marking Commands): Fix grammar (bug#13368).
2013-07-06 Lars Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Emacsen): Fix version.
* gnus-faq.texi (FAQ 1-6): Mention the correct Emacs version.
2013-07-06 Glenn Morris <rgm@gnu.org>
* mh-e.texi: Fix external links.
(Using This Manual): Printed elisp manuals no longer available.
* newsticker.texi (Overview): Update URL.
* nxml-mode.texi (Introduction): Update URL.
* org.texi (JavaScript support): Fix URL.
* wisent.texi (Wisent Overview): Remove incorrect, unnecessary uref.
* eudc.texi (CCSO PH/QI): Remove defunct URL.
* dbus.texi (Introspection): Update URL to a less defunct one.
* gnus.texi (Top): Restrict "Other related manuals" to info output.
(Foreign Groups): Use @indicateurl for examples.
(Direct Functions): Remove defunct URL.
(RSS): Update URL.
* gnus-faq.texi (FAQ 5-8, FAQ 6-3): Remove defunct URLs.
(FAQ 7-1): Update URL.
* pgg.texi (Top, Overview): Add note about obsolescence.
2013-07-03 Paul Eggert <eggert@cs.ucla.edu>
* texinfo.tex: Merge from gnulib.
2013-07-03 Glenn Morris <rgm@gnu.org>
* bovine.texi (top):
* cc-mode.texi (AWK Mode Font Locking):
* mh-e.texi (Preface):
* url.texi (URI Parsing): Fix cross-references to other manuals.
2013-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Client-Side IMAP Splitting):

View File

@ -76,7 +76,7 @@ The @dfn{bovine} parser is the original @semantic{} parser, and is an
implementation of an @acronym{LL} parser. It is good for simple
languages. It has many conveniences making grammar writing easy. The
conveniences make it less powerful than a Bison-like @acronym{LALR}
parser. For more information, @inforef{top, the Wisent Parser Manual,
parser. For more information, @inforef{Top, The Wisent Parser Manual,
wisent}.
Bovine @acronym{LL} grammars are stored in files with a @file{.by}

View File

@ -2111,7 +2111,7 @@ contributing it: send a note to @email{bug-cc-mode@@gnu.org}.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The general appearance of font-locking in AWK mode is much like in any
other programming mode. @xref{Faces For Font Lock,,,elisp, GNU Emacs
other programming mode. @xref{Faces for Font Lock,,,elisp, GNU Emacs
Lisp Reference Manual}.
The following faces are, however, used in a non-standard fashion in

View File

@ -403,8 +403,11 @@ Every dictionary entry has a string as key, and a variant as value.
The interface offers also a signal, which returns 2 parameters: an
integer, and an array consisting of elements which are a struct of a
string and 2 boolean values.@footnote{ The interfaces of the service
@samp{org.freedesktop.Hal} are described at
@uref{http://people.freedesktop.org/~david/hal-spec/hal-spec.html#interfaces}.}
@samp{org.freedesktop.Hal} are described in
@c Previous link is gone. Since HAL is now obsolete, this URL
@c (unchanged in ~ 4 years) feels like it might go too...
@uref{http://people.freedesktop.org/~dkukawka/hal-spec-git/hal-spec.html#interfaces,
the HAL specification}.}
@end defun
@defun dbus-introspect-xml bus service path

View File

@ -150,14 +150,17 @@ phone number, email, academic information or any other details it was
configured to. Nowadays this system is not widely used.
The system consists of two parts: a database server traditionally called
@samp{qi} and a command-line client called @samp{ph}. As of 2010, the
code can still be downloaded from @url{http://www-dev.cites.uiuc.edu/ph/}.
@samp{qi} and a command-line client called @samp{ph}.
@ignore
Until 2010, the code could be downloaded from
@url{http://www-dev.cites.uiuc.edu/ph/}.
@end ignore
The original command-line @samp{ph} client that comes with the
@samp{ph/qi} distribution provides additional features like the
possibility to communicate with the server in login-mode which makes it
possible to change records in the database. This is not implemented in
EUDC.
The original command-line @samp{ph} client that came with the
@samp{ph/qi} distribution provided additional features that are
not implemented in EUDC, like the possibility to communicate with the
server in login-mode, which made it possible to change records in the
database.
@node BBDB

View File

@ -222,10 +222,9 @@ Which version of Emacs do I need?
@subsubheading Answer
Gnus 5.10 requires an Emacs version that is greater than or equal
to Emacs 20.7 or XEmacs 21.1.
The development versions of Gnus (aka No Gnus) requires Emacs 21
or XEmacs 21.4.
Gnus 5.13 requires an Emacs version that is greater than or equal
to Emacs 23.1 or XEmacs 21.1, although there are some features that
only work on Emacs 24.
@node FAQ 1-7
@subsubheading Question 1.7
@ -1518,8 +1517,9 @@ cat file.face | sed 's/\\/\\\\/g;s/\"/\\\"/g;' > file.face.quoted
If you can't use compface, there's an online X-face converter at
@uref{http://www.dairiki.org/xface/}.
If you use MS Windows, you could also use the WinFace program from
@uref{http://www.xs4all.nl/~walterln/winface/}.
If you use MS Windows, you could also use the WinFace program,
which used to be available from
@indicateurl{http://www.xs4all.nl/~walterln/winface/}.
Now you only have to tell Gnus to include the X-face in your postings by saying
@example
@ -1812,15 +1812,20 @@ too.
Of course you can also use grep to search through your
local mail, but this is both slow for big archives and
inconvenient since you are not displaying the found mail
in Gnus. Here comes nnir into action. Nnir is a front end
in Gnus. Here nnir comes into action. Nnir is a front end
to search engines like swish-e or swish++ and
others. You index your mail with one of those search
others. You index your mail with one of those search
engines and with the help of nnir you can search through
the indexed mail and generate a temporary group with all
messages which met your search criteria. If this sound
cool to you get nnir.el from
messages which met your search criteria. If this sounds
cool to you, get nnir.el from
@c FIXME Isn't this file in Gnus?
@ignore
@c Dead link 2013/7.
@uref{ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/}
or @uref{ftp://ftp.is.informatik.uni-duisburg.de/pub/src/emacs/}.
or
@end ignore
@uref{ftp://ftp.is.informatik.uni-duisburg.de/pub/src/emacs/}.
Instructions on how to use it are at the top of the file.
@node FAQ 6-4
@ -1943,7 +1948,7 @@ the easiest solution is a small nntp server like
@uref{http://infa.abo.fi/~patrik/sn/, sn},
of course you can also install a full featured news
server like
@uref{http://www.isc.org/products/INN/, inn}.
@uref{http://www.isc.org/software/inn/, inn}.
Then you want to fetch your Mail, popular choices
are @uref{http://www.catb.org/~esr/fetchmail/, fetchmail}
and @uref{http://pyropus.ca/software/getmail/, getmail}.

View File

@ -420,6 +420,9 @@ This manual corresponds to Gnus v5.13
* Index:: Variable, function and concept index.
* Key Index:: Key Index.
@c Doesn't work right in html.
@c FIXME Do this in a more standard way.
@ifinfo
Other related manuals
* Message:(message). Composing messages.
@ -427,6 +430,7 @@ Other related manuals
* Sieve:(sieve). Managing Sieve scripts in Emacs.
* EasyPG:(epa). @acronym{PGP/MIME} with Gnus.
* SASL:(sasl). @acronym{SASL} authentication in Emacs.
@end ifinfo
@detailmenu
--- The Detailed Node Listing ---
@ -2712,11 +2716,11 @@ the article range.
This command is similar to @code{gnus-read-ephemeral-gmane-group}, but
the group name and the article number and range are constructed from a
given @acronym{URL}. Supported @acronym{URL} formats include:
@url{http://thread.gmane.org/gmane.foo.bar/12300/focus=12399},
@url{http://thread.gmane.org/gmane.foo.bar/12345/},
@url{http://article.gmane.org/gmane.foo.bar/12345/},
@url{http://permalink.gmane.org/gmane.foo.bar/12345/}, and
@url{http://news.gmane.org/group/gmane.foo.bar/thread=12345}.
@indicateurl{http://thread.gmane.org/gmane.foo.bar/12300/focus=12399},
@indicateurl{http://thread.gmane.org/gmane.foo.bar/12345/},
@indicateurl{http://article.gmane.org/gmane.foo.bar/12345/},
@indicateurl{http://permalink.gmane.org/gmane.foo.bar/12345/}, and
@indicateurl{http://news.gmane.org/group/gmane.foo.bar/thread=12345}.
@item gnus-read-ephemeral-emacs-bug-group
@findex gnus-read-ephemeral-emacs-bug-group
@ -3087,6 +3091,12 @@ if address "sender" ["name@@one.org", "else@@two.org"] @{
@}
@end example
You can also use regexp expansions in the rules:
@example
(sieve header :regex "list-id" "<c++std-\\1.accu.org>")
@end example
See @pxref{Sieve Commands} for commands and variables that might be of
interest in relation to the sieve parameter.
@ -6376,10 +6386,10 @@ The default is @code{t}.
@node Generic Marking Commands
@subsection Generic Marking Commands
Some people would like the command that ticks an article (@kbd{!}) go to
the next article. Others would like it to go to the next unread
article. Yet others would like it to stay on the current article. And
even though I haven't heard of anybody wanting it to go to the
Some people would like the command that ticks an article (@kbd{!}) to
go to the next article. Others would like it to go to the next unread
article. Yet others would like it to stay on the current article.
And even though I haven't heard of anybody wanting it to go to the
previous (unread) article, I'm sure there are people that want that as
well.
@ -13809,9 +13819,12 @@ installed. You then define a server as follows:
@findex nntp-open-ssl-stream
@item nntp-open-ssl-stream
Opens a connection to a server over a @dfn{secure} channel. To use
this you must have @uref{http://www.openssl.org, OpenSSL} or
@uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed. You
then define a server as follows:
this you must have @uref{http://www.openssl.org, OpenSSL}
@ignore
@c Defunct URL, ancient package, so don't mention it.
or @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay}
@end ignore
installed. You then define a server as follows:
@lisp
;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
@ -16953,7 +16966,7 @@ Some web sites have an RDF Site Summary (@acronym{RSS}).
@acronym{RSS} is a format for summarizing headlines from news related
sites (such as BBC or CNN). But basically anything list-like can be
presented as an @acronym{RSS} feed: weblogs, changelogs or recent
changes to a wiki (e.g., @url{http://cliki.net/recent-changes.rdf}).
changes to a wiki (e.g., @url{http://cliki.net/site/recent-changes}).
@acronym{RSS} has a quite regular and nice interface, and it's
possible to get the information Gnus needs to keep groups updated.
@ -25993,9 +26006,13 @@ following variables.
@defvar gnus-registry-track-extra
This is a list of symbols, so it's best to change it from the
Customize interface. By default it's @code{(subject sender)}, which
may work for you. It can be annoying if your mail flow is large and
people don't stick to the same groups.
Customize interface. By default it's @code{(subject sender recipient)},
which may work for you. It can be annoying if your mail flow is large
and people don't stick to the same groups.
When you decide to stop tracking any of those extra data, you can use
the command @code{gnus-registry-remove-extra-data} to purge it from
the existing registry entries.
@end defvar
@defvar gnus-registry-split-strategy
@ -26568,7 +26585,7 @@ This version of Gnus should work on:
@itemize @bullet
@item
Emacs 21.1 and up.
Emacs 23.1 and up.
@item
XEmacs 21.4 and up.

View File

@ -233,7 +233,7 @@ read an online tutorial by starting GNU Emacs and typing @kbd{C-h t}
@cite{GNU Emacs Manual},
@end iftex
@ifinfo
@ref{top, , GNU Emacs Manual, emacs, GNU Emacs Manual},
@ref{Top, , GNU Emacs Manual, emacs, GNU Emacs Manual},
@end ifinfo
@ifhtml
@uref{http://www.gnu.org/software/emacs/manual/html_node/emacs/,
@ -1121,38 +1121,23 @@ exist,
@footnote{The @cite{GNU Emacs Lisp Reference Manual} may be available
online in the Info system by typing @kbd{C-h i m Emacs Lisp
@key{RET}}. It is also available online at @*
@uref{http://www.gnu.org/savannah-checkouts/gnu/emacs/manual/html_node/elisp/}.
You can also order a printed manual, which has the desirable
side-effect of helping to support the Free Software Foundation which
made all this great software available. You can find an order form by
running @kbd{C-h C-d}, or you can request an order form from @i{gnu at
gnu.org}.}
@uref{http://www.gnu.org/software/emacs/manual/elisp.html}.}
@end iftex
@ifinfo
@footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU
Emacs Lisp Reference Manual}, which may be available online in the
Info system. It is also available online at
@uref{http://www.gnu.org/savannah-checkouts/gnu/emacs/manual/html_node/elisp/}.
You can also order a printed manual, which has the desirable
side-effect of helping to support the Free Software Foundation which
made all this great software available. You can find an order form by
running @kbd{C-h C-d}, or you can request an order form from @i{gnu at
gnu.org}.}
@uref{http://www.gnu.org/software/emacs/manual/elisp.html}.}
@end ifinfo
@ifhtml
@footnote{The
@uref{http://www.gnu.org/savannah-checkouts/gnu/emacs/manual/html_node/elisp/,
@uref{http://www.gnu.org/software/emacs/manual/elisp.html,
The GNU Emacs Lisp Reference Manual} may also be available online in
the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}. You can
also order a printed manual, which has the desirable side-effect of
helping to support the Free Software Foundation which made all this
great software available. You can find an order form by running
@kbd{C-h C-d}, or you can request an order form from @i{gnu at
gnu.org}.}
the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}.}
@end ifhtml
and you can look at the code itself for examples. Look in the Emacs
Lisp directory on your system (such as
@file{/usr/local/lib/emacs/lisp/mh-e}) and find all the @file{mh-*.el}
@file{/usr/local/share/emacs/lisp/mh-e}) and find all the @file{mh-*.el}
files there. When calling MH-E and other Emacs Lisp functions directly
from Emacs Lisp code, you'll need to know the correct arguments. Use
the online help for this. For example, try @kbd{C-h f
@ -2848,7 +2833,7 @@ See @cite{The PGG Manual}.
@end ifinfo
@ifhtml
See
@uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html,
@uref{http://www.gnu.org/software/emacs/manual/pgg.html,
@cite{The PGG Manual}}.
@end ifhtml
@ -5058,7 +5043,7 @@ for the next hook function. The standard prefix
@vindex mh-yank-behavior
For example, if you use the hook function
@uref{http://shasta.cs.uiuc.edu/~lrclause/tc.html,
@uref{http://www.emacswiki.org/emacs/TrivialCite,
@code{trivial-cite}} (which is NOT part of Emacs), set
@code{mh-yank-behavior} to @samp{Body and Header}.
@ -5615,7 +5600,7 @@ See @cite{The PGG Manual}.
@end ifinfo
@ifhtml
See
@uref{http://www.dk.xemacs.org/Documentation/packages/html/pgg.html,
@uref{http://www.gnu.org/software/emacs/manual/pgg.html,
@cite{The PGG Manual}}.
@end ifhtml

View File

@ -89,7 +89,7 @@ works with the following RSS formats:
as well as the following Atom formats:
@item Atom 0.3
@item Atom 1.0 (see
@uref{http://www.ietf.org/internet-drafts/draft-ietf-atompub-format-11.txt}).
@uref{https://datatracker.ietf.org/doc/rfc4287/}).
@end itemize
That makes Newsticker.el an ``Atom aggregator'', ``RSS reader'', ``Feed

View File

@ -86,7 +86,11 @@ convert a RELAX NG XML syntax schema to an RNC schema.
@noindent To convert a RELAX NG XML syntax (@samp{.rng}) schema to a RNC
one, you can also use the XSLT stylesheet from
@url{https://github.com/oleg-pavliv/emacs/tree/master/xsl}.
@ignore
@c Original location, now defunct.
@url{http://www.pantor.com/download.html}.
@end ignore
To convert a W3C XML Schema to an RNC schema, you need first to convert it
to RELAX NG XML syntax using the RELAX NG converter tool @code{rngconv}

View File

@ -10393,7 +10393,7 @@ view type is a @emph{folding} view much like Org provides inside Emacs. The
script is available at @url{http://orgmode.org/org-info.js} and you can find
the documentation for it at @url{http://orgmode.org/worg/code/org-info-js/}.
We host the script at our site, but if you use it a lot, you might
not want to be dependent on @url{orgmode.org} and prefer to install a local
not want to be dependent on @url{http://orgmode.org} and prefer to install a local
copy on your own web server.
To use the script, you need to make sure that the @file{org-jsinfo.el} module

View File

@ -54,6 +54,8 @@ modify this GNU manual.''
PGG is an interface library between Emacs
and various tools for secure communication. PGG also provides a simple
user interface to encrypt, decrypt, sign, and verify MIME messages.
This package is obsolete; for new code we recommend EasyPG instead.
@xref{Top,, EasyPG, epa, EasyPG Assistant User's Manual}.
@ifnottex
@insertcopying
@ -78,6 +80,9 @@ communication. Even though Mailcrypt has similar feature, it does not
deal with detached PGP messages, normally used in PGP/MIME
infrastructure. This was the main reason why I wrote the new library.
Note that the PGG library is now obsolete, replaced by EasyPG.
@xref{Top,, EasyPG, epa, EasyPG Assistant User's Manual}.
PGP/MIME is an application of MIME Object Security Services (RFC1848).
The standard is documented in RFC2015.

View File

@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2013-02-01.11}
\def\texinfoversion{2013-06-23.10}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@ -2475,14 +2475,14 @@
}
% We *must* turn on hyphenation at `-' and `_' in @code.
% (But see \codedashfinish below.)
% Otherwise, it is too hard to avoid overfull hboxes
% in the Emacs manual, the Library manual, etc.
%
% Unfortunately, TeX uses one parameter (\hyphenchar) to control
% both hyphenation at - and hyphenation within words.
% We must therefore turn them both off (\tclose does that)
% and arrange explicitly to hyphenate at a dash.
% -- rms.
% and arrange explicitly to hyphenate at a dash. -- rms.
{
\catcode`\-=\active \catcode`\_=\active
\catcode`\'=\active \catcode`\`=\active
@ -2499,14 +2499,33 @@
\let-\normaldash
\let_\realunder
\fi
% Given -foo (with a single dash), we do not want to allow a break
% after the hyphen.
\global\let\codedashprev=\codedash
%
\codex
}
%
\gdef\codedash{\futurelet\next\codedashfinish}
\gdef\codedashfinish{%
\normaldash % always output the dash character itself.
%
% Now, output a discretionary to allow a line break, unless
% (a) the next character is a -, or
% (b) the preceding character is a -.
% E.g., given --posix, we do not want to allow a break after either -.
% Given --foo-bar, we do want to allow a break between the - and the b.
\ifx\next\codedash \else
\ifx\codedashprev\codedash
\else \discretionary{}{}{}\fi
\fi
\global\let\codedashprev=\next
}
}
\def\normaldash{-}
%
\def\codex #1{\tclose{#1}\endgroup}
\def\normaldash{-}
\def\codedash{-\discretionary{}{}{}}
\def\codeunder{%
% this is all so @math{@code{var_name}+1} can work. In math mode, _
% is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
@ -4211,8 +4230,9 @@
% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
% with @set.
%
% To get special treatment of `@end ifset,' call \makeond and the redefine.
%
% To get the special treatment we need for `@end ifset,' we call
% \makecond and then redefine.
%
\makecond{ifset}
\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
@ -6402,7 +6422,7 @@
\newdimen\nonfillparindent
\def\nonfillstart{%
\aboveenvbreak
\hfuzz = 12pt % Don't be fussy
\ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy
\sepspaces % Make spaces be word-separators rather than space tokens.
\let\par = \lisppar % don't ignore blank lines
\obeylines % each line of input is a line of output

View File

@ -138,7 +138,7 @@ Given a parsed URI, this function returns the corresponding URI string.
The return value of @code{url-generic-parse-url}, and the argument
expected by @code{url-recreate-url}, is a @dfn{parsed URI}: a CL
structure whose slots hold the various components of the URI@.
@xref{top,the CL Manual,,cl,GNU Emacs Common Lisp Emulation}, for
@xref{Top,the CL Manual,,cl,GNU Emacs Common Lisp Emulation}, for
details about CL structures. Most of the other functions in the
@code{url} library act on parsed URIs.

View File

@ -113,9 +113,6 @@ of GNU Bison 1.28 & 1.31.
For more details on the basic concepts for understanding Wisent, it is
worthwhile to read the @ref{Top, Bison Manual, , bison}.
@ifhtml
@uref{http://www.gnu.org/manual/bison/html_node/index.html}.
@end ifhtml
Wisent can generate compilers compatible with the @semantic{} tool set.
See the @ref{Top, Semantic Manual, , semantic}.

View File

@ -1,3 +1,26 @@
2013-07-13 Eli Zaretskii <eliz@gnu.org>
* NEWS: Document prefer-utf-8 and the new attributes
:inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
:prefer-utf-8.
2013-07-13 Leo Liu <sdl.web@gmail.com>
* NEWS: Mention new value for ido-use-virtual-buffers.
2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
Timestamp fixes for undo (Bug#14824).
* NEWS: Changes to visited-file-modtime, set-visited-file-modtime.
2013-07-08 Jan Djärv <jan.h.d@swipnet.se>
* NEWS: NS can be built with ImageMagick.
2013-07-06 Juanma Barranquero <lekktu@gmail.com>
* NEWS: Document new "generic commands" support.
2013-06-27 Juanma Barranquero <lekktu@gmail.com>
* NEWS: Document new Desktop option `desktop-save-windows'.

131
etc/NEWS
View File

@ -15,10 +15,10 @@ You can narrow news to a specific version by calling `view-emacs-news'
with a prefix argument or by typing C-u C-h C-n.
Temporary note:
+++ indicates that the appropriate manual has already been updated.
--- means no change in the manuals is called for.
When you add a new item, please add it without either +++ or ---
so we will look at it and add it to the manual.
+++ indicates that all necessary updates to the manuals in doc/ are complete.
--- means no change in the manuals is needed.
When you add a new item, use the appropriate mark if you know it applies,
otherwise leave it unmarked.
* Installation Changes in Emacs 24.4
@ -29,37 +29,22 @@ build time, like libacl on GNU/Linux. To prevent this, use the
configure option `--disable-acl'.
** Emacs can be compiled with file notification support.
The configure option `--with-file-notification=LIB' enables file
notification support in Emacs. This option's value should be `yes',
`no', `gfile', `inotify' or `w32'. `yes' is a synonym for `w32' on
MS-Windows, and for `gfile' otherwise. The default value is `yes'.
This happens by default if a suitable system library is found at
build time. To prevent this, use the configure option
`--with-file-notification-no'. See below for file-notify features.
FIXME? This feature is not available for the Nextstep port. (?)
** The configure option --with-crt-dir has been removed.
It is no longer needed, as the crt*.o files are no longer linked
specially.
** Emacs for MS-Windows can now be built by running the configure script
using the MSYS environment and MinGW development tools.
This is from now on the preferred method of building Emacs on
MS-Windows. The Windows-specific configure.bat and makefile.w32-in
files are deprecated. See the file nt/INSTALL.MSYS for detailed
instructions.
Using the Posix configure script and Makefile's also means a change in
the directory structure of the Emacs installation on Windows. It is
now the same as on GNU and Unix systems. In particular, the auxiliary
programs, such as cmdproxy.exe and hexl.exe, are in
libexec/emacs/VERSION/i686-pc-mingw32 (where VERSION is the Emacs
version), version-independent site-lisp is in share/emacs/site-lisp,
version-specific Lisp files are in share/emacs/VERSION/lisp and in
share/emacs/VERSION/site-lisp, Info docs are in share/info, and data
files are in share/emacs/VERSION/etc. (Emacs knows about all these
directories and will find the files in there automatically; there's no
need to set any variables due to this change.)
** Directories passed to configure option `--enable-locallisppath' are
no longer created during installation.
---
** Emacs for NS (OSX, GNUStep) can be built with ImageMagick support.
pkg-config is required to find ImageMagick libraries.
* Startup Changes in Emacs 24.4
@ -125,6 +110,18 @@ used to conveniently prepend/append new face attributes to text.
`frame-monitor-attributes' can be used to obtain information about
each physical monitor on multi-monitor setups.
*** The functions `display-pixel-width' and `display-pixel-height' now
behave consistently among the platforms: they return the pixel width
or height for all physical monitors associated with the given display
as just they were on X11. To get information for each physical
monitor, use the new functions above. Similar notes also apply to
`x-display-pixel-width', `x-display-pixel-height', `display-mm-width',
`display-mm-height', `x-display-mm-width', and `x-display-mm-height'.
** New macro `alternatives-define' can be used to define generic commands.
Generic commands are interactive functions whose implementation can be
selected among several alternatives, as a matter of user preference.
* Editing Changes in Emacs 24.4
@ -177,6 +174,8 @@ You can use the new function `remember-store-in-files' within the
See `remember-data-directory' and `remember-directory-file-name-format'
for new options related to this function.
** `ido-use-virtual-buffers' takes a new value 'auto.
** `ido-decorations' has been slightly extended to give a bit more control.
** More packages look for ~/.emacs.d/<foo> additionally to ~/.<foo>.
@ -218,6 +217,10 @@ The default separator is changed to allow surrounding spaces around the comma.
*** Battery information via the BSD `apm' utility is now supported.
** Buffer Menu
*** `M-s a C-o' shows lines matching a regexp in marked buffers using Occur.
** Calendar and Diary
+++
@ -252,7 +255,7 @@ on the given date.
*** `desktop-auto-save-timeout' defines the number of seconds between
auto-saves of the desktop.
*** `desktop-restore-frames enables saving and restoring the window/frame
*** `desktop-restore-frames' enables saving and restoring the window/frame
configuration.
** Dired
@ -407,6 +410,10 @@ when possible.
*** Handlers for `file-acl' and `set-file-acl' for remote machines
which support POSIX ACLs.
+++
*** Handlers for `file-notify-add-watch' and `file-notify-rm-watch'
for remote machines which support filesystem notifications.
** VHDL mode
*** New options: `vhdl-actual-generic-name', `vhdl-beautify-options'.
@ -416,13 +423,13 @@ which support POSIX ACLs.
** Woman
*** The commands `woman-default-faces' and `woman-monochrome-faces'
are obsolete. Customize the `woman-* faces instead.
are obsolete. Customize the `woman-*' faces instead.
** Eshell
*** Added Eshell-TRAMP module
*** Added Eshell-Tramp module
External su and sudo commands are now the default; the internal,
TRAMP-using variants can still be used by enabling the eshell-tramp
Tramp-using variants can still be used by enabling the eshell-tramp
module.
** New term.el option `term-suppress-hard-newline'.
@ -462,6 +469,10 @@ It is layered as:
- advice-add/advice-remove to add/remove a piece of advice on a named function,
much like `defadvice' does.
** The package file-notify.el provides an interface for file system
notifications. It requires, that Emacs is compiled with one of the
low-level libraries gfilenotify.c, inotify.c or w32notify.c.
* Incompatible Lisp Changes in Emacs 24.4
@ -509,9 +520,14 @@ alist of extended attributes as returned by the new function
`file-extended-attributes'. The attributes can be applied to another
file using `set-file-extended-attributes'.
** `visited-file-modtime' now returns -1 for nonexistent files.
Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous
in the presence of files with negative time stamps.
* Lisp Changes in Emacs 24.4
** New hook `tty-setup-hook'.
+++
** New macro with-eval-after-load. Like eval-after-load, but better behaved.
@ -583,6 +599,38 @@ Emacs uses `image-default-frame-delay'.
*** New functions `image-current-frame' and `image-show-frame' for getting
and setting the current frame of a multi-frame image.
** Changes in encoding and decoding of text
---
*** New coding-system `prefer-utf-8'.
This is like `undecided' but prefers UTF-8 on decoding if the text to
be decoded does not contain any invalid UTF-8 sequences. On encoding,
any non-ASCII characters are automatically encoded as UTF-8.
---
*** New attributes of coding-systems whose type is `undecided'.
Two new attributes, `:inhibit-null-byte-detection' and
`:inhibit-iso-escape-detection', determine how to detect encoding of
text that includes null bytes and ISO-2022 escape sequences,
respectively. Each of these attributes can be either nil, zero, or
t. If it is t, decoding text ignores null bytes and, respectively,
ISO-2022 sequences. If it is nil, null bytes cause text to be decoded
with no-conversion and ISO-2022 sequences cause Emacs to assume the
text is encoded in one of the ISO-2022 encodings, such as
iso-2022-7bit. If the value is zero, Emacs consults the variables
inhibit-null-byte-detection and inhibit-iso-escape-detection, which
see.
The new attribute `:prefer-utf-8', if non-nil, causes Emacs to prefer
UTF-8 encoding and decoding, whenever possible.
These attributes are only meaningful for coding-systems of type
`undecided'. (The type of a coding-system is determined by its
`:coding-type' attribute and can be accessed by calling the
`coding-system-type' function.)
** The function `set-visited-file-modtime' now accepts a 0 or -1 argument
with the same interpretation as the returned value of `visited-file-modtime'.
** time-to-seconds is not obsolete any more.
** New function special-form-p.
** Docstrings can be made dynamic by adding a `dynamic-docstring-function'
@ -626,6 +674,25 @@ meant to be used by other packages.
* Changes in Emacs 24.4 on Non-Free Operating Systems
** Emacs for MS-Windows can now be built by running the configure script
using the MSYS environment and MinGW development tools.
This is from now on the preferred method of building Emacs on
MS-Windows. The Windows-specific configure.bat and makefile.w32-in
files are deprecated. See the file nt/INSTALL.MSYS for detailed
instructions.
Using the Posix configure script and Makefile's also means a change in
the directory structure of the Emacs installation on Windows. It is
now the same as on GNU and Unix systems. In particular, the auxiliary
programs, such as cmdproxy.exe and hexl.exe, are in
libexec/emacs/VERSION/i686-pc-mingw32 (where VERSION is the Emacs
version), version-independent site-lisp is in share/emacs/site-lisp,
version-specific Lisp files are in share/emacs/VERSION/lisp and in
share/emacs/VERSION/site-lisp, Info docs are in share/info, and data
files are in share/emacs/VERSION/etc. (Emacs knows about all these
directories and will find the files in there automatically; there's no
need to set any variables due to this change.)
+++
** The "generate a backtrace on fatal error" feature now works on MS Windows.
The backtrace is written to the 'emacs_backtrace.txt' file in the
@ -1034,7 +1101,7 @@ file at point.
`DEL' (`dired-unmark-backward'), and `d' (`dired-flag-file-deletion')
mark/unmark/flag all files in the active region.
*** The minibuffer default for `=' (`dired-diff) has changed.
*** The minibuffer default for `=' (`dired-diff') has changed.
It is now the backup file for the file at point, if one exists.
In Transient Mark mode the default is the file at the active mark.

View File

@ -1,3 +1,15 @@
2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
Port to C89.
* ebrowse.c (USAGE): Remove macro with too-long string literal ...
(usage_message): ... and replace it with this new static constant
containing multiple literals. All uses changed.
* emacsclient.c (print_help_and_exit):
Rewrite to avoid string literals longer than the C89 limits.
(start_daemon_and_retry_set_socket):
Rewrite to avoid non-constant array initializer.
* make-docfile.c (enum global_type): Omit trailing comma.
2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
Prefer plain 'static' to 'static inline' (Bug#12541).
@ -6134,7 +6146,7 @@
1995-06-13 Geoff Voelker <voelker@cs.washington.edu>
* etags.c (process_file,absolute_filename): Handle filenames
* etags.c (process_file, absolute_filename): Handle filenames
starting with a drive letter.
* makefile.nt (install): Copy wakeup.exe properly.
@ -6161,12 +6173,12 @@
1995-05-25 Geoff Voelker <voelker@cs.washington.edu>
* makefile.nt (LIBS): Use BASE_LIBS.
(make-docfile.exe,hexl.exe,wakeup.exe,etags.exe): Don't depend
(make-docfile.exe, hexl.exe, wakeup.exe, etags.exe): Don't depend
upon LIBS.
(DOC): Use del instead of rm.
(DOC) [WINDOWS95]: Use DOC.
(clean): Handle MSVC aux files.
(config.h,paths.h): Use $(CP) instead of cp.
(config.h, paths.h): Use $(CP) instead of cp.
(config.h): Use $(CONFIG_H)
(make-docfile.obj): Depend upon config.h.
Clean up comments.

View File

@ -3481,7 +3481,9 @@ open_file (char *file)
/* Display usage information and exit program. */
#define USAGE "\
static char const *const usage_message[] =
{
"\
Usage: ebrowse [options] {files}\n\
\n\
-a, --append append output to existing file\n\
@ -3489,6 +3491,8 @@ Usage: ebrowse [options] {files}\n\
-I, --search-path=LIST set search path for input files\n\
-m, --min-regexp-length=N set minimum regexp length to N\n\
-M, --max-regexp-length=N set maximum regexp length to N\n\
",
"\
-n, --no-nested-classes exclude nested classes\n\
-o, --output-file=FILE set output file name to FILE\n\
-p, --position-info print info about position in file\n\
@ -3498,12 +3502,16 @@ Usage: ebrowse [options] {files}\n\
-x, --no-regexps don't record regular expressions\n\
--help display this help\n\
--version display version info\n\
\n\
"
};
static _Noreturn void
usage (int error)
{
puts (USAGE);
int i;
for (i = 0; i < sizeof usage_message / sizeof *usage_message; i++)
fputs (usage_message[i], stdout);
exit (error ? EXIT_FAILURE : EXIT_SUCCESS);
}

View File

@ -630,7 +630,7 @@ print_help_and_exit (void)
Please try to preserve them; otherwise the output is very hard to read
when using emacsclientw. */
message (FALSE,
"Usage: %s [OPTIONS] FILE...\n\
"Usage: %s [OPTIONS] FILE...\n%s%s%s", progname, "\
Tell the Emacs server to visit the specified files.\n\
Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\
\n\
@ -640,6 +640,7 @@ The following OPTIONS are accepted:\n\
-nw, -t, --tty Open a new Emacs frame on the current terminal\n\
-c, --create-frame Create a new frame instead of trying to\n\
use the current Emacs frame\n\
", "\
-F ALIST, --frame-parameters=ALIST\n\
Set the parameters of a new frame\n\
-e, --eval Evaluate the FILE arguments as ELisp expressions\n\
@ -647,6 +648,7 @@ The following OPTIONS are accepted:\n\
-q, --quiet Don't display messages on success\n\
-d DISPLAY, --display=DISPLAY\n\
Visit the file in the given display\n\
", "\
--parent-id=ID Open in parent window ID, via XEmbed\n"
#ifndef NO_SOCKETS_IN_FILE_SYSTEM
"-s SOCKET, --socket-name=SOCKET\n\
@ -661,7 +663,7 @@ The following OPTIONS are accepted:\n\
mode and try connecting again\n"
#endif /* not WINDOWSNT */
"\n\
Report bugs with M-x report-emacs-bug.\n", progname);
Report bugs with M-x report-emacs-bug.\n");
exit (EXIT_SUCCESS);
}
@ -1509,7 +1511,10 @@ start_daemon_and_retry_set_socket (void)
{
char emacs[] = "emacs";
char daemon_option[] = "--daemon";
char *d_argv[] = {emacs, daemon_option, 0 };
char *d_argv[3];
d_argv[0] = emacs;
d_argv[1] = daemon_option;
d_argv[2] = 0;
if (socket_name != NULL)
{
/* Pass --daemon=socket_name as argument. */

View File

@ -555,7 +555,7 @@ enum global_type
LISP_OBJECT,
EMACS_INTEGER,
BOOLEAN,
FUNCTION,
FUNCTION
};
/* A single global. */

3
lib/binary-io.c Normal file
View File

@ -0,0 +1,3 @@
#include <config.h>
#define BINARY_IO_INLINE _GL_EXTERN_INLINE
#include "binary-io.h"

72
lib/binary-io.h Normal file
View File

@ -0,0 +1,72 @@
/* Binary mode I/O.
Copyright (C) 2001, 2003, 2005, 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _BINARY_H
#define _BINARY_H
/* For systems that distinguish between text and binary I/O.
O_BINARY is guaranteed by the gnulib <fcntl.h>. */
#include <fcntl.h>
/* The MSVC7 <stdio.h> doesn't like to be included after '#define fileno ...',
so we include it here first. */
#include <stdio.h>
_GL_INLINE_HEADER_BEGIN
#ifndef BINARY_IO_INLINE
# define BINARY_IO_INLINE _GL_INLINE
#endif
/* set_binary_mode (fd, mode)
sets the binary/text I/O mode of file descriptor fd to the given mode
(must be O_BINARY or O_TEXT) and returns the previous mode. */
#if O_BINARY
# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
# include <io.h> /* declares setmode() */
# define set_binary_mode setmode
# else
# define set_binary_mode _setmode
# undef fileno
# define fileno _fileno
# endif
#else
/* On reasonable systems, binary I/O is the only choice. */
/* Use a function rather than a macro, to avoid gcc warnings
"warning: statement with no effect". */
BINARY_IO_INLINE int
set_binary_mode (int fd, int mode)
{
(void) fd;
(void) mode;
return O_BINARY;
}
#endif
/* SET_BINARY (fd);
changes the file descriptor fd to perform binary I/O. */
#ifdef __DJGPP__
# include <unistd.h> /* declares isatty() */
/* Avoid putting stdin/stdout in binary mode if it is connected to
the console, because that would make it impossible for the user
to interrupt the program through Ctrl-C or Ctrl-Break. */
# define SET_BINARY(fd) ((void) (!isatty (fd) ? (set_binary_mode (fd, O_BINARY), 0) : 0))
#else
# define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY))
#endif
_GL_INLINE_HEADER_END
#endif /* _BINARY_H */

311
lib/fcntl.c Normal file
View File

@ -0,0 +1,311 @@
/* Provide file descriptor control.
Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>. */
#include <config.h>
/* Specification. */
#include <fcntl.h>
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
#include <unistd.h>
#if !HAVE_FCNTL
# define rpl_fcntl fcntl
#endif
#undef fcntl
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* Get _get_osfhandle. */
# include "msvc-nothrow.h"
/* Upper bound on getdtablesize(). See lib/getdtablesize.c. */
# define OPEN_MAX_MAX 0x10000
/* Duplicate OLDFD into the first available slot of at least NEWFD,
which must be positive, with FLAGS determining whether the duplicate
will be inheritable. */
static int
dupfd (int oldfd, int newfd, int flags)
{
/* Mingw has no way to create an arbitrary fd. Iterate until all
file descriptors less than newfd are filled up. */
HANDLE curr_process = GetCurrentProcess ();
HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd);
unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT];
unsigned int fds_to_close_bound = 0;
int result;
BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE;
int mode;
if (newfd < 0 || getdtablesize () <= newfd)
{
errno = EINVAL;
return -1;
}
if (old_handle == INVALID_HANDLE_VALUE
|| (mode = setmode (oldfd, O_BINARY)) == -1)
{
/* oldfd is not open, or is an unassigned standard file
descriptor. */
errno = EBADF;
return -1;
}
setmode (oldfd, mode);
flags |= mode;
for (;;)
{
HANDLE new_handle;
int duplicated_fd;
unsigned int index;
if (!DuplicateHandle (curr_process, /* SourceProcessHandle */
old_handle, /* SourceHandle */
curr_process, /* TargetProcessHandle */
(PHANDLE) &new_handle, /* TargetHandle */
(DWORD) 0, /* DesiredAccess */
inherit, /* InheritHandle */
DUPLICATE_SAME_ACCESS)) /* Options */
{
/* TODO: Translate GetLastError () into errno. */
errno = EMFILE;
result = -1;
break;
}
duplicated_fd = _open_osfhandle ((intptr_t) new_handle, flags);
if (duplicated_fd < 0)
{
CloseHandle (new_handle);
errno = EMFILE;
result = -1;
break;
}
if (newfd <= duplicated_fd)
{
result = duplicated_fd;
break;
}
/* Set the bit duplicated_fd in fds_to_close[]. */
index = (unsigned int) duplicated_fd / CHAR_BIT;
if (fds_to_close_bound <= index)
{
if (sizeof fds_to_close <= index)
/* Need to increase OPEN_MAX_MAX. */
abort ();
memset (fds_to_close + fds_to_close_bound, '\0',
index + 1 - fds_to_close_bound);
fds_to_close_bound = index + 1;
}
fds_to_close[index] |= 1 << ((unsigned int) duplicated_fd % CHAR_BIT);
}
/* Close the previous fds that turned out to be too small. */
{
int saved_errno = errno;
unsigned int duplicated_fd;
for (duplicated_fd = 0;
duplicated_fd < fds_to_close_bound * CHAR_BIT;
duplicated_fd++)
if ((fds_to_close[duplicated_fd / CHAR_BIT]
>> (duplicated_fd % CHAR_BIT))
& 1)
close (duplicated_fd);
errno = saved_errno;
}
# if REPLACE_FCHDIR
if (0 <= result)
result = _gl_register_dup (oldfd, result);
# endif
return result;
}
#endif /* W32 */
/* Perform the specified ACTION on the file descriptor FD, possibly
using the argument ARG further described below. This replacement
handles the following actions, and forwards all others on to the
native fcntl. An unrecognized ACTION returns -1 with errno set to
EINVAL.
F_DUPFD - duplicate FD, with int ARG being the minimum target fd.
If successful, return the duplicate, which will be inheritable;
otherwise return -1 and set errno.
F_DUPFD_CLOEXEC - duplicate FD, with int ARG being the minimum
target fd. If successful, return the duplicate, which will not be
inheritable; otherwise return -1 and set errno.
F_GETFD - ARG need not be present. If successful, return a
non-negative value containing the descriptor flags of FD (only
FD_CLOEXEC is portable, but other flags may be present); otherwise
return -1 and set errno. */
int
rpl_fcntl (int fd, int action, /* arg */...)
{
va_list arg;
int result = -1;
va_start (arg, action);
switch (action)
{
#if !HAVE_FCNTL
case F_DUPFD:
{
int target = va_arg (arg, int);
result = dupfd (fd, target, 0);
break;
}
#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR
case F_DUPFD:
{
int target = va_arg (arg, int);
/* Detect invalid target; needed for cygwin 1.5.x. */
if (target < 0 || getdtablesize () <= target)
errno = EINVAL;
else
{
/* Haiku alpha 2 loses fd flags on original. */
int flags = fcntl (fd, F_GETFD);
if (flags < 0)
{
result = -1;
break;
}
result = fcntl (fd, action, target);
if (0 <= result && fcntl (fd, F_SETFD, flags) == -1)
{
int saved_errno = errno;
close (result);
result = -1;
errno = saved_errno;
}
# if REPLACE_FCHDIR
if (0 <= result)
result = _gl_register_dup (fd, result);
# endif
}
break;
} /* F_DUPFD */
#endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */
case F_DUPFD_CLOEXEC:
{
int target = va_arg (arg, int);
#if !HAVE_FCNTL
result = dupfd (fd, target, O_CLOEXEC);
break;
#else /* HAVE_FCNTL */
/* Try the system call first, if the headers claim it exists
(that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we
may be running with a glibc that has the macro but with an
older kernel that does not support it. Cache the
information on whether the system call really works, but
avoid caching failure if the corresponding F_DUPFD fails
for any reason. 0 = unknown, 1 = yes, -1 = no. */
static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0;
if (0 <= have_dupfd_cloexec)
{
result = fcntl (fd, action, target);
if (0 <= result || errno != EINVAL)
{
have_dupfd_cloexec = 1;
# if REPLACE_FCHDIR
if (0 <= result)
result = _gl_register_dup (fd, result);
# endif
}
else
{
result = rpl_fcntl (fd, F_DUPFD, target);
if (result < 0)
break;
have_dupfd_cloexec = -1;
}
}
else
result = rpl_fcntl (fd, F_DUPFD, target);
if (0 <= result && have_dupfd_cloexec == -1)
{
int flags = fcntl (result, F_GETFD);
if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
{
int saved_errno = errno;
close (result);
errno = saved_errno;
result = -1;
}
}
break;
#endif /* HAVE_FCNTL */
} /* F_DUPFD_CLOEXEC */
#if !HAVE_FCNTL
case F_GETFD:
{
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
HANDLE handle = (HANDLE) _get_osfhandle (fd);
DWORD flags;
if (handle == INVALID_HANDLE_VALUE
|| GetHandleInformation (handle, &flags) == 0)
errno = EBADF;
else
result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC;
# else /* !W32 */
/* Use dup2 to reject invalid file descriptors. No way to
access this information, so punt. */
if (0 <= dup2 (fd, fd))
result = 0;
# endif /* !W32 */
break;
} /* F_GETFD */
#endif /* !HAVE_FCNTL */
/* Implementing F_SETFD on mingw is not trivial - there is no
API for changing the O_NOINHERIT bit on an fd, and merely
changing the HANDLE_FLAG_INHERIT bit on the underlying handle
can lead to odd state. It may be possible by duplicating the
handle, using _open_osfhandle with the right flags, then
using dup2 to move the duplicate onto the original, but that
is not supported for now. */
default:
{
#if HAVE_FCNTL
void *p = va_arg (arg, void *);
result = fcntl (fd, action, p);
#else
errno = EINVAL;
#endif
break;
}
}
va_end (arg);
return result;
}

86
lib/getdtablesize.c Normal file
View File

@ -0,0 +1,86 @@
/* getdtablesize() function for platforms that don't have it.
Copyright (C) 2008-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
/* Specification. */
#include <unistd.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
#include <stdio.h>
#include "msvc-inval.h"
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
static int
_setmaxstdio_nothrow (int newmax)
{
int result;
TRY_MSVC_INVAL
{
result = _setmaxstdio (newmax);
}
CATCH_MSVC_INVAL
{
result = -1;
}
DONE_MSVC_INVAL;
return result;
}
# define _setmaxstdio _setmaxstdio_nothrow
#endif
/* Cache for the previous getdtablesize () result. */
static int dtablesize;
int
getdtablesize (void)
{
if (dtablesize == 0)
{
/* We are looking for the number N such that the valid file descriptors
are 0..N-1. It can be obtained through a loop as follows:
{
int fd;
for (fd = 3; fd < 65536; fd++)
if (dup2 (0, fd) == -1)
break;
return fd;
}
On Windows XP, the result is 2048.
The drawback of this loop is that it allocates memory for a libc
internal array that is never freed.
The number N can also be obtained as the upper bound for
_getmaxstdio (). _getmaxstdio () returns the maximum number of open
FILE objects. The sanity check in _setmaxstdio reveals the maximum
number of file descriptors. This too allocates memory, but it is
freed when we call _setmaxstdio with the original value. */
int orig_max_stdio = _getmaxstdio ();
unsigned int bound;
for (bound = 0x10000; _setmaxstdio (bound) < 0; bound = bound / 2)
;
_setmaxstdio (orig_max_stdio);
dtablesize = bound;
}
return dtablesize;
}
#endif

View File

@ -21,7 +21,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dup --avoid=fchdir --avoid=fcntl --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
MOSTLYCLEANFILES += core *.stackdump
@ -75,6 +75,12 @@ EXTRA_libgnu_a_SOURCES += openat-proc.c
## end gnulib module at-internal
## begin gnulib module binary-io
libgnu_a_SOURCES += binary-io.h binary-io.c
## end gnulib module binary-io
## begin gnulib module c-ctype
libgnu_a_SOURCES += c-ctype.h c-ctype.c
@ -296,6 +302,15 @@ EXTRA_libgnu_a_SOURCES += at-func.c faccessat.c
## end gnulib module faccessat
## begin gnulib module fcntl
EXTRA_DIST += fcntl.c
EXTRA_libgnu_a_SOURCES += fcntl.c
## end gnulib module fcntl
## begin gnulib module fcntl-h
BUILT_SOURCES += fcntl.h
@ -384,6 +399,17 @@ EXTRA_libgnu_a_SOURCES += fsync.c
## end gnulib module fsync
## begin gnulib module getdtablesize
if gl_GNULIB_ENABLED_getdtablesize
endif
EXTRA_DIST += getdtablesize.c
EXTRA_libgnu_a_SOURCES += getdtablesize.c
## end gnulib module getdtablesize
## begin gnulib module getgroups
if gl_GNULIB_ENABLED_getgroups
@ -465,13 +491,6 @@ EXTRA_libgnu_a_SOURCES += group-member.c
## end gnulib module group-member
## begin gnulib module ignore-value
EXTRA_DIST += ignore-value.h
## end gnulib module ignore-value
## begin gnulib module intprops
@ -568,6 +587,12 @@ EXTRA_DIST += pathmax.h
## end gnulib module pathmax
## begin gnulib module pipe2
libgnu_a_SOURCES += pipe2.c
## end gnulib module pipe2
## begin gnulib module pselect
@ -1704,9 +1729,7 @@ EXTRA_DIST += utimens.h
## begin gnulib module verify
if gl_GNULIB_ENABLED_verify
endif
EXTRA_DIST += verify.h
## end gnulib module verify

View File

@ -1,48 +0,0 @@
/* ignore a function return without a compiler warning
Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Written by Jim Meyering, Eric Blake and Pádraig Brady. */
/* Use "ignore_value" to avoid a warning when using a function declared with
gcc's warn_unused_result attribute, but for which you really do want to
ignore the result. Traditionally, people have used a "(void)" cast to
indicate that a function's return value is deliberately unused. However,
if the function is declared with __attribute__((warn_unused_result)),
gcc issues a warning even with the cast.
Caution: most of the time, you really should heed gcc's warning, and
check the return value. However, in those exceptional cases in which
you're sure you know what you're doing, use this function.
For the record, here's one of the ignorable warnings:
"copy.c:233: warning: ignoring return value of 'fchown',
declared with attribute warn_unused_result". */
#ifndef _GL_IGNORE_VALUE_H
#define _GL_IGNORE_VALUE_H
/* The __attribute__((__warn_unused_result__)) feature
is available in gcc versions 3.4 and newer,
while the typeof feature has been available since 2.7 at least. */
#if 3 < __GNUC__ + (4 <= __GNUC_MINOR__)
# define ignore_value(x) \
(__extension__ ({ __typeof__ (x) __x = (x); (void) __x; }))
#else
# define ignore_value(x) ((void) (x))
#endif
#endif

168
lib/pipe2.c Normal file
View File

@ -0,0 +1,168 @@
/* Create a pipe, with specific opening flags.
Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
/* Specification. */
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include "binary-io.h"
#include "verify.h"
#if GNULIB_defined_O_NONBLOCK
# include "nonblocking.h"
#endif
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Native Windows API. */
# include <io.h>
#endif
int
pipe2 (int fd[2], int flags)
{
/* Mingw _pipe() corrupts fd on failure; also, if we succeed at
creating the pipe but later fail at changing fcntl, we want
to leave fd unchanged: http://austingroupbugs.net/view.php?id=467 */
int tmp[2];
tmp[0] = fd[0];
tmp[1] = fd[1];
#if HAVE_PIPE2
# undef pipe2
/* Try the system call first, if it exists. (We may be running with a glibc
that has the function but with an older kernel that lacks it.) */
{
/* Cache the information whether the system call really exists. */
static int have_pipe2_really; /* 0 = unknown, 1 = yes, -1 = no */
if (have_pipe2_really >= 0)
{
int result = pipe2 (fd, flags);
if (!(result < 0 && errno == ENOSYS))
{
have_pipe2_really = 1;
return result;
}
have_pipe2_really = -1;
}
}
#endif
/* Check the supported flags. */
if ((flags & ~(O_CLOEXEC | O_NONBLOCK | O_BINARY | O_TEXT)) != 0)
{
errno = EINVAL;
return -1;
}
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Native Windows API. */
if (_pipe (fd, 4096, flags & ~O_NONBLOCK) < 0)
{
fd[0] = tmp[0];
fd[1] = tmp[1];
return -1;
}
/* O_NONBLOCK handling.
On native Windows platforms, O_NONBLOCK is defined by gnulib. Use the
functions defined by the gnulib module 'nonblocking'. */
# if GNULIB_defined_O_NONBLOCK
if (flags & O_NONBLOCK)
{
if (set_nonblocking_flag (fd[0], true) != 0
|| set_nonblocking_flag (fd[1], true) != 0)
goto fail;
}
# else
{
verify (O_NONBLOCK == 0);
}
# endif
return 0;
#else
/* Unix API. */
if (pipe (fd) < 0)
return -1;
/* POSIX <http://www.opengroup.org/onlinepubs/9699919799/functions/pipe.html>
says that initially, the O_NONBLOCK and FD_CLOEXEC flags are cleared on
both fd[0] and fd[1]. */
/* O_NONBLOCK handling.
On Unix platforms, O_NONBLOCK is defined by the system. Use fcntl(). */
if (flags & O_NONBLOCK)
{
int fcntl_flags;
if ((fcntl_flags = fcntl (fd[1], F_GETFL, 0)) < 0
|| fcntl (fd[1], F_SETFL, fcntl_flags | O_NONBLOCK) == -1
|| (fcntl_flags = fcntl (fd[0], F_GETFL, 0)) < 0
|| fcntl (fd[0], F_SETFL, fcntl_flags | O_NONBLOCK) == -1)
goto fail;
}
if (flags & O_CLOEXEC)
{
int fcntl_flags;
if ((fcntl_flags = fcntl (fd[1], F_GETFD, 0)) < 0
|| fcntl (fd[1], F_SETFD, fcntl_flags | FD_CLOEXEC) == -1
|| (fcntl_flags = fcntl (fd[0], F_GETFD, 0)) < 0
|| fcntl (fd[0], F_SETFD, fcntl_flags | FD_CLOEXEC) == -1)
goto fail;
}
# if O_BINARY
if (flags & O_BINARY)
{
set_binary_mode (fd[1], O_BINARY);
set_binary_mode (fd[0], O_BINARY);
}
else if (flags & O_TEXT)
{
set_binary_mode (fd[1], O_TEXT);
set_binary_mode (fd[0], O_TEXT);
}
# endif
return 0;
#endif
#if GNULIB_defined_O_NONBLOCK || \
!((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
fail:
{
int saved_errno = errno;
close (fd[0]);
close (fd[1]);
fd[0] = tmp[0];
fd[1] = tmp[1];
errno = saved_errno;
return -1;
}
#endif
}

View File

@ -41,13 +41,28 @@
are 4 unless the option '-malign-double' is used.
The result cannot be used as a value for an 'enum' constant, if you
want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */
want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.
Include <stddef.h> for offsetof. */
#include <stddef.h>
#if defined __cplusplus
/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
standard headers, defines conflicting implementations of _Alignas
and _Alignof that are no better than ours; override them. */
#undef _Alignas
#undef _Alignof
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
# ifdef __cplusplus
# if 201103 <= __cplusplus
# define _Alignof(type) alignof (type)
# else
template <class __t> struct __alignof_helper { char __a; __t __b; };
# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
#else
# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
# endif
# else
# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
# endif
#endif
#define alignof _Alignof
#define __alignof_is_defined 1
@ -77,12 +92,16 @@
*/
#if __GNUC__ || __IBMC__ || __IBMCPP__ || 0x5110 <= __SUNPRO_C
# define _Alignas(a) __attribute__ ((__aligned__ (a)))
#elif 1300 <= _MSC_VER
# define _Alignas(a) __declspec (align (a))
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
# if defined __cplusplus && 201103 <= __cplusplus
# define _Alignas(a) alignas (a)
# elif __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC || 0x5110 <= __SUNPRO_C
# define _Alignas(a) __attribute__ ((__aligned__ (a)))
# elif 1300 <= _MSC_VER
# define _Alignas(a) __declspec (align (a))
# endif
#endif
#ifdef _Alignas
#if defined _Alignas || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__)
# define alignas _Alignas
# define __alignas_is_defined 1
#endif

View File

@ -18,7 +18,7 @@
/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
#ifndef _GL_VERIFY_H
# define _GL_VERIFY_H
#define _GL_VERIFY_H
/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
@ -31,16 +31,24 @@
Use this only with GCC. If we were willing to slow 'configure'
down we could also use it with other compilers, but since this
affects only the quality of diagnostics, why bother? */
# if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \
&& (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \
&& !defined __cplusplus)
# define _GL_HAVE__STATIC_ASSERT 1
# endif
#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \
&& (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \
&& !defined __cplusplus)
# define _GL_HAVE__STATIC_ASSERT 1
#endif
/* The condition (99 < __GNUC__) is temporary, until we know about the
first G++ release that supports static_assert. */
# if (99 < __GNUC__) && defined __cplusplus
# define _GL_HAVE_STATIC_ASSERT 1
# endif
#if (99 < __GNUC__) && defined __cplusplus
# define _GL_HAVE_STATIC_ASSERT 1
#endif
/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
system headers, defines a conflicting _Static_assert that is no
better than ours; override it. */
#ifndef _GL_HAVE_STATIC_ASSERT
# include <stddef.h>
# undef _Static_assert
#endif
/* Each of these macros verifies that its argument R is nonzero. To
be portable, R should be an integer constant expression. Unlike
@ -143,50 +151,50 @@
Use a template type to work around the problem. */
/* Concatenate two preprocessor tokens. */
# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
# define _GL_CONCAT0(x, y) x##y
#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
#define _GL_CONCAT0(x, y) x##y
/* _GL_COUNTER is an integer, preferably one that changes each time we
use it. Use __COUNTER__ if it works, falling back on __LINE__
otherwise. __LINE__ isn't perfect, but it's better than a
constant. */
# if defined __COUNTER__ && __COUNTER__ != __COUNTER__
# define _GL_COUNTER __COUNTER__
# else
# define _GL_COUNTER __LINE__
# endif
#if defined __COUNTER__ && __COUNTER__ != __COUNTER__
# define _GL_COUNTER __COUNTER__
#else
# define _GL_COUNTER __LINE__
#endif
/* Generate a symbol with the given prefix, making it unique if
possible. */
# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
/* Verify requirement R at compile-time, as an integer constant expression
that returns 1. If R is false, fail at compile-time, preferably
with a diagnostic that includes the string-literal DIAGNOSTIC. */
# define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
(!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
(!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
# ifdef __cplusplus
# if !GNULIB_defined_struct__gl_verify_type
#ifdef __cplusplus
# if !GNULIB_defined_struct__gl_verify_type
template <int w>
struct _gl_verify_type {
unsigned int _gl_verify_error_if_negative: w;
};
# define GNULIB_defined_struct__gl_verify_type 1
# endif
# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
_gl_verify_type<(R) ? 1 : -1>
# elif defined _GL_HAVE__STATIC_ASSERT
# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
struct { \
_Static_assert (R, DIAGNOSTIC); \
int _gl_dummy; \
}
# else
# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
# define GNULIB_defined_struct__gl_verify_type 1
# endif
# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
_gl_verify_type<(R) ? 1 : -1>
#elif defined _GL_HAVE__STATIC_ASSERT
# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
struct { \
_Static_assert (R, DIAGNOSTIC); \
int _gl_dummy; \
}
#else
# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
#endif
/* Verify requirement R at compile-time, as a declaration without a
trailing ';'. If R is false, fail at compile-time, preferably
@ -195,23 +203,23 @@ template <int w>
Unfortunately, unlike C11, this implementation must appear as an
ordinary declaration, and cannot appear inside struct { ... }. */
# ifdef _GL_HAVE__STATIC_ASSERT
# define _GL_VERIFY _Static_assert
# else
# define _GL_VERIFY(R, DIAGNOSTIC) \
extern int (*_GL_GENSYM (_gl_verify_function) (void)) \
[_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
# endif
#ifdef _GL_HAVE__STATIC_ASSERT
# define _GL_VERIFY _Static_assert
#else
# define _GL_VERIFY(R, DIAGNOSTIC) \
extern int (*_GL_GENSYM (_gl_verify_function) (void)) \
[_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
#endif
/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */
# ifdef _GL_STATIC_ASSERT_H
# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
# endif
# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
# define static_assert _Static_assert /* C11 requires this #define. */
# endif
#ifdef _GL_STATIC_ASSERT_H
# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
# endif
# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
# define static_assert _Static_assert /* C11 requires this #define. */
# endif
#endif
/* @assert.h omit start@ */
@ -229,18 +237,18 @@ template <int w>
verify_true is obsolescent; please use verify_expr instead. */
# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
#define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
/* Verify requirement R at compile-time. Return the value of the
expression E. */
# define verify_expr(R, E) \
(_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
#define verify_expr(R, E) \
(_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
/* Verify requirement R at compile-time, as a declaration without a
trailing ';'. */
# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
#define verify(R) _GL_VERIFY (R, "verify (" #R ")")
/* @assert.h omit end@ */

View File

@ -1,3 +1,441 @@
2013-07-13 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight
conversion methods on Kernel.
2013-07-13 Alan Mackenzie <acm@muc.de>
* progmodes/cc-engine.el (c-forward-decl-or-cast-1): Label CASE 13
and comment it out. This out-commenting enables certain C++
declarations to be parsed correctly.
2013-07-13 Eli Zaretskii <eliz@gnu.org>
* international/mule.el (define-coding-system): Doc fix.
* simple.el (default-font-height): Don't call font-info if the
frame's default font didn't change since the frame was created.
(Bug#14838)
2013-07-13 Leo Liu <sdl.web@gmail.com>
* ido.el (ido-read-file-name): Guard against non-symbol value.
2013-07-13 Fabián Ezequiel Gallina <fgallina@gnu.org>
* progmodes/python.el (python-imenu--build-tree): Fix corner case
in nested defuns.
2013-07-13 Leo Liu <sdl.web@gmail.com>
* ido.el (ido-exhibit): Handle ido-enter-matching-directory before
ido-set-matches call. (Bug#6852)
2013-07-12 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-percent-literals-beg-re):
(ruby-syntax-expansion-allowed-p): Support array of symbols, for
Ruby 2.0.
(ruby-font-lock-keywords): Distinguish calls to functions with
module-like names from module references. Highlight character
literals.
2013-07-12 Sergio Durigan Junior <sergiodj@riseup.net> (tiny change)
* progmodes/gdb-mi.el (gdb-strip-string-backslash): New function.
(gdb-send): Handle continued commands. (Bug#14847)
2013-07-12 Juanma Barranquero <lekktu@gmail.com>
* desktop.el (desktop--v2s): Remove unused local variable.
(desktop-save-buffer): Make defvar-local; adjust docstring.
(desktop-auto-save-timeout, desktop-owner): Use ignore-errors.
(desktop-clear, desktop-save-buffer-p): Use string-match-p.
2013-07-12 Andreas Schwab <schwab@linux-m68k.org>
* emacs-lisp/map-ynp.el (map-y-or-n-p): Fix last change.
2013-07-12 Eli Zaretskii <eliz@gnu.org>
* simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG.
(Bug#14842)
2013-07-12 Glenn Morris <rgm@gnu.org>
* doc-view.el: Require cl-lib at runtime too.
(doc-view-remove-if): Remove.
(doc-view-search-next-match, doc-view-search-previous-match):
Use cl-remove-if.
* edmacro.el: Require cl-lib at runtime too.
(edmacro-format-keys, edmacro-parse-keys): Use cl-mismatch, cl-subseq.
(edmacro-mismatch, edmacro-subseq): Remove.
* shadowfile.el: Require cl-lib.
(shadow-remove-if): Remove.
(shadow-set-cluster, shadow-shadows-of-1, shadow-remove-from-todo):
Use cl-remove-if.
* wid-edit.el: Require cl-lib.
(widget-choose): Use cl-remove-if.
(widget-remove-if): Remove.
* progmodes/ebrowse.el: Require cl-lib at runtime too.
(ebrowse-delete-if-not): Remove.
(ebrowse-browser-buffer-list, ebrowse-member-buffer-list)
(ebrowse-tree-buffer-list, ebrowse-same-tree-member-buffer-list):
Use cl-delete-if-not.
2013-07-12 Juanma Barranquero <lekktu@gmail.com>
* emacs-lisp/cl-macs.el (cl-multiple-value-bind, cl-multiple-value-setq)
(cl-the, cl-declare, cl-defstruct): Fix typos in docstrings.
2013-07-12 Leo Liu <sdl.web@gmail.com>
* ido.el (dired-do-copy, dired): Set 'ido property. (Bug#11954)
2013-07-11 Glenn Morris <rgm@gnu.org>
* emacs-lisp/edebug.el: Require cl-lib at run-time too.
(edebug-gensym-index, edebug-gensym):
Remove reimplementation of cl-gensym.
(edebug-make-enter-wrapper, edebug-make-form-wrapper): Use cl-gensym.
* thumbs.el: Require cl-lib at run-time too.
(thumbs-gensym-counter, thumbs-gensym):
Remove reimplementation of cl-gensym.
(thumbs-temp-file): Use cl-gensym.
* emacs-lisp/ert.el: Require cl-lib at runtime too.
(ert--cl-do-remf, ert--remprop, ert--remove-if-not)
(ert--intersection, ert--set-difference, ert--set-difference-eq)
(ert--union, ert--gensym-counter, ert--gensym-counter)
(ert--coerce-to-vector, ert--remove*, ert--string-position)
(ert--mismatch, ert--subseq): Remove reimplementations of cl funcs.
(ert-make-test-unbound, ert--expand-should-1)
(ert--expand-should, ert--should-error-handle-error)
(should-error, ert--explain-equal-rec)
(ert--plist-difference-explanation, ert-select-tests)
(ert--make-stats, ert--remove-from-list, ert--string-first-line):
Use cl-lib functions rather than reimplementations.
2013-07-11 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-methods): Extend docstring.
(tramp-connection-timeout): New defcustom.
(tramp-error-with-buffer): Reset timestamp only when appropriate.
(with-tramp-progress-reporter): Simplify.
(tramp-process-actions): Improve messages.
* net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* net/tramp-sh.el (tramp-maybe-open-connection):
Use `tramp-connection-timeout'.
(tramp-methods) [su, sudo, ksu]: Add method specific timeouts.
(Bug#14808)
2013-07-11 Leo Liu <sdl.web@gmail.com>
* ido.el (ido-read-file-name): Conform to the requirements of
read-file-name. (Bug#11861)
(ido-read-directory-name): Conform to the requirements of
read-directory-name.
2013-07-11 Juanma Barranquero <lekktu@gmail.com>
* subr.el (delay-warning): New function.
2013-07-10 Eli Zaretskii <eliz@gnu.org>
* simple.el (default-line-height): New function.
(line-move-partial, line-move): Use it instead of computing the
line height inline.
(line-move-partial): Always compute ROWH. If the last line is
partially-visible, but its text is completely visible, allow
cursor to enter such a partially-visible line.
2013-07-10 Michael Albinus <michael.albinus@gmx.de>
Improve error messages. (Bug#14808)
* net/tramp.el (tramp-current-connection): New defvar, moved from
tramp-sh.el.
(tramp-message-show-progress-reporter-message): Removed, not
needed anymore.
(tramp-error-with-buffer): Show message in minibuffer. Discard
input before waiting. Reset connection timestamp.
(with-tramp-progress-reporter): Improve messages.
(tramp-process-actions): Use progress reporter. Delete process in
case of error. Improve messages.
* net/tramp-sh.el (tramp-barf-if-no-shell-prompt): Use
condition-case. Call `tramp-error-with-buffer' with vector and buffer.
(tramp-current-connection): Removed.
(tramp-maybe-open-connection): The car of
`tramp-current-connection' are the first 3 slots of the vector.
2013-07-10 Teodor Zlatanov <tzz@lifelogs.com>
* progmodes/cfengine.el (cfengine3-indent-line): Do not indent
inside continued strings.
2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
Timestamp fixes for undo (Bug#14824).
* files.el (clear-visited-file-modtime): Move here from fileio.c.
2013-07-10 Leo Liu <sdl.web@gmail.com>
* files.el (require-final-newline): Allow safe local value.
(Bug#14834)
2013-07-09 Leo Liu <sdl.web@gmail.com>
* ido.el (ido-read-directory-name): Handle fallback.
(ido-read-file-name): Update DIR to ido-current-directory.
(Bug#1516)
(ido-add-virtual-buffers-to-list): Robustify. (Bug#14552)
2013-07-09 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove extra
"autoload". Remove "warn lower camel case" section, previously
commented out. Highlight negation char. Do not highlight the
target in singleton method definitions.
2013-07-08 Stefan Monnier <monnier@iro.umontreal.ca>
* faces.el (tty-setup-hook): Declare the hook.
* emacs-lisp/pcase.el (pcase--split-pred): Add `vars' argument to try
and detect when a guard/pred depends on local vars (bug#14773).
(pcase--u1): Adjust caller.
2013-07-08 Eli Zaretskii <eliz@gnu.org>
* simple.el (line-move-partial, line-move): Account for
line-spacing.
(line-move-partial): Avoid setting vscroll when the last
partially-visible line in window is of default height.
2013-07-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/shr.el (shr-map): Reinstate the `u' key binding, since it's
been used a while.
2013-07-07 Juanma Barranquero <lekktu@gmail.com>
* subr.el (read-quoted-char): Remove unused local variable `char'.
2013-07-07 Michael Kifer <kifer@cs.stonybrook.edu>
* ediff.el (ediff-version): Version update.
(ediff-files-command, ediff3-files-command, ediff-merge-command)
(ediff-merge-with-ancestor-command, ediff-directories-command)
(ediff-directories3-command, ediff-merge-directories-command)
(ediff-merge-directories-with-ancestor-command): New functions.
All are command-line interfaces to ediff: to facilitate calling
Emacs with the appropriate ediff functions invoked.
* viper-cmd.el (viper-del-forward-char-in-insert): New function.
(viper-save-kill-buffer): Check if buffer is modified.
* viper.el (viper-version): Version update.
(viper-emacs-state-mode-list): Add egg-status-buffer-mode.
2013-07-07 Stefan Monnier <monnier@iro.umontreal.ca>
* faces.el (tty-run-terminal-initialization): Run new tty-setup-hook.
* viper-cmd.el (viper-envelop-ESC-key): Remove function.
(viper-intercept-ESC-key): Simplify.
* viper-keym.el (viper-ESC-key): Make it a constant, don't use kbd.
* viper.el (viper--tty-ESC-filter, viper--lookup-key)
(viper-catch-tty-ESC, viper-uncatch-tty-ESC)
(viper-setup-ESC-to-escape): New functions.
(viper-go-away, viper-set-hooks): Call viper-setup-ESC-to-escape.
(viper-set-hooks): Do not modify flyspell-mode-hook. (Bug#13793)
2013-07-07 Eli Zaretskii <eliz@gnu.org>
* simple.el (default-font-height, window-screen-lines):
New functions.
(line-move, line-move-partial): Use them instead of
frame-char-height and window-text-height. This makes scrolling
text smoother when the buffer's default face uses a font that is
different from the frame's default font.
2013-07-06 Jan Djärv <jan.h.d@swipnet.se>
* files.el (write-file): Do not display confirm dialog for NS,
it does its own dialog, which can't be cancelled (Bug#14578).
2013-07-06 Eli Zaretskii <eliz@gnu.org>
* simple.el (line-move-partial): Adjust the row returned by
posn-at-point for the current window-vscroll. (Bug#14567)
2013-07-06 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-sh-file-gvfs-monitor-dir-process-filter):
(tramp-sh-file-inotifywait-process-filter): Handle file names with
spaces.
2013-07-06 Martin Rudalics <rudalics@gmx.at>
* window.el (window-state-put-stale-windows): New variable.
(window--state-put-2): Save list of windows without matching buffer.
(window-state-put): Remove "bufferless" windows if possible.
2013-07-06 Juanma Barranquero <lekktu@gmail.com>
* simple.el (alternatives-define): Remove leftover :group keyword.
Tweak docstring.
2013-07-06 Leo Liu <sdl.web@gmail.com>
* ido.el (ido-use-virtual-buffers): Allow new value 'auto.
(ido-enable-virtual-buffers): New variable.
(ido-buffer-internal, ido-toggle-virtual-buffers)
(ido-make-buffer-list): Use it.
(ido-exhibit): Support turning on and off virtual buffers
automatically.
2013-07-06 Juanma Barranquero <lekktu@gmail.com>
* simple.el (alternatives-define): New macro.
2013-07-06 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (read-quoted-char): Use read-key.
(sit-for): Let read-event decode tty input (bug#14782).
2013-07-05 Stephen Berman <stephen.berman@gmx.net>
* calendar/todo-mode.el: Add handling of file deletion, both by
mode command and externally. Fix various related bugs.
Clarify Commentary and improve some documentation strings and code.
(todo-delete-file): New command.
(todo-check-file): New function.
(todo-show): Handle external deletion of the file we're trying to
show (bug#14688). Replace called-interactively-p by an optional
prefix argument to avoid problematic interaction with catch form
when byte compiled (bug#14702).
(todo-quit): Handle external deletion of the archive's todo file.
Make sure the buffer that was visiting the archive file is still
live before trying to bury it.
(todo-category-completions): Handle external deletion of any
category completion files.
(todo-jump-to-category, todo-basic-insert-item): Recalculate list
of todo files, in case of external deletion.
(todo-add-file): Replace unnecessary setq by let-binding.
(todo-find-archive): Check whether there are any archives.
Replace unnecessary setq by let-binding.
(todo-archive-done-item): Use find-file-noselect to get the
archive buffer whether or not the archive already exists.
Remove superfluous code. Use file size instead of buffer-file-name to
check if the archive is new; if it is, update list of archives.
(todo-default-todo-file): Allow nil to be a valid value for when
there are no todo files.
(todo-reevaluate-default-file-defcustom): Use corrected definition
of todo-default-todo-file.
(todo-key-bindings-t+a+f): Add key binding for todo-delete-file.
(todo-delete-category, todo-show-categories-table)
(todo-category-number): Clarify comment.
(todo-filter-items): Clarify documentation string.
(todo-show-current-file, todo-display-as-todo-file)
(todo-reset-and-enable-done-separator): Tweak documentation string.
(todo-done-separator): Make separator length window-width, since
bug#2749 is now fixed.
2013-07-05 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Support both "gvfs-monitor-dir" and "inotifywait".
(tramp-sh-file-inotifywait-process-filter): Rename from
`tramp-sh-file-notify-process-filter'.
(tramp-sh-file-gvfs-monitor-dir-process-filter)
(tramp-get-remote-gvfs-monitor-dir): New defuns.
2013-07-05 Leo Liu <sdl.web@gmail.com>
* autoinsert.el (auto-insert-alist): Default to lexical-binding.
2013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* frame.el (display-pixel-height, display-pixel-width)
(display-mm-height, display-mm-width): Mention behavior on
multi-monitor setups in docstrings.
(w32-display-monitor-attributes-list): Declare function.
(display-monitor-attributes-list): Use it.
2013-07-04 Michael Albinus <michael.albinus@gmx.de>
* filenotify.el: New package.
* autorevert.el (top): Require filenotify.el.
(auto-revert-notify-enabled): Remove. Use `file-notify-support'
instead.
(auto-revert-notify-rm-watch, auto-revert-notify-add-watch)
(auto-revert-notify-handler): Use `file-notify-*' functions.
* subr.el (file-notify-handle-event): Move function to filenotify.el.
* net/tramp.el (tramp-file-name-for-operation):
Handle `file-notify-add-watch' and `file-notify-rm-watch'.
* net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add handler
for `file-notify-add-watch' and `file-notify-rm-watch'.
(tramp-process-sentinel): Improve trace.
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-file-notify-process-filter)
(tramp-sh-handle-file-notify-rm-watch)
(tramp-get-remote-inotifywait): New defuns.
2013-07-03 Juri Linkov <juri@jurta.org>
* buff-menu.el (Buffer-menu-multi-occur): Add args and move the
call of `occur-read-primary-args' to interactive spec.
* ibuffer.el (ibuffer-mode-map): Bind "M-s a C-o" to
`ibuffer-do-occur' like in buff-menu.el. (Bug#14673)
2013-07-03 Matthias Meulien <orontee@gmail.com>
* buff-menu.el (Buffer-menu-mode-map): Bind "M-s a C-o" to
`Buffer-menu-multi-occur'. Add it to the menu.
(Buffer-menu-mode): Document it in docstring.
(Buffer-menu-multi-occur): New command. (Bug#14673)
2013-07-03 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight more
keywords and built-ins.
2013-07-03 Glenn Morris <rgm@gnu.org>
* subr.el (y-or-n-p): Handle empty prompts. (Bug#14770)
Make info-xref checks case-sensitive by default
* info.el (Info-find-node, Info-find-in-tag-table)
(Info-find-node-in-buffer, Info-find-node-2, Info-goto-node):
Add option for exact case matching of nodes.
* info-xref.el (info-xref): New custom group.
(info-xref-case-fold): New option.
(info-xref-goto-node-p): Pass info-xref-case-fold to Info-goto-node.
2013-07-03 Leo Liu <sdl.web@gmail.com>
* ido.el (ido-delete-file-at-head): Respect delete-by-moving-to-trash.
2013-07-03 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-move-to-block): When we're at a
middle of block statement initially, lower the depth. Remove
FIXME comment, not longer valid. Remove middle of block statement
detection, no need to do that anymore since we've been using
`ruby-parse-region' here.
2013-07-02 Jan Djärv <jan.h.d@swipnet.se>
* term/ns-win.el (display-format-alist): Use .* (Bug#14765).
@ -255,12 +693,12 @@
2013-06-25 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
* lisp/textmodes/bibtex.el (bibtex-generate-url-list): Add support
* textmodes/bibtex.el (bibtex-generate-url-list): Add support
for DOI URLs.
2013-06-25 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
* lisp/textmodes/bibtex.el (bibtex-mode, bibtex-set-dialect):
* textmodes/bibtex.el (bibtex-mode, bibtex-set-dialect):
Update imenu-support when dialect changes.
2013-06-25 Leo Liu <sdl.web@gmail.com>
@ -361,7 +799,7 @@
* emacs-lock.el (emacs-lock-mode, emacs-lock--old-mode)
(emacs-lock--try-unlocking): Make defvar-local.
2013-06-22 Glenn Morris <rgm@fencepost.gnu.org>
2013-06-22 Glenn Morris <rgm@gnu.org>
* play/cookie1.el (cookie-apropos): Minor simplification.
@ -827,7 +1265,7 @@
* net/shr.el (shr-map): Bind [down-mouse-1] to browse URLs.
2013-06-19 Glenn Morris <rgm@fencepost.gnu.org>
2013-06-19 Glenn Morris <rgm@gnu.org>
* emacs-lisp/eieio.el (defclass): Make it eval-and-compile once more.
@ -970,6 +1408,7 @@
2013-06-18 Matthias Meulien <orontee@gmail.com>
* tabify.el (untabify, tabify): With prefix, apply to entire buffer.
<http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00545.html>
2013-06-18 Glenn Morris <rgm@gnu.org>

View File

@ -164,7 +164,10 @@ If this contains a %s, that will be replaced by the matching rule."
(("\\.el\\'" . "Emacs Lisp header")
"Short description: "
";;; " (file-name-nondirectory (buffer-file-name)) " --- " str "
";;; " (file-name-nondirectory (buffer-file-name)) " --- " str
(make-string (max 2 (- 80 (current-column) 27)) ?\s)
"-*- lexical-binding: t; -*-"
"
;; Copyright (C) " (format-time-string "%Y") " "
(getenv "ORGANIZATION") | (progn user-full-name) "

View File

@ -103,6 +103,7 @@
(eval-when-compile (require 'cl-lib))
(require 'timer)
(require 'filenotify)
;; Custom Group:
;;
@ -270,21 +271,17 @@ This variable becomes buffer local when set in any fashion.")
:type 'boolean
:version "24.4")
(defconst auto-revert-notify-enabled
(or (featurep 'gfilenotify) (featurep 'inotify) (featurep 'w32notify))
"Non-nil when Emacs has been compiled with file notification support.")
(defcustom auto-revert-use-notify auto-revert-notify-enabled
(defcustom auto-revert-use-notify (and file-notify-support t)
"If non-nil Auto Revert Mode uses file notification functions.
This requires Emacs being compiled with file notification
support (see `auto-revert-notify-enabled'). You should set this
variable through Custom."
support (see `file-notify-support'). You should set this variable
through Custom."
:group 'auto-revert
:type 'boolean
:set (lambda (variable value)
(set-default variable (and auto-revert-notify-enabled value))
(set-default variable (and file-notify-support value))
(unless (symbol-value variable)
(when auto-revert-notify-enabled
(when file-notify-support
(dolist (buf (buffer-list))
(with-current-buffer buf
(when (symbol-value 'auto-revert-notify-watch-descriptor)
@ -502,12 +499,7 @@ will use an up-to-date value of `auto-revert-interval'"
(puthash key value auto-revert-notify-watch-descriptor-hash-list)
(remhash key auto-revert-notify-watch-descriptor-hash-list)
(ignore-errors
(funcall
(cond
((fboundp 'gfile-rm-watch) 'gfile-rm-watch)
((fboundp 'inotify-rm-watch) 'inotify-rm-watch)
((fboundp 'w32notify-rm-watch) 'w32notify-rm-watch))
auto-revert-notify-watch-descriptor)))))
(file-notify-rm-watch auto-revert-notify-watch-descriptor)))))
auto-revert-notify-watch-descriptor-hash-list)
(remove-hook 'kill-buffer-hook 'auto-revert-notify-rm-watch))
(setq auto-revert-notify-watch-descriptor nil
@ -522,100 +514,58 @@ will use an up-to-date value of `auto-revert-interval'"
(when (and buffer-file-name auto-revert-use-notify
(not auto-revert-notify-watch-descriptor))
(let ((func
(cond
((fboundp 'gfile-add-watch) 'gfile-add-watch)
((fboundp 'inotify-add-watch) 'inotify-add-watch)
((fboundp 'w32notify-add-watch) 'w32notify-add-watch)))
(aspect
(cond
((fboundp 'gfile-add-watch) '(watch-mounts))
;; `attrib' is needed for file modification time.
((fboundp 'inotify-add-watch) '(attrib create modify moved-to))
((fboundp 'w32notify-add-watch) '(size last-write-time))))
(file (if (or (fboundp 'gfile-add-watch) (fboundp 'inotify-add-watch))
(directory-file-name (expand-file-name default-directory))
(buffer-file-name))))
(setq auto-revert-notify-watch-descriptor
(ignore-errors
(funcall func file aspect 'auto-revert-notify-handler)))
(if auto-revert-notify-watch-descriptor
(progn
(puthash
auto-revert-notify-watch-descriptor
(cons (current-buffer)
(gethash auto-revert-notify-watch-descriptor
auto-revert-notify-watch-descriptor-hash-list))
auto-revert-notify-watch-descriptor-hash-list)
(add-hook (make-local-variable 'kill-buffer-hook)
'auto-revert-notify-rm-watch))
;; Fallback to file checks.
(set (make-local-variable 'auto-revert-use-notify) nil)))))
(defun auto-revert-notify-event-p (event)
"Check that event is a file notification event."
(and (listp event)
(cond ((featurep 'gfilenotify)
(and (>= (length event) 3) (stringp (nth 2 event))))
((featurep 'inotify)
(= (length event) 4))
((featurep 'w32notify)
(and (= (length event) 3) (stringp (nth 2 event)))))))
(defun auto-revert-notify-event-descriptor (event)
"Return watch descriptor of file notification event, or nil."
(and (auto-revert-notify-event-p event) (car event)))
(defun auto-revert-notify-event-action (event)
"Return action of file notification event, or nil."
(and (auto-revert-notify-event-p event) (nth 1 event)))
(defun auto-revert-notify-event-file-name (event)
"Return file name of file notification event, or nil."
(and (auto-revert-notify-event-p event)
(cond ((featurep 'gfilenotify) (nth 2 event))
((featurep 'inotify) (nth 3 event))
((featurep 'w32notify) (nth 2 event)))))
(setq auto-revert-notify-watch-descriptor
(ignore-errors
(file-notify-add-watch
(expand-file-name buffer-file-name default-directory)
'(change attribute-change) 'auto-revert-notify-handler)))
(if auto-revert-notify-watch-descriptor
(progn
(puthash
auto-revert-notify-watch-descriptor
(cons (current-buffer)
(gethash auto-revert-notify-watch-descriptor
auto-revert-notify-watch-descriptor-hash-list))
auto-revert-notify-watch-descriptor-hash-list)
(add-hook (make-local-variable 'kill-buffer-hook)
'auto-revert-notify-rm-watch))
;; Fallback to file checks.
(set (make-local-variable 'auto-revert-use-notify) nil))))
(defun auto-revert-notify-handler (event)
"Handle an EVENT returned from file notification."
(when (auto-revert-notify-event-p event)
(let* ((descriptor (auto-revert-notify-event-descriptor event))
(action (auto-revert-notify-event-action event))
(file (auto-revert-notify-event-file-name event))
(ignore-errors
(let* ((descriptor (car event))
(action (nth 1 event))
(file (nth 2 event))
(file1 (nth 3 event)) ;; Target of `renamed'.
(buffers (gethash descriptor
auto-revert-notify-watch-descriptor-hash-list)))
(ignore-errors
;; Check, that event is meant for us.
;; TODO: Filter events which stop watching, like `move' or `removed'.
(cl-assert descriptor)
(cond
((featurep 'gfilenotify)
(cl-assert (memq action '(attribute-changed changed created deleted
;; FIXME: I keep getting this action, so I
;; added it here, but I have no idea what
;; I'm doing. --Stef
changes-done-hint))
t))
((featurep 'inotify)
(cl-assert (or (memq 'attrib action)
(memq 'create action)
(memq 'modify action)
(memq 'moved-to action))))
((featurep 'w32notify) (cl-assert (eq 'modified action))))
;; Since we watch a directory, a file name must be returned.
(cl-assert (stringp file))
(dolist (buffer buffers)
(when (buffer-live-p buffer)
(with-current-buffer buffer
(when (and (stringp buffer-file-name)
(string-equal
(file-name-nondirectory file)
(file-name-nondirectory buffer-file-name)))
;; Mark buffer modified.
(setq auto-revert-notify-modified-p t)
;; No need to check other buffers.
(cl-return)))))))))
;; Check, that event is meant for us.
(cl-assert descriptor)
;; We do not handle `deleted', because nothing has to be refreshed.
(cl-assert (memq action '(attribute-changed changed created renamed)) t)
;; Since we watch a directory, a file name must be returned.
(cl-assert (stringp file))
(when (eq action 'renamed) (cl-assert (stringp file1)))
;; Loop over all buffers, in order to find the intended one.
(dolist (buffer buffers)
(when (buffer-live-p buffer)
(with-current-buffer buffer
(when (and (stringp buffer-file-name)
(or
(and (memq action '(attribute-changed changed created))
(string-equal
(file-name-nondirectory file)
(file-name-nondirectory buffer-file-name)))
(and (eq action 'renamed)
(string-equal
(file-name-nondirectory file1)
(file-name-nondirectory buffer-file-name)))))
;; Mark buffer modified.
(setq auto-revert-notify-modified-p t)
;; No need to check other buffers.
(cl-return))))))))
(defun auto-revert-active-p ()
"Check if auto-revert is active (in current buffer or globally)."

View File

@ -129,6 +129,7 @@ commands.")
(define-key map "T" 'Buffer-menu-toggle-files-only)
(define-key map (kbd "M-s a C-s") 'Buffer-menu-isearch-buffers)
(define-key map (kbd "M-s a M-C-s") 'Buffer-menu-isearch-buffers-regexp)
(define-key map (kbd "M-s a C-o") 'Buffer-menu-multi-occur)
(define-key map [mouse-2] 'Buffer-menu-mouse-select)
(define-key map [follow-link] 'mouse-face)
@ -169,6 +170,9 @@ commands.")
(bindings--define-key menu-map [ir]
'(menu-item "Isearch Marked Buffers..." Buffer-menu-isearch-buffers
:help "Search for a string through all marked buffers using Isearch"))
(bindings--define-key menu-map [mo]
'(menu-item "Multi Occur Marked Buffers..." Buffer-menu-multi-occur
:help "Show lines matching a regexp in marked buffers using Occur"))
(bindings--define-key menu-map [s3] menu-bar-separator)
(bindings--define-key menu-map [by]
'(menu-item "Bury" Buffer-menu-bury
@ -226,6 +230,7 @@ In Buffer Menu mode, the following commands are defined:
buffer selected before this one in another window.
\\[Buffer-menu-isearch-buffers] Incremental search in the marked buffers.
\\[Buffer-menu-isearch-buffers-regexp] Isearch for regexp in the marked buffers.
\\[Buffer-menu-multi-occur] Show lines matching regexp in the marked buffers.
\\[Buffer-menu-visit-tags-table] visit-tags-table this buffer.
\\[Buffer-menu-not-modified] Clear modified-flag on that buffer.
\\[Buffer-menu-save] Mark that buffer to be saved, and move down.
@ -477,6 +482,11 @@ If UNMARK is non-nil, unmark them."
(interactive)
(multi-isearch-buffers-regexp (Buffer-menu-marked-buffers)))
(defun Buffer-menu-multi-occur (regexp &optional nlines)
"Show all lines in marked buffers containing a match for a regexp."
(interactive (occur-read-primary-args))
(multi-occur (Buffer-menu-marked-buffers) regexp nlines))
(defun Buffer-menu-visit-tags-table ()
"Visit the tags table in the buffer on this line. See `visit-tags-table'."

View File

@ -37,11 +37,14 @@
;; can edit todo items, reprioritize them within their category, move
;; them to another category, delete them, or mark items as done and
;; store them separately from the not yet done items in a category.
;; You can add new todo files and categories, rename categories, move
;; them to another file or delete them. You can also display summary
;; tables of the categories in a file and the types of items they
;; contain. And you can build cross-category lists of items that
;; satisfy various criteria.
;; You can add new todo files, edit and delete them. You can add new
;; categories, rename and delete them, move categories to another file
;; and merge the items of two categories. You can also reorder the
;; sequence of categories in a todo file for the purpose of
;; navigation. You can display summary tables of the categories in a
;; file and the types of items they contain. And you can compile
;; lists of existing items from multiple categories in one or more
;; todo files, which are filtered by various criteria.
;; To get started, load this package and type `M-x todo-show'. This
;; will prompt you for the name of the first todo file, its first
@ -169,12 +172,7 @@ the value of `todo-done-separator'."
"Return string used as value of variable `todo-done-separator'."
(let ((sep todo-done-separator-string))
(propertize (if (= 1 (length sep))
;; Until bug#2749 is fixed, if separator's length
;; is window-width and todo-wrap-lines is
;; non-nil, an indented empty line appears between
;; the separator and the first done item.
;; (make-string (window-width) (string-to-char sep))
(make-string (1- (window-width)) (string-to-char sep))
(make-string (window-width) (string-to-char sep))
todo-done-separator-string)
'face 'todo-done-sep)))
@ -578,11 +576,12 @@ This lacks the extension and directory components."
(file-name-sans-extension (file-name-nondirectory file))))
(defcustom todo-default-todo-file (todo-short-file-name
(car (funcall todo-files-function)))
(car (funcall todo-files-function)))
"Todo file visited by first session invocation of `todo-show'."
:type `(radio ,@(mapcar (lambda (f) (list 'const f))
(mapcar 'todo-short-file-name
(funcall todo-files-function))))
:type (when todo-files
`(radio ,@(mapcar (lambda (f) (list 'const f))
(mapcar 'todo-short-file-name
(funcall todo-files-function)))))
:group 'todo)
(defcustom todo-show-current-file t
@ -630,7 +629,7 @@ Otherwise, `todo-show' always visits `todo-default-todo-file'."
:group 'todo)
;;;###autoload
(defun todo-show (&optional solicit-file)
(defun todo-show (&optional solicit-file interactive)
"Visit a todo file and display one of its categories.
When invoked in Todo mode, prompt for which todo file to visit.
@ -668,117 +667,124 @@ and done items are always shown on visiting a category.
Invoking this command in Todo Archive mode visits the
corresponding todo file, displaying the corresponding category."
(interactive "P")
(interactive "P\np")
(when todo-default-todo-file
(todo-check-file (todo-absolute-file-name todo-default-todo-file)))
(catch 'shown
;; If there is a legacy todo file but no todo file in the current
;; format, offer to convert the legacy file and show it.
;; Before initializing the first todo first, check if there is a
;; legacy todo file and if so, offer to convert to the current
;; format and make it the first new todo file.
(unless todo-default-todo-file
(let ((legacy-todo-file (if (boundp 'todo-file-do)
todo-file-do
(locate-user-emacs-file "todo-do" ".todo-do"))))
(when (and (file-exists-p legacy-todo-file)
(y-or-n-p (concat "Do you want to convert a copy of your "
"old todo file to the new format? ")))
(when (todo-convert-legacy-files)
(throw 'shown nil)))))
(let* ((cat)
(show-first todo-show-first)
(file (cond ((or solicit-file
(and (called-interactively-p 'any)
(memq major-mode '(todo-mode
todo-archive-mode
todo-filtered-items-mode))))
(if (funcall todo-files-function)
(todo-read-file-name "Choose a todo file to visit: "
nil t)
(user-error "There are no todo files")))
((and (eq major-mode 'todo-archive-mode)
;; Called noninteractively via todo-quit
;; to jump to corresponding category in
;; todo file.
(not (called-interactively-p 'any)))
(setq cat (todo-current-category))
(concat (file-name-sans-extension
todo-current-todo-file) ".todo"))
(t
(or todo-current-todo-file
(and todo-show-current-file
todo-global-current-todo-file)
(todo-absolute-file-name todo-default-todo-file)
(todo-add-file)))))
add-item first-file)
(unless todo-default-todo-file
;; We just initialized the first todo file, so make it the default.
(setq todo-default-todo-file (todo-short-file-name file)
first-file t)
(todo-reevaluate-default-file-defcustom))
(unless (member file todo-visited)
;; Can't setq t-c-t-f here, otherwise wrong file shown when
;; todo-show is called from todo-show-categories-table.
(let ((todo-current-todo-file file))
(cond ((eq todo-show-first 'table)
(todo-show-categories-table))
((memq todo-show-first '(top diary regexp))
(let* ((shortf (todo-short-file-name file))
(fi-file (todo-absolute-file-name
shortf todo-show-first)))
(when (eq todo-show-first 'regexp)
(let ((rxfiles (directory-files todo-directory t
".*\\.todr$" t)))
(when (and rxfiles (> (length rxfiles) 1))
(let ((rxf (mapcar 'todo-short-file-name rxfiles)))
(setq fi-file (todo-absolute-file-name
(completing-read
"Choose a regexp items file: "
rxf) 'regexp))))))
(if (file-exists-p fi-file)
(set-window-buffer
(selected-window)
(set-buffer (find-file-noselect fi-file 'nowarn)))
(message "There is no %s file for %s"
(cond ((eq todo-show-first 'top)
"top priorities")
((eq todo-show-first 'diary)
"diary items")
((eq todo-show-first 'regexp)
"regexp items"))
shortf)
(setq todo-show-first 'first)))))))
(when (or (member file todo-visited)
(eq todo-show-first 'first))
(set-window-buffer (selected-window)
(set-buffer (find-file-noselect file 'nowarn)))
;; When quitting an archive file, show the corresponding
;; category in the corresponding todo file, if it exists.
(when (assoc cat todo-categories)
(setq todo-category-number (todo-category-number cat)))
;; If this is a new todo file, add its first category.
(when (zerop (buffer-size))
(let (cat-added)
(unwind-protect
(setq todo-category-number
(todo-add-category todo-current-todo-file "")
add-item todo-add-item-if-new-category
cat-added t)
(if cat-added
;; If the category was added, save the file now, so we
;; don't risk having an empty todo file, which would
;; signal an error if we tried to visit it later,
;; since doing that looks for category boundaries.
(save-buffer 0)
;; If user cancels before adding the category, clean up
;; and exit, so we have a fresh slate the next time.
(delete-file file)
(setq todo-files (delete file todo-files))
(when first-file
(setq todo-default-todo-file nil
todo-current-todo-file nil))
(kill-buffer)
(keyboard-quit)))))
(save-excursion (todo-category-select))
(when add-item (todo-basic-insert-item)))
(setq todo-show-first show-first)
(add-to-list 'todo-visited file))))
todo-file-do
(locate-user-emacs-file "todo-do" ".todo-do"))))
(when (and (file-exists-p legacy-todo-file)
(y-or-n-p (concat "Do you want to convert a copy of your "
"old todo file to the new format? ")))
(when (todo-convert-legacy-files)
(throw 'shown nil)))))
(catch 'end
(let* ((cat)
(show-first todo-show-first)
(file (cond ((or solicit-file
(and interactive
(memq major-mode '(todo-mode
todo-archive-mode
todo-filtered-items-mode))))
(if (funcall todo-files-function)
(todo-read-file-name "Choose a todo file to visit: "
nil t)
(user-error "There are no todo files")))
((and (eq major-mode 'todo-archive-mode)
;; Called noninteractively via todo-quit
;; to jump to corresponding category in
;; todo file.
(not interactive))
(setq cat (todo-current-category))
(concat (file-name-sans-extension
todo-current-todo-file) ".todo"))
(t
(or todo-current-todo-file
(and todo-show-current-file
todo-global-current-todo-file)
(todo-absolute-file-name todo-default-todo-file)
(todo-add-file)))))
add-item first-file)
(unless todo-default-todo-file
;; We just initialized the first todo file, so make it the default.
(setq todo-default-todo-file (todo-short-file-name file)
first-file t)
(todo-reevaluate-default-file-defcustom))
(unless (member file todo-visited)
;; Can't setq t-c-t-f here, otherwise wrong file shown when
;; todo-show is called from todo-show-categories-table.
(let ((todo-current-todo-file file))
(cond ((eq todo-show-first 'table)
(todo-show-categories-table))
((memq todo-show-first '(top diary regexp))
(let* ((shortf (todo-short-file-name file))
(fi-file (todo-absolute-file-name
shortf todo-show-first)))
(when (eq todo-show-first 'regexp)
(let ((rxfiles (directory-files todo-directory t
".*\\.todr$" t)))
(when (and rxfiles (> (length rxfiles) 1))
(let ((rxf (mapcar 'todo-short-file-name rxfiles)))
(setq fi-file (todo-absolute-file-name
(completing-read
"Choose a regexp items file: "
rxf) 'regexp))))))
(if (file-exists-p fi-file)
(set-window-buffer
(selected-window)
(set-buffer (find-file-noselect fi-file 'nowarn)))
(message "There is no %s file for %s"
(cond ((eq todo-show-first 'top)
"top priorities")
((eq todo-show-first 'diary)
"diary items")
((eq todo-show-first 'regexp)
"regexp items"))
shortf)
(setq todo-show-first 'first)))))))
(when (or (member file todo-visited)
(eq todo-show-first 'first))
(unless (todo-check-file file) (throw 'end nil))
(set-window-buffer (selected-window)
(set-buffer (find-file-noselect file 'nowarn)))
;; When quitting an archive file, show the corresponding
;; category in the corresponding todo file, if it exists.
(when (assoc cat todo-categories)
(setq todo-category-number (todo-category-number cat)))
;; If this is a new todo file, add its first category.
(when (zerop (buffer-size))
(let (cat-added)
(unwind-protect
(setq todo-category-number
(todo-add-category todo-current-todo-file "")
add-item todo-add-item-if-new-category
cat-added t)
(if cat-added
;; If the category was added, save the file now, so we
;; don't risk having an empty todo file, which would
;; signal an error if we tried to visit it later,
;; since doing that looks for category boundaries.
(save-buffer 0)
;; If user cancels before adding the category, clean up
;; and exit, so we have a fresh slate the next time.
(delete-file file)
;; (setq todo-files (funcall todo-files-function))
(setq todo-files (delete file todo-files))
(when first-file
(setq todo-default-todo-file nil
todo-current-todo-file nil)
(todo-reevaluate-default-file-defcustom))
(kill-buffer)
(keyboard-quit)))))
(save-excursion (todo-category-select))
(when add-item (todo-basic-insert-item)))
(setq todo-show-first show-first)
(add-to-list 'todo-visited file)))))
(defun todo-save ()
"Save the current todo file."
@ -814,8 +820,15 @@ buries it and restores state as needed."
;; Have to write a newly created archive to file to avoid
;; subsequent errors.
(todo-save)
(todo-show)
(bury-buffer buf))
(let ((todo-file (concat todo-directory
(todo-short-file-name todo-current-todo-file)
".todo")))
(if (todo-check-file todo-file)
(todo-show)
(message "There is no todo file for this archive")))
;; When todo-check-file runs in todo-show, it kills the
;; buffer if the archive file was deleted externally.
(when (buffer-live-p buf) (bury-buffer buf)))
((eq major-mode 'todo-mode)
(todo-save)
;; If we just quit archive mode, just burying the buffer
@ -893,7 +906,7 @@ Categories mode."
(interactive "P")
;; If invoked outside of Todo mode and there is not yet any Todo
;; file, initialize one.
(if (null todo-files)
(if (null (funcall todo-files-function))
(todo-show)
(let* ((archive (eq where 'archive))
(cat (unless archive where))
@ -1069,10 +1082,9 @@ option `todo-add-item-if-new-category' is non-nil (the default),
prompt for the first item.
Noninteractively, return the name of the new file."
(interactive)
(let ((prompt (concat "Enter name of new todo file "
"(TAB or SPC to see current names): "))
file)
(setq file (todo-read-file-name prompt))
(let* ((prompt (concat "Enter name of new todo file "
"(TAB or SPC to see current names): "))
(file (todo-read-file-name prompt)))
(with-current-buffer (get-buffer-create file)
(erase-buffer)
(write-region (point-min) (point-max) file nil 'nomessage nil t)
@ -1087,6 +1099,55 @@ Noninteractively, return the name of the new file."
(todo-show))
file)))
(defun todo-delete-file ()
"Delete the current todo, archive or filtered items file.
If the todo file has a corresponding archive file, or vice versa,
prompt whether to delete that as well. Also kill the buffers
visiting the deleted files."
(interactive)
(let* ((file1 (buffer-file-name))
(todo (eq major-mode 'todo-mode))
(archive (eq major-mode 'todo-archive-mode))
(filtered (eq major-mode 'todo-filtered-items-mode))
(file1-sn (todo-short-file-name file1))
(file2 (concat todo-directory file1-sn (cond (todo ".toda")
(archive ".todo"))))
(buf1 (current-buffer))
(buf2 (when file2 (find-buffer-visiting file2)))
(prompt1 (concat "Delete " (cond (todo "todo")
(archive "archive")
(filtered "filtered items"))
" file \"%s\"? "))
(prompt2 (concat "Also delete the corresponding "
(cond (todo "archive") (archive "todo")) " file "
(when buf2 "and kill the buffer visiting it? ")))
(delete1 (yes-or-no-p (format prompt1 file1-sn)))
(delete2 (when (and delete1 (or (file-exists-p file2) buf2))
(yes-or-no-p prompt2))))
(when delete1
(when (file-exists-p file1) (delete-file file1))
(setq todo-visited (delete file1 todo-visited))
(kill-buffer buf1)
(when delete2
(when (file-exists-p file2) (delete-file file2))
(setq todo-visited (delete file2 todo-visited))
(and buf2 (kill-buffer buf2)))
(setq todo-files (funcall todo-files-function)
todo-archives (funcall todo-files-function t))
(when (or (string= file1-sn todo-default-todo-file)
(and delete2 (string= file1-sn todo-default-todo-file)))
(setq todo-default-todo-file (todo-short-file-name (car todo-files))))
(when (or (string= file1 todo-global-current-todo-file)
(and delete2 (string= file2 todo-global-current-todo-file)))
(setq todo-global-current-todo-file nil))
(todo-reevaluate-filelist-defcustoms)
(message (concat (cond (todo "Todo") (archive "Archive")) " file \"%s\" "
(when delete2
(concat "and its "
(cond (todo "archive") (archive "todo"))
" file "))
"deleted") file1-sn))))
(defvar todo-edit-buffer "*Todo Edit*"
"Name of current buffer in Todo Edit mode.")
@ -1190,9 +1251,9 @@ category there as well."
(save-excursion (todo-category-select)))
(defun todo-delete-category (&optional arg)
"Delete current todo category provided it is empty.
With ARG non-nil delete the category unconditionally,
i.e. including all existing todo and done items."
"Delete current todo category provided it contains no items.
With prefix ARG delete the category even if it does contain
todo or done items."
(interactive "P")
(let* ((file todo-current-todo-file)
(cat (todo-current-category))
@ -1723,7 +1784,7 @@ the new item:
the item accordingly."
;; If invoked outside of Todo mode and there is not yet any Todo
;; file, initialize one.
(if (null todo-files)
(if (null (funcall todo-files-function))
(todo-show)
(let ((region (eq region-or-here 'region))
(here (eq region-or-here 'here)))
@ -2958,31 +3019,32 @@ first visit in a session displays the first category in the
archive, subsequent visits return to the last category
displayed."
(interactive)
(let* ((cat (todo-current-category))
(count (todo-get-count 'archived cat))
(archive (concat (file-name-sans-extension todo-current-todo-file)
".toda"))
place)
(setq place (cond (ask 'other-archive)
((file-exists-p archive) 'this-archive)
(t (when (todo-y-or-n-p
(concat "This file has no archive; "
"visit another archive? "))
'other-archive))))
(when (eq place 'other-archive)
(setq archive (todo-read-file-name "Choose a todo archive: " t t)))
(when (and (eq place 'this-archive) (zerop count))
(setq place (when (todo-y-or-n-p
(concat "This category has no archived items;"
" visit archive anyway? "))
'other-cat)))
(when place
(set-window-buffer (selected-window)
(set-buffer (find-file-noselect archive)))
(if (member place '(other-archive other-cat))
(setq todo-category-number 1)
(todo-category-number cat))
(todo-category-select))))
(if (null (funcall todo-files-function t))
(message "There are no archive files")
(let* ((cat (todo-current-category))
(count (todo-get-count 'archived cat))
(archive (concat (file-name-sans-extension todo-current-todo-file)
".toda"))
(place (cond (ask 'other-archive)
((file-exists-p archive) 'this-archive)
(t (when (todo-y-or-n-p
(concat "This file has no archive; "
"visit another archive? "))
'other-archive)))))
(when (eq place 'other-archive)
(setq archive (todo-read-file-name "Choose a todo archive: " t t)))
(when (and (eq place 'this-archive) (zerop count))
(setq place (when (todo-y-or-n-p
(concat "This category has no archived items;"
" visit archive anyway? "))
'other-cat)))
(when place
(set-window-buffer (selected-window)
(set-buffer (find-file-noselect archive)))
(if (member place '(other-archive other-cat))
(setq todo-category-number 1)
(todo-category-number cat))
(todo-category-select)))))
(defun todo-choose-archive ()
"Choose an archive and visit it."
@ -3010,9 +3072,7 @@ this category does not exist in the archive, it is created."
(marked (assoc cat todo-categories-with-marks))
(afile (concat (file-name-sans-extension
todo-current-todo-file) ".toda"))
(archive (if (file-exists-p afile)
(find-file-noselect afile t)
(get-buffer-create afile)))
(archive (find-file-noselect afile t))
(item (and (todo-done-item-p)
(concat (todo-item-string) "\n")))
(count 0)
@ -3056,7 +3116,6 @@ this category does not exist in the archive, it is created."
(if (not (or marked all item))
(throw 'end (message "Only done items can be archived"))
(with-current-buffer archive
(unless buffer-file-name (erase-buffer))
(let (buffer-read-only)
(widen)
(goto-char (point-min))
@ -3076,11 +3135,13 @@ this category does not exist in the archive, it is created."
(item)))
(todo-update-count 'done (if (or marked all) count 1) cat)
(todo-update-categories-sexp)
;; If archive is new, save to file now (using write-region in
;; order not to get prompted for file to save to), to let
;; auto-mode-alist take effect below.
(unless buffer-file-name
(write-region nil nil afile)
;; If archive is new, save to file now (with
;; write-region to avoid prompt for file to save to)
;; to update todo-archives, and to let auto-mode-alist
;; take effect below on visiting the archive.
(unless (nth 7 (file-attributes afile))
(write-region nil nil afile t t)
(setq todo-archives (funcall todo-files-function t))
(kill-buffer))))
(with-current-buffer tbuf
(cond
@ -3286,19 +3347,24 @@ categories display according to priority."
(defun todo-show-categories-table ()
"Display a table of the current file's categories and item counts.
In the initial display the categories are numbered, indicating
their current order for navigating by \\[todo-forward-category]
and \\[todo-backward-category]. You can permanently change the
order of the category at point by typing
\\[todo-set-category-number], \\[todo-raise-category] or
\\[todo-lower-category].
In the initial display the lines of the table are numbered,
indicating the current order of the categories when sequentially
navigating through the todo file with `\\[todo-forward-category]'
and `\\[todo-backward-category]'. You can reorder the lines, and
hence the category sequence, by typing `\\[todo-raise-category]'
or `\\[todo-lower-category]' to raise or lower the category at
point, or by typing `\\[todo-set-category-number]' and entering a
number at the prompt or by typing `\\[todo-set-category-number]'
with a numeric prefix. If you save the todo file after
reordering the categories, the new order persists in subsequent
Emacs sessions.
The labels above the category names and item counts are buttons,
and clicking these changes the display: sorted by category name
or by the respective item counts (alternately descending or
ascending). In these displays the categories are not numbered
and \\[todo-set-category-number], \\[todo-raise-category] and
\\[todo-lower-category] are disabled. (Programmatically, the
and `\\[todo-set-category-number]', `\\[todo-raise-category]' and
`\\[todo-lower-category]' are disabled. (Programmatically, the
sorting is triggered by passing a non-nil SORTKEY argument.)
In addition, the lines with the category names and item counts
@ -4019,15 +4085,15 @@ regexp items."
"Buffer type string for `todo-filter-items'.")
(defun todo-filter-items (filter &optional new multifile)
"Display a cross-category list of items filtered by FILTER.
"Display a list of items filtered by FILTER.
The values of FILTER can be `top' for top priority items, a cons
of `top' and a number passed by the caller, `diary' for diary
items, or `regexp' for items matching a regular expression entered
by the user. The items can be from any categories in the current
todo file or, with non-nil MULTIFILE, from several files. If NEW
is nil, visit an appropriate file containing the list of filtered
items; if there is no such file, or with non-nil NEW, build the
list and display it.
items, or `regexp' for items matching a regular expression
entered by the user. The items can come from any categories in
the current todo file or, with non-nil MULTIFILE, from several
files. If NEW is nil, visit an appropriate file containing the
list of filtered items; if there is no such file, or with non-nil
NEW, build the list and display it.
See the documentation strings of the commands
`todo-filter-top-priorities', `todo-filter-diary-items',
@ -4699,14 +4765,57 @@ short todo archive or top priorities file name, respectively."
((eq type 'regexp) ".todr")
(t ".todo"))))))
(defun todo-check-file (file)
"Check the state associated with FILE and update it if necessary.
If FILE exists, return t. If it does not exist and there is no
live buffer with its content, return nil; if there is such a
buffer and the user tries to show it, ask whether to restore
FILE, and if confirmed, do so and return t; else delete the
buffer, clean up the state and return nil."
(setq todo-files (funcall todo-files-function))
(setq todo-archives (funcall todo-files-function t))
(if (file-exists-p file)
t
(setq todo-visited (delete file todo-visited))
(let ((buf (find-buffer-visiting file)))
(if (and buf
(y-or-n-p
(concat
(format (concat "Todo file \"%s\" has been deleted but "
"its content is still in a buffer!\n")
(todo-short-file-name file))
"Save that buffer and restore the todo file? ")))
(progn
(with-current-buffer buf (save-buffer))
(setq todo-files (funcall todo-files-function))
(setq todo-archives (funcall todo-files-function t))
t)
(let* ((files (append todo-files todo-archives))
(tctf todo-current-todo-file)
(tgctf todo-global-current-todo-file)
(tdtf (todo-absolute-file-name todo-default-todo-file)))
(unless (or (not todo-current-todo-file)
(member todo-current-todo-file files))
(setq todo-current-todo-file nil))
(unless (or (not todo-global-current-todo-file)
(member todo-global-current-todo-file files))
(setq todo-global-current-todo-file nil))
(unless (or (not todo-default-todo-file)
(member todo-default-todo-file files))
(setq todo-default-todo-file (todo-short-file-name
(car todo-files))))
(todo-reevaluate-filelist-defcustoms)
(when buf (kill-buffer buf))
nil)))))
(defun todo-category-number (cat)
"Return the number of category CAT in this todo file.
The buffer-local variable `todo-category-number' holds this
number as its value."
(let ((categories (mapcar 'car todo-categories)))
(setq todo-category-number
;; Increment by one, so that the highest priority category in Todo
;; Categories mode is numbered one rather than zero.
;; Increment by one, so that the number of the first
;; category is one rather than zero.
(1+ (- (length categories)
(length (member cat categories)))))))
@ -5384,7 +5493,27 @@ Each element of the list is a cons of a category name and the
file or list of files (as short file names) it is in. The files
are either the current (or if there is none, the default) todo
file plus the files listed in `todo-category-completions-files',
or, with non-nil ARCHIVE, the current archive file."
or, with non-nil ARCHIVE, the current archive file.
Before calculating the completions, update the value of
`todo-category-completions-files' in case any files named in it
have been removed."
(let (deleted)
(dolist (f todo-category-completions-files)
(unless (file-exists-p (todo-absolute-file-name f))
(setq todo-category-completions-files
(delete f todo-category-completions-files))
(push f deleted)))
(when deleted
(let ((pl (> (length deleted) 1))
(names (mapconcat (lambda (f) (concat "\"" f "\"")) deleted ", ")))
(message (concat "File" (if pl "s" "") " " names " ha" (if pl "ve" "s")
" been deleted and removed from\n"
"the list of category completion files")))
(todo-reevaluate-category-completions-files-defcustom)
(custom-set-default 'todo-category-completions-files
(symbol-value 'todo-category-completions-files))
(sleep-for 1.5)))
(let* ((curfile (or todo-current-todo-file
(and todo-show-current-file
todo-global-current-todo-file)
@ -5435,6 +5564,7 @@ MUSTMATCH the name of an existing file must be chosen;
otherwise, a new file name is allowed."
(let* ((completion-ignore-case todo-completion-ignore-case)
(files (mapcar 'todo-short-file-name
;; (funcall todo-files-function archive)))
(if archive todo-archives todo-files)))
(file (completing-read prompt files nil mustmatch nil nil
(if files
@ -5529,7 +5659,7 @@ categories from `todo-category-completions-files'."
;; Validate only against completion categories.
(let ((todo-categories categories))
(setq cat (todo-validate-name cat 'category)))
;; When user enters a nonexistest category name by jumping or
;; When user enters a nonexistent category name by jumping or
;; moving, confirm that it should be added, then validate.
(unless add
(if (todo-y-or-n-p (format "Add new category \"%s\" to file \"%s\"? "
@ -5867,13 +5997,24 @@ the empty string (i.e., no time string)."
(defun todo-reevaluate-default-file-defcustom ()
"Reevaluate defcustom of `todo-default-todo-file'.
Called after adding or deleting a todo file."
(eval (defcustom todo-default-todo-file (car (funcall todo-files-function))
"Todo file visited by first session invocation of `todo-show'."
:type `(radio ,@(mapcar (lambda (f) (list 'const f))
(mapcar 'todo-short-file-name
(funcall todo-files-function))))
:group 'todo)))
Called after adding or deleting a todo file. If the value of
`todo-default-todo-file' before calling this function was
associated with an existing file, keep that value."
;; (let ((curval todo-default-todo-file))
(eval
(defcustom todo-default-todo-file (todo-short-file-name
(car (funcall todo-files-function)))
"Todo file visited by first session invocation of `todo-show'."
:type (when todo-files
`(radio ,@(mapcar (lambda (f) (list 'const f))
(mapcar 'todo-short-file-name
(funcall todo-files-function)))))
:group 'todo))
;; (when (and curval (file-exists-p (todo-absolute-file-name curval)))
;; (custom-set-default 'todo-default-todo-file curval)
;; ;; (custom-reevaluate-setting 'todo-default-todo-file)
;; )))
)
(defun todo-reevaluate-category-completions-files-defcustom ()
"Reevaluate defcustom of `todo-category-completions-files'.
@ -6060,6 +6201,7 @@ Filtered Items mode following todo (not done) items."
("Cu" todo-unmark-category)
("Fh" todo-toggle-item-header)
("h" todo-toggle-item-header)
("Fk" todo-delete-file)
("Fe" todo-edit-file)
("FH" todo-toggle-item-highlighting)
("H" todo-toggle-item-highlighting)
@ -6226,12 +6368,13 @@ Filtered Items mode following todo (not done) items."
(defun todo-show-current-file ()
"Visit current instead of default todo file with `todo-show'.
This function is added to `pre-command-hook' when user option
Added to `pre-command-hook' in Todo mode when user option
`todo-show-current-file' is set to non-nil."
(setq todo-global-current-todo-file todo-current-todo-file))
(defun todo-display-as-todo-file ()
"Show todo files correctly when visited from outside of Todo mode."
"Show todo files correctly when visited from outside of Todo mode.
Added to `find-file-hook' in Todo mode and Todo Archive mode."
(and (member this-command todo-visit-files-commands)
(= (- (point-max) (point-min)) (buffer-size))
(member major-mode '(todo-mode todo-archive-mode))
@ -6265,7 +6408,7 @@ This function is added to `kill-buffer-hook' in Todo mode."
(defun todo-reset-and-enable-done-separator ()
"Show resized done items separator overlay after window change.
Added to `window-configuration-change-hook' in `todo-mode'."
Added to `window-configuration-change-hook' in Todo mode."
(when (= 1 (length todo-done-separator-string))
(let ((sep todo-done-separator))
(setq todo-done-separator (todo-done-separator))

View File

@ -2,7 +2,7 @@
* data-debug.el, cedet-idutils.el: Neuter the "Version:" header.
2013-06-19 Glenn Morris <rgm@fencepost.gnu.org>
2013-06-19 Glenn Morris <rgm@gnu.org>
* semantic/idle.el (define-semantic-idle-service):
No need to use eval-and-compile, progn will do.

View File

@ -196,9 +196,7 @@ Zero or nil means disable timer-based auto-saving."
(integer :tag "Seconds"))
:set (lambda (symbol value)
(set-default symbol value)
(condition-case nil
(desktop-auto-save-set-timer)
(error nil)))
(ignore-errors (desktop-auto-save-set-timer)))
:group 'desktop
:version "24.4")
@ -416,9 +414,8 @@ See `desktop-restore-eager'."
:version "22.1")
;;;###autoload
(defvar desktop-save-buffer nil
(defvar-local desktop-save-buffer nil
"When non-nil, save buffer status in desktop file.
This variable becomes buffer local when set.
If the value is a function, it is called by `desktop-save' with argument
DESKTOP-DIRNAME to obtain auxiliary information to save in the desktop
@ -430,7 +427,6 @@ When file names are returned, they should be formatted using the call
Later, when `desktop-read' evaluates the desktop file, auxiliary information
is passed as the argument DESKTOP-BUFFER-MISC to functions in
`desktop-buffer-mode-handlers'.")
(make-variable-buffer-local 'desktop-save-buffer)
(make-obsolete-variable 'desktop-buffer-modes-to-save
'desktop-save-buffer "22.1")
(make-obsolete-variable 'desktop-buffer-misc-functions
@ -582,15 +578,15 @@ Used to detect desktop file conflicts.")
"Return the PID of the Emacs process that owns the desktop file in DIRNAME.
Return nil if no desktop file found or no Emacs process is using it.
DIRNAME omitted or nil means use `desktop-dirname'."
(let (owner)
(and (file-exists-p (desktop-full-lock-name dirname))
(condition-case nil
(with-temp-buffer
(insert-file-contents-literally (desktop-full-lock-name dirname))
(goto-char (point-min))
(setq owner (read (current-buffer)))
(integerp owner))
(error nil))
(let (owner
(file (desktop-full-lock-name dirname)))
(and (file-exists-p file)
(ignore-errors
(with-temp-buffer
(insert-file-contents-literally file)
(goto-char (point-min))
(setq owner (read (current-buffer)))
(integerp owner)))
owner)))
(defun desktop-claim-lock (&optional dirname)
@ -636,7 +632,7 @@ Furthermore, it clears the variables listed in `desktop-globals-to-clear'."
(let ((bufname (buffer-name (car buffers))))
(or
(null bufname)
(string-match preserve-regexp bufname)
(string-match-p preserve-regexp bufname)
;; Don't kill buffers made for internal purposes.
(and (not (equal bufname "")) (eq (aref bufname 0) ?\s))
(kill-buffer (car buffers))))
@ -758,8 +754,7 @@ QUOTE may be `may' (value may be quoted),
((consp value)
(let ((p value)
newlist
use-list*
anynil)
use-list*)
(while (consp p)
(let ((q.sexp (desktop--v2s (car p))))
(push q.sexp newlist))
@ -841,17 +836,17 @@ MODE is the major mode.
dired-skip)
(and (not (and (stringp desktop-buffers-not-to-save)
(not filename)
(string-match desktop-buffers-not-to-save bufname)))
(string-match-p desktop-buffers-not-to-save bufname)))
(not (memq mode desktop-modes-not-to-save))
;; FIXME this is broken if desktop-files-not-to-save is nil.
(or (and filename
(stringp desktop-files-not-to-save)
(not (string-match desktop-files-not-to-save filename)))
(not (string-match-p desktop-files-not-to-save filename)))
(and (memq mode '(dired-mode vc-dir-mode))
(with-current-buffer bufname
(not (setq dired-skip
(string-match desktop-files-not-to-save
default-directory)))))
(string-match-p desktop-files-not-to-save
default-directory)))))
(and (null filename)
(null dired-skip) ; bug#5755
(with-current-buffer bufname desktop-save-buffer))))))

View File

@ -136,7 +136,7 @@
;;; Code:
(eval-when-compile (require 'cl-lib))
(require 'cl-lib)
(require 'dired)
(require 'image-mode)
(require 'jka-compr)
@ -698,14 +698,6 @@ It's a subdirectory of `doc-view-cache-directory'."
(md5 (current-buffer)))))
doc-view-cache-directory)))))
(defun doc-view-remove-if (predicate list)
"Return LIST with all items removed that satisfy PREDICATE."
(let (new-list)
(dolist (item list)
(when (not (funcall predicate item))
(setq new-list (cons item new-list))))
(nreverse new-list)))
;;;###autoload
(defun doc-view-mode-p (type)
"Return non-nil if document type TYPE is available for `doc-view'.
@ -1488,7 +1480,7 @@ If BACKWARD is non-nil, jump to the previous match."
(defun doc-view-search-next-match (arg)
"Go to the ARGth next matching page."
(interactive "p")
(let* ((next-pages (doc-view-remove-if
(let* ((next-pages (cl-remove-if
(lambda (i) (<= (car i) (doc-view-current-page)))
doc-view--current-search-matches))
(page (car (nth (1- arg) next-pages))))
@ -1502,7 +1494,7 @@ If BACKWARD is non-nil, jump to the previous match."
(defun doc-view-search-previous-match (arg)
"Go to the ARGth previous matching page."
(interactive "p")
(let* ((prev-pages (doc-view-remove-if
(let* ((prev-pages (cl-remove-if
(lambda (i) (>= (car i) (doc-view-current-page)))
doc-view--current-search-matches))
(page (car (nth (1- arg) (nreverse prev-pages)))))

View File

@ -62,9 +62,8 @@
;; macro in a more concise way that omits the comments.
;;; Code:
(eval-when-compile (require 'cl-lib))
(require 'cl-lib)
(require 'kmacro)
;;; The user-level commands for editing macros.
@ -444,14 +443,14 @@ doubt, use whitespace."
(let* ((prefix
(or (and (integerp (aref rest-mac 0))
(memq (aref rest-mac 0) mdigs)
(memq (key-binding (edmacro-subseq rest-mac 0 1))
(memq (key-binding (cl-subseq rest-mac 0 1))
'(digit-argument negative-argument))
(let ((i 1))
(while (memq (aref rest-mac i) (cdr mdigs))
(cl-incf i))
(and (not (memq (aref rest-mac i) pkeys))
(prog1 (vconcat "M-" (edmacro-subseq rest-mac 0 i) " ")
(cl-callf edmacro-subseq rest-mac i)))))
(prog1 (vconcat "M-" (cl-subseq rest-mac 0 i) " ")
(cl-callf cl-subseq rest-mac i)))))
(and (eq (aref rest-mac 0) ?\C-u)
(eq (key-binding [?\C-u]) 'universal-argument)
(let ((i 1))
@ -459,7 +458,7 @@ doubt, use whitespace."
(cl-incf i))
(and (not (memq (aref rest-mac i) pkeys))
(prog1 (cl-loop repeat i concat "C-u ")
(cl-callf edmacro-subseq rest-mac i)))))
(cl-callf cl-subseq rest-mac i)))))
(and (eq (aref rest-mac 0) ?\C-u)
(eq (key-binding [?\C-u]) 'universal-argument)
(let ((i 1))
@ -469,18 +468,18 @@ doubt, use whitespace."
'(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9))
(cl-incf i))
(and (not (memq (aref rest-mac i) pkeys))
(prog1 (vconcat "C-u " (edmacro-subseq rest-mac 1 i) " ")
(cl-callf edmacro-subseq rest-mac i)))))))
(prog1 (vconcat "C-u " (cl-subseq rest-mac 1 i) " ")
(cl-callf cl-subseq rest-mac i)))))))
(bind-len (apply 'max 1
(cl-loop for map in maps
for b = (lookup-key map rest-mac)
when b collect b)))
(key (edmacro-subseq rest-mac 0 bind-len))
(key (cl-subseq rest-mac 0 bind-len))
(fkey nil) tlen tkey
(bind (or (cl-loop for map in maps for b = (lookup-key map key)
thereis (and (not (integerp b)) b))
(and (setq fkey (lookup-key local-function-key-map rest-mac))
(setq tlen fkey tkey (edmacro-subseq rest-mac 0 tlen)
(setq tlen fkey tkey (cl-subseq rest-mac 0 tlen)
fkey (lookup-key local-function-key-map tkey))
(cl-loop for map in maps
for b = (lookup-key map fkey)
@ -507,7 +506,7 @@ doubt, use whitespace."
(> first 32) (<= first maxkey) (/= first 92)
(progn
(if (> text 30) (setq text 30))
(setq desc (concat (edmacro-subseq rest-mac 0 text)))
(setq desc (concat (cl-subseq rest-mac 0 text)))
(when (string-match "^[ACHMsS]-." desc)
(setq text 2)
(cl-callf substring desc 0 2))
@ -524,7 +523,7 @@ doubt, use whitespace."
(> text bind-len)
(memq (aref rest-mac text) '(return 13))
(progn
(setq desc (concat (edmacro-subseq rest-mac bind-len text)))
(setq desc (concat (cl-subseq rest-mac bind-len text)))
(commandp (intern-soft desc))))
(if (commandp (intern-soft desc)) (setq bind desc))
(setq desc (format "<<%s>>" desc))
@ -562,14 +561,14 @@ doubt, use whitespace."
(setq desc (concat (edmacro-sanitize-for-string prefix) desc)))
(unless (string-match " " desc)
(let ((times 1) (pos bind-len))
(while (not (edmacro-mismatch rest-mac rest-mac
(while (not (cl-mismatch rest-mac rest-mac
0 bind-len pos (+ bind-len pos)))
(cl-incf times)
(cl-incf pos bind-len))
(when (> times 1)
(setq desc (format "%d*%s" times desc))
(setq bind-len (* bind-len times)))))
(setq rest-mac (edmacro-subseq rest-mac bind-len))
(setq rest-mac (cl-subseq rest-mac bind-len))
(if verbose
(progn
(unless (equal res "") (cl-callf concat res "\n"))
@ -590,50 +589,6 @@ doubt, use whitespace."
(cl-incf len (length desc)))))
res))
(defun edmacro-mismatch (cl-seq1 cl-seq2 cl-start1 cl-end1 cl-start2 cl-end2)
"Compare SEQ1 with SEQ2, return index of first mismatching element.
Return nil if the sequences match. If one sequence is a prefix of the
other, the return value indicates the end of the shorted sequence.
\n(fn SEQ1 SEQ2 START1 END1 START2 END2)"
(or cl-end1 (setq cl-end1 (length cl-seq1)))
(or cl-end2 (setq cl-end2 (length cl-seq2)))
(let ((cl-p1 (and (listp cl-seq1) (nthcdr cl-start1 cl-seq1)))
(cl-p2 (and (listp cl-seq2) (nthcdr cl-start2 cl-seq2))))
(while (and (< cl-start1 cl-end1) (< cl-start2 cl-end2)
(eql (if cl-p1 (car cl-p1)
(aref cl-seq1 cl-start1))
(if cl-p2 (car cl-p2)
(aref cl-seq2 cl-start2))))
(setq cl-p1 (cdr cl-p1) cl-p2 (cdr cl-p2)
cl-start1 (1+ cl-start1) cl-start2 (1+ cl-start2)))
(and (or (< cl-start1 cl-end1) (< cl-start2 cl-end2))
cl-start1)))
(defun edmacro-subseq (seq start &optional end)
"Return the subsequence of SEQ from START to END.
If END is omitted, it defaults to the length of the sequence.
If START or END is negative, it counts from the end."
(if (stringp seq) (substring seq start end)
(let (len)
(and end (< end 0) (setq end (+ end (setq len (length seq)))))
(if (< start 0) (setq start (+ start (or len (setq len (length seq))))))
(cond ((listp seq)
(if (> start 0) (setq seq (nthcdr start seq)))
(if end
(let ((res nil))
(while (>= (setq end (1- end)) start)
(push (pop seq) res))
(nreverse res))
(copy-sequence seq)))
(t
(or end (setq end (or len (length seq))))
(let ((res (make-vector (max (- end start) 0) nil))
(i 0))
(while (< start end)
(aset res i (aref seq start))
(setq i (1+ i) start (1+ start)))
res))))))
(defun edmacro-sanitize-for-string (seq)
"Convert a key sequence vector SEQ into a string.
The string represents the same events; Meta is indicated by bit 7.
@ -760,7 +715,7 @@ This function assumes that the events can be stored in a string."
(eq (aref res 1) ?\()
(eq (aref res (- (length res) 2)) ?\C-x)
(eq (aref res (- (length res) 1)) ?\)))
(setq res (edmacro-subseq res 2 -2)))
(setq res (cl-subseq res 2 -2)))
(if (and (not need-vector)
(cl-loop for ch across res
always (and (characterp ch)

View File

@ -1,2 +0,0 @@
!*-loaddefs.el

View File

@ -1957,7 +1957,7 @@ by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...).
"Collect multiple return values.
FORM must return a list; the BODY is then executed with the first N elements
of this list bound (`let'-style) to each of the symbols SYM in turn. This
is analogous to the Common Lisp `cl-multiple-value-bind' macro, using lists to
is analogous to the Common Lisp `multiple-value-bind' macro, using lists to
simulate true multiple return values. For compatibility, (cl-values A B C) is
a synonym for (list A B C).
@ -1975,7 +1975,7 @@ a synonym for (list A B C).
"Collect multiple return values.
FORM must return a list; the first N elements of this list are stored in
each of the symbols SYM in turn. This is analogous to the Common Lisp
`cl-multiple-value-setq' macro, using lists to simulate true multiple return
`multiple-value-setq' macro, using lists to simulate true multiple return
values. For compatibility, (cl-values A B C) is a synonym for (list A B C).
\(fn (SYM...) FORM)"
@ -2002,7 +2002,7 @@ values. For compatibility, (cl-values A B C) is a synonym for (list A B C).
(cons 'progn body))
;;;###autoload
(defmacro cl-the (_type form)
"At present this ignores _TYPE and is simply equivalent to FORM."
"At present this ignores TYPE and is simply equivalent to FORM."
(declare (indent 1) (debug (cl-type-spec form)))
form)
@ -2059,7 +2059,7 @@ values. For compatibility, (cl-values A B C) is a synonym for (list A B C).
"Declare SPECS about the current function while compiling.
For instance
\(cl-declare (warn 0))
(cl-declare (warn 0))
will turn off byte-compile warnings in the function.
See Info node `(cl)Declarations' for details."
@ -2279,8 +2279,8 @@ KEYWORD can be one of :conc-name, :constructor, :copier, :predicate,
Each SLOT may instead take the form (SNAME SDEFAULT SOPTIONS...), where
SDEFAULT is the default value of that slot and SOPTIONS are keyword-value
pairs for that slot.
Currently, only one keyword is supported, `:read-only'. If this has a non-nil
value, that slot cannot be set via `setf'.
Currently, only one keyword is supported, `:read-only'. If this has a
non-nil value, that slot cannot be set via `setf'.
\(fn NAME SLOTS...)"
(declare (doc-string 2) (indent 1)

View File

@ -53,7 +53,7 @@
;;; Code:
(require 'macroexp)
(eval-when-compile (require 'cl-lib))
(require 'cl-lib)
(eval-when-compile (require 'pcase))
;;; Options
@ -263,26 +263,6 @@ An extant spec symbol is a symbol that is not a function and has a
;;; Utilities
;; Define edebug-gensym - from old cl.el
(defvar edebug-gensym-index 0
"Integer used by `edebug-gensym' to produce new names.")
(defun edebug-gensym (&optional prefix)
"Generate a fresh uninterned symbol.
There is an optional argument, PREFIX. PREFIX is the string
that begins the new name. Most people take just the default,
except when debugging needs suggest otherwise."
(if (null prefix)
(setq prefix "G"))
(let ((newsymbol nil)
(newname ""))
(while (not newsymbol)
(setq newname (concat prefix (int-to-string edebug-gensym-index)))
(setq edebug-gensym-index (+ edebug-gensym-index 1))
(if (not (intern-soft newname))
(setq newsymbol (make-symbol newname))))
newsymbol))
(defun edebug-lambda-list-keywordp (object)
"Return t if OBJECT is a lambda list keyword.
A lambda list keyword is a symbol that starts with `&'."
@ -1186,7 +1166,7 @@ Maybe clear the markers and delete the symbol's edebug property?"
;; Uses the dynamically bound vars edebug-def-name and edebug-def-args.
;; Do this after parsing since that may find a name.
(setq edebug-def-name
(or edebug-def-name edebug-old-def-name (edebug-gensym "edebug-anon")))
(or edebug-def-name edebug-old-def-name (cl-gensym "edebug-anon")))
`(edebug-enter
(quote ,edebug-def-name)
,(if edebug-inside-func
@ -1299,7 +1279,7 @@ expressions; a `progn' form will be returned enclosing these forms."
;; Set the name here if it was not set by edebug-make-enter-wrapper.
(setq edebug-def-name
(or edebug-def-name edebug-old-def-name (edebug-gensym "edebug-anon")))
(or edebug-def-name edebug-old-def-name (cl-gensym "edebug-anon")))
;; Add this def as a dependent of containing def. Buggy.
'(if (and edebug-containing-def-name

View File

@ -54,7 +54,7 @@
;;; Code:
(eval-when-compile (require 'cl-lib))
(require 'cl-lib)
(require 'button)
(require 'debug)
(require 'easymenu)
@ -87,127 +87,6 @@
;;; Copies/reimplementations of cl functions.
(defun ert--cl-do-remf (plist tag)
"Copy of `cl-do-remf'. Modify PLIST by removing TAG."
(let ((p (cdr plist)))
(while (and (cdr p) (not (eq (car (cdr p)) tag))) (setq p (cdr (cdr p))))
(and (cdr p) (progn (setcdr p (cdr (cdr (cdr p)))) t))))
(defun ert--remprop (sym tag)
"Copy of `cl-remprop'. Modify SYM's plist by removing TAG."
(let ((plist (symbol-plist sym)))
(if (and plist (eq tag (car plist)))
(progn (setplist sym (cdr (cdr plist))) t)
(ert--cl-do-remf plist tag))))
(defun ert--remove-if-not (ert-pred ert-list)
"A reimplementation of `remove-if-not'.
ERT-PRED is a predicate, ERT-LIST is the input list."
(cl-loop for ert-x in ert-list
if (funcall ert-pred ert-x)
collect ert-x))
(defun ert--intersection (a b)
"A reimplementation of `intersection'. Intersect the sets A and B.
Elements are compared using `eql'."
(cl-loop for x in a
if (memql x b)
collect x))
(defun ert--set-difference (a b)
"A reimplementation of `set-difference'. Subtract the set B from the set A.
Elements are compared using `eql'."
(cl-loop for x in a
unless (memql x b)
collect x))
(defun ert--set-difference-eq (a b)
"A reimplementation of `set-difference'. Subtract the set B from the set A.
Elements are compared using `eq'."
(cl-loop for x in a
unless (memq x b)
collect x))
(defun ert--union (a b)
"A reimplementation of `union'. Compute the union of the sets A and B.
Elements are compared using `eql'."
(append a (ert--set-difference b a)))
(eval-and-compile
(defvar ert--gensym-counter 0))
(eval-and-compile
(defun ert--gensym (&optional prefix)
"Only allows string PREFIX, not compatible with CL."
(unless prefix (setq prefix "G"))
(make-symbol (format "%s%s"
prefix
(prog1 ert--gensym-counter
(cl-incf ert--gensym-counter))))))
(defun ert--coerce-to-vector (x)
"Coerce X to a vector."
(when (char-table-p x) (error "Not supported"))
(if (vectorp x)
x
(vconcat x)))
(cl-defun ert--remove* (x list &key key test)
"Does not support all the keywords of remove*."
(unless key (setq key #'identity))
(unless test (setq test #'eql))
(cl-loop for y in list
unless (funcall test x (funcall key y))
collect y))
(defun ert--string-position (c s)
"Return the position of the first occurrence of C in S, or nil if none."
(cl-loop for i from 0
for x across s
when (eql x c) return i))
(defun ert--mismatch (a b)
"Return index of first element that differs between A and B.
Like `mismatch'. Uses `equal' for comparison."
(cond ((or (listp a) (listp b))
(ert--mismatch (ert--coerce-to-vector a)
(ert--coerce-to-vector b)))
((> (length a) (length b))
(ert--mismatch b a))
(t
(let ((la (length a))
(lb (length b)))
(cl-assert (arrayp a) t)
(cl-assert (arrayp b) t)
(cl-assert (<= la lb) t)
(cl-loop for i below la
when (not (equal (aref a i) (aref b i))) return i
finally (cl-return (if (/= la lb)
la
(cl-assert (equal a b) t)
nil)))))))
(defun ert--subseq (seq start &optional end)
"Return a subsequence of SEQ from START to END."
(when (char-table-p seq) (error "Not supported"))
(let ((vector (substring (ert--coerce-to-vector seq) start end)))
(cl-etypecase seq
(vector vector)
(string (concat vector))
(list (append vector nil))
(bool-vector (cl-loop with result
= (make-bool-vector (length vector) nil)
for i below (length vector) do
(setf (aref result i) (aref vector i))
finally (cl-return result)))
(char-table (cl-assert nil)))))
(defun ert-equal-including-properties (a b)
"Return t if A and B have similar structure and contents.
@ -258,7 +137,7 @@ Emacs bug 6581 at URL `http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6581'."
(defun ert-make-test-unbound (symbol)
"Make SYMBOL name no test. Return SYMBOL."
(ert--remprop symbol 'ert--test)
(cl-remprop symbol 'ert--test)
symbol)
(defun ert--parse-keys-and-body (keys-and-body)
@ -396,8 +275,8 @@ DATA is displayed to the user and should state the reason of the failure."
cl-macro-environment)))))
(cond
((or (atom form) (ert--special-operator-p (car form)))
(let ((value (ert--gensym "value-")))
`(let ((,value (ert--gensym "ert-form-evaluation-aborted-")))
(let ((value (cl-gensym "value-")))
`(let ((,value (cl-gensym "ert-form-evaluation-aborted-")))
,(funcall inner-expander
`(setq ,value ,form)
`(list ',whole :form ',form :value ,value)
@ -410,10 +289,10 @@ DATA is displayed to the user and should state the reason of the failure."
(and (consp fn-name)
(eql (car fn-name) 'lambda)
(listp (cdr fn-name)))))
(let ((fn (ert--gensym "fn-"))
(args (ert--gensym "args-"))
(value (ert--gensym "value-"))
(default-value (ert--gensym "ert-form-evaluation-aborted-")))
(let ((fn (cl-gensym "fn-"))
(args (cl-gensym "args-"))
(value (cl-gensym "value-"))
(default-value (cl-gensym "ert-form-evaluation-aborted-")))
`(let ((,fn (function ,fn-name))
(,args (list ,@arg-forms)))
(let ((,value ',default-value))
@ -450,7 +329,7 @@ FORM-DESCRIPTION-FORM before it has called INNER-FORM."
(ert--expand-should-1
whole form
(lambda (inner-form form-description-form value-var)
(let ((form-description (ert--gensym "form-description-")))
(let ((form-description (cl-gensym "form-description-")))
`(let (,form-description)
,(funcall inner-expander
`(unwind-protect
@ -491,7 +370,7 @@ and aborts the current test as failed if it doesn't."
(list type)
(symbol (list type)))))
(cl-assert signaled-conditions)
(unless (ert--intersection signaled-conditions handled-conditions)
(unless (cl-intersection signaled-conditions handled-conditions)
(ert-fail (append
(funcall form-description-fn)
(list
@ -528,8 +407,8 @@ failed."
`(should-error ,form ,@keys)
form
(lambda (inner-form form-description-form value-var)
(let ((errorp (ert--gensym "errorp"))
(form-description-fn (ert--gensym "form-description-fn-")))
(let ((errorp (cl-gensym "errorp"))
(form-description-fn (cl-gensym "form-description-fn-")))
`(let ((,errorp nil)
(,form-description-fn (lambda () ,form-description-form)))
(condition-case -condition-
@ -591,7 +470,7 @@ Returns nil if they are."
`(proper-lists-of-different-length ,(length a) ,(length b)
,a ,b
first-mismatch-at
,(ert--mismatch a b))
,(cl-mismatch a b :test 'equal))
(cl-loop for i from 0
for ai in a
for bi in b
@ -611,7 +490,7 @@ Returns nil if they are."
,a ,b
,@(unless (char-table-p a)
`(first-mismatch-at
,(ert--mismatch a b))))
,(cl-mismatch a b :test 'equal))))
(cl-loop for i from 0
for ai across a
for bi across b
@ -656,8 +535,8 @@ key/value pairs in each list does not matter."
;; work, so let's punt on it for now.
(let* ((keys-a (ert--significant-plist-keys a))
(keys-b (ert--significant-plist-keys b))
(keys-in-a-not-in-b (ert--set-difference-eq keys-a keys-b))
(keys-in-b-not-in-a (ert--set-difference-eq keys-b keys-a)))
(keys-in-a-not-in-b (cl-set-difference keys-a keys-b :test 'eq))
(keys-in-b-not-in-a (cl-set-difference keys-b keys-a :test 'eq)))
(cl-flet ((explain-with-key (key)
(let ((value-a (plist-get a key))
(value-b (plist-get b key)))
@ -1090,7 +969,7 @@ contained in UNIVERSE."
(cl-etypecase universe
((member t) (mapcar #'ert-get-test
(apropos-internal selector #'ert-test-boundp)))
(list (ert--remove-if-not (lambda (test)
(list (cl-remove-if-not (lambda (test)
(and (ert-test-name test)
(string-match selector
(ert-test-name test))))
@ -1123,13 +1002,13 @@ contained in UNIVERSE."
(not
(cl-assert (eql (length operands) 1))
(let ((all-tests (ert-select-tests 't universe)))
(ert--set-difference all-tests
(cl-set-difference all-tests
(ert-select-tests (car operands)
all-tests))))
(or
(cl-case (length operands)
(0 (ert-select-tests 'nil universe))
(t (ert--union (ert-select-tests (car operands) universe)
(t (cl-union (ert-select-tests (car operands) universe)
(ert-select-tests `(or ,@(cdr operands))
universe)))))
(tag
@ -1141,7 +1020,7 @@ contained in UNIVERSE."
universe)))
(satisfies
(cl-assert (eql (length operands) 1))
(ert--remove-if-not (car operands)
(cl-remove-if-not (car operands)
(ert-select-tests 't universe))))))))
(defun ert--insert-human-readable-selector (selector)
@ -1285,7 +1164,7 @@ Also changes the counters in STATS to match."
"Create a new `ert--stats' object for running TESTS.
SELECTOR is the selector that was used to select TESTS."
(setq tests (ert--coerce-to-vector tests))
(setq tests (cl-coerce tests 'vector))
(let ((map (make-hash-table :size (length tests))))
(cl-loop for i from 0
for test across tests
@ -1548,10 +1427,10 @@ This can be used as an inverse of `add-to-list'."
(unless key (setq key #'identity))
(unless test (setq test #'equal))
(setf (symbol-value list-var)
(ert--remove* element
(symbol-value list-var)
:key key
:test test)))
(cl-remove element
(symbol-value list-var)
:key key
:test test)))
;;; Some basic interactive functions.
@ -1810,7 +1689,7 @@ BEGIN and END specify a region in the current buffer."
"Return the first line of S, or S if it contains no newlines.
The return value does not include the line terminator."
(substring s 0 (ert--string-position ?\n s)))
(substring s 0 (cl-position ?\n s)))
(defun ert-face-for-test-result (expectedp)
"Return a face that shows whether a test result was expected or unexpected.

View File

@ -131,8 +131,9 @@ Returns the number of actions taken."
(unwind-protect
(progn
(if (stringp prompter)
(setq prompter (lambda (object)
(format prompter object))))
(setq prompter (let ((prompter prompter))
(lambda (object)
(format prompter object)))))
(while (funcall next)
(setq prompt (funcall prompter elt))
(cond ((stringp prompt)

View File

@ -482,12 +482,19 @@ MATCH is the pattern that needs to be matched, of the form:
all))
'(:pcase--succeed . nil))))
(defun pcase--split-pred (upat pat)
;; FIXME: For predicates like (pred (> a)), two such predicates may
;; actually refer to different variables `a'.
(defun pcase--split-pred (vars upat pat)
(let (test)
(cond
((equal upat pat) '(:pcase--succeed . :pcase--fail))
((and (equal upat pat)
;; For predicates like (pred (> a)), two such predicates may
;; actually refer to different variables `a'.
(or (and (eq 'pred (car upat)) (symbolp (cadr upat)))
;; FIXME: `vars' gives us the environment in which `upat' will
;; run, but we don't have the environment in which `pat' will
;; run, so we can't do a reliable verification. But let's try
;; and catch at least the easy cases such as (bug#14773).
(not (pcase--fgrep (mapcar #'car vars) (cadr upat)))))
'(:pcase--succeed . :pcase--fail))
((and (eq 'pred (car upat))
(eq 'pred (car-safe pat))
(or (member (cons (cadr upat) (cadr pat))
@ -589,7 +596,7 @@ Otherwise, it defers to REST which is a list of branches of the form
(if (eq (car upat) 'pred) (pcase--mark-used sym))
(let* ((splitrest
(pcase--split-rest
sym (lambda (pat) (pcase--split-pred upat pat)) rest))
sym (lambda (pat) (pcase--split-pred vars upat pat)) rest))
(then-rest (car splitrest))
(else-rest (cdr splitrest)))
(pcase--if (if (and (eq (car upat) 'pred) (symbolp (cadr upat)))

View File

@ -996,93 +996,7 @@ as a Meta key and any number of multiple escapes are allowed."
(suspend-emacs))
(viper-change-state-to-emacs)))
;; Intercept ESC sequences on dumb terminals.
;; Based on the idea contributed by Marcelino Veiga Tuimil <mveiga@dit.upm.es>
;; Check if last key was ESC and if so try to reread it as a function key.
;; But only if there are characters to read during a very short time.
;; Returns the last event, if any.
(defun viper-envelop-ESC-key ()
(let ((event last-input-event)
(keyseq [nil])
(inhibit-quit t))
(if (viper-ESC-event-p event)
(progn
;; Some versions of Emacs (eg., 22.50.8 (?)) have a bug, which makes
;; even a single ESC into a fast keyseq. To guard against this, we
;; added a check if there are other events as well. Keep the next
;; line for the next time the bug reappears, so that will remember to
;; report it.
;;(if (and (viper-fast-keysequence-p) unread-command-events)
(if (viper-fast-keysequence-p) ;; for Emacsen without the above bug
(progn
(let (minor-mode-map-alist emulation-mode-map-alists)
(viper-set-unread-command-events event)
(setq keyseq (read-key-sequence nil 'continue-echo))
) ; let
;; If keyseq translates into something that still has ESC
;; at the beginning, separate ESC from the rest of the seq.
;; In XEmacs we check for events that are keypress meta-key
;; and convert them into [escape key]
;;
;; This is needed for the following reason:
;; If ESC is the first symbol, we interpret it as if the
;; user typed ESC and then quickly some other symbols.
;; If ESC is not the first one, then the key sequence
;; entered was apparently translated into a function key or
;; something (e.g., one may have
;; (define-key function-key-map "\e[192z" [f11])
;; which would translate the escape-sequence generated by
;; f11 in an xterm window into the symbolic key f11.
;;
;; If `first-key' is not an ESC event, we make it into the
;; last-command-event in order to pretend that this key was
;; pressed. This is needed to allow arrow keys to be bound to
;; macros. Otherwise, viper-exec-mapped-kbd-macro will think
;; that the last event was ESC and so it'll execute whatever is
;; bound to ESC. (Viper macros can't be bound to
;; ESC-sequences).
(let* ((first-key (elt keyseq 0))
(key-mod (event-modifiers first-key)))
(cond ((and (viper-ESC-event-p first-key)
(not (viper-translate-all-ESC-keysequences)))
;; put keys following ESC on the unread list
;; and return ESC as the key-sequence
(viper-set-unread-command-events (viper-subseq keyseq 1))
(setq last-input-event event
keyseq (if (featurep 'emacs)
"\e"
(vector (character-to-event ?\e)))))
((and (featurep 'xemacs)
(key-press-event-p first-key)
(equal '(meta) key-mod))
(viper-set-unread-command-events
(vconcat (vector
(character-to-event (event-key first-key)))
(viper-subseq keyseq 1)))
(setq last-input-event event
keyseq (vector (character-to-event ?\e))))
((eventp first-key)
(setq last-command-event
(viper-copy-event first-key)))
))
) ; end progn
;; this is escape event with nothing after it
;; put in unread-command-event and then re-read
(viper-set-unread-command-events event)
(setq keyseq (read-key-sequence nil))
))
;; not an escape event
(setq keyseq (vector event)))
keyseq))
;; Listen to ESC key.
;; If a sequence of keys starting with ESC is issued with very short delays,
;; interpret these keys in Emacs mode, so ESC won't be interpreted as a Vi key.
(defun viper-intercept-ESC-key ()
"Function that implements ESC key in Viper emulation of Vi."
(interactive)
@ -1090,13 +1004,7 @@ as a Meta key and any number of multiple escapes are allowed."
;; minor-mode map(s) have been temporarily disabled so the ESC
;; binding to viper-intercept-ESC-key doesn't hide the binding we're
;; looking for (Bug#9146):
(let* ((event (viper-envelop-ESC-key))
(cmd (cond ((equal event viper-ESC-key)
'viper-intercept-ESC-key)
((let ((emulation-mode-map-alists nil))
(key-binding event)))
(t
(error "Viper bell")))))
(let* ((cmd 'viper-intercept-ESC-key))
;; call the actual function to execute ESC (if no other symbols followed)
;; or the key bound to the ESC sequence (if the sequence was issued
@ -4289,6 +4197,11 @@ cursor move past the beginning of line."
(t
(backward-char 1))))
(defun viper-del-forward-char-in-insert ()
"Delete 1 char forward if in insert or replace state."
(interactive)
;; don't put on kill ring
(delete-char 1 nil))
;; join lines.
@ -4947,7 +4860,7 @@ Please, specify your level now: ")
(interactive)
(if (< viper-expert-level 2)
(save-buffers-kill-emacs)
(save-buffer)
(if (buffer-modified-p) (save-buffer))
(kill-buffer (current-buffer))))

View File

@ -192,7 +192,7 @@ Enter as a sexp. Examples: \"\\C-z\", [(control ?z)]."
:type 'string
:group 'viper)
(defvar viper-ESC-key (kbd "ESC")
(defconst viper-ESC-key [escape]
"Key used to ESC.")

View File

@ -14,7 +14,7 @@
;; filed in the Emacs bug reporting system against this file, a copy
;; of the bug report be sent to the maintainer's email address.
(defconst viper-version "3.14.1 of August 15, 2009"
(defconst viper-version "3.14.2 of July 4, 2013"
"The current version of Viper")
;; This file is part of GNU Emacs.
@ -411,6 +411,7 @@ widget."
dired-mode
efs-mode
tar-mode
egg-status-buffer-mode
browse-kill-ring-mode
recentf-mode
@ -660,7 +661,7 @@ user customization, unrelated to Viper. For instance, if the user advised
undone.
It also can't undo some Viper settings."
(interactive)
(viper-setup-ESC-to-escape nil)
;; restore non-viper vars
(setq-default
next-line-add-newlines
@ -825,6 +826,58 @@ It also can't undo some Viper settings."
(add-hook 'viper-post-command-hooks 'set-viper-state-in-major-mode t))
;;; Handling of tty's ESC event
;; On a tty, an ESC event can either be the user hitting the escape key, or
;; some element of a byte sequence used to encode for example cursor keys.
;; So we try to recognize those events that correspond to the escape key and
;; turn them into `escape' events (same as used under GUIs). The heuristic we
;; use to distinguish the two cases is based, as usual, on a timeout, and on
;; the fact that the special ESC=>escape mapping only takes place if the whole
;; last key-sequence so far is just [?\e], i.e. either we're still in
;; read-key-sequence, or the last read-key-sequence only read [?\e], which
;; should ideally never happen because it should have been mapped to [escape].
(defun viper--tty-ESC-filter (map)
(if (and (equal (this-single-command-keys) [?\e])
(sit-for (/ viper-fast-keyseq-timeout 1000)))
[escape] map))
(defun viper--lookup-key (map key)
"Kind of like `lookup-key'.
Two differences:
- KEY is a single key, not a sequence.
- the result is the \"raw\" binding, so it can be a `menu-item', rather than the
binding contained in that menu item."
(catch 'found
(map-keymap (lambda (k b) (if (equal key k) (throw 'found b))) map)))
(defun viper-catch-tty-ESC ()
"Setup key mappings of current terminal to turn a tty's ESC into `escape'."
(when (memq (terminal-live-p (frame-terminal)) '(t pc))
(let ((esc-binding (viper-uncatch-tty-ESC)))
(define-key input-decode-map
[?\e] `(menu-item "" ,esc-binding :filter viper--tty-ESC-filter)))))
(defun viper-uncatch-tty-ESC ()
"Don't hack ESC into `escape' any more."
(let ((b (viper--lookup-key input-decode-map ?\e)))
(and (eq 'menu-item (car-safe b))
(eq 'viper--tty-ESC-filter (nth 4 b))
(define-key input-decode-map [?\e] (setq b (nth 2 b))))
b))
(defun viper-setup-ESC-to-escape (enable)
(if enable
(add-hook 'tty-setup-hook 'viper-catch-tty-ESC)
(remove-hook 'tty-setup-hook 'viper-catch-tty-ESC))
(let ((seen ()))
(dolist (frame (frame-list))
(let ((terminal (frame-terminal frame)))
(unless (memq terminal seen)
(push terminal seen)
(with-selected-frame frame
(if enable (viper-catch-tty-ESC) (viper-uncatch-tty-ESC))))))))
;; This sets major mode hooks to make them come up in vi-state.
(defun viper-set-hooks ()
@ -837,6 +890,8 @@ It also can't undo some Viper settings."
(if (eq (default-value 'major-mode) 'fundamental-mode)
(setq-default major-mode 'viper-mode))
(viper-setup-ESC-to-escape t)
(add-hook 'change-major-mode-hook 'viper-major-mode-change-sentinel)
(add-hook 'find-file-hooks 'set-viper-state-in-major-mode)
@ -847,13 +902,6 @@ It also can't undo some Viper settings."
(defvar emerge-startup-hook)
(add-hook 'emerge-startup-hook 'viper-change-state-to-emacs)
;; Zap bad bindings in flyspell-mouse-map, which prevent ESC from working
;; over misspelled words (due to the overlay keymaps)
(defvar flyspell-mode-hook)
(defvar flyspell-mouse-map)
(add-hook 'flyspell-mode-hook
(lambda ()
(define-key flyspell-mouse-map viper-ESC-key nil)))
;; if viper is started from .emacs, it might be impossible to get certain
;; info about the display and windows until emacs initialization is complete
;; So do it via the window-setup-hook

View File

@ -2097,6 +2097,10 @@ the above example."
nil))))
type)
(defvar tty-setup-hook nil
"Hook run after running the initialization function of a new text terminal.
This can be used to fine tune the `input-decode-map', for example.")
(defun tty-run-terminal-initialization (frame &optional type)
"Run the special initialization code for the terminal type of FRAME.
The optional TYPE parameter may be used to override the autodetected
@ -2122,7 +2126,8 @@ terminal type to a different value."
type)
(when (fboundp term-init-func)
(funcall term-init-func))
(set-terminal-parameter frame 'terminal-initted term-init-func)))))
(set-terminal-parameter frame 'terminal-initted term-init-func)
(run-hooks 'tty-setup-hook)))))
;; Called from C function init_display to initialize faces of the
;; dumped terminal frame on startup.

324
lisp/filenotify.el Normal file
View File

@ -0,0 +1,324 @@
;;; filenotify.el --- watch files for changes on disk
;; Copyright (C) 2013 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary
;; This package is an abstraction layer from the different low-level
;; file notification packages `gfilenotify', `inotify' and
;; `w32notify'.
;;; Code:
;;;###autoload
(defconst file-notify-support
(cond
((featurep 'gfilenotify) 'gfilenotify)
((featurep 'inotify) 'inotify)
((featurep 'w32notify) 'w32notify))
"Non-nil when Emacs has been compiled with file notification support.
The value is the name of the low-level file notification package
to be used for local file systems. Remote file notifications
could use another implementation.")
(defvar file-notify-descriptors (make-hash-table :test 'equal)
"Hash table for registered file notification descriptors.
A key in this hash table is the descriptor as returned from
`gfilenotify', `inotify', `w32notify' or a file name handler.
The value in the hash table is the cons cell (DIR FILE CALLBACK).")
;; This function is used by `gfilenotify', `inotify' and `w32notify' events.
;;;###autoload
(defun file-notify-handle-event (event)
"Handle file system monitoring event.
If EVENT is a filewatch event, call its callback.
Otherwise, signal a `file-notify-error'."
(interactive "e")
(if (and (eq (car event) 'file-notify)
(>= (length event) 3))
(funcall (nth 2 event) (nth 1 event))
(signal 'file-notify-error
(cons "Not a valid file-notify event" event))))
(defvar file-notify--pending-events nil
"List of pending file notification events for a future `renamed' action.
The entries are a list (DESCRIPTOR ACTION FILE COOKIE). ACTION
is either `moved-from' or `renamed-from'.")
(defun file-notify--event-file-name (event)
"Return file name of file notification event, or nil."
(expand-file-name
(or (and (stringp (nth 2 event)) (nth 2 event)) "")
(car (gethash (car event) file-notify-descriptors))))
;; Only `gfilenotify' could return two file names.
(defun file-notify--event-file1-name (event)
"Return second file name of file notification event, or nil.
This is available in case a file has been moved."
(and (stringp (nth 3 event))
(expand-file-name
(nth 3 event) (car (gethash (car event) file-notify-descriptors)))))
;; Cookies are offered by `inotify' only.
(defun file-notify--event-cookie (event)
"Return cookie of file notification event, or nil.
This is available in case a file has been moved."
(nth 3 event))
;; The callback function used to map between specific flags of the
;; respective file notifications, and the ones we return.
(defun file-notify-callback (event)
"Handle an EVENT returned from file notification.
EVENT is the same one as in `file-notify-handle-event' except the
car of that event, which is the symbol `file-notify'."
(let* ((desc (car event))
(registered (gethash desc file-notify-descriptors))
(pending-event (assoc desc file-notify--pending-events))
(actions (nth 1 event))
(file (file-notify--event-file-name event))
file1 cookie callback)
;; Make actions a list.
(unless (consp actions) (setq actions (cons actions nil)))
;; Check, that event is meant for us.
(unless (setq callback (nth 2 registered))
(setq actions nil))
;; Loop over actions. In fact, more than one action happens only
;; for `inotify'.
(dolist (action actions)
;; Send pending event, if it doesn't match.
(when (and pending-event
;; The cookie doesn't match.
(not (eq (file-notify--event-cookie pending-event)
(file-notify--event-cookie event)))
(or
;; inotify.
(and (eq (nth 1 pending-event) 'moved-from)
(not (eq action 'moved-to)))
;; w32notify.
(and (eq (nth 1 pending-event) 'renamed-from)
(not (eq action 'renamed-to)))))
(funcall callback
(list desc 'deleted
(file-notify--event-file-name pending-event)))
(setq file-notify--pending-events
(delete pending-event file-notify--pending-events)))
;; Map action. We ignore all events which cannot be mapped.
(setq action
(cond
;; gfilenotify.
((memq action '(attribute-changed changed created deleted)) action)
((eq action 'moved)
(setq file1 (file-notify--event-file1-name event))
'renamed)
;; inotify.
((eq action 'attrib) 'attribute-changed)
((eq action 'create) 'created)
((eq action 'modify) 'changed)
((memq action '(delete 'delete-self move-self)) 'deleted)
;; Make the event pending.
((eq action 'moved-from)
(add-to-list 'file-notify--pending-events
(list desc action file
(file-notify--event-cookie event)))
nil)
;; Look for pending event.
((eq action 'moved-to)
(if (null pending-event)
'created
(setq file1 file
file (file-notify--event-file-name pending-event)
file-notify--pending-events
(delete pending-event file-notify--pending-events))
'renamed))
;; w32notify.
((eq action 'added) 'created)
((eq action 'modified) 'changed)
((eq action 'removed) 'deleted)
;; Make the event pending.
((eq 'renamed-from action)
(add-to-list 'file-notify--pending-events
(list desc action file
(file-notify--event-cookie event)))
nil)
;; Look for pending event.
((eq 'renamed-to action)
(if (null pending-event)
'created
(setq file1 file
file (file-notify--event-file-name pending-event)
file-notify--pending-events
(delete pending-event file-notify--pending-events))
'renamed))))
;; Apply callback.
(when (and action
(or
;; If there is no relative file name for that watch,
;; we watch the whole directory.
(null (nth 1 registered))
;; File matches.
(string-equal
(nth 1 registered) (file-name-nondirectory file))
;; File1 matches.
(and (stringp file1)
(string-equal
(nth 1 registered) (file-name-nondirectory file1)))))
(if file1
(funcall callback (list desc action file file1))
(funcall callback (list desc action file)))))))
(defun file-notify-add-watch (file flags callback)
"Add a watch for filesystem events pertaining to FILE.
This arranges for filesystem events pertaining to FILE to be reported
to Emacs. Use `file-notify-rm-watch' to cancel the watch.
The returned value is a descriptor for the added watch. If the
file cannot be watched for some reason, this function signals a
`file-notify-error' error.
FLAGS is a list of conditions to set what will be watched for. It can
include the following symbols:
`change' -- watch for file changes
`attribute-change' -- watch for file attributes changes, like
permissions or modification time
If FILE is a directory, 'change' watches for file creation or
deletion in that directory.
When any event happens, Emacs will call the CALLBACK function passing
it a single argument EVENT, which is of the form
(DESCRIPTOR ACTION FILE [FILE1])
DESCRIPTOR is the same object as the one returned by this function.
ACTION is the description of the event. It could be any one of the
following:
`created' -- FILE was created
`deleted' -- FILE was deleted
`changed' -- FILE has changed
`renamed' -- FILE has been renamed to FILE1
`attribute-changed' -- a FILE attribute was changed
FILE is the name of the file whose event is being reported."
;; Check arguments.
(unless (stringp file)
(signal 'wrong-type-argument (list file)))
(setq file (expand-file-name file))
(unless (and (consp flags)
(null (delq 'change (delq 'attribute-change (copy-tree flags)))))
(signal 'wrong-type-argument (list flags)))
(unless (functionp callback)
(signal 'wrong-type-argument (list callback)))
(let* ((handler (find-file-name-handler file 'file-notify-add-watch))
(dir (directory-file-name
(if (or (and (not handler) (eq file-notify-support 'w32notify))
(file-directory-p file))
file
(file-name-directory file))))
desc func l-flags)
;; Check, whether this has been registered already.
; (maphash
; (lambda (key value)
; (when (equal (cons file callback) value) (setq desc key)))
; file-notify-descriptors)
(unless desc
(if handler
;; A file name handler could exist even if there is no local
;; file notification support.
(setq desc (funcall
handler 'file-notify-add-watch dir flags callback))
;; Check, whether Emacs has been compiled with file
;; notification support.
(unless file-notify-support
(signal 'file-notify-error
'("No file notification package available")))
;; Determine low-level function to be called.
(setq func (cond
((eq file-notify-support 'gfilenotify) 'gfile-add-watch)
((eq file-notify-support 'inotify) 'inotify-add-watch)
((eq file-notify-support 'w32notify) 'w32notify-add-watch)))
;; Determine respective flags.
(if (eq file-notify-support 'gfilenotify)
(setq l-flags '(watch-mounts send-moved))
(when (memq 'change flags)
(setq
l-flags
(cond
((eq file-notify-support 'inotify) '(create modify move delete))
((eq file-notify-support 'w32notify)
'(file-name directory-name size last-write-time)))))
(when (memq 'attribute-change flags)
(add-to-list
'l-flags
(cond
((eq file-notify-support 'inotify) 'attrib)
((eq file-notify-support 'w32notify) 'attributes)))))
;; Call low-level function.
(setq desc (funcall func dir l-flags 'file-notify-callback))))
;; Return descriptor.
(puthash desc
(list (directory-file-name
(if (file-directory-p dir) dir (file-name-directory dir)))
(unless (file-directory-p file)
(file-name-nondirectory file))
callback)
file-notify-descriptors)
desc))
(defun file-notify-rm-watch (descriptor)
"Remove an existing watch specified by its DESCRIPTOR.
DESCRIPTOR should be an object returned by `file-notify-add-watch'."
(let ((file (car (gethash descriptor file-notify-descriptors)))
handler)
(when (stringp file)
(setq handler (find-file-name-handler file 'file-notify-rm-watch))
(if handler
(funcall handler 'file-notify-rm-watch descriptor)
(funcall
(cond
((eq file-notify-support 'gfilenotify) 'gfile-rm-watch)
((eq file-notify-support 'inotify) 'inotify-rm-watch)
((eq file-notify-support 'w32notify) 'w32notify-rm-watch))
descriptor)))
(remhash descriptor file-notify-descriptors)))
;; The end:
(provide 'filenotify)
;;; filenotify.el ends here

View File

@ -316,6 +316,7 @@ A value of nil means don't add newlines.
Certain major modes set this locally to the value obtained
from `mode-require-final-newline'."
:safe #'symbolp
:type '(choice (const :tag "When visiting" visit)
(const :tag "When saving" t)
(const :tag "When visiting or saving" visit-save)
@ -3878,6 +3879,10 @@ Interactively, confirmation is required unless you supply a prefix argument."
(or buffer-file-name (buffer-name))))))
(and confirm
(file-exists-p filename)
;; NS does its own confirm dialog.
(not (and (eq (framep-on-display) 'ns)
(listp last-nonmenu-event)
use-dialog-box))
(or (y-or-n-p (format "File `%s' exists; overwrite? " filename))
(error "Canceled")))
(set-visited-file-name filename (not confirm))))
@ -4912,6 +4917,11 @@ change the additional actions you can take on files."
(length autosaved-buffers)
(mapconcat 'identity autosaved-buffers ", "))))))))
(defun clear-visited-file-modtime ()
"Clear out records of last mod time of visited file.
Next attempt to save will certainly not complain of a discrepancy."
(set-visited-file-modtime 0))
(defun not-modified (&optional arg)
"Mark current buffer as unmodified, not needing to be saved.
With prefix ARG, mark buffer as modified, so \\[save-buffer] will save.

View File

@ -149,7 +149,7 @@ is loaded before custom.el, set this variable to t.")
(defun filesets-filter-list (lst cond-fn)
"Remove all elements not conforming to COND-FN from list LST.
COND-FN takes one argument: the current element."
; (remove* 'dummy lst :test (lambda (dummy elt)
; (cl-remove 'dummy lst :test (lambda (dummy elt)
; (not (funcall cond-fn elt)))))
(let ((rv nil))
(dolist (elt lst rv)
@ -175,7 +175,7 @@ Like `some', return the first value of FSS-PRED that is non-nil."
(let ((fss-rv (funcall fss-pred fss-this)))
(when fss-rv
(throw 'exit fss-rv))))))
;(fset 'filesets-some 'some) ;; or use the cl function
;(fset 'filesets-some 'cl-some) ;; or use the cl function
(defun filesets-member (fsm-item fsm-lst &rest fsm-keys)
"Find the first occurrence of FSM-ITEM in FSM-LST.
@ -186,7 +186,7 @@ key is supported."
(filesets-ormap (lambda (fsm-this)
(funcall fsm-test fsm-item fsm-this))
fsm-lst)))
;(fset 'filesets-member 'member*) ;; or use the cl function
;(fset 'filesets-member 'cl-member) ;; or use the cl function
(defun filesets-sublist (lst beg &optional end)
"Get the sublist of LST from BEG to END - 1."

View File

@ -1365,7 +1365,11 @@ frame's display)."
(defun display-pixel-height (&optional display)
"Return the height of DISPLAY's screen in pixels.
For character terminals, each character counts as a single pixel."
For character terminals, each character counts as a single pixel.
For graphical terminals, note that on \"multi-monitor\" setups this
refers to the pixel height for all physical monitors associated
with DISPLAY. To get information for each physical monitor, use
`display-monitor-attributes-list'."
(let ((frame-type (framep-on-display display)))
(cond
((memq frame-type '(x w32 ns))
@ -1377,7 +1381,11 @@ For character terminals, each character counts as a single pixel."
(defun display-pixel-width (&optional display)
"Return the width of DISPLAY's screen in pixels.
For character terminals, each character counts as a single pixel."
For character terminals, each character counts as a single pixel.
For graphical terminals, note that on \"multi-monitor\" setups this
refers to the pixel width for all physical monitors associated
with DISPLAY. To get information for each physical monitor, use
`display-monitor-attributes-list'."
(let ((frame-type (framep-on-display display)))
(cond
((memq frame-type '(x w32 ns))
@ -1408,7 +1416,11 @@ displays not explicitly specified."
(defun display-mm-height (&optional display)
"Return the height of DISPLAY's screen in millimeters.
System values can be overridden by `display-mm-dimensions-alist'.
If the information is unavailable, value is nil."
If the information is unavailable, value is nil.
For graphical terminals, note that on \"multi-monitor\" setups this
refers to the height in millimeters for all physical monitors
associated with DISPLAY. To get information for each physical
monitor, use `display-monitor-attributes-list'."
(and (memq (framep-on-display display) '(x w32 ns))
(or (cddr (assoc (or display (frame-parameter nil 'display))
display-mm-dimensions-alist))
@ -1420,7 +1432,11 @@ If the information is unavailable, value is nil."
(defun display-mm-width (&optional display)
"Return the width of DISPLAY's screen in millimeters.
System values can be overridden by `display-mm-dimensions-alist'.
If the information is unavailable, value is nil."
If the information is unavailable, value is nil.
For graphical terminals, note that on \"multi-monitor\" setups this
refers to the width in millimeters for all physical monitors
associated with DISPLAY. To get information for each physical
monitor, use `display-monitor-attributes-list'."
(and (memq (framep-on-display display) '(x w32 ns))
(or (cadr (assoc (or display (frame-parameter nil 'display))
display-mm-dimensions-alist))
@ -1495,6 +1511,8 @@ The value is one of the symbols `static-gray', `gray-scale',
(declare-function x-display-monitor-attributes-list "xfns.c"
(&optional terminal))
(declare-function w32-display-monitor-attributes-list "w32fns.c"
(&optional display))
(declare-function ns-display-monitor-attributes-list "nsfns.m"
(&optional terminal))
@ -1530,6 +1548,8 @@ monitors."
(cond
((eq frame-type 'x)
(x-display-monitor-attributes-list display))
((eq frame-type 'w32)
(w32-display-monitor-attributes-list display))
((eq frame-type 'ns)
(ns-display-monitor-attributes-list display))
(t

View File

@ -1,3 +1,58 @@
2013-07-10 David Engster <deng@randomsample.de>
* gnus-start.el (gnus-clean-old-newsrc): Always remove 'unexist' marks
if `gnus-newsrc-file-version' does not match `gnus-version'. This
fixes a bug in Emacs trunk where the 'unexist' marks were always
removed at startup because "Gnus v5.13" was considered smaller than "Ma
Gnus v0.03".
2013-07-10 Tassilo Horn <tsdh@gnu.org>
* gnus.el (gnus-summary-line-format): Reference
`gnus-user-date-format-alist' for the &user-date; format, not
`gnus-summary-user-date-format-alist'.
2013-07-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
* nnml.el (nnml-request-compact-group): Don't bug out if we can't
delete files (bug#13481).
2013-07-08 Tassilo Horn <tsdh@gnu.org>
* gnus-registry.el (gnus-registry-remove-extra-data): New function.
2013-07-06 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-art.el (gnus-block-private-groups): Allow `global' methods to
display images.
* gnus.el (gnus-valid-select-methods): Mark nnrss as global.
* message.el (message-cancel-news): According to
<mailman.216.1372942181.12400.help-gnu-emacs@gnu.org>, "cancel" is
preferred over "cmsg cancel" in the Subject.
* nnir.el (nnir-engines): Note that the group specs are regexps
(bug#13238).
* gnus-msg.el (gnus-copy-article-buffer): If the article buffer has
gotten read-only text properties, ensure that those aren't heeded when
copying stuff over (bug#13434).
* mm-view.el (mm-inline-text-html): Don't bug out on multipart messages
(bug#13762).
2013-07-05 David Kastrup <dak@gnu.org>
* auth-source.el (auth-source-netrc-parse-one): Allow empty strings in
authinfo file again (important for blank passwords). This had been
broken with 2013-06-15 change.
2013-07-03 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-sum.el (gnus-summary-from-or-to-or-newsgroups):
Revert 2013-01-14 change.
2013-07-02 David Engster <deng@randomsample.de>
* gnus-sum.el (gnus-update-marks): Do not remove empty 'unexist'
@ -88,7 +143,7 @@
2013-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-sum.el (gnus-summary-insert-old-articles):
Don't include unexistent messages.
Don't include unexisting messages.
2013-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>

View File

@ -1048,8 +1048,8 @@ Note that the MAX parameter is used so we can exit the parse early."
"Read one thing from the current buffer."
(auth-source-netrc-parse-next-interesting)
(when (or (looking-at "'\\([^']+\\)'")
(looking-at "\"\\([^\"]+\\)\"")
(when (or (looking-at "'\\([^']*\\)'")
(looking-at "\"\\([^\"]*\\)\"")
(looking-at "\\([^ \t\n]+\\)"))
(forward-char (length (match-string 0)))
(auth-source-netrc-parse-next-interesting)

View File

@ -6947,7 +6947,8 @@ If given a prefix, show the hidden text instead."
(set-buffer buf))))))
(defun gnus-block-private-groups (group)
(if (gnus-news-group-p group)
(if (or (gnus-news-group-p group)
(gnus-member-of-valid 'global group))
;; Block nothing in news groups.
nil
;; Block everything anywhere else.

View File

@ -920,6 +920,7 @@ header line with the old Message-ID."
(with-current-buffer article-buffer
(let ((gnus-newsgroup-charset (or gnus-article-charset
gnus-newsgroup-charset))
(inhibit-read-only t)
(gnus-newsgroup-ignored-charsets
(or gnus-article-ignored-charsets
gnus-newsgroup-ignored-charsets)))

View File

@ -1186,6 +1186,29 @@ data stored in the registry."
(gnus-select-group-with-message-id group message-id) t)
(throw 'found t))))))))
(defun gnus-registry-remove-extra-data (extra)
"Remove tracked EXTRA data from the gnus registry.
EXTRA is a list of symbols. Valid symbols are those contained in
the docs of `gnus-registry-track-extra'. This command is useful
when you stop tracking some extra data and now want to purge it
from your existing entries."
(interactive (list (mapcar 'intern
(completing-read-multiple
"Extra data: "
'("subject" "sender" "recipient")))))
(when extra
(let ((db gnus-registry-db))
(registry-reindex db)
(loop for k being the hash-keys of (oref db :data)
using (hash-value v)
do (let ((newv (delq nil (mapcar #'(lambda (entry)
(unless (member (car entry) extra)
entry))
v))))
(registry-delete db (list k) nil)
(gnus-registry-insert db k newv)))
(registry-reindex db))))
;; TODO: a few things
(provide 'gnus-registry)

View File

@ -2314,8 +2314,9 @@ If FORCE is non-nil, the .newsrc file is read."
(gnus-info-set-marks
info (delete exist (gnus-info-marks info))))))
(when (or force
(< (gnus-continuum-version gnus-newsrc-file-version)
(gnus-continuum-version "Ma Gnus v0.03")))
(not (string= gnus-newsrc-file-version gnus-version)))
(message (concat "Removing unexist marks because newsrc "
"version does not match Gnus version."))
;; Remove old `exist' marks from old nnimap groups.
(dolist (info (cdr gnus-newsrc-alist))
(let ((exist (assoc 'unexist (gnus-info-marks info))))

View File

@ -1525,7 +1525,7 @@ This list will always be a subset of gnus-newsgroup-undownloaded.")
"Range of seen articles in the current newsgroup.")
(defvar gnus-newsgroup-unexist nil
"Range of unexistent articles in the current newsgroup.")
"Range of unexisting articles in the current newsgroup.")
(defvar gnus-newsgroup-articles nil
"List of articles in the current newsgroup.")
@ -3657,18 +3657,17 @@ buffer that was in action when the last article was fetched."
(or (car (funcall gnus-extract-address-components from))
from))
(defun gnus-summary-from-or-to-or-newsgroups (header from)
(defun gnus-summary-from-or-to-or-newsgroups (header gnus-tmp-from)
(let ((mail-parse-charset gnus-newsgroup-charset)
(ignored-from-addresses (gnus-ignored-from-addresses))
;; Is it really necessary to do this next part for each summary line?
;; Luckily, doesn't seem to slow things down much.
(mail-parse-ignored-charsets
(with-current-buffer gnus-summary-buffer
gnus-newsgroup-ignored-charsets))
(address (cadr (gnus-extract-address-components from))))
(ignored-from-addresses (gnus-ignored-from-addresses))
;; Is it really necessary to do this next part for each summary line?
;; Luckily, doesn't seem to slow things down much.
(mail-parse-ignored-charsets
(with-current-buffer gnus-summary-buffer
gnus-newsgroup-ignored-charsets)))
(or
(and ignored-from-addresses
(string-match ignored-from-addresses address)
(string-match ignored-from-addresses gnus-tmp-from)
(let ((extra-headers (mail-header-extra header))
to
newsgroups)
@ -3683,11 +3682,13 @@ buffer that was in action when the last article was fetched."
(cdr (assq 'Newsgroups extra-headers))
(and
(memq 'Newsgroups gnus-extra-headers)
(eq (car (gnus-find-method-for-group
gnus-newsgroup-name)) 'nntp)
(eq (car (gnus-find-method-for-group
gnus-newsgroup-name)) 'nntp)
(gnus-group-real-name gnus-newsgroup-name))))
(concat gnus-summary-newsgroup-prefix newsgroups)))))
(gnus-string-mark-left-to-right (gnus-summary-extract-address-component from)))))
(gnus-string-mark-left-to-right
(inline
(gnus-summary-extract-address-component gnus-tmp-from))))))
(defun gnus-summary-insert-line (gnus-tmp-header
gnus-tmp-level gnus-tmp-current

View File

@ -1628,7 +1628,7 @@ slower."
("nnfolder" mail respool address)
("nngateway" post-mail address prompt-address physical-address)
("nnweb" none)
("nnrss" none)
("nnrss" none global)
("nnagent" post-mail)
("nnimap" post-mail address prompt-address physical-address respool
server-marks)
@ -3007,7 +3007,7 @@ with some simple extensions.
summary just like information from any other summary
specifier.
&user-date; Age sensitive date format. Various date format is
defined in `gnus-summary-user-date-format-alist'.
defined in `gnus-user-date-format-alist'.
The %U (status), %R (replied) and %z (zcore) specs have to be handled

View File

@ -7145,7 +7145,7 @@ If ARG, allow editing of the cancellation message."
(erase-buffer)
(insert "Newsgroups: " newsgroups "\n"
"From: " from "\n"
"Subject: cmsg cancel " message-id "\n"
"Subject: cancel " message-id "\n"
"Control: cancel " message-id "\n"
(if distribution
(concat "Distribution: " distribution "\n")

View File

@ -419,16 +419,18 @@
(buffer-string)))))
(defun mm-inline-text-html (handle)
(let* ((func mm-text-html-renderer)
(entry (assq func mm-text-html-renderer-alist))
(inhibit-read-only t))
(if entry
(setq func (cdr entry)))
(cond
((functionp func)
(funcall func handle))
(t
(apply (car func) handle (cdr func))))))
(if (stringp (car handle))
(mapcar 'mm-inline-text-html (cdr handle))
(let* ((func mm-text-html-renderer)
(entry (assq func mm-text-html-renderer-alist))
(inhibit-read-only t))
(if entry
(setq func (cdr entry)))
(cond
((functionp func)
(funcall func handle))
(t
(apply (car func) handle (cdr func)))))))
(defun mm-inline-text-vcard (handle)
(let ((inhibit-read-only t))

View File

@ -548,15 +548,15 @@ that it is for notmuch, not Namazu."
(gmane nnir-run-gmane
((gmane-author . "Gmane Author: ")))
(swish++ nnir-run-swish++
((swish++-group . "Swish++ Group spec: ")))
((swish++-group . "Swish++ Group spec (regexp): ")))
(swish-e nnir-run-swish-e
((swish-e-group . "Swish-e Group spec: ")))
((swish-e-group . "Swish-e Group spec (regexp): ")))
(namazu nnir-run-namazu
())
(notmuch nnir-run-notmuch
())
(hyrex nnir-run-hyrex
((hyrex-group . "Hyrex Group spec: ")))
((hyrex-group . "Hyrex Group spec (regexp): ")))
(find-grep nnir-run-find-grep
((grep-options . "Grep options: "))))
"Alist of supported search engines.

View File

@ -1094,7 +1094,10 @@ Use the nov database for the current group if available."
(concat group ":" new-number-string)))
;; Save to the new file:
(nnmail-write-region (point-min) (point-max) newfile))
(funcall nnmail-delete-file-function oldfile))
(condition-case ()
(funcall nnmail-delete-file-function oldfile)
(file-error
(message "Couldn't delete %s" oldfile))))
;; 2/ Update all marks for this article:
;; #### NOTE: it is possible that the new article number
;; #### already belongs to a range, whereas the corresponding

View File

@ -462,6 +462,7 @@ directory, like `default-directory'."
(define-key map (kbd "M-g") 'ibuffer-jump-to-buffer)
(define-key map (kbd "M-s a C-s") 'ibuffer-do-isearch)
(define-key map (kbd "M-s a M-C-s") 'ibuffer-do-isearch-regexp)
(define-key map (kbd "M-s a C-o") 'ibuffer-do-occur)
(define-key map (kbd "DEL") 'ibuffer-unmark-backward)
(define-key map (kbd "M-DEL") 'ibuffer-unmark-all)
(define-key map (kbd "* *") 'ibuffer-unmark-all)

View File

@ -782,21 +782,29 @@ remaining completion. If absent, elements 5 and 6 are used instead."
:group 'ido)
(defcustom ido-use-virtual-buffers nil
"If non-nil, refer to past buffers as well as existing ones.
"Specify how virtual buffers should be used.
The value can be one of the following:
nil: No virtual buffers are used.
auto: Use virtual bufferw when the current input matches no
existing buffers.
t: Always use virtual buffers.
Essentially it works as follows: Say you are visiting a file and
the buffer gets cleaned up by midnight.el. Later, you want to
switch to that buffer, but find it's no longer open. With
virtual buffers enabled, the buffer name stays in the buffer
list (using the `ido-virtual' face, and always at the end), and if
you select it, it opens the file back up again. This allows you
to think less about whether recently opened files are still open
or not. Most of the time you can quit Emacs, restart, and then
switch to a file buffer that was previously open as if it still
were.
This feature relies upon the `recentf' package, which will be
enabled if this variable is configured to a non-nil value."
:version "24.1"
:type 'boolean
switch to that buffer, but find it's no longer open. With virtual
buffers enabled, the buffer name stays in the buffer list (using
the `ido-virtual' face, and always at the end), and if you select
it, it opens the file back up again. This allows you to think
less about whether recently opened files are still open or not.
Most of the time you can quit Emacs, restart, and then switch to
a file buffer that was previously open as if it still were. This
feature relies upon the `recentf' package, which will be enabled
if this variable is configured to a non-nil value."
:version "24.4"
:type '(choice (const :tag "Always" t)
(const :tag "Automatic" auto)
(const :tag "Never" nil))
:group 'ido)
(defcustom ido-use-faces t
@ -1103,6 +1111,9 @@ Only used if `ido-use-virtual-buffers' is non-nil.")
;; Don't process ido-ignore- lists once.
(defvar ido-process-ignore-lists-inhibit)
;; Is ido using virtual buffers?
(defvar ido-enable-virtual-buffers)
;; Buffer from which ido was entered.
(defvar ido-entry-buffer)
@ -2202,7 +2213,8 @@ If cursor is not at the end of the user input, move to end of input."
(ido-current-directory nil)
(ido-directory-nonreadable nil)
(ido-directory-too-big nil)
(ido-use-virtual-buffers ido-use-virtual-buffers)
(ido-enable-virtual-buffers (and ido-use-virtual-buffers
(not (eq ido-use-virtual-buffers 'auto))))
(require-match (confirm-nonexistent-file-or-buffer))
(buf (ido-read-internal 'buffer (or prompt "Buffer: ") 'ido-buffer-history default
require-match initial))
@ -2243,7 +2255,8 @@ If cursor is not at the end of the user input, move to end of input."
(ido-visit-buffer buf method t)))
;; check for a virtual buffer reference
((and ido-use-virtual-buffers ido-virtual-buffers
((and ido-enable-virtual-buffers
ido-virtual-buffers
(setq filename (assoc buf ido-virtual-buffers)))
(ido-visit-buffer (find-file-noselect (cdr filename)) method t))
@ -2734,7 +2747,11 @@ C-x C-f ... C-d enter `dired' on current directory."
See `ido-use-virtual-buffers' for explanation of virtual buffer."
(interactive)
(when (and ido-mode (eq ido-cur-item 'buffer))
(setq ido-use-virtual-buffers (not ido-use-virtual-buffers))
(setq ido-enable-virtual-buffers
(if ido-enable-virtual-buffers
nil
;; Use `always' instead of t for `ido-exhibit'.
'always))
(setq ido-text-init ido-text)
(setq ido-exit 'refresh)
(exit-minibuffer)))
@ -3427,9 +3444,9 @@ it is put to the start of the list."
(nconc ido-temp-list ido-current-buffers)
(setq ido-temp-list ido-current-buffers))
(if default
(setq ido-temp-list
(cons default (delete default ido-temp-list))))
(if ido-use-virtual-buffers
(setq ido-temp-list
(cons default (delete default ido-temp-list))))
(if (bound-and-true-p ido-enable-virtual-buffers)
(ido-add-virtual-buffers-to-list))
(run-hooks 'ido-make-buffer-list-hook)
ido-temp-list))
@ -3444,8 +3461,14 @@ This is to make them appear as if they were \"virtual buffers\"."
(setq ido-virtual-buffers nil)
(let (name)
(dolist (head recentf-list)
(and (setq name (file-name-nondirectory head))
(null (get-file-buffer head))
(setq name (file-name-nondirectory head))
;; In case HEAD is a directory with trailing /. See bug#14552.
(when (equal name "")
(setq name (file-name-nondirectory (directory-file-name head))))
(when (equal name "")
(setq name head))
(and (not (equal name ""))
(null (get-file-buffer head))
(not (assoc name ido-virtual-buffers))
(not (member name ido-temp-list))
(not (ido-ignore-item-p name ido-ignore-buffers))
@ -3986,6 +4009,7 @@ If cursor is not at the end of the user input, delete to end of input."
;;; DELETE CURRENT FILE
(defun ido-delete-file-at-head ()
"Delete the file at the head of `ido-matches'.
Trash the file if `delete-by-moving-to-trash' is non-nil.
If cursor is not at the end of the user input, delete to end of input."
(interactive)
(if (not (eobp))
@ -3998,8 +4022,9 @@ If cursor is not at the end of the user input, delete to end of input."
(file-exists-p file)
(not (file-directory-p file))
(file-writable-p ido-current-directory)
(yes-or-no-p (concat "Delete " file "? ")))
(delete-file file)
(or delete-by-moving-to-trash
(yes-or-no-p (concat "Delete " file "? "))))
(delete-file file 'trash)
;; Check if file still exists.
(if (file-exists-p file)
;; file could not be deleted
@ -4457,11 +4482,6 @@ For details of keybindings, see `ido-find-file'."
(setq ido-exit 'refresh)
(exit-minibuffer))
;; Update the list of matches
(setq ido-text contents)
(ido-set-matches)
(ido-trace "new " ido-matches)
(when (and ido-enter-matching-directory
ido-matches
(or (eq ido-enter-matching-directory 'first)
@ -4475,6 +4495,32 @@ For details of keybindings, see `ido-find-file'."
(setq ido-exit 'refresh)
(exit-minibuffer))
;; Update the list of matches
(setq ido-text contents)
(ido-set-matches)
(ido-trace "new " ido-matches)
(when (and (boundp 'ido-enable-virtual-buffers)
(not (eq ido-enable-virtual-buffers 'always))
(eq ido-cur-item 'buffer)
(eq ido-use-virtual-buffers 'auto))
(when (and (not ido-enable-virtual-buffers)
(not ido-matches))
(setq ido-text-init ido-text)
(setq ido-enable-virtual-buffers t)
(setq ido-exit 'refresh)
(exit-minibuffer))
;; If input matches real buffers turn off virtual buffers.
(when (and ido-enable-virtual-buffers
ido-matches
(ido-set-matches-1 (ido-make-buffer-list-1)))
(setq ido-enable-virtual-buffers nil)
(setq ido-text-init ido-text)
(setq ido-exit 'refresh)
(exit-minibuffer)))
(when (and (not ido-matches)
(not ido-directory-nonreadable)
(not ido-directory-too-big)
@ -4681,9 +4727,12 @@ Modified from `icomplete-completions'."
;;; Helper functions for other programs
(put 'dired-do-rename 'ido 'ignore)
(put 'ibuffer-find-file 'ido 'find-file)
(put 'dired 'ido 'dir)
(put 'dired-other-window 'ido 'dir)
;; See http://debbugs.gnu.org/11954 for reasons.
(put 'dired-do-copy 'ido 'ignore)
(put 'dired-do-rename 'ido 'ignore)
;;;###autoload
(defun ido-read-buffer (prompt &optional default require-match)
@ -4711,18 +4760,20 @@ See `read-file-name' for additional parameters."
(let (filename)
(cond
((or (eq predicate 'file-directory-p)
(eq (get this-command 'ido) 'dir)
(eq (and (symbolp this-command)
(get this-command 'ido)) 'dir)
(memq this-command ido-read-file-name-as-directory-commands))
(setq filename
(ido-read-directory-name prompt dir default-filename mustmatch initial))
(if (eq ido-exit 'fallback)
(setq filename 'fallback)))
((and (not (eq (get this-command 'ido) 'ignore))
(ido-read-directory-name prompt dir default-filename mustmatch initial)))
((and (not (eq (and (symbolp this-command)
(get this-command 'ido)) 'ignore))
(not (memq this-command ido-read-file-name-non-ido))
(or (null predicate) (eq predicate 'file-exists-p)))
(let* (ido-saved-vc-hb
(ido-context-switch-command
(if (eq (get this-command 'ido) 'find-file) nil 'ignore))
(if (eq (and (symbolp this-command)
(get this-command 'ido)) 'find-file)
nil 'ignore))
(vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends))
(minibuffer-completing-file-name t)
(ido-current-directory (ido-expand-directory dir))
@ -4736,7 +4787,15 @@ See `read-file-name' for additional parameters."
(ido-find-literal nil))
(setq ido-exit nil)
(setq filename
(ido-read-internal 'file prompt 'ido-file-history default-filename mustmatch initial))
(ido-read-internal 'file prompt 'ido-file-history
(cond ; Bug#11861.
((stringp default-filename) default-filename)
((consp default-filename) (car default-filename))
((and (not default-filename) initial)
(expand-file-name initial dir))
(buffer-file-name buffer-file-name))
mustmatch initial))
(setq dir ido-current-directory) ; See bug#1516.
(cond
((eq ido-exit 'fallback)
(setq filename 'fallback))
@ -4768,12 +4827,21 @@ See `read-directory-name' for additional parameters."
(ido-directory-too-big-p ido-current-directory)))
(ido-work-directory-index -1)
(ido-work-file-index -1))
(setq filename
(ido-read-internal 'dir prompt 'ido-file-history default-dirname mustmatch initial))
(if filename
(if (and (stringp filename) (string-equal filename "."))
ido-current-directory
(concat ido-current-directory filename)))))
(setq filename (ido-read-internal
'dir prompt 'ido-file-history
(or default-dirname ; Bug#11861.
(if initial
(expand-file-name initial ido-current-directory)
ido-current-directory))
mustmatch initial))
(cond
((eq ido-exit 'fallback)
(let ((read-file-name-function nil))
(run-hook-with-args 'ido-before-fallback-functions 'read-directory-name)
(read-directory-name prompt ido-current-directory
default-dirname mustmatch initial)))
((equal filename ".") ido-current-directory)
(t (concat ido-current-directory filename)))))
;;;###autoload
(defun ido-completing-read (prompt choices &optional _predicate require-match

View File

@ -45,7 +45,25 @@
;;; Code:
(require 'info)
(eval-when-compile (require 'cl-lib)) ;; for `incf'
(eval-when-compile (require 'cl-lib)) ; for `cl-incf'
(defgroup info-xref nil
"Check external cross-references in Info documents."
:group 'docs) ; FIXME right parent?
;; Should this even be an option?
(defcustom info-xref-case-fold nil
"Non-nil means node checks should ignore case.
When following cross-references, the Emacs Info reader first tries a
case-sensitive match, then if that fails a case-insensitive one.
The standalone Info reader does not do this, nor does this work
for links in the html versions of Texinfo manuals. Therefore
to ensure your cross-references work on the widest range of platforms,
you should set this variable to nil."
:group 'info-xref
:type 'boolean
:version "24.4")
;;-----------------------------------------------------------------------------
;; vaguely generic
@ -204,7 +222,8 @@ buffer's line and column of point."
(Info-goto-node node
(when (get-buffer "*info*")
(set-buffer "*info*")
"xref - temporary"))
"xref - temporary")
(not info-xref-case-fold))
t)
(error nil))
(unless (equal (current-buffer) oldbuf)

View File

@ -920,10 +920,14 @@ just return nil (no error)."
(error "Info file %s does not exist" filename)))
filename))))
(defun Info-find-node (filename nodename &optional no-going-back)
(defun Info-find-node (filename nodename &optional no-going-back strict-case)
"Go to an Info node specified as separate FILENAME and NODENAME.
NO-GOING-BACK is non-nil if recovering from an error in this function;
it says do not attempt further (recursive) error recovery."
it says do not attempt further (recursive) error recovery.
This function first looks for a case-sensitive match for NODENAME;
if none is found it then tries a case-insensitive match (unless
STRICT-CASE is non-nil)."
(info-initialize)
(setq filename (Info-find-file filename))
;; Go into Info buffer.
@ -933,7 +937,7 @@ it says do not attempt further (recursive) error recovery."
Info-current-file
(push (list Info-current-file Info-current-node (point))
Info-history))
(Info-find-node-2 filename nodename no-going-back))
(Info-find-node-2 filename nodename no-going-back strict-case))
;;;###autoload
(defun Info-on-current-buffer (&optional nodename)
@ -1010,7 +1014,7 @@ which the match was found."
(+ (point-min) (read (current-buffer)))
major-mode)))))
(defun Info-find-in-tag-table (marker regexp)
(defun Info-find-in-tag-table (marker regexp &optional strict-case)
"Find a node in a tag table.
MARKER specifies the buffer and position to start searching at.
REGEXP is a regular expression matching nodes or references. Its first
@ -1020,10 +1024,11 @@ FOUND-ANCHOR is non-nil if a `Ref:' was matched, POS is the position
where the match was found, and MODE is `major-mode' of the buffer in
which the match was found.
This function tries to find a case-sensitive match first, then a
case-insensitive match is tried."
case-insensitive match is tried (unless optional argument STRICT-CASE
is non-nil)."
(let ((result (Info-find-in-tag-table-1 marker regexp nil)))
(when (null (car result))
(setq result (Info-find-in-tag-table-1 marker regexp t)))
(or strict-case (car result)
(setq result (Info-find-in-tag-table-1 marker regexp t)))
result))
(defun Info-find-node-in-buffer-1 (regexp case-fold)
@ -1046,17 +1051,19 @@ Value is the position at which a match was found, or nil if not found."
(setq found (line-beginning-position)))))))
found))
(defun Info-find-node-in-buffer (regexp)
(defun Info-find-node-in-buffer (regexp &optional strict-case)
"Find a node or anchor in the current buffer.
REGEXP is a regular expression matching nodes or references. Its first
group should match `Node:' or `Ref:'.
Value is the position at which a match was found, or nil if not found.
This function looks for a case-sensitive match first. If none is found,
a case-insensitive match is tried."
a case-insensitive match is tried (unless optional argument STRICT-CASE
is non-nil)."
(or (Info-find-node-in-buffer-1 regexp nil)
(Info-find-node-in-buffer-1 regexp t)))
(and (not strict-case)
(Info-find-node-in-buffer-1 regexp t))))
(defun Info-find-node-2 (filename nodename &optional no-going-back)
(defun Info-find-node-2 (filename nodename &optional no-going-back strict-case)
(buffer-disable-undo (current-buffer))
(or (eq major-mode 'Info-mode)
(Info-mode))
@ -1167,7 +1174,7 @@ a case-insensitive match is tried."
;; First, search a tag table, if any
(when (marker-position Info-tag-table-marker)
(let* ((m Info-tag-table-marker)
(found (Info-find-in-tag-table m regexp)))
(found (Info-find-in-tag-table m regexp strict-case)))
(when found
;; FOUND is (ANCHOR POS MODE).
@ -1194,7 +1201,7 @@ a case-insensitive match is tried."
;; buffer) to find the actual node. First, check
;; whether the node is right where we are, in case the
;; buffer begins with a node.
(let ((pos (Info-find-node-in-buffer regexp)))
(let ((pos (Info-find-node-in-buffer regexp strict-case)))
(when pos
(goto-char pos)
(throw 'foo t)))
@ -1701,7 +1708,7 @@ escaped (\\\",\\\\)."
;; Don't autoload this function: the correct entry point for other packages
;; to use is `info'. --Stef
;; ;;;###autoload
(defun Info-goto-node (nodename &optional fork)
(defun Info-goto-node (nodename &optional fork strict-case)
"Go to Info node named NODENAME. Give just NODENAME or (FILENAME)NODENAME.
If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file
FILENAME; otherwise, NODENAME should be in the current Info file (or one of
@ -1711,7 +1718,11 @@ in the Info file FILENAME after the closing parenthesis in (FILENAME).
Empty NODENAME in (FILENAME) defaults to the Top node.
If FORK is non-nil (interactively with a prefix arg), show the node in
a new Info buffer.
If FORK is a string, it is the name to use for the new buffer."
If FORK is a string, it is the name to use for the new buffer.
This function first looks for a case-sensitive match for the node part
of NODENAME; if none is found it then tries a case-insensitive match
\(unless STRICT-CASE is non-nil)."
(interactive (list (Info-read-node-name "Go to node: ") current-prefix-arg))
(info-initialize)
(if fork
@ -1730,7 +1741,7 @@ If FORK is a string, it is the name to use for the new buffer."
(if trim (setq nodename (substring nodename 0 trim))))
(if transient-mark-mode (deactivate-mark))
(Info-find-node (if (equal filename "") nil filename)
(if (equal nodename "") "Top" nodename))))
(if (equal nodename "") "Top" nodename) nil strict-case)))
(defvar Info-read-node-completion-table)

View File

@ -672,7 +672,7 @@ is unsuitable for the top-level media type \"text\".
VALUE must be a list of symbols that control the ISO-2022 converter.
Each must be a member of the list `coding-system-iso-2022-flags'
\(which see). This attribute has a meaning only when `:coding-type'
\(which see). This attribute is meaningful only when `:coding-type'
is `iso-2022'.
`:designation'
@ -692,7 +692,7 @@ to GN. If the list contains 96, any charsets whose whose ranges are
96 long can be designated to GN. If the first element is a charset,
that charset is initially designated to GN.
This attribute has a meaning only when `:coding-type' is `iso-2022'.
This attribute is meaningful only when `:coding-type' is `iso-2022'.
`:bom'
@ -712,7 +712,7 @@ are 0xFF 0xFE, use the cdr part coding system of the value.
Otherwise, treat them as bytes for a normal character. On encoding,
produce BOM bytes according to the value of `:endian'.
This attribute has a meaning only when `:coding-type' is `utf-16' or
This attribute is meaningful only when `:coding-type' is `utf-16' or
`utf-8'.
`:endian'
@ -720,37 +720,37 @@ This attribute has a meaning only when `:coding-type' is `utf-16' or
VALUE must be `big' or `little' specifying big-endian and
little-endian respectively. The default value is `big'.
This attribute has a meaning only when `:coding-type' is `utf-16'.
This attribute is meaningful only when `:coding-type' is `utf-16'.
`:ccl-decoder'
VALUE is a symbol representing the registered CCL program used for
decoding. This attribute has a meaning only when `:coding-type' is
decoding. This attribute is meaningful only when `:coding-type' is
`ccl'.
`:ccl-encoder'
VALUE is a symbol representing the registered CCL program used for
encoding. This attribute has a meaning only when `:coding-type' is
encoding. This attribute is meaningful only when `:coding-type' is
`ccl'.
:inhibit-null-byte-detection
`:inhibit-null-byte-detection'
VALUE non-nil means Emacs ignore null bytes on code detection.
See the variable `inhibit-null-byte-detection'. This attribute
has a meaning only when `:coding-type' is `undecided'.
is meaningful only when `:coding-type' is `undecided'.
:inhibit-iso-escape-detection
`:inhibit-iso-escape-detection'
VALUE non-nil means Emacs ignores ISO-2022 escape sequences on
code detection. See the variable `inhibit-iso-escape-detection'.
This attribute has a meaning only when `:coding-type' is
This attribute is meaningful only when `:coding-type' is
`undecided'.
:prefer-utf-8
`:prefer-utf-8'
VALUE non-nil means Emacs prefers UTF-8 on code detection for
non-ASCII files. This attribute has a meaning only when
non-ASCII files. This attribute is meaningful only when
`:coding-type' is `undecided'."
(let* ((common-attrs (mapcar 'list
'(:mnemonic

View File

@ -145,6 +145,7 @@ cid: URL as the argument.")
(define-key map [follow-link] 'mouse-face)
(define-key map "I" 'shr-insert-image)
(define-key map "w" 'shr-copy-url)
(define-key map "u" 'shr-copy-url)
(define-key map "v" 'shr-browse-url)
(define-key map "o" 'shr-save-contents)
(define-key map "\r" 'shr-browse-url)

View File

@ -38,9 +38,11 @@
;;
;; - localname is a string. This are temporary properties, which are
;; related to the file localname is referring to. Examples:
;; "file-exists-p" is t or nile, depending on the file existence, or
;; "file-exists-p" is t or nil, depending on the file existence, or
;; "file-attributes" caches the result of the function
;; `file-attributes'.
;; `file-attributes'. These entries have a timestamp, and they
;; expire after `remote-file-name-inhibit-cache' seconds if this
;; variable is set.
;;
;; - The key is a process. This are temporary properties related to
;; an open connection. Examples: "scripts" keeps shell script

View File

@ -1539,7 +1539,8 @@ connection if a previous connection has died for some reason."
;; indicated by the "mounted" signal, i.e. the "fuse-mountpoint"
;; file property.
(with-timeout
(60
((or (tramp-get-method-parameter method 'tramp-connection-timeout)
tramp-connection-timeout)
(if (zerop (length (tramp-file-name-user vec)))
(tramp-error
vec 'file-error

View File

@ -222,21 +222,24 @@ detected as prompt when being sent on echoing hosts, therefore.")
(tramp-login-program "su")
(tramp-login-args (("-") ("%u")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-c"))))
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
;;;###tramp-autoload
(add-to-list 'tramp-methods
'("sudo"
(tramp-login-program "sudo")
(tramp-login-args (("-u" "%u") ("-s") ("-H") ("-p" "Password:")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-c"))))
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
;;;###tramp-autoload
(add-to-list 'tramp-methods
'("ksu"
(tramp-login-program "ksu")
(tramp-login-args (("%u") ("-q")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-c"))))
(tramp-remote-shell-args ("-c"))
(tramp-connection-timeout 10)))
;;;###tramp-autoload
(add-to-list 'tramp-methods
'("krlogin"
@ -862,7 +865,9 @@ of command line.")
(set-file-selinux-context . tramp-sh-handle-set-file-selinux-context)
(file-acl . tramp-sh-handle-file-acl)
(set-file-acl . tramp-sh-handle-set-file-acl)
(vc-registered . tramp-sh-handle-vc-registered))
(vc-registered . tramp-sh-handle-vc-registered)
(file-notify-add-watch . tramp-sh-handle-file-notify-add-watch)
(file-notify-rm-watch . tramp-sh-handle-file-notify-rm-watch))
"Alist of handler functions.
Operations not mentioned here will be handled by the normal Emacs functions.")
@ -2669,7 +2674,7 @@ the result will be a local, non-Tramp, filename."
(unless (memq (process-status proc) '(run open))
(let ((vec (tramp-get-connection-property proc "vector" nil)))
(when vec
(tramp-message vec 5 "Sentinel called: `%s' `%s'" proc event)
(tramp-message vec 5 "Sentinel called: `%S' `%s'" proc event)
(tramp-flush-connection-property proc)
(tramp-flush-directory-property vec "")))))
@ -3376,6 +3381,122 @@ Fall back to normal file name handler if no Tramp handler exists."
;; Default file name handlers, we don't care.
(t (tramp-run-real-handler operation args)))))))
(defun tramp-sh-handle-file-notify-add-watch (file-name flags callback)
"Like `file-notify-add-watch' for Tramp files."
(setq file-name (expand-file-name file-name))
(with-parsed-tramp-file-name file-name nil
(let* ((default-directory (file-name-directory file-name))
command events filter p)
(cond
;; gvfs-monitor-dir.
((setq command (tramp-get-remote-gvfs-monitor-dir v))
(setq filter 'tramp-sh-file-gvfs-monitor-dir-process-filter
p (start-file-process
"gvfs-monitor-dir" (generate-new-buffer " *gvfs-monitor-dir*")
command localname)))
;; inotifywait.
((setq command (tramp-get-remote-inotifywait v))
(setq filter 'tramp-sh-file-inotifywait-process-filter
events
(cond
((and (memq 'change flags) (memq 'attribute-change flags))
"create,modify,move,delete,attrib")
((memq 'change flags) "create,modify,move,delete")
((memq 'attribute-change flags) "attrib"))
p (start-file-process
"inotifywait" (generate-new-buffer " *inotifywait*")
command "-mq" "-e" events localname)))
;; None.
(t (tramp-error
v 'file-notify-error
"No file notification program found on %s"
(file-remote-p file-name))))
;; Return the process object as watch-descriptor.
(if (not (processp p))
(tramp-error
v 'file-notify-error "`%s' failed to start on remote host" command)
(tramp-compat-set-process-query-on-exit-flag p nil)
(set-process-filter p filter)
p))))
(defun tramp-sh-file-gvfs-monitor-dir-process-filter (proc string)
"Read output from \"gvfs-monitor-dir\" and add corresponding file-notify events."
(let ((remote-prefix
(with-current-buffer (process-buffer proc)
(file-remote-p default-directory)))
(rest-string (tramp-compat-process-get proc 'rest-string)))
(when rest-string
(tramp-message proc 10 (format "Previous string:\n%s" rest-string)))
(tramp-message proc 6 (format "%S\n%s" proc string))
(setq string (concat rest-string string)
;; Attribute change is returned in unused wording.
string (replace-regexp-in-string
"ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string))
(while (string-match
(concat "^[\n\r]*"
"Directory Monitor Event:[\n\r]+"
"Child = \\([^\n\r]+\\)[\n\r]+"
"\\(Other = \\([^\n\r]+\\)[\n\r]+\\)?"
"Event = \\([^[:blank:]]+\\)[\n\r]+")
string)
(let ((object
(list
proc
(intern-soft
(replace-regexp-in-string
"_" "-" (downcase (match-string 4 string))))
;; File names are returned as absolute paths. We must
;; add the remote prefix.
(concat remote-prefix (match-string 1 string))
(when (match-string 3 string)
(concat remote-prefix (match-string 3 string))))))
(setq string (replace-match "" nil nil string))
;; Usually, we would add an Emacs event now. Unfortunately,
;; `unread-command-events' does not accept several events at
;; once. Therefore, we apply the callback directly.
(tramp-compat-funcall 'file-notify-callback object)))
;; Save rest of the string.
(when (zerop (length string)) (setq string nil))
(when string (tramp-message proc 10 (format "Rest string:\n%s" string)))
(tramp-compat-process-put proc 'rest-string string)))
(defun tramp-sh-file-inotifywait-process-filter (proc string)
"Read output from \"inotifywait\" and add corresponding file-notify events."
(tramp-message proc 6 (format "%S\n%s" proc string))
(dolist (line (split-string string "[\n\r]+" 'omit-nulls))
;; Check, whether there is a problem.
(unless
(string-match
(concat "^[^[:blank:]]+"
"[[:blank:]]+\\([^[:blank:]]+\\)+"
"\\([[:blank:]]+\\([^\n\r]+\\)\\)?")
line)
(tramp-error proc 'file-notify-error "%s" line))
(let ((object
(list
proc
(mapcar
(lambda (x)
(intern-soft (replace-regexp-in-string "_" "-" (downcase x))))
(split-string (match-string 1 line) "," 'omit-nulls))
(match-string 3 line))))
;; Usually, we would add an Emacs event now. Unfortunately,
;; `unread-command-events' does not accept several events at
;; once. Therefore, we apply the callback directly.
(tramp-compat-funcall 'file-notify-callback object))))
(defvar file-notify-descriptors)
(defun tramp-sh-handle-file-notify-rm-watch (proc)
"Like `file-notify-rm-watch' for Tramp files."
;; The descriptor must be a process object.
(unless (and (processp proc) (gethash proc file-notify-descriptors))
(tramp-error proc 'file-notify-error "Not a valid descriptor %S" proc))
(tramp-message proc 6 (format "Kill %S" proc))
(kill-process proc))
;;; Internal Functions:
(defun tramp-maybe-send-script (vec script name)
@ -3634,12 +3755,16 @@ file exists and nonzero exit status otherwise."
"Wait for shell prompt and barf if none appears.
Looks at process PROC to see if a shell prompt appears in TIMEOUT
seconds. If not, it produces an error message with the given ERROR-ARGS."
(unless
(tramp-wait-for-regexp
proc timeout
(format
"\\(%s\\|%s\\)\\'" shell-prompt-pattern tramp-shell-prompt-pattern))
(apply 'tramp-error-with-buffer nil proc 'file-error error-args)))
(let ((vec (tramp-get-connection-property proc "vector" nil)))
(condition-case err
(tramp-wait-for-regexp
proc timeout
(format
"\\(%s\\|%s\\)\\'" shell-prompt-pattern tramp-shell-prompt-pattern))
(error
(delete-process proc)
(apply 'tramp-error-with-buffer
(tramp-get-connection-buffer vec) vec 'file-error error-args)))))
(defun tramp-open-connection-setup-interactive-shell (proc vec)
"Set up an interactive shell.
@ -4214,9 +4339,6 @@ Gateway hops are already opened."
;; Result.
target-alist))
(defvar tramp-current-connection nil
"Last connection timestamp.")
(defun tramp-maybe-open-connection (vec)
"Maybe open a connection VEC.
Does not do anything if a connection is already open, but re-opens the
@ -4230,7 +4352,7 @@ connection if a previous connection has died for some reason."
;; If Tramp opens the same connection within a short time frame,
;; there is a problem. We shall signal this.
(unless (or (and p (processp p) (memq (process-status p) '(run open)))
(not (equal (butlast (append vec nil))
(not (equal (butlast (append vec nil) 2)
(car tramp-current-connection)))
(> (tramp-time-diff
(current-time) (cdr tramp-current-connection))
@ -4315,7 +4437,7 @@ connection if a previous connection has died for some reason."
(set-process-sentinel p 'tramp-process-sentinel)
(tramp-compat-set-process-query-on-exit-flag p nil)
(setq tramp-current-connection
(cons (butlast (append vec nil)) (current-time))
(cons (butlast (append vec nil) 2) (current-time))
tramp-current-host (system-name))
(tramp-message
@ -4323,8 +4445,8 @@ connection if a previous connection has died for some reason."
;; Check whether process is alive.
(tramp-barf-if-no-shell-prompt
p 60
"Couldn't find local shell prompt %s" tramp-encoding-shell)
p 10
"Couldn't find local shell prompt for %s" tramp-encoding-shell)
;; Now do all the connections as specified.
(while target-alist
@ -4342,6 +4464,9 @@ connection if a previous connection has died for some reason."
(async-args
(tramp-get-method-parameter
l-method 'tramp-async-args))
(connection-timeout
(tramp-get-method-parameter
l-method 'tramp-connection-timeout))
(gw-args
(tramp-get-method-parameter l-method 'tramp-gw-args))
(gw (tramp-get-file-property hop "" "gateway" nil))
@ -4424,7 +4549,8 @@ connection if a previous connection has died for some reason."
(tramp-message vec 3 "Sending command `%s'" command)
(tramp-send-command vec command t t)
(tramp-process-actions
p vec pos tramp-actions-before-shell 60)
p vec pos tramp-actions-before-shell
(or connection-timeout tramp-connection-timeout))
(tramp-message
vec 3 "Found remote shell prompt on `%s'" l-host))
;; Next hop.
@ -4864,6 +4990,17 @@ Return ATTR."
(tramp-message vec 5 "Finding a suitable `trash' command")
(tramp-find-executable vec "trash" (tramp-get-remote-path vec))))
(defun tramp-get-remote-gvfs-monitor-dir (vec)
(with-tramp-connection-property vec "gvfs-monitor-dir"
(tramp-message vec 5 "Finding a suitable `gvfs-monitor-dir' command")
(tramp-find-executable
vec "gvfs-monitor-dir" (tramp-get-remote-path vec) t t)))
(defun tramp-get-remote-inotifywait (vec)
(with-tramp-connection-property vec "inotifywait"
(tramp-message vec 5 "Finding a suitable `inotifywait' command")
(tramp-find-executable vec "inotifywait" (tramp-get-remote-path vec) t t)))
(defun tramp-get-remote-id (vec)
(with-tramp-connection-property vec "id"
(tramp-message vec 5 "Finding POSIX `id' command")

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