+2013-09-09 Glenn Morris <rgm@gnu.org>
+
+ * configure.ac (LDFLAGS_NOCOMBRELOC): New variable.
+ (LDFLAGS): Move nocombreloc option from here...
+ (LD_SWITCH_SYSTEM_TEMACS): ... to here.
+
+2013-09-08 Glenn Morris <rgm@gnu.org>
+
+ * configure.ac (--without-compress-install):
+ Rename from --without-compress-info. (Bug#9789)
+ (GZIP_INFO): Remove.
+ (GZIP_PROG): Allow --without-compress-install to disable it.
+ * Makefile.in (GZIP_INFO): Remove all references.
+
+ * info/dir: Tweak emacs-gnutls entry.
+
+2013-09-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ Port --without-x --enable-gcc-warnings to Fedora 19.
+ * configure.ac (WERROR_CFLAGS): Omit redundant use of
+ -Wmissing-field-initializers, -Wswitch, -Wtype-limits,
+ -Wunused-parameter. If there is no window system, also omit
+ -Wsuggest-attribute=const and -Wsuggest-attribute=noreturn; this
+ is needed for Fedora 19.
+
+2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Make --without-x compatible with --enable-gcc-warnings.
+ * configure.ac: If both --without-x and --enable-gcc-warnings are
+ specified, use -Wno-unused-variable, -Wno-unused-but-set-variable
+ and -Wno-unused-but-set-parameter.
+
+2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ Makefile improvements.
+ * Makefile.in (lib): Depend on am--refresh, to avoid a race.
+ (src): Remove duplicate dependency on FRC.
+ Invoke just one submake, not two. Avoid the need for 'pwd'.
+
+2013-09-02 Jan Djärv <jan.h.d@swipnet.se>
+
+ * configure.ac: Add ns_check_file.
+
+2013-08-31 Glenn Morris <rgm@gnu.org>
+
+ * configure.ac (--with-sound): Rename ossaudio to bsd-ossaudio,
+ and voxware to oss.
+
+2013-08-31 Ulrich Müller <ulm@gentoo.org>
+
+ * configure.ac: Allow for --with-sound=voxware that will enable
+ sound but otherwise disable ALSA. This will use the OSS device,
+ typically /dev/dsp, for sound output. (Bug#15067)
+
+2013-08-31 Glenn Morris <rgm@gnu.org>
+
+ * make-dist: Update for nt/INSTALL* changes.
+
+2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+ for portability to hosts where /bin/sh has problems.
+
+2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * configure.ac (DOCMISC_W32): New var to replace DOCMISC_*_W32.
+
2013-08-27 Paul Eggert <eggert@cs.ucla.edu>
Simplify EMACS_TIME-related code.
# make docs
# Make Emacs documentation files from their sources; requires makeinfo.
-SHELL = /bin/sh
+SHELL = @SHELL@
# This may not work with certain non-GNU make's. It only matters when
# inheriting a CDPATH not starting with the current directory.
# We use gzip to compress installed .el files.
GZIP_PROG = @GZIP_PROG@
-# If non-nil, gzip the installed Info and man pages.
-GZIP_INFO = @GZIP_INFO@
# ============================= Targets ==============================
-e "/^.*#/s|@SRC@|$${w32srcdir}|g") && \
${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h
+# If lib/Makefile would build files in '.', then build them before
+# building 'lib', to avoid races with parallel makes.
+lib: am--refresh
+
lib-src src: $(NTDIR) lib
-src: lib-src FRC
+src: lib-src
# We need to build `emacs' in `src' to compile the *.elc files in `lisp'
# and `leim'.
# all preloaded elisp files, and only then dump the actual src/emacs, which
# is not wrong, but is overkill in 99.99% of the cases.
src: Makefile FRC
- boot=bootstrap-emacs$(EXEEXT); \
- if [ ! -x "src/$$boot" ]; then \
- cd $@; $(MAKE) all $(MFLAGS) \
- CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
- LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"; \
- fi;
- if [ -r .bzr/checkout/dirstate ]; then \
- vcswitness="`pwd`/.bzr/checkout/dirstate"; \
- fi; \
- cd $@; $(MAKE) all $(MFLAGS) \
- CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
- LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="" \
+ dirstate='.bzr/checkout/dirstate'; \
+ vcswitness='$$(srcdir)/../'$$dirstate; \
+ [ -r "$(srcdir)/$$dirstate" ] || vcswitness=''; \
+ cd $@ || exit; \
+ boot=bootstrap-emacs$(EXEEXT); \
+ [ ! -x "$$boot" ] || boot=''; \
+ $(MAKE) all $(MFLAGS) \
+ CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
+ LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot" \
VCSWITNESS="$$vcswitness"
blessmail: Makefile src FRC
for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
(cd $${thisdir}; \
${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f); \
- ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \
+ [ -n "${GZIP_PROG}" ] || continue ; \
rm -f $(DESTDIR)${infodir}/$$f.gz; \
${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \
done; \
dest=`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1; \
(cd $${thisdir}; \
${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \
- ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \
+ [ -n "${GZIP_PROG}" ] || continue ; \
rm -f $(DESTDIR)${man1dir}/$${dest}.gz; \
${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${dest} || true; \
done
for elt in ${INFO_NONMISC} $${info_misc}; do \
(cd $${thisdir}; \
$(INSTALL_INFO) --remove --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
- if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
+ if [ -n "${GZIP_PROG}" ]; then \
ext=.gz; else ext=; fi; \
rm -f $$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext; \
done; \
fi)
- (if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
+ (if [ -n "${GZIP_PROG}" ]; then \
ext=.gz; else ext=; fi; \
if cd ${mansrcdir}; then \
for page in *.1; do \
+2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * unidata/Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+ for portability to hosts where /bin/sh has problems.
+
2013-08-27 Glenn Morris <rgm@gnu.org>
* admin.el (manual-misc-manuals): Use INFO_COMMON rather than
config' to set post_commit_to option for a branch. See `bzr help email'
(if you have the plugin installed) for other options.
+The From: address will be that of your Savannah account, rather than
+your `bzr whoami' information.
+
Note: if you have the bzr-email plugin installed locally, then when
you commit to the Emacs repository it will also try to send a commit
email from your local machine. If your machine is not configured to
NOTES ON THE EMACS PACKAGE ARCHIVE
-The GNU Emacs package archive, at elpa.gnu.org, is managed using a Bzr
-branch named "elpa", hosted on Savannah. To check it out:
+The GNU Emacs package archive, at elpa.gnu.org, is managed using a Git
+repository named "elpa", hosted on Savannah. To check it out:
- bzr branch bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa elpa
+ git clone git://bzr.sv.gnu.org/emacs/elpa
cd elpa
- echo "public_branch = bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa" >> .bzr/branch/branch.conf
- bzr bind bzr+ssh://USERNAME@bzr.savannah.gnu.org/emacs/elpa
+ git remote set-url --push origin git+ssh://bzr.sv.gnu.org/srv/git/emacs/elpa
[create task branch for edits, etc.]
-Changes to this branch propagate to elpa.gnu.org in a semi-manual way.
-There exists a copy of the elpa branch on that machine. Someone with
-access logs in, pulls the latest changes from Savannah, and runs a
-"deployment" script. This script (which is itself kept in the Bzr
-branch) generates the content visible at http://elpa.gnu.org/packages.
+Changes to this branch propagate to elpa.gnu.org via a "deployment" script run
+daily. This script (which is kept in elpa/admin/update-archive.sh) generates
+the content visible at http://elpa.gnu.org/packages.
-The reason we set things up this way, instead of using the package
-upload commands in package-x.el, is to let Emacs hackers conveniently
-edit the contents of the "elpa" branch. (In particular, multi-file
-packages are stored on the branch in source form, not as tarfiles.)
+A new package is released as soon as the "version number" of that package is
+changed. So you can use `elpa' to work on a package without fear of releasing
+those changes prematurely. And once the code is ready, just bump the
+version number to make a new release of the package.
It is easy to use the elpa branch to deploy a "local" copy of the
package archive. For details, see the README file in the elpa branch.
NOTES FOR EMACS CONTINUOUS BUILD ON HYDRA
-A continuous build for Emacs trunk can be found at
+A continuous build for Emacs can be found at
http://hydra.nixos.org/jobset/gnu/emacs-trunk
+http://hydra.nixos.org/jobset/gnu/emacs-24
-* It builds (and runs ERT tests) on these platforms:
-i686-cygwin
-i686-freebsd
-i686-linux
-x86_64-darwin
-x86_64-linux
+* It builds Emacs on various platforms.
+Sometimes jobs fail due to hydra problems rather than Emacs problems.
+Eg it seems like the cygwin build will never work again.
+http://lists.gnu.org/archive/html/hydra-users/2013-08/msg00000.html
* Mail notifications
In addition to the web interface, Hydra can send notifications by
* The Emacs jobset consists of the following jobs:
** The `tarball' job
-which gets the source tree as input, and is just a `make dist' after
-some autoconf/-make or bootstrap script.
+which gets a checkout from bzr, and does a bootstrap followed
+by running make-dist to create a tarball. If this job fails, all the
+others will too (because they use the tarball as input).
** The `build' job
-which gets the result of the tarball job as input, together with
-system identifier, this job basically does a normal make and make install.
+which starts from the tarball and does a normal build
** The 'coverage' job
-is now running `make check'.
+does a gcov build and then runs `make check'. Fails if any test fails.
* Nix expressions
The recipe for GNU Emacs are available via Git:
accustomed to compiling programs themselves. Corresponding source
can be found in the parent directory in emacs-24.3.tar.gz.
- If you have access to the World Wide Web, I would recommend pointing
- your favorite web browser to the following document (if you haven't
- already):
-
- http://www.gnu.org/software/emacs/windows/ntemacs.html
-
* IMPORTANT LEGAL REMINDER
If you want to redistribute any of the precompiled distributions of
* Further information
- If you have access to the World Wide Web, I would recommend pointing
- your favorite web browser to following the document (if you haven't
- already):
-
- http://www.gnu.org/software/emacs/windows/ntemacs.html
+ The Emacs on MS Windows FAQ is distributed with Emacs (info
+ manual "efaq-w32"), and at
- This document serves as an FAQ and a source for further information
- about the Windows port and related software packages. Note that as
- most of the information in that FAQ is for earlier versions, so some
- information may not be relevant to Emacs-24.3.
+ http://www.gnu.org/software/emacs/manual/efaq-w32.html
In addition to the FAQ, there is a mailing list for discussing issues
related to the Windows port of Emacs. For information about the
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-SHELL = /bin/sh
+SHELL = @SHELL@
srcdir = @srcdir@
abs_builddir = @abs_builddir@
DEPDIR = @DEPDIR@
DEPFLAGS = @DEPFLAGS@
DESLIB = @DESLIB@
-DOCMISC_DVI_W32 = @DOCMISC_DVI_W32@
-DOCMISC_HTML_W32 = @DOCMISC_HTML_W32@
-DOCMISC_INFO_W32 = @DOCMISC_INFO_W32@
-DOCMISC_PDF_W32 = @DOCMISC_PDF_W32@
-DOCMISC_PS_W32 = @DOCMISC_PS_W32@
+DOCMISC_W32 = @DOCMISC_W32@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
GTK_OBJ = @GTK_OBJ@
-GZIP_INFO = @GZIP_INFO@
GZIP_PROG = @GZIP_PROG@
HAVE_ALPHASORT = @HAVE_ALPHASORT@
HAVE_ATOLL = @HAVE_ATOLL@
ns_appdir = @ns_appdir@
ns_appresdir = @ns_appresdir@
ns_appsrc = @ns_appsrc@
+ns_check_file = @ns_check_file@
ns_self_contained = @ns_self_contained@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
LTLIBOBJS
LIBOBJS
SUBDIR_MAKEFILES_IN
+ns_check_file
WINDOW_SYSTEM_OBJ
EMACS_HEAPSIZE
TEMACS_POST_LINK
C_SWITCH_MACHINE
LD_SWITCH_SYSTEM
CANNOT_DUMP
-DOCMISC_PS_W32
-DOCMISC_PDF_W32
-DOCMISC_INFO_W32
-DOCMISC_HTML_W32
-DOCMISC_DVI_W32
+DOCMISC_W32
INFO_OPTS
INFO_EXT
HAVE_MAKEINFO
build_cpu
build
PROFILING_CFLAGS
-GZIP_INFO
cache_file
am__untar
am__tar
with_zlib
with_file_notification
with_makeinfo
-with_compress_info
+with_compress_install
with_pkg_config_prog
with_gameuser
with_gnustep_conf
--with-mail-unlink unlink, rather than empty, mail spool after reading
--with-mailhost=HOSTNAME
string giving default POP mail host
- --with-sound=VALUE compile with sound support (VALUE one of: yes,
- ossaudio, alsa, no; default yes). Only for
+ --with-sound=VALUE compile with sound support (VALUE one of: yes, alsa,
+ oss, bsd-ossaudio, no; default yes). Only for
GNU/Linux, FreeBSD, NetBSD, MinGW.
--with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
gtk3, lucid or athena, motif, no)
use a file notification library (LIB one of: yes,
gfile, inotify, w32, no)
--without-makeinfo don't require makeinfo for building manuals
- --without-compress-info don't compress the installed Info pages
+ --without-compress-install
+ don't compress some files (.el, .info, etc.) when
+ installing. Equivalent to: make GZIP_PROG= install
--with-pkg-config-prog=FILENAME
file name of pkg-config for finding GTK and librsvg
--with-gameuser=USER user for shared game score files
# Check whether --with-sound was given.
if test "${with_sound+set}" = set; then :
withval=$with_sound; case "${withval}" in
- yes|no|ossaudio|alsa) val=$withval ;;
+ yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
*) as_fn_error "\`--with-sound=$withval' is invalid;
-this option's value should be \`yes', \`no', \`ossaudio', or \`alsa'." "$LINENO" 5
+this option's value should be \`yes', \`no', \`alsa', \`oss', or \`bsd-ossaudio'." "$LINENO" 5
;;
esac
with_sound=$val
## This is an option because I do not know if all info/man support
## compressed files, nor how to test if they do so.
-# Check whether --with-compress-info was given.
-if test "${with_compress_info+set}" = set; then :
- withval=$with_compress_info;
+# Check whether --with-compress-install was given.
+if test "${with_compress_install+set}" = set; then :
+ withval=$with_compress_install;
else
- with_compress_info=$with_features
-fi
-
-if test $with_compress_info = yes; then
- GZIP_INFO=yes
-else
- GZIP_INFO=
+ with_compress_install=$with_features
fi
# The following line should be removable at some point.
nw="$nw -Wsuggest-attribute=pure"
+ # This part is merely for shortening the command line,
+ # since -Wno-FOO needs to be added below regardless.
+ nw="$nw -Wmissing-field-initializers"
+ nw="$nw -Wswitch"
+ nw="$nw -Wtype-limits"
+ nw="$nw -Wunused-parameter"
+
# clang is unduly picky about some things.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
$as_echo_n "checking whether the compiler is clang... " >&6; }
+test $with_compress_install != yes && test -n "$GZIP_PROG" && \
+ GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)"
+
if test $opsys = gnu-linux; then
# Extract the first word of "paxctl", so it can be a program name with args.
set dummy paxctl; ac_word=$2
if test $opsys = mingw32; then
- DOCMISC_DVI_W32=efaq-w32.dvi
- DOCMISC_HTML_W32=efaq-w32.html
- DOCMISC_INFO_W32=efaq-w32.info
- DOCMISC_PDF_W32=efaq-w32.pdf
- DOCMISC_PS_W32=efaq-w32.ps
+ DOCMISC_W32=efaq-w32
else
- DOCMISC_DVI_W32=
- DOCMISC_HTML_W32=
- DOCMISC_INFO_W32=
- DOCMISC_PDF_W32=
- DOCMISC_PS_W32=
+ DOCMISC_W32=
fi
-
-
-
-
if test x$GCC = xyes; then
test "x$GCC_LINK_TEST_OPTIONS" != x && \
ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
fi
-late_LDFLAGS=$LDFLAGS
+late_LDFLAGS="$LDFLAGS"
if test x$GCC = xyes; then
- LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
+ LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
else
- LDFLAGS="$LDFLAGS -znocombreloc"
+ LDFLAGS_NOCOMBRELOC="-znocombreloc"
fi
+LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
$as_echo_n "checking for -znocombreloc... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
- LDFLAGS=$late_LDFLAGS
+ LDFLAGS_NOCOMBRELOC=
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LDFLAGS="$late_LDFLAGS"
test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
case "$opsys" in
done
- if test "${with_sound}" = "ossaudio" || test "${with_sound}" = "yes"; then
+ test "${with_sound}" = "oss" && test "${have_sound_header}" != "yes" && \
+ as_fn_error "OSS sound support requested but not found." "$LINENO" 5
+
+ if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
# Emulation library used on NetBSD.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
LIBSOUND=
fi
- test "${with_sound}" = "ossaudio" && test -z "$LIBSOUND" && \
- as_fn_error "ossaudio sound support requested but not found." "$LINENO" 5
+ test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
+ as_fn_error "bsd-ossaudio sound support requested but not found." "$LINENO" 5
fi
## $window_system is now set to the window system we will
## ultimately use.
+if test "$window_system" = none && test "$gl_gcc_warnings" = yes; then
+ # Too many warnings for now.
+ nw=
+ nw="$nw -Wsuggest-attribute=const"
+ nw="$nw -Wsuggest-attribute=noreturn"
+
+ gl_warn_set=
+ set x $WARN_CFLAGS; shift
+ for gl_warn_item
+ do
+ case " $nw " in
+ *" $gl_warn_item "*)
+ ;;
+ *)
+ gl_warn_set="$gl_warn_set $gl_warn_item"
+ ;;
+ esac
+ done
+ WARN_CFLAGS=$gl_warn_set
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-variable" >&5
+$as_echo_n "checking whether C compiler handles -Wno-unused-variable... " >&6; }
+if test "${gl_cv_warn_c__Wno_unused_variable+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-variable"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_warn_c__Wno_unused_variable=yes
+else
+ gl_cv_warn_c__Wno_unused_variable=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_variable" >&5
+$as_echo "$gl_cv_warn_c__Wno_unused_variable" >&6; }
+if test "x$gl_cv_warn_c__Wno_unused_variable" = x""yes; then :
+ as_fn_append WARN_CFLAGS " -Wno-unused-variable"
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-variable" >&5
+$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-variable... " >&6; }
+if test "${gl_cv_warn_c__Wno_unused_but_set_variable+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-variable"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_warn_c__Wno_unused_but_set_variable=yes
+else
+ gl_cv_warn_c__Wno_unused_but_set_variable=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_variable" >&5
+$as_echo "$gl_cv_warn_c__Wno_unused_but_set_variable" >&6; }
+if test "x$gl_cv_warn_c__Wno_unused_but_set_variable" = x""yes; then :
+ as_fn_append WARN_CFLAGS " -Wno-unused-but-set-variable"
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-parameter" >&5
+$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-parameter... " >&6; }
+if test "${gl_cv_warn_c__Wno_unused_but_set_parameter+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-parameter"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_warn_c__Wno_unused_but_set_parameter=yes
+else
+ gl_cv_warn_c__Wno_unused_but_set_parameter=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_parameter" >&5
+$as_echo "$gl_cv_warn_c__Wno_unused_but_set_parameter" >&6; }
+if test "x$gl_cv_warn_c__Wno_unused_but_set_parameter" = x""yes; then :
+ as_fn_append WARN_CFLAGS " -Wno-unused-but-set-parameter"
+fi
+
+
+fi
+
term_header=
HAVE_X_WINDOWS=no
HAVE_X11=no
esac
fi
+LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
+
## MinGW-specific post-link processing of temacs.
if test "$NS_IMPL_GNUSTEP" = yes; then
ac_config_files="$ac_config_files nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in"
+ ns_check_file=Resources/Info-gnustep.plist
else
ac_config_files="$ac_config_files nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in"
+ ns_check_file=Contents/Info.plist
fi
+
fi
SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile nt/Makefile"
AC_DEFINE_UNQUOTED(MAILHOST, ["$withval"], [String giving fallback POP mail host.]))
AC_ARG_WITH([sound],[AS_HELP_STRING([--with-sound=VALUE],
- [compile with sound support (VALUE one of: yes, ossaudio, alsa, no;
+ [compile with sound support (VALUE one of: yes, alsa, oss, bsd-ossaudio, no;
default yes). Only for GNU/Linux, FreeBSD, NetBSD, MinGW.])],
[ case "${withval}" in
- yes|no|ossaudio|alsa) val=$withval ;;
+ yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
*) AC_MSG_ERROR([`--with-sound=$withval' is invalid;
-this option's value should be `yes', `no', `ossaudio', or `alsa'.])
+this option's value should be `yes', `no', `alsa', `oss', or `bsd-ossaudio'.])
;;
esac
with_sound=$val
## This is an option because I do not know if all info/man support
## compressed files, nor how to test if they do so.
-OPTION_DEFAULT_ON([compress-info],[don't compress the installed Info pages])
-if test $with_compress_info = yes; then
- GZIP_INFO=yes
-else
- GZIP_INFO=
-fi
-AC_SUBST(GZIP_INFO)
+OPTION_DEFAULT_ON([compress-install],
+ [don't compress some files (.el, .info, etc.) when installing. Equivalent to:
+make GZIP_PROG= install])
AC_ARG_WITH([pkg-config-prog],dnl
[AS_HELP_STRING([--with-pkg-config-prog=FILENAME],
# The following line should be removable at some point.
nw="$nw -Wsuggest-attribute=pure"
+ # This part is merely for shortening the command line,
+ # since -Wno-FOO needs to be added below regardless.
+ nw="$nw -Wmissing-field-initializers"
+ nw="$nw -Wswitch"
+ nw="$nw -Wtype-limits"
+ nw="$nw -Wunused-parameter"
+
# clang is unduly picky about some things.
AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang],
[AC_COMPILE_IFELSE(
dnl Don't use GZIP, which is used by gzip for additional parameters.
AC_PATH_PROG(GZIP_PROG, gzip)
+test $with_compress_install != yes && test -n "$GZIP_PROG" && \
+ GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)"
+
if test $opsys = gnu-linux; then
AC_PATH_PROG(PAXCTL, paxctl,,
[$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
AC_SUBST(INFO_OPTS)
if test $opsys = mingw32; then
- DOCMISC_DVI_W32=efaq-w32.dvi
- DOCMISC_HTML_W32=efaq-w32.html
- DOCMISC_INFO_W32=efaq-w32
- DOCMISC_PDF_W32=efaq-w32.pdf
- DOCMISC_PS_W32=efaq-w32.ps
+ DOCMISC_W32=efaq-w32
else
- DOCMISC_DVI_W32=
- DOCMISC_HTML_W32=
- DOCMISC_INFO_W32=
- DOCMISC_PDF_W32=
- DOCMISC_PS_W32=
-fi
-AC_SUBST(DOCMISC_DVI_W32)
-AC_SUBST(DOCMISC_HTML_W32)
-AC_SUBST(DOCMISC_INFO_W32)
-AC_SUBST(DOCMISC_PDF_W32)
-AC_SUBST(DOCMISC_PS_W32)
+ DOCMISC_W32=
+fi
+AC_SUBST(DOCMISC_W32)
dnl Add our options to ac_link now, after it is set up.
dnl Treat GCC specially since it just gives a non-fatal `unrecognized option'
dnl if not built to support GNU ld.
-late_LDFLAGS=$LDFLAGS
+dnl For a long time, -znocombreloc was added to LDFLAGS rather than
+dnl LD_SWITCH_SYSTEM_TEMACS. That is:
+dnl * inappropriate, as LDFLAGS is a user option but this is essential.
+dnl Eg "make LDFLAGS=... all" could run into problems,
+dnl http://bugs.debian.org/684788
+dnl * unnecessary, since temacs is the only thing that actually needs it.
+dnl Indeed this is where it was originally, prior to:
+dnl http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg00170.html
+late_LDFLAGS="$LDFLAGS"
if test x$GCC = xyes; then
- LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
+ LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
else
- LDFLAGS="$LDFLAGS -znocombreloc"
+ LDFLAGS_NOCOMBRELOC="-znocombreloc"
fi
+LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
+
AC_MSG_CHECKING([for -znocombreloc])
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
[AC_MSG_RESULT(yes)],
- LDFLAGS=$late_LDFLAGS
+ LDFLAGS_NOCOMBRELOC=
[AC_MSG_RESULT(no)])
+LDFLAGS="$late_LDFLAGS"
dnl The function dump-emacs will not be defined and temacs will do
dnl (load "loadup") automatically unless told otherwise.
#include <windows.h>
#endif
])
- if test "${with_sound}" = "ossaudio" || test "${with_sound}" = "yes"; then
+ test "${with_sound}" = "oss" && test "${have_sound_header}" != "yes" && \
+ AC_MSG_ERROR([OSS sound support requested but not found.])
+
+ if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
# Emulation library used on NetBSD.
AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=)
- test "${with_sound}" = "ossaudio" && test -z "$LIBSOUND" && \
- AC_MSG_ERROR([ossaudio sound support requested but not found.])
- dnl FIXME? If we did find ossaudio, should we set with_sound=ossaudio?
+ test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
+ AC_MSG_ERROR([bsd-ossaudio sound support requested but not found.])
+ dnl FIXME? If we did find ossaudio, should we set with_sound=bsd-ossaudio?
dnl Traditionally, we go on to check for alsa too. Does that make sense?
fi
AC_SUBST(LIBSOUND)
## $window_system is now set to the window system we will
## ultimately use.
+if test "$window_system" = none && test "$gl_gcc_warnings" = yes; then
+ # Too many warnings for now.
+ nw=
+ nw="$nw -Wsuggest-attribute=const"
+ nw="$nw -Wsuggest-attribute=noreturn"
+ gl_MANYWARN_COMPLEMENT([WARN_CFLAGS], [$WARN_CFLAGS], [$nw])
+
+ gl_WARN_ADD([-Wno-unused-variable])
+ gl_WARN_ADD([-Wno-unused-but-set-variable])
+ gl_WARN_ADD([-Wno-unused-but-set-parameter])
+fi
+
term_header=
HAVE_X_WINDOWS=no
HAVE_X11=no
esac
fi
+LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
+
AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
## MinGW-specific post-link processing of temacs.
if test "$NS_IMPL_GNUSTEP" = yes; then
AC_CONFIG_FILES([nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in \
nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in])
+ ns_check_file=Resources/Info-gnustep.plist
else
AC_CONFIG_FILES([nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in \
nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in])
+ ns_check_file=Contents/Info.plist
fi
+ AC_SUBST(ns_check_file)
fi
dnl Obviously there is duplication here wrt $SUBDIR_MAKEFILES.
+2013-09-04 Xue Fuqiao <xfq.free@gmail.com>
+
+ * maintaining.texi (VC Ignore): Mention `vc-ignore' with prefix argument.
+
+2013-08-31 Ulrich Müller <ulm@gentoo.org>
+
+ * xresources.texi (Motif Resources):
+ Rename from LessTif Resources. Update xrefs. (Bug#15145)
+ * emacs.texi: Update menu.
+
+2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+ for portability to hosts where /bin/sh has problems.
+
2013-08-17 Xue Fuqiao <xfq.free@gmail.com>
* text.texi (Enriched Justification): Minor fixes.
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-SHELL = /bin/sh
+SHELL = @SHELL@
# NB If you add any more configure variables,
# update the sed rules in the dist target below.
* Resources:: Using X resources with Emacs (in general).
* Table of Resources:: Table of specific X resources that affect Emacs.
* Lucid Resources:: X resources for Lucid menus.
-* LessTif Resources:: X resources for LessTif and Motif menus.
+* Motif Resources:: X resources for Motif and LessTif menus.
* GTK resources:: Resources for GTK widgets.
GTK resources
@kindex C-x v G
@findex vc-ignore
- Many source trees contain some files that do not need to be versioned,
-such as editor backups, object or bytecode files, and built programs.
-You can simply not add them, but then they’ll always crop up as
-unknown files. You can also tell the version control system to ignore
-these files by adding them to the ignore file at the top of the tree.
-@kbd{C-x v G} (@code{vc-ignore}) can help you do this.
+ Many source trees contain some files that do not need to be
+versioned, such as editor backups, object or bytecode files, and built
+programs. You can simply not add them, but then they’ll always crop
+up as unknown files. You can also tell the version control system to
+ignore these files by adding them to the ignore file at the top of the
+tree. @kbd{C-x v G} (@code{vc-ignore}) can help you do this. When
+called with a prefix argument, you can remove a file from the ignored
+file list.
@node VC Directory Mode
@subsection VC Directory Mode
* Resources:: Using X resources with Emacs (in general).
* Table of Resources:: Table of specific X resources that affect Emacs.
* Lucid Resources:: X resources for Lucid menus.
-* LessTif Resources:: X resources for LessTif and Motif menus.
+* Motif Resources:: X resources for Motif and LessTif menus.
* GTK resources:: Resources for GTK widgets.
@end menu
@ifnottex
@item @code{selectionFont} (class @code{SelectionFont})
Font name for pop-up menu items, in non-toolkit versions of Emacs. (For
-toolkit versions, see @ref{Lucid Resources}, also see @ref{LessTif
+toolkit versions, see @ref{Lucid Resources}, also see @ref{Motif
Resources}.)
@item @code{selectionTimeout} (class @code{SelectionTimeout})
Margin of the menu bar, in characters. Default is 1.
@end table
-@node LessTif Resources
-@appendixsec LessTif Menu X Resources
-@cindex Menu X Resources (LessTif widgets)
-@cindex LessTif Widget X Resources
+@node Motif Resources
+@appendixsec Motif Menu X Resources
+@cindex Menu X Resources (Motif widgets)
+@cindex Motif Widget X Resources
- If Emacs is compiled with the X toolkit support using LessTif or
-Motif widgets, you can use X resources to customize the appearance of
-the menu bar, pop-up menus, and dialog boxes. However, the resources
-are organized differently from Lucid widgets.
+ If Emacs is compiled with the X toolkit support using Motif or
+LessTif widgets, you can use X resources to customize the appearance
+of the menu bar, pop-up menus, and dialog boxes. However, the
+resources are organized differently from Lucid widgets.
The resource names for the menu bar are in the @samp{pane.menubar}
class, and they must be specified in this form:
+2013-09-01 Glenn Morris <rgm@gnu.org>
+
+ * emacs-lisp-intro.texi (beginning-of-buffer complete):
+ Put back a version of the removed paragraph about raw prefix arg.
+
+2013-09-01 Dani Moncayo <dmoncayo@gmail.com>
+
+ * emacs-lisp-intro.texi (beginning-of-buffer complete):
+ Update function details. (Bug#15085)
+
+2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+ for portability to hosts where /bin/sh has problems.
+
2013-08-12 Glenn Morris <rgm@gnu.org>
* emacs-lisp-intro.texi (Complete copy-region-as-kill): Fix typo.
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-SHELL = /bin/sh
+SHELL = @SHELL@
# NB If you add any more configure variables,
# update the sed rules in the dist target below.
(/ (+ 10 (* size (prefix-numeric-value arg)))
10)))
(point-min))))
- (if arg (forward-line 1)))
+ (if (and arg (not (consp arg))) (forward-line 1)))
@end group
@end smallexample
invoked with an argument:
@smallexample
-(if arg (forward-line 1)))
+(if (and arg (not (consp arg))) (forward-line 1))
@end smallexample
@noindent
means that the cursor is always located @emph{at least} the requested
tenths of the way through the buffer, which is a nicety that is,
perhaps, not necessary, but which, if it did not occur, would be sure
-to draw complaints.
-
-On the other hand, it also means that if you specify the command with
-a @kbd{C-u}, but without a number, that is to say, if the `raw prefix
-argument' is simply a cons cell, then the command puts you at the
-beginning of the second line @dots{} I don't know whether this is
-intended or whether no one has dealt with the code to avoid this
-happening.
+to draw complaints. (The @code{(not (consp arg))} portion is so that
+if you specify the command with a @kbd{C-u}, but without a number,
+that is to say, if the `raw prefix argument' is simply a cons cell,
+the command does not put you at the beginning of the second line.)
@node Second Buffer Related Review
@section Review
+2013-09-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * macros.texi (Defining Macros): Prefer "function" to "lambda
+ expression" (bug#15296).
+
+2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+ for portability to hosts where /bin/sh has problems.
+
2013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
* variables.texi (File Local Variables): Don't recommend quoting! Ever!
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-SHELL = /bin/sh
+SHELL = @SHELL@
# NB If you add any more configure variables,
# update the sed rules in the dist target below.
@section Defining Macros
A Lisp macro object is a list whose @sc{car} is @code{macro}, and
-whose @sc{cdr} is a lambda expression. Expansion of the macro works
-by applying the lambda expression (with @code{apply}) to the list of
+whose @sc{cdr} is a function. Expansion of the macro works
+by applying the function (with @code{apply}) to the list of
@emph{unevaluated} arguments from the macro call.
It is possible to use an anonymous Lisp macro just like an anonymous
+2013-08-31 Ulrich Müller <ulm@gentoo.org>
+
+ * emacs.1: Update manual links.
+
2013-04-20 Petr Hracek <phracek@redhat.com> (tiny change)
* emacs.1: Add some more command-line options. (Bug#14165)
.IR on ;
don't have menu bars if
.IR off .
-See the Emacs manual, sections "Lucid Resources" and "LessTif
+See the Emacs manual, sections "Lucid Resources" and "Motif
Resources", for how to control the appearance of the menu bar
if you have one.
.TP
Font name for pop-up menu items, in non-toolkit versions of
.IR Emacs .
(For toolkit versions, see the Emacs manual, sections
-"Lucid Resources" and "LessTif Resources".)
+"Lucid Resources" and "Motif Resources".)
.TP
.BR selectionTimeout " (class " SelectionTimeout )
Number of milliseconds to wait for a selection reply.
+2013-09-08 Glenn Morris <rgm@gnu.org>
+
+ * emacs-gnutls.texi: Tweak direntry.
+
+2013-09-06 Michael Albinus <michael.albinus@gmx.de>
+
+ * tramp.texi (Alternative Syntax): Remove chapter.
+
+2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+ for portability to hosts where /bin/sh has problems.
+
+2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ Try to reduce redundancy in doc/misc/Makefile.in.
+ * Makefile.in (DOCMISC_W32): New var to replace DOCMISC_*_W32.
+ (TARGETS): New intermediate variable.
+ (DVI_TARGETS, HTML_TARGETS, PDF_TARGETS, PS_TARGETS): Use it.
+
2013-08-27 Glenn Morris <rgm@gnu.org>
+ * efaq.texi (Emacs for MS-Windows): Update location of MS FAQ.
+
* efaq.texi: Rename from faq.texi, to match its output files.
* Makefile.in: Update for faq.texi name change.
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-SHELL = /bin/sh
+SHELL = @SHELL@
# Where to find the source code. $(srcdir) will be the man-aux
# subdirectory of the source tree. This is
MAKEINFO_OPTS = --force -I$(emacsdir)
## On MS Windows, efaq-w32; otherwise blank.
-DOCMISC_DVI_W32 = @DOCMISC_DVI_W32@
-DOCMISC_HTML_W32 = @DOCMISC_HTML_W32@
-DOCMISC_INFO_W32 = @DOCMISC_INFO_W32@
-DOCMISC_PDF_W32 = @DOCMISC_PDF_W32@
-DOCMISC_PS_W32 = @DOCMISC_PS_W32@
+DOCMISC_W32 = @DOCMISC_W32@
## Info files to build and install on all platforms.
INFO_COMMON = ada-mode auth autotype bovine calc ccmode cl \
## because the info files are pre-built in release tarfiles.
INFO_TARGETS = $(INFO_COMMON) efaq-w32
-DVI_TARGETS = $(DOCMISC_DVI_W32) \
- ada-mode.dvi \
- auth.dvi \
- autotype.dvi \
- bovine.dvi \
- calc.dvi \
- cc-mode.dvi \
- cl.dvi \
- dbus.dvi \
- dired-x.dvi \
- ebrowse.dvi \
- ede.dvi \
- ediff.dvi \
- edt.dvi \
- efaq.dvi \
- eieio.dvi \
- emacs-mime.dvi \
- epa.dvi \
- erc.dvi \
- ert.dvi \
- eshell.dvi \
- eudc.dvi \
- flymake.dvi \
- forms.dvi \
- gnus.dvi \
- emacs-gnutls.dvi \
- htmlfontify.dvi \
- idlwave.dvi \
- ido.dvi \
- info.dvi \
- mairix-el.dvi \
- message.dvi \
- mh-e.dvi \
- newsticker.dvi \
- nxml-mode.dvi \
- org.dvi \
- pcl-cvs.dvi \
- pgg.dvi \
- rcirc.dvi \
- reftex.dvi \
- remember.dvi \
- sasl.dvi \
- sc.dvi \
- semantic.dvi \
- ses.dvi \
- sieve.dvi \
- smtpmail.dvi \
- speedbar.dvi \
- srecode.dvi \
- todo-mode.dvi \
- tramp.dvi \
- url.dvi \
- vip.dvi \
- viper.dvi \
- widget.dvi \
- wisent.dvi \
- woman.dvi
-
-HTML_TARGETS = $(DOCMISC_HTML_W32) \
- ada-mode.html \
- auth.html \
- autotype.html \
- bovine.html \
- calc.html \
- cc-mode.html \
- cl.html \
- dbus.html \
- dired-x.html \
- ebrowse.html \
- ede.html \
- ediff.html \
- edt.html \
- efaq.html \
- eieio.html \
- emacs-mime.html \
- epa.html \
- erc.html \
- ert.html \
- eshell.html \
- eudc.html \
- flymake.html \
- forms.html \
- gnus.html \
- emacs-gnutls.html \
- htmlfontify.html \
- idlwave.html \
- ido.html \
- info.html \
- mairix-el.html \
- message.html \
- mh-e.html \
- newsticker.html \
- nxml-mode.html \
- org.html \
- pcl-cvs.html \
- pgg.html \
- rcirc.html \
- reftex.html \
- remember.html \
- sasl.html \
- sc.html \
- semantic.html \
- ses.html \
- sieve.html \
- smtpmail.html \
- speedbar.html \
- srecode.html \
- todo-mode.html \
- tramp.html \
- url.html \
- vip.html \
- viper.html \
- widget.html \
- wisent.html \
- woman.html
-
-PDF_TARGETS = $(DOCMISC_PDF_W32) \
- ada-mode.pdf \
- auth.pdf \
- autotype.pdf \
- bovine.pdf \
- calc.pdf \
- cc-mode.pdf \
- cl.pdf \
- dbus.pdf \
- dired-x.pdf \
- ebrowse.pdf \
- ede.pdf \
- ediff.pdf \
- edt.pdf \
- efaq.pdf \
- eieio.pdf \
- emacs-mime.pdf \
- epa.pdf \
- erc.pdf \
- ert.pdf \
- eshell.pdf \
- eudc.pdf \
- flymake.pdf \
- forms.pdf \
- gnus.pdf \
- htmlfontify.pdf \
- emacs-gnutls.pdf \
- idlwave.pdf \
- ido.pdf \
- info.pdf \
- mairix-el.pdf \
- message.pdf \
- mh-e.pdf \
- newsticker.pdf \
- nxml-mode.pdf \
- org.pdf \
- pcl-cvs.pdf \
- pgg.pdf \
- rcirc.pdf \
- reftex.pdf \
- remember.pdf \
- sasl.pdf \
- sc.pdf \
- semantic.pdf \
- ses.pdf \
- sieve.pdf \
- smtpmail.pdf \
- speedbar.pdf \
- srecode.pdf \
- todo-mode.pdf \
- tramp.pdf \
- url.pdf \
- vip.pdf \
- viper.pdf \
- widget.pdf \
- wisent.pdf \
- woman.pdf
-
-PS_TARGETS = $(DOCMISC_PS_W32) \
- ada-mode.ps \
- auth.ps \
- autotype.ps \
- bovine.ps \
- calc.ps \
- cc-mode.ps \
- cl.ps \
- dbus.ps \
- dired-x.ps \
- ebrowse.ps \
- ede.ps \
- ediff.ps \
- edt.ps \
- efaq.ps \
- eieio.ps \
- emacs-mime.ps \
- epa.ps \
- erc.ps \
- ert.ps \
- eshell.ps \
- eudc.ps \
- flymake.ps \
- forms.ps \
- gnus.ps \
- htmlfontify.ps \
- emacs-gnutls.ps \
- idlwave.ps \
- ido.ps \
- info.ps \
- mairix-el.ps \
- message.ps \
- mh-e.ps \
- newsticker.ps \
- nxml-mode.ps \
- org.ps \
- pcl-cvs.ps \
- pgg.ps \
- rcirc.ps \
- reftex.ps \
- remember.ps \
- sasl.ps \
- sc.ps \
- semantic.ps \
- ses.ps \
- sieve.ps \
- smtpmail.ps \
- speedbar.ps \
- srecode.ps \
- todo-mode.ps \
- tramp.ps \
- url.ps \
- vip.ps \
- viper.ps \
- widget.ps \
- wisent.ps \
- woman.ps
+# There are some naming differences between the info targets and the other
+# targets, so let's resolve them here.
+TARGETS_1 = $(INFO_INSTALL:ccmode=cc-mode)
+TARGETS = $(TARGETS_1:info.info=info)
+
+DVI_TARGETS = $(TARGETS:=.dvi)
+HTML_TARGETS = $(TARGETS:=.html)
+PDF_TARGETS = $(TARGETS:=.pdf)
+PS_TARGETS = $(TARGETS:=.ps)
TEXI2DVI = texi2dvi
TEXI2PDF = texi2pdf
@cindex Emacs for MS-Windows
@cindex Microsoft Windows, Emacs for
-There is a @uref{http://www.gnu.org/software/emacs/windows/ntemacs.html,
-separate FAQ} for Emacs on MS-Windows. For MS-DOS, @pxref{Emacs for MS-DOS}.
+There is a separate FAQ for Emacs on MS-Windows,
+@pxref{Top,,,efaq-w32,FAQ for Emacs on MS Windows}.
+For MS-DOS, @pxref{Emacs for MS-DOS}.
@node Emacs for GNUstep
@dircategory Emacs network features
@direntry
-* GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration.
+* Emacs GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration.
@end direntry
@titlepage
Using @value{tramp}
* Filename Syntax:: @value{tramp} filename conventions.
-* Alternative Syntax:: URL-like filename syntax.
* Filename completion:: Filename completion.
* Ad-hoc multi-hops:: Declaring multiple hops in the file name.
* Remote processes:: Integration with other @value{emacsname} packages.
@menu
* Filename Syntax:: @value{tramp} filename conventions.
-* Alternative Syntax:: URL-like filename syntax.
* Filename completion:: Filename completion.
* Ad-hoc multi-hops:: Declaring multiple hops in the file name.
* Remote processes:: Integration with other @value{emacsname} packages.
daniel, melancholia#42, .emacs}}.
-@node Alternative Syntax
-@section URL-like filename syntax
-@cindex filename syntax
-@cindex filename examples
-
-Additionally to the syntax described in the previous chapter, it is
-possible to use a URL-like syntax for @value{tramp}. This can be
-switched on by customizing the variable @code{tramp-syntax}. Please
-note that this feature is experimental for the time being.
-
-The variable @code{tramp-syntax} must be set before requiring @value{tramp}:
-
-@lisp
-(setq tramp-syntax 'url)
-(require 'tramp)
-@end lisp
-
-Then, a @value{tramp} filename would look like this:
-@file{/@var{method}://@var{user}@@@var{machine}:@var{port}/@var{path/to.file}}.
-@file{/@var{method}://} is mandatory, all other parts are optional.
-@file{:@var{port}} is useful for methods only who support this.
-
-The last example from the previous section would look like this:
-@file{/ssh://daniel@@melancholia/.emacs}.
-
-For the time being, @code{tramp-syntax} can have the following values:
-
-@itemize @w{}
-@ifset emacs
-@item @code{ftp}---That is the default syntax
-@item @code{url}---URL-like syntax
-@end ifset
-@ifset xemacs
-@item @code{sep}---That is the default syntax
-@item @code{url}---URL-like syntax
-@item @code{ftp}---EFS-like syntax
-@end ifset
-@end itemize
-
-
@node Filename completion
@section Filename completion
@cindex filename completion
+2013-09-09 Glenn Morris <rgm@gnu.org>
+
+ * refcards/Makefile (PS_ENGLISH, PS_CZECH, PS_FRENCH, PS_GERMAN)
+ (PS_POLISH, PS_PORTUGUESE, PS_RUSSIAN, PS_SLOVAKIAN, PS_TARGETS):
+ Use substitution refs.
+
2013-08-15 Glenn Morris <rgm@gnu.org>
* refcards/calccard.pdf, refcards/cs-dired-ref.pdf:
`--with-file-notification-no'. See below for file-notify features.
FIXME? This feature is not available for the Nextstep port. (?)
+** The configure option `without-compress-info' has been generalized,
+and renamed to `without-compress-install'. It now prevents compression
+of _any_ files during installation.
+
** The configure option --with-crt-dir has been removed.
It is no longer needed, as the crt*.o files are no longer linked
specially.
*** In VC directory mode, `L' lists the change log for the current VC
controlled tree in a window.
-*** `C-x v G' (globally) and `G' (in VC directory mode) ignores a
-file under current version control system.
+*** `C-x v G' (globally) and `G' (in VC directory mode) ignores a file
+under current version control system. When called with a prefix
+argument, you can remove a file from the ignored file list.
** cl-lib
*** key bindings to navigate through and select the completions.
*** The icomplete-separator is customizable, and its default has changed.
*** Removed icomplete-show-key-bindings.
+*** Icomplete-mode by defaults applies to all forms of minibuffer completion.
+(setq icomplete-with-completion-tables '(internal-complete-buffer))
+will revert to the old behavior.
+
** Ido
*** Ido has a manual now.
** Tramp
+*** The experimental url syntax for remote file names is withdrawn.
+
+++
*** New connection method "adb", which allows to access Android
devices by the Android Debug Bridge. The variable `tramp-adb-program'
** `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.
+
+** The cars of the elements in `interpreter-mode-alist' are now treated
+as regexps rather than literal strings. For the time being, any
+element whose car does not start with "\\" is still treated as a
+literal string, so this change should not cause any incompatibilities
+if you have code that just adds elements to the list, only if you are
+actually using interpreter-mode-alist for something.
+
\f
* Lisp Changes in Emacs 24.4
+** The second argument of `eval' can now be a lexical-environment.
+
+** `with-demoted-errors' takes an additional argument `format'.
+++
** New function `define-error'.
`preserve-extended-attributes' as it now handles both SELinux context
and ACL entries.
+** The `common-substring' argument of display-completion-list is obsolete.
+Either use `completion-all-completions' which already returns highlighted
+strings (including for partial or substring completion) or call
+`completion-hilit-commonality' to add the highlight.
+
** Changes to the Emacs Lisp Coding Conventions in Emacs 24.4
*** The package descriptor and name of global variables, constants,
\f
* 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.
+** The procedure for building Emacs on MS-Windows has changed.
+It is now built by running the same configure script as on all other
+platforms. This requires the MSYS environment and MinGW development
+tools. See the updated instructions in nt/INSTALL for details.
Using the Posix configure script and Makefile's also means a change in
the directory structure of the Emacs installation on Windows. It is
*** MS-Windows 95/98/ME: subprocesses do not terminate properly.
This is a limitation of the Operating System, and can cause problems
-when shutting down Windows. Ensure that all subprocesses are exited
-cleanly before exiting Emacs. For more details, see the FAQ at
-http://www.gnu.org/software/emacs/windows/.
+when shutting down Windows. Ensure that all subprocesses are exited
+cleanly before exiting Emacs. For more details, see the Emacs on MS
+Windows FAQ (info manual "efaq-w32").
*** MS-Windows 95/98/ME: crashes when Emacs invokes non-existent programs.
PDF_TARGETS = $(PDF_ENGLISH) $(PDF_CZECH) $(PDF_FRENCH) $(PDF_GERMAN) \
$(PDF_POLISH) $(PDF_PORTUGUESE) $(PDF_RUSSIAN) $(PDF_SLOVAKIAN)
-PS_ENGLISH = \
- calccard.ps \
- dired-ref.ps \
- gnus-booklet.ps \
- gnus-refcard.ps \
- orgcard.ps \
- refcard.ps \
- survival.ps \
- vipcard.ps \
- viperCard.ps
-
-PS_CZECH = \
- cs-dired-ref.ps \
- cs-refcard.ps \
- cs-survival.ps
-
-PS_FRENCH = \
- fr-dired-ref.ps \
- fr-refcard.ps \
- fr-survival.ps \
-
-PS_GERMAN = de-refcard.ps
-
-PS_POLISH = pl-refcard.ps
-
-PS_PORTUGUESE = pt-br-refcard.ps
-
-PS_RUSSIAN = ru-refcard.ps
-
-PS_SLOVAKIAN = \
- sk-dired-ref.ps \
- sk-refcard.ps \
- sk-survival.ps
-
-PS_TARGETS = $(PS_ENGLISH) $(PS_CZECH) $(PS_FRENCH) $(PS_GERMAN) \
- $(PS_POLISH) $(PS_PORTUGUESE) $(PS_RUSSIAN) $(PS_SLOVAKIAN)
+PS_ENGLISH = $(PDF_ENGLISH:.pdf=.ps)
+PS_CZECH = $(PDF_CZECH:.pdf=.ps)
+PS_FRENCH = $(PDF_FRENCH:.pdf=.ps)
+PS_GERMAN = $(PDF_GERMAN:.pdf=.ps)
+PS_POLISH = $(PDF_POLISH:.pdf=.ps)
+PS_PORTUGUESE = $(PDF_PORTUGUESE:.pdf=.ps)
+PS_RUSSIAN = $(PDF_RUSSIAN:.pdf=.ps)
+PS_SLOVAKIAN = $(PDF_SLOVAKIAN:.pdf=.ps)
+
+PS_TARGETS = $(PDF_TARGETS:.pdf=.ps)
## For emacsver.tex.
Emacs network features
* EUDC: (eudc). Emacs client for directory servers (LDAP, PH).
* Gnus: (gnus). The newsreader Gnus.
-* GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration.
+* Emacs GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration.
* Mairix: (mairix-el). Emacs interface to the Mairix mail indexer.
* MH-E: (mh-e). Emacs interface to the MH mail system.
* Message: (message). Mail and news composition mode that
+2013-09-05 Jean Haidouk <haidouk@yandex.com> (tiny change)
+
+ * quail/latin-alt.el ("french-alt-postfix", "latin-alt-postfix"):
+ * quail/latin-pre.el ("french-prefix"):
+ * quail/latin-post.el ("french-postfix"): Add `œ' and `Œ'.
+
+2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+ for portability to hosts where /bin/sh has problems.
+
2013-06-21 Juanma Barranquero <lekktu@gmail.com>
* quail/croatian.el ("croatian-prefix"):
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-# Avoid trouble on systems where the `SHELL' variable might be
-# inherited from the environment.
-SHELL = /bin/sh
+SHELL = @SHELL@
# Here are the things that we expect ../configure to edit.
srcdir=@srcdir@
En doublant la frappe des diacritiques, ils s'isoleront de la lettre.
Par exemple: e'' -> e'
-<e dans l'o> n'est pas disponible."
+Œ est produit par O/."
nil t nil nil nil nil nil nil nil nil t)
(quail-define-rules
("i^" ?î)
("i\"" ?ï)
("O^" ?Ô)
+ ("O/" ?Œ)
("o^" ?ô)
+ ("o/" ?œ)
("U`" ?Ù)
("U^" ?Û)
("U\"" ?Ü)
("i^^" ["i^"])
("i\"\"" ["i\""])
("O^^" ["O^"])
+ ("O//" ["O/"])
("o^^" ["o^"])
+ ("o//" ["o/"])
("U``" ["U`"])
("U^^" ["U^"])
("U\"\"" ["U\""])
("O'" ?Ó)
("O-" ?Ō)
("O/" ?Ø)
+ ("O/" ?Œ)
("O:" ?Ő)
("O\"" ?Ö)
("O^" ?Ô)
("o'" ?ó)
("o-" ?ō)
("o/" ?ø)
+ ("o/" ?œ)
("o:" ?ő)
("o\"" ?ö)
("o^" ?ô)
En doublant la frappe des diacritiques, ils s'isoleront de la lettre.
Par exemple: e'' -> e'
-<e dans l'o> n'est pas disponible."
+Œ est produit par O/."
nil t nil nil nil nil nil nil nil nil t)
(quail-define-rules
("i^" ?î)
("i\"" ?ï)
("O^" ?Ô)
+ ("O/" ?Œ)
("o^" ?ô)
+ ("o/" ?œ)
("U`" ?Ù)
("U^" ?Û)
("U\"" ?Ü)
("i^^" ["i^"])
("i\"\"" ["i\""])
("O^^" ["O^"])
+ ("O//" ["O/"])
("o^^" ["o^"])
+ ("o//" ["o/"])
("U``" ["U`"])
("U^^" ["U^"])
("U\"\"" ["U\""])
dot | . | z. -> ż
stroke | / | d/ -> đ
nordic | / | d/ -> ð t/ -> þ a/ -> å e/ -> æ o/ -> ø
- others | / | s/ -> ß ?/ -> ¿ !/ -> ¡ // -> °
+ others | / | s/ -> ß ?/ -> ¿ !/ -> ¡ // -> ° o/ -> œ
| various | << -> « >> -> » o_ -> º a_ -> ª
Doubling the postfix separates the letter and postfix: e.g. a'' -> a'
diaeresis | \" | \"i -> ï
cedilla | ~ or , | ~c -> ç ,c -> ç
symbol | ~ | ~> -> » ~< -> «
+ misc | / | /o -> œ
" nil t nil nil nil nil nil nil nil nil t)
(quail-define-rules
("\"e" ?ë)
("\"i" ?ï)
("\" " ?\")
+ ("/o" ?œ)
+ ("/O" ?Œ)
+ ("/ " ?/)
("~<" ?\«)
("~>" ?\»)
("~C" ?Ç)
+2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+ for portability to hosts where /bin/sh has problems.
+
2013-08-10 Eli Zaretskii <eliz@gnu.org>
* update-game-score.exe.manifest: New file.
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-# Avoid trouble on systems where the `SHELL' variable might be
-# inherited from the environment.
-SHELL = /bin/sh
+SHELL = @SHELL@
# Following ../lisp/Makefile.in.
EMACS = ../src/emacs
+2013-09-10 Glenn Morris <rgm@gnu.org>
+
+ * files.el (interpreter-mode-alist): Convert to regexps.
+ (set-auto-mode): Adapt for this. (Bug#15306)
+ * progmodes/cperl-mode.el (cperl-clobber-mode-lists):
+ Comment out unused variable.
+ * progmodes/cc-mode.el (interpreter-mode-alist):
+ * progmodes/python.el (interpreter-mode-alist):
+ * progmodes/ruby-mode.el (interpreter-mode-alist): Convert to regexps.
+ * progmodes/sh-script.el (sh-set-shell):
+ No longer use interpreter-mode-alist to get list of shells.
+
+ * progmodes/cc-mode.el (awk-mode): Remove duplicate autoload.
+
+2013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * simple.el: Use set-temporary-overlay-map for universal-argument.
+ (universal-argument-map): Don't use default-bindings.
+ Bind switch-frame explicitly. Replace universal-argument-minus with
+ a conditional binding.
+ (universal-argument-num-events, saved-overriding-map): Remove.
+ (restore-overriding-map): Remove.
+ (universal-argument--mode): Rename from save&set-overriding-map,
+ and rewrite.
+ (universal-argument, universal-argument-more, negative-argument)
+ (digit-argument): Adjust accordingly.
+ (universal-argument-minus): Remove.
+ (universal-argument-other-key): Remove.
+
+ * subr.el (with-demoted-errors): Add `format' argument.
+
+2013-09-10 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-cleanup): Remove. Functionality added to
+ `tramp-cleanup-connection'.
+
+ * net/tramp-cmds.el (tramp-cleanup-connection): Add optional
+ parameters KEEP-DEBUG and KEEP-PASSWORD.
+
+ * net/tramp.el (tramp-file-name-handler):
+ * net/tramp-adb.el (tramp-adb-maybe-open-connection):
+ * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell)
+ (tramp-maybe-open-connection):
+ * net/tramp-smb.el (tramp-smb-maybe-open-connection):
+ Use `tramp-cleanup-connection'.
+
+ * net/tramp-sh.el (tramp-maybe-open-connection):
+ Catch 'uname-changed inside the progress reporter.
+
+2013-09-10 Glenn Morris <rgm@gnu.org>
+
+ * simple.el (read-minibuffer): Unbreak it. (Bug#15318)
+
+ * dired-x.el (dired-mark-sexp): Unbreak for systems where ls
+ returns "alternate access method" in mode (eg "-rw-r--r--.").
+
+2013-09-08 Glenn Morris <rgm@gnu.org>
+
+ * saveplace.el (load-save-place-alist-from-file):
+ Demote errors. (Bug#15305)
+
+2013-09-08 Michael Albinus <michael.albinus@gmx.de>
+
+ Improve compatibility with older Emacsen, and XEmacs.
+
+ * net/tramp.el (tramp-find-method, tramp-find-user): Call `propertize'
+ only if it is bound. It isn't for XEmacs.
+ (with-tramp-progress-reporter): Do not let-bind `result'.
+ This yields to scoping errors in XEmacs.
+ (tramp-handle-make-auto-save-file-name): New function, moved from
+ tramp-sh.el.
+
+ * net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add handler
+ for `make-auto-save-file-name'.
+ (tramp-adb--gnu-switches-to-ash):
+ Use `tramp-compat-replace-regexp-in-string'.
+
+ * net/tramp-cache.el (tramp-cache-print): Call
+ `substring-no-properties' only if it is bound. It isn't for XEmacs.
+
+ * net/tramp-cmds.el (tramp-bug): Call `propertize' only if it is
+ bound. It isn't for XEmacs.
+
+ * net/tramp-compat.el (tramp-compat-copy-file):
+ Catch `wrong-number-of-arguments' error.
+ (tramp-compat-replace-regexp-in-string): New defun.
+
+ * net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add handler
+ for `make-auto-save-file-name'.
+ (tramp-gvfs-handle-copy-file): Use `tramp-compat-funcall' for
+ `copy-file'.
+ (tramp-gvfs-file-gvfs-monitor-file-process-filter)
+ (tramp-gvfs-file-name): Use `tramp-compat-replace-regexp-in-string'.
+ (tramp-synce-list-devices): Use `push' instead of `pushnew'.
+
+ * net/tramp-gw.el (tramp-gw-open-network-stream):
+ Use `tramp-compat-replace-regexp-in-string'.
+
+ * net/tramp-sh.el (tramp-sh-file-name-handler-alist):
+ Call `tramp-handle-make-auto-save-file-name'.
+ (tramp-sh-handle-make-auto-save-file-name): Move to tramp.el.
+ (tramp-sh-file-gvfs-monitor-dir-process-filter)
+ (tramp-sh-file-inotifywait-process-filter):
+ Use `tramp-compat-replace-regexp-in-string'.
+ (tramp-compute-multi-hops): Use `push' instead of `pushnew'.
+
+ * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler
+ for `make-auto-save-file-name'.
+ (tramp-smb-handle-copy-directory):
+ Call `tramp-compat-replace-regexp-in-string'.
+ (tramp-smb-get-file-entries): Use `push' instead of `pushnew'.
+ (tramp-smb-handle-copy-file): Improve error message.
+ (tramp-smb-handle-rename-file): Rename directly only in case
+ `newname' does not exist yet. This is a restriction of smbclient.
+ (tramp-smb-maybe-open-connection): Rerun the function only when
+ `auth-sources' is non-nil.
+
+2013-09-08 Kenichi Handa <handa@gnu.org>
+
+ * international/characters.el: Set category "^" (Combining) for
+ more characters.
+
+2013-09-07 Alan Mackenzie <acm@muc.de>
+
+ Correctly fontify Java class constructors.
+ * progmodes/cc-langs.el (c-type-decl-suffix-key): Now matches ")"
+ in Java Mode.
+ (c-recognize-typeless-decls): Set the Java value to t.
+ * progmodes/cc-engine.el (c-forward-decl-or-cast-1):
+ While handling a "(", add a check for, effectively, Java, and handle a
+ "typeless" declaration there.
+
+2013-09-07 Roland Winkler <winkler@gnu.org>
+
+ * textmodes/bibtex.el (bibtex-biblatex-entry-alist): Add optional
+ field subtitle for entry type book.
+
+2013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * minibuffer.el: Make minibuffer-complete call completion-in-region
+ rather than other way around.
+ (completion--some, completion-pcm--find-all-completions):
+ Don't delay signals when debugging.
+ (minibuffer-completion-contents): Beware fields within the
+ minibuffer contents.
+ (completion-all-sorted-completions): Use defvar-local.
+ (completion--do-completion, completion--cache-all-sorted-completions)
+ (completion-all-sorted-completions, minibuffer-force-complete):
+ Add args `beg' and `end'.
+ (completion--in-region-1): New fun, extracted from minibuffer-complete.
+ (minibuffer-complete): Use completion-in-region.
+ (completion-complete-and-exit): New fun, extracted from
+ minibuffer-complete-and-exit.
+ (minibuffer-complete-and-exit): Use it.
+ (completion--complete-and-exit): Rename from
+ minibuffer--complete-and-exit.
+ (completion-in-region--single-word): New function, extracted from
+ minibuffer-complete-word.
+ (minibuffer-complete-word): Use it.
+ (display-completion-list): Make `common-substring' argument obsolete.
+ (completion--in-region): Call completion--in-region-1 instead of
+ minibuffer-complete.
+ (completion-help-at-point): Pass boundaries to
+ minibuffer-completion-help as args rather than via an overlay.
+ (completion-pcm--string->pattern): Use `any-delim'.
+ (completion-pcm--optimize-pattern): New function.
+ (completion-pcm--pattern->regex): Handle `any-delim'.
+ * icomplete.el (icomplete-forward-completions)
+ (icomplete-backward-completions, icomplete-completions):
+ Adjust calls to completion-all-sorted-completions and
+ completion--cache-all-sorted-completions.
+ (icomplete-with-completion-tables): Default to t.
+ * emacs-lisp/crm.el (crm--current-element): Rename from
+ crm--select-current-element. Don't put an overlay but return the
+ boundaries instead.
+ (crm--completion-command): Take two new args to bind to the boundaries.
+ (crm-completion-help): Adjust accordingly.
+ (crm-complete): Use completion-in-region.
+ (crm-complete-word): Use completion-in-region--single-word.
+ (crm-complete-and-exit): Use completion-complete-and-exit.
+
+2013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * dired-x.el (dired-mark-sexp): Bind the vars lexically rather
+ than dynamically.
+
+2013-09-06 Juri Linkov <juri@jurta.org>
+
+ * info.el (Info-display-images-node): When image file doesn't exist
+ display text version of the image if it's provided in the Info file.
+ Otherwise, display the location of missing image from SRC attribute.
+ Add help-echo text property from ALT attribute. (Bug#15279)
+
+2013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * abbrev.el (edit-abbrevs-mode-map): Rename from edit-abbrevs-map.
+ (edit-abbrevs-mode): Use define-derived-mode.
+
+ * epa.el (epa--encode-coding-string, epa--decode-coding-string)
+ (epa--select-safe-coding-system, epa--derived-mode-p): Make it obvious
+ that it's defined.
+ (epa-key-list-mode, epa-key-mode, epa-info-mode):
+ Use define-derived-mode.
+
+ * epg.el (epg-start-encrypt): Minor CSE simplification.
+
+2013-09-06 William Xu <william.xwl@gmail.com>
+
+ * arc-mode.el: Add support for 7za (bug#15264).
+ (archive-7z-program): New var.
+ (archive-zip-extract, archive-zip-expunge, archive-zip-update)
+ (archive-zip-update-case, archive-7z-extract, archive-7z-expunge)
+ (archive-7z-update, archive-zip-extract, archive-7z-summarize): Use it.
+
+2013-09-06 Michael Albinus <michael.albinus@gmx.de>
+
+ Remove URL syntax.
+
+ * net/tramp.el (tramp-syntax, tramp-prefix-format)
+ (tramp-postfix-method-format, tramp-prefix-ipv6-format)
+ (tramp-postfix-ipv6-format, tramp-prefix-port-format)
+ (tramp-postfix-host-format, tramp-file-name-regexp)
+ (tramp-completion-file-name-regexp)
+ (tramp-completion-dissect-file-name)
+ (tramp-handle-substitute-in-file-name): Remove 'url case.
+ (tramp-file-name-regexp-url)
+ (tramp-completion-file-name-regexp-url): Remove constants.
+
+2013-09-06 Glenn Morris <rgm@gnu.org>
+
+ * replace.el (replace-string): Doc fix re start/end. (Bug#15275)
+
+2013-09-05 Dmitry Gutov <dgutov@yandex.ru>
+
+ * progmodes/ruby-mode.el (ruby-font-lock-keywords): Move "Perl-ish
+ keywords" below "here-doc beginnings" (Bug#15270).
+
+2013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * subr.el (pop): Use `car-safe'.
+ * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Remove hack
+ to detect unused `pop' return value.
+
+ * progmodes/python.el (python-nav-beginning-of-block): Remove unused
+ var `block-regexp'.
+ (python-nav--forward-sexp): Remove unused var `re-search-fn'.
+ (python-fill-string): Remove unused var `marker'.
+ (python-skeleton-add-menu-items): Remove unused var `items'.
+
+ * international/mule-cmds.el: Require CL.
+ (find-coding-systems-for-charsets): Avoid add-to-list.
+ (sanitize-coding-system-list): New function, extracted from
+ select-safe-coding-system-interactively.
+ (select-safe-coding-system-interactively): Use it.
+ (read-input-method-name): Accept symbols for `default'.
+
+ * emacs-lisp/advice.el (defadvice): Add indent rule.
+
+2013-09-05 Daniel Hackney <dan@haxney.org>
+
+ * dired-x.el:
+ * net/ange-ftp.el:
+ * net/browse-url.el:
+ * net/dbus.el:
+ * net/eudc.el:
+ * net/eudcb-ldap.el:
+ * net/eww.el:
+ * net/imap.el:
+ * printing.el:
+ * vc/ediff-diff.el:
+ * vc/ediff-init.el:
+ * vc/ediff-merg.el:
+ * vc/ediff-mult.el:
+ * vc/ediff-util.el:
+ * vc/ediff-wind.el:
+ * vc/ediff.el:
+ * vc/emerge.el:
+ * vc/pcvs.el:
+ * vc/vc-annotate.el: Prefix unused arguments with `_' to silence
+ byte compiler. Remove some unused let-bound variables.
+
+2013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/cconv.el: Use `car-safe' rather than `car' to access
+ a "ref-cell", since it gets better optimized (bug#14883).
+
+2013-09-05 Glenn Morris <rgm@gnu.org>
+
+ * progmodes/cc-awk.el (c-forward-sws): Declare.
+
+2013-09-04 Glenn Morris <rgm@gnu.org>
+
+ * generic-x.el [rul-generic-mode]: Require cc-mode.
+ (c++-mode-syntax-table): Declare.
+ (rul-generic-mode-syntax-table): Init in the defvar.
+
+2013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc/vc-dispatcher.el (vc-run-delayed): New macro.
+ (vc-do-command, vc-set-async-update):
+ * vc/vc-mtn.el (vc-mtn-dir-status):
+ * vc/vc-hg.el (vc-hg-dir-status, vc-hg-dir-status-files)
+ (vc-hg-pull, vc-hg-merge-branch):
+ * vc/vc-git.el (vc-git-dir-status-goto-stage, vc-git-pull)
+ (vc-git-merge-branch):
+ * vc/vc-cvs.el (vc-cvs-print-log, vc-cvs-dir-status)
+ (vc-cvs-dir-status-files):
+ * vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch, vc-bzr-dir-status)
+ (vc-bzr-dir-status-files):
+ * vc/vc-arch.el (vc-arch-dir-status): Use vc-run-delayed.
+ * vc/vc-annotate.el: Use lexical-binding.
+ (vc-annotate-display-select, vc-annotate): Use vc-run-delayed.
+ (vc-sentinel-movepoint): Declare.
+ (vc-annotate): Don't use `goto-line'.
+ * vc/vc.el (vc-diff-internal): Prefer a closure to `(lambda...).
+ (vc-diff-internal, vc-log-internal-common): Use vc-run-delayed.
+ (vc-sentinel-movepoint): Declare.
+ * vc/vc-svn.el: Use lexical-binding.
+ (vc-svn-dir-status, vc-svn-dir-status-files): Use vc-run-delayed.
+ * vc/vc-sccs.el:
+ * vc/vc-rcs.el: Use lexical-binding.
+
+ * autorevert.el (auto-revert-notify-handler): Explicitly ignore
+ `deleted'. Don't drop errors silently.
+
+ * emacs-lisp/gv.el (gv-get): Warn about CL-compiled places.
+
+2013-09-04 Xue Fuqiao <xfq.free@gmail.com>
+
+ * vc/vc.el (vc-ignore): Rewrite.
+ (vc-default-ignore): New function.
+ (vc-default-ignore-completion-table): Use find-ignore-file.
+
+ * vc/vc-bzr.el (vc-bzr-ignore, vc-bzr-ignore-completion-table):
+ * vc/vc-git.el (vc-git-ignore, vc-git-ignore-completion-table):
+ * vc/vc-hg.el (vc-hg-ignore, vc-hg-ignore-completion-table):
+ Remove. Most code moved to vc.el.
+
+2013-09-03 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices):
+ * net/tramp-smb.el (tramp-smb-get-file-entries):
+ * net/tramp-sh.el (tramp-sh-handle-insert-directory)
+ (tramp-compute-multi-hops): Fix misuses of `add-to-list'.
+
+ * net/eww.el (eww-display-raw): Remove unused argument `charset'.
+ Update call to it.
+ (eww-change-select): Remove unused var `properties'.
+ (eww-make-unique-file-name): Remove unused var `base'.
+
+ * finder.el (finder-compile-keywords): Don't mess with windows.
+
+ * calculator.el (calculator-funcall): Fix typo in last change.
+
+ * vc/vc-git.el (vc-git-checkin): Make it possible to commit a merge.
+
+ * emacs-lisp/package.el (package-activate-1): Don't let a missing
+ <pkg>-autoloads.el file stop us.
+
+ * net/tramp.el (with-parsed-tramp-file-name): Silence compiler
+ warnings, and factor out common code.
+
+2013-09-03 Dmitry Gutov <dgutov@yandex.ru>
+
+ * progmodes/ruby-mode.el (ruby-calculate-indent): Consider
+ two-character operators and whether the character preceding them
+ changes their meaning (Bug#15208).
+
+2013-09-02 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
+ Format code sent to Python shell for robustness.
+ * progmodes/python.el (python-shell-buffer-substring):
+ New function.
+ (python-shell-send-region, python-shell-send-buffer): Use it.
+
+2013-09-02 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp-compat.el (tramp-compat-user-error): Move it ...
+ * net/tramp.el (tramp-user-error): ... here.
+ (tramp-find-method, tramp-check-proper-host)
+ (tramp-dissect-file-name, tramp-debug-message)
+ (tramp-handle-shell-command):
+ * net/tramp-adb.el (tramp-adb-handle-shell-command):
+ * net/tramp-gvfs.el (tramp-gvfs-file-name-handler): Adapt callees.
+
+ * net/tramp-cache.el (tramp-cache-print): Don't print text properties.
+
+2013-09-02 Martin Rudalics <rudalics@gmx.at>
+
+ * avoid.el (mouse-avoidance-point-position)
+ (mouse-avoidance-too-close-p): Handle case where posn-at-point
+ returns nil.
+
+2013-09-02 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
+ * progmodes/python.el (python-shell-completion-get-completions):
+ Drop use of deleted `comint-last-prompt-overlay'.
+ (python-nav-if-name-main): New command.
+
+2013-09-01 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (setwins, setwins_almost, setwins_for_subdirs):
+ Avoid leading space in $wins. Otherwise the sed command used by
+ eg compile-main ends up containing "/*.el". (Bug#15170)
+
+ * frame.el (frame-background-mode): Doc fix. (Bug#15226)
+
+2013-08-30 Glenn Morris <rgm@gnu.org>
+
+ * emacs-lisp/bytecomp.el (byte-recompile-directory):
+ Fix is-this-a-directory logic. (Bug#15220)
+
+2013-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * textmodes/css-mode.el: Use SMIE.
+ (css-smie-grammar): New var.
+ (css-smie--forward-token, css-smie--backward-token)
+ (css-smie-rules): New functions.
+ (css-mode): Use them.
+ (css-navigation-syntax-table): Remove var.
+ (css-backward-sexp, css-forward-sexp, css-indent-calculate-virtual)
+ (css-indent-calculate, css-indent-line): Remove functions.
+
+ Misc changes to reduce use of `(lambda...); and other cleanups.
+ * cus-edit.el: Use lexical-binding.
+ (customize-push-and-save, customize-apropos)
+ (custom-buffer-create-internal): Use closures.
+ * progmodes/bat-mode.el (bat-mode-syntax-table): "..." are strings.
+ * progmodes/ada-xref.el: Use setq.
+ * net/tramp.el (with-tramp-progress-reporter): Avoid setq.
+ * dframe.el: Use lexical-binding.
+ (dframe-frame-mode): Fix calling convention for hooks. Use a closure.
+ * speedbar.el (speedbar-frame-mode): Adjust call accordingly.
+ * descr-text.el: Use lexical-binding.
+ (describe-text-widget, describe-text-sexp, describe-property-list):
+ Use closures.
+ * comint.el (comint-history-isearch-push-state): Use a closure.
+ * calculator.el: Use lexical-binding.
+ (calculator-number-to-string): Make it work with lexical-binding.
+ (calculator-funcall): Same and use cl-letf.
+
+ * emacs-lisp/lisp.el (lisp--company-doc-buffer)
+ (lisp--company-doc-string, lisp--company-location): New functions.
+ (lisp-completion-at-point): Use them to improve Company support.
+
+ * progmodes/ruby-mode.el (ruby-smie-grammar): Add rule for formal
+ params of lambda expressions.
+ (ruby-smie--implicit-semi-p): Refine rule (bug#15208).
+ (ruby-smie--opening-pipe-p): New function.
+ (ruby-smie--forward-token, ruby-smie--backward-token): Handle Ruby
+ symbols and matched |...| for formal params.
+ (ruby-smie-rules): Don't let the formal params of a "do" prevent it
+ from being treated as hanging. Handle "rescue".
+
+2013-08-29 Glenn Morris <rgm@gnu.org>
+
+ * progmodes/cc-engine.el (c-pull-open-brace):
+ Move definition before use.
+
+2013-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/cl-macs.el (cl-defsubst): Make it clear that args
+ are immutable. Don't use `unsafe' any more.
+ (cl--defsubst-expand): Don't substitute at the same time as keeping
+ a residual unused let-binding. Don't use `unsafe' any more.
+
+2013-08-29 Glenn Morris <rgm@gnu.org>
+
+ * calendar/cal-china.el (calendar-chinese-year-cache):
+ Recenter on 2015.
+
+ * nxml/nxml-util.el (nxml-debug-clear-inside):
+ Use cl-loop rather than loop.
+
+ * net/eww.el (eww-mode-map): Lower-case menu bar entries look bad.
+
+ * progmodes/sh-script.el (sh-builtins) <bash>: Add some bash4-isms.
+
+2013-08-28 Glenn Morris <rgm@gnu.org>
+
+ * progmodes/antlr-mode.el: No need to require cc-mode twice.
+
+ * progmodes/cc-bytecomp.el (cc-require): Handle uncompiled case.
+
+ * progmodes/cc-mode.el (c-define-abbrev-table): Handle NAME unbound.
+
+2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * simple.el (repeat-complex-command--called-interactively-skip):
+ New function.
+ (repeat-complex-command): Use it (bug#14136).
+
+ * progmodes/cc-mode.el: Minor cleanup of var declarations.
+ (c-define-abbrev-table): Add `doc' argument.
+ (c-mode-abbrev-table, c++-mode-abbrev-table)
+ (objc-mode-abbrev-table, java-mode-abbrev-table)
+ (idl-mode-abbrev-table, pike-mode-abbrev-table)
+ (awk-mode-abbrev-table): Use it.
+ (c-mode-syntax-table, c-mode-map, c++-mode-syntax-table)
+ (c++-mode-map, objc-mode-syntax-table, objc-mode-map)
+ (java-mode-syntax-table, java-mode-map, idl-mode-syntax-table)
+ (idl-mode-map, pike-mode-syntax-table, pike-mode-map, awk-mode-map):
+ Move initialization into the declaration; and remove any
+ autoload cookie.
+
+ * epg.el (epg--process-filter): Use with-current-buffer, save-excursion
+ and dynamic let binding.
+
+ * vc/smerge-mode.el: Remove redundant :group args.
+
+ * emacs-lisp/package.el (package-activate-1): Don't add unnecessarily
+ to load-path.
+
+2013-08-28 Juri Linkov <juri@jurta.org>
+
+ * isearch.el (isearch-reread-key-sequence-naturally): Use non-nil
+ arg DONT-DOWNCASE-LAST of `read-key-sequence'.
+ (isearch-other-meta-char): Handle an undefined shifted printing
+ character by downshifting it. (Bug#15200)
+
+2013-08-28 Juri Linkov <juri@jurta.org>
+
+ * isearch.el (isearch-search): Change regexp error message for
+ non-regexp searches. (Bug#15166)
+
+2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+ for portability to hosts where /bin/sh has problems.
+
+2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/cconv.el (cconv--analyse-function): Improve warning.
+
2013-08-27 Juri Linkov <juri@jurta.org>
* isearch.el (isearch-other-meta-char): Don't store kmacro commands
2013-08-27 Martin Rudalics <rudalics@gmx.at>
* window.el (display-buffer-use-some-window): Add missing
- argument in call of get-largest-window (Bug#15185). Reported by
- Stephen Leake.
+ argument in call of get-largest-window (Bug#15185).
+ Reported by Stephen Leake.
2013-08-27 Glenn Morris <rgm@gnu.org>
* net/tramp-adb.el (tramp-adb-maybe-open-connection):
* net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* net/tramp-sh.el (tramp-maybe-open-connection):
- * net/tramp-smb.el (tramp-smb-maybe-open-connection): Apply
- `tramp-check-proper-host'.
+ * net/tramp-smb.el (tramp-smb-maybe-open-connection):
+ Apply `tramp-check-proper-host'.
2013-08-26 Tassilo Horn <tsdh@gnu.org>
* calc/calc-embed.el (calc-do-embedded): Update help message.
- * calc/calc-prog.el (calc-user-define-invokation): Update help message.
+ * calc/calc-prog.el (calc-user-define-invocation): Update help message.
2005-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-SHELL = /bin/sh
+SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
setwins=subdirs=`find . -type d -print`; \
for file in $$subdirs; do \
case $$file in */.* | */.*/* | */=* ) ;; \
- *) wins="$$wins $$file" ;; \
+ *) wins="$$wins$${wins:+ }$$file" ;; \
esac; \
done
setwins_almost=subdirs=`find . -type d -print`; \
for file in $$subdirs; do \
case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \
- *) wins="$$wins $$file" ;; \
+ *) wins="$$wins$${wins:+ }$$file" ;; \
esac; \
done
setwins_for_subdirs=subdirs=`find . -type d -print`; \
for file in $$subdirs; do \
case $$file in */.* | */.*/* | */=* | */cedet* ) ;; \
- *) wins="$$wins $$file" ;; \
+ *) wins="$$wins$${wins:+ }$$file" ;; \
esac; \
done
(put 'abbrev-mode 'safe-local-variable 'booleanp)
\f
-(defvar edit-abbrevs-map
+(defvar edit-abbrevs-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "\C-x\C-s" 'abbrev-edit-save-buffer)
(define-key map "\C-x\C-w" 'abbrev-edit-save-to-file)
(define-key map "\C-c\C-c" 'edit-abbrevs-redefine)
map)
"Keymap used in `edit-abbrevs'.")
+(define-obsolete-variable-alias 'edit-abbrevs-map
+ 'edit-abbrevs-mode-map "24.4")
(defun kill-all-abbrevs ()
"Undefine all defined abbrevs."
(set-buffer-modified-p nil)
(current-buffer))))
-(defun edit-abbrevs-mode ()
- "Major mode for editing the list of abbrev definitions.
-\\{edit-abbrevs-map}"
- (interactive)
- (kill-all-local-variables)
- (setq major-mode 'edit-abbrevs-mode)
- (setq mode-name "Edit-Abbrevs")
- (use-local-map edit-abbrevs-map)
- (run-mode-hooks 'edit-abbrevs-mode-hook))
-
(defun edit-abbrevs ()
"Alter abbrev definitions by editing a list of them.
Selects a buffer containing a list of abbrev definitions with
(sort entries (lambda (x y)
(funcall sortfun (nth 2 x) (nth 2 y)))))))
+;; Keep it after define-abbrev-table, since define-derived-mode uses
+;; define-abbrev-table.
+(define-derived-mode edit-abbrevs-mode special-mode "Edit-Abbrevs"
+ "Major mode for editing the list of abbrev definitions.")
+
(provide 'abbrev)
;;; abbrev.el ends here
;; ------------------------------
;; Zip archive configuration
+(defvar archive-7z-program (let ((7z (or (executable-find "7z")
+ (executable-find "7za"))))
+ (when 7z
+ (file-name-nondirectory 7z))))
+
(defcustom archive-zip-extract
(cond ((executable-find "unzip") '("unzip" "-qq" "-c"))
- ((executable-find "7z") '("7z" "x" "-so"))
+ (archive-7z-program `(,archive-7z-program "x" "-so"))
((executable-find "pkunzip") '("pkunzip" "-e" "-o-"))
(t '("unzip" "-qq" "-c")))
"Program and its options to run in order to extract a zip file member.
(defcustom archive-zip-expunge
(cond ((executable-find "zip") '("zip" "-d" "-q"))
- ((executable-find "7z") '("7z" "d"))
+ (archive-7z-program `(,archive-7z-program "d"))
((executable-find "pkzip") '("pkzip" "-d"))
(t '("zip" "-d" "-q")))
"Program and its options to run in order to delete zip file members.
(defcustom archive-zip-update
(cond ((executable-find "zip") '("zip" "-q"))
- ((executable-find "7z") '("7z" "u"))
+ (archive-7z-program `(,archive-7z-program "u"))
((executable-find "pkzip") '("pkzip" "-u" "-P"))
(t '("zip" "-q")))
"Program and its options to run in order to update a zip file member.
(defcustom archive-zip-update-case
(cond ((executable-find "zip") '("zip" "-q" "-k"))
- ((executable-find "7z") '("7z" "u"))
+ (archive-7z-program `(,archive-7z-program "u"))
((executable-find "pkzip") '("pkzip" "-u" "-P"))
(t '("zip" "-q" "-k")))
"Program and its options to run in order to update a case fiddled zip member.
;; 7z archive configuration
(defcustom archive-7z-extract
- '("7z" "x" "-so")
+ `(,archive-7z-program "x" "-so")
"Program and its options to run in order to extract a 7z file member.
Extraction should happen to standard output. Archive and member name will
be added."
:group 'archive-7z)
(defcustom archive-7z-expunge
- '("7z" "d")
+ `(,archive-7z-program "d")
"Program and its options to run in order to delete 7z file members.
Archive and member names will be added."
:version "24.1"
:group 'archive-7z)
(defcustom archive-7z-update
- '("7z" "u")
+ `(,archive-7z-program "u")
"Program and its options to run in order to update a 7z file member.
Options should ensure that specified directory will be put into the 7z
file. Archive and member name will be added."
(cond
((member-ignore-case (car archive-zip-extract) '("pkunzip" "pkzip"))
(archive-*-extract archive name archive-zip-extract))
- ((equal (car archive-zip-extract) "7z")
+ ((equal (car archive-zip-extract) archive-7z-program)
(let ((archive-7z-extract archive-zip-extract))
(archive-7z-extract archive name)))
(t
(file buffer-file-name)
(files ()))
(with-temp-buffer
- (call-process "7z" nil t nil "l" "-slt" file)
+ (call-process archive-7z-program nil t nil "l" "-slt" file)
(goto-char (point-min))
;; Four dashes start the meta info section that should be skipped.
;; Archive members start with more than four dashes.
(defun auto-revert-notify-handler (event)
"Handle an EVENT returned from file notification."
- (ignore-errors
+ (with-demoted-errors
(let* ((descriptor (car event))
(action (nth 1 event))
(file (nth 2 event))
;; 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))))))))
+ (unless (eq action 'deleted)
+ (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)."
;;
;; (if (eq window-system 'x)
;; (mouse-avoidance-set-pointer-shape
-;; (eval (nth (random 4)
-;; '(x-pointer-man x-pointer-spider
-;; x-pointer-gobbler x-pointer-gumby)))))
+;; (nth (random 4)
+;; (list x-pointer-man x-pointer-spider
+;; x-pointer-gobbler x-pointer-gumby))))
;;
;; For completely random pointer shape, replace the setq above with:
;; (setq x-pointer-shape (mouse-avoidance-random-shape))
(defun mouse-avoidance-point-position ()
"Return the position of point as (FRAME X . Y).
Analogous to `mouse-position'."
- (let ((edges (window-inside-edges))
- (x-y (posn-x-y (posn-at-point))))
- (cons (selected-frame)
- (cons (+ (car edges)
- (/ (car x-y) (frame-char-width)))
- (+ (car (cdr edges))
- (/ (cdr x-y) (frame-char-height)))))))
+ (let* ((edges (window-inside-edges))
+ (posn-at-point (posn-at-point))
+ (x-y (and posn-at-point (posn-x-y posn-at-point))))
+ (when x-y
+ (cons (selected-frame)
+ (cons (+ (car edges)
+ (/ (car x-y) (frame-char-width)))
+ (+ (car (cdr edges))
+ (/ (cdr x-y) (frame-char-height))))))))
;(defun mouse-avoidance-point-position-test ()
; (interactive)
Acceptable distance is defined by `mouse-avoidance-threshold'."
(let* ((frame (car mouse))
(mouse-y (cdr (cdr mouse)))
- (tool-bar-lines (frame-parameter nil 'tool-bar-lines)))
+ (tool-bar-lines (frame-parameter nil 'tool-bar-lines))
+ point)
(or tool-bar-lines
(setq tool-bar-lines 0))
- (if (and mouse-y (< mouse-y tool-bar-lines))
- nil
- (let ((point (mouse-avoidance-point-position))
- (mouse-x (car (cdr mouse))))
+ (cond
+ ((and mouse-y (< mouse-y tool-bar-lines))
+ nil)
+ ((setq point (mouse-avoidance-point-position))
+ (let ((mouse-x (car (cdr mouse))))
(and (eq frame (car point))
(not (null mouse-x))
(< (abs (- mouse-x (car (cdr point))))
mouse-avoidance-threshold)
(< (abs (- mouse-y (cdr (cdr point))))
- mouse-avoidance-threshold))))))
+ mouse-avoidance-threshold)))))))
(defun mouse-avoidance-banish-destination ()
"The position to which Mouse Avoidance mode `banish' moves the mouse.
-;;; calculator.el --- a [not so] simple calculator for Emacs
+;;; calculator.el --- a [not so] simple calculator for Emacs -*- lexical-binding: t -*-
;; Copyright (C) 1998, 2000-2013 Free Software Foundation, Inc.
be the name of a one-argument function, a string is used with a single
argument and an expression will be evaluated with the variable `num'
bound to whatever should be displayed. If it is a function symbol, it
-should be able to handle special symbol arguments, currently 'left and
-'right which will be sent by special keys to modify display parameters
+should be able to handle special symbol arguments, currently `left' and
+`right' which will be sent by special keys to modify display parameters
associated with the displayer function (for example to change the number
of digits displayed).
;;;=====================================================================
;;; Code:
+(eval-when-compile (require 'cl-lib))
+
;;;---------------------------------------------------------------------
;;; Variables
(format calculator-displayer num))
((symbolp calculator-displayer)
(funcall calculator-displayer num))
- ((and (consp calculator-displayer)
- (eq 'std (car calculator-displayer)))
+ ((eq 'std (car-safe calculator-displayer))
(calculator-standard-displayer num (cadr calculator-displayer)))
((listp calculator-displayer)
- (eval calculator-displayer))
+ (eval calculator-displayer `((num. ,num))))
(t (prin1-to-string num t))))
;; operators are printed here
(t (prin1-to-string (nth 1 num) t))))
;; smaller than calculator-epsilon (1e-15). I don't think this is
;; necessary now.
(if (symbolp f)
- (cond ((and X Y) (funcall f X Y))
- (X (funcall f X))
- (t (funcall f)))
+ (cond ((and X Y) (funcall f X Y))
+ (X (funcall f X))
+ (t (funcall f)))
;; f is an expression
- (let* ((__f__ f) ; so we can get this value below...
- (TX (calculator-truncate X))
+ (let* ((TX (calculator-truncate X))
(TY (and Y (calculator-truncate Y)))
(DX (if calculator-deg (/ (* X pi) 180) X))
- (L calculator-saved-list)
- (Fbound (fboundp 'F))
- (Fsave (and Fbound (symbol-function 'F)))
- (Dbound (fboundp 'D))
- (Dsave (and Dbound (symbol-function 'D))))
- ;; a shortened version of flet
- (fset 'F (function
- (lambda (&optional x y)
- (calculator-funcall __f__ x y))))
- (fset 'D (function
- (lambda (x)
- (if calculator-deg (/ (* x 180) float-pi) x))))
- (unwind-protect (eval f)
- (if Fbound (fset 'F Fsave) (fmakunbound 'F))
- (if Dbound (fset 'D Dsave) (fmakunbound 'D)))))
+ (L calculator-saved-list))
+ (cl-letf (((symbol-function 'F)
+ (lambda (&optional x y) (calculator-funcall f x y)))
+ ((symbol-function 'D)
+ (lambda (x) (if calculator-deg (/ (* x 180) float-pi) x))))
+ (eval f `((X . ,X)
+ (Y . ,Y)
+ (TX . ,TX)
+ (TY . ,TY)
+ (DX . ,DX)
+ (L . ,L))))))
(error 0)))
;;;---------------------------------------------------------------------
(defvar calendar-chinese-year-cache
;; Maintainers: delete existing value, position point at start of
;; empty line, then call M-: (calendar-chinese-year-cache-init N)
- '((2000 (12 730126) (1 730155) (2 730185) (3 730215) (4 730244) (5 730273)
- (6 730303) (7 730332) (8 730361) (9 730391) (10 730420) (11 730450))
- (2001 (12 730480) (1 730509) (2 730539) (3 730569) (4 730598) (4.5 730628)
- (5 730657) (6 730687) (7 730716) (8 730745) (9 730775) (10 730804)
- (11 730834))
- (2002 (12 730863) (1 730893) (2 730923) (3 730953) (4 730982) (5 731012)
- (6 731041) (7 731071) (8 731100) (9 731129) (10 731159) (11 731188))
- (2003 (12 731218) (1 731247) (2 731277) (3 731307) (4 731336) (5 731366)
- (6 731396) (7 731425) (8 731455) (9 731484) (10 731513) (11 731543))
- (2004 (12 731572) (1 731602) (2 731631) (2.5 731661) (3 731690) (4 731720)
- (5 731750) (6 731779) (7 731809) (8 731838) (9 731868) (10 731897)
- (11 731927))
- (2005 (12 731956) (1 731986) (2 732015) (3 732045) (4 732074) (5 732104)
+ '((2005 (12 731956) (1 731986) (2 732015) (3 732045) (4 732074) (5 732104)
(6 732133) (7 732163) (8 732193) (9 732222) (10 732252) (11 732281))
(2006 (12 732311) (1 732340) (2 732370) (3 732399) (4 732429) (5 732458)
(6 732488) (7 732517) (7.5 732547) (8 732576) (9 732606) (10 732636)
(6 737243) (7 737272) (8 737301) (9 737331) (10 737360) (11 737389))
(2020 (12 737419) (1 737449) (2 737478) (3 737508) (4 737538) (4.5 737568)
(5 737597) (6 737627) (7 737656) (8 737685) (9 737715) (10 737744)
- (11 737774)))
+ (11 737774))
+ (2021 (12 737803) (1 737833) (2 737862) (3 737892) (4 737922) (5 737951)
+ (6 737981) (7 738010) (8 738040) (9 738069) (10 738099) (11 738128))
+ (2022 (12 738158) (1 738187) (2 738217) (3 738246) (4 738276) (5 738305)
+ (6 738335) (7 738365) (8 738394) (9 738424) (10 738453) (11 738483))
+ (2023 (12 738512) (1 738542) (2 738571) (2.5 738601) (3 738630) (4 738659)
+ (5 738689) (6 738719) (7 738748) (8 738778) (9 738808) (10 738837)
+ (11 738867))
+ (2024 (12 738896) (1 738926) (2 738955) (3 738985) (4 739014) (5 739043)
+ (6 739073) (7 739102) (8 739132) (9 739162) (10 739191) (11 739221))
+ (2025 (12 739251) (1 739280) (2 739310) (3 739339) (4 739369) (5 739398)
+ (6 739427) (6.5 739457) (7 739486) (8 739516) (9 739545) (10 739575)
+ (11 739605)))
"Alist of Chinese year structures as determined by `chinese-year'.
The default can be nil, but some values are precomputed for efficiency.")
+2013-09-05 Glenn Morris <rgm@gnu.org>
+
+ * semantic/fw.el (semantic-make-local-hook):
+ Simplify by dropping Emacs <= 20.
+
2013-07-29 David Engster <deng@randomsample.de>
* lisp/cedet/cedet.el (cedet-packages): Remove speedbar since its
(defalias 'semantic-make-local-hook
- (if (and (not (featurep 'xemacs))
- (>= emacs-major-version 21))
+ (if (featurep 'emacs)
#'identity #'make-local-hook))
(defalias 'semantic-mode-line-update
"Save a function restoring the state of input history search.
Save `comint-input-ring-index' to the additional state parameter
in the search status stack."
- `(lambda (cmd)
- (comint-history-isearch-pop-state cmd ,comint-input-ring-index)))
+ (let ((index comint-input-ring-index))
+ (lambda (cmd)
+ (comint-history-isearch-pop-state cmd index))))
(defun comint-history-isearch-pop-state (_cmd hist-pos)
"Restore the input history search state.
-;;; cus-edit.el --- tools for customizing Emacs and Lisp packages
+;;; cus-edit.el --- tools for customizing Emacs and Lisp packages -*- lexical-binding:t -*-
;;
;; Copyright (C) 1996-1997, 1999-2013 Free Software Foundation, Inc.
;;
(let ((coding-system-for-read nil))
(customize-save-variable list-var (eval list-var)))
(add-hook 'after-init-hook
- `(lambda ()
- (customize-push-and-save ',list-var ',elts)))))
+ (lambda ()
+ (customize-push-and-save list-var elts)))))
;;;###autoload
(defun customize ()
"*Customize Saved*"))))
(declare-function apropos-parse-pattern "apropos" (pattern))
+(defvar apropos-regexp)
;;;###autoload
(defun customize-apropos (pattern &optional type)
(require 'apropos)
(unless (memq type '(nil options faces groups))
(error "Invalid setting type %s" (symbol-name type)))
- (apropos-parse-pattern pattern)
+ (apropos-parse-pattern pattern) ;Sets apropos-regexp by side-effect: Yuck!
(let (found)
(mapatoms
- `(lambda (symbol)
- (when (string-match-p apropos-regexp (symbol-name symbol))
- ,(if (memq type '(nil groups))
- '(if (get symbol 'custom-group)
- (push (list symbol 'custom-group) found)))
- ,(if (memq type '(nil faces))
- '(if (custom-facep symbol)
- (push (list symbol 'custom-face) found)))
- ,(if (memq type '(nil options))
- `(if (and (boundp symbol)
- (eq (indirect-variable symbol) symbol)
- (or (get symbol 'saved-value)
- (custom-variable-p symbol)))
- (push (list symbol 'custom-variable) found))))))
+ (lambda (symbol)
+ (when (string-match-p apropos-regexp (symbol-name symbol))
+ (if (memq type '(nil groups))
+ (if (get symbol 'custom-group)
+ (push (list symbol 'custom-group) found)))
+ (if (memq type '(nil faces))
+ (if (custom-facep symbol)
+ (push (list symbol 'custom-face) found)))
+ (if (memq type '(nil options))
+ (if (and (boundp symbol)
+ (eq (indirect-variable symbol) symbol)
+ (or (get symbol 'saved-value)
+ (custom-variable-p symbol)))
+ (push (list symbol 'custom-variable) found))))))
(unless found
(error "No customizable %s matching %s" (symbol-name type) pattern))
(custom-buffer-create
(widget-create
'editable-field
:size 40 :help-echo echo
- :action `(lambda (widget &optional event)
- (customize-apropos (split-string (widget-value widget)))))))
+ :action (lambda (widget &optional _event)
+ (customize-apropos (split-string (widget-value widget)))))))
(widget-insert " ")
(widget-create-child-and-convert
search-widget 'push-button
-;;; descr-text.el --- describe text mode
+;;; descr-text.el --- describe text mode -*- lexical-binding:t -*-
;; Copyright (C) 1994-1996, 2001-2013 Free Software Foundation, Inc.
;;; Commentary:
-;;; Describe-Text Mode.
+;; Describe-Text Mode.
;;; Code:
"Insert text to describe WIDGET in the current buffer."
(insert-text-button
(symbol-name (if (symbolp widget) widget (car widget)))
- 'action `(lambda (&rest ignore)
- (widget-browse ',widget))
+ 'action (lambda (&rest _ignore) (widget-browse widget))
'help-echo "mouse-2, RET: browse this widget")
(insert " ")
(insert-text-button
(<= (length pp) (- (window-width) (current-column))))
(insert pp)
(insert-text-button
- "[Show]" 'action `(lambda (&rest ignore)
- (with-output-to-temp-buffer
- "*Pp Eval Output*"
- (princ ',pp)))
+ "[Show]" 'action (lambda (&rest _ignore)
+ (with-output-to-temp-buffer
+ "*Pp Eval Output*"
+ (princ pp)))
'help-echo "mouse-2, RET: pretty print value in another buffer"))))
(defun describe-property-list (properties)
(cond ((eq key 'category)
(insert-text-button
(symbol-name value)
- 'action `(lambda (&rest ignore)
- (describe-text-category ',value))
+ 'action (lambda (&rest _ignore)
+ (describe-text-category value))
'follow-link t
'help-echo "mouse-2, RET: describe this category"))
((memq key '(face font-lock-face mouse-face))
((and (< char 32) (not (memq char '(9 10))))
'escape-glyph)))))
(if face (list (list "hardcoded face"
- `(insert-text-button
+ `(insert-text-button ;FIXME: Wrap in lambda!
,(symbol-name face)
'type 'help-face
'help-args '(,face))))))
-;;; dframe --- dedicate frame support modes
+;;; dframe --- dedicate frame support modes -*- lexical-binding:t -*-
;; Copyright (C) 1996-2013 Free Software Foundation, Inc.
FRAME-NAME is the name of the frame to create.
LOCAL-MODE-FN is the function used to call this one.
PARAMETERS are frame parameters to apply to this dframe.
-DELETE-HOOK are hooks to run when deleting a frame.
-POPUP-HOOK are hooks to run before showing a frame.
-CREATE-HOOK are hooks to run after creating a frame."
+DELETE-HOOK is a hook to run when deleting a frame.
+POPUP-HOOK is a hook to run before showing a frame.
+CREATE-HOOK is a hook to run after creating a frame."
+ (let ((conv-hook (lambda (val)
+ (let ((sym (make-symbol "hook")))
+ (set sym val) sym))))
+ (if (consp delete-hook) (setq delete-hook (funcall conv-hook delete-hook)))
+ (if (consp create-hook) (setq create-hook (funcall conv-hook create-hook)))
+ (if (consp popup-hook) (setq popup-hook (funcall conv-hook popup-hook))))
;; toggle frame on and off.
(if (not arg) (if (dframe-live-p (symbol-value frame-var))
(setq arg -1) (setq arg 1)))
;; turn the frame off on neg number
(if (and (numberp arg) (< arg 0))
(progn
- (run-hooks 'delete-hook)
+ (run-hooks delete-hook)
(if (and (symbol-value frame-var)
(frame-live-p (symbol-value frame-var)))
(progn
(set frame-var nil))
;; Set this as our currently attached frame
(setq dframe-attached-frame (selected-frame))
- (run-hooks 'popup-hook)
+ (run-hooks popup-hook)
;; Updated the buffer passed in to contain all the hacks needed
;; to make it work well in a dedicated window.
(with-current-buffer (symbol-value buffer-var)
(setq temp-buffer-show-function 'dframe-temp-buffer-show-function)
;; If this buffer is killed, we must make sure that we destroy
;; the frame the dedicated window is in.
- (add-hook 'kill-buffer-hook `(lambda ()
- (let ((skilling (boundp 'skilling)))
- (if skilling
- nil
- (if dframe-controlled
- (progn
- (funcall dframe-controlled -1)
- (setq ,buffer-var nil)
- )))))
+ (add-hook 'kill-buffer-hook (lambda ()
+ (let ((skilling (boundp 'skilling)))
+ (if skilling
+ nil
+ (if dframe-controlled
+ (progn
+ (funcall dframe-controlled -1)
+ (set buffer-var nil)
+ )))))
t t)
)
;; Get the frame to work in
(switch-to-buffer (symbol-value buffer-var))
(set-window-dedicated-p (selected-window) t))
;; Run hooks (like reposition)
- (run-hooks 'create-hook)
+ (run-hooks create-hook)
;; Frame name
(if (and (or (null window-system) (eq window-system 'pc))
(fboundp 'set-frame-name))
If the selected frame is not in the symbol FRAME-VAR, then FRAME-VAR
frame is selected. If the FRAME-VAR is active, then select the
attached frame. If FRAME-VAR is nil, ACTIVATOR is called to
-created it. HOOK is an optional argument of hooks to run when
+created it. HOOK is an optional hook to run when
selecting FRAME-VAR."
(interactive)
(if (eq (selected-frame) (symbol-value frame-var))
)
(other-frame 0)
;; If updates are off, then refresh the frame (they want it now...)
- (run-hooks 'hook))
+ (run-hooks hook))
(defun dframe-close-frame ()
-;;; dired-x.el --- extra Dired functionality
+;;; dired-x.el --- extra Dired functionality -*- lexical-binding:t -*-
;; Copyright (C) 1993-1994, 1997, 2001-2013 Free Software Foundation,
;; Inc.
(setq count (1+ count)
start (1+ start)))
;; ... and prepend a "../" for each slash found:
- (dotimes (_n count)
+ (dotimes (_ count)
(setq name1 (concat "../" name1)))))
(make-symbolic-link
(directory-file-name name1) ; must not link to foo/
;; Does anyone use this? - lrd 6/29/93.
;; Apparently people do use it. - lrd 12/22/97.
-(with-no-warnings
- ;; Warnings are suppressed to avoid "global/dynamic var `X' lacks a prefix".
- ;; This is unbearably ugly, but not more than having global variables
- ;; named size, time, name or s, however practical it can be while writing
- ;; `dired-mark-sexp' predicates.
- (defvar inode)
- (defvar s)
- (defvar mode)
- (defvar nlink)
- (defvar uid)
- (defvar gid)
- (defvar size)
- (defvar time)
- (defvar name)
- (defvar sym))
-
(defun dired-mark-sexp (predicate &optional unflag-p)
"Mark files for which PREDICATE returns non-nil.
With a prefix arg, unmark or unflag those files instead.
s nil))
(setq mode (buffer-substring (point) (+ mode-len (point))))
(forward-char mode-len)
+ ;; Skip any extended attributes marker ("." or "+").
+ (or (looking-at " ")
+ (forward-char 1))
(setq nlink (read (current-buffer)))
;; Karsten Wenger <kw@cis.uni-muenchen.de> fixed uid.
(setq uid (buffer-substring (1+ (point))
(line-end-position))
""))
t)
- (eval predicate)))
+ (eval predicate
+ `((inode . ,inode)
+ (s . ,s)
+ (mode . ,mode)
+ (nlink . ,nlink)
+ (uid . ,uid)
+ (gid . ,gid)
+ (size . ,size)
+ (time . ,time)
+ (name . ,name)
+ (sym . ,sym)))))
(format "'%s file" predicate))))
\f
;;;***
\f
-;;;### (autoloads nil "dired-x" "dired-x.el" "1419d865898f84c17f172320e578380c")
+;;;### (autoloads nil "dired-x" "dired-x.el" "11fd4a8afa32507cc32d4a04d852587f")
;;; Generated autoloads from dired-x.el
(autoload 'dired-jump "dired-x" "\
usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
[DOCSTRING] [INTERACTIVE-FORM]
BODY...)"
- (declare (doc-string 3)
+ (declare (doc-string 3) (indent 2)
(debug (&define name ;; thing being advised.
(name ;; class is [&or "before" "around" "after"
;; "activation" "deactivation"]
((and for-effect (setq tmp (get fn 'side-effect-free))
(or byte-compile-delete-errors
(eq tmp 'error-free)
- ;; Detect the expansion of (pop foo).
- ;; There is no need to compile the call to `car' there.
- (and (eq fn 'car)
- (eq (car-safe (cadr form)) 'prog1)
- (let ((var (cadr (cadr form)))
- (last (nth 2 (cadr form))))
- (and (symbolp var)
- (null (nthcdr 3 (cadr form)))
- (eq (car-safe last) 'setq)
- (eq (cadr last) var)
- (eq (car-safe (nth 2 last)) 'cdr)
- (eq (cadr (nth 2 last)) var))))
(progn
(byte-compile-warn "value returned from %s is unused"
(prin1-to-string form))
;;; bytecomp.el --- compilation of Lisp code into byte code -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2013 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2013
+;; Free Software Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
(message "Checking %s..." directory)
(dolist (file (directory-files directory))
(let ((source (expand-file-name file directory)))
- (if (and (not (member file '("RCS" "CVS")))
- (not (eq ?\. (aref file 0)))
- (file-directory-p source)
- (not (file-symlink-p source)))
- ;; This file is a subdirectory. Handle them differently.
- (when (or (null arg) (eq 0 arg)
- (y-or-n-p (concat "Check " source "? ")))
- (setq directories (nconc directories (list source))))
+ (if (file-directory-p source)
+ (and (not (member file '("RCS" "CVS")))
+ (not (eq ?\. (aref file 0)))
+ (not (file-symlink-p source))
+ ;; This file is a subdirectory. Handle them differently.
+ (or (null arg) (eq 0 arg)
+ (y-or-n-p (concat "Check " source "? ")))
+ (setq directories (nconc directories (list source))))
;; It is an ordinary file. Decide whether to compile it.
(if (and (string-match emacs-lisp-file-regexp source)
;; The next 2 tests avoid compiling lock files
;;
;; If a variable is mutated (updated by setq), and it is used in a closure
;; we wrap its definition with list: (list val) and we also replace
-;; var => (car var) wherever this variable is used, and also
+;; var => (car-safe var) wherever this variable is used, and also
;; (setq var value) => (setcar var value) where it is updated.
;;
;; If defun argument is closure mutable, we letbind it and wrap it's
;; If `fv' is a variable that's wrapped in a cons-cell,
;; we want to put the cons-cell itself in the closure,
;; rather than just a copy of its current content.
- (`(car ,iexp . ,_)
+ (`(car-safe ,iexp . ,_)
(push iexp envector)
- (push `(,fv . (car (internal-get-closed-var ,i))) new-env))
+ (push `(,fv . (car-safe (internal-get-closed-var ,i))) new-env))
(_
(push exp envector)
(push `(,fv . (internal-get-closed-var ,i)) new-env))))
(dolist (arg args)
(if (not (member (cons (list arg) parentform) cconv-captured+mutated))
(if (assq arg new-env) (push `(,arg) new-env))
- (push `(,arg . (car ,arg)) new-env)
+ (push `(,arg . (car-safe ,arg)) new-env)
(push `(,arg (list ,arg)) letbind)))
(setq body-new (mapcar (lambda (form)
used to get its value. This is used for variables that are copied into
closures, moved into cons cells, ...
ENV is a list where each entry takes the shape either:
- (VAR . (car EXP)): VAR has been moved into the car of a cons-cell, and EXP
+ (VAR . (car-safe EXP)): VAR has been moved into the car of a cons-cell, and EXP
is an expression that evaluates to this cons-cell.
(VAR . (internal-get-closed-var N)): VAR has been copied into the closure
environment's Nth slot.
(push `(,var . (apply-partially ,var . ,fvs)) new-env)
(dolist (fv fvs)
(cl-pushnew fv new-extend)
- (if (and (eq 'car (car-safe (cdr (assq fv env))))
+ (if (and (eq 'car-safe (car-safe (cdr (assq fv env))))
(not (memq fv funargs)))
- (push `(,fv . (car ,fv)) funcbody-env)))
+ (push `(,fv . (car-safe ,fv)) funcbody-env)))
`(function (lambda ,funcvars .
,(mapcar (lambda (form)
(cconv-convert
;; Check if it needs to be turned into a "ref-cell".
((member (cons binder form) cconv-captured+mutated)
;; Declared variable is mutated and captured.
- (push `(,var . (car ,var)) new-env)
+ (push `(,var . (car-safe ,var)) new-env)
`(list ,(cconv-convert value env extend)))
;; Normal default case.
(value (cconv-convert (pop forms) env extend)))
(push (pcase sym-new
((pred symbolp) `(setq ,sym-new ,value))
- (`(car ,iexp) `(setcar ,iexp ,value))
+ (`(car-safe ,iexp) `(setcar ,iexp ,value))
;; This "should never happen", but for variables which are
;; mutated+captured+unused, we may end up trying to `setq'
;; on a closed-over variable, so just drop the setq.
,@(mapcar (lambda (fv)
(let ((exp (or (cdr (assq fv env)) fv)))
(pcase exp
- (`(car ,iexp . ,_) iexp)
+ (`(car-safe ,iexp . ,_) iexp)
(_ exp))))
fvs)
,@(mapcar (lambda (arg)
(cond
((byte-compile-not-lexical-var-p arg)
(byte-compile-log-warning
- (format "Argument %S is not a lexical variable" arg)))
+ (format "Lexical argument shadows the dynamic variable %S"
+ arg)))
((eq ?& (aref (symbol-name arg) 0)) nil) ;Ignore &rest, &optional, ...
(t (let ((varstruct (list arg nil nil nil nil)))
(cl-pushnew arg byte-compile-lexical-variables)
;;;###autoload
(defmacro cl-defsubst (name args &rest body)
"Define NAME as a function.
-Like `defun', except the function is automatically declared `inline',
+Like `defun', except the function is automatically declared `inline' and
+the arguments are immutable.
ARGLIST allows full Common Lisp conventions, and BODY is implicitly
surrounded by (cl-block NAME ...).
+The function's arguments should be treated as immutable.
\(fn NAME ARGLIST [DOCSTRING] BODY...)"
(declare (debug cl-defun) (indent 2))
(let* ((argns (cl--arglist-args args)) (p argns)
- (pbody (cons 'progn body))
- (unsafe (not (cl--safe-expr-p pbody))))
+ (pbody (cons 'progn body)))
(while (and p (eq (cl--expr-contains args (car p)) 1)) (pop p))
`(progn
,(if p nil ; give up if defaults refer to earlier args
;; does not pay attention to the argvs (and
;; cl-expr-access-order itself is also too naive).
nil
- ,(and (memq '&key args) 'cl-whole) ,unsafe ,@argns)))
+ ,(and (memq '&key args) 'cl-whole) nil ,@argns)))
(cl-defun ,name ,args ,@body))))
-(defun cl--defsubst-expand (argns body simple whole unsafe &rest argvs)
+(defun cl--defsubst-expand (argns body simple whole _unsafe &rest argvs)
(if (and whole (not (cl--safe-expr-p (cons 'progn argvs)))) whole
(if (cl--simple-exprs-p argvs) (setq simple t))
(let* ((substs ())
(cl-mapcar (lambda (argn argv)
(if (or simple (macroexp-const-p argv))
(progn (push (cons argn argv) substs)
- (and unsafe (list argn argv)))
+ nil)
(list argn argv)))
argns argvs))))
;; FIXME: `sublis/subst' will happily substitute the symbol
predicate
flag)))
-(defun crm--select-current-element ()
+(defun crm--current-element ()
"Parse the minibuffer to find the current element.
-Place an overlay on the element, with a `field' property, and return it."
- (let* ((bob (minibuffer-prompt-end))
- (start (save-excursion
+Return the element's boundaries as (START . END)."
+ (let ((bob (minibuffer-prompt-end)))
+ (cons (save-excursion
(if (re-search-backward crm-separator bob t)
(match-end 0)
- bob)))
- (end (save-excursion
+ bob))
+ (save-excursion
(if (re-search-forward crm-separator nil t)
(match-beginning 0)
- (point-max))))
- (ol (make-overlay start end nil nil t)))
- (overlay-put ol 'field (make-symbol "crm"))
- ol))
-
-(defmacro crm--completion-command (command)
- "Make COMMAND a completion command for `completing-read-multiple'."
- `(let ((ol (crm--select-current-element)))
- (unwind-protect
- ,command
- (delete-overlay ol))))
+ (point-max))))))
+
+(defmacro crm--completion-command (beg end &rest body)
+ "Run BODY with BEG and END bound to the current element's boundaries."
+ (declare (indent 2) (debug (sexp sexp &rest body)))
+ `(let* ((crm--boundaries (crm--current-element))
+ (,beg (car crm--boundaries))
+ (,end (cdr crm--boundaries)))
+ ,@body))
(defun crm-completion-help ()
"Display a list of possible completions of the current minibuffer element."
(interactive)
- (crm--completion-command (minibuffer-completion-help))
+ (crm--completion-command beg end
+ (minibuffer-completion-help beg end))
nil)
(defun crm-complete ()
Return t if the current element is now a valid match; otherwise return nil."
(interactive)
- (crm--completion-command (minibuffer-complete)))
+ (crm--completion-command beg end
+ (completion-in-region beg end
+ minibuffer-completion-table
+ minibuffer-completion-predicate)))
(defun crm-complete-word ()
"Complete the current element at most a single word.
Like `minibuffer-complete-word' but for `completing-read-multiple'."
(interactive)
- (crm--completion-command (minibuffer-complete-word)))
+ (crm--completion-command beg end
+ (completion-in-region--single-word
+ beg end minibuffer-completion-table minibuffer-completion-predicate)))
(defun crm-complete-and-exit ()
"If all of the minibuffer elements are valid completions then exit.
(goto-char (minibuffer-prompt-end))
(while
(and doexit
- (let ((ol (crm--select-current-element)))
- (goto-char (overlay-end ol))
- (unwind-protect
- (catch 'exit
- (minibuffer-complete-and-exit)
- ;; This did not throw `exit', so there was a problem.
- (setq doexit nil))
- (goto-char (overlay-end ol))
- (delete-overlay ol))
- (not (eobp)))
+ (crm--completion-command beg end
+ (let ((end (copy-marker end t)))
+ (goto-char end)
+ (setq doexit nil)
+ (completion-complete-and-exit beg end
+ (lambda () (setq doexit t)))
+ (goto-char end)
+ (not (eobp))))
(looking-at crm-separator))
;; Skip to the next element.
(goto-char (match-end 0)))
(add-hook 'post-self-insert-hook prn-info nil t)
(remove-hook 'post-self-insert-hook prn-info t))))
+;; FIXME: This changes Emacs's behavior when the file is loaded!
(add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-post-insert-mode)
;;;###autoload
(defun eldoc-beginning-of-sexp ()
(let ((parse-sexp-ignore-comments t)
(num-skipped-sexps 0))
- (condition-case err
+ (condition-case _
(progn
;; First account for the case the point is directly over a
;; beginning of a nested sexp.
- (condition-case err
+ (condition-case _
(let ((p (point)))
(forward-sexp -1)
(forward-sexp 1)
(let ((defn (and (fboundp fsym)
(symbol-function fsym))))
(and (symbolp defn)
- (condition-case err
+ (condition-case _
(setq defn (indirect-function fsym))
(error (setq defn nil))))
defn))
;; Follow aliases.
(setq me (cons (symbol-function head) (cdr place))))
(if (eq me place)
- (error "%S is not a valid place expression" place)
+ (if (and (symbolp head) (get head 'setf-method))
+ (error "Incompatible place needs recompilation: %S" head)
+ (error "%S is not a valid place expression" place))
(gv-get me do)))))))
;;;###autoload
(mapcar #'symbol-name (lisp--local-variables))))))
lastvars)))))
+;; FIXME: Support for Company brings in features which straddle eldoc.
+;; We should consolidate this, so that major modes can provide all that
+;; data all at once:
+;; - a function to extract "the reference at point" (may be more complex
+;; than a mere string, to distinguish various namespaces).
+;; - a function to jump to such a reference.
+;; - a function to show the signature/interface of such a reference.
+;; - a function to build a help-buffer about that reference.
+;; FIXME: Those functions should also be used by the normal completion code in
+;; the *Completions* buffer.
+
+(defun lisp--company-doc-buffer (str)
+ (let ((symbol (intern-soft str)))
+ ;; FIXME: we really don't want to "display-buffer and then undo it".
+ (save-window-excursion
+ ;; Make sure we don't display it in another frame, otherwise
+ ;; save-window-excursion won't be able to undo it.
+ (let ((display-buffer-overriding-action
+ '(nil . ((inhibit-switch-frame . t)))))
+ (ignore-errors
+ (cond
+ ((fboundp symbol) (describe-function symbol))
+ ((boundp symbol) (describe-variable symbol))
+ ((featurep symbol) (describe-package symbol))
+ ((facep symbol) (describe-face symbol))
+ (t (signal 'user-error nil)))
+ (help-buffer))))))
+
+(defun lisp--company-doc-string (str)
+ (let* ((symbol (intern-soft str))
+ (doc (if (fboundp symbol)
+ (documentation symbol t)
+ (documentation-property symbol 'variable-documentation t))))
+ (and (stringp doc)
+ (string-match ".*$" doc)
+ (match-string 0 doc))))
+
+(declare-function find-library-name "find-func" (library))
+
+(defun lisp--company-location (str)
+ (let ((sym (intern-soft str)))
+ (cond
+ ((fboundp sym) (find-definition-noselect sym nil))
+ ((boundp sym) (find-definition-noselect sym 'defvar))
+ ((featurep sym)
+ (require 'find-func)
+ (cons (find-file-noselect (find-library-name
+ (symbol-name sym)))
+ 0))
+ ((facep sym) (find-definition-noselect sym 'defface)))))
+
(defun lisp-completion-at-point (&optional _predicate)
"Function used for `completion-at-point-functions' in `emacs-lisp-mode'."
(with-syntax-table emacs-lisp-mode-syntax-table
lisp--local-variables-completion-table
obarray) ;Could be anything.
:annotation-function
- (lambda (str) (if (fboundp (intern-soft str)) " <f>")))
+ (lambda (str) (if (fboundp (intern-soft str)) " <f>"))
+ :company-doc-buffer #'lisp--company-doc-buffer
+ :company-docsig #'lisp--company-doc-string
+ :company-location #'lisp--company-location)
;; Looks like a funcall position. Let's double check.
(save-excursion
(goto-char (1- beg))
;; we should use something like a symbol-property.
(`declare
(list t (mapcar (lambda (x) (symbol-name (car x)))
- (delete-dups
- (append
- macro-declarations-alist
- defun-declarations-alist)))))
+ (delete-dups
+ ;; FIXME: We should include some
+ ;; docstring with each entry.
+ (append
+ macro-declarations-alist
+ defun-declarations-alist)))))
((and (or `condition-case `condition-case-unless-debug)
(guard (save-excursion
(ignore-errors
(< (point) beg)))))
(list t obarray
:predicate (lambda (sym) (get sym 'error-conditions))))
- (_ (list nil obarray #'fboundp))))))))
+ (_ (list nil obarray
+ :predicate #'fboundp
+ :company-doc-buffer #'lisp--company-doc-buffer
+ :company-docsig #'lisp--company-doc-string
+ :company-location #'lisp--company-location
+ ))))))))
(when end
(let ((tail (if (null (car table-etc))
(cdr table-etc)
(defun package-activate-1 (pkg-desc)
(let* ((name (package-desc-name pkg-desc))
- (pkg-dir (package-desc-dir pkg-desc)))
+ (pkg-dir (package-desc-dir pkg-desc))
+ (pkg-dir-dir (file-name-as-directory pkg-dir)))
(unless pkg-dir
(error "Internal error: unable to find directory for `%s'"
(package-desc-full-name pkg-desc)))
+ ;; Add to load path, add autoloads, and activate the package.
+ (let ((old-lp load-path))
+ (with-demoted-errors
+ (load (expand-file-name (format "%s-autoloads" name) pkg-dir) nil t))
+ (when (and (eq old-lp load-path)
+ (not (or (member pkg-dir load-path)
+ (member pkg-dir-dir load-path))))
+ ;; Old packages don't add themselves to the `load-path', so we have to
+ ;; do it ourselves.
+ (push pkg-dir load-path)))
;; Add info node.
(when (file-exists-p (expand-file-name "dir" pkg-dir))
;; FIXME: not the friendliest, but simple.
(require 'info)
(info-initialize)
(push pkg-dir Info-directory-list))
- ;; Add to load path, add autoloads, and activate the package.
- (push pkg-dir load-path)
- (load (expand-file-name (format "%s-autoloads" name) pkg-dir) nil t)
(push name package-activated-list)
;; Don't return nil.
t))
(epg-sub-key-id (car (epg-key-sub-key-list
(widget-get widget :value))))))
-(eval-and-compile
- (if (fboundp 'encode-coding-string)
- (defalias 'epa--encode-coding-string 'encode-coding-string)
- (defalias 'epa--encode-coding-string 'identity)))
+(defalias 'epa--encode-coding-string
+ (if (fboundp 'encode-coding-string) #'encode-coding-string #'identity))
-(eval-and-compile
- (if (fboundp 'decode-coding-string)
- (defalias 'epa--decode-coding-string 'decode-coding-string)
- (defalias 'epa--decode-coding-string 'identity)))
+(defalias 'epa--decode-coding-string
+ (if (fboundp 'decode-coding-string) #'decode-coding-string #'identity))
-(defun epa-key-list-mode ()
+(define-derived-mode epa-key-list-mode special-mode "Keys"
"Major mode for `epa-list-keys'."
- (kill-all-local-variables)
(buffer-disable-undo)
- (setq major-mode 'epa-key-list-mode
- mode-name "Keys"
- truncate-lines t
+ (setq truncate-lines t
buffer-read-only t)
- (use-local-map epa-key-list-mode-map)
- (make-local-variable 'font-lock-defaults)
- (setq font-lock-defaults '(epa-font-lock-keywords t))
+ (setq-local font-lock-defaults '(epa-font-lock-keywords t))
;; In XEmacs, auto-initialization of font-lock is not effective
;; if buffer-file-name is not set.
(font-lock-set-defaults)
(make-local-variable 'epa-exit-buffer-function)
- (make-local-variable 'revert-buffer-function)
- (setq revert-buffer-function 'epa--key-list-revert-buffer)
- (run-mode-hooks 'epa-key-list-mode-hook))
+ (setq-local revert-buffer-function #'epa--key-list-revert-buffer))
-(defun epa-key-mode ()
+(define-derived-mode epa-key-mode special-mode "Key"
"Major mode for a key description."
- (kill-all-local-variables)
(buffer-disable-undo)
- (setq major-mode 'epa-key-mode
- mode-name "Key"
- truncate-lines t
+ (setq truncate-lines t
buffer-read-only t)
- (use-local-map epa-key-mode-map)
- (make-local-variable 'font-lock-defaults)
- (setq font-lock-defaults '(epa-font-lock-keywords t))
+ (setq-local font-lock-defaults '(epa-font-lock-keywords t))
;; In XEmacs, auto-initialization of font-lock is not effective
;; if buffer-file-name is not set.
(font-lock-set-defaults)
- (make-local-variable 'epa-exit-buffer-function)
- (run-mode-hooks 'epa-key-mode-hook))
+ (make-local-variable 'epa-exit-buffer-function))
-(defun epa-info-mode ()
+(define-derived-mode epa-info-mode special-mode "Info"
"Major mode for `epa-info-buffer'."
- (kill-all-local-variables)
(buffer-disable-undo)
- (setq major-mode 'epa-info-mode
- mode-name "Info"
- truncate-lines t
- buffer-read-only t)
- (use-local-map epa-info-mode-map)
- (run-mode-hooks 'epa-info-mode-hook))
+ (setq truncate-lines t
+ buffer-read-only t))
(defun epa-mark-key (&optional arg)
"Mark a key on the current line.
(error "No cleartext tail"))
(epa-verify-region cleartext-start cleartext-end))))))
-(eval-and-compile
+(defalias 'epa--select-safe-coding-system
(if (fboundp 'select-safe-coding-system)
- (defalias 'epa--select-safe-coding-system 'select-safe-coding-system)
- (defun epa--select-safe-coding-system (_from _to)
+ #'select-safe-coding-system
+ (lambda (_from _to)
buffer-file-coding-system)))
;;;###autoload
'start-open t
'end-open t)))))
-(eval-and-compile
+(defalias 'epa--derived-mode-p
(if (fboundp 'derived-mode-p)
- (defalias 'epa--derived-mode-p 'derived-mode-p)
- (defun epa--derived-mode-p (&rest modes)
+ #'derived-mode-p
+ (lambda (&rest modes)
"Non-nil if the current major mode is derived from one of MODES.
Uses the `derived-mode-parent' property of the symbol to trace backwards."
(let ((parent major-mode))
- (while (and (not (memq parent modes))
- (setq parent (get parent 'derived-mode-parent))))
- parent))))
+ (while (and (not (memq parent modes))
+ (setq parent (get parent 'derived-mode-parent))))
+ parent))))
;;;###autoload
(defun epa-encrypt-region (start end recipients sign signers)
(if (epg-context-result-for context 'import)
(epa-display-info (epg-import-result-to-string
(epg-context-result-for context 'import))))
+ ;; FIXME: Why not use the (otherwise unused) epa--derived-mode-p?
(if (eq major-mode 'epa-key-list-mode)
(apply #'epa--list-keys epa-list-keys-arguments))))
(defun epg--process-filter (process input)
(if epg-debug
- (save-excursion
- (unless epg-debug-buffer
- (setq epg-debug-buffer (generate-new-buffer " *epg-debug*")))
- (set-buffer epg-debug-buffer)
+ (with-current-buffer
+ (or epg-debug-buffer
+ (setq epg-debug-buffer (generate-new-buffer " *epg-debug*")))
(goto-char (point-max))
(insert input)))
(if (buffer-live-p (process-buffer process))
(with-current-buffer (process-buffer process)
- (goto-char (point-max))
- (insert input)
- (unless epg-process-filter-running
- (unwind-protect
- (progn
- (setq epg-process-filter-running t)
- (goto-char epg-read-point)
- (beginning-of-line)
- (while (looking-at ".*\n") ;the input line finished
- (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)")
- (let* ((status (match-string 1))
- (string (match-string 2))
- (symbol (intern-soft (concat "epg--status-"
- status))))
- (if (member status epg-pending-status-list)
- (setq epg-pending-status-list nil))
- (if (and symbol
- (fboundp symbol))
- (funcall symbol epg-context string))
- (setq epg-last-status (cons status string))))
- (forward-line)
- (setq epg-read-point (point))))
- (setq epg-process-filter-running nil))))))
+ (save-excursion
+ (goto-char (point-max))
+ (insert input)
+ (unless epg-process-filter-running
+ (let ((epg-process-filter-running t))
+ (goto-char epg-read-point)
+ (beginning-of-line)
+ (while (looking-at ".*\n") ;the input line finished
+ (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)")
+ (let* ((status (match-string 1))
+ (string (match-string 2))
+ (symbol (intern-soft (concat "epg--status-"
+ status))))
+ (if (member status epg-pending-status-list)
+ (setq epg-pending-status-list nil))
+ (if (and symbol
+ (fboundp symbol))
+ (funcall symbol epg-context string))
+ (setq epg-last-status (cons status string))))
+ (forward-line)
+ (setq epg-read-point (point)))))))))
(defun epg-read-output (context)
"Read the output file CONTEXT and return the content as a string."
(list "--" (epg-data-file plain)))))
;; `gpgsm' does not read passphrase from stdin, so waiting is not needed.
(unless (eq (epg-context-protocol context) 'CMS)
- (if sign
- (epg-wait-for-status context '("BEGIN_SIGNING"))
- (epg-wait-for-status context '("BEGIN_ENCRYPTION"))))
+ (epg-wait-for-status context
+ (if sign '("BEGIN_SIGNING") '("BEGIN_ENCRYPTION"))))
(when (epg-data-string plain)
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-string (epg-context-process context)
(mapcar
(lambda (l)
(cons (purecopy (car l)) (cdr l)))
- '(("perl" . perl-mode)
- ("perl5" . perl-mode)
- ("miniperl" . perl-mode)
- ("wish" . tcl-mode)
- ("wishx" . tcl-mode)
- ("tcl" . tcl-mode)
- ("tclsh" . tcl-mode)
- ("expect" . tcl-mode)
- ("scm" . scheme-mode)
- ("ash" . sh-mode)
- ("bash" . sh-mode)
- ("bash2" . sh-mode)
- ("csh" . sh-mode)
- ("dtksh" . sh-mode)
- ("es" . sh-mode)
- ("itcsh" . sh-mode)
- ("jsh" . sh-mode)
- ("ksh" . sh-mode)
- ("oash" . sh-mode)
- ("pdksh" . sh-mode)
- ("rbash" . sh-mode)
- ("rc" . sh-mode)
- ("rpm" . sh-mode)
- ("sh" . sh-mode)
- ("sh5" . sh-mode)
- ("tcsh" . sh-mode)
- ("wksh" . sh-mode)
- ("wsh" . sh-mode)
- ("zsh" . sh-mode)
- ("tail" . text-mode)
- ("more" . text-mode)
- ("less" . text-mode)
- ("pg" . text-mode)
- ("make" . makefile-gmake-mode) ; Debian uses this
- ("guile" . scheme-mode)
- ("clisp" . lisp-mode)
- ("emacs" . emacs-lisp-mode)))
+ '(("\\`\\(mini\\)?perl5?\\'" . perl-mode)
+ ("\\`wishx?\\'" . tcl-mode)
+ ("\\`tcl\\(sh\\)?\\'" . tcl-mode)
+ ("\\`expect\\'" . tcl-mode)
+ ("\\`scm\\'" . scheme-mode)
+ ("\\`[acjkwz]sh\\'" . sh-mode)
+ ("\\`bash2?\\'" . sh-mode)
+ ("\\`dtksh\\'" . sh-mode)
+ ("\\`es\\'" . sh-mode)
+ ("\\`itcsh\\'" . sh-mode)
+ ("\\`oash\\'" . sh-mode)
+ ("\\`pdksh\\'" . sh-mode)
+ ("\\`rbash\\'" . sh-mode)
+ ("\\`rc\\'" . sh-mode)
+ ("\\`rpm\\'" . sh-mode)
+ ("\\`sh5?\\'" . sh-mode)
+ ("\\`tcsh\\'" . sh-mode)
+ ("\\`wksh\\'" . sh-mode)
+ ("\\`tail\\'" . text-mode)
+ ("\\`more\\'" . text-mode)
+ ("\\`less\\'" . text-mode)
+ ("\\`pg\\'" . text-mode)
+ ("\\`make\\'" . makefile-gmake-mode) ; Debian uses this
+ ("\\`guile\\'" . scheme-mode)
+ ("\\`clisp\\'" . lisp-mode)
+ ("\\`emacs\\'" . emacs-lisp-mode)))
"Alist mapping interpreter names to major modes.
This is used for files whose first lines match `auto-mode-interpreter-regexp'.
-Each element looks like (INTERPRETER . MODE).
-If INTERPRETER matches the name of the interpreter specified in the first line
-of a script, mode MODE is enabled.
+Each element looks like (REGEXP . MODE).
+If REGEXP matches the name (minus any directory part) of the interpreter
+specified in the first line of a script, enable major mode MODE.
+
+Emacs versions earlier than 24.4 treat the car of each element as a
+literal string that must match the entire name, rather than a regexp.
+For backwards compatibility, any REGEXP that does not begin with \"\\\\\"
+continues to be treated in this way. This behavior may be removed in
+future and should not be relied upon.
See also `auto-mode-alist'.")
;; If we didn't, look for an interpreter specified in the first line.
;; As a special case, allow for things like "#!/bin/env perl", which
;; finds the interpreter anywhere in $PATH.
- (unless done
- (setq mode (save-excursion
- (goto-char (point-min))
- (if (looking-at auto-mode-interpreter-regexp)
- (match-string 2)
- ""))
- ;; Map interpreter name to a mode, signaling we're done at the
- ;; same time.
- done (assoc (file-name-nondirectory mode)
- interpreter-mode-alist))
- ;; If we found an interpreter mode to use, invoke it now.
- (if done
- (set-auto-mode-0 (cdr done) keep-mode-if-same)))
+ (and (not done)
+ (setq mode (save-excursion
+ (goto-char (point-min))
+ (if (looking-at auto-mode-interpreter-regexp)
+ (match-string 2))))
+ ;; Map interpreter name to a mode, signaling we're done at the
+ ;; same time.
+ (setq done (assoc-default
+ (file-name-nondirectory mode)
+ ;; Backwards compat: if car of i-m-alist does not start
+ ;; with "\\", treat as literal string.
+ (mapcar (lambda (e)
+ (if (string-match-p "\\`\\\\" (car e))
+ e
+ (cons
+ (format "\\`%s\\'" (regexp-quote (car e)))
+ (cdr e))))
+ interpreter-mode-alist)
+ #'string-match-p))
+ ;; If we found an interpreter mode to use, invoke it now.
+ (set-auto-mode-0 done keep-mode-if-same))
;; Next try matching the buffer beginning against magic-mode-alist.
(unless done
(if (setq done (save-excursion
(lambda (a b) (string< (symbol-name (car a))
(symbol-name (car b))))))
- (save-excursion
- (find-file generated-finder-keywords-file)
+ (with-current-buffer
+ (find-file-noselect generated-finder-keywords-file)
(setq buffer-undo-list t)
(erase-buffer)
(insert (autoload-rubric generated-finder-keywords-file
"The brightness of the background.
Set this to the symbol `dark' if your background color is dark,
`light' if your background is light, or nil (automatic by default)
-if you want Emacs to examine the brightness for you. Don't set this
-variable with `setq'; this won't have the expected effect."
+if you want Emacs to examine the brightness for you.
+
+If you change this without using customize, you should use
+`frame-set-background-mode' to update existing frames;
+e.g. (mapc 'frame-set-background-mode (frame-list))."
:group 'faces
:set #'(lambda (var value)
(set-default var value)
"WIN32SMINOR")
"Function argument constants used in InstallShield 3 and 5."))
-(defvar rul-generic-mode-syntax-table nil
+;; c++-mode-syntax-table used to be autoloaded, with an initial nil value.
+;; This file did not load cc-mode, and therefore rul-generic-mode-syntax-table
+;; would have different values according to whether or not cc-mode
+;; happened to be loaded before this file was.
+(require 'cc-mode)
+(defvar c++-mode-syntax-table)
+
+(defvar rul-generic-mode-syntax-table
+ (let ((table (make-syntax-table c++-mode-syntax-table)))
+ (modify-syntax-entry ?\r "> b" table)
+ (modify-syntax-entry ?\n "> b" table)
+ (modify-syntax-entry ?/ ". 124b" table)
+ (modify-syntax-entry ?* ". 23" table)
+ table)
"Syntax table to use in `rul-generic-mode' buffers.")
-(setq rul-generic-mode-syntax-table
- (make-syntax-table c++-mode-syntax-table))
-
-(modify-syntax-entry ?\r "> b" rul-generic-mode-syntax-table)
-(modify-syntax-entry ?\n "> b" rul-generic-mode-syntax-table)
-
-(modify-syntax-entry ?/ ". 124b" rul-generic-mode-syntax-table)
-(modify-syntax-entry ?* ". 23" rul-generic-mode-syntax-table)
-
;; here manually instead
(defun generic-rul-mode-setup-function ()
(make-local-variable 'parse-sexp-ignore-comments)
+2013-08-28 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * mm-decode.el (mm-temp-files-delete): Fix file deletion logic.
+
2013-08-19 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-util.el (mm-coding-system-priorities): Exclude iso-2022-jp-2 and
(split-string (buffer-string) "\n" t))))
fails)
(dolist (temp (append cache mm-temp-files-to-be-deleted))
- (unless (and (file-exists-p temp)
- (if (file-directory-p temp)
- ;; A parent directory left at the previous time.
+ (when (and (file-exists-p temp)
+ (if (file-directory-p temp)
+ ;; A parent directory left at the previous time.
+ (progn
+ (ignore-errors (delete-directory temp))
+ (file-exists-p temp))
+ ;; Delete a temporary file and its parent directory.
+ (ignore-errors (delete-file temp))
+ (or (file-exists-p temp)
(progn
+ (setq temp (file-name-directory temp))
(ignore-errors (delete-directory temp))
- (not (file-exists-p temp)))
- ;; Delete a temporary file and its parent directory.
- (ignore-errors (delete-file temp))
- (and (not (file-exists-p temp))
- (progn
- (setq temp (file-name-directory temp))
- (ignore-errors (delete-directory temp))
- (not (file-exists-p temp))))))
+ (file-exists-p temp)))))
(push temp fails)))
(if fails
;; Schedule the deletion of the files left at the next time.
(add-hook 'icomplete-post-command-hook 'icomplete-exhibit)
;;;_ = icomplete-with-completion-tables
-(defvar icomplete-with-completion-tables '(internal-complete-buffer)
+(defcustom icomplete-with-completion-tables t
"Specialized completion tables with which icomplete should operate.
Icomplete does not operate with any specialized completion tables
-except those on this list.")
+except those on this list."
+ :type '(choice (const :tag "All" t)
+ (repeat function)))
(defvar icomplete-minibuffer-map
(let ((map (make-sparse-keymap)))
Second entry becomes the first and can be selected with
`minibuffer-force-complete-and-exit'."
(interactive)
- (let* ((comps (completion-all-sorted-completions))
+ (let* ((beg (minibuffer-prompt-end))
+ (end (point-max))
+ (comps (completion-all-sorted-completions beg end))
(last (last comps)))
(when comps
(setcdr last (cons (car comps) (cdr last)))
- (completion--cache-all-sorted-completions (cdr comps)))))
+ (completion--cache-all-sorted-completions beg end (cdr comps)))))
(defun icomplete-backward-completions ()
"Step backward completions by one entry.
Last entry becomes the first and can be selected with
`minibuffer-force-complete-and-exit'."
(interactive)
- (let* ((comps (completion-all-sorted-completions))
+ (let* ((beg (minibuffer-prompt-end))
+ (end (point-max))
+ (comps (completion-all-sorted-completions beg end))
(last-but-one (last comps 2))
(last (cdr last-but-one)))
(when (consp last) ; At least two elements in comps
(setcdr last-but-one (cdr last))
(push (car last) comps)
- (completion--cache-all-sorted-completions comps))))
+ (completion--cache-all-sorted-completions beg end comps))))
;;;_ > icomplete-mode (&optional prefix)
;;;###autoload
"Insert icomplete completions display.
Should be run via minibuffer `post-command-hook'. See `icomplete-mode'
and `minibuffer-setup-hook'."
- (when (and icomplete-mode (icomplete-simple-completing-p))
+ (when (and icomplete-mode
+ (icomplete-simple-completing-p)) ;Shouldn't be necessary.
(save-excursion
(goto-char (point-max))
; Insert the match-status information:
are exhibited within the square braces.)"
(let* ((md (completion--field-metadata (field-beginning)))
- (comps (completion-all-sorted-completions))
+ (comps (completion-all-sorted-completions
+ (minibuffer-prompt-end) (point-max)))
(last (if (consp comps) (last comps)))
(base-size (cdr last))
(open-bracket (if require-match "(" "["))
""))
(image (if (file-exists-p image-file)
(create-image image-file)
- "[broken image]")))
+ (or (cdr (assoc-string "text" parameter-alist))
+ (and src (concat "[broken image:" src "]"))
+ "[broken image]"))))
(if (not (get-text-property start 'display))
(add-text-properties
- start (point) `(display ,image rear-nonsticky (display)))))
+ start (point)
+ `(display ,image rear-nonsticky (display)
+ help-echo ,(cdr (assoc-string "alt" parameter-alist))))))
;; text-only display, show alternative text if provided, or
;; otherwise a clue that there's meant to be a picture
(delete-region start (point))
(insert (or (cdr (assoc-string "text" parameter-alist))
(cdr (assoc-string "alt" parameter-alist))
- (and src
- (concat "[image:" src "]"))
+ (and src (concat "[image:" src "]"))
"[image]"))))))
(set-buffer-modified-p nil)))
;; Combining diacritics
(modify-category-entry '(#x300 . #x362) ?^)
;; Combining marks
- (modify-category-entry '(#x20d0 . #x20e3) ?^)
+ (modify-category-entry '(#x20d0 . #x20ff) ?^)
;; Fixme: syntax for symbols &c
)
;;; Code:
+(eval-when-compile (require 'cl-lib))
+
(defvar dos-codepage)
(autoload 'widget-value "wid-edit")
(coding-system-charset-list cs)))
(charsets charsets))
(if (coding-system-get cs :ascii-compatible-p)
- (add-to-list 'cs-charsets 'ascii))
+ (cl-pushnew 'ascii cs-charsets))
(if (catch 'ok
(when cs-charsets
(while charsets
function `select-safe-coding-system' (which see). This variable
overrides that argument.")
+(defun sanitize-coding-system-list (codings)
+ "Return a list of coding systems presumably more user-friendly than CODINGS."
+ ;; Change each safe coding system to the corresponding
+ ;; mime-charset name if it is also a coding system. Such a name
+ ;; is more friendly to users.
+ (setq codings
+ (mapcar (lambda (cs)
+ (let ((mime-charset (coding-system-get cs 'mime-charset)))
+ (if (and mime-charset (coding-system-p mime-charset)
+ (coding-system-equal cs mime-charset))
+ mime-charset cs)))
+ codings))
+
+ ;; Don't offer variations with locking shift, which you
+ ;; basically never want.
+ (let (l)
+ (dolist (elt codings (setq codings (nreverse l)))
+ (unless (or (eq 'coding-category-iso-7-else
+ (coding-system-category elt))
+ (eq 'coding-category-iso-8-else
+ (coding-system-category elt)))
+ (push elt l))))
+
+ ;; Remove raw-text, emacs-mule and no-conversion unless nothing
+ ;; else is available.
+ (or (delq 'raw-text
+ (delq 'emacs-mule
+ (delq 'no-conversion (copy-sequence codings))))
+ codings))
+
(defun select-safe-coding-system-interactively (from to codings unsafe
&optional rejected default)
"Select interactively a coding system for the region FROM ... TO.
from to coding 11)))))
unsafe)))
- ;; Change each safe coding system to the corresponding
- ;; mime-charset name if it is also a coding system. Such a name
- ;; is more friendly to users.
- (let ((l codings)
- mime-charset)
- (while l
- (setq mime-charset (coding-system-get (car l) :mime-charset))
- (if (and mime-charset (coding-system-p mime-charset)
- (coding-system-equal (car l) mime-charset))
- (setcar l mime-charset))
- (setq l (cdr l))))
-
- ;; Don't offer variations with locking shift, which you
- ;; basically never want.
- (let (l)
- (dolist (elt codings (setq codings (nreverse l)))
- (unless (or (eq 'coding-category-iso-7-else
- (coding-system-category elt))
- (eq 'coding-category-iso-8-else
- (coding-system-category elt)))
- (push elt l))))
-
- ;; Remove raw-text, emacs-mule and no-conversion unless nothing
- ;; else is available.
- (setq codings
- (or (delq 'raw-text
- (delq 'emacs-mule
- (delq 'no-conversion codings)))
- '(raw-text emacs-mule no-conversion)))
+ (setq codings (sanitize-coding-system-list codings))
(let ((window-configuration (current-window-configuration))
(bufname (buffer-name))
;; buffer local.
(input-method (completing-read prompt input-method-alist
nil t nil 'input-method-history
- default)))
+ (if (and default (symbolp default))
+ (symbol-name default)
+ default))))
(if (and input-method (symbolp input-method))
(setq input-method (symbol-name input-method)))
(if (> (length input-method) 0)
Return the key sequence as a string/vector."
(isearch-unread-key-sequence keylist)
(let (overriding-terminal-local-map)
- (read-key-sequence nil))) ; This will go through function-key-map, if nec.
+ ;; This will go through function-key-map, if nec.
+ ;; The arg DONT-DOWNCASE-LAST prevents premature shift-translation.
+ (read-key-sequence nil nil t)))
(defun isearch-lookup-scroll-key (key-seq)
"If KEY-SEQ is bound to a scrolling command, return it as a symbol.
(lookup-key local-function-key-map key)))
(while keylist
(setq key (car keylist))
+ ;; Handle an undefined shifted printing character
+ ;; by downshifting it if that makes it printing.
+ ;; (As read-key-sequence would normally do,
+ ;; if we didn't have a default definition.)
+ (if (and (integerp key)
+ (memq 'shift (event-modifiers key))
+ (>= key (+ ?\s (- ?\S-a ?a)))
+ (/= key (+ 127 (- ?\S-a ?a)))
+ (< key (+ 256 (- ?\S-a ?a))))
+ (setq key (- key (- ?\S-a ?a))))
;; If KEY is a printing char, we handle it here
;; directly to avoid the input method and keyboard
;; coding system translating it.
(invalid-regexp
(setq isearch-error (car (cdr lossage)))
- (if (string-match
- "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
- isearch-error)
- (setq isearch-error "incomplete input")))
+ (cond
+ ((string-match
+ "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
+ isearch-error)
+ (setq isearch-error "incomplete input"))
+ ((and (not isearch-regexp)
+ (string-match "\\`Regular expression too big" isearch-error))
+ (cond
+ (isearch-word
+ (setq isearch-error "Too many words"))
+ ((and isearch-lax-whitespace search-whitespace-regexp)
+ (setq isearch-error "Too many spaces for whitespace matching"))))))
(search-failed
(setq isearch-success nil)
;;;***
\f
-;;;### (autoloads nil "ada-mode" "progmodes/ada-mode.el" (20874 62962
-;;;;;; 290468 0))
+;;;### (autoloads nil "ada-mode" "progmodes/ada-mode.el" (20998 4934
+;;;;;; 952905 0))
;;; Generated autoloads from progmodes/ada-mode.el
(autoload 'ada-add-extensions "ada-mode" "\
;;;***
\f
-;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (21024 28968
+;;;;;; 738399 0))
;;; Generated autoloads from progmodes/ada-xref.el
(autoload 'ada-find-file "ada-xref" "\
;;;***
\f
-;;;### (autoloads nil "add-log" "vc/add-log.el" (20709 26818 907104
+;;;### (autoloads nil "add-log" "vc/add-log.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from vc/add-log.el
;;;***
\f
-;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (20725 15032
-;;;;;; 264919 0))
+;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (20991 31656
+;;;;;; 363459 0))
;;; Generated autoloads from emacs-lisp/advice.el
(defvar ad-redefinition-action 'warn "\
;;;***
\f
-;;;### (autoloads nil "align" "align.el" (20709 26818 907104 0))
+;;;### (autoloads nil "align" "align.el" (21012 37798 962028 0))
;;; Generated autoloads from align.el
(autoload 'align "align" "\
(autoload 'align-regexp "align" "\
Align the current region using an ad-hoc rule read from the minibuffer.
-BEG and END mark the limits of the region. This function will prompt
-for the REGEXP to align with. If no prefix arg was specified, you
-only need to supply the characters to be lined up and any preceding
-whitespace is replaced. If a prefix arg was specified, the full
-regexp with parenthesized whitespace should be supplied; it will also
-prompt for which parenthesis GROUP within REGEXP to modify, the amount
-of SPACING to use, and whether or not to REPEAT the rule throughout
-the line. See `align-rules-list' for more information about these
-options.
+BEG and END mark the limits of the region. Interactively, this function
+prompts for the regular expression REGEXP to align with.
For example, let's say you had a list of phone numbers, and wanted to
align them so that the opening parentheses would line up:
Joe (123) 456-7890
There is no predefined rule to handle this, but you could easily do it
-using a REGEXP like \"(\". All you would have to do is to mark the
-region, call `align-regexp' and type in that regular expression.
+using a REGEXP like \"(\". Interactively, all you would have to do is
+to mark the region, call `align-regexp' and enter that regular expression.
+
+REGEXP must contain at least one parenthesized subexpression, typically
+whitespace of the form \"\\\\(\\\\s-*\\\\)\". In normal interactive use,
+this is automatically added to the start of your regular expression after
+you enter it. You only need to supply the characters to be lined up, and
+any preceding whitespace is replaced.
+
+If you specify a prefix argument (or use this function non-interactively),
+you must enter the full regular expression, including the subexpression.
+The function also then prompts for which subexpression parenthesis GROUP
+\(default 1) within REGEXP to modify, the amount of SPACING (default
+`align-default-spacing') to use, and whether or not to REPEAT the rule
+throughout the line.
+
+See `align-rules-list' for more information about these options.
+
+The non-interactive form of the previous example would look something like:
+ (align-regexp (point-min) (point-max) \"\\\\(\\\\s-*\\\\)(\")
+
+This function is a nothing more than a small wrapper that helps you
+construct a rule to pass to `align-region', which does the real work.
\(fn BEG END REGEXP &optional GROUP SPACING REPEAT)" t nil)
;;;***
\f
-;;;### (autoloads nil "allout" "allout.el" (20932 10282 564846 0))
+;;;### (autoloads nil "allout" "allout.el" (20996 49577 892030 0))
;;; Generated autoloads from allout.el
-(push (purecopy (quote (allout 2 3))) package--builtin-versions)
+(push (purecopy '(allout 2 3)) package--builtin-versions)
(autoload 'allout-auto-activation-helper "allout" "\
Institute `allout-auto-activation'.
;;;***
\f
-;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (20932
-;;;;;; 61699 522706 0))
+;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (20996
+;;;;;; 49577 892030 0))
;;; Generated autoloads from allout-widgets.el
-(push (purecopy (quote (allout-widgets 1 0))) package--builtin-versions)
+(push (purecopy '(allout-widgets 1 0)) package--builtin-versions)
(let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads))))
(autoload 'allout-widgets-setup "allout-widgets" "\
;;;***
\f
-;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (20843 54187 671468
+;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (21005 64551 555603
;;;;;; 0))
;;; Generated autoloads from net/ange-ftp.el
;;;***
\f
-;;;### (autoloads nil "ansi-color" "ansi-color.el" (20930 54950 26050
+;;;### (autoloads nil "ansi-color" "ansi-color.el" (20975 43430 521692
;;;;;; 0))
;;; Generated autoloads from ansi-color.el
-(push (purecopy (quote (ansi-color 3 4 2))) package--builtin-versions)
+(push (purecopy '(ansi-color 3 4 2)) package--builtin-versions)
(autoload 'ansi-color-for-comint-mode-on "ansi-color" "\
Set `ansi-color-for-comint-mode' to t.
;;;***
\f
-;;;### (autoloads nil "antlr-mode" "progmodes/antlr-mode.el" (20709
-;;;;;; 26818 907104 0))
+;;;### (autoloads nil "antlr-mode" "progmodes/antlr-mode.el" (21022
+;;;;;; 34805 522289 827000))
;;; Generated autoloads from progmodes/antlr-mode.el
-(push (purecopy (quote (antlr-mode 2 2 3))) package--builtin-versions)
+(push (purecopy '(antlr-mode 2 2 3)) package--builtin-versions)
(autoload 'antlr-show-makefile-rules "antlr-mode" "\
Show Makefile rules for all grammar files in the current directory.
If the `major-mode' of the current buffer has the value `makefile-mode',
;;;***
\f
-;;;### (autoloads nil "appt" "calendar/appt.el" (20709 26818 907104
+;;;### (autoloads nil "appt" "calendar/appt.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from calendar/appt.el
;;;***
\f
-;;;### (autoloads nil "apropos" "apropos.el" (20716 56 356960 0))
+;;;### (autoloads nil "apropos" "apropos.el" (20991 31656 363459
+;;;;;; 0))
;;; Generated autoloads from apropos.el
(autoload 'apropos-read-pattern "apropos" "\
;;;### (autoloads nil "artist" "textmodes/artist.el" (20891 18859
;;;;;; 893295 0))
;;; Generated autoloads from textmodes/artist.el
-(push (purecopy (quote (artist 1 2 6))) package--builtin-versions)
+(push (purecopy '(artist 1 2 6)) package--builtin-versions)
(autoload 'artist-mode "artist" "\
Toggle Artist mode.
With argument ARG, turn Artist mode on if ARG is positive.
;;;***
\f
-;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (20929
-;;;;;; 34089 117790 0))
+;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (20953
+;;;;;; 16424 151515 0))
;;; Generated autoloads from gnus/auth-source.el
(defvar auth-source-cache-expiry 7200 "\
;;;***
\f
-;;;### (autoloads nil "autoinsert" "autoinsert.el" (20709 26818 907104
+;;;### (autoloads nil "autoinsert" "autoinsert.el" (20950 40231 187426
;;;;;; 0))
;;; Generated autoloads from autoinsert.el
;;;***
\f
-;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (20925
-;;;;;; 37032 237257 0))
+;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (20974
+;;;;;; 22577 548213 0))
;;; Generated autoloads from emacs-lisp/autoload.el
(put 'generated-autoload-file 'safe-local-variable 'stringp)
;;;***
\f
-;;;### (autoloads nil "autorevert" "autorevert.el" (20912 25000 802412
+;;;### (autoloads nil "autorevert" "autorevert.el" (20987 34598 970563
;;;;;; 0))
;;; Generated autoloads from autorevert.el
;;;***
\f
-;;;### (autoloads nil "avoid" "avoid.el" (20709 26818 907104 0))
+;;;### (autoloads nil "avoid" "avoid.el" (21024 28968 738399 0))
;;; Generated autoloads from avoid.el
(defvar mouse-avoidance-mode nil "\
\(fn &optional MODE)" t nil)
+;;;***
+\f
+;;;### (autoloads nil "bat-mode" "progmodes/bat-mode.el" (21024 28968
+;;;;;; 738399 0))
+;;; Generated autoloads from progmodes/bat-mode.el
+
+(add-to-list 'auto-mode-alist '("\\.\\(bat\\|cmd\\)\\'" . bat-mode))
+
+(autoload 'bat-mode "bat-mode" "\
+Major mode for editing DOS/Windows batch files.
+
+Start a new script from `bat-template'. Read help pages for DOS commands
+with `bat-cmd-help'. Navigate between sections using `imenu'.
+Run script using `bat-run' and `bat-run-args'.
+
+\\{bat-mode-map}
+
+\(fn)" t nil)
+
;;;***
\f
;;;### (autoloads nil "battery" "battery.el" (20791 9657 561026 0))
;;;***
\f
-;;;### (autoloads nil "bookmark" "bookmark.el" (20874 65006 176325
-;;;;;; 548000))
+;;;### (autoloads nil "bookmark" "bookmark.el" (20998 4934 952905
+;;;;;; 0))
;;; Generated autoloads from bookmark.el
(define-key ctl-x-r-map "b" 'bookmark-jump)
(define-key ctl-x-r-map "m" 'bookmark-set)
;;;***
\f
-;;;### (autoloads nil "browse-url" "net/browse-url.el" (20929 34089
-;;;;;; 117790 0))
+;;;### (autoloads nil "browse-url" "net/browse-url.el" (20984 58408
+;;;;;; 354075 0))
;;; Generated autoloads from net/browse-url.el
(defvar browse-url-browser-function 'browse-url-default-browser "\
;;;***
\f
-;;;### (autoloads nil "bs" "bs.el" (20933 31141 450159 0))
+;;;### (autoloads nil "bs" "bs.el" (20992 52525 458637 0))
;;; Generated autoloads from bs.el
-(push (purecopy (quote (bs 1 17))) package--builtin-versions)
+(push (purecopy '(bs 1 17)) package--builtin-versions)
(autoload 'bs-cycle-next "bs" "\
Select next buffer defined by buffer cycling.
The buffers taking part in buffer cycling are defined
;;;***
\f
-;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (20929
-;;;;;; 34089 117790 0))
+;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21024
+;;;;;; 55496 462544 366000))
;;; Generated autoloads from emacs-lisp/bytecomp.el
(put 'byte-compile-dynamic 'safe-local-variable 'booleanp)
(put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp)
;;;***
\f
-;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (20709
-;;;;;; 26818 907104 0))
+;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (21023
+;;;;;; 8104 618865 0))
;;; Generated autoloads from calendar/cal-china.el
(put 'calendar-chinese-time-zone 'risky-local-variable t)
;;;***
\f
-;;;### (autoloads nil "calc" "calc/calc.el" (20932 10282 564846 0))
+;;;### (autoloads nil "calc" "calc/calc.el" (20998 4934 952905 0))
;;; Generated autoloads from calc/calc.el
(define-key ctl-x-map "*" 'calc-dispatch)
;;;***
\f
-;;;### (autoloads nil "calculator" "calculator.el" (20891 18859 893295
+;;;### (autoloads nil "calculator" "calculator.el" (21024 28968 738399
;;;;;; 0))
;;; Generated autoloads from calculator.el
;;;***
\f
-;;;### (autoloads nil "calendar" "calendar/calendar.el" (20762 9398
-;;;;;; 526093 0))
+;;;### (autoloads nil "calendar" "calendar/calendar.el" (20993 36675
+;;;;;; 840108 928000))
;;; Generated autoloads from calendar/calendar.el
(autoload 'calendar "calendar" "\
;;;***
\f
-;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (20911
-;;;;;; 4138 279475 0))
+;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (21023
+;;;;;; 33771 640838 743000))
;;; Generated autoloads from progmodes/cc-engine.el
(autoload 'c-guess-basic-syntax "cc-engine" "\
;;;***
\f
-;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (20907 7082
-;;;;;; 901087 0))
+;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (21022 34805
+;;;;;; 23711 194000))
;;; Generated autoloads from progmodes/cc-mode.el
(autoload 'c-initialize-cc-mode "cc-mode" "\
control). See \"cc-mode.el\" for more info.
\(fn &optional NEW-STYLE-INIT)" nil nil)
-
-(defvar c-mode-syntax-table nil "\
-Syntax table used in c-mode buffers.")
(add-to-list 'auto-mode-alist '("\\.\\(cc\\|hh\\)\\'" . c++-mode))
(add-to-list 'auto-mode-alist '("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode))
(add-to-list 'auto-mode-alist '("\\.\\(CC?\\|HH?\\)\\'" . c++-mode))
\(fn)" t nil)
-(defvar c++-mode-syntax-table nil "\
-Syntax table used in c++-mode buffers.")
-
(autoload 'c++-mode "cc-mode" "\
Major mode for editing C++ code.
To submit a problem report, enter `\\[c-submit-bug-report]' from a
\\{c++-mode-map}
\(fn)" t nil)
-
-(defvar objc-mode-syntax-table nil "\
-Syntax table used in objc-mode buffers.")
(add-to-list 'auto-mode-alist '("\\.m\\'" . objc-mode))
(autoload 'objc-mode "cc-mode" "\
\\{objc-mode-map}
\(fn)" t nil)
-
-(defvar java-mode-syntax-table nil "\
-Syntax table used in java-mode buffers.")
(add-to-list 'auto-mode-alist '("\\.java\\'" . java-mode))
(autoload 'java-mode "cc-mode" "\
\\{java-mode-map}
\(fn)" t nil)
-
-(defvar idl-mode-syntax-table nil "\
-Syntax table used in idl-mode buffers.")
(add-to-list 'auto-mode-alist '("\\.idl\\'" . idl-mode))
(autoload 'idl-mode "cc-mode" "\
\\{idl-mode-map}
\(fn)" t nil)
-
-(defvar pike-mode-syntax-table nil "\
-Syntax table used in pike-mode buffers.")
(add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode))
(add-to-list 'interpreter-mode-alist '("pike" . pike-mode))
;;;***
\f
-;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (20922 60838
-;;;;;; 997229 0))
+;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (21021 52778
+;;;;;; 175609 0))
;;; Generated autoloads from emacs-lisp/cconv.el
(autoload 'cconv-closure-convert "cconv" "\
;;;***
\f
-;;;### (autoloads nil "cedet" "cedet/cedet.el" (20748 62911 684442
+;;;### (autoloads nil "cedet" "cedet/cedet.el" (20983 37555 279226
;;;;;; 0))
;;; Generated autoloads from cedet/cedet.el
-(push (purecopy (quote (cedet 2 0))) package--builtin-versions)
+(push (purecopy '(cedet 2 0)) package--builtin-versions)
;;;***
\f
-;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (20929 34089
-;;;;;; 117790 0))
+;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (20958 34345
+;;;;;; 952538 0))
;;; Generated autoloads from progmodes/cfengine.el
-(push (purecopy (quote (cfengine 1 2))) package--builtin-versions)
+(push (purecopy '(cfengine 1 2)) package--builtin-versions)
(autoload 'cfengine3-mode "cfengine" "\
Major mode for editing CFEngine3 input.
There are no special keybindings by default.
;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (20895 15912
;;;;;; 444844 0))
;;; Generated autoloads from emacs-lisp/chart.el
-(push (purecopy (quote (chart 0 2))) package--builtin-versions)
+(push (purecopy '(chart 0 2)) package--builtin-versions)
;;;***
\f
;;;### (autoloads nil "check-declare" "emacs-lisp/check-declare.el"
;;;***
\f
-;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (20893
-;;;;;; 60586 188550 0))
+;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (20996
+;;;;;; 49577 892030 0))
;;; Generated autoloads from emacs-lisp/checkdoc.el
-(push (purecopy (quote (checkdoc 0 6 2))) package--builtin-versions)(put 'checkdoc-force-docstrings-flag 'safe-local-variable 'booleanp)
-(put 'checkdoc-force-history-flag 'safe-local-variable 'booleanp)
-(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable 'booleanp)
-(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp)
-(put 'checkdoc-symbol-words 'safe-local-variable 'checkdoc-list-of-strings-p)
+(push (purecopy '(checkdoc 0 6 2)) package--builtin-versions)(put 'checkdoc-force-docstrings-flag 'safe-local-variable #'booleanp)
+(put 'checkdoc-force-history-flag 'safe-local-variable #'booleanp)
+(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable #'booleanp)
+(put 'checkdoc-spellcheck-documentation-flag 'safe-local-variable #'booleanp)
+(put 'checkdoc-ispell-list-words 'safe-local-variable #'checkdoc-list-of-strings-p)
+(put 'checkdoc-arguments-in-order-flag 'safe-local-variable #'booleanp)
+(put 'checkdoc-verb-check-experimental-flag 'safe-local-variable #'booleanp)
+(put 'checkdoc-symbol-words 'safe-local-variable #'checkdoc-list-of-strings-p)
(autoload 'checkdoc-list-of-strings-p "checkdoc" "\
\(fn OBJ)" nil nil)
+(put 'checkdoc-proper-noun-regexp 'safe-local-variable 'stringp)
+(put 'checkdoc-common-verbs-regexp 'safe-local-variable 'stringp)
(autoload 'checkdoc "checkdoc" "\
Interactively check the entire buffer for style errors.
(autoload 'checkdoc-ispell "checkdoc" "\
Check the style and spelling of everything interactively.
Calls `checkdoc' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc'
+Prefix argument is the same as for `checkdoc'
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
(autoload 'checkdoc-ispell-current-buffer "checkdoc" "\
Check the style and spelling of the current buffer.
Calls `checkdoc-current-buffer' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-current-buffer'
+Prefix argument is the same as for `checkdoc-current-buffer'
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
(autoload 'checkdoc-ispell-interactive "checkdoc" "\
Check the style and spelling of the current buffer interactively.
Calls `checkdoc-interactive' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-interactive'
+Prefix argument is the same as for `checkdoc-interactive'
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
(autoload 'checkdoc-ispell-message-interactive "checkdoc" "\
Check the style and spelling of message text interactively.
Calls `checkdoc-message-interactive' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-message-interactive'
+Prefix argument is the same as for `checkdoc-message-interactive'
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
(autoload 'checkdoc-ispell-message-text "checkdoc" "\
Check the style and spelling of message text interactively.
Calls `checkdoc-message-text' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-message-text'
+Prefix argument is the same as for `checkdoc-message-text'
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
(autoload 'checkdoc-ispell-start "checkdoc" "\
Check the style and spelling of the current buffer.
Calls `checkdoc-start' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-start'
+Prefix argument is the same as for `checkdoc-start'
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
(autoload 'checkdoc-ispell-continue "checkdoc" "\
Check the style and spelling of the current buffer after point.
Calls `checkdoc-continue' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-continue'
+Prefix argument is the same as for `checkdoc-continue'
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
(autoload 'checkdoc-ispell-comments "checkdoc" "\
Check the style and spelling of the current buffer's comments.
Calls `checkdoc-comments' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-comments'
+Prefix argument is the same as for `checkdoc-comments'
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
(autoload 'checkdoc-ispell-defun "checkdoc" "\
Check the style and spelling of the current defun with Ispell.
Calls `checkdoc-defun' with spell-checking turned on.
-Prefix argument TAKE-NOTES is the same as for `checkdoc-defun'
+Prefix argument is the same as for `checkdoc-defun'
-\(fn &optional TAKE-NOTES)" t nil)
+\(fn)" t nil)
(autoload 'checkdoc-minor-mode "checkdoc" "\
Toggle automatic docstring checking (Checkdoc minor mode).
;;;***
\f
-;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (20932 10282
-;;;;;; 564846 0))
+;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (20998 4934
+;;;;;; 952905 0))
;;; Generated autoloads from emacs-lisp/cl-lib.el
-(push (purecopy (quote (cl-lib 1 0))) package--builtin-versions)
+(push (purecopy '(cl-lib 1 0)) package--builtin-versions)
(define-obsolete-variable-alias 'custom-print-functions 'cl-custom-print-functions "24.3")
(defvar cl-custom-print-functions nil "\
This variable is not used at present, but it is defined in hopes that
a future Emacs interpreter will be able to use it.")
+(define-error 'cl-assertion-failed (purecopy "Assertion failed"))
+
(autoload 'cl--defsubst-expand "cl-macs")
(put 'cl-defun 'doc-string-elt 3)
;;;***
\f
-;;;### (autoloads nil "comint" "comint.el" (20932 10282 564846 0))
+;;;### (autoloads nil "comint" "comint.el" (21024 28968 738399 0))
;;; Generated autoloads from comint.el
(defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\
;;;***
\f
-;;;### (autoloads nil "compare-w" "vc/compare-w.el" (20871 33574
-;;;;;; 214287 0))
+;;;### (autoloads nil "compare-w" "vc/compare-w.el" (20992 52525
+;;;;;; 458637 0))
;;; Generated autoloads from vc/compare-w.el
(autoload 'compare-windows "compare-w" "\
;;;***
\f
-;;;### (autoloads nil "compile" "progmodes/compile.el" (20911 4138
-;;;;;; 279475 0))
+;;;### (autoloads nil "compile" "progmodes/compile.el" (21002 1963
+;;;;;; 769129 0))
;;; Generated autoloads from progmodes/compile.el
(defvar compilation-mode-hook nil "\
(file-exists-p \"Makefile\"))
(set (make-local-variable 'compile-command)
(concat \"make -k \"
- (file-name-sans-extension buffer-file-name))))))")
+ (if buffer-file-name
+ (shell-quote-argument
+ (file-name-sans-extension buffer-file-name))))))))")
(custom-autoload 'compile-command "compile" t)
(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command))))
;;;***
\f
-;;;### (autoloads nil "completion" "completion.el" (20884 7264 412929
-;;;;;; 442000))
+;;;### (autoloads nil "completion" "completion.el" (20999 25770 522517
+;;;;;; 0))
;;; Generated autoloads from completion.el
(defvar dynamic-completion-mode nil "\
;;;***
\f
-;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (21024 28968
+;;;;;; 738399 0))
;;; Generated autoloads from textmodes/css-mode.el
(autoload 'css-mode "css-mode" "\
;;;***
\f
-;;;### (autoloads nil "cua-base" "emulation/cua-base.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "cua-base" "emulation/cua-base.el" (20992 52525
+;;;;;; 458637 0))
;;; Generated autoloads from emulation/cua-base.el
(defvar cua-mode nil "\
;;;***
\f
-;;;### (autoloads nil "cus-edit" "cus-edit.el" (20932 10282 564846
+;;;### (autoloads nil "cus-edit" "cus-edit.el" (21024 28968 738399
;;;;;; 0))
;;; Generated autoloads from cus-edit.el
;;;### (autoloads nil "cwarn" "progmodes/cwarn.el" (20709 26818 907104
;;;;;; 0))
;;; Generated autoloads from progmodes/cwarn.el
-(push (purecopy (quote (cwarn 1 3 1))) package--builtin-versions)
+(push (purecopy '(cwarn 1 3 1)) package--builtin-versions)
(autoload 'cwarn-mode "cwarn" "\
Minor mode that highlights suspicious C and C++ constructions.
;;;***
\f
-;;;### (autoloads nil "dabbrev" "dabbrev.el" (20709 26818 907104
+;;;### (autoloads nil "dabbrev" "dabbrev.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from dabbrev.el
(put 'dabbrev-case-fold-search 'risky-local-variable t)
;;;***
\f
-;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (21005 64551
+;;;;;; 555603 0))
;;; Generated autoloads from emacs-lisp/debug.el
(setq debugger 'debug)
;;;### (autoloads nil "delim-col" "delim-col.el" (20709 26818 907104
;;;;;; 0))
;;; Generated autoloads from delim-col.el
-(push (purecopy (quote (delim-col 2 1))) package--builtin-versions)
+(push (purecopy '(delim-col 2 1)) package--builtin-versions)
(autoload 'delimit-columns-customize "delim-col" "\
Customization of `columns' group.
;;;***
\f
-;;;### (autoloads nil "descr-text" "descr-text.el" (20875 30633 412173
+;;;### (autoloads nil "descr-text" "descr-text.el" (21024 28968 738399
;;;;;; 0))
;;; Generated autoloads from descr-text.el
;;;***
\f
-;;;### (autoloads nil "desktop" "desktop.el" (20945 22315 8369 0))
+;;;### (autoloads nil "desktop" "desktop.el" (21005 64551 555603
+;;;;;; 0))
;;; Generated autoloads from desktop.el
(defvar desktop-save-mode nil "\
(custom-autoload 'desktop-locals-to-save "desktop" t)
-(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
This kills all buffers except for internal ones and those with names matched by
a regular expression in the list `desktop-clear-preserve-buffers'.
Furthermore, it clears the variables listed in `desktop-globals-to-clear'.
+When called interactively and `desktop-restore-frames' is non-nil, it also
+deletes all frames except the selected one (and its minibuffer frame,
+if different).
\(fn)" t nil)
;;;***
\f
-;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (20932
-;;;;;; 61699 522706 0))
+;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (20992
+;;;;;; 52525 458637 0))
;;; Generated autoloads from calendar/diary-lib.el
(autoload 'diary "diary-lib" "\
;;;***
\f
-;;;### (autoloads nil "dired" "dired.el" (20932 61699 522706 0))
+;;;### (autoloads nil "dired" "dired.el" (20999 25770 522517 0))
;;; Generated autoloads from dired.el
(defvar dired-listing-switches (purecopy "-al") "\
;;;***
\f
-;;;### (autoloads nil "disp-table" "disp-table.el" (20709 26818 907104
+;;;### (autoloads nil "disp-table" "disp-table.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from disp-table.el
;;;***
\f
-;;;### (autoloads nil "doc-view" "doc-view.el" (20899 12965 791908
+;;;### (autoloads nil "doc-view" "doc-view.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from doc-view.el
;;;### (autoloads nil "dunnet" "play/dunnet.el" (20900 33838 319219
;;;;;; 0))
;;; Generated autoloads from play/dunnet.el
-(push (purecopy (quote (dunnet 2 1))) package--builtin-versions)
+(push (purecopy '(dunnet 2 1)) package--builtin-versions)
(autoload 'dunnet "dunnet" "\
Switch to *dungeon* buffer and start game.
;;;***
\f
-;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (20900
-;;;;;; 33838 319219 0))
+;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (20992
+;;;;;; 52525 458637 0))
;;; Generated autoloads from emacs-lisp/easy-mmode.el
(defalias 'easy-mmode-define-minor-mode 'define-minor-mode)
;;;### (autoloads nil "ebnf2ps" "progmodes/ebnf2ps.el" (20709 26818
;;;;;; 907104 0))
;;; Generated autoloads from progmodes/ebnf2ps.el
-(push (purecopy (quote (ebnf2ps 4 4))) package--builtin-versions)
+(push (purecopy '(ebnf2ps 4 4)) package--builtin-versions)
(autoload 'ebnf-customize "ebnf2ps" "\
Customization for ebnf group.
;;;***
\f
-;;;### (autoloads nil "ebrowse" "progmodes/ebrowse.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "ebrowse" "progmodes/ebrowse.el" (20992 52525
+;;;;;; 458637 0))
;;; Generated autoloads from progmodes/ebrowse.el
(autoload 'ebrowse-tree-mode "ebrowse" "\
;;;***
\f
-;;;### (autoloads nil "ebuff-menu" "ebuff-menu.el" (20709 26818 907104
+;;;### (autoloads nil "ebuff-menu" "ebuff-menu.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from ebuff-menu.el
\f
;;;### (autoloads nil "ede" "cedet/ede.el" (20908 27948 216644 0))
;;; Generated autoloads from cedet/ede.el
-(push (purecopy (quote (ede 1 2))) package--builtin-versions)
+(push (purecopy '(ede 1 2)) package--builtin-versions)
(defvar global-ede-mode nil "\
Non-nil if Global-Ede mode is enabled.
See the command `global-ede-mode' for a description of this minor mode.
;;;### (autoloads nil "ede/dired" "cedet/ede/dired.el" (20709 26818
;;;;;; 907104 0))
;;; Generated autoloads from cedet/ede/dired.el
-(push (purecopy (quote (dired 0 4))) package--builtin-versions)
+(push (purecopy '(dired 0 4)) package--builtin-versions)
;;;***
\f
;;;### (autoloads nil "ede/project-am" "cedet/ede/project-am.el"
;;;;;; (20881 10343 547564 552000))
;;; Generated autoloads from cedet/ede/project-am.el
-(push (purecopy (quote (project-am 0 0 3))) package--builtin-versions)
+(push (purecopy '(project-am 0 0 3)) package--builtin-versions)
;;;***
\f
-;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (20912 25000
-;;;;;; 802412 0))
+;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (20996 49577
+;;;;;; 892030 0))
;;; Generated autoloads from emacs-lisp/edebug.el
(defvar edebug-all-defs nil "\
;;;***
\f
-;;;### (autoloads nil "ediff" "vc/ediff.el" (20893 60586 188550 0))
+;;;### (autoloads nil "ediff" "vc/ediff.el" (20992 52525 458637 0))
;;; Generated autoloads from vc/ediff.el
-(push (purecopy (quote (ediff 2 81 4))) package--builtin-versions)
+(push (purecopy '(ediff 2 81 4)) package--builtin-versions)
(autoload 'ediff-files "ediff" "\
Run Ediff on a pair of files, FILE-A and FILE-B.
\(fn &optional NODE)" t nil)
+(autoload 'ediff-files-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff3-files-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff-merge-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff-merge-with-ancestor-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff-directories-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff-directories3-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff-merge-directories-command "ediff" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'ediff-merge-directories-with-ancestor-command "ediff" "\
+
+
+\(fn)" nil nil)
+
;;;***
\f
-;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (20992 52525
+;;;;;; 458637 0))
;;; Generated autoloads from vc/ediff-help.el
(autoload 'ediff-customize "ediff-help" "\
;;;***
\f
-;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (20893 60586
-;;;;;; 188550 0))
+;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (20992 52525
+;;;;;; 458637 0))
;;; Generated autoloads from vc/ediff-util.el
(autoload 'ediff-toggle-multiframe "ediff-util" "\
;;;***
\f
-;;;### (autoloads nil "edmacro" "edmacro.el" (20709 26818 907104
-;;;;;; 0))
+;;;### (autoloads nil "edmacro" "edmacro.el" (20964 20753 310858
+;;;;;; 446000))
;;; Generated autoloads from edmacro.el
-(push (purecopy (quote (edmacro 2 1))) package--builtin-versions)
+(push (purecopy '(edmacro 2 1)) package--builtin-versions)
(autoload 'edit-kbd-macro "edmacro" "\
Edit a keyboard macro.
At the prompt, type any key sequence which is bound to a keyboard macro.
;;;***
\f
-;;;### (autoloads nil "ehelp" "ehelp.el" (20762 9398 526093 0))
+;;;### (autoloads nil "ehelp" "ehelp.el" (20992 52525 458637 0))
;;; Generated autoloads from ehelp.el
(autoload 'with-electric-help "ehelp" "\
;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (20930 5097 423575
;;;;;; 701000))
;;; Generated autoloads from emacs-lisp/eieio.el
-(push (purecopy (quote (eieio 1 4))) package--builtin-versions)
+(push (purecopy '(eieio 1 4)) package--builtin-versions)
;;;***
\f
;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (20908
;;;;;; 27948 216644 0))
;;; Generated autoloads from emacs-lisp/eieio-core.el
-(push (purecopy (quote (eieio-core 1 4))) package--builtin-versions)
+(push (purecopy '(eieio-core 1 4)) package--builtin-versions)
(autoload 'eieio-defclass-autoload "eieio-core" "\
Create autoload symbols for the EIEIO class CNAME.
SUPERCLASSES are the superclasses that CNAME inherits from.
;;;***
\f
-;;;### (autoloads nil "eldoc" "emacs-lisp/eldoc.el" (20806 59818
-;;;;;; 347907 0))
+;;;### (autoloads nil "eldoc" "emacs-lisp/eldoc.el" (21024 28968
+;;;;;; 738399 0))
;;; Generated autoloads from emacs-lisp/eldoc.el
(defvar eldoc-minor-mode-string (purecopy " ElDoc") "\
;;;***
\f
-;;;### (autoloads nil "emerge" "vc/emerge.el" (20576 42138 697312
+;;;### (autoloads nil "emerge" "vc/emerge.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from vc/emerge.el
;;;***
\f
-;;;### (autoloads nil "epa" "epa.el" (20917 42917 611340 0))
+;;;### (autoloads nil "epa" "epa.el" (20978 19624 657047 0))
;;; Generated autoloads from epa.el
(autoload 'epa-list-keys "epa" "\
;;;***
\f
-;;;### (autoloads nil "epa-mail" "epa-mail.el" (20709 26818 907104
+;;;### (autoloads nil "epa-mail" "epa-mail.el" (20978 19624 657047
;;;;;; 0))
;;; Generated autoloads from epa-mail.el
\(fn START END SIGNERS MODE)" t nil)
(autoload 'epa-mail-encrypt "epa-mail" "\
-Encrypt the current buffer.
-The buffer is expected to contain a mail message.
+Encrypt the outgoing mail message in the current buffer.
+Takes the recipients from the text in the header in the buffer
+and translates them through `epa-mail-aliases'.
+With prefix argument, asks you to select among them interactively
+and also whether and how to sign.
-Don't use this command in Lisp programs!
+Called from Lisp, the optional argument RECIPIENTS is a list
+of recipient addresses, t to perform symmetric encryption,
+or nil meaning use the defaults.
-\(fn START END RECIPIENTS SIGN SIGNERS)" t nil)
+SIGNERS is a list of keys to sign the message with.
+
+\(fn &optional RECIPIENTS SIGNERS)" t nil)
(autoload 'epa-mail-import-keys "epa-mail" "\
Import keys in the OpenPGP armor format in the current buffer.
;;;***
\f
-;;;### (autoloads nil "epg" "epg.el" (20936 7342 261759 0))
+;;;### (autoloads nil "epg" "epg.el" (21022 27213 317995 0))
;;; Generated autoloads from epg.el
-(push (purecopy (quote (epg 1 0 0))) package--builtin-versions)
+(push (purecopy '(epg 1 0 0)) package--builtin-versions)
(autoload 'epg-make-context "epg" "\
Return a context object.
;;;***
\f
-;;;### (autoloads nil "erc" "erc/erc.el" (20891 18859 893295 0))
+;;;### (autoloads nil "erc" "erc/erc.el" (21013 58662 278539 0))
;;; Generated autoloads from erc/erc.el
-(push (purecopy (quote (erc 5 3))) package--builtin-versions)
+(push (purecopy '(erc 5 3)) package--builtin-versions)
(autoload 'erc-select-read-args "erc" "\
Prompt the user for values of nick, server, port, and password.
;;;***
\f
-;;;### (autoloads nil "erc-button" "erc/erc-button.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "erc-button" "erc/erc-button.el" (21013 58662
+;;;;;; 278539 0))
;;; Generated autoloads from erc/erc-button.el
(autoload 'erc-button-mode "erc-button" nil t)
;;;### (autoloads nil "erc-lang" "erc/erc-lang.el" (20709 26818 907104
;;;;;; 0))
;;; Generated autoloads from erc/erc-lang.el
-(push (purecopy (quote (erc-lang 1 0 0))) package--builtin-versions)
+(push (purecopy '(erc-lang 1 0 0)) package--builtin-versions)
;;;***
\f
-;;;### (autoloads nil "erc-list" "erc/erc-list.el" (20884 7264 412929
-;;;;;; 442000))
+;;;### (autoloads nil "erc-list" "erc/erc-list.el" (21013 58662 278539
+;;;;;; 0))
;;; Generated autoloads from erc/erc-list.el
-(push (purecopy (quote (erc-list 0 1))) package--builtin-versions) (autoload 'erc-list-mode "erc-list")
+(push (purecopy '(erc-list 0 1)) package--builtin-versions) (autoload 'erc-list-mode "erc-list")
;;;***
\f
;;;***
\f
-;;;### (autoloads nil "erc-notify" "erc/erc-notify.el" (20891 18859
-;;;;;; 893295 0))
+;;;### (autoloads nil "erc-notify" "erc/erc-notify.el" (21013 58662
+;;;;;; 278539 0))
;;; Generated autoloads from erc/erc-notify.el
(autoload 'erc-notify-mode "erc-notify" nil t)
;;;***
\f
-;;;### (autoloads nil "erc-track" "erc/erc-track.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "erc-track" "erc/erc-track.el" (21013 58662
+;;;;;; 278539 0))
;;; Generated autoloads from erc/erc-track.el
(defvar erc-track-minor-mode nil "\
;;;***
\f
-;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (20834 39208 838628
+;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (20998 4934 952905
;;;;;; 0))
;;; Generated autoloads from emacs-lisp/ert.el
;;;***
\f
-;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (20911 4138
-;;;;;; 279475 0))
+;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (20992 52525
+;;;;;; 458637 0))
;;; Generated autoloads from eshell/esh-mode.el
(autoload 'eshell-mode "esh-mode" "\
;;;### (autoloads nil "eshell" "eshell/eshell.el" (20893 60586 188550
;;;;;; 0))
;;; Generated autoloads from eshell/eshell.el
-(push (purecopy (quote (eshell 2 4 2))) package--builtin-versions)
+(push (purecopy '(eshell 2 4 2)) package--builtin-versions)
(autoload 'eshell "eshell" "\
Create an interactive Eshell buffer.
The buffer used for Eshell sessions is determined by the value of
;;;***
\f
-;;;### (autoloads nil "etags" "progmodes/etags.el" (20731 53823 676680
+;;;### (autoloads nil "etags" "progmodes/etags.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from progmodes/etags.el
;;;***
\f
-;;;### (autoloads nil "eww" "net/eww.el" (20941 25255 50698 0))
+;;;### (autoloads nil "eww" "net/eww.el" (21022 41153 91581 355000))
;;; Generated autoloads from net/eww.el
(autoload 'eww "eww" "\
;;;***
\f
-;;;### (autoloads nil "f90" "progmodes/f90.el" (20886 939 575794
+;;;### (autoloads nil "f90" "progmodes/f90.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from progmodes/f90.el
;;;***
\f
-;;;### (autoloads nil "feedmail" "mail/feedmail.el" (20891 18859
-;;;;;; 893295 0))
+;;;### (autoloads nil "feedmail" "mail/feedmail.el" (21002 1963 769129
+;;;;;; 0))
;;; Generated autoloads from mail/feedmail.el
-(push (purecopy (quote (feedmail 11))) package--builtin-versions)
+(push (purecopy '(feedmail 11)) package--builtin-versions)
(autoload 'feedmail-send-it "feedmail" "\
Send the current mail buffer using the Feedmail package.
This is a suitable value for `send-mail-function'. It can be used
;;;***
\f
-;;;### (autoloads nil "ffap" "ffap.el" (20752 26669 524456 0))
+;;;### (autoloads nil "ffap" "ffap.el" (20998 4934 952905 0))
;;; Generated autoloads from ffap.el
(autoload 'ffap-next "ffap" "\
;;;***
\f
-;;;### (autoloads nil "filecache" "filecache.el" (20709 26818 907104
+;;;### (autoloads nil "filecache" "filecache.el" (20998 4934 952905
;;;;;; 0))
;;; Generated autoloads from filecache.el
\(fn ARG)" t nil)
+;;;***
+\f
+;;;### (autoloads nil "filenotify" "filenotify.el" (20999 25770 522517
+;;;;;; 0))
+;;; Generated autoloads from filenotify.el
+
+(autoload 'file-notify-handle-event "filenotify" "\
+Handle file system monitoring event.
+If EVENT is a filewatch event, call its callback.
+Otherwise, signal a `file-notify-error'.
+
+\(fn EVENT)" t nil)
+
;;;***
\f
;;;### (autoloads nil "files-x" "files-x.el" (20938 49065 383398
;;;***
\f
-;;;### (autoloads nil "filesets" "filesets.el" (20791 9657 561026
+;;;### (autoloads nil "filesets" "filesets.el" (20999 25770 522517
;;;;;; 0))
;;; Generated autoloads from filesets.el
;;;### (autoloads nil "find-cmd" "find-cmd.el" (20709 26818 907104
;;;;;; 0))
;;; Generated autoloads from find-cmd.el
-(push (purecopy (quote (find-cmd 0 6))) package--builtin-versions)
+(push (purecopy '(find-cmd 0 6)) package--builtin-versions)
(autoload 'find-cmd "find-cmd" "\
Initiate the building of a find command.
For example:
;;;***
\f
-;;;### (autoloads nil "find-file" "find-file.el" (20872 54440 171355
+;;;### (autoloads nil "find-file" "find-file.el" (20999 25770 522517
;;;;;; 0))
;;; Generated autoloads from find-file.el
;;;***
\f
-;;;### (autoloads nil "find-lisp" "find-lisp.el" (20709 26818 907104
+;;;### (autoloads nil "find-lisp" "find-lisp.el" (20993 35788 926781
;;;;;; 0))
;;; Generated autoloads from find-lisp.el
\(fn DIR)" t nil)
(autoload 'find-lisp-find-dired-filter "find-lisp" "\
-Change the filter on a find-lisp-find-dired buffer to REGEXP.
+Change the filter on a `find-lisp-find-dired' buffer to REGEXP.
\(fn REGEXP)" t nil)
\f
;;;### (autoloads nil "finder" "finder.el" (20925 37032 237257 0))
;;; Generated autoloads from finder.el
-(push (purecopy (quote (finder 1 0))) package--builtin-versions)
+(push (purecopy '(finder 1 0)) package--builtin-versions)
(autoload 'finder-list-keywords "finder" "\
Display descriptions of the keywords in the Finder buffer.
;;;***
\f
-;;;### (autoloads nil "flymake" "progmodes/flymake.el" (20932 61699
-;;;;;; 522706 0))
+;;;### (autoloads nil "flymake" "progmodes/flymake.el" (21019 11047
+;;;;;; 84796 0))
;;; Generated autoloads from progmodes/flymake.el
-(push (purecopy (quote (flymake 0 3))) package--builtin-versions)
+(push (purecopy '(flymake 0 3)) package--builtin-versions)
(autoload 'flymake-mode "flymake" "\
Toggle on-the-fly syntax checking.
With a prefix argument ARG, enable the mode if ARG is positive,
;;;### (autoloads nil "foldout" "foldout.el" (20709 26818 907104
;;;;;; 0))
;;; Generated autoloads from foldout.el
-(push (purecopy (quote (foldout 1 10))) package--builtin-versions)
+(push (purecopy '(foldout 1 10)) package--builtin-versions)
;;;***
\f
-;;;### (autoloads nil "follow" "follow.el" (20709 26818 907104 0))
+;;;### (autoloads nil "follow" "follow.el" (21005 64551 555603 0))
;;; Generated autoloads from follow.el
(autoload 'turn-on-follow-mode "follow" "\
;;;### (autoloads nil "footnote" "mail/footnote.el" (20709 26818
;;;;;; 907104 0))
;;; Generated autoloads from mail/footnote.el
-(push (purecopy (quote (footnote 0 19))) package--builtin-versions)
+(push (purecopy '(footnote 0 19)) package--builtin-versions)
(autoload 'footnote-mode "footnote" "\
Toggle Footnote mode.
With a prefix argument ARG, enable Footnote mode if ARG is
;;;***
\f
-;;;### (autoloads nil "forms" "forms.el" (20709 26818 907104 0))
+;;;### (autoloads nil "forms" "forms.el" (20999 25770 522517 0))
;;; Generated autoloads from forms.el
(autoload 'forms-mode "forms" "\
;;;***
\f
-;;;### (autoloads nil "fortran" "progmodes/fortran.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "fortran" "progmodes/fortran.el" (20992 52525
+;;;;;; 458637 0))
;;; Generated autoloads from progmodes/fortran.el
(autoload 'fortran-mode "fortran" "\
\(fn &optional FILE)" t nil)
+;;;***
+\f
+;;;### (autoloads nil "frameset" "frameset.el" (21005 64551 555603
+;;;;;; 0))
+;;; Generated autoloads from frameset.el
+
+(defvar frameset-session-filter-alist '((name . :never) (left . frameset-filter-iconified) (minibuffer . frameset-filter-minibuffer) (top . frameset-filter-iconified)) "\
+Minimum set of parameters to filter for live (on-session) framesets.
+DO NOT MODIFY. See `frameset-filter-alist' for a full description.")
+
+(defvar frameset-persistent-filter-alist (nconc '((background-color . frameset-filter-sanitize-color) (buffer-list . :never) (buffer-predicate . :never) (buried-buffer-list . :never) (font . frameset-filter-shelve-param) (foreground-color . frameset-filter-sanitize-color) (fullscreen . frameset-filter-shelve-param) (GUI:font . frameset-filter-unshelve-param) (GUI:fullscreen . frameset-filter-unshelve-param) (GUI:height . frameset-filter-unshelve-param) (GUI:width . frameset-filter-unshelve-param) (height . frameset-filter-shelve-param) (outer-window-id . :never) (parent-id . :never) (tty . frameset-filter-tty-to-GUI) (tty-type . frameset-filter-tty-to-GUI) (width . frameset-filter-shelve-param) (window-id . :never) (window-system . :never)) frameset-session-filter-alist) "\
+Parameters to filter for persistent framesets.
+DO NOT MODIFY. See `frameset-filter-alist' for a full description.")
+
+(defvar frameset-filter-alist frameset-persistent-filter-alist "\
+Alist of frame parameters and filtering functions.
+
+This alist is the default value of the FILTERS argument of
+`frameset-save' and `frameset-restore' (which see).
+
+Initially, `frameset-filter-alist' is set to, and shares the value of,
+`frameset-persistent-filter-alist'. You can override any item in
+this alist by `push'ing a new item onto it. If, for some reason, you
+intend to modify existing values, do
+
+ (setq frameset-filter-alist (copy-tree frameset-filter-alist))
+
+before changing anything.
+
+On saving, PARAMETERS is the parameter alist of each frame processed,
+and FILTERED is the parameter alist that gets saved to the frameset.
+
+On restoring, PARAMETERS is the parameter alist extracted from the
+frameset, and FILTERED is the resulting frame parameter alist used
+to restore the frame.
+
+Elements of `frameset-filter-alist' are conses (PARAM . ACTION),
+where PARAM is a parameter name (a symbol identifying a frame
+parameter), and ACTION can be:
+
+ nil The parameter is copied to FILTERED.
+ :never The parameter is never copied to FILTERED.
+ :save The parameter is copied only when saving the frame.
+ :restore The parameter is copied only when restoring the frame.
+ FILTER A filter function.
+
+FILTER can be a symbol FILTER-FUN, or a list (FILTER-FUN ARGS...).
+FILTER-FUN is invoked with
+
+ (apply FILTER-FUN CURRENT FILTERED PARAMETERS SAVING ARGS)
+
+where
+
+ CURRENT A cons (PARAM . VALUE), where PARAM is the one being
+ filtered and VALUE is its current value.
+ FILTERED The resulting alist (so far).
+ PARAMETERS The complete alist of parameters being filtered,
+ SAVING Non-nil if filtering before saving state, nil if filtering
+ before restoring it.
+ ARGS Any additional arguments specified in the ACTION.
+
+FILTER-FUN is allowed to modify items in FILTERED, but no other arguments.
+It must return:
+ nil Skip CURRENT (do not add it to FILTERED).
+ t Add CURRENT to FILTERED as is.
+ (NEW-PARAM . NEW-VALUE) Add this to FILTERED instead of CURRENT.
+
+Frame parameters not on this alist are passed intact, as if they were
+defined with ACTION = nil.")
+
+(autoload 'frameset-frame-id "frameset" "\
+Return the frame id of FRAME, if it has one; else, return nil.
+A frame id is a string that uniquely identifies a frame.
+It is persistent across `frameset-save' / `frameset-restore'
+invocations, and once assigned is never changed unless the same
+frame is duplicated (via `frameset-restore'), in which case the
+newest frame keeps the id and the old frame's is set to nil.
+
+\(fn FRAME)" nil nil)
+
+(autoload 'frameset-frame-id-equal-p "frameset" "\
+Return non-nil if FRAME's id matches ID.
+
+\(fn FRAME ID)" nil nil)
+
+(autoload 'frameset-frame-with-id "frameset" "\
+Return the live frame with id ID, if exists; else nil.
+If FRAME-LIST is a list of frames, check these frames only.
+If nil, check all live frames.
+
+\(fn ID &optional FRAME-LIST)" nil nil)
+
+(autoload 'frameset-save "frameset" "\
+Return a frameset for FRAME-LIST, a list of frames.
+Dead frames and non-frame objects are silently removed from the list.
+If nil, FRAME-LIST defaults to the output of `frame-list' (all live frames).
+APP, NAME and DESCRIPTION are optional data; see the docstring of the
+`frameset' defstruct for details.
+FILTERS is an alist of parameter filters; if nil, the value of the variable
+`frameset-filter-alist' is used instead.
+PREDICATE is a predicate function, which must return non-nil for frames that
+should be saved; if PREDICATE is nil, all frames from FRAME-LIST are saved.
+PROPERTIES is a user-defined property list to add to the frameset.
+
+\(fn FRAME-LIST &key APP NAME DESCRIPTION FILTERS PREDICATE PROPERTIES)" nil nil)
+
+(autoload 'frameset-restore "frameset" "\
+Restore a FRAMESET into the current display(s).
+
+PREDICATE is a function called with two arguments, the parameter alist
+and the window-state of the frame being restored, in that order (see
+the docstring of the `frameset' defstruct for additional details).
+If PREDICATE returns nil, the frame described by that parameter alist
+and window-state is not restored.
+
+FILTERS is an alist of parameter filters; if nil, the value of
+`frameset-filter-alist' is used instead.
+
+REUSE-FRAMES selects the policy to use to reuse frames when restoring:
+ t Reuse existing frames if possible, and delete those not reused.
+ nil Restore frameset in new frames and delete existing frames.
+ :keep Restore frameset in new frames and keep the existing ones.
+ LIST A list of frames to reuse; only these are reused (if possible).
+ Remaining frames in this list are deleted; other frames not
+ included on the list are left untouched.
+
+FORCE-DISPLAY can be:
+ t Frames are restored in the current display.
+ nil Frames are restored, if possible, in their original displays.
+ :delete Frames in other displays are deleted instead of restored.
+ PRED A function called with two arguments, the parameter alist and
+ the window state (in that order). It must return t, nil or
+ `:delete', as above but affecting only the frame that will
+ be created from that parameter alist.
+
+FORCE-ONSCREEN can be:
+ t Force onscreen only those frames that are fully offscreen.
+ nil Do not force any frame back onscreen.
+ :all Force onscreen any frame fully or partially offscreen.
+ PRED A function called with three arguments,
+ - the live frame just restored,
+ - a list (LEFT TOP WIDTH HEIGHT), describing the frame,
+ - a list (LEFT TOP WIDTH HEIGHT), describing the workarea.
+ It must return non-nil to force the frame onscreen, nil otherwise.
+
+Note the timing and scope of the operations described above: REUSE-FRAMES
+affects existing frames; PREDICATE, FILTERS and FORCE-DISPLAY affect the frame
+being restored before that happens; and FORCE-ONSCREEN affects the frame once
+it has been restored.
+
+All keyword parameters default to nil.
+
+\(fn FRAMESET &key PREDICATE FILTERS REUSE-FRAMES FORCE-DISPLAY FORCE-ONSCREEN)" nil nil)
+
+(autoload 'frameset-to-register "frameset" "\
+Store the current frameset in register REGISTER.
+Use \\[jump-to-register] to restore the frameset.
+Argument is a character, naming the register.
+
+\(fn REGISTER &optional ARG)" t nil)
+
;;;***
\f
;;;### (autoloads nil "gamegrid" "play/gamegrid.el" (20752 26925
;;;;;; 124734 677000))
;;; Generated autoloads from play/gamegrid.el
-(push (purecopy (quote (gamegrid 1 2))) package--builtin-versions)
+(push (purecopy '(gamegrid 1 2)) package--builtin-versions)
;;;***
\f
-;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (20932 61687
-;;;;;; 205708 148000))
+;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (20992 52525
+;;;;;; 458637 0))
;;; Generated autoloads from progmodes/gdb-mi.el
(defvar gdb-enable-debug nil "\
;;;***
\f
-;;;### (autoloads nil "gnus" "gnus/gnus.el" (20901 54695 989166 0))
+;;;### (autoloads nil "gnus" "gnus/gnus.el" (21002 1963 769129 0))
;;; Generated autoloads from gnus/gnus.el
-(push (purecopy (quote (gnus 5 13))) package--builtin-versions)(when (fboundp 'custom-autoload)
+(push (purecopy '(gnus 5 13)) package--builtin-versions)(when (fboundp 'custom-autoload)
(custom-autoload 'gnus-select-method "gnus"))
(autoload 'gnus-slave-no-server "gnus" "\
;;;***
\f
-;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (20941 25255
-;;;;;; 50698 0))
+;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (20977 54298
+;;;;;; 858063 0))
;;; Generated autoloads from gnus/gnus-art.el
(autoload 'gnus-article-prepare-display "gnus-art" "\
;;;***
\f
-;;;### (autoloads nil "gnus-delay" "gnus/gnus-delay.el" (20791 9657
-;;;;;; 561026 0))
+;;;### (autoloads nil "gnus-delay" "gnus/gnus-delay.el" (20988 22031
+;;;;;; 837044 0))
;;; Generated autoloads from gnus/gnus-delay.el
(autoload 'gnus-delay-article "gnus-delay" "\
;;;***
\f
-;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (20929 34089
-;;;;;; 117790 0))
+;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (20988 22031
+;;;;;; 837044 0))
;;; Generated autoloads from gnus/gnus-group.el
(autoload 'gnus-fetch-group "gnus-group" "\
;;;***
\f
-;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (20858 21542
-;;;;;; 723007 0))
+;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (20974 22577
+;;;;;; 548213 0))
;;; Generated autoloads from gnus/gnus-msg.el
(autoload 'gnus-msg-mail "gnus-msg" "\
;;;***
\f
-;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (20779
-;;;;;; 18487 859617 0))
+;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (20955
+;;;;;; 58152 201869 0))
;;; Generated autoloads from gnus/gnus-registry.el
(autoload 'gnus-registry-initialize "gnus-registry" "\
;;;***
\f
-;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (20763 30266
-;;;;;; 231060 0))
+;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (20986 60038
+;;;;;; 720063 0))
;;; Generated autoloads from gnus/gnus-start.el
(autoload 'gnus-declare-backend "gnus-start" "\
;;;***
\f
-;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (20901 54695
-;;;;;; 989166 0))
+;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (20984 58408
+;;;;;; 354075 0))
;;; Generated autoloads from gnus/gnus-sum.el
(autoload 'gnus-summary-bookmark-jump "gnus-sum" "\
;;;***
\f
-;;;### (autoloads nil "gnutls" "net/gnutls.el" (20709 26818 907104
+;;;### (autoloads nil "gnutls" "net/gnutls.el" (20998 4934 952905
;;;;;; 0))
;;; Generated autoloads from net/gnutls.el
;;;***
\f
-;;;### (autoloads nil "gomoku" "play/gomoku.el" (20709 26818 907104
+;;;### (autoloads nil "gomoku" "play/gomoku.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from play/gomoku.el
;;;***
\f
-;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (20709 26818 907104
+;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (21002 1963 769129
;;;;;; 0))
;;; Generated autoloads from emacs-lisp/gv.el
;;;***
\f
-;;;### (autoloads nil "help-macro" "help-macro.el" (20709 26818 907104
+;;;### (autoloads nil "help-macro" "help-macro.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from help-macro.el
;;;***
\f
-;;;### (autoloads nil "help-mode" "help-mode.el" (20920 19111 869400
+;;;### (autoloads nil "help-mode" "help-mode.el" (20999 25770 522517
;;;;;; 0))
;;; Generated autoloads from help-mode.el
;;;***
\f
-;;;### (autoloads nil "helper" "emacs-lisp/helper.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "helper" "emacs-lisp/helper.el" (20992 52525
+;;;;;; 458637 0))
;;; Generated autoloads from emacs-lisp/helper.el
(autoload 'Helper-describe-bindings "helper" "\
;;;***
\f
-;;;### (autoloads nil "hilit-chg" "hilit-chg.el" (20709 26818 907104
+;;;### (autoloads nil "hilit-chg" "hilit-chg.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from hilit-chg.el
;;;***
\f
-;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (20709 26818 907104
+;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from hippie-exp.el
-(push (purecopy (quote (hippie-exp 1 6))) package--builtin-versions)
+(push (purecopy '(hippie-exp 1 6)) package--builtin-versions)
(defvar hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol) "\
The list of expansion functions tried in order by `hippie-expand'.
To change the behavior of `hippie-expand', remove, change the order of,
;;;***
\f
-;;;### (autoloads nil "hl-line" "hl-line.el" (20709 26818 907104
+;;;### (autoloads nil "hl-line" "hl-line.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from hl-line.el
;;;### (autoloads nil "htmlfontify" "htmlfontify.el" (20938 49065
;;;;;; 383398 0))
;;; Generated autoloads from htmlfontify.el
-(push (purecopy (quote (htmlfontify 0 21))) package--builtin-versions)
+(push (purecopy '(htmlfontify 0 21)) package--builtin-versions)
(autoload 'htmlfontify-buffer "htmlfontify" "\
Create a new buffer, named for the current buffer + a .html extension,
containing an inline CSS-stylesheet and formatted CSS-markup HTML
;;;***
\f
-;;;### (autoloads nil "ibuffer" "ibuffer.el" (20921 40206 193565
-;;;;;; 167000))
+;;;### (autoloads nil "ibuffer" "ibuffer.el" (20999 25770 522517
+;;;;;; 0))
;;; Generated autoloads from ibuffer.el
(autoload 'ibuffer-list-buffers "ibuffer" "\
;;;### (autoloads nil "icalendar" "calendar/icalendar.el" (20709
;;;;;; 26818 907104 0))
;;; Generated autoloads from calendar/icalendar.el
-(push (purecopy (quote (icalendar 0 19))) package--builtin-versions)
+(push (purecopy '(icalendar 0 19)) package--builtin-versions)
(autoload 'icalendar-export-file "icalendar" "\
Export diary file to iCalendar format.
All diary entries in the file DIARY-FILENAME are converted to iCalendar
;;;***
\f
-;;;### (autoloads nil "icomplete" "icomplete.el" (20766 59066 666084
+;;;### (autoloads nil "icomplete" "icomplete.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from icomplete.el
;;;### (autoloads nil "idlwave" "progmodes/idlwave.el" (20929 34089
;;;;;; 117790 0))
;;; Generated autoloads from progmodes/idlwave.el
-(push (purecopy (quote (idlwave 6 1 22))) package--builtin-versions)
+(push (purecopy '(idlwave 6 1 22)) package--builtin-versions)
(autoload 'idlwave-mode "idlwave" "\
Major mode for editing IDL source files (version 6.1_em22).
;;;***
\f
-;;;### (autoloads nil "ido" "ido.el" (20937 28198 475168 0))
+;;;### (autoloads nil "ido" "ido.el" (20996 49577 892030 0))
;;; Generated autoloads from ido.el
(defvar ido-mode nil "\
-Determines for which functional group (buffer and files) ido behavior
-should be enabled. The following values are possible:
+Determines for which buffer/file Ido should be enabled.
+The following values are possible:
- `buffer': Turn only on ido buffer behavior (switching, killing,
displaying...)
- `file': Turn only on ido file behavior (finding, writing, inserting...)
- `both': Turn on ido buffer and file behavior.
-- `nil': Turn off any ido switching.
+- nil: Turn off any ido switching.
Setting this variable directly does not take effect;
use either \\[customize] or the function `ido-mode'.")
;;;***
\f
-;;;### (autoloads nil "image" "image.el" (20903 10024 645978 0))
+;;;### (autoloads nil "image" "image.el" (21005 64551 555603 0))
;;; Generated autoloads from image.el
(autoload 'image-type-from-data "image" "\
;;;***
\f
-;;;### (autoloads nil "image-dired" "image-dired.el" (20921 39978
-;;;;;; 248467 0))
+;;;### (autoloads nil "image-dired" "image-dired.el" (20971 46377
+;;;;;; 737658 0))
;;; Generated autoloads from image-dired.el
-(push (purecopy (quote (image-dired 0 4 11))) package--builtin-versions)
+(push (purecopy '(image-dired 0 4 11)) package--builtin-versions)
(autoload 'image-dired-dired-toggle-marked-thumbs "image-dired" "\
Toggle thumbnails in front of file names in the dired buffer.
If no marked file could be found, insert or hide thumbnails on the
;;;***
\f
-;;;### (autoloads nil "image-mode" "image-mode.el" (20899 12965 791908
+;;;### (autoloads nil "image-mode" "image-mode.el" (21005 64551 555603
;;;;;; 0))
;;; Generated autoloads from image-mode.el
You can use \\<image-mode-map>\\[image-toggle-display]
to toggle between display as an image and display as text.
+Key bindings:
+\\{image-mode-map}
+
\(fn)" t nil)
(autoload 'image-minor-mode "image-mode" "\
;;;***
\f
-;;;### (autoloads nil "info" "info.el" (20940 4391 641153 0))
+;;;### (autoloads nil "info" "info.el" (20992 52525 458637 0))
;;; Generated autoloads from info.el
(defcustom Info-default-directory-list (let* ((config-dir (file-name-as-directory (or (and (featurep 'ns) (let ((dir (expand-file-name "../info" data-directory))) (if (file-directory-p dir) dir))) configure-info-directory))) (prefixes (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/"))) (suffixes '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/" "emacs/" "lib/" "lib/emacs/")) (standard-info-dirs (apply #'nconc (mapcar (lambda (pfx) (let ((dirs (mapcar (lambda (sfx) (concat pfx sfx "info/")) suffixes))) (prune-directory-list dirs))) prefixes))) (dirs (if (member config-dir standard-info-dirs) (nconc standard-info-dirs (list config-dir)) (cons config-dir standard-info-dirs)))) (if (not (eq system-type 'windows-nt)) dirs (let* ((instdir (file-name-directory invocation-directory)) (dir1 (expand-file-name "../info/" instdir)) (dir2 (expand-file-name "../../../info/" instdir))) (cond ((file-exists-p dir1) (append dirs (list dir1))) ((file-exists-p dir2) (append dirs (list dir2))) (t dirs))))) "\
;;;***
\f
-;;;### (autoloads nil "info-xref" "info-xref.el" (20938 49065 383398
+;;;### (autoloads nil "info-xref" "info-xref.el" (20947 64044 876888
;;;;;; 0))
;;; Generated autoloads from info-xref.el
-(push (purecopy (quote (info-xref 3))) package--builtin-versions)
+(push (purecopy '(info-xref 3)) package--builtin-versions)
(autoload 'info-xref-check "info-xref" "\
Check external references in FILENAME, an info document.
Interactively from an `Info-mode' or `texinfo-mode' buffer the
;;;### (autoloads nil "inversion" "cedet/inversion.el" (20745 310
;;;;;; 425822 0))
;;; Generated autoloads from cedet/inversion.el
-(push (purecopy (quote (inversion 1 3))) package--builtin-versions)
+(push (purecopy '(inversion 1 3)) package--builtin-versions)
(autoload 'inversion-require-emacs "inversion" "\
Declare that you need either EMACS-VER, XEMACS-VER or SXEMACS-ver.
Only checks one based on which kind of Emacs is being run.
;;;### (autoloads nil "isearchb" "isearchb.el" (20709 26818 907104
;;;;;; 0))
;;; Generated autoloads from isearchb.el
-(push (purecopy (quote (isearchb 1 5))) package--builtin-versions)
+(push (purecopy '(isearchb 1 5)) package--builtin-versions)
(autoload 'isearchb-activate "isearchb" "\
Active isearchb mode for subsequent alphanumeric keystrokes.
Executing this command again will terminate the search; or, if
;;;***
\f
-;;;### (autoloads nil "ispell" "textmodes/ispell.el" (20847 51240
-;;;;;; 240216 0))
+;;;### (autoloads nil "ispell" "textmodes/ispell.el" (20992 52525
+;;;;;; 458637 0))
;;; Generated autoloads from textmodes/ispell.el
(put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive))))
;;;***
\f
-;;;### (autoloads nil "jka-compr" "jka-compr.el" (20759 33211 414988
+;;;### (autoloads nil "jka-compr" "jka-compr.el" (20998 4934 952905
;;;;;; 0))
;;; Generated autoloads from jka-compr.el
;;;***
\f
-;;;### (autoloads nil "js" "progmodes/js.el" (20895 15912 444844
-;;;;;; 0))
+;;;### (autoloads nil "js" "progmodes/js.el" (20998 4934 952905 0))
;;; Generated autoloads from progmodes/js.el
-(push (purecopy (quote (js 9))) package--builtin-versions)
+(push (purecopy '(js 9)) package--builtin-versions)
(autoload 'js-mode "js" "\
Major mode for editing JavaScript.
;;;***
\f
-;;;### (autoloads nil "json" "json.el" (20709 26818 907104 0))
+;;;### (autoloads nil "json" "json.el" (20998 4934 952905 0))
;;; Generated autoloads from json.el
-(push (purecopy (quote (json 1 4))) package--builtin-versions)
+(push (purecopy '(json 1 4)) package--builtin-versions)
;;;***
\f
;;;### (autoloads nil "keypad" "emulation/keypad.el" (20709 26818
;;;***
\f
-;;;### (autoloads nil "kkc" "international/kkc.el" (20799 169 640767
+;;;### (autoloads nil "kkc" "international/kkc.el" (20998 4934 952905
;;;;;; 0))
;;; Generated autoloads from international/kkc.el
;;;***
\f
-;;;### (autoloads nil "landmark" "play/landmark.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "landmark" "play/landmark.el" (20992 52525
+;;;;;; 458637 0))
;;; Generated autoloads from play/landmark.el
(defalias 'landmark-repeat 'landmark-test-run)
;;;***
\f
-;;;### (autoloads nil "life" "play/life.el" (20709 26818 907104 0))
+;;;### (autoloads nil "life" "play/life.el" (20998 4934 952905 0))
;;; Generated autoloads from play/life.el
(autoload 'life "life" "\
\f
;;;### (autoloads nil "linum" "linum.el" (20709 26818 907104 0))
;;; Generated autoloads from linum.el
-(push (purecopy (quote (linum 0 9 24))) package--builtin-versions)
+(push (purecopy '(linum 0 9 24)) package--builtin-versions)
(autoload 'linum-mode "linum" "\
Toggle display of line numbers in the left margin (Linum mode).
With a prefix argument ARG, enable Linum mode if ARG is positive,
;;;***
\f
-;;;### (autoloads nil "log-view" "vc/log-view.el" (20918 63784 852859
+;;;### (autoloads nil "log-view" "vc/log-view.el" (20986 13739 89657
;;;;;; 0))
;;; Generated autoloads from vc/log-view.el
;;;***
\f
-;;;### (autoloads nil "lpr" "lpr.el" (20878 6823 881439 0))
+;;;### (autoloads nil "lpr" "lpr.el" (20975 43430 521692 0))
;;; Generated autoloads from lpr.el
(defvar lpr-windows-system (memq system-type '(ms-dos windows-nt)) "\
;;;***
\f
-;;;### (autoloads nil "mailalias" "mail/mailalias.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "mailalias" "mail/mailalias.el" (20970 25513
+;;;;;; 362767 0))
;;; Generated autoloads from mail/mailalias.el
(defvar mail-complete-style 'angles "\
\f
;;;### (autoloads nil "master" "master.el" (20884 7264 912957 506000))
;;; Generated autoloads from master.el
-(push (purecopy (quote (master 1 0 2))) package--builtin-versions)
+(push (purecopy '(master 1 0 2)) package--builtin-versions)
(autoload 'master-mode "master" "\
Toggle Master mode.
With a prefix argument ARG, enable Master mode if ARG is
\f
;;;### (autoloads nil "md4" "md4.el" (20709 26818 907104 0))
;;; Generated autoloads from md4.el
-(push (purecopy (quote (md4 1 0))) package--builtin-versions)
+(push (purecopy '(md4 1 0)) package--builtin-versions)
;;;***
\f
-;;;### (autoloads nil "message" "gnus/message.el" (20889 63525 775294
+;;;### (autoloads nil "message" "gnus/message.el" (20986 60038 720063
;;;;;; 0))
;;; Generated autoloads from gnus/message.el
;;;### (autoloads nil "meta-mode" "progmodes/meta-mode.el" (20874
;;;;;; 62962 290468 0))
;;; Generated autoloads from progmodes/meta-mode.el
-(push (purecopy (quote (meta-mode 1 0))) package--builtin-versions)
+(push (purecopy '(meta-mode 1 0)) package--builtin-versions)
(autoload 'metafont-mode "meta-mode" "\
Major mode for editing Metafont sources.
;;;***
\f
-;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (20874 65006 672942 217000))
+;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (20987 34598 970563 0))
;;; Generated autoloads from mh-e/mh-e.el
-(push (purecopy (quote (mh-e 8 5))) package--builtin-versions)
+(push (purecopy '(mh-e 8 5)) package--builtin-versions)
(put 'mh-progs 'risky-local-variable t)
(put 'mh-lib 'risky-local-variable t)
;;;***
\f
-;;;### (autoloads nil "mixal-mode" "progmodes/mixal-mode.el" (20709
-;;;;;; 26818 907104 0))
+;;;### (autoloads nil "mixal-mode" "progmodes/mixal-mode.el" (21002
+;;;;;; 1963 769129 0))
;;; Generated autoloads from progmodes/mixal-mode.el
-(push (purecopy (quote (mixal-mode 0 1))) package--builtin-versions)
+(push (purecopy '(mixal-mode 0 1)) package--builtin-versions)
(autoload 'mixal-mode "mixal-mode" "\
Major mode for the mixal asm language.
;;;***
\f
-;;;### (autoloads nil "mml2015" "gnus/mml2015.el" (20922 60838 997229
+;;;### (autoloads nil "mml2015" "gnus/mml2015.el" (20986 60038 720063
;;;;;; 0))
;;; Generated autoloads from gnus/mml2015.el
;;;***
\f
-;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (20709 26818 907104
+;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from mouse-drag.el
;;;***
\f
-;;;### (autoloads nil "mpc" "mpc.el" (20838 36262 626321 0))
+;;;### (autoloads nil "mpc" "mpc.el" (20998 4934 952905 0))
;;; Generated autoloads from mpc.el
(autoload 'mpc "mpc" "\
;;;***
\f
-;;;### (autoloads nil "msb" "msb.el" (20709 26818 907104 0))
+;;;### (autoloads nil "msb" "msb.el" (20999 25770 522517 0))
;;; Generated autoloads from msb.el
(defvar msb-mode nil "\
;;;***
\f
-;;;### (autoloads nil "mule-util" "international/mule-util.el" (20826
-;;;;;; 45095 436233 0))
+;;;### (autoloads nil "mule-util" "international/mule-util.el" (20991
+;;;;;; 31656 363459 0))
;;; Generated autoloads from international/mule-util.el
(defsubst string-to-list (string) "\
\(fn CHAR)" nil nil)
-;;;***
-\f
-;;;### (autoloads nil "nadvice" "emacs-lisp/nadvice.el" (20940 4391
-;;;;;; 641153 0))
-;;; Generated autoloads from emacs-lisp/nadvice.el
-
-(autoload 'advice--remove-function "nadvice" "\
-
-
-\(fn FLIST FUNCTION)" nil nil)
-
-(autoload 'advice--buffer-local "nadvice" "\
-Buffer-local value of VAR, presumed to contain a function.
-
-\(fn VAR)" nil nil)
-
-(autoload 'add-function "nadvice" "\
-Add a piece of advice on the function stored at PLACE.
-FUNCTION describes the code to add. WHERE describes where to add it.
-WHERE can be explained by showing the resulting new function, as the
-result of combining FUNCTION and the previous value of PLACE, which we
-call OLDFUN here:
-`:before' (lambda (&rest r) (apply FUNCTION r) (apply OLDFUN r))
-`:after' (lambda (&rest r) (prog1 (apply OLDFUN r) (apply FUNCTION r)))
-`:around' (lambda (&rest r) (apply FUNCTION OLDFUN r))
-`:override' (lambda (&rest r) (apply FUNCTION r))
-`:before-while' (lambda (&rest r) (and (apply FUNCTION r) (apply OLDFUN r)))
-`:before-until' (lambda (&rest r) (or (apply FUNCTION r) (apply OLDFUN r)))
-`:after-while' (lambda (&rest r) (and (apply OLDFUN r) (apply FUNCTION r)))
-`:after-until' (lambda (&rest r) (or (apply OLDFUN r) (apply FUNCTION r)))
-`:filter-args' (lambda (&rest r) (apply OLDFUN (funcall FUNCTION r)))
-`:filter-return'(lambda (&rest r) (funcall FUNCTION (apply OLDFUN r)))
-If FUNCTION was already added, do nothing.
-PROPS is an alist of additional properties, among which the following have
-a special meaning:
-- `name': a string or symbol. It can be used to refer to this piece of advice.
-
-If PLACE is a simple variable, only its global value will be affected.
-Use (local 'VAR) if you want to apply FUNCTION to VAR buffer-locally.
-
-If one of FUNCTION or OLDFUN is interactive, then the resulting function
-is also interactive. There are 3 cases:
-- FUNCTION is not interactive: the interactive spec of OLDFUN is used.
-- The interactive spec of FUNCTION is itself a function: it should take one
- argument (the interactive spec of OLDFUN, which it can pass to
- `advice-eval-interactive-spec') and return the list of arguments to use.
-- Else, use the interactive spec of FUNCTION and ignore the one of OLDFUN.
-
-\(fn WHERE PLACE FUNCTION &optional PROPS)" nil t)
-
-(autoload 'advice--add-function "nadvice" "\
-
-
-\(fn WHERE REF FUNCTION PROPS)" nil nil)
-
-(autoload 'remove-function "nadvice" "\
-Remove the FUNCTION piece of advice from PLACE.
-If FUNCTION was not added to PLACE, do nothing.
-Instead of FUNCTION being the actual function, it can also be the `name'
-of the piece of advice.
-
-\(fn PLACE FUNCTION)" nil t)
-
-(autoload 'advice-add "nadvice" "\
-Like `add-function' but for the function named SYMBOL.
-Contrary to `add-function', this will properly handle the cases where SYMBOL
-is defined as a macro, alias, command, ...
-
-\(fn SYMBOL WHERE FUNCTION &optional PROPS)" nil nil)
-
-(autoload 'advice-remove "nadvice" "\
-Like `remove-function' but for the function named SYMBOL.
-Contrary to `remove-function', this also works when SYMBOL is a macro
-or an autoload and it preserves `fboundp'.
-Instead of the actual function to remove, FUNCTION can also be the `name'
-of the piece of advice.
-
-\(fn SYMBOL FUNCTION)" nil nil)
-
-(autoload 'advice-member-p "nadvice" "\
-Return non-nil if ADVICE has been added to FUNCTION-NAME.
-Instead of ADVICE being the actual function, it can also be the `name'
-of the piece of advice.
-
-\(fn ADVICE FUNCTION-NAME)" nil nil)
-
;;;***
\f
;;;### (autoloads nil "net-utils" "net/net-utils.el" (20903 10024
;;;***
\f
-;;;### (autoloads nil "network-stream" "net/network-stream.el" (20770
-;;;;;; 3512 176098 0))
+;;;### (autoloads nil "network-stream" "net/network-stream.el" (20984
+;;;;;; 58408 354075 0))
;;; Generated autoloads from net/network-stream.el
(autoload 'open-network-stream "network-stream" "\
:use-starttls-if-possible is a boolean that says to do opportunistic
STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
+:nogreeting is a boolean that can be used to inhibit waiting for
+a greeting from the server.
+
:nowait is a boolean that says the connection should be made
asynchronously, if possible.
;;;***
\f
;;;### (autoloads nil "newst-plainview" "net/newst-plainview.el"
-;;;;;; (20762 9398 526093 0))
+;;;;;; (20992 52525 458637 0))
;;; Generated autoloads from net/newst-plainview.el
(autoload 'newsticker-plainview "newst-plainview" "\
;;;### (autoloads nil "newsticker" "net/newsticker.el" (20709 26818
;;;;;; 907104 0))
;;; Generated autoloads from net/newsticker.el
-(push (purecopy (quote (newsticker 1 99))) package--builtin-versions)
+(push (purecopy '(newsticker 1 99)) package--builtin-versions)
;;;***
\f
;;;### (autoloads nil "nndiary" "gnus/nndiary.el" (20709 26818 907104
;;;### (autoloads nil "nnmairix" "gnus/nnmairix.el" (20709 26818
;;;;;; 907104 0))
;;; Generated autoloads from gnus/nnmairix.el
-(push (purecopy (quote (nnmairix 0 6))) package--builtin-versions)
+(push (purecopy '(nnmairix 0 6)) package--builtin-versions)
;;;***
\f
-;;;### (autoloads nil "nnml" "gnus/nnml.el" (20709 26818 907104 0))
+;;;### (autoloads nil "nnml" "gnus/nnml.el" (20955 58152 201869 0))
;;; Generated autoloads from gnus/nnml.el
(autoload 'nnml-generate-nov-databases "nnml" "\
\f
;;;### (autoloads nil "ntlm" "net/ntlm.el" (20709 26818 907104 0))
;;; Generated autoloads from net/ntlm.el
-(push (purecopy (quote (ntlm 1 0))) package--builtin-versions)
+(push (purecopy '(ntlm 1 0)) package--builtin-versions)
;;;***
\f
;;;### (autoloads nil "nxml-glyph" "nxml/nxml-glyph.el" (20709 26818
;;;***
\f
-;;;### (autoloads nil "package" "emacs-lisp/package.el" (20938 49065
-;;;;;; 383398 0))
+;;;### (autoloads nil "package" "emacs-lisp/package.el" (21022 27213
+;;;;;; 317995 0))
;;; Generated autoloads from emacs-lisp/package.el
-(push (purecopy (quote (package 1 0 1))) package--builtin-versions)
+(push (purecopy '(package 1 0 1)) package--builtin-versions)
(defvar package-enable-at-startup t "\
Whether to activate installed packages when Emacs starts.
If non-nil, packages are activated after reading the init file
;;;***
\f
-;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (20717 20920
-;;;;;; 410005 0))
+;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (20991 31656
+;;;;;; 363459 0))
;;; Generated autoloads from emacs-lisp/pcase.el
(autoload 'pcase "pcase" "\
;;;***
\f
-;;;### (autoloads nil "pcvs" "vc/pcvs.el" (20717 20920 410005 0))
+;;;### (autoloads nil "pcvs" "vc/pcvs.el" (20983 37555 279226 0))
;;; Generated autoloads from vc/pcvs.el
(autoload 'cvs-checkout "pcvs" "\
;;;***
\f
-;;;### (autoloads nil "pp" "emacs-lisp/pp.el" (20709 26818 907104
+;;;### (autoloads nil "pp" "emacs-lisp/pp.el" (21013 58662 278539
;;;;;; 0))
;;; Generated autoloads from emacs-lisp/pp.el
;;;***
\f
-;;;### (autoloads nil "printing" "printing.el" (20891 44219 680764
+;;;### (autoloads nil "printing" "printing.el" (20975 43430 521692
;;;;;; 0))
;;; Generated autoloads from printing.el
-(push (purecopy (quote (printing 6 9 3))) package--builtin-versions)
+(push (purecopy '(printing 6 9 3)) package--builtin-versions)
(autoload 'pr-interface "printing" "\
Activate the printing interface buffer.
;;;### (autoloads nil "ps-mode" "progmodes/ps-mode.el" (20777 63161
;;;;;; 848428 0))
;;; Generated autoloads from progmodes/ps-mode.el
-(push (purecopy (quote (ps-mode 1 1 9))) package--builtin-versions)
+(push (purecopy '(ps-mode 1 1 9)) package--builtin-versions)
(autoload 'ps-mode "ps-mode" "\
Major mode for editing PostScript with GNU Emacs.
;;;***
\f
-;;;### (autoloads nil "ps-print" "ps-print.el" (20874 65006 672942
-;;;;;; 217000))
+;;;### (autoloads nil "ps-print" "ps-print.el" (20975 43430 521692
+;;;;;; 0))
;;; Generated autoloads from ps-print.el
-(push (purecopy (quote (ps-print 7 3 5))) package--builtin-versions)
+(push (purecopy '(ps-print 7 3 5)) package--builtin-versions)
(defvar ps-page-dimensions-database (purecopy (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list 'letter (* 72 8.5) (* 72 11.0) "Letter") (list 'legal (* 72 8.5) (* 72 14.0) "Legal") (list 'letter-small (* 72 7.68) (* 72 10.16) "LetterSmall") (list 'tabloid (* 72 11.0) (* 72 17.0) "Tabloid") (list 'ledger (* 72 17.0) (* 72 11.0) "Ledger") (list 'statement (* 72 5.5) (* 72 8.5) "Statement") (list 'executive (* 72 7.5) (* 72 10.0) "Executive") (list 'a4small (* 72 7.47) (* 72 10.85) "A4Small") (list 'b4 (* 72 10.125) (* 72 14.33) "B4") (list 'b5 (* 72 7.16) (* 72 10.125) "B5") '(addresslarge 236.0 99.0 "AddressLarge") '(addresssmall 236.0 68.0 "AddressSmall") '(cuthanging13 90.0 222.0 "CutHanging13") '(cuthanging15 90.0 114.0 "CutHanging15") '(diskette 181.0 136.0 "Diskette") '(eurofilefolder 139.0 112.0 "EuropeanFilefolder") '(eurofoldernarrow 526.0 107.0 "EuroFolderNarrow") '(eurofolderwide 526.0 136.0 "EuroFolderWide") '(euronamebadge 189.0 108.0 "EuroNameBadge") '(euronamebadgelarge 223.0 136.0 "EuroNameBadgeLarge") '(filefolder 230.0 37.0 "FileFolder") '(jewelry 76.0 136.0 "Jewelry") '(mediabadge 180.0 136.0 "MediaBadge") '(multipurpose 126.0 68.0 "MultiPurpose") '(retaillabel 90.0 104.0 "RetailLabel") '(shipping 271.0 136.0 "Shipping") '(slide35mm 26.0 104.0 "Slide35mm") '(spine8mm 187.0 26.0 "Spine8mm") '(topcoated 425.19685 136.0 "TopCoatedPaper") '(topcoatedpaper 396.0 136.0 "TopcoatedPaper150") '(vhsface 205.0 127.0 "VHSFace") '(vhsspine 400.0 50.0 "VHSSpine") '(zipdisk 156.0 136.0 "ZipDisk"))) "\
List associating a symbolic paper type to its width, height and doc media.
See `ps-paper-type'.")
;;;### (autoloads nil "pulse" "cedet/pulse.el" (20709 26818 907104
;;;;;; 0))
;;; Generated autoloads from cedet/pulse.el
-(push (purecopy (quote (pulse 1 0))) package--builtin-versions)
+(push (purecopy '(pulse 1 0)) package--builtin-versions)
;;;***
\f
-;;;### (autoloads nil "python" "progmodes/python.el" (20928 13222
-;;;;;; 500272 0))
+;;;### (autoloads nil "python" "progmodes/python.el" (21020 31917
+;;;;;; 145164 0))
;;; Generated autoloads from progmodes/python.el
-(push (purecopy (quote (python 0 24 2))) package--builtin-versions)
+(push (purecopy '(python 0 24 2)) package--builtin-versions)
(add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode))
(add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode))
;;;***
\f
-;;;### (autoloads nil "quail" "international/quail.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "quail" "international/quail.el" (20998 4934
+;;;;;; 952905 0))
;;; Generated autoloads from international/quail.el
(autoload 'quail-title "quail" "\
;;;***
\f
-;;;### (autoloads nil "rcirc" "net/rcirc.el" (20770 3512 176098 0))
+;;;### (autoloads nil "rcirc" "net/rcirc.el" (20992 52525 458637
+;;;;;; 0))
;;; Generated autoloads from net/rcirc.el
(autoload 'rcirc "rcirc" "\
;;;***
\f
-;;;### (autoloads nil "re-builder" "emacs-lisp/re-builder.el" (20709
-;;;;;; 26818 907104 0))
+;;;### (autoloads nil "re-builder" "emacs-lisp/re-builder.el" (20984
+;;;;;; 58408 354075 0))
;;; Generated autoloads from emacs-lisp/re-builder.el
(defalias 'regexp-builder 're-builder)
;;;### (autoloads nil "regi" "emacs-lisp/regi.el" (20709 26818 907104
;;;;;; 0))
;;; Generated autoloads from emacs-lisp/regi.el
-(push (purecopy (quote (regi 1 8))) package--builtin-versions)
+(push (purecopy '(regi 1 8)) package--builtin-versions)
;;;***
\f
;;;### (autoloads nil "remember" "textmodes/remember.el" (20945 22315
;;;;;; 8369 0))
;;; Generated autoloads from textmodes/remember.el
-(push (purecopy (quote (remember 2 0))) package--builtin-versions)
+(push (purecopy '(remember 2 0)) package--builtin-versions)
(autoload 'remember "remember" "\
Remember an arbitrary piece of data.
INITIAL is the text to initially place in the *Remember* buffer,
\f
;;;### (autoloads nil "repeat" "repeat.el" (20709 26818 907104 0))
;;; Generated autoloads from repeat.el
-(push (purecopy (quote (repeat 0 51))) package--builtin-versions)
+(push (purecopy '(repeat 0 51)) package--builtin-versions)
(autoload 'repeat "repeat" "\
Repeat most recently executed command.
If REPEAT-ARG is non-nil (interactively, with a prefix argument),
;;;***
\f
-;;;### (autoloads nil "reposition" "reposition.el" (20709 26818 907104
+;;;### (autoloads nil "reposition" "reposition.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from reposition.el
;;;***
\f
-;;;### (autoloads nil "rmail" "mail/rmail.el" (20892 39729 858825
+;;;### (autoloads nil "rmail" "mail/rmail.el" (20992 52525 458637
;;;;;; 0))
;;; Generated autoloads from mail/rmail.el
;;;***
\f
-;;;### (autoloads nil "rng-cmpct" "nxml/rng-cmpct.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "rng-cmpct" "nxml/rng-cmpct.el" (20998 4934
+;;;;;; 952905 0))
;;; Generated autoloads from nxml/rng-cmpct.el
(autoload 'rng-c-load-schema "rng-cmpct" "\
;;;***
\f
-;;;### (autoloads nil "rot13" "rot13.el" (20709 26818 907104 0))
+;;;### (autoloads nil "rot13" "rot13.el" (20992 52525 458637 0))
;;; Generated autoloads from rot13.el
(autoload 'rot13 "rot13" "\
;;;***
\f
-;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (20944
-;;;;;; 1446 914400 0))
+;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (21024
+;;;;;; 28968 738399 0))
;;; Generated autoloads from progmodes/ruby-mode.el
-(push (purecopy (quote (ruby-mode 1 2))) package--builtin-versions)
+(push (purecopy '(ruby-mode 1 2)) package--builtin-versions)
(autoload 'ruby-mode "ruby-mode" "\
Major mode for editing Ruby scripts.
\\[ruby-indent-line] properly indents subexpressions of multi-line
;;;### (autoloads nil "ruler-mode" "ruler-mode.el" (20791 9657 561026
;;;;;; 0))
;;; Generated autoloads from ruler-mode.el
-(push (purecopy (quote (ruler-mode 1 6))) package--builtin-versions)
+(push (purecopy '(ruler-mode 1 6)) package--builtin-versions)
(defvar ruler-mode nil "\
Non-nil if Ruler mode is enabled.
Use the command `ruler-mode' to change this variable.")
;;;### (autoloads nil "sasl-ntlm" "net/sasl-ntlm.el" (20709 26818
;;;;;; 907104 0))
;;; Generated autoloads from net/sasl-ntlm.el
-(push (purecopy (quote (sasl 1 0))) package--builtin-versions)
+(push (purecopy '(sasl 1 0)) package--builtin-versions)
;;;***
\f
;;;### (autoloads nil "savehist" "savehist.el" (20709 26818 907104
;;;;;; 0))
;;; Generated autoloads from savehist.el
-(push (purecopy (quote (savehist 24))) package--builtin-versions)
+(push (purecopy '(savehist 24)) package--builtin-versions)
(defvar savehist-mode nil "\
Non-nil if Savehist mode is enabled.
See the command `savehist-mode' for a description of this minor mode.
;;;### (autoloads nil "semantic" "cedet/semantic.el" (20908 27948
;;;;;; 216644 0))
;;; Generated autoloads from cedet/semantic.el
-(push (purecopy (quote (semantic 2 2))) package--builtin-versions)
+(push (purecopy '(semantic 2 2)) package--builtin-versions)
(defvar semantic-default-submodes '(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode) "\
List of auxiliary Semantic minor modes enabled by `semantic-mode'.
The possible elements of this list include the following:
;;;***
\f
-;;;### (autoloads nil "sendmail" "mail/sendmail.el" (20723 59703
-;;;;;; 12265 0))
+;;;### (autoloads nil "sendmail" "mail/sendmail.el" (21002 1963 769129
+;;;;;; 0))
;;; Generated autoloads from mail/sendmail.el
(defvar mail-from-style 'default "\
;;;***
\f
-;;;### (autoloads nil "server" "server.el" (20763 30266 231060 0))
+;;;### (autoloads nil "server" "server.el" (20992 52525 458637 0))
;;; Generated autoloads from server.el
(put 'server-host 'risky-local-variable t)
;;;***
\f
-;;;### (autoloads nil "ses" "ses.el" (20709 26818 907104 0))
+;;;### (autoloads nil "ses" "ses.el" (20999 25770 522517 0))
;;; Generated autoloads from ses.el
(autoload 'ses-mode "ses" "\
;;;***
\f
-;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (20850
-;;;;;; 27430 515630 0))
+;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (21022
+;;;;;; 40320 762131 34000))
;;; Generated autoloads from progmodes/sh-script.el
-(push (purecopy (quote (sh-script 2 0 6))) package--builtin-versions)(put 'sh-shell 'safe-local-variable 'symbolp)
+(push (purecopy '(sh-script 2 0 6)) package--builtin-versions)(put 'sh-shell 'safe-local-variable 'symbolp)
(autoload 'sh-mode "sh-script" "\
Major mode for editing shell scripts.
;;;***
\f
-;;;### (autoloads nil "shadowfile" "shadowfile.el" (20799 169 640767
+;;;### (autoloads nil "shadowfile" "shadowfile.el" (20959 55207 940876
;;;;;; 0))
;;; Generated autoloads from shadowfile.el
;;;***
\f
-;;;### (autoloads nil "shell" "shell.el" (20884 7264 912957 506000))
+;;;### (autoloads nil "shell" "shell.el" (20992 52525 458637 0))
;;; Generated autoloads from shell.el
(defvar shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") "\
;;;***
\f
-;;;### (autoloads nil "shr" "net/shr.el" (20944 31824 211965 0))
+;;;### (autoloads nil "shr" "net/shr.el" (21007 19880 17663 0))
;;; Generated autoloads from net/shr.el
(autoload 'shr-insert-document "shr" "\
;;;***
\f
-;;;### (autoloads nil "smerge-mode" "vc/smerge-mode.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "smerge-mode" "vc/smerge-mode.el" (21022 27213
+;;;;;; 317995 0))
;;; Generated autoloads from vc/smerge-mode.el
(autoload 'smerge-ediff "smerge-mode" "\
;;;***
\f
-;;;### (autoloads nil "speedbar" "speedbar.el" (20892 39729 858825
+;;;### (autoloads nil "speedbar" "speedbar.el" (21024 28968 738399
;;;;;; 0))
;;; Generated autoloads from speedbar.el
;;;***
\f
-;;;### (autoloads nil "sql" "progmodes/sql.el" (20878 6823 881439
+;;;### (autoloads nil "sql" "progmodes/sql.el" (20975 10147 44538
;;;;;; 0))
;;; Generated autoloads from progmodes/sql.el
-(push (purecopy (quote (sql 3 2))) package--builtin-versions)
+(push (purecopy '(sql 3 3)) package--builtin-versions)
(autoload 'sql-add-product-keywords "sql" "\
Add highlighting KEYWORDS for SQL PRODUCT.
;;;### (autoloads nil "srecode" "cedet/srecode.el" (20748 62911 684442
;;;;;; 0))
;;; Generated autoloads from cedet/srecode.el
-(push (purecopy (quote (srecode 1 2))) package--builtin-versions)
+(push (purecopy '(srecode 1 2)) package--builtin-versions)
;;;***
\f
;;;### (autoloads nil "srecode/srt-mode" "cedet/srecode/srt-mode.el"
;;;***
\f
-;;;### (autoloads nil "subword" "progmodes/subword.el" (20886 47777
-;;;;;; 83668 440000))
+;;;### (autoloads nil "subword" "progmodes/subword.el" (20974 22577
+;;;;;; 548213 0))
;;; Generated autoloads from progmodes/subword.el
(autoload 'subword-mode "subword" "\
;;;***
\f
-;;;### (autoloads nil "tabify" "tabify.el" (20928 13222 500272 0))
+;;;### (autoloads nil "tabify" "tabify.el" (20999 25770 522517 0))
;;; Generated autoloads from tabify.el
(autoload 'untabify "tabify" "\
;;;***
\f
-;;;### (autoloads nil "talk" "talk.el" (20709 26818 907104 0))
+;;;### (autoloads nil "talk" "talk.el" (20992 52525 458637 0))
;;; Generated autoloads from talk.el
(autoload 'talk-connect "talk" "\
;;;### (autoloads nil "tetris" "play/tetris.el" (20874 65006 672942
;;;;;; 217000))
;;; Generated autoloads from play/tetris.el
-(push (purecopy (quote (tetris 2 1))) package--builtin-versions)
+(push (purecopy '(tetris 2 1)) package--builtin-versions)
(autoload 'tetris "tetris" "\
Play the Tetris game.
Shapes drop from the top of the screen, and the user has to move and
;;;***
\f
-;;;### (autoloads nil "thingatpt" "thingatpt.el" (20874 62962 290468
+;;;### (autoloads nil "thingatpt" "thingatpt.el" (20999 25770 522517
;;;;;; 0))
;;; Generated autoloads from thingatpt.el
;;;***
\f
-;;;### (autoloads nil "thumbs" "thumbs.el" (20709 26818 907104 0))
+;;;### (autoloads nil "thumbs" "thumbs.el" (20958 59019 473587 89000))
;;; Generated autoloads from thumbs.el
(autoload 'thumbs-find-thumb "thumbs" "\
;;;### (autoloads nil "tildify" "textmodes/tildify.el" (20791 9657
;;;;;; 561026 0))
;;; Generated autoloads from textmodes/tildify.el
-(push (purecopy (quote (tildify 4 5))) package--builtin-versions)
+(push (purecopy '(tildify 4 5)) package--builtin-versions)
(autoload 'tildify-region "tildify" "\
Add hard spaces in the region between BEG and END.
See variables `tildify-pattern-alist', `tildify-string-alist', and
;;;***
\f
-;;;### (autoloads nil "time" "time.el" (20709 26818 907104 0))
+;;;### (autoloads nil "time" "time.el" (20998 4934 952905 0))
;;; Generated autoloads from time.el
(defvar display-time-day-and-date nil "\
;;;***
\f
-;;;### (autoloads nil "timeclock" "calendar/timeclock.el" (20799
-;;;;;; 169 640767 0))
+;;;### (autoloads nil "timeclock" "calendar/timeclock.el" (21013
+;;;;;; 58662 278539 0))
;;; Generated autoloads from calendar/timeclock.el
-(push (purecopy (quote (timeclock 2 6 1))) package--builtin-versions)
+(push (purecopy '(timeclock 2 6 1)) package--builtin-versions)
+(defvar timeclock-mode-line-display nil "\
+Non-nil if Timeclock-Mode-Line-Display mode is enabled.
+See the command `timeclock-mode-line-display' for a description of this minor mode.
+Setting this variable directly does not take effect;
+either customize it (see the info node `Easy Customization')
+or call the function `timeclock-mode-line-display'.")
+
+(custom-autoload 'timeclock-mode-line-display "timeclock" nil)
+
(autoload 'timeclock-mode-line-display "timeclock" "\
Toggle display of the amount of time left today in the mode line.
If `timeclock-use-display-time' is non-nil (the default), then
;;;***
\f
-;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (20944
-;;;;;; 31824 211965 0))
+;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (20982
+;;;;;; 16679 447285 0))
;;; Generated autoloads from calendar/todo-mode.el
(autoload 'todo-show "todo-mode" "\
Invoking this command in Todo Archive mode visits the
corresponding todo file, displaying the corresponding category.
-\(fn &optional SOLICIT-FILE)" t nil)
+\(fn &optional SOLICIT-FILE INTERACTIVE)" t nil)
;;;***
\f
;;;### (autoloads nil "tpu-edt" "emulation/tpu-edt.el" (20884 7264
;;;;;; 412929 442000))
;;; Generated autoloads from emulation/tpu-edt.el
-(push (purecopy (quote (tpu-edt 4 5))) package--builtin-versions)
+(push (purecopy '(tpu-edt 4 5)) package--builtin-versions)
(defvar tpu-edt-mode nil "\
Non-nil if Tpu-Edt mode is enabled.
See the command `tpu-edt-mode' for a description of this minor mode.
;;;***
\f
-;;;### (autoloads nil "tramp" "net/tramp.el" (20854 24486 190633
+;;;### (autoloads nil "tramp" "net/tramp.el" (21024 28968 738399
;;;;;; 0))
;;; Generated autoloads from net/tramp.el
;;;***
\f
-;;;### (autoloads nil "tramp-ftp" "net/tramp-ftp.el" (20709 26818
-;;;;;; 907104 0))
+;;;### (autoloads nil "tramp-ftp" "net/tramp-ftp.el" (21008 40741
+;;;;;; 120196 0))
;;; Generated autoloads from net/tramp-ftp.el
(autoload 'tramp-ftp-enable-ange-ftp "tramp-ftp" "\
;;;***
\f
-;;;### (autoloads nil "tutorial" "tutorial.el" (20760 54070 584283
+;;;### (autoloads nil "tutorial" "tutorial.el" (20999 25770 522517
;;;;;; 0))
;;; Generated autoloads from tutorial.el
;;;***
\f
-;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (20892
-;;;;;; 39729 858825 0))
+;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (20984
+;;;;;; 58408 354075 0))
;;; Generated autoloads from url/url-handlers.el
(defvar url-handler-mode nil "\
;;;***
\f
-;;;### (autoloads nil "url-http" "url/url-http.el" (20766 59628 334727
-;;;;;; 618000))
+;;;### (autoloads nil "url-http" "url/url-http.el" (21004 43695 993272
+;;;;;; 0))
;;; Generated autoloads from url/url-http.el
(autoload 'url-default-expander "url-expand")
;;;***
\f
-;;;### (autoloads nil "userlock" "userlock.el" (20709 26818 907104
+;;;### (autoloads nil "userlock" "userlock.el" (20998 4934 952905
;;;;;; 0))
;;; Generated autoloads from userlock.el
;;;***
\f
-;;;### (autoloads nil "vc" "vc/vc.el" (20919 46844 767888 0))
+;;;### (autoloads nil "vc" "vc/vc.el" (20992 52525 458637 0))
;;; Generated autoloads from vc/vc.el
(defvar vc-checkout-hook nil "\
;;;***
\f
-;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20900 33838 319219
+;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20990 10793 424093
;;;;;; 0))
;;; Generated autoloads from vc/vc-bzr.el
;;;***
\f
-;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20921 39978 248467
+;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20983 37555 279226
;;;;;; 0))
;;; Generated autoloads from vc/vc-cvs.el
(defun vc-cvs-registered (f)
;;;***
\f
-;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (20900 33838 319219
+;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (20990 10793 424093
;;;;;; 0))
;;; Generated autoloads from vc/vc-dir.el
;;;***
\f
-;;;### (autoloads nil "vc-git" "vc/vc-git.el" (20900 33838 319219
+;;;### (autoloads nil "vc-git" "vc/vc-git.el" (20990 10793 424093
;;;;;; 0))
;;; Generated autoloads from vc/vc-git.el
(defun vc-git-registered (file)
;;;***
\f
-;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20900 33838 319219 0))
+;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20990 10793 424093 0))
;;; Generated autoloads from vc/vc-hg.el
(defun vc-hg-registered (file)
"Return non-nil if FILE is registered with hg."
;;;***
\f
-;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (20900 33838 319219
+;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (20990 10793 424093
;;;;;; 0))
;;; Generated autoloads from vc/vc-svn.el
(defun vc-svn-registered (f)
;;;### (autoloads nil "vera-mode" "progmodes/vera-mode.el" (20893
;;;;;; 60586 188550 0))
;;; Generated autoloads from progmodes/vera-mode.el
-(push (purecopy (quote (vera-mode 2 28))) package--builtin-versions) (add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'") 'vera-mode))
+(push (purecopy '(vera-mode 2 28)) package--builtin-versions) (add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'") 'vera-mode))
(autoload 'vera-mode "vera-mode" "\
Major mode for editing Vera code.
;;;***
\f
;;;### (autoloads nil "verilog-mode" "progmodes/verilog-mode.el"
-;;;;;; (20885 2819 449152 0))
+;;;;;; (20992 52525 458637 0))
;;; Generated autoloads from progmodes/verilog-mode.el
(autoload 'verilog-mode "verilog-mode" "\
;;;***
\f
-;;;### (autoloads nil "view" "view.el" (20762 9398 526093 0))
+;;;### (autoloads nil "view" "view.el" (20999 25770 522517 0))
;;; Generated autoloads from view.el
(defvar view-remove-frame-by-deleting t "\
;;;***
\f
-;;;### (autoloads nil "viper" "emulation/viper.el" (20799 169 640767
+;;;### (autoloads nil "viper" "emulation/viper.el" (20954 37295 781599
;;;;;; 0))
;;; Generated autoloads from emulation/viper.el
-(push (purecopy (quote (viper 3 14 1))) package--builtin-versions)
+(push (purecopy '(viper 3 14 1)) package--builtin-versions)
(autoload 'toggle-viper-mode "viper" "\
Toggle Viper on/off.
If Viper is enabled, turn it off. Otherwise, turn it on.
;;;***
\f
-;;;### (autoloads nil "wdired" "wdired.el" (20900 33838 319219 0))
+;;;### (autoloads nil "wdired" "wdired.el" (20992 52525 458637 0))
;;; Generated autoloads from wdired.el
-(push (purecopy (quote (wdired 2 0))) package--builtin-versions)
+(push (purecopy '(wdired 2 0)) package--builtin-versions)
(autoload 'wdired-change-to-wdired-mode "wdired" "\
Put a Dired buffer in Writable Dired (WDired) mode.
\\<wdired-mode-map>
;;;***
\f
-;;;### (autoloads nil "whitespace" "whitespace.el" (20874 65007 172950
-;;;;;; 7000))
+;;;### (autoloads nil "whitespace" "whitespace.el" (20986 60038 720063
+;;;;;; 0))
;;; Generated autoloads from whitespace.el
-(push (purecopy (quote (whitespace 13 2 2))) package--builtin-versions)
+(push (purecopy '(whitespace 13 2 2)) package--builtin-versions)
(autoload 'whitespace-mode "whitespace" "\
Toggle whitespace visualization (Whitespace mode).
With a prefix argument ARG, enable Whitespace mode if ARG is
;;;***
\f
-;;;### (autoloads nil "wid-edit" "wid-edit.el" (20945 22315 8369
+;;;### (autoloads nil "wid-edit" "wid-edit.el" (20959 55207 940876
;;;;;; 0))
;;; Generated autoloads from wid-edit.el
;;;***
\f
-;;;### (autoloads nil "winner" "winner.el" (20849 6570 598687 0))
+;;;### (autoloads nil "winner" "winner.el" (20992 52525 458637 0))
;;; Generated autoloads from winner.el
(defvar winner-mode nil "\
;;;***
\f
-;;;### (autoloads nil "woman" "woman.el" (20709 26818 907104 0))
+;;;### (autoloads nil "woman" "woman.el" (20999 25770 522517 0))
;;; Generated autoloads from woman.el
-(push (purecopy (quote (woman 0 551))) package--builtin-versions)
+(push (purecopy '(woman 0 551)) package--builtin-versions)
(defvar woman-locale nil "\
String specifying a manual page locale, or nil.
If a manual page is available in the specified locale
;;;### (autoloads nil "ws-mode" "emulation/ws-mode.el" (20709 26818
;;;;;; 907104 0))
;;; Generated autoloads from emulation/ws-mode.el
-(push (purecopy (quote (ws-mode 0 7))) package--builtin-versions)
+(push (purecopy '(ws-mode 0 7)) package--builtin-versions)
(autoload 'wordstar-mode "ws-mode" "\
Major mode with WordStar-like key bindings.
;;;***
\f
-;;;### (autoloads nil "xml" "xml.el" (20766 6456 368550 0))
+;;;### (autoloads nil "xml" "xml.el" (21002 1963 769129 0))
;;; Generated autoloads from xml.el
(autoload 'xml-parse-file "xml" "\
;;;***
\f
-;;;### (autoloads nil "xmltok" "nxml/xmltok.el" (20884 6711 386198
+;;;### (autoloads nil "xmltok" "nxml/xmltok.el" (20998 4934 952905
;;;;;; 0))
;;; Generated autoloads from nxml/xmltok.el
;;;***
\f
-;;;### (autoloads nil "zone" "play/zone.el" (20709 26818 907104 0))
+;;;### (autoloads nil "zone" "play/zone.el" (20992 52525 458637 0))
;;; Generated autoloads from play/zone.el
(autoload 'zone "zone" "\
;;;;;; "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el"
;;;;;; "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el"
;;;;;; "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el"
-;;;;;; "calc/calc-loaddefs.el" "calc/calc-macs.el" "calc/calc-map.el"
-;;;;;; "calc/calc-math.el" "calc/calc-menu.el" "calc/calc-misc.el"
-;;;;;; "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-nlfit.el"
-;;;;;; "calc/calc-poly.el" "calc/calc-prog.el" "calc/calc-rewr.el"
-;;;;;; "calc/calc-rules.el" "calc/calc-sel.el" "calc/calc-stat.el"
-;;;;;; "calc/calc-store.el" "calc/calc-stuff.el" "calc/calc-trail.el"
-;;;;;; "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el"
-;;;;;; "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el"
-;;;;;; "calc/calcsel2.el" "calendar/cal-bahai.el" "calendar/cal-coptic.el"
-;;;;;; "calendar/cal-french.el" "calendar/cal-html.el" "calendar/cal-islam.el"
-;;;;;; "calendar/cal-iso.el" "calendar/cal-julian.el" "calendar/cal-loaddefs.el"
-;;;;;; "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el"
-;;;;;; "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el"
-;;;;;; "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "cdl.el"
-;;;;;; "cedet/cedet-cscope.el" "cedet/cedet-files.el" "cedet/cedet-global.el"
-;;;;;; "cedet/cedet-idutils.el" "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el"
-;;;;;; "cedet/ede/base.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el"
-;;;;;; "cedet/ede/emacs.el" "cedet/ede/files.el" "cedet/ede/generic.el"
-;;;;;; "cedet/ede/linux.el" "cedet/ede/loaddefs.el" "cedet/ede/locate.el"
-;;;;;; "cedet/ede/make.el" "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el"
-;;;;;; "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el"
-;;;;;; "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el"
-;;;;;; "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el"
-;;;;;; "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" "cedet/ede/proj.el"
-;;;;;; "cedet/ede/shell.el" "cedet/ede/simple.el" "cedet/ede/source.el"
-;;;;;; "cedet/ede/speedbar.el" "cedet/ede/srecode.el" "cedet/ede/system.el"
-;;;;;; "cedet/ede/util.el" "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el"
-;;;;;; "cedet/semantic/analyze/debug.el" "cedet/semantic/analyze/fcn.el"
-;;;;;; "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el"
-;;;;;; "cedet/semantic/bovine/c-by.el" "cedet/semantic/bovine/c.el"
-;;;;;; "cedet/semantic/bovine/debug.el" "cedet/semantic/bovine/el.el"
-;;;;;; "cedet/semantic/bovine/gcc.el" "cedet/semantic/bovine/make-by.el"
-;;;;;; "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm-by.el"
-;;;;;; "cedet/semantic/bovine/scm.el" "cedet/semantic/chart.el"
-;;;;;; "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" "cedet/semantic/db-debug.el"
-;;;;;; "cedet/semantic/db-ebrowse.el" "cedet/semantic/db-el.el"
-;;;;;; "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" "cedet/semantic/db-global.el"
-;;;;;; "cedet/semantic/db-javascript.el" "cedet/semantic/db-mode.el"
-;;;;;; "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el"
+;;;;;; "calc/calc-macs.el" "calc/calc-map.el" "calc/calc-math.el"
+;;;;;; "calc/calc-menu.el" "calc/calc-misc.el" "calc/calc-mode.el"
+;;;;;; "calc/calc-mtx.el" "calc/calc-nlfit.el" "calc/calc-poly.el"
+;;;;;; "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el"
+;;;;;; "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el"
+;;;;;; "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-units.el"
+;;;;;; "calc/calc-vec.el" "calc/calc-yank.el" "calc/calcalg2.el"
+;;;;;; "calc/calcalg3.el" "calc/calccomp.el" "calc/calcsel2.el"
+;;;;;; "calendar/cal-bahai.el" "calendar/cal-coptic.el" "calendar/cal-french.el"
+;;;;;; "calendar/cal-html.el" "calendar/cal-islam.el" "calendar/cal-iso.el"
+;;;;;; "calendar/cal-julian.el" "calendar/cal-loaddefs.el" "calendar/cal-mayan.el"
+;;;;;; "calendar/cal-menu.el" "calendar/cal-move.el" "calendar/cal-persia.el"
+;;;;;; "calendar/cal-tex.el" "calendar/cal-x.el" "calendar/diary-loaddefs.el"
+;;;;;; "calendar/hol-loaddefs.el" "cdl.el" "cedet/cedet-cscope.el"
+;;;;;; "cedet/cedet-files.el" "cedet/cedet-global.el" "cedet/cedet-idutils.el"
+;;;;;; "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" "cedet/ede/base.el"
+;;;;;; "cedet/ede/cpp-root.el" "cedet/ede/custom.el" "cedet/ede/emacs.el"
+;;;;;; "cedet/ede/files.el" "cedet/ede/generic.el" "cedet/ede/linux.el"
+;;;;;; "cedet/ede/locate.el" "cedet/ede/make.el" "cedet/ede/makefile-edit.el"
+;;;;;; "cedet/ede/pconf.el" "cedet/ede/pmake.el" "cedet/ede/proj-archive.el"
+;;;;;; "cedet/ede/proj-aux.el" "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el"
+;;;;;; "cedet/ede/proj-info.el" "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el"
+;;;;;; "cedet/ede/proj-prog.el" "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el"
+;;;;;; "cedet/ede/proj.el" "cedet/ede/shell.el" "cedet/ede/simple.el"
+;;;;;; "cedet/ede/source.el" "cedet/ede/speedbar.el" "cedet/ede/srecode.el"
+;;;;;; "cedet/ede/system.el" "cedet/ede/util.el" "cedet/semantic/analyze.el"
+;;;;;; "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/debug.el"
+;;;;;; "cedet/semantic/analyze/fcn.el" "cedet/semantic/analyze/refs.el"
+;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c-by.el"
+;;;;;; "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el"
+;;;;;; "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el"
+;;;;;; "cedet/semantic/bovine/make-by.el" "cedet/semantic/bovine/make.el"
+;;;;;; "cedet/semantic/bovine/scm-by.el" "cedet/semantic/bovine/scm.el"
+;;;;;; "cedet/semantic/chart.el" "cedet/semantic/complete.el" "cedet/semantic/ctxt.el"
+;;;;;; "cedet/semantic/db-debug.el" "cedet/semantic/db-ebrowse.el"
+;;;;;; "cedet/semantic/db-el.el" "cedet/semantic/db-file.el" "cedet/semantic/db-find.el"
+;;;;;; "cedet/semantic/db-global.el" "cedet/semantic/db-javascript.el"
+;;;;;; "cedet/semantic/db-mode.el" "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el"
;;;;;; "cedet/semantic/db.el" "cedet/semantic/debug.el" "cedet/semantic/decorate.el"
;;;;;; "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el"
;;;;;; "cedet/semantic/dep.el" "cedet/semantic/doc.el" "cedet/semantic/ede-grammar.el"
;;;;;; "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el"
;;;;;; "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el"
;;;;;; "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el"
-;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/loaddefs.el"
-;;;;;; "cedet/semantic/mru-bookmark.el" "cedet/semantic/sb.el" "cedet/semantic/scope.el"
-;;;;;; "cedet/semantic/senator.el" "cedet/semantic/sort.el" "cedet/semantic/symref.el"
-;;;;;; "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/filter.el"
-;;;;;; "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el"
-;;;;;; "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el"
-;;;;;; "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
+;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el"
+;;;;;; "cedet/semantic/sb.el" "cedet/semantic/scope.el" "cedet/semantic/senator.el"
+;;;;;; "cedet/semantic/sort.el" "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el"
+;;;;;; "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el"
+;;;;;; "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el"
+;;;;;; "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el"
+;;;;;; "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el"
;;;;;; "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el"
;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el"
;;;;;; "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el"
;;;;;; "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el"
;;;;;; "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el"
-;;;;;; "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el"
-;;;;;; "cedet/srecode/semantic.el" "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el"
-;;;;;; "cedet/srecode/table.el" "cedet/srecode/template.el" "cedet/srecode/texi.el"
-;;;;;; "cus-dep.el" "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el"
-;;;;;; "dos-vars.el" "dos-w32.el" "dynamic-setting.el" "emacs-lisp/authors.el"
+;;;;;; "cedet/srecode/map.el" "cedet/srecode/mode.el" "cedet/srecode/semantic.el"
+;;;;;; "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" "cedet/srecode/table.el"
+;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el"
+;;;;;; "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" "dos-vars.el"
+;;;;;; "dos-w32.el" "dynamic-setting.el" "emacs-lisp/authors.el"
;;;;;; "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el"
-;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el"
-;;;;;; "emacs-lisp/cl-seq.el" "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el"
-;;;;;; "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-speedbar.el"
-;;;;;; "emacs-lisp/find-gc.el" "emacs-lisp/gulp.el" "emacs-lisp/lisp-mnt.el"
-;;;;;; "emacs-lisp/package-x.el" "emacs-lisp/smie.el" "emacs-lisp/tcover-ses.el"
-;;;;;; "emacs-lisp/tcover-unsafep.el" "emulation/cua-gmrk.el" "emulation/cua-rect.el"
-;;;;;; "emulation/edt-lk201.el" "emulation/edt-mapper.el" "emulation/edt-pc.el"
-;;;;;; "emulation/edt-vt100.el" "emulation/tpu-extras.el" "emulation/viper-cmd.el"
-;;;;;; "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el"
-;;;;;; "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el"
-;;;;;; "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el"
-;;;;;; "eshell/em-alias.el" "eshell/em-banner.el" "eshell/em-basic.el"
-;;;;;; "eshell/em-cmpl.el" "eshell/em-dirs.el" "eshell/em-glob.el"
-;;;;;; "eshell/em-hist.el" "eshell/em-ls.el" "eshell/em-pred.el"
-;;;;;; "eshell/em-prompt.el" "eshell/em-rebind.el" "eshell/em-script.el"
-;;;;;; "eshell/em-smart.el" "eshell/em-term.el" "eshell/em-tramp.el"
-;;;;;; "eshell/em-unix.el" "eshell/em-xtra.el" "eshell/esh-arg.el"
-;;;;;; "eshell/esh-cmd.el" "eshell/esh-ext.el" "eshell/esh-groups.el"
-;;;;;; "eshell/esh-io.el" "eshell/esh-module.el" "eshell/esh-opt.el"
-;;;;;; "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el"
-;;;;;; "ezimage.el" "format-spec.el" "fringe.el" "generic-x.el"
-;;;;;; "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el"
+;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el"
+;;;;;; "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-datadebug.el"
+;;;;;; "emacs-lisp/eieio-speedbar.el" "emacs-lisp/find-gc.el" "emacs-lisp/gulp.el"
+;;;;;; "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" "emacs-lisp/smie.el"
+;;;;;; "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el"
+;;;;;; "emulation/cua-gmrk.el" "emulation/cua-rect.el" "emulation/edt-lk201.el"
+;;;;;; "emulation/edt-mapper.el" "emulation/edt-pc.el" "emulation/edt-vt100.el"
+;;;;;; "emulation/tpu-extras.el" "emulation/viper-cmd.el" "emulation/viper-ex.el"
+;;;;;; "emulation/viper-init.el" "emulation/viper-keym.el" "emulation/viper-macs.el"
+;;;;;; "emulation/viper-mous.el" "emulation/viper-util.el" "erc/erc-backend.el"
+;;;;;; "erc/erc-goodies.el" "erc/erc-ibuffer.el" "eshell/em-alias.el"
+;;;;;; "eshell/em-banner.el" "eshell/em-basic.el" "eshell/em-cmpl.el"
+;;;;;; "eshell/em-dirs.el" "eshell/em-glob.el" "eshell/em-hist.el"
+;;;;;; "eshell/em-ls.el" "eshell/em-pred.el" "eshell/em-prompt.el"
+;;;;;; "eshell/em-rebind.el" "eshell/em-script.el" "eshell/em-smart.el"
+;;;;;; "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el"
+;;;;;; "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el"
+;;;;;; "eshell/esh-ext.el" "eshell/esh-io.el" "eshell/esh-module.el"
+;;;;;; "eshell/esh-opt.el" "eshell/esh-proc.el" "eshell/esh-util.el"
+;;;;;; "eshell/esh-var.el" "ezimage.el" "format-spec.el" "fringe.el"
+;;;;;; "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el"
;;;;;; "gnus/gnus-cite.el" "gnus/gnus-cus.el" "gnus/gnus-demon.el"
;;;;;; "gnus/gnus-dup.el" "gnus/gnus-eform.el" "gnus/gnus-ems.el"
-;;;;;; "gnus/gnus-int.el" "gnus/gnus-logic.el" "gnus/gnus-mh.el"
-;;;;;; "gnus/gnus-salt.el" "gnus/gnus-score.el" "gnus/gnus-setup.el"
-;;;;;; "gnus/gnus-srvr.el" "gnus/gnus-topic.el" "gnus/gnus-undo.el"
-;;;;;; "gnus/gnus-util.el" "gnus/gnus-uu.el" "gnus/gnus-vm.el" "gnus/gssapi.el"
-;;;;;; "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el" "gnus/mail-parse.el"
-;;;;;; "gnus/mail-prsvr.el" "gnus/mail-source.el" "gnus/mailcap.el"
-;;;;;; "gnus/messcompat.el" "gnus/mm-archive.el" "gnus/mm-bodies.el"
-;;;;;; "gnus/mm-decode.el" "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml-sec.el"
-;;;;;; "gnus/mml-smime.el" "gnus/nnagent.el" "gnus/nnbabyl.el" "gnus/nndir.el"
-;;;;;; "gnus/nndraft.el" "gnus/nneething.el" "gnus/nngateway.el"
-;;;;;; "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el" "gnus/nnmail.el"
-;;;;;; "gnus/nnmaildir.el" "gnus/nnmbox.el" "gnus/nnmh.el" "gnus/nnnil.el"
-;;;;;; "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el" "gnus/nnspool.el"
-;;;;;; "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el" "gnus/registry.el"
-;;;;;; "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2104.el"
-;;;;;; "gnus/rfc2231.el" "gnus/rtree.el" "gnus/sieve-manage.el"
+;;;;;; "gnus/gnus-icalendar.el" "gnus/gnus-int.el" "gnus/gnus-logic.el"
+;;;;;; "gnus/gnus-mh.el" "gnus/gnus-salt.el" "gnus/gnus-score.el"
+;;;;;; "gnus/gnus-setup.el" "gnus/gnus-srvr.el" "gnus/gnus-topic.el"
+;;;;;; "gnus/gnus-undo.el" "gnus/gnus-util.el" "gnus/gnus-uu.el"
+;;;;;; "gnus/gnus-vm.el" "gnus/gssapi.el" "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el"
+;;;;;; "gnus/mail-parse.el" "gnus/mail-prsvr.el" "gnus/mail-source.el"
+;;;;;; "gnus/mailcap.el" "gnus/messcompat.el" "gnus/mm-archive.el"
+;;;;;; "gnus/mm-bodies.el" "gnus/mm-decode.el" "gnus/mm-util.el"
+;;;;;; "gnus/mm-view.el" "gnus/mml-sec.el" "gnus/mml-smime.el" "gnus/nnagent.el"
+;;;;;; "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el" "gnus/nneething.el"
+;;;;;; "gnus/nngateway.el" "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el"
+;;;;;; "gnus/nnmail.el" "gnus/nnmaildir.el" "gnus/nnmbox.el" "gnus/nnmh.el"
+;;;;;; "gnus/nnnil.el" "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el"
+;;;;;; "gnus/nnspool.el" "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el"
+;;;;;; "gnus/registry.el" "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el"
+;;;;;; "gnus/rfc2104.el" "gnus/rfc2231.el" "gnus/rtree.el" "gnus/sieve-manage.el"
;;;;;; "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el"
;;;;;; "hfy-cmap.el" "ibuf-ext.el" "international/cp51932.el" "international/eucjp-ms.el"
;;;;;; "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el"
;;;;;; "vc/ediff-vers.el" "vc/ediff-wind.el" "vc/pcvs-info.el" "vc/pcvs-parse.el"
;;;;;; "vc/pcvs-util.el" "vc/vc-dav.el" "vcursor.el" "vt-control.el"
;;;;;; "vt100-led.el" "w32-common-fns.el" "w32-fns.el" "w32-vars.el"
-;;;;;; "x-dnd.el") (20945 22525 596830 318000))
+;;;;;; "x-dnd.el") (21027 5557 48411 587000))
;;;***
\f
;;; Bugs:
-;; - completion-all-sorted-completions list all the completions, whereas
+;; - completion-all-sorted-completions lists all the completions, whereas
;; it should only lists the ones that `try-completion' would consider.
;; E.g. it should honor completion-ignored-extensions.
;; - choose-completion can't automatically figure out the boundaries
(let ((firsterror nil)
res)
(while (and (not res) xs)
- (condition-case err
+ (condition-case-unless-debug err
(setq res (funcall fun (pop xs)))
(error (unless firsterror (setq firsterror err)) nil)))
(or res
(message nil)))
;; Clear out any old echo-area message to make way for our new thing.
(message nil)
- (setq message (if (and (null args) (string-match-p "\\` *\\[.+\\]\\'" message))
+ (setq message (if (and (null args)
+ (string-match-p "\\` *\\[.+\\]\\'" message))
;; Make sure we can put-text-property.
(copy-sequence message)
(concat " [" message "]")))
"Return the user input in a minibuffer before point as a string.
In Emacs-22, that was what completion commands operated on."
(declare (obsolete nil "24.4"))
- (buffer-substring (field-beginning) (point)))
+ (buffer-substring (minibuffer-prompt-end) (point)))
(defun delete-minibuffer-contents ()
"Delete all user input in a minibuffer.
is requested but cannot be done.
If the value is `lazy', the *Completions* buffer is only displayed after
the second failed attempt to complete."
- :type '(choice (const nil) (const t) (const lazy))
- :group 'minibuffer)
+ :type '(choice (const nil) (const t) (const lazy)))
(defconst completion-styles-alist
'((emacs21
Note that `completion-category-overrides' may override these
styles for specific categories, such as files, buffers, etc."
:type completion--styles-type
- :group 'minibuffer
:version "23.1")
(defcustom completion-category-overrides
(defcustom completion-cycle-threshold nil
"Number of completion candidates below which cycling is used.
-Depending on this setting `minibuffer-complete' may use cycling,
+Depending on this setting `completion-in-region' may use cycling,
like `minibuffer-force-complete'.
If nil, cycling is never used.
If t, cycling is always used.
(over (assq 'cycle (cdr (assq cat completion-category-overrides)))))
(if over (cdr over) completion-cycle-threshold)))
-(defvar completion-all-sorted-completions nil)
-(make-variable-buffer-local 'completion-all-sorted-completions)
+(defvar-local completion-all-sorted-completions nil)
(defvar-local completion--all-sorted-completions-location nil)
(defvar completion-cycling nil)
(if completion-show-inline-help
(minibuffer-message msg)))
-(defun completion--do-completion (&optional try-completion-function
- expect-exact)
+(defun completion--do-completion (beg end &optional
+ try-completion-function expect-exact)
"Do the completion and return a summary of what happened.
M = completion was performed, the text was Modified.
C = there were available Completions.
TRY-COMPLETION-FUNCTION is a function to use in place of `try-completion'.
EXPECT-EXACT, if non-nil, means that there is no need to tell the user
when the buffer's text is already an exact match."
- (let* ((beg (field-beginning))
- (end (field-end))
- (string (buffer-substring beg end))
+ (let* ((string (buffer-substring beg end))
(md (completion--field-metadata beg))
(comp (funcall (or try-completion-function
'completion-try-completion)
(if unchanged
(goto-char end)
;; Insert in minibuffer the chars we got.
- (completion--replace beg end completion))
+ (completion--replace beg end completion)
+ (setq end (+ beg (length completion))))
;; Move point to its completion-mandated destination.
(forward-char (- comp-pos (length completion)))
;; whether this is a unique completion or not, so try again using
;; the real case (this shouldn't recurse again, because the next
;; time try-completion will return either t or the exact string).
- (completion--do-completion try-completion-function expect-exact)
+ (completion--do-completion beg end
+ try-completion-function expect-exact)
;; It did find a match. Do we match some possibility exactly now?
(let* ((exact (test-completion completion
minibuffer-completion-predicate
""))
comp-pos)))
- (completion-all-sorted-completions))))
+ (completion-all-sorted-completions beg end))))
(completion--flush-all-sorted-completions)
(cond
((and (consp (cdr comps)) ;; There's something to cycle.
;; Not more than completion-cycle-threshold remaining
;; completions: let's cycle.
(setq completed t exact t)
- (completion--cache-all-sorted-completions comps)
- (minibuffer-force-complete))
+ (completion--cache-all-sorted-completions beg end comps)
+ (minibuffer-force-complete beg end))
(completed
;; We could also decide to refresh the completions,
;; if they're displayed (and assuming there are
(if (pcase completion-auto-help
(`lazy (eq this-command last-command))
(_ completion-auto-help))
- (minibuffer-completion-help)
+ (minibuffer-completion-help beg end)
(completion--message "Next char not unique")))
;; If the last exact completion and this one were the same, it
;; means we've already given a "Complete, but not unique" message
;; and the user's hit TAB again, so now we give him help.
(t
(if (and (eq this-command last-command) completion-auto-help)
- (minibuffer-completion-help))
+ (minibuffer-completion-help beg end))
(completion--done completion 'exact
(unless expect-exact
"Complete, but not unique"))))
If you repeat this command after it displayed such a list,
scroll the window of possible completions."
(interactive)
+ (completion-in-region (minibuffer-prompt-end) (point-max)
+ minibuffer-completion-table
+ minibuffer-completion-predicate))
+
+(defun completion--in-region-1 (beg end)
;; If the previous command was not this,
;; mark the completion buffer obsolete.
(setq this-command 'completion-at-point)
nil)))
;; If we're cycling, keep on cycling.
((and completion-cycling completion-all-sorted-completions)
- (minibuffer-force-complete)
+ (minibuffer-force-complete beg end)
t)
- (t (pcase (completion--do-completion)
+ (t (pcase (completion--do-completion beg end)
(#b000 nil)
(_ t)))))
-(defun completion--cache-all-sorted-completions (comps)
+(defun completion--cache-all-sorted-completions (beg end comps)
(add-hook 'after-change-functions
'completion--flush-all-sorted-completions nil t)
(setq completion--all-sorted-completions-location
- (cons (copy-marker (field-beginning)) (copy-marker (field-end))))
+ (cons (copy-marker beg) (copy-marker end)))
(setq completion-all-sorted-completions comps))
(defun completion--flush-all-sorted-completions (&optional start end _len)
(if (eq (car bounds) base) md-at-point
(completion-metadata (substring string 0 base) table pred))))
-(defun completion-all-sorted-completions ()
+(defun completion-all-sorted-completions (start end)
(or completion-all-sorted-completions
- (let* ((start (field-beginning))
- (end (field-end))
+ (let* ((start (or start (minibuffer-prompt-end)))
+ (end (or end (point-max)))
(string (buffer-substring start end))
(md (completion--field-metadata start))
(all (completion-all-completions
;; Cache the result. This is not just for speed, but also so that
;; repeated calls to minibuffer-force-complete can cycle through
;; all possibilities.
- (completion--cache-all-sorted-completions (nconc all base-size))))))
+ (completion--cache-all-sorted-completions
+ start end (nconc all base-size))))))
(defun minibuffer-force-complete-and-exit ()
"Complete the minibuffer with first of the matches and exit."
(interactive)
(minibuffer-force-complete)
- (minibuffer--complete-and-exit
+ (completion--complete-and-exit
+ (minibuffer-prompt-end) (point-max) #'exit-minibuffer
;; If the previous completion completed to an element which fails
;; test-completion, then we shouldn't exit, but that should be rare.
(lambda () (minibuffer-message "Incomplete"))))
-(defun minibuffer-force-complete ()
+(defun minibuffer-force-complete (&optional start end)
"Complete the minibuffer to an exact match.
Repeated uses step through the possible completions."
(interactive)
;; FIXME: Need to deal with the extra-size issue here as well.
;; FIXME: ~/src/emacs/t<M-TAB>/lisp/minibuffer.el completes to
;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el.
- (let* ((start (copy-marker (field-beginning)))
- (end (field-end))
+ (let* ((start (copy-marker (or start (minibuffer-prompt-end))))
+ (end (or end (point-max)))
;; (md (completion--field-metadata start))
- (all (completion-all-sorted-completions))
+ (all (completion-all-sorted-completions start end))
(base (+ start (or (cdr (last all)) 0))))
(cond
((not (consp all))
'finished (when done "Sole completion"))))
(t
(completion--replace base end (car all))
+ (setq end (+ base (length (car all))))
(completion--done (buffer-substring-no-properties start (point)) 'sole)
;; Set cycling after modifying the buffer since the flush hook resets it.
(setq completion-cycling t)
- (setq this-command 'completion-at-point) ;For minibuffer-complete.
+ (setq this-command 'completion-at-point) ;For completion-in-region.
;; If completing file names, (car all) may be a directory, so we'd now
;; have a new set of possible completions and might want to reset
;; completion-all-sorted-completions to nil, but we prefer not to,
;; through the previous possible completions.
(let ((last (last all)))
(setcdr last (cons (car all) (cdr last)))
- (completion--cache-all-sorted-completions (cdr all)))
+ (completion--cache-all-sorted-completions start end (cdr all)))
;; Make sure repeated uses cycle, even though completion--done might
;; have added a space or something that moved us outside of the field.
;; (bug#12221).
`minibuffer-confirm-exit-commands', and accept the input
otherwise."
(interactive)
- (minibuffer--complete-and-exit
+ (completion-complete-and-exit (minibuffer-prompt-end) (point-max)
+ #'exit-minibuffer))
+
+(defun completion-complete-and-exit (beg end exit-function)
+ (completion--complete-and-exit
+ beg end exit-function
(lambda ()
(pcase (condition-case nil
- (completion--do-completion nil 'expect-exact)
+ (completion--do-completion beg end
+ nil 'expect-exact)
(error 1))
- ((or #b001 #b011) (exit-minibuffer))
+ ((or #b001 #b011) (funcall exit-function))
(#b111 (if (not minibuffer-completion-confirm)
- (exit-minibuffer)
+ (funcall exit-function)
(minibuffer-message "Confirm")
nil))
(_ nil)))))
-(defun minibuffer--complete-and-exit (completion-function)
+(defun completion--complete-and-exit (beg end
+ exit-function completion-function)
"Exit from `require-match' minibuffer.
COMPLETION-FUNCTION is called if the current buffer's content does not
appear to be a match."
- (let ((beg (field-beginning))
- (end (field-end)))
(cond
;; Allow user to specify null string
- ((= beg end) (exit-minibuffer))
+ ((= beg end) (funcall exit-function))
((test-completion (buffer-substring beg end)
minibuffer-completion-table
minibuffer-completion-predicate)
;; that file.
(= (length string) (length compl)))
(completion--replace beg end compl))))
- (exit-minibuffer))
+ (funcall exit-function))
((memq minibuffer-completion-confirm '(confirm confirm-after-completion))
;; The user is permitted to exit with an input that's rejected
;; catches most minibuffer typos).
(and (eq minibuffer-completion-confirm 'confirm-after-completion)
(not (memq last-command minibuffer-confirm-exit-commands))))
- (exit-minibuffer)
+ (funcall exit-function)
(minibuffer-message "Confirm")
nil))
(t
;; Call do-completion, but ignore errors.
- (funcall completion-function)))))
+ (funcall completion-function))))
(defun completion--try-word-completion (string table predicate point md)
(let ((comp (completion-try-completion string table predicate point md)))
is added, provided that matches some possible completion.
Return nil if there is no valid completion, else t."
(interactive)
- (pcase (completion--do-completion 'completion--try-word-completion)
+ (completion-in-region--single-word
+ (minibuffer-prompt-end) (point-max)
+ minibuffer-completion-table minibuffer-completion-predicate))
+
+(defun completion-in-region--single-word (beg end collection
+ &optional predicate)
+ (let ((minibuffer-completion-table collection)
+ (minibuffer-completion-predicate predicate))
+ (pcase (completion--do-completion beg end
+ #'completion--try-word-completion)
(#b000 nil)
- (_ t)))
+ (_ t))))
(defface completions-annotations '((t :inherit italic))
"Face to use for annotations in the *Completions* buffer.")
If the value is `horizontal', display completions sorted
horizontally in alphabetical order, rather than down the screen."
:type '(choice (const horizontal) (const vertical))
- :group 'minibuffer
:version "23.2")
(defun completion--insert-strings (strings)
(defface completions-first-difference
'((t (:inherit bold)))
- "Face added on the first uncommon character in completions in *Completions* buffer."
- :group 'completion)
+ "Face added on the first uncommon character in completions in *Completions* buffer.")
(defface completions-common-part '((t nil))
"Face added on the common prefix substring in completions in *Completions* buffer.
The idea of `completions-common-part' is that you can use it to
make the common parts less visible than normal, so that the rest
-of the differing parts is, by contrast, slightly highlighted."
- :group 'completion)
+of the differing parts is, by contrast, slightly highlighted.")
(defun completion-hilit-commonality (completions prefix-len base-size)
(when completions
The actual completion alternatives, as inserted, are given `mouse-face'
properties of `highlight'.
At the end, this runs the normal hook `completion-setup-hook'.
-It can find the completion buffer in `standard-output'.
-
-The obsolete optional arg COMMON-SUBSTRING, if non-nil, should be a string
-specifying a common substring for adding the faces
-`completions-first-difference' and `completions-common-part' to
-the completions buffer."
+It can find the completion buffer in `standard-output'."
+ (declare (advertised-calling-convention (completions) "24.4"))
(if common-substring
(setq completions (completion-hilit-commonality
completions (length common-substring)
(equal pre-msg (and exit-fun (current-message))))
(completion--message message))))
-(defun minibuffer-completion-help ()
+(defun minibuffer-completion-help (&optional start end)
"Display a list of possible completions of the current minibuffer contents."
(interactive)
(message "Making completion list...")
- (let* ((start (field-beginning))
- (end (field-end))
- (string (field-string))
+ (let* ((start (or start (minibuffer-prompt-end)))
+ (end (or end (point-max)))
+ (string (buffer-substring start end))
(md (completion--field-metadata start))
(completions (completion-all-completions
string
minibuffer-completion-table
minibuffer-completion-predicate
- (- (point) (field-beginning))
+ (- (point) start)
md)))
(message nil)
(if (or (null completions)
(if (memq system-type '(ms-dos windows-nt darwin cygwin))
t nil)
"Non-nil means when reading a file name completion ignores case."
- :group 'minibuffer
:type 'boolean
:version "22.1")
;; completions" operation as well.
completion-in-region-functions (start end collection predicate)
(let ((minibuffer-completion-table collection)
- (minibuffer-completion-predicate predicate)
- (ol (make-overlay start end nil nil t)))
- (overlay-put ol 'field 'completion)
+ (minibuffer-completion-predicate predicate))
;; HACK: if the text we are completing is already in a field, we
;; want the completion field to take priority (e.g. Bug#6830).
- (overlay-put ol 'priority 100)
(when completion-in-region-mode-predicate
(completion-in-region-mode 1)
(setq completion-in-region--data
(list (if (markerp start) start (copy-marker start))
(copy-marker end) collection)))
- ;; FIXME: `minibuffer-complete' should call `completion-in-region' rather
- ;; than the other way around!
- (unwind-protect
- (call-interactively 'minibuffer-complete)
- (delete-overlay ol)))))
+ (completion--in-region-1 start end))))
(defvar completion-in-region-mode-map
(let ((map (make-sparse-keymap)))
(lambda ()
;; We're still in the same completion field.
(let ((newstart (car-safe (funcall hookfun))))
- (and newstart (= newstart start)))))
- (ol (make-overlay start end nil nil t)))
+ (and newstart (= newstart start))))))
;; FIXME: We should somehow (ab)use completion-in-region-function or
;; introduce a corresponding hook (plus another for word-completion,
;; and another for force-completion, maybe?).
- (overlay-put ol 'field 'completion)
- (overlay-put ol 'priority 100)
(completion-in-region-mode 1)
(setq completion-in-region--data
(list start (copy-marker end) collection))
- (unwind-protect
- (call-interactively 'minibuffer-completion-help)
- (delete-overlay ol))))
+ (minibuffer-completion-help start end)))
(`(,hookfun . ,_)
;; The hook function already performed completion :-(
;; Not much we can do at this point.
For some commands, exiting with an empty minibuffer has a special meaning,
such as making the current buffer visit no file in the case of
`set-visited-file-name'."
- :group 'minibuffer
:type 'boolean)
;; Not always defined, but only called if next-read-file-uses-dialog-p says so.
;; Refresh other vars.
(completion-pcm--prepare-delim-re value))
:initialize 'custom-initialize-reset
- :group 'minibuffer
:type 'string)
(defcustom completion-pcm-complete-word-inserts-delimiters nil
(completion-pcm--string->pattern suffix)))
(let* ((pattern nil)
(p 0)
- (p0 p))
+ (p0 p)
+ (pending nil))
(while (and (setq p (string-match completion-pcm--delim-wild-regex
string p))
;; This is determined by the presence of a submatch-1 which delimits
;; the prefix.
(if (match-end 1) (setq p (match-end 1)))
- (push (substring string p0 p) pattern)
+ (unless (= p0 p)
+ (if pending (push pending pattern))
+ (push (substring string p0 p) pattern))
+ (setq pending nil)
(if (eq (aref string p) ?*)
(progn
(push 'star pattern)
(setq p0 (1+ p)))
(push 'any pattern)
- (setq p0 p))
- (cl-incf p))
-
+ (if (match-end 1)
+ (setq p0 p)
+ (push (substring string p (match-end 0)) pattern)
+ ;; `any-delim' is used so that "a-b" also finds "array->beginning".
+ (setq pending 'any-delim)
+ (setq p0 (match-end 0))))
+ (setq p p0))
+
+ (when (> (length string) p0)
+ (if pending (push pending pattern))
+ (push (substring string p0) pattern))
;; An empty string might be erroneously added at the beginning.
;; It should be avoided properly, but it's so easy to remove it here.
- (delete "" (nreverse (cons (substring string p0) pattern))))))
+ (delete "" (nreverse pattern)))))
+
+(defun completion-pcm--optimize-pattern (p)
+ ;; Remove empty strings in a separate phase since otherwise a ""
+ ;; might prevent some other optimization, as in '(any "" any).
+ (setq p (delete "" p))
+ (let ((n '()))
+ (while p
+ (pcase p
+ (`(,(and s1 (pred stringp)) ,(and s2 (pred stringp)) . ,rest)
+ (setq p (cons (concat s1 s2) rest)))
+ (`(,(and p1 (pred symbolp)) ,(and p2 (guard (eq p1 p2))) . ,_)
+ (setq p (cdr p)))
+ (`(star ,(pred symbolp) . ,rest) (setq p `(star . ,rest)))
+ (`(,(pred symbolp) star . ,rest) (setq p `(star . ,rest)))
+ (`(point ,(or `any `any-delim) . ,rest) (setq p `(point . ,rest)))
+ (`(,(or `any `any-delim) point . ,rest) (setq p `(point . ,rest)))
+ (`(any ,(or `any `any-delim) . ,rest) (setq p `(any . ,rest)))
+ (`(,(pred symbolp)) (setq p nil)) ;Implicit terminating `any'.
+ (_ (push (pop p) n))))
+ (nreverse n)))
(defun completion-pcm--pattern->regex (pattern &optional group)
(let ((re
(lambda (x)
(cond
((stringp x) (regexp-quote x))
- ((if (consp group) (memq x group) group) "\\(.*?\\)")
- (t ".*?")))
+ (t
+ (let ((re (if (eq x 'any-delim)
+ (concat completion-pcm--delim-wild-regex "*?")
+ ".*?")))
+ (if (if (consp group) (memq x group) group)
+ (concat "\\(" re "\\)")
+ re)))))
pattern
""))))
;; Avoid pathological backtracking.
(setq string (substring string (car bounds) (+ point (cdr bounds))))
(let* ((relpoint (- point (car bounds)))
(pattern (completion-pcm--string->pattern string relpoint))
- (all (condition-case err
+ (all (condition-case-unless-debug err
(funcall filter
(completion-pcm--all-completions
prefix pattern table pred))
- (error (unless firsterror (setq firsterror err)) nil))))
+ (error (setq firsterror err) nil))))
(when (and (null all)
(> (car bounds) 0)
(null (ignore-errors (try-completion prefix table pred))))
;; next part of copying routine.
(defun ange-ftp-cf1 (result line
filename newname binary msg
- f-parsed f-host f-user f-name f-abbr
+ f-parsed f-host f-user _f-name f-abbr
t-parsed t-host t-user t-name t-abbr
temp1 temp2 cont nowait)
(if line
(defun ange-ftp-copy-file (filename newname &optional ok-if-already-exists
keep-date preserve-uid-gid
- preserve-selinux-context)
+ _preserve-selinux-context)
(interactive "fCopy file: \nFCopy %s to file: \np")
(ange-ftp-copy-file-internal filename
newname
(while (and tryfiles (not copy))
(catch 'ftp-error
(let ((ange-ftp-waiting-flag t))
- (condition-case error
+ (condition-case _error
(setq copy (ange-ftp-file-local-copy (car tryfiles)))
(ftp-error nil))))
(setq tryfiles (cdr tryfiles)))
(ange-ftp-real-load file noerror nomessage nosuffix)))
;; Calculate default-unhandled-directory for a given ange-ftp buffer.
-(defun ange-ftp-unhandled-file-name-directory (filename)
+(defun ange-ftp-unhandled-file-name-directory (_filename)
nil)
\f
(defun ange-ftp-shell-command (command &optional output-buffer error-buffer)
(let* ((parsed (ange-ftp-ftp-name default-directory))
(host (nth 0 parsed))
- (user (nth 1 parsed))
(name (nth 2 parsed)))
(if (not parsed)
(ange-ftp-real-shell-command command output-buffer error-buffer)
;; versions left. If not, then delete the
;; root entry.
(maphash
- (lambda (key val)
+ (lambda (key _val)
(and (string-match regexp key)
(setq versions t)))
files)
;; compressed files. Instead, we turn "FILE.TYPE" into
;; "FILE.TYPE-Z". Hope that this is a reasonable thing to do.
-(defun ange-ftp-vms-make-compressed-filename (name &optional reverse)
+(defun ange-ftp-vms-make-compressed-filename (name &optional _reverse)
(cond
((string-match "-Z;[0-9]+\\'" name)
(list nil (substring name 0 (match-beginning 0))))
;; (cons '(vms . ange-ftp-dired-vms-ls-trim)
;; ange-ftp-dired-ls-trim-alist)))
-(defun ange-ftp-vms-sans-version (name &rest args)
+(defun ange-ftp-vms-sans-version (name &rest _args)
(save-match-data
(if (string-match ";[0-9]+\\'" name)
(substring name 0 (match-beginning 0))
;; (cons '(cms . ange-ftp-dired-cms-move-to-end-of-filename)
;; ange-ftp-dired-move-to-end-of-filename-alist)))
-(defun ange-ftp-cms-make-compressed-filename (name &optional reverse)
+(defun ange-ftp-cms-make-compressed-filename (name &optional _reverse)
(if (string-match "-Z\\'" name)
(list nil (substring name 0 -2))
(list t (concat name "-Z"))))
(defvar dos-windows-version)
(declare-function w32-shell-execute "w32fns.c") ;; Defined in C.
-(defun browse-url-default-windows-browser (url &optional new-window)
+(defun browse-url-default-windows-browser (url &optional _new-window)
(interactive (browse-url-interactive-arg "URL: "))
(cond ((eq system-type 'ms-dos)
(if dos-windows-version
(call-process "cygstart" nil nil nil url))
(t (w32-shell-execute "open" url))))
-(defun browse-url-default-macosx-browser (url &optional new-window)
+(defun browse-url-default-macosx-browser (url &optional _new-window)
(interactive (browse-url-interactive-arg "URL: "))
(start-process (concat "open " url) nil "open" url))
((executable-find browse-url-xterm-program) 'browse-url-text-xterm)
((locate-library "w3") 'browse-url-w3)
(t
- (lambda (&rest ignore) (error "No usable browser found"))))
+ (lambda (&rest _ignore) (error "No usable browser found"))))
url args))
(defun browse-url-can-use-xdg-open ()
(append browse-url-firefox-startup-arguments (list url))))))
;;;###autoload
-(defun browse-url-chromium (url &optional new-window)
+(defun browse-url-chromium (url &optional _new-window)
"Ask the Chromium WWW browser to load URL.
Default to the URL around or before point. The strings in
variable `browse-url-chromium-arguments' are also passed to
(defvar url-handler-regexp)
;;;###autoload
-(defun browse-url-emacs (url &optional new-window)
+(defun browse-url-emacs (url &optional _new-window)
"Ask Emacs to load URL into a buffer and show it in another window."
(interactive (browse-url-interactive-arg "URL: "))
(require 'url-handlers)
(w3-fetch url)))
;;;###autoload
-(defun browse-url-w3-gnudoit (url &optional new-window)
+(defun browse-url-w3-gnudoit (url &optional _new-window)
;; new-window ignored
"Ask another Emacs running gnuserv to load the URL using the W3 browser.
The `browse-url-gnudoit-program' program is used with options given by
;; --- Lynx in an xterm ---
;;;###autoload
-(defun browse-url-text-xterm (url &optional new-window)
+(defun browse-url-text-xterm (url &optional _new-window)
;; new-window ignored
"Ask a text browser to load URL.
URL defaults to the URL around or before point.
(get-buffer-process buf)
;; Don't leave around a dead one (especially because of its
;; munged keymap.)
- (lambda (process event)
+ (lambda (process _event)
(if (not (memq (process-status process) '(run stop)))
(let ((buf (process-buffer process)))
(if buf (kill-buffer buf)))))))
;; --- Random browser ---
;;;###autoload
-(defun browse-url-generic (url &optional new-window)
+(defun browse-url-generic (url &optional _new-window)
;; new-window ignored
"Ask the WWW browser defined by `browse-url-generic-program' to load URL.
Default to the URL around or before point. A fresh copy of the
(append browse-url-generic-args (list url))))
;;;###autoload
-(defun browse-url-kde (url &optional new-window)
+(defun browse-url-kde (url &optional _new-window)
"Ask the KDE WWW browser to load URL.
Default to the URL around or before point."
(interactive (browse-url-interactive-arg "KDE URL: "))
It will be registered for all objects created by `dbus-register-method'."
(let* ((last-input-event last-input-event)
(bus (dbus-event-bus-name last-input-event))
- (service (dbus-event-service-name last-input-event))
(path (dbus-event-path-name last-input-event)))
;; "GetManagedObjects" returns "a{oa{sa{sv}}}".
(let (interfaces result)
;; Check all registered object paths.
(maphash
(lambda (key val)
- (let ((object (or (nth 2 (car-safe val)) ""))
- (interface (nth 2 key)))
+ (let ((object (or (nth 2 (car-safe val)) "")))
(when (and (equal (butlast key 2) (list :method bus))
(string-prefix-p path object))
(dolist (interface (cons (nth 2 key) interfaces))
precords))
(insert "\n")
(widget-create 'push-button
- :notify (lambda (&rest ignore)
+ :notify (lambda (&rest _ignore)
(eudc-query-form))
"New query")
(widget-insert " ")
(widget-create 'push-button
- :notify (lambda (&rest ignore)
+ :notify (lambda (&rest _ignore)
(kill-this-buffer))
"Quit")
(eudc-mode)
fields)
(widget-insert "\n\n")
(widget-create 'push-button
- :notify (lambda (&rest ignore)
+ :notify (lambda (&rest _ignore)
(eudc-process-form))
"Query Server")
(widget-insert " ")
(widget-create 'push-button
- :notify (lambda (&rest ignore)
+ :notify (lambda (&rest _ignore)
(eudc-query-form))
"Reset Form")
(widget-insert " ")
(widget-create 'push-button
- :notify (lambda (&rest ignore)
+ :notify (lambda (&rest _ignore)
(kill-this-buffer))
"Quit")
(goto-char pt)
result))
final-result))
-(defun eudc-ldap-get-field-list (dummy &optional objectclass)
+(defun eudc-ldap-get-field-list (_dummy &optional objectclass)
"Return a list of valid attribute names for the current server.
OBJECTCLASS is the LDAP object class for which the valid
attribute names are returned. Default to `person'"
((string-match "^image/" (car content-type))
(eww-display-image))
(t
- (eww-display-raw charset)))
+ (eww-display-raw)))
(setq eww-history-position 0)
(cond
(point
(list :background (car new-colors))
t))))))
-(defun eww-display-raw (charset)
+(defun eww-display-raw ()
(let ((data (buffer-substring (point) (point-max))))
(eww-setup-buffer)
(let ((inhibit-read-only t))
(define-key map [(meta p)] 'eww-previous-bookmark)
(easy-menu-define nil map ""
- '("eww"
+ '("Eww"
["Quit" eww-quit t]
["Reload" eww-reload t]
["Back to previous page" eww-back-url
eww-history))
;;;###autoload
-(defun eww-browse-url (url &optional new-window)
+(defun eww-browse-url (url &optional _new-window)
(when (and (equal major-mode 'eww-mode)
eww-current-url)
(eww-save-history))
"Change the value of the select drop-down menu under point."
(interactive)
(let* ((input (get-text-property (point) 'eww-form))
- (properties (text-properties-at (point)))
(completion-ignore-case t)
(options
(delq nil
(setq file "!"))
((string-match "\\`[.]" file)
(setq file (concat "!" file))))
- (let ((base file)
- (count 1))
+ (let ((count 1))
(while (file-exists-p (expand-file-name file directory))
(setq file
(if (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file)
(eval-when-compile (require 'cl))
(eval-and-compile
;; For Emacs <22.2 and XEmacs.
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r)))
(autoload 'starttls-open-stream "starttls")
(autoload 'starttls-negotiate "starttls")
(autoload 'sasl-find-mechanism "sasl")
nil)))))
done))
-(defun imap-ssl-p (buffer)
+(defun imap-ssl-p (_buffer)
nil)
(defun imap-ssl-open (name buffer server port)
(message "imap: Opening SSL connection with `%s'...failed" cmd)
nil)))
-(defun imap-tls-p (buffer)
+(defun imap-tls-p (_buffer)
nil)
(defun imap-tls-open (name buffer server port)
(when (memq (process-status process) '(open run))
process))))
-(defun imap-network-p (buffer)
+(defun imap-network-p (_buffer)
t)
(defun imap-network-open (name buffer server port)
(when (memq (process-status process) '(open run))
process))))
-(defun imap-shell-p (buffer)
+(defun imap-shell-p (_buffer)
nil)
(defun imap-shell-open (name buffer server port)
;; passwd nil))))
ret)))
-(defun imap-gssapi-auth-p (buffer)
+(defun imap-gssapi-auth-p (_buffer)
(eq imap-stream 'gssapi))
-(defun imap-gssapi-auth (buffer)
+(defun imap-gssapi-auth (_buffer)
(message "imap: Authenticating using GSSAPI...%s"
(if (eq imap-stream 'gssapi) "done" "failed"))
(eq imap-stream 'gssapi))
(and (imap-capability 'AUTH=KERBEROS_V4 buffer)
(eq imap-stream 'kerberos4)))
-(defun imap-kerberos4-auth (buffer)
+(defun imap-kerberos4-auth (_buffer)
(message "imap: Authenticating using Kerberos 4...%s"
(if (eq imap-stream 'kerberos4) "done" "failed"))
(eq imap-stream 'kerberos4))
(imap-quote-specials passwd)
"\""))))))
-(defun imap-anonymous-p (buffer)
+(defun imap-anonymous-p (_buffer)
t)
(defun imap-anonymous-auth (buffer)
(and (imap-fetch-safe '("*" . "*:*") "UID")
(list (imap-mailbox-get-1 'uidvalidity mailbox)
(apply 'max (imap-message-map
- (lambda (uid prop) uid) 'UID))))
+ (lambda (uid _prop) uid) 'UID))))
(if old-mailbox
(imap-mailbox-select old-mailbox (eq state 'examine))
(imap-mailbox-unselect)))))))
(and (imap-fetch-safe '("*" . "*:*") "UID")
(list (imap-mailbox-get-1 'uidvalidity mailbox)
(apply 'max (imap-message-map
- (lambda (uid prop) uid) 'UID))))
+ (lambda (uid _prop) uid) 'UID))))
(if old-mailbox
(imap-mailbox-select old-mailbox (eq state 'examine))
(imap-mailbox-unselect)))))))
(with-current-buffer (or buffer (current-buffer))
(imap-message-appenduid-1 (imap-utf7-encode mailbox))))
-(defun imap-message-append (mailbox article &optional flags date-time buffer)
+(defun imap-message-append (mailbox article &optional _flags _date-time buffer)
"Append ARTICLE (a buffer) to MAILBOX on server in BUFFER.
FLAGS and DATE-TIME is currently not used. Return a cons holding
uidvalidity of MAILBOX and UID the newly created article got, or nil
(insert-directory . tramp-adb-handle-insert-directory)
(insert-file-contents . tramp-handle-insert-file-contents)
(load . tramp-handle-load)
- ;; `make-auto-save-file-name' performed by default handler.
+ (make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
(make-directory . tramp-adb-handle-make-directory)
(make-directory-internal . ignore)
(make-symbolic-link . ignore)
(split-string
(apply 'concat
(mapcar (lambda (s)
- (replace-regexp-in-string
+ (tramp-compat-replace-regexp-in-string
"\\(.\\)" " -\\1"
- (replace-regexp-in-string "^-" "" s)))
+ (tramp-compat-replace-regexp-in-string "^-" "" s)))
;; FIXME: Warning about removed switches (long and non-dash).
(delq nil
(mapcar
(when p
(if (yes-or-no-p "A command is running. Kill it? ")
(ignore-errors (kill-process p))
- (tramp-compat-user-error "Shell command in progress")))
+ (tramp-user-error p "Shell command in progress")))
(if current-buffer-p
(progn
(read (current-buffer))))))
(when (and (stringp old-getprop)
(not (string-equal old-getprop new-getprop)))
- (tramp-cleanup vec)
(tramp-message
vec 3
"Connection reset, because remote host changed from `%s' to `%s'"
old-getprop new-getprop)
+ (tramp-cleanup-connection vec t)
(tramp-adb-maybe-open-connection vec)))
;; Change user if indicated.
(let (result)
(maphash
(lambda (key value)
+ ;; Remove text properties from KEY.
+ (when (vectorp key)
+ (dotimes (i (length key))
+ (when (stringp (aref key i))
+ (aset key i
+ (funcall
+ ;; `substring-no-properties' does not exist in XEmacs.
+ (if (functionp 'substring-no-properties)
+ 'substring-no-properties 'identity)
+ (aref key i))))))
(let ((tmp (format
"(%s %s)"
(if (processp key)
(buffer-list))))
;;;###tramp-autoload
-(defun tramp-cleanup-connection (vec)
+(defun tramp-cleanup-connection (vec &optional keep-debug keep-password)
"Flush all connection related objects.
-This includes password cache, file cache, connection cache, buffers.
+This includes password cache, file cache, connection cache,
+buffers. KEEP-DEBUG non-nil preserves the debug buffer.
+KEEP-PASSWORD non-nil preserves the password cache.
When called interactively, a Tramp connection has to be selected."
(interactive
;; When interactive, select the Tramp remote identification.
"Enter Tramp connection: " connections nil t
(try-completion "" connections)))
(when (and name (file-remote-p name))
- (with-parsed-tramp-file-name name nil v))))))
+ (with-parsed-tramp-file-name name nil v))))
+ nil nil))
(if (not vec)
;; Nothing to do.
(message "No Tramp connection found.")
;; Flush password cache.
- (tramp-clear-passwd vec)
+ (unless keep-password (tramp-clear-passwd vec))
;; Flush file cache.
(tramp-flush-directory-property vec "")
;; Remove buffers.
(dolist
(buf (list (get-buffer (tramp-buffer-name vec))
- (get-buffer (tramp-debug-buffer-name vec))
+ (unless keep-debug
+ (get-buffer (tramp-debug-buffer-name vec)))
(tramp-get-connection-property vec "process-buffer" nil)))
(when (bufferp buf) (kill-buffer buf)))))
'tramp-load-report-modules ; pre-hook
'tramp-append-tramp-buffers ; post-hook
- (propertize "\n" 'display "\
+ (funcall
+ (if (functionp 'propertize) 'propertize 'progn)
+ "\n" 'display "\
Enter your bug report in this message, including as much detail
as you possibly can about the problem, what you did to cause it
and what the local and remote machines are.
;; `with-temp-message' does not exist in XEmacs.
(if (fboundp 'with-temp-message)
(defalias 'tramp-compat-with-temp-message 'with-temp-message)
- (defmacro tramp-compat-with-temp-message (message &rest body)
+ (defmacro tramp-compat-with-temp-message (_message &rest body)
"Display MESSAGE temporarily if non-nil while BODY is evaluated."
`(progn ,@body)))
"Like `copy-file' for Tramp files (compat function)."
(cond
(preserve-extended-attributes
- (tramp-compat-funcall
- 'copy-file filename newname ok-if-already-exists keep-date
- preserve-uid-gid preserve-extended-attributes))
+ (condition-case nil
+ (tramp-compat-funcall
+ 'copy-file filename newname ok-if-already-exists keep-date
+ preserve-uid-gid preserve-extended-attributes)
+ (wrong-number-of-arguments
+ (tramp-compat-copy-file
+ filename newname ok-if-already-exists keep-date preserve-uid-gid))))
(preserve-uid-gid
- (tramp-compat-funcall
- 'copy-file filename newname ok-if-already-exists keep-date
- preserve-uid-gid))
+ (condition-case nil
+ (tramp-compat-funcall
+ 'copy-file filename newname ok-if-already-exists keep-date
+ preserve-uid-gid)
+ (wrong-number-of-arguments
+ (tramp-compat-copy-file
+ filename newname ok-if-already-exists keep-date))))
(t
(copy-file filename newname ok-if-already-exists keep-date))))
"`dos', `unix', or `mac'")))))
(t (error "Can't change EOL conversion -- is MULE missing?"))))
-;; `user-error' has been added to Emacs 24.3.
-(defun tramp-compat-user-error (format &rest args)
- "Signal a pilot error."
-; (tramp-backtrace)
- (apply (if (fboundp 'user-error) 'user-error 'error) format args))
+;; `replace-regexp-in-string' does not exist in XEmacs.
+;; Implementation is taken from Emacs 24.
+(if (fboundp 'replace-regexp-in-string)
+ (defalias 'tramp-compat-replace-regexp-in-string 'replace-regexp-in-string)
+ (defun tramp-compat-replace-regexp-in-string
+ (regexp rep string &optional fixedcase literal subexp start)
+ "Replace all matches for REGEXP with REP in STRING.
+
+Return a new string containing the replacements.
+
+Optional arguments FIXEDCASE, LITERAL and SUBEXP are like the
+arguments with the same names of function `replace-match'. If START
+is non-nil, start replacements at that index in STRING.
+
+REP is either a string used as the NEWTEXT arg of `replace-match' or a
+function. If it is a function, it is called with the actual text of each
+match, and its value is used as the replacement text. When REP is called,
+the match data are the result of matching REGEXP against a substring
+of STRING.
+
+To replace only the first match (if any), make REGEXP match up to \\'
+and replace a sub-expression, e.g.
+ (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1)
+ => \" bar foo\""
+
+ (let ((l (length string))
+ (start (or start 0))
+ matches str mb me)
+ (save-match-data
+ (while (and (< start l) (string-match regexp string start))
+ (setq mb (match-beginning 0)
+ me (match-end 0))
+ ;; If we matched the empty string, make sure we advance by one char
+ (when (= me mb) (setq me (min l (1+ mb))))
+ ;; Generate a replacement for the matched substring.
+ ;; Operate only on the substring to minimize string consing.
+ ;; Set up match data for the substring for replacement;
+ ;; presumably this is likely to be faster than munging the
+ ;; match data directly in Lisp.
+ (string-match regexp (setq str (substring string mb me)))
+ (setq matches
+ (cons (replace-match (if (stringp rep)
+ rep
+ (funcall rep (match-string 0 str)))
+ fixedcase literal str subexp)
+ (cons (substring string start mb) ; unmatched prefix
+ matches)))
+ (setq start me))
+ ;; Reconstruct a string from the pieces.
+ (setq matches (cons (substring string start l) matches)) ; leftover
+ (apply #'concat (nreverse matches))))))
(add-hook 'tramp-unload-hook
(lambda ()
(insert-directory . tramp-gvfs-handle-insert-directory)
(insert-file-contents . tramp-gvfs-handle-insert-file-contents)
(load . tramp-handle-load)
- ;; `make-auto-save-file-name' performed by default handler.
+ (make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
(make-directory . tramp-gvfs-handle-make-directory)
(make-directory-internal . ignore)
(make-symbolic-link . ignore)
First arg specifies the OPERATION, second arg is a list of arguments to
pass to the OPERATION."
(unless tramp-gvfs-enabled
- (tramp-compat-user-error "Package `tramp-gvfs' not supported"))
+ (tramp-user-error nil "Package `tramp-gvfs' not supported"))
(let ((fn (assoc operation tramp-gvfs-file-name-handler-alist)))
(if fn
(save-match-data (apply (cdr fn) args))
(and (tramp-tramp-file-p newname)
(not (tramp-gvfs-file-name-p newname))))
- ;; We cannot copy directly.
+ ;; We cannot call `copy-file' directly. Use
+ ;; `tramp-compat-funcall' for backward compatibility (number
+ ;; of arguments).
(let ((tmpfile (tramp-compat-make-temp-file filename)))
(cond
(preserve-extended-attributes
- (copy-file
+ (tramp-compat-funcall
+ 'copy-file
filename tmpfile t keep-date preserve-uid-gid
preserve-extended-attributes))
(preserve-uid-gid
- (copy-file filename tmpfile t keep-date preserve-uid-gid))
+ (tramp-compat-funcall
+ 'copy-file filename tmpfile t keep-date preserve-uid-gid))
(t
(copy-file filename tmpfile t keep-date)))
(rename-file tmpfile newname ok-if-already-exists))
(tramp-message proc 6 "%S\n%s" proc string)
(setq string (concat rest-string string)
;; Attribute change is returned in unused wording.
- string (replace-regexp-in-string
+ string (tramp-compat-replace-regexp-in-string
"ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string))
(while (string-match
"Event = \\([^[:blank:]]+\\)[\n\r]+")
string)
(let ((action (intern-soft
- (replace-regexp-in-string
+ (tramp-compat-replace-regexp-in-string
"_" "-" (downcase (match-string 2 string)))))
(file (match-string 1 string)))
(setq string (replace-match "" nil nil string))
(defun tramp-gvfs-file-name (object-path)
"Retrieve file name from D-Bus OBJECT-PATH."
(dbus-unescape-from-identifier
- (replace-regexp-in-string "^.*/\\([^/]+\\)$" "\\1" object-path)))
+ (tramp-compat-replace-regexp-in-string
+ "^.*/\\([^/]+\\)$" "\\1" object-path)))
(defun tramp-bluez-address (device)
"Return bluetooth device address from a given bluetooth DEVICE name."
(port (tramp-file-name-port vec))
(localname (tramp-file-name-localname vec))
(ssl (if (string-match "^davs" method) "true" "false"))
- (mount-spec '(:array))
- (mount-pref "/"))
-
- (setq
- mount-spec
- (append
- mount-spec
- (cond
- ((string-equal "smb" method)
- (string-match "^/?\\([^/]+\\)" localname)
- (list (tramp-gvfs-mount-spec-entry "type" "smb-share")
- (tramp-gvfs-mount-spec-entry "server" host)
- (tramp-gvfs-mount-spec-entry "share" (match-string 1 localname))))
- ((string-equal "obex" method)
- (list (tramp-gvfs-mount-spec-entry "type" method)
- (tramp-gvfs-mount-spec-entry
- "host" (concat "[" (tramp-bluez-address host) "]"))))
- ((string-match "^dav" method)
- (list (tramp-gvfs-mount-spec-entry "type" "dav")
- (tramp-gvfs-mount-spec-entry "host" host)
- (tramp-gvfs-mount-spec-entry "ssl" ssl)))
- (t
- (list (tramp-gvfs-mount-spec-entry "type" method)
- (tramp-gvfs-mount-spec-entry "host" host))))))
-
- (when user
- (add-to-list
- 'mount-spec (tramp-gvfs-mount-spec-entry "user" user) 'append))
-
- (when domain
- (add-to-list
- 'mount-spec (tramp-gvfs-mount-spec-entry "domain" domain) 'append))
-
- (when port
- (add-to-list
- 'mount-spec (tramp-gvfs-mount-spec-entry "port" (number-to-string port))
- 'append))
-
- (when (and (string-match "^dav" method)
- (string-match "^/?[^/]+" localname))
- (setq mount-pref (match-string 0 localname)))
+ (mount-spec
+ `(:array
+ ,@(cond
+ ((string-equal "smb" method)
+ (string-match "^/?\\([^/]+\\)" localname)
+ (list (tramp-gvfs-mount-spec-entry "type" "smb-share")
+ (tramp-gvfs-mount-spec-entry "server" host)
+ (tramp-gvfs-mount-spec-entry
+ "share" (match-string 1 localname))))
+ ((string-equal "obex" method)
+ (list (tramp-gvfs-mount-spec-entry "type" method)
+ (tramp-gvfs-mount-spec-entry
+ "host" (concat "[" (tramp-bluez-address host) "]"))))
+ ((string-match "\\`dav" method)
+ (list (tramp-gvfs-mount-spec-entry "type" "dav")
+ (tramp-gvfs-mount-spec-entry "host" host)
+ (tramp-gvfs-mount-spec-entry "ssl" ssl)))
+ (t
+ (list (tramp-gvfs-mount-spec-entry "type" method)
+ (tramp-gvfs-mount-spec-entry "host" host))))
+ ,@(when user
+ (list (tramp-gvfs-mount-spec-entry "user" user)))
+ ,@(when domain
+ (list (tramp-gvfs-mount-spec-entry "domain" domain)))
+ ,@(when port
+ (list (tramp-gvfs-mount-spec-entry
+ "port" (number-to-string port))))))
+ (mount-pref
+ (if (and (string-match "\\`dav" method)
+ (string-match "^/?[^/]+" localname))
+ (match-string 0 localname)
+ "/")))
;; Return.
`(:struct ,(tramp-gvfs-dbus-string-to-byte-array mount-pref) ,mount-spec)))
(when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t
:system tramp-hal-service device tramp-hal-interface-device
"PropertyExists" "sync.plugin")
- (add-to-list
- 'tramp-synce-devices
- (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t
- :system tramp-hal-service device tramp-hal-interface-device
- "GetPropertyString" "pda.pocketpc.name"))))
+ (let ((prop
+ (with-tramp-dbus-call-method
+ tramp-gvfs-dbus-event-vector t
+ :system tramp-hal-service device tramp-hal-interface-device
+ "GetPropertyString" "pda.pocketpc.name")))
+ (unless (member prop tramp-synce-devices)
+ (push prop tramp-synce-devices)))))
(tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices)
tramp-synce-devices))
tramp-gw-vector 6 "\n%s"
(format
"%s%s\r\n" command
- (replace-regexp-in-string ;; no password in trace!
+ (tramp-compat-replace-regexp-in-string ;; no password in trace!
"Basic [^\r\n]+" "Basic xxxxx" authentication t)))
(with-current-buffer buffer
;; Trap errors to be traced in the right trace buffer. Often,
(insert-file-contents-literally
. tramp-sh-handle-insert-file-contents-literally)
(load . tramp-handle-load)
- (make-auto-save-file-name . tramp-sh-handle-make-auto-save-file-name)
+ (make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
(make-directory . tramp-sh-handle-make-directory)
(make-symbolic-link . tramp-sh-handle-make-symbolic-link)
(process-file . tramp-sh-handle-process-file)
'file-name-nondirectory (list localname)))
(setq localname (tramp-run-real-handler
'file-name-directory (list localname))))
- (unless full-directory-p
- (setq switches (add-to-list 'switches "-d" 'append)))
+ (unless (or full-directory-p (member "-d" switches))
+ (setq switches (append switches '("-d"))))
(setq switches (mapconcat 'tramp-shell-quote-argument switches " "))
(when wildcard
(setq switches (concat switches " " wildcard)))
(fset 'find-buffer-file-type find-buffer-file-type-function)
(fmakunbound 'find-buffer-file-type)))))
-(defun tramp-sh-handle-make-auto-save-file-name ()
- "Like `make-auto-save-file-name' for Tramp files.
-Returns a file name in `tramp-auto-save-directory' for autosaving this file."
- (let ((tramp-auto-save-directory tramp-auto-save-directory)
- (buffer-file-name
- (tramp-subst-strs-in-string
- '(("_" . "|")
- ("/" . "_a")
- (":" . "_b")
- ("|" . "__")
- ("[" . "_l")
- ("]" . "_r"))
- (buffer-file-name))))
- ;; File name must be unique. This is ensured with Emacs 22 (see
- ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for
- ;; all other cases we must do it ourselves.
- (when (boundp 'auto-save-file-name-transforms)
- (mapc
- (lambda (x)
- (when (and (string-match (car x) buffer-file-name)
- (not (car (cddr x))))
- (setq tramp-auto-save-directory
- (or tramp-auto-save-directory
- (tramp-compat-temporary-file-directory)))))
- (symbol-value 'auto-save-file-name-transforms)))
- ;; Create directory.
- (when tramp-auto-save-directory
- (setq buffer-file-name
- (expand-file-name buffer-file-name tramp-auto-save-directory))
- (unless (file-exists-p tramp-auto-save-directory)
- (make-directory tramp-auto-save-directory t)))
- ;; Run plain `make-auto-save-file-name'. There might be an advice when
- ;; it is not a magic file name operation (since Emacs 22).
- ;; We must deactivate it temporarily.
- (if (not (ad-is-active 'make-auto-save-file-name))
- (tramp-run-real-handler 'make-auto-save-file-name nil)
- ;; else
- (ad-deactivate 'make-auto-save-file-name)
- (prog1
- (tramp-run-real-handler 'make-auto-save-file-name nil)
- (ad-activate 'make-auto-save-file-name)))))
-
;; CCC grok LOCKNAME
(defun tramp-sh-handle-write-region
(start end filename &optional append visit lockname confirm)
(tramp-message proc 6 "%S\n%s" proc string)
(setq string (concat rest-string string)
;; Attribute change is returned in unused wording.
- string (replace-regexp-in-string
+ string (tramp-compat-replace-regexp-in-string
"ATTRIB CHANGED" "ATTRIBUTE_CHANGED" string))
(while (string-match
(list
proc
(intern-soft
- (replace-regexp-in-string
+ (tramp-compat-replace-regexp-in-string
"_" "-" (downcase (match-string 4 string))))
;; File names are returned as absolute paths. We must
;; add the remote prefix.
proc
(mapcar
(lambda (x)
- (intern-soft (replace-regexp-in-string "_" "-" (downcase x))))
+ (intern-soft
+ (tramp-compat-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,
vec "uname"
(tramp-send-command-and-read vec "echo \\\"`uname -sr`\\\""))))
(when (and (stringp old-uname) (not (string-equal old-uname new-uname)))
- (tramp-cleanup vec)
(tramp-message
vec 3
"Connection reset, because remote host changed from `%s' to `%s'"
old-uname new-uname)
+ ;; We want to keep the password.
+ (tramp-cleanup-connection vec t t)
(throw 'uname-changed (tramp-maybe-open-connection vec))))
;; Check whether the remote host suffers from buggy
?h (or (tramp-file-name-host (car target-alist)) ""))))
(with-parsed-tramp-file-name proxy l
;; Add the hop.
- (add-to-list 'target-alist l)
+ (push l target-alist)
;; Start next search.
(setq choices tramp-default-proxies-alist)))))
vec 'file-error
"Connection `%s' is not supported for gateway access." hop))
;; Open the gateway connection.
- (add-to-list
- 'target-alist
+ (push
(vector
(tramp-file-name-method hop) (tramp-file-name-user hop)
- (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil))
+ (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil)
+ target-alist)
;; For the password prompt, we need the correct values.
;; Therefore, we must remember the gateway vector. But we
;; cannot do it as connection property, because it shouldn't
connection if a previous connection has died for some reason."
(tramp-check-proper-host vec)
- (catch 'uname-changed
- (let ((p (tramp-get-connection-process vec))
- (process-name (tramp-get-connection-property vec "process-name" nil))
- (process-environment (copy-sequence process-environment))
- (pos (with-current-buffer (tramp-get-connection-buffer vec) (point))))
-
- ;; 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) 2)
- (car tramp-current-connection)))
- (> (tramp-time-diff
- (current-time) (cdr tramp-current-connection))
- (or tramp-connection-min-time-diff 0)))
- (throw 'suppress 'suppress))
-
- ;; If too much time has passed since last command was sent, look
- ;; whether process is still alive. If it isn't, kill it. When
- ;; using ssh, it can sometimes happen that the remote end has
- ;; hung up but the local ssh client doesn't recognize this until
- ;; it tries to send some data to the remote end. So that's why
- ;; we try to send a command from time to time, then look again
- ;; whether the process is really alive.
- (condition-case nil
- (when (and (> (tramp-time-diff
- (current-time)
- (tramp-get-connection-property
- p "last-cmd-time" '(0 0 0)))
- 60)
- p (processp p) (memq (process-status p) '(run open)))
- (tramp-send-command vec "echo are you awake" t t)
- (unless (and (memq (process-status p) '(run open))
- (tramp-wait-for-output p 10))
- ;; The error will be caught locally.
- (tramp-error vec 'file-error "Awake did fail")))
- (file-error
- (tramp-cleanup vec)
- (setq p nil)))
-
- ;; New connection must be opened.
- (condition-case err
- (unless (and p (processp p) (memq (process-status p) '(run open)))
-
- ;; We call `tramp-get-buffer' in order to get a debug
- ;; buffer for messages from the beginning.
- (tramp-get-buffer vec)
-
- ;; If `non-essential' is non-nil, don't reopen a new connection.
- (when (and (boundp 'non-essential) (symbol-value 'non-essential))
- (throw 'non-essential 'non-essential))
-
- (with-tramp-progress-reporter
- vec 3
- (if (zerop (length (tramp-file-name-user vec)))
- (format "Opening connection for %s using %s"
- (tramp-file-name-host vec)
- (tramp-file-name-method vec))
- (format "Opening connection for %s@%s using %s"
- (tramp-file-name-user vec)
+ (let ((p (tramp-get-connection-process vec))
+ (process-name (tramp-get-connection-property vec "process-name" nil))
+ (process-environment (copy-sequence process-environment))
+ (pos (with-current-buffer (tramp-get-connection-buffer vec) (point))))
+
+ ;; 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) 2)
+ (car tramp-current-connection)))
+ (> (tramp-time-diff
+ (current-time) (cdr tramp-current-connection))
+ (or tramp-connection-min-time-diff 0)))
+ (throw 'suppress 'suppress))
+
+ ;; If too much time has passed since last command was sent, look
+ ;; whether process is still alive. If it isn't, kill it. When
+ ;; using ssh, it can sometimes happen that the remote end has hung
+ ;; up but the local ssh client doesn't recognize this until it
+ ;; tries to send some data to the remote end. So that's why we
+ ;; try to send a command from time to time, then look again
+ ;; whether the process is really alive.
+ (condition-case nil
+ (when (and (> (tramp-time-diff
+ (current-time)
+ (tramp-get-connection-property
+ p "last-cmd-time" '(0 0 0)))
+ 60)
+ p (processp p) (memq (process-status p) '(run open)))
+ (tramp-send-command vec "echo are you awake" t t)
+ (unless (and (memq (process-status p) '(run open))
+ (tramp-wait-for-output p 10))
+ ;; The error will be caught locally.
+ (tramp-error vec 'file-error "Awake did fail")))
+ (file-error
+ (tramp-cleanup-connection vec t)
+ (setq p nil)))
+
+ ;; New connection must be opened.
+ (condition-case err
+ (unless (and p (processp p) (memq (process-status p) '(run open)))
+
+ ;; We call `tramp-get-buffer' in order to get a debug buffer
+ ;; for messages from the beginning.
+ (tramp-get-buffer vec)
+
+ ;; If `non-essential' is non-nil, don't reopen a new connection.
+ (when (and (boundp 'non-essential) (symbol-value 'non-essential))
+ (throw 'non-essential 'non-essential))
+
+ (with-tramp-progress-reporter
+ vec 3
+ (if (zerop (length (tramp-file-name-user vec)))
+ (format "Opening connection for %s using %s"
(tramp-file-name-host vec)
- (tramp-file-name-method vec)))
+ (tramp-file-name-method vec))
+ (format "Opening connection for %s@%s using %s"
+ (tramp-file-name-user vec)
+ (tramp-file-name-host vec)
+ (tramp-file-name-method vec)))
+ (catch 'uname-changed
;; Start new process.
(when (and p (processp p))
(delete-process p))
target-alist (cdr target-alist)))
;; Make initial shell settings.
- (tramp-open-connection-setup-interactive-shell p vec))))
+ (tramp-open-connection-setup-interactive-shell p vec)))))
- ;; When the user did interrupt, we must cleanup.
- (quit
- (tramp-cleanup vec)
- ;; Propagate the quit signal.
- (signal (car err) (cdr err)))))))
+ ;; When the user did interrupt, we must cleanup.
+ (quit
+ (tramp-cleanup-connection vec t)
+ ;; Propagate the quit signal.
+ (signal (car err) (cdr err))))))
(defun tramp-send-command (vec command &optional neveropen nooutput)
"Send the COMMAND to connection VEC.
(insert-directory . tramp-smb-handle-insert-directory)
(insert-file-contents . tramp-handle-insert-file-contents)
(load . tramp-handle-load)
- ;; `make-auto-save-file-name' performed by default handler.
+ (make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
(make-directory . tramp-smb-handle-make-directory)
(make-directory-internal . tramp-smb-handle-make-directory-internal)
(make-symbolic-link . tramp-smb-handle-make-symbolic-link)
(port (tramp-file-name-port v))
(share (tramp-smb-get-share v))
(localname (file-name-as-directory
- (replace-regexp-in-string
+ (tramp-compat-replace-regexp-in-string
"\\\\" "/" (tramp-smb-get-localname v))))
(tmpdir (make-temp-name
(expand-file-name
(unless (tramp-smb-send-command
v (format "put \"%s\" \"%s\""
filename (tramp-smb-get-localname v)))
- (tramp-error v 'file-error "Cannot copy `%s'" filename))))))
+ (tramp-error
+ v 'file-error "Cannot copy `%s' to `%s'" filename newname))))))
;; KEEP-DATE handling.
(when keep-date
(tramp-dissect-file-name (if (file-remote-p filename) filename newname))
0 (format "Renaming %s to %s" filename newname)
- (if (and (tramp-equal-remote filename newname)
+ (if (and (not (file-exists-p newname))
+ (tramp-equal-remote filename newname)
(string-equal
(tramp-smb-get-share (tramp-dissect-file-name filename))
(tramp-smb-get-share (tramp-dissect-file-name newname))))
(while (not (eobp))
(setq entry (tramp-smb-read-file-entry share))
(forward-line)
- (when entry (add-to-list 'res entry))))
+ (when entry (push entry res))))
;; Cache share entries.
(unless share
(tramp-set-connection-property v "share-cache" res)))
;; Add directory itself.
- (add-to-list 'res '("" "drwxrwxrwx" 0 (0 0)))
+ (push '("" "drwxrwxrwx" 0 (0 0)) res)
;; There's a very strange error (debugged with XEmacs 21.4.14)
;; If there's no short delay, it returns nil. No idea about.
(error
(with-current-buffer (tramp-get-connection-buffer vec)
(goto-char (point-min))
- (if (search-forward-regexp
- tramp-smb-wrong-passwd-regexp nil t)
+ (if (and (boundp 'auth-sources)
+ (symbol-value 'auth-sources)
+ (search-forward-regexp
+ tramp-smb-wrong-passwd-regexp nil t))
;; Disable `auth-source' and `password-cache'.
+ (tramp-message
+ vec 3 "Retry connection with new password")
(let (auth-sources)
- (tramp-cleanup vec)
+ (tramp-cleanup-connection vec t)
(tramp-smb-maybe-open-connection vec argument))
;; Propagate the error.
(signal (car err) (cdr err)))))))))))))
;; Tramp only knows how to deal with `file-name-handler-alist', not
;; the other places.
-;; Currently, we have the choice between 'ftp, 'sep, and 'url.
+;; Currently, we have the choice between 'ftp and 'sep.
;;;###autoload
(defcustom tramp-syntax
(if (featurep 'xemacs) 'sep 'ftp)
It can have the following values:
'ftp -- Ange-FTP respective EFS like syntax (GNU Emacs default)
- 'sep -- Syntax as defined for XEmacs (not available yet for GNU Emacs)
- 'url -- URL-like syntax."
+ 'sep -- Syntax as defined for XEmacs."
:group 'tramp
- :type (if (featurep 'xemacs)
- '(choice (const :tag "EFS" ftp)
- (const :tag "XEmacs" sep)
- (const :tag "URL" url))
- '(choice (const :tag "Ange-FTP" ftp)
- (const :tag "URL" url))))
+ :version "24.4"
+ :type `(choice (const :tag ,(if (featurep 'xemacs) "EFS" "Ange-FTP") ftp)
+ (const :tag "XEmacs" sep)))
(defconst tramp-prefix-format
(cond ((equal tramp-syntax 'ftp) "/")
((equal tramp-syntax 'sep) "/[")
- ((equal tramp-syntax 'url) "/")
(t (error "Wrong `tramp-syntax' defined")))
"String matching the very beginning of Tramp file names.
Used in `tramp-make-tramp-file-name'.")
(defconst tramp-postfix-method-format
(cond ((equal tramp-syntax 'ftp) ":")
((equal tramp-syntax 'sep) "/")
- ((equal tramp-syntax 'url) "://")
(t (error "Wrong `tramp-syntax' defined")))
"String matching delimiter between method and user or host names.
Used in `tramp-make-tramp-file-name'.")
(defconst tramp-prefix-ipv6-format
(cond ((equal tramp-syntax 'ftp) "[")
((equal tramp-syntax 'sep) "")
- ((equal tramp-syntax 'url) "[")
(t (error "Wrong `tramp-syntax' defined")))
"String matching left hand side of IPv6 addresses.
Used in `tramp-make-tramp-file-name'.")
(defconst tramp-postfix-ipv6-format
(cond ((equal tramp-syntax 'ftp) "]")
((equal tramp-syntax 'sep) "")
- ((equal tramp-syntax 'url) "]")
(t (error "Wrong `tramp-syntax' defined")))
"String matching right hand side of IPv6 addresses.
Used in `tramp-make-tramp-file-name'.")
(defconst tramp-prefix-port-format
(cond ((equal tramp-syntax 'ftp) "#")
((equal tramp-syntax 'sep) "#")
- ((equal tramp-syntax 'url) ":")
(t (error "Wrong `tramp-syntax' defined")))
"String matching delimiter between host names and port numbers.")
(defconst tramp-postfix-host-format
(cond ((equal tramp-syntax 'ftp) ":")
((equal tramp-syntax 'sep) "]")
- ((equal tramp-syntax 'url) "")
(t (error "Wrong `tramp-syntax' defined")))
"String matching delimiter between host names and localnames.
Used in `tramp-make-tramp-file-name'.")
XEmacs uses a separate filename syntax for Tramp and EFS.
See `tramp-file-name-structure' for more explanations.")
-;;;###autoload
-(defconst tramp-file-name-regexp-url "\\`/[^/|:]+://"
- "Value for `tramp-file-name-regexp' for URL-like remoting.
-See `tramp-file-name-structure' for more explanations.")
-
;;;###autoload
(defconst tramp-file-name-regexp
(cond ((equal tramp-syntax 'ftp) tramp-file-name-regexp-unified)
((equal tramp-syntax 'sep) tramp-file-name-regexp-separate)
- ((equal tramp-syntax 'url) tramp-file-name-regexp-url)
(t (error "Wrong `tramp-syntax' defined")))
"Regular expression matching file names handled by Tramp.
This regexp should match Tramp file names but no other file names.
XEmacs uses a separate filename syntax for Tramp and EFS.
See `tramp-file-name-structure' for more explanations.")
-;;;###autoload
-(defconst tramp-completion-file-name-regexp-url
- "\\`/[^/:]+\\(:\\(/\\(/[^/]*\\)?\\)?\\)?\\'"
- "Value for `tramp-completion-file-name-regexp' for URL-like remoting.
-See `tramp-file-name-structure' for more explanations.")
-
;;;###autoload
(defconst tramp-completion-file-name-regexp
(cond ((equal tramp-syntax 'ftp) tramp-completion-file-name-regexp-unified)
((equal tramp-syntax 'sep) tramp-completion-file-name-regexp-separate)
- ((equal tramp-syntax 'url) tramp-completion-file-name-regexp-url)
(t (error "Wrong `tramp-syntax' defined")))
"Regular expression matching file names handled by Tramp completion.
This regexp should match partial Tramp file names only.
;;; Internal functions which must come first:
+(defsubst tramp-user-error (vec-or-proc format &rest args)
+ "Signal a pilot error."
+ (apply
+ 'tramp-error vec-or-proc
+ (if (fboundp 'user-error) 'user-error 'error) format args))
+
;; Conversion functions between external representation and
;; internal data structure. Convenience functions for internal
;; data structure.
(if noninteractive
(warn "Method %s is obsolete, using %s"
result (substring result 0 -1))
- (unless (y-or-n-p (format "Method %s is obsolete, use %s? "
+ (unless (y-or-n-p (format "Method \"%s\" is obsolete, use \"%s\"? "
result (substring result 0 -1)))
- (tramp-compat-user-error "Method \"%s\" not supported" result)))
+ (tramp-user-error nil "Method \"%s\" not supported" result)))
(add-to-list 'tramp-warned-obsolete-methods result))
;; This works with the current set of `tramp-obsolete-methods'.
;; Must be improved, if their are more sophisticated replacements.
(setq result (substring result 0 -1)))
- ;; We must mark, whether a default value has been used.
- (if (or method (null result))
+ ;; We must mark, whether a default value has been used. Not
+ ;; applicable for XEmacs.
+ (if (or method (null result) (null (functionp 'propertize)))
result
- (propertize result 'tramp-default t))))
+ (tramp-compat-funcall 'propertize result 'tramp-default t))))
(defun tramp-find-user (method user host)
"Return the right user string to use.
(setq choices nil)))
luser)
tramp-default-user)))
- ;; We must mark, whether a default value has been used.
- (if (or user (null result))
+ ;; We must mark, whether a default value has been used. Not
+ ;; applicable for XEmacs.
+ (if (or user (null result) (null (functionp 'propertize)))
result
- (propertize result 'tramp-default t))))
+ (tramp-compat-funcall 'propertize result 'tramp-default t))))
(defun tramp-find-host (method user host)
"Return the right host string to use.
(or (null method) (get-text-property 0 'tramp-default method))
(or (null user) (get-text-property 0 'tramp-default user))
(member host (mapcar 'car tramp-methods)))
- (tramp-compat-user-error
- "Host name must not match method `%s'" host))))
+ (tramp-cleanup-connection vec)
+ (tramp-user-error vec "Host name must not match method \"%s\"" host))))
(defun tramp-dissect-file-name (name &optional nodefault)
"Return a `tramp-file-name' structure.
values."
(save-match-data
(let ((match (string-match (nth 0 tramp-file-name-structure) name)))
- (unless match (tramp-compat-user-error "Not a Tramp file name: %s" name))
+ (unless match (tramp-user-error nil "Not a Tramp file name: \"%s\"" name))
(let ((method (match-string (nth 1 tramp-file-name-structure) name))
(user (match-string (nth 2 tramp-file-name-structure) name))
(host (match-string (nth 3 tramp-file-name-structure) name))
"tramp-debug-message"
"tramp-error"
"tramp-error-with-buffer"
- "tramp-message")
+ "tramp-message"
+ "tramp-user-error")
t)
"$")
fn)))
If VAR is nil, then we bind `v' to the structure and `method', `user',
`host', `localname', `hop' to the components."
- `(let* ((,(or var 'v) (tramp-dissect-file-name ,filename))
- (,(if var (intern (concat (symbol-name var) "-method")) 'method)
- (tramp-file-name-method ,(or var 'v)))
- (,(if var (intern (concat (symbol-name var) "-user")) 'user)
- (tramp-file-name-user ,(or var 'v)))
- (,(if var (intern (concat (symbol-name var) "-host")) 'host)
- (tramp-file-name-host ,(or var 'v)))
- (,(if var (intern (concat (symbol-name var) "-localname")) 'localname)
- (tramp-file-name-localname ,(or var 'v)))
- (,(if var (intern (concat (symbol-name var) "-hop")) 'hop)
- (tramp-file-name-hop ,(or var 'v))))
- ,@body))
+ (let ((bindings
+ (mapcar (lambda (elem)
+ `(,(if var (intern (format "%s-%s" var elem)) elem)
+ (,(intern (format "tramp-file-name-%s" elem))
+ ,(or var 'v))))
+ '(method user host localname hop))))
+ `(let* ((,(or var 'v) (tramp-dissect-file-name ,filename))
+ ,@bindings)
+ ;; We don't know which of those vars will be used, so we bind them all,
+ ;; and then add here a dummy use of all those variables, so we don't get
+ ;; flooded by warnings about those vars `body' didn't use.
+ (ignore ,@(mapcar #'car bindings))
+ ,@body)))
(put 'with-parsed-tramp-file-name 'lisp-indent-function 2)
(put 'with-parsed-tramp-file-name 'edebug-form-spec '(form symbolp body))
If LEVEL does not fit for visible messages, there are only traces
without a visible progress reporter."
(declare (indent 3) (debug t))
- `(let ((result "failed")
- pr tm)
+ `(progn
(tramp-message ,vec ,level "%s..." ,message)
- ;; We start a pulsing progress reporter after 3 seconds. Feature
- ;; introduced in Emacs 24.1.
- (when (and tramp-message-show-message
- ;; Display only when there is a minimum level.
- (<= ,level (min tramp-verbose 3)))
- (ignore-errors
- (setq pr (tramp-compat-funcall 'make-progress-reporter ,message)
- tm (when pr
- (run-at-time 3 0.1 'tramp-progress-reporter-update pr)))))
- (unwind-protect
- ;; Execute the body.
- (prog1 (progn ,@body) (setq result "done"))
- ;; Stop progress reporter.
- (if tm (tramp-compat-funcall 'cancel-timer tm))
- (tramp-message ,vec ,level "%s...%s" ,message result))))
+ (let ((cookie "failed")
+ (tm
+ ;; We start a pulsing progress reporter after 3 seconds. Feature
+ ;; introduced in Emacs 24.1.
+ (when (and tramp-message-show-message
+ ;; Display only when there is a minimum level.
+ (<= ,level (min tramp-verbose 3)))
+ (ignore-errors
+ (let ((pr (tramp-compat-funcall
+ #'make-progress-reporter ,message)))
+ (when pr
+ (run-at-time 3 0.1
+ #'tramp-progress-reporter-update pr)))))))
+ (unwind-protect
+ ;; Execute the body.
+ (prog1 (progn ,@body) (setq cookie "done"))
+ ;; Stop progress reporter.
+ (if tm (tramp-compat-funcall 'cancel-timer tm))
+ (tramp-message ,vec ,level "%s...%s" ,message cookie)))))
(tramp-compat-font-lock-add-keywords
'emacs-lisp-mode '("\\<with-tramp-progress-reporter\\>"))
(replace-match "/" nil t name)
name)))
-(defun tramp-cleanup (vec)
- "Cleanup connection VEC, but keep the debug buffer."
- (with-current-buffer (tramp-get-debug-buffer vec)
- ;; Keep the debug buffer.
- (rename-buffer
- (generate-new-buffer-name tramp-temp-buffer-name) 'unique)
- (tramp-cleanup-connection vec)
- (if (= (point-min) (point-max))
- (kill-buffer nil)
- (rename-buffer (tramp-debug-buffer-name vec) 'unique))
- ;; We call `tramp-get-buffer' in order to keep the debug buffer.
- (tramp-get-buffer vec)))
-
;;; Config Manipulation Functions:
;;;###tramp-autoload
(tramp-message
v 1 "Suppress received in operation %s"
(append (list operation) args))
- (tramp-cleanup v)
+ (tramp-cleanup-connection v t)
(tramp-run-real-handler operation args)))
(t result)))
tramp-prefix-ipv6-regexp
"\\(" tramp-completion-ipv6-regexp x-nil "\\)$")
nil 1 2 nil))
- ;; "/method:user" "/[method/user" "/method://user"
+ ;; "/method:user" "/[method/user"
(tramp-completion-file-name-structure7
(list (concat tramp-prefix-regexp
"\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
"\\(" tramp-user-regexp x-nil "\\)$")
1 2 nil nil))
- ;; "/method:host" "/[method/host" "/method://host"
+ ;; "/method:host" "/[method/host"
(tramp-completion-file-name-structure8
(list (concat tramp-prefix-regexp
"\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
"\\(" tramp-host-regexp x-nil "\\)$")
1 nil 2 nil))
- ;; "/method:[ipv6" "/[method/ipv6" "/method://[ipv6"
+ ;; "/method:[ipv6" "/[method/ipv6"
(tramp-completion-file-name-structure9
(list (concat tramp-prefix-regexp
"\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
tramp-prefix-ipv6-regexp
"\\(" tramp-completion-ipv6-regexp x-nil "\\)$")
1 nil 2 nil))
- ;; "/method:user@host" "/[method/user@host" "/method://user@host"
+ ;; "/method:user@host" "/[method/user@host"
(tramp-completion-file-name-structure10
(list (concat tramp-prefix-regexp
"\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
"\\(" tramp-user-regexp "\\)" tramp-postfix-user-regexp
"\\(" tramp-host-regexp x-nil "\\)$")
1 2 3 nil))
- ;; "/method:user@[ipv6" "/[method/user@ipv6" "/method://user@[ipv6"
+ ;; "/method:user@[ipv6" "/[method/user@ipv6"
(tramp-completion-file-name-structure11
(list (concat tramp-prefix-regexp
"\\(" tramp-method-regexp "\\)" tramp-postfix-method-regexp
"\\(" tramp-user-regexp "\\)" tramp-postfix-user-regexp
tramp-prefix-ipv6-regexp
"\\(" tramp-completion-ipv6-regexp x-nil "\\)$")
- 1 2 3 nil))
- ;; "/method: "/method:/"
- (tramp-completion-file-name-structure12
- (list
- (if (equal tramp-syntax 'url)
- (concat tramp-prefix-regexp
- "\\(" tramp-method-regexp "\\)"
- "\\(" (substring tramp-postfix-method-regexp 0 1)
- "\\|" (substring tramp-postfix-method-regexp 1 2) "\\)"
- "\\(" "\\)$")
- ;; Should not match if not URL syntax.
- (concat tramp-prefix-regexp "/$"))
- 1 3 nil nil))
- ;; "/method: "/method:/"
- (tramp-completion-file-name-structure13
- (list
- (if (equal tramp-syntax 'url)
- (concat tramp-prefix-regexp
- "\\(" tramp-method-regexp "\\)"
- "\\(" (substring tramp-postfix-method-regexp 0 1)
- "\\|" (substring tramp-postfix-method-regexp 1 2) "\\)"
- "\\(" "\\)$")
- ;; Should not match if not URL syntax.
- (concat tramp-prefix-regexp "/$"))
- 1 nil 3 nil)))
+ 1 2 3 nil)))
(mapc (lambda (structure)
(add-to-list 'result
tramp-completion-file-name-structure9
tramp-completion-file-name-structure10
tramp-completion-file-name-structure11
- tramp-completion-file-name-structure12
- tramp-completion-file-name-structure13
tramp-file-name-structure))
(delq nil result)))
(when p
(if (yes-or-no-p "A command is running. Kill it? ")
(ignore-errors (kill-process p))
- (tramp-compat-user-error "Shell command in progress")))
+ (tramp-user-error p "Shell command in progress")))
(if current-buffer-p
(progn
(defun tramp-handle-substitute-in-file-name (filename)
"Like `substitute-in-file-name' for Tramp files.
-\"//\" and \"/~\" substitute only in the local filename part.
-If the URL Tramp syntax is chosen, \"//\" as method delimiter and \"/~\" at
-beginning of local filename are not substituted."
+\"//\" and \"/~\" substitute only in the local filename part."
;; First, we must replace environment variables.
(setq filename (tramp-replace-environment-variables filename))
(with-parsed-tramp-file-name filename nil
- (if (equal tramp-syntax 'url)
- ;; We need to check localname only. The other parts cannot contain
- ;; "//" or "/~".
- (if (and (> (length localname) 1)
- (or (string-match "//" localname)
- (string-match "/~" localname 1)))
- (tramp-run-real-handler 'substitute-in-file-name (list filename))
- (tramp-make-tramp-file-name
- (when method (substitute-in-file-name method))
- (when user (substitute-in-file-name user))
- (when host (substitute-in-file-name host))
- (when localname
- (tramp-run-real-handler
- 'substitute-in-file-name (list localname)))))
- ;; Ignore in LOCALNAME everything before "//" or "/~".
- (when (and (stringp localname) (string-match ".+?/\\(/\\|~\\)" localname))
- (setq filename
- (concat (file-remote-p filename)
- (replace-match "\\1" nil nil localname)))
- ;; "/m:h:~" does not work for completion. We use "/m:h:~/".
- (when (string-match "~$" filename)
- (setq filename (concat filename "/"))))
- (tramp-run-real-handler 'substitute-in-file-name (list filename)))))
+ ;; Ignore in LOCALNAME everything before "//" or "/~".
+ (when (and (stringp localname) (string-match ".+?/\\(/\\|~\\)" localname))
+ (setq filename
+ (concat (file-remote-p filename)
+ (replace-match "\\1" nil nil localname)))
+ ;; "/m:h:~" does not work for completion. We use "/m:h:~/".
+ (when (string-match "~$" filename)
+ (setq filename (concat filename "/"))))
+ (tramp-run-real-handler 'substitute-in-file-name (list filename))))
(defun tramp-handle-unhandled-file-name-directory (_filename)
"Like `unhandled-file-name-directory' for Tramp files."
;;; Auto saving to a special directory:
+(defun tramp-handle-make-auto-save-file-name ()
+ "Like `make-auto-save-file-name' for Tramp files.
+Returns a file name in `tramp-auto-save-directory' for autosaving this file."
+ (let ((tramp-auto-save-directory tramp-auto-save-directory)
+ (buffer-file-name
+ (tramp-subst-strs-in-string
+ '(("_" . "|")
+ ("/" . "_a")
+ (":" . "_b")
+ ("|" . "__")
+ ("[" . "_l")
+ ("]" . "_r"))
+ (buffer-file-name))))
+ ;; File name must be unique. This is ensured with Emacs 22 (see
+ ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for
+ ;; all other cases we must do it ourselves.
+ (when (boundp 'auto-save-file-name-transforms)
+ (mapc
+ (lambda (x)
+ (when (and (string-match (car x) buffer-file-name)
+ (not (car (cddr x))))
+ (setq tramp-auto-save-directory
+ (or tramp-auto-save-directory
+ (tramp-compat-temporary-file-directory)))))
+ (symbol-value 'auto-save-file-name-transforms)))
+ ;; Create directory.
+ (when tramp-auto-save-directory
+ (setq buffer-file-name
+ (expand-file-name buffer-file-name tramp-auto-save-directory))
+ (unless (file-exists-p tramp-auto-save-directory)
+ (make-directory tramp-auto-save-directory t)))
+ ;; Run plain `make-auto-save-file-name'. There might be an advice when
+ ;; it is not a magic file name operation (since Emacs 22).
+ ;; We must deactivate it temporarily.
+ (if (not (ad-is-active 'make-auto-save-file-name))
+ (tramp-run-real-handler 'make-auto-save-file-name nil)
+ ;; else
+ (ad-deactivate 'make-auto-save-file-name)
+ (prog1
+ (tramp-run-real-handler 'make-auto-save-file-name nil)
+ (ad-activate 'make-auto-save-file-name)))))
+
(unless (tramp-exists-file-name-handler 'make-auto-save-file-name)
(defadvice make-auto-save-file-name
(around tramp-advice-make-auto-save-file-name () activate)
(defmacro nxml-debug-clear-inside (start end)
(when nxml-debug
- `(loop for overlay in (overlays-in ,start ,end)
+ `(cl-loop for overlay in (overlays-in ,start ,end)
if (overlay-get overlay 'nxml-inside-debug)
do (delete-overlay overlay)
finally (nxml-debug-change "nxml-clear-inside" ,start ,end))))
;;;###autoload
-(defun pr-customize (&rest ignore)
+(defun pr-customize (&rest _ignore)
"Customization of the `printing' group."
(interactive)
(customize-group 'printing))
;;;###autoload
-(defun lpr-customize (&rest ignore)
+(defun lpr-customize (&rest _ignore)
"Customization of the `lpr' group."
(interactive)
(customize-group 'lpr))
;;;###autoload
-(defun pr-help (&rest ignore)
+(defun pr-help (&rest _ignore)
"Help for the printing package."
(interactive)
(pr-show-setup pr-help-message "*Printing Help*"))
;;;###autoload
-(defun pr-show-ps-setup (&rest ignore)
+(defun pr-show-ps-setup (&rest _ignore)
"Show current ps-print settings."
(interactive)
(pr-show-setup (ps-setup) "*PS Setup*"))
;;;###autoload
-(defun pr-show-pr-setup (&rest ignore)
+(defun pr-show-pr-setup (&rest _ignore)
"Show current printing settings."
(interactive)
(pr-show-setup (pr-setup) "*PR Setup*"))
;;;###autoload
-(defun pr-show-lpr-setup (&rest ignore)
+(defun pr-show-lpr-setup (&rest _ignore)
"Show current lpr settings."
(interactive)
(pr-show-setup (lpr-setup) "*LPR Setup*"))
(pr-insert-checkbox
"\n "
'pr-i-region
- #'(lambda (widget &rest ignore)
+ #'(lambda (widget &rest _ignore)
(let ((region-p (pr-interface-save
(ps-mark-active-p))))
(cond ((null (widget-value widget)) ; widget is nil
(pr-insert-checkbox
" "
'pr-i-mode
- #'(lambda (widget &rest ignore)
+ #'(lambda (widget &rest _ignore)
(let ((mode-p (pr-interface-save
(pr-mode-alist-p))))
(cond
(widget-create 'regexp
:size 58
:format "\n File Regexp : %v\n"
- :notify (lambda (widget &rest ignore)
+ :notify (lambda (widget &rest _ignore)
(setq pr-i-regexp (widget-value widget)))
pr-i-regexp)
;; 1b. Directory: List Directory Entry
(pr-insert-checkbox
" "
'pr-i-despool
- #'(lambda (widget &rest ignore)
+ #'(lambda (widget &rest _ignore)
(if pr-spool-p
(setq pr-i-despool (not pr-i-despool))
(ding)
'integer
:size 3
:format "\n N-Up : %v"
- :notify (lambda (widget &rest ignore)
+ :notify (lambda (widget &rest _ignore)
(let ((value (if (string= (widget-apply widget :value-get) "")
0
(widget-value widget))))
;; 4. Settings:
;; 4. Settings: Landscape Auto Region Verbose
(pr-insert-checkbox "\n\n " 'ps-landscape-mode
- #'(lambda (&rest ignore)
+ #'(lambda (&rest _ignore)
(setq ps-landscape-mode (not ps-landscape-mode)
pr-file-landscape ps-landscape-mode))
" Landscape ")
(pr-insert-toggle 'ps-zebra-stripes " Zebra Stripes")
(pr-insert-checkbox " "
'pr-spool-p
- #'(lambda (&rest ignore)
+ #'(lambda (&rest _ignore)
(setq pr-spool-p (not pr-spool-p))
(unless pr-spool-p
(setq pr-i-despool nil)
;; 4. Settings: Duplex Print with faces
(pr-insert-checkbox "\n "
'ps-spool-duplex
- #'(lambda (&rest ignore)
+ #'(lambda (&rest _ignore)
(setq ps-spool-duplex (not ps-spool-duplex)
pr-file-duplex ps-spool-duplex))
" Duplex ")
;; 4. Settings: Tumble Print via Ghostscript
(pr-insert-checkbox "\n "
'ps-spool-tumble
- #'(lambda (&rest ignore)
+ #'(lambda (&rest _ignore)
(setq ps-spool-tumble (not ps-spool-tumble)
pr-file-tumble ps-spool-tumble))
" Tumble ")
;; 5. Customize:
(pr-insert-italic "\n\nCustomize : " 2 11)
(pr-insert-button 'pr-customize "printing" " ")
- (pr-insert-button #'(lambda (&rest ignore) (ps-print-customize))
+ (pr-insert-button #'(lambda (&rest _ignore) (ps-print-customize))
"ps-print" " ")
(pr-insert-button 'lpr-customize "lpr"))
(pr-insert-button 'pr-kill-help "Kill All Printing Help Buffer"))
-(defun pr-kill-help (&rest ignore)
+(defun pr-kill-help (&rest _ignore)
"Kill all printing help buffer."
(interactive)
(let ((help '("*Printing Interface Help*" "*Printing Help*"
(recenter (- (window-height) 2)))
-(defun pr-interface-quit (&rest ignore)
+(defun pr-interface-quit (&rest _ignore)
"Kill the printing buffer interface and quit."
(interactive)
(kill-buffer pr-buffer-name)
(set-window-configuration pr-i-window-configuration))
-(defun pr-interface-help (&rest ignore)
+(defun pr-interface-help (&rest _ignore)
"printing buffer interface help."
(interactive)
(pr-show-setup pr-interface-help-message "*Printing Interface Help*"))
-(defun pr-interface-txt-print (&rest ignore)
+(defun pr-interface-txt-print (&rest _ignore)
"Print using lpr package."
(interactive)
(condition-case data
(message "%s" (error-message-string data)))))
-(defun pr-interface-printify (&rest ignore)
+(defun pr-interface-printify (&rest _ignore)
"Printify a buffer."
(interactive)
(condition-case data
(message "%s" (error-message-string data)))))
-(defun pr-interface-ps-print (&rest ignore)
+(defun pr-interface-ps-print (&rest _ignore)
"Print using ps-print package."
(interactive)
(pr-interface-ps 'pr-despool-ps-print 'pr-ps-directory-ps-print
'pr-ps-buffer-ps-print))
-(defun pr-interface-preview (&rest ignore)
+(defun pr-interface-preview (&rest _ignore)
"Preview a PostScript file."
(interactive)
(pr-interface-ps 'pr-despool-preview 'pr-ps-directory-preview
(error "Please specify be a readable directory")))
-(defun pr-interface-directory (widget &rest ignore)
+(defun pr-interface-directory (widget &rest _ignore)
(and pr-buffer-verbose
(message "You can use M-TAB or ESC TAB for file completion"))
(let ((dir (widget-value widget)))
(setq pr-i-directory dir))))
-(defun pr-interface-infile (widget &rest ignore)
+(defun pr-interface-infile (widget &rest _ignore)
(and pr-buffer-verbose
(message "You can use M-TAB or ESC TAB for file completion"))
(let ((file (widget-value widget)))
(setq pr-i-ps-file file))))
-(defun pr-interface-outfile (widget &rest ignore)
+(defun pr-interface-outfile (widget &rest _ignore)
(setq pr-i-answer-yes nil)
(and pr-buffer-verbose
(message "You can use M-TAB or ESC TAB for file completion"))
(defun pr-insert-toggle (var-sym label)
(widget-create 'checkbox
- :notify `(lambda (&rest ignore)
+ :notify `(lambda (&rest _ignore)
(setq ,var-sym (not ,var-sym)))
(symbol-value var-sym))
(widget-insert label))
:format "%v"
:inline t
:value ,var-sym
- :notify (lambda (widget &rest ignore)
+ :notify (lambda (widget &rest _ignore)
(setq ,var-sym (widget-value widget))
,@body)
:void '(choice-item :format "%[%t%]"
'radio-button
:format " %[%v%]"
:value (eq ,var-sym (quote ,sym))
- :notify (lambda (&rest ignore)
+ :notify (lambda (&rest _ignore)
(setq ,var-sym (quote ,sym))
(pr-update-radio-button (quote ,var-sym)))))))
(put var-sym 'pr-widget-list (cons (cons wid sym) wid-list))))
)
(kill-buffer nil))))
- (set 'ada-xref-runtime-library-specs-path
+ (setq ada-xref-runtime-library-specs-path
(reverse ada-xref-runtime-library-specs-path))
- (set 'ada-xref-runtime-library-ali-path
+ (setq ada-xref-runtime-library-ali-path
(reverse ada-xref-runtime-library-ali-path))
))
(while dirs
(if (file-directory-p (car dirs))
- (set 'list (append list (file-name-all-completions string (car dirs)))))
- (set 'dirs (cdr dirs)))
+ (setq list (append list (file-name-all-completions string (car dirs)))))
+ (setq dirs (cdr dirs)))
(cond ((equal flag 'lambda)
(assoc string list))
(flag
((file-exists-p first-choice)
;; filename.adp
- (set 'selected first-choice))
+ (setq selected first-choice))
((= (length prj-files) 1)
;; Exactly one project file was found in the current directory
- (set 'selected (car prj-files)))
+ (setq selected (car prj-files)))
((and (> (length prj-files) 1) (not no-user-question))
;; multiple project files in current directory, ask the user
(> choice (length prj-files)))
(setq choice (string-to-number
(read-from-minibuffer "Enter No. of your choice: "))))
- (set 'selected (nth (1- choice) prj-files))))
+ (setq selected (nth (1- choice) prj-files))))
((= (length prj-files) 0)
;; No project file in the current directory; ask user
(concat "project file [" ada-last-prj-file "]:")
nil ada-last-prj-file))
(unless (string= ada-last-prj-file "")
- (set 'selected ada-last-prj-file))))
+ (setq selected ada-last-prj-file))))
)))
(or selected "default.adp")
(setq prj-file (expand-file-name prj-file))
(if (string= (file-name-extension prj-file) "gpr")
- (set 'project (ada-gnat-parse-gpr project prj-file))
+ (setq project (ada-gnat-parse-gpr project prj-file))
- (set 'project (ada-parse-prj-file-1 prj-file project))
+ (setq project (ada-parse-prj-file-1 prj-file project))
)
;; Store the project properties
(substitute-in-file-name (match-string 2)))))
((string= (match-string 1) "build_dir")
- (set 'project
+ (setq project
(plist-put project 'build_dir
(file-name-as-directory (match-string 2)))))
(t
;; any other field in the file is just copied
- (set 'project (plist-put project
+ (setq project (plist-put project
(intern (match-string 1))
(match-string 2))))))
(let ((sep (plist-get project 'ada_project_path_sep)))
(setq ada_project_path (reverse ada_project_path))
(setq ada_project_path (mapconcat 'identity ada_project_path sep))
- (set 'project (plist-put project 'ada_project_path ada_project_path))
+ (setq project (plist-put project 'ada_project_path ada_project_path))
;; env var needed now for ada-gnat-parse-gpr
(setenv "ADA_PROJECT_PATH" ada_project_path)))
- (if debug_post_cmd (set 'project (plist-put project 'debug_post_cmd (reverse debug_post_cmd))))
- (if debug_pre_cmd (set 'project (plist-put project 'debug_pre_cmd (reverse debug_pre_cmd))))
- (if casing (set 'project (plist-put project 'casing (reverse casing))))
- (if check_cmd (set 'project (plist-put project 'check_cmd (reverse check_cmd))))
- (if comp_cmd (set 'project (plist-put project 'comp_cmd (reverse comp_cmd))))
- (if make_cmd (set 'project (plist-put project 'make_cmd (reverse make_cmd))))
- (if run_cmd (set 'project (plist-put project 'run_cmd (reverse run_cmd))))
+ (if debug_post_cmd (setq project (plist-put project 'debug_post_cmd (reverse debug_post_cmd))))
+ (if debug_pre_cmd (setq project (plist-put project 'debug_pre_cmd (reverse debug_pre_cmd))))
+ (if casing (setq project (plist-put project 'casing (reverse casing))))
+ (if check_cmd (setq project (plist-put project 'check_cmd (reverse check_cmd))))
+ (if comp_cmd (setq project (plist-put project 'comp_cmd (reverse comp_cmd))))
+ (if make_cmd (setq project (plist-put project 'make_cmd (reverse make_cmd))))
+ (if run_cmd (setq project (plist-put project 'run_cmd (reverse run_cmd))))
(if gpr_file
(progn
- (set 'project (ada-gnat-parse-gpr project gpr_file))
+ (setq project (ada-gnat-parse-gpr project gpr_file))
;; append Ada source and object directories to others from Emacs project file
(setq src_dir (append (plist-get project 'src_dir) src_dir))
(setq obj_dir (append (plist-get project 'obj_dir) obj_dir))
(ada-initialize-runtime-library (or (ada-xref-get-project-field 'cross_prefix) ""))
;;)
- (if obj_dir (set 'project (plist-put project 'obj_dir (reverse obj_dir))))
- (if src_dir (set 'project (plist-put project 'src_dir (reverse src_dir))))
+ (if obj_dir (setq project (plist-put project 'obj_dir (reverse obj_dir))))
+ (if src_dir (setq project (plist-put project 'src_dir (reverse src_dir))))
project
))
(if old-contents
(progn
(goto-char 1)
- (set 'buffer-read-only nil)
+ (setq buffer-read-only nil)
(insert old-contents)
- (set 'buffer-read-only t)
+ (setq buffer-read-only t)
(goto-char (point-max)))))
)
)
(objects (getenv "ADA_OBJECTS_PATH"))
(build-dir (ada-xref-get-project-field 'build_dir)))
(if include
- (set 'include (concat path-separator include)))
+ (setq include (concat path-separator include)))
(if objects
- (set 'objects (concat path-separator objects)))
+ (setq objects (concat path-separator objects)))
(cons
(concat "ADA_INCLUDE_PATH="
(mapconcat (lambda(x) (expand-file-name x build-dir))
;; Guess the command if it wasn't specified
(if (not command)
- (set 'command (list (file-name-sans-extension (buffer-name)))))
+ (setq command (list (file-name-sans-extension (buffer-name)))))
;; Modify the command to run remotely
(setq command (ada-remote (mapconcat 'identity command
;; Run the command
(with-current-buffer (get-buffer-create "*run*")
- (set 'buffer-read-only nil)
+ (setq buffer-read-only nil)
(erase-buffer)
(start-process "run" (current-buffer) shell-file-name
;; If the command was not given in the project file, start a bare gdb
(if (not cmd)
- (set 'cmd (concat ada-prj-default-debugger
+ (setq cmd (concat ada-prj-default-debugger
" "
(or executable-name
(file-name-sans-extension (buffer-file-name))))))
;; chance to fully manage it. Then it works fine with Enlightenment
;; as well
(let ((frame (make-frame '((visibility . nil)))))
- (set 'cmd (concat
+ (setq cmd (concat
cmd " --editor-window="
(cdr (assoc 'outer-window-id (frame-parameters frame)))))
(select-frame frame)))
;; Add a -fullname switch
;; Use the remote machine
- (set 'cmd (ada-remote (concat cmd " -fullname ")))
+ (setq cmd (ada-remote (concat cmd " -fullname ")))
;; Ask for confirmation if required
(if (or arg ada-xref-confirm-compile)
- (set 'cmd (read-from-minibuffer "enter command to debug: " cmd)))
+ (setq cmd (read-from-minibuffer "enter command to debug: " cmd)))
(let ((old-comint-exec (symbol-function 'comint-exec)))
;; FIXME: This is evil but luckily a nop under Emacs-21.3.50 ! -stef
(fset 'gud-gdb-massage-args (lambda (_file args) args))
- (set 'pre-cmd (mapconcat 'identity pre-cmd ada-command-separator))
+ (setq pre-cmd (mapconcat 'identity pre-cmd ada-command-separator))
(if (not (equal pre-cmd ""))
(setq pre-cmd (concat pre-cmd ada-command-separator)))
- (set 'post-cmd (mapconcat 'identity post-cmd "\n"))
+ (setq post-cmd (mapconcat 'identity post-cmd "\n"))
(if post-cmd
- (set 'post-cmd (concat post-cmd "\n")))
+ (setq post-cmd (concat post-cmd "\n")))
;; Temporarily replaces the definition of `comint-exec' so that we
`(lambda (buffer name command startfile switches)
(let (compilation-buffer-name-function)
(save-excursion
- (set 'compilation-buffer-name-function
+ (setq compilation-buffer-name-function
(lambda(x) (buffer-name buffer)))
(compile (ada-quote-cmd
(concat ,pre-cmd
"Search for FILE in DIR-LIST."
(let (found)
(while (and (not found) dir-list)
- (set 'found (concat (file-name-as-directory (car dir-list))
+ (setq found (concat (file-name-as-directory (car dir-list))
(file-name-nondirectory file)))
(unless (file-exists-p found)
- (set 'found nil))
- (set 'dir-list (cdr dir-list)))
+ (setq found nil))
+ (setq dir-list (cdr dir-list)))
found))
(defun ada-find-ali-file-in-dir (file)
(while specs
(if (string-match (concat (regexp-quote (car specs)) "$")
file)
- (set 'is-spec t))
- (set 'specs (cdr specs)))))
+ (setq is-spec t))
+ (setq specs (cdr specs)))))
(if is-spec
- (set 'ali-file-name
+ (setq ali-file-name
(ada-find-ali-file-in-dir
(concat (file-name-base (ada-other-file-name)) ".ali"))))
(while (and (not ali-file-name)
(string-match "^\\(.*\\)[.-][^.-]*" parent-name))
- (set 'parent-name (match-string 1 parent-name))
- (set 'ali-file-name (ada-find-ali-file-in-dir
+ (setq parent-name (match-string 1 parent-name))
+ (setq ali-file-name (ada-find-ali-file-in-dir
(concat parent-name ".ali")))
)
ali-file-name)))
(if (and (= (char-before) ?\")
(= (char-after (+ (length (match-string 0)) (point))) ?\"))
(forward-char -1))
- (set 'identifier (regexp-quote (concat "\"" (match-string 0) "\""))))
+ (setq identifier (regexp-quote (concat "\"" (match-string 0) "\""))))
(if (ada-in-string-p)
(error "Inside string or character constant"))
(if (looking-at (concat ada-keywords "[^a-zA-Z_]"))
(error "No cross-reference available for reserved keyword"))
(if (looking-at "[a-zA-Z0-9_]+")
- (set 'identifier (match-string 0))
+ (setq identifier (match-string 0))
(error "No identifier around")))
;; Build the identlist
- (set 'identlist (ada-make-identlist))
+ (setq identlist (ada-make-identlist))
(ada-set-name identlist (downcase identifier))
(ada-set-line identlist
(number-to-string (count-lines 1 (point))))
(concat "^X [0-9]+ " (file-name-nondirectory (ada-file-of identlist)))
nil t)
(let ((bound (save-excursion (re-search-forward "^X " nil t))))
- (set 'declaration-found
+ (setq declaration-found
(re-search-forward
(concat "^" (ada-line-of identlist)
"." (ada-column-of identlist)
;; Since we already know the number of the file, search for a direct
;; reference to it
(goto-char (point-min))
- (set 'declaration-found t)
+ (setq declaration-found t)
(ada-set-ali-index
identlist
(number-to-string (ada-find-file-number-in-ali
;; If still not found, then either the declaration is unknown
;; or the source file has been modified since the ali file was
;; created
- (set 'declaration-found nil)
+ (setq declaration-found nil)
)
)
(beginning-of-line))
(unless (looking-at (concat "[0-9]+.[0-9]+[ *]"
(ada-name-of identlist) "[ <{=\(\[]"))
- (set 'declaration-found nil))))
+ (setq declaration-found nil))))
;; Still no success ! The ali file must be too old, and we need to
;; use a basic algorithm based on guesses. Note that this only happens
;; automatically
(unless declaration-found
(if (ada-xref-find-in-modified-ali identlist)
- (set 'declaration-found t)
+ (setq declaration-found t)
;; No more idea to find the declaration. Give up
(progn
(kill-buffer ali-buffer)
(forward-line 1)
(beginning-of-line)
(while (looking-at "^\\.\\(.*\\)")
- (set 'current-line (concat current-line (match-string 1)))
+ (setq current-line (concat current-line (match-string 1)))
(forward-line 1))
)
(goto-char (point-max))
(while (re-search-backward my-regexp nil t)
(save-excursion
- (set 'line-ali (count-lines 1 (point)))
+ (setq line-ali (count-lines 1 (point)))
(beginning-of-line)
;; have a look at the line and column numbers
(if (looking-at "^\\([0-9]+\\).\\([0-9]+\\)[ *]")
;; Get all the possible locations
(string-match "^\\([0-9]+\\)[a-zA-Z+*]\\([0-9]+\\)[ *]" ali-line)
- (set 'locations (list (list (match-string 1 ali-line) ;; line
+ (setq locations (list (list (match-string 1 ali-line) ;; line
(match-string 2 ali-line) ;; column
(ada-declare-file-of identlist))))
(while (string-match "\\([0-9]+\\)[bc]\\(<[^>]+>\\)?\\([0-9]+\\)"
(goto-char (point-min))
(re-search-forward "^D \\([a-zA-Z0-9_.-]+\\)" nil t
(string-to-number file-number))
- (set 'file (match-string 1))
+ (setq file (match-string 1))
)
;; Else get the nearest file
- (set 'file (ada-declare-file-of identlist)))
+ (setq file (ada-declare-file-of identlist)))
- (set 'locations (append locations (list (list line col file)))))
+ (setq locations (append locations (list (list line col file)))))
;; Add the specs at the end again, so that from the last body we go to
;; the specs
- (set 'locations (append locations (list (car locations))))
+ (setq locations (append locations (list (car locations))))
;; Find the new location we want to go to.
;; If we are on none of the locations listed, we simply go to the specs.
col (nth 1 locations)
file (nth 2 locations)
locations nil)
- (set 'locations (cdr locations))))
+ (setq locations (cdr locations))))
;; Find the file in the source path
- (set 'file (ada-get-ada-file-name file (ada-file-of identlist)))
+ (setq file (ada-get-ada-file-name file (ada-file-of identlist)))
;; Kill the .ali buffer
(kill-buffer (current-buffer))
" "
(shell-quote-argument (file-name-as-directory (car dirs)))
"*.ali")))
- (set 'dirs (cdr dirs)))
+ (setq dirs (cdr dirs)))
;; Now parse the output
- (set 'case-fold-search t)
+ (setq case-fold-search t)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(save-excursion
(setq line (match-string 1)
column (match-string 2))
(re-search-backward "^X [0-9]+ \\(.*\\)$")
- (set 'file (list (match-string 1) line column))
+ (setq file (list (match-string 1) line column))
;; There could be duplicate choices, because of the structure
;; of the .ali files
(unless (member file list)
- (set 'list (append list (list file))))))))
+ (setq list (append list (list file))))))))
;; Current buffer is still "*grep*"
(kill-buffer "*grep*")
;; Only one choice => Do the cross-reference
((= (length list) 1)
- (set 'file (ada-find-src-file-in-dir (caar list)))
+ (setq file (ada-find-src-file-in-dir (caar list)))
(if file
(ada-xref-change-buffer file
(string-to-number (nth 1 (car list)))
(string-to-number
(read-from-minibuffer "Enter No. of your choice: "))))
)
- (set 'choice (1- choice))
+ (setq choice (1- choice))
(kill-buffer "*choice list*")
- (set 'file (ada-find-src-file-in-dir (car (nth choice list))))
+ (setq file (ada-find-src-file-in-dir (car (nth choice list))))
(if file
(ada-xref-change-buffer file
(string-to-number (nth 1 (nth choice list)))
(if ada-xref-other-buffer
(if other-frame
(find-file-other-frame file)
- (set 'declaration-buffer (find-file-noselect file))
+ (setq declaration-buffer (find-file-noselect file))
(set-buffer declaration-buffer)
(switch-to-buffer-other-window declaration-buffer)
)
(set-buffer-modified-p nil)))))))
(put 'save-buffer-state-x 'lisp-indent-function 0)
-;; get rid of byte-compile warnings
-(eval-when-compile
- (require 'cc-mode))
-
(defvar outline-level)
(defvar imenu-use-markers)
(defvar imenu-create-index-function)
(defvar bat-mode-syntax-table
(let ((table (make-syntax-table)))
(modify-syntax-entry ?\n ">" table)
+ (modify-syntax-entry ?\" "\"" table)
;; Beware: `w' should not be used for non-alphabetic chars.
(modify-syntax-entry ?~ "_" table)
(modify-syntax-entry ?% "." table)
(cc-bytecomp-defun c-backward-token-1)
(cc-bytecomp-defun c-beginning-of-statement-1)
(cc-bytecomp-defun c-backward-sws)
+(cc-bytecomp-defun c-forward-sws)
(defvar awk-mode-syntax-table
(let ((st (make-syntax-table)))
somewhat intentional."
`(progn
(eval-when-compile
- (setq cc-bytecomp-noruntime-functions byte-compile-noruntime-functions)
+ (if (boundp 'byte-compile-noruntime-functions) ; in case load uncompiled
+ (setq cc-bytecomp-noruntime-functions
+ byte-compile-noruntime-functions))
(cc-bytecomp-load (symbol-name ,cc-part)))
;; Hack to suppress spurious "might not be defined at runtime" warnings.
;; The basic issue is that
(c-go-list-forward)
t)))
+(defmacro c-pull-open-brace (ps)
+ ;; Pull the next open brace from PS (which has the form of paren-state),
+ ;; skipping over any brace pairs. Returns NIL when PS is exhausted.
+ `(progn
+ (while (consp (car ,ps))
+ (setq ,ps (cdr ,ps)))
+ (prog1 (car ,ps)
+ (setq ,ps (cdr ,ps)))))
+
(defun c-back-over-member-initializers ()
;; Test whether we are in a C++ member initializer list, and if so, go back
;; to the introducing ":", returning the position of the opening paren of
;; Skip over type decl prefix operators. (Note similar code in
;; `c-font-lock-declarators'.)
- (while (and (looking-at c-type-decl-prefix-key)
- (if (and (c-major-mode-is 'c++-mode)
- (match-beginning 3))
- ;; If the third submatch matches in C++ then
- ;; we're looking at an identifier that's a
- ;; prefix only if it specifies a member pointer.
- (when (setq got-identifier (c-forward-name))
- (if (looking-at "\\(::\\)")
- ;; We only check for a trailing "::" and
- ;; let the "*" that should follow be
- ;; matched in the next round.
- (progn (setq got-identifier nil) t)
- ;; It turned out to be the real identifier,
- ;; so stop.
- nil))
- t))
-
- (if (eq (char-after) ?\()
+ (if (and c-recognize-typeless-decls
+ (equal c-type-decl-prefix-key "\\<\\>"))
+ (when (eq (char-after) ?\()
(progn
(setq paren-depth (1+ paren-depth))
- (forward-char))
- (unless got-prefix-before-parens
- (setq got-prefix-before-parens (= paren-depth 0)))
- (setq got-prefix t)
- (goto-char (match-end 1)))
- (c-forward-syntactic-ws))
+ (forward-char)))
+ (while (and (looking-at c-type-decl-prefix-key)
+ (if (and (c-major-mode-is 'c++-mode)
+ (match-beginning 3))
+ ;; If the third submatch matches in C++ then
+ ;; we're looking at an identifier that's a
+ ;; prefix only if it specifies a member pointer.
+ (when (setq got-identifier (c-forward-name))
+ (if (looking-at "\\(::\\)")
+ ;; We only check for a trailing "::" and
+ ;; let the "*" that should follow be
+ ;; matched in the next round.
+ (progn (setq got-identifier nil) t)
+ ;; It turned out to be the real identifier,
+ ;; so stop.
+ nil))
+ t))
+
+ (if (eq (char-after) ?\()
+ (progn
+ (setq paren-depth (1+ paren-depth))
+ (forward-char))
+ (unless got-prefix-before-parens
+ (setq got-prefix-before-parens (= paren-depth 0)))
+ (setq got-prefix t)
+ (goto-char (match-end 1)))
+ (c-forward-syntactic-ws)))
(setq got-parens (> paren-depth 0))
(back-to-indentation)
(vector (point) open-paren-pos))))))
-(defmacro c-pull-open-brace (ps)
- ;; Pull the next open brace from PS (which has the form of paren-state),
- ;; skipping over any brace pairs. Returns NIL when PS is exhausted.
- `(progn
- (while (consp (car ,ps))
- (setq ,ps (cdr ,ps)))
- (prog1 (car ,ps)
- (setq ,ps (cdr ,ps)))))
-
(defun c-most-enclosing-decl-block (paren-state)
;; Return the buffer position of the most enclosing decl-block brace (in the
;; sense of c-looking-at-decl-block) in the PAREN-STATE structure, or nil if
"\\>")
"")
"\\)")
- (java idl) "\\([\[\(]\\)")
+ java "\\([\[\(\)]\\)"
+ idl "\\([\[\(]\\)")
(c-lang-defvar c-type-decl-suffix-key (c-lang-const c-type-decl-suffix-key)
'dont-doc)
that are preceded by a declaration starting keyword, so
e.g. `c-typeless-decl-kwds' may still be used when it's set to nil."
t nil
- (c c++ objc) t)
+ (c c++ objc java) t)
(c-lang-defvar c-recognize-typeless-decls
(c-lang-const c-recognize-typeless-decls))
(t (error "CC Mode is incompatible with this version of Emacs")))
map))
-(defun c-define-abbrev-table (name defs)
+(defun c-define-abbrev-table (name defs &optional doc)
;; Compatibility wrapper for `define-abbrev' which passes a non-nil
;; sixth argument for SYSTEM-FLAG in emacsen that support it
;; (currently only Emacs >= 21.2).
- (let ((table (or (symbol-value name)
- (progn (define-abbrev-table name nil)
+ (let ((table (or (and (boundp name) (symbol-value name))
+ (progn (condition-case nil
+ (define-abbrev-table name nil doc)
+ (wrong-number-of-arguments ;E.g. Emacs<23.
+ (eval `(defvar ,name nil ,doc))
+ (define-abbrev-table name nil)))
(symbol-value name)))))
(while defs
(condition-case nil
\f
;; Support for C
-;;;###autoload
-(defvar c-mode-syntax-table nil
+(defvar c-mode-syntax-table
+ (funcall (c-lang-const c-make-mode-syntax-table c))
"Syntax table used in c-mode buffers.")
-(or c-mode-syntax-table
- (setq c-mode-syntax-table
- (funcall (c-lang-const c-make-mode-syntax-table c))))
-(defvar c-mode-abbrev-table nil
- "Abbreviation table used in c-mode buffers.")
(c-define-abbrev-table 'c-mode-abbrev-table
'(("else" "else" c-electric-continued-statement 0)
- ("while" "while" c-electric-continued-statement 0)))
+ ("while" "while" c-electric-continued-statement 0))
+ "Abbreviation table used in c-mode buffers.")
-(defvar c-mode-map ()
+(defvar c-mode-map
+ (let ((map (c-make-inherited-keymap)))
+ ;; Add bindings which are only useful for C.
+ (define-key map "\C-c\C-e" 'c-macro-expand)
+ map)
"Keymap used in c-mode buffers.")
-(if c-mode-map
- nil
- (setq c-mode-map (c-make-inherited-keymap))
- ;; add bindings which are only useful for C
- (define-key c-mode-map "\C-c\C-e" 'c-macro-expand)
- )
+
(easy-menu-define c-c-menu c-mode-map "C Mode Commands"
(cons "C" (c-lang-const c-mode-menu c)))
\f
;; Support for C++
-;;;###autoload
-(defvar c++-mode-syntax-table nil
+(defvar c++-mode-syntax-table
+ (funcall (c-lang-const c-make-mode-syntax-table c++))
"Syntax table used in c++-mode buffers.")
-(or c++-mode-syntax-table
- (setq c++-mode-syntax-table
- (funcall (c-lang-const c-make-mode-syntax-table c++))))
-(defvar c++-mode-abbrev-table nil
- "Abbreviation table used in c++-mode buffers.")
(c-define-abbrev-table 'c++-mode-abbrev-table
'(("else" "else" c-electric-continued-statement 0)
("while" "while" c-electric-continued-statement 0)
- ("catch" "catch" c-electric-continued-statement 0)))
+ ("catch" "catch" c-electric-continued-statement 0))
+ "Abbreviation table used in c++-mode buffers.")
-(defvar c++-mode-map ()
+(defvar c++-mode-map
+ (let ((map (c-make-inherited-keymap)))
+ ;; Add bindings which are only useful for C++.
+ (define-key map "\C-c\C-e" 'c-macro-expand)
+ (define-key map "\C-c:" 'c-scope-operator)
+ (define-key map "<" 'c-electric-lt-gt)
+ (define-key map ">" 'c-electric-lt-gt)
+ map)
"Keymap used in c++-mode buffers.")
-(if c++-mode-map
- nil
- (setq c++-mode-map (c-make-inherited-keymap))
- ;; add bindings which are only useful for C++
- (define-key c++-mode-map "\C-c\C-e" 'c-macro-expand)
- (define-key c++-mode-map "\C-c:" 'c-scope-operator)
- (define-key c++-mode-map "<" 'c-electric-lt-gt)
- (define-key c++-mode-map ">" 'c-electric-lt-gt))
(easy-menu-define c-c++-menu c++-mode-map "C++ Mode Commands"
(cons "C++" (c-lang-const c-mode-menu c++)))
\f
;; Support for Objective-C
-;;;###autoload
-(defvar objc-mode-syntax-table nil
+(defvar objc-mode-syntax-table
+ (funcall (c-lang-const c-make-mode-syntax-table objc))
"Syntax table used in objc-mode buffers.")
-(or objc-mode-syntax-table
- (setq objc-mode-syntax-table
- (funcall (c-lang-const c-make-mode-syntax-table objc))))
-(defvar objc-mode-abbrev-table nil
- "Abbreviation table used in objc-mode buffers.")
(c-define-abbrev-table 'objc-mode-abbrev-table
'(("else" "else" c-electric-continued-statement 0)
- ("while" "while" c-electric-continued-statement 0)))
+ ("while" "while" c-electric-continued-statement 0))
+ "Abbreviation table used in objc-mode buffers.")
-(defvar objc-mode-map ()
+(defvar objc-mode-map
+ (let ((map (c-make-inherited-keymap)))
+ ;; Add bindings which are only useful for Objective-C.
+ (define-key map "\C-c\C-e" 'c-macro-expand)
+ map)
"Keymap used in objc-mode buffers.")
-(if objc-mode-map
- nil
- (setq objc-mode-map (c-make-inherited-keymap))
- ;; add bindings which are only useful for Objective-C
- (define-key objc-mode-map "\C-c\C-e" 'c-macro-expand))
(easy-menu-define c-objc-menu objc-mode-map "ObjC Mode Commands"
(cons "ObjC" (c-lang-const c-mode-menu objc)))
\f
;; Support for Java
-;;;###autoload
-(defvar java-mode-syntax-table nil
+(defvar java-mode-syntax-table
+ (funcall (c-lang-const c-make-mode-syntax-table java))
"Syntax table used in java-mode buffers.")
-(or java-mode-syntax-table
- (setq java-mode-syntax-table
- (funcall (c-lang-const c-make-mode-syntax-table java))))
-(defvar java-mode-abbrev-table nil
- "Abbreviation table used in java-mode buffers.")
(c-define-abbrev-table 'java-mode-abbrev-table
'(("else" "else" c-electric-continued-statement 0)
("while" "while" c-electric-continued-statement 0)
("catch" "catch" c-electric-continued-statement 0)
- ("finally" "finally" c-electric-continued-statement 0)))
+ ("finally" "finally" c-electric-continued-statement 0))
+ "Abbreviation table used in java-mode buffers.")
-(defvar java-mode-map ()
+(defvar java-mode-map
+ (let ((map (c-make-inherited-keymap)))
+ ;; Add bindings which are only useful for Java.
+ map)
"Keymap used in java-mode buffers.")
-(if java-mode-map
- nil
- (setq java-mode-map (c-make-inherited-keymap))
- ;; add bindings which are only useful for Java
- )
;; Regexp trying to describe the beginning of a Java top-level
;; definition. This is not used by CC Mode, nor is it maintained
\f
;; Support for CORBA's IDL language
-;;;###autoload
-(defvar idl-mode-syntax-table nil
+(defvar idl-mode-syntax-table
+ (funcall (c-lang-const c-make-mode-syntax-table idl))
"Syntax table used in idl-mode buffers.")
-(or idl-mode-syntax-table
- (setq idl-mode-syntax-table
- (funcall (c-lang-const c-make-mode-syntax-table idl))))
-(defvar idl-mode-abbrev-table nil
+(c-define-abbrev-table 'idl-mode-abbrev-table nil
"Abbreviation table used in idl-mode buffers.")
-(c-define-abbrev-table 'idl-mode-abbrev-table nil)
-(defvar idl-mode-map ()
+(defvar idl-mode-map
+ (let ((map (c-make-inherited-keymap)))
+ ;; Add bindings which are only useful for IDL.
+ map)
"Keymap used in idl-mode buffers.")
-(if idl-mode-map
- nil
- (setq idl-mode-map (c-make-inherited-keymap))
- ;; add bindings which are only useful for IDL
- )
(easy-menu-define c-idl-menu idl-mode-map "IDL Mode Commands"
(cons "IDL" (c-lang-const c-mode-menu idl)))
\f
;; Support for Pike
-;;;###autoload
-(defvar pike-mode-syntax-table nil
+(defvar pike-mode-syntax-table
+ (funcall (c-lang-const c-make-mode-syntax-table pike))
"Syntax table used in pike-mode buffers.")
-(or pike-mode-syntax-table
- (setq pike-mode-syntax-table
- (funcall (c-lang-const c-make-mode-syntax-table pike))))
-(defvar pike-mode-abbrev-table nil
- "Abbreviation table used in pike-mode buffers.")
(c-define-abbrev-table 'pike-mode-abbrev-table
'(("else" "else" c-electric-continued-statement 0)
- ("while" "while" c-electric-continued-statement 0)))
+ ("while" "while" c-electric-continued-statement 0))
+ "Abbreviation table used in pike-mode buffers.")
-(defvar pike-mode-map ()
+(defvar pike-mode-map
+ (let ((map (c-make-inherited-keymap)))
+ ;; Additional bindings.
+ (define-key map "\C-c\C-e" 'c-macro-expand)
+ map)
"Keymap used in pike-mode buffers.")
-(if pike-mode-map
- nil
- (setq pike-mode-map (c-make-inherited-keymap))
- ;; additional bindings
- (define-key pike-mode-map "\C-c\C-e" 'c-macro-expand))
(easy-menu-define c-pike-menu pike-mode-map "Pike Mode Commands"
(cons "Pike" (c-lang-const c-mode-menu pike)))
;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode))
-;;;###autoload (add-to-list 'interpreter-mode-alist '("pike" . pike-mode))
+;;;###autoload (add-to-list 'interpreter-mode-alist '("\\`pike\\'" . pike-mode))
;;;###autoload
(define-derived-mode pike-mode prog-mode "Pike"
;; Support for AWK
;;;###autoload (add-to-list 'auto-mode-alist '("\\.awk\\'" . awk-mode))
-;;;###autoload (add-to-list 'interpreter-mode-alist '("awk" . awk-mode))
-;;;###autoload (add-to-list 'interpreter-mode-alist '("mawk" . awk-mode))
-;;;###autoload (add-to-list 'interpreter-mode-alist '("nawk" . awk-mode))
-;;;###autoload (add-to-list 'interpreter-mode-alist '("gawk" . awk-mode))
-
-;;; Autoload directives must be on the top level, so we construct an
-;;; autoload form instead.
-;;;###autoload (autoload 'awk-mode "cc-mode" "Major mode for editing AWK code." t)
+;;;###autoload (add-to-list 'interpreter-mode-alist '("\\`[gmn]?awk\\'" . awk-mode))
-(defvar awk-mode-abbrev-table nil
- "Abbreviation table used in awk-mode buffers.")
(c-define-abbrev-table 'awk-mode-abbrev-table
'(("else" "else" c-electric-continued-statement 0)
- ("while" "while" c-electric-continued-statement 0)))
+ ("while" "while" c-electric-continued-statement 0))
+ "Abbreviation table used in awk-mode buffers.")
-(defvar awk-mode-map ()
+(defvar awk-mode-map
+ (let ((map (c-make-inherited-keymap)))
+ ;; Add bindings which are only useful for awk.
+ (define-key map "#" 'self-insert-command)
+ (define-key map "/" 'self-insert-command)
+ (define-key map "*" 'self-insert-command)
+ (define-key map "\C-c\C-n" 'undefined) ; #if doesn't exist in awk.
+ (define-key map "\C-c\C-p" 'undefined)
+ (define-key map "\C-c\C-u" 'undefined)
+ (define-key map "\M-a" 'c-beginning-of-statement) ; 2003/10/7
+ (define-key map "\M-e" 'c-end-of-statement) ; 2003/10/7
+ (define-key map "\C-\M-a" 'c-awk-beginning-of-defun)
+ (define-key map "\C-\M-e" 'c-awk-end-of-defun)
+ map)
"Keymap used in awk-mode buffers.")
-(if awk-mode-map
- nil
- (setq awk-mode-map (c-make-inherited-keymap))
- ;; add bindings which are only useful for awk.
- (define-key awk-mode-map "#" 'self-insert-command)
- (define-key awk-mode-map "/" 'self-insert-command)
- (define-key awk-mode-map "*" 'self-insert-command)
- (define-key awk-mode-map "\C-c\C-n" 'undefined) ; #if doesn't exist in awk.
- (define-key awk-mode-map "\C-c\C-p" 'undefined)
- (define-key awk-mode-map "\C-c\C-u" 'undefined)
- (define-key awk-mode-map "\M-a" 'c-beginning-of-statement) ; 2003/10/7
- (define-key awk-mode-map "\M-e" 'c-end-of-statement) ; 2003/10/7
- (define-key awk-mode-map "\C-\M-a" 'c-awk-beginning-of-defun)
- (define-key awk-mode-map "\C-\M-e" 'c-awk-end-of-defun))
(easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands"
(cons "AWK" (c-lang-const c-mode-menu awk)))
"use cperl-vc-rcs-header or cperl-vc-sccs-header instead."
"22.1")
-(defcustom cperl-clobber-mode-lists
- (not
- (and
- (boundp 'interpreter-mode-alist)
- (assoc "miniperl" interpreter-mode-alist)
- (assoc "\\.\\([pP][Llm]\\|al\\)$" auto-mode-alist)))
- "*Whether to install us into `interpreter-' and `extension' mode lists."
- :type 'boolean
- :group 'cperl)
+;;; (defcustom cperl-clobber-mode-lists
+;;; (not
+;;; (and
+;;; (boundp 'interpreter-mode-alist)
+;;; (assoc "miniperl" interpreter-mode-alist)
+;;; (assoc "\\.\\([pP][Llm]\\|al\\)$" auto-mode-alist)))
+;;; "*Whether to install us into `interpreter-' and `extension' mode lists."
+;;; :type 'boolean
+;;; :group 'cperl)
(defcustom cperl-info-on-command-no-prompt nil
"*Not-nil (and non-null) means not to prompt on C-h f.
;; Extra functions `python-nav-forward-statement',
;; `python-nav-backward-statement',
;; `python-nav-beginning-of-statement', `python-nav-end-of-statement',
-;; `python-nav-beginning-of-block' and `python-nav-end-of-block' are
-;; included but no bound to any key. At last but not least the
-;; specialized `python-nav-forward-sexp' allows easy navigation
-;; between code blocks. If you prefer `cc-mode'-like `forward-sexp'
-;; movement, setting `forward-sexp-function' to nil is enough, You can
-;; do that using the `python-mode-hook':
+;; `python-nav-beginning-of-block', `python-nav-end-of-block' and
+;; `python-nav-if-name-main' are included but no bound to any key. At
+;; last but not least the specialized `python-nav-forward-sexp' allows
+;; easy navigation between code blocks. If you prefer `cc-mode'-like
+;; `forward-sexp' movement, setting `forward-sexp-function' to nil is
+;; enough, You can do that using the `python-mode-hook':
;; (add-hook 'python-mode-hook
;; (lambda () (setq forward-sexp-function nil)))
;;;###autoload
(add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode))
;;;###autoload
-(add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode))
+(add-to-list 'interpreter-mode-alist (cons (purecopy "\\`python[0-9.]*\\'") 'python-mode))
(defgroup python nil
"Python Language's flying circus support for Emacs."
(defun python-nav-beginning-of-block ()
"Move to start of current block."
(interactive "^")
- (let ((starting-pos (point))
- (block-regexp (python-rx
- line-start (* whitespace) block-start)))
+ (let ((starting-pos (point)))
(if (progn
(python-nav-beginning-of-statement)
(looking-at (python-rx block-start)))
(let* ((forward-p (if (> dir 0)
(and (setq dir 1) t)
(and (setq dir -1) nil)))
- (re-search-fn (if forward-p
- 're-search-forward
- 're-search-backward))
(context-type (python-syntax-context-type)))
(cond
((memq context-type '(string comment))
(or arg (setq arg 1))
(python-nav-up-list (- arg)))
+(defun python-nav-if-name-main ()
+ "Move point at the beginning the __main__ block.
+When \"if __name__ == '__main__':\" is found returns its
+position, else returns nil."
+ (interactive)
+ (let ((point (point))
+ (found (catch 'found
+ (goto-char (point-min))
+ (while (re-search-forward
+ (python-rx line-start
+ "if" (+ space)
+ "__name__" (+ space)
+ "==" (+ space)
+ (group-n 1 (or ?\" ?\'))
+ "__main__" (backref 1) (* space) ":")
+ nil t)
+ (when (not (python-syntax-context-type))
+ (beginning-of-line)
+ (throw 'found t))))))
+ (if found
+ (point)
+ (ignore (goto-char point)))))
+
\f
;;; Shell integration
(define-obsolete-function-alias
'python-send-string 'python-shell-internal-send-string "24.3")
+(defun python-shell-buffer-substring (start end &optional nomain)
+ "Send buffer substring from START to END formatted for shell.
+This is a wrapper over `buffer-substring' that takes care of
+different transformations for the code sent to be evaluated in
+the python shell:
+ 1. When Optional Argument NOMAIN is non-nil everything under an
+ \"if __name__ == '__main__'\" block will be removed.
+ 2. When a subregion of the buffer is sent, it takes care of
+ appending extra empty lines so tracebacks are correct.
+ 3. Wraps indented regions under an \"if True:\" block so the
+ interpreter evaluates them correctly."
+ (let ((substring (buffer-substring-no-properties start end))
+ (fillstr (make-string (1- (line-number-at-pos start)) ?\n))
+ (toplevel-block-p (save-excursion
+ (goto-char start)
+ (or (zerop (line-number-at-pos start))
+ (progn
+ (python-util-forward-comment 1)
+ (zerop (current-indentation)))))))
+ (with-temp-buffer
+ (python-mode)
+ (insert fillstr)
+ (insert substring)
+ (goto-char (point-min))
+ (when (not toplevel-block-p)
+ (insert "if True:")
+ (delete-region (point) (line-end-position)))
+ (when nomain
+ (let* ((if-name-main-start-end
+ (and nomain
+ (save-excursion
+ (when (python-nav-if-name-main)
+ (cons (point)
+ (progn (python-nav-forward-sexp)
+ (point)))))))
+ ;; Oh destructuring bind, how I miss you.
+ (if-name-main-start (car if-name-main-start-end))
+ (if-name-main-end (cdr if-name-main-start-end)))
+ (when if-name-main-start-end
+ (goto-char if-name-main-start)
+ (delete-region if-name-main-start if-name-main-end)
+ (insert
+ (make-string
+ (- (line-number-at-pos if-name-main-end)
+ (line-number-at-pos if-name-main-start)) ?\n)))))
+ (buffer-substring-no-properties (point-min) (point-max)))))
+
(defun python-shell-send-region (start end)
"Send the region delimited by START and END to inferior Python process."
(interactive "r")
(python-shell-send-string
- (concat
- (let ((line-num (line-number-at-pos start)))
- ;; When sending a region, add blank lines for non sent code so
- ;; backtraces remain correct.
- (make-string (1- line-num) ?\n))
- (buffer-substring start end))
- nil t))
+ (python-shell-buffer-substring start end) nil t))
(defun python-shell-send-buffer (&optional arg)
"Send the entire buffer to inferior Python process.
(interactive "P")
(save-restriction
(widen)
- (let ((str (buffer-substring (point-min) (point-max))))
- (and
- (not arg)
- (setq str (replace-regexp-in-string
- (python-rx if-name-main)
- "if __name__ == '__main__ ':" str)))
- (python-shell-send-string str))))
+ (python-shell-send-string
+ (python-shell-buffer-substring
+ (point-min) (point-max) (not arg)))))
(defun python-shell-send-defun (arg)
"Send the current defun to inferior Python process.
LINE is used to detect the context on how to complete given
INPUT."
(let* ((prompt
- ;; Get the last prompt for the inferior process
- ;; buffer. This is used for the completion code selection
- ;; heuristic.
+ ;; Get last prompt of the inferior process buffer (this
+ ;; intentionally avoids using `comint-last-prompt' because
+ ;; of incompatibilities with Emacs 24.x).
(with-current-buffer (process-buffer process)
- (buffer-substring-no-properties
- (overlay-start comint-last-prompt-overlay)
- (overlay-end comint-last-prompt-overlay))))
+ (save-excursion
+ (buffer-substring-no-properties
+ (- (point) (length line))
+ (progn
+ (re-search-backward "^")
+ (python-util-forward-comment)
+ (point))))))
(completion-context
;; Check whether a prompt matches a pdb string, an import
;; statement or just the standard prompt and use the
(defun python-fill-string (&optional justify)
"String fill function for `python-fill-paragraph'.
JUSTIFY should be used (if applicable) as in `fill-paragraph'."
- (let* ((marker (point-marker))
- (str-start-pos
+ (let* ((str-start-pos
(set-marker
(make-marker)
(or (python-syntax-context 'string)
;; Again indent only if a newline is added.
(indent-according-to-mode))))) t)
-(defun python-fill-decorator (&optional justify)
+(defun python-fill-decorator (&optional _justify)
"Decorator fill function for `python-fill-paragraph'.
JUSTIFY should be used (if applicable) as in `fill-paragraph'."
t)
(defun python-skeleton-add-menu-items ()
"Add menu items to Python->Skeletons menu."
- (let ((skeletons (sort python-skeleton-available 'string<))
- (items))
+ (let ((skeletons (sort python-skeleton-available 'string<)))
(dolist (skeleton skeletons)
(easy-menu-add-item
nil '("Python" "Skeletons")
(let ((process-environment (python-shell-calculate-process-environment))
(exec-path (python-shell-calculate-exec-path)))
(compilation-start command nil
- (lambda (mode-name)
+ (lambda (_modename)
(format python-check-buffer-name command)))))
\f
"Return imenu label for parent node using TYPE and NAME."
(format "%s..." (python-imenu-format-item-label type name)))
-(defun python-imenu-format-parent-item-jump-label (type name)
+(defun python-imenu-format-parent-item-jump-label (type _name)
"Return imenu label for parent node jump using TYPE and NAME."
(if (string= type "class")
"*class definition*"
(cons name (cdar pos))
(python-imenu-create-flat-index (cddr item) name))))))
(or alist
- (let* ((fn (lambda (type name) name))
+ (let* ((fn (lambda (_type name) name))
(python-imenu-format-item-label-function fn)
(python-imenu-format-parent-item-label-function fn)
(python-imenu-format-parent-item-jump-label-function fn))
(add-to-list 'hs-special-modes-alist
`(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#"
- ,(lambda (arg)
+ ,(lambda (_arg)
(python-nav-end-of-defun)) nil))
(set (make-local-variable 'mode-require-final-newline) t)
(defconst ruby-symbol-chars "a-zA-Z0-9_"
"List of characters that symbol names may contain.")
+
(defconst ruby-symbol-re (concat "[" ruby-symbol-chars "]")
"Regexp to match symbols.")
("for" for-body "end")
("[" expseq "]")
("{" hashvals "}")
+ ("{" insts "}")
("while" insts "end")
("until" insts "end")
("unless" insts "end")
("if" if-body "end")
("case" cases "end"))
+ (formal-params ("opening-|" exp "|"))
(for-body (for-head ";" insts))
(for-head (id "in" exp))
(cases (exp "then" insts) ;; FIXME: Ruby also allows (exp ":" insts).
(save-excursion
(skip-chars-backward " \t")
(not (or (bolp)
- (memq (char-before) '(?\; ?- ?+ ?* ?/ ?:))
+ (and (memq (char-before) '(?\; ?- ?+ ?* ?/ ?: ?.))
+ ;; Make sure it's not the end of a regexp.
+ (not (eq (car (syntax-after (1- (point)))) 7)))
(and (memq (char-before) '(?\? ?=))
- (not (memq (char-syntax (char-before (1- (point))))
- '(?w ?_))))))))
+ (let ((tok (ruby-smie--backward-token)))
+ (or (equal tok "?")
+ (string-match "\\`\\s." tok))))))))
+
+(defun ruby-smie--opening-pipe-p ()
+ (save-excursion
+ (if (eq ?| (char-before)) (forward-char -1))
+ (skip-chars-backward " \t\n")
+ (or (eq ?\{ (char-before))
+ (looking-back "\\_<do" (- (point) 2)))))
(defun ruby-smie--forward-token ()
(skip-chars-forward " \t")
(if (eolp) (forward-char 1) (forward-comment 1))
";")
(forward-comment (point-max))
+ (if (looking-at ":\\s.+")
+ (progn (goto-char (match-end 0)) (match-string 0)) ;; bug#15208.
(let ((tok (smie-default-forward-token)))
(cond
((member tok '("unless" "if" "while" "until"))
(if (save-excursion (forward-word -1) (ruby-smie--bosp))
tok "iuwu-mod"))
- (t tok)))))
+ ((equal tok "|")
+ (if (ruby-smie--opening-pipe-p) "opening-|" tok))
+ (t tok))))))
(defun ruby-smie--backward-token ()
(let ((pos (point)))
(progn (skip-chars-forward " \t")
";")
(let ((tok (smie-default-backward-token)))
+ (when (and (eq ?: (char-before)) (string-match "\\`\\s." tok))
+ (forward-char -1) (setq tok (concat ":" tok))) ;; bug#15208.
(cond
((member tok '("unless" "if" "while" "until"))
(if (ruby-smie--bosp)
tok "iuwu-mod"))
+ ((equal tok "|")
+ (if (ruby-smie--opening-pipe-p) "opening-|" tok))
(t tok))))))
(defun ruby-smie-rules (kind token)
;; For (invalid) code between switch and case.
;; (if (smie-parent-p "switch") 4)
0))
- (`(:before . ,(or `"else" `"then" `"elsif")) 0)
+ (`(:before . "do")
+ (when
+ (save-excursion
+ (forward-word 1) ;Skip "do"
+ (skip-chars-forward " \t")
+ (and (equal (save-excursion (ruby-smie--forward-token)) "opening-|")
+ (save-excursion (forward-sexp 1)
+ (skip-chars-forward " \t")
+ (or (eolp)
+ (looking-at comment-start-skip)))))
+ ;; `(column . ,(smie-indent-virtual))
+ (smie-rule-parent)))
+ (`(:before . ,(or `"else" `"then" `"elsif" `"rescue")) 0)
(`(:before . ,(or `"when"))
(if (not (smie-rule-sibling-p)) 0)) ;; ruby-indent-level
;; Hack attack: Since newlines are separators, don't try to align args that
(not (looking-at "[a-z_]"))))
(and (looking-at ruby-operator-re)
(not (ruby-special-char-p))
+ (save-excursion
+ (forward-char -1)
+ (or (not (looking-at ruby-operator-re))
+ (not (eq (char-before) ?:))))
;; Operator at the end of line.
(let ((c (char-after (point))))
(and
"using")
'symbols))
1 'font-lock-builtin-face)
- ;; Perl-ish keywords
- "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$"
;; here-doc beginnings
`(,ruby-here-doc-beg-re 0 (unless (ruby-singleton-class-p (match-beginning 0))
'font-lock-string-face))
+ ;; Perl-ish keywords
+ "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$"
;; variables
`(,(concat ruby-font-lock-keyword-beg-re
"\\_<\\(nil\\|self\\|true\\|false\\)\\>")
"\\)\\'")) 'ruby-mode))
;;;###autoload
-(dolist (name (list "ruby" "rbx" "jruby" "ruby1.9" "ruby1.8"))
- (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'ruby-mode)))
+(add-to-list 'interpreter-mode-alist (cons (purecopy "\\`\\(rbx\\|j?ruby\\(1\\.[89]\\)?\\)\\'") 'ruby-mode))
(provide 'ruby-mode)
;;; sh-script.el --- shell-script editing commands for Emacs
-;; Copyright (C) 1993-1997, 1999, 2001-2013 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1993-1997, 1999, 2001-2013 Free Software Foundation, Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
;; Version: 2.0f
"." "alias" "bg" "bind" "builtin" "caller" "compgen" "complete"
"declare" "dirs" "disown" "enable" "fc" "fg" "help" "history"
"jobs" "kill" "let" "local" "popd" "printf" "pushd" "shopt"
- "source" "suspend" "typeset" "unalias")
+ "source" "suspend" "typeset" "unalias"
+ ;; bash4
+ "mapfile" "readarray")
;; The next entry is only used for defining the others
(bourne sh-append shell
:type '(repeat (cons (symbol :tag "Shell")
(choice (repeat string)
(sexp :format "Evaluate: %v"))))
+ :version "24.4" ; bash4 additions
:group 'sh-script)
controls whether to query about making the visited file executable.
Calls the value of `sh-set-shell-hook' if set."
- (interactive (list (completing-read (format "Shell \(default %s\): "
- sh-shell-file)
- interpreter-mode-alist
- (lambda (x) (eq (cdr x) 'sh-mode))
- nil nil nil sh-shell-file)
+ (interactive (list (completing-read
+ (format "Shell \(default %s\): "
+ sh-shell-file)
+ ;; This used to use interpreter-mode-alist, but that is
+ ;; no longer appropriate now that uses regexps.
+ ;; Maybe there could be a separate variable that lists
+ ;; the shells, used here and to construct i-mode-alist.
+ ;; But the following is probably good enough:
+ (append (mapcar (lambda (e) (symbol-name (car e)))
+ sh-ancestor-alist)
+ '("csh" "rc" "sh"))
+ nil nil nil nil sh-shell-file)
(eq executable-query 'function)
t))
(if (string-match "\\.exe\\'" shell)
to be replaced will match a sequence of whitespace chars defined by the
regexp in `search-whitespace-regexp'.
-In Transient Mark mode, if the mark is active, operate on the contents
-of the region. Otherwise, operate from point to the end of the buffer.
-
Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace
only matches surrounded by word boundaries.
-Fourth and fifth arg START and END specify the region to operate on.
+
+Operates on the region between START and END (if both are nil, from point
+to the end of the buffer). Interactively, if Transient Mark mode is
+enabled and the mark is active, operates on the contents of the region;
+otherwise from point to the end of the buffer.
Use \\<minibuffer-local-map>\\[next-history-element] \
to pull the last incremental search string to the minibuffer
(insert-file-contents file)
(goto-char (point-min))
(setq save-place-alist
- (car (read-from-string
- (buffer-substring (point-min) (point-max)))))
+ ;; This is with-demoted-errors, but we want to
+ ;; mention save-place in any error message.
+ (condition-case err
+ (car (read-from-string
+ (buffer-substring (point-min) (point-max))))
+ (error (message "Error reading save-place-file: %S" err)
+ nil)))
;; If there is a limit, and we're over it, then we'll
;; have to truncate the end of the list:
Such arguments are used as in `read-from-minibuffer'.)"
;; Used for interactive spec `x'.
(read-from-minibuffer prompt initial-contents minibuffer-local-map
- t minibuffer-history))
+ t 'minibuffer-history))
(defun eval-minibuffer (prompt &optional initial-contents)
"Return value of Lisp expression read using the minibuffer.
;; add it to the history.
(or (equal newcmd (car command-history))
(setq command-history (cons newcmd command-history)))
- (eval newcmd))
+ (unwind-protect
+ (progn
+ ;; Trick called-interactively-p into thinking that `newcmd' is
+ ;; an interactive call (bug#14136).
+ (add-hook 'called-interactively-p-functions
+ #'repeat-complex-command--called-interactively-skip)
+ (eval newcmd))
+ (remove-hook 'called-interactively-p-functions
+ #'repeat-complex-command--called-interactively-skip)))
(if command-history
(error "Argument %d is beyond length of command history" arg)
(error "There are no previous complex commands to repeat")))))
+(defun repeat-complex-command--called-interactively-skip (i _frame1 frame2)
+ (and (eq 'eval (cadr frame2))
+ (eq 'repeat-complex-command
+ (cadr (backtrace-frame i #'called-interactively-p)))
+ 1))
+
(defvar extended-command-history nil)
(defun read-extended-command ()
nil)
\f
(defvar universal-argument-map
- (let ((map (make-sparse-keymap)))
- (define-key map [t] 'universal-argument-other-key)
- (define-key map (vector meta-prefix-char t) 'universal-argument-other-key)
- (define-key map [switch-frame] nil)
+ (let ((map (make-sparse-keymap))
+ (universal-argument-minus
+ ;; For backward compatibility, minus with no modifiers is an ordinary
+ ;; command if digits have already been entered.
+ `(menu-item "" negative-argument
+ :filter ,(lambda (cmd)
+ (if (integerp prefix-arg) nil cmd)))))
+ (define-key map [switch-frame]
+ (lambda (e) (interactive "e")
+ (handle-switch-frame e) (universal-argument--mode)))
(define-key map [?\C-u] 'universal-argument-more)
- (define-key map [?-] 'universal-argument-minus)
+ (define-key map [?-] universal-argument-minus)
(define-key map [?0] 'digit-argument)
(define-key map [?1] 'digit-argument)
(define-key map [?2] 'digit-argument)
(define-key map [kp-7] 'digit-argument)
(define-key map [kp-8] 'digit-argument)
(define-key map [kp-9] 'digit-argument)
- (define-key map [kp-subtract] 'universal-argument-minus)
+ (define-key map [kp-subtract] universal-argument-minus)
map)
"Keymap used while processing \\[universal-argument].")
-(defvar universal-argument-num-events nil
- "Number of argument-specifying events read by `universal-argument'.
-`universal-argument-other-key' uses this to discard those events
-from (this-command-keys), and reread only the final command.")
-
-(defvar saved-overriding-map t
- "The saved value of `overriding-terminal-local-map'.
-That variable gets restored to this value on exiting \"universal
-argument mode\".")
-
-(defun save&set-overriding-map (map)
- "Set `overriding-terminal-local-map' to MAP."
- (when (eq saved-overriding-map t)
- (setq saved-overriding-map overriding-terminal-local-map)
- (setq overriding-terminal-local-map map)))
-
-(defun restore-overriding-map ()
- "Restore `overriding-terminal-local-map' to its saved value."
- (setq overriding-terminal-local-map saved-overriding-map)
- (setq saved-overriding-map t))
+(defun universal-argument--mode ()
+ (set-temporary-overlay-map universal-argument-map))
(defun universal-argument ()
"Begin a numeric argument for the following command.
These commands include \\[set-mark-command] and \\[start-kbd-macro]."
(interactive)
(setq prefix-arg (list 4))
- (setq universal-argument-num-events (length (this-command-keys)))
- (save&set-overriding-map universal-argument-map))
+ (universal-argument--mode))
-;; A subsequent C-u means to multiply the factor by 4 if we've typed
-;; nothing but C-u's; otherwise it means to terminate the prefix arg.
(defun universal-argument-more (arg)
+ ;; A subsequent C-u means to multiply the factor by 4 if we've typed
+ ;; nothing but C-u's; otherwise it means to terminate the prefix arg.
(interactive "P")
- (if (consp arg)
- (setq prefix-arg (list (* 4 (car arg))))
- (if (eq arg '-)
- (setq prefix-arg (list -4))
- (setq prefix-arg arg)
- (restore-overriding-map)))
- (setq universal-argument-num-events (length (this-command-keys))))
+ (setq prefix-arg (if (consp arg)
+ (list (* 4 (car arg)))
+ (if (eq arg '-)
+ (list -4)
+ arg)))
+ (when (consp prefix-arg) (universal-argument--mode)))
(defun negative-argument (arg)
"Begin a negative numeric argument for the next command.
\\[universal-argument] following digits or minus sign ends the argument."
(interactive "P")
- (cond ((integerp arg)
- (setq prefix-arg (- arg)))
- ((eq arg '-)
- (setq prefix-arg nil))
- (t
- (setq prefix-arg '-)))
- (setq universal-argument-num-events (length (this-command-keys)))
- (save&set-overriding-map universal-argument-map))
+ (setq prefix-arg (cond ((integerp arg) (- arg))
+ ((eq arg '-) nil)
+ (t '-)))
+ (universal-argument--mode))
(defun digit-argument (arg)
"Part of the numeric argument for the next command.
last-command-event
(get last-command-event 'ascii-character)))
(digit (- (logand char ?\177) ?0)))
- (cond ((integerp arg)
- (setq prefix-arg (+ (* arg 10)
- (if (< arg 0) (- digit) digit))))
- ((eq arg '-)
- ;; Treat -0 as just -, so that -01 will work.
- (setq prefix-arg (if (zerop digit) '- (- digit))))
- (t
- (setq prefix-arg digit))))
- (setq universal-argument-num-events (length (this-command-keys)))
- (save&set-overriding-map universal-argument-map))
-
-;; For backward compatibility, minus with no modifiers is an ordinary
-;; command if digits have already been entered.
-(defun universal-argument-minus (arg)
- (interactive "P")
- (if (integerp arg)
- (universal-argument-other-key arg)
- (negative-argument arg)))
-
-;; Anything else terminates the argument and is left in the queue to be
-;; executed as a command.
-(defun universal-argument-other-key (arg)
- (interactive "P")
- (setq prefix-arg arg)
- (let* ((key (this-command-keys))
- (keylist (listify-key-sequence key)))
- (setq unread-command-events
- (append (nthcdr universal-argument-num-events keylist)
- unread-command-events)))
- (reset-this-command-lengths)
- (restore-overriding-map))
+ (setq prefix-arg (cond ((integerp arg)
+ (+ (* arg 10)
+ (if (< arg 0) (- digit) digit)))
+ ((eq arg '-)
+ ;; Treat -0 as just -, so that -01 will work.
+ (if (zerop digit) '- (- digit)))
+ (t
+ digit))))
+ (universal-argument--mode))
\f
(defvar filter-buffer-substring-functions nil
;; with the selected frame.
(list 'parent (selected-frame)))
speedbar-frame-parameters)
- speedbar-before-delete-hook
- speedbar-before-popup-hook
- speedbar-after-create-hook)
+ 'speedbar-before-delete-hook
+ 'speedbar-before-popup-hook
+ 'speedbar-after-create-hook)
;; Start up the timer
(if (not speedbar-frame)
(speedbar-set-timer nil)
If the value is nil, `pop' returns nil but does not actually
change the list."
(declare (debug (gv-place)))
- (list 'car
- (if (symbolp place)
- ;; So we can use `pop' in the bootstrap before `gv' can be used.
- (list 'prog1 place (list 'setq place (list 'cdr place)))
- (gv-letplace (getter setter) place
- `(prog1 ,getter ,(funcall setter `(cdr ,getter)))))))
+ ;; We use `car-safe' here instead of `car' because the behavior is the same
+ ;; (if it's not a cons cell, the `cdr' would have signaled an error already),
+ ;; but `car-safe' is total, so the byte-compiler can safely remove it if the
+ ;; result is not used.
+ `(car-safe
+ ,(if (symbolp place)
+ ;; So we can use `pop' in the bootstrap before `gv' can be used.
+ (list 'prog1 place (list 'setq place (list 'cdr place)))
+ (gv-letplace (getter setter) place
+ `(prog1 ,getter ,(funcall setter `(cdr ,getter)))))))
(defmacro when (cond &rest body)
"If COND yields non-nil, do BODY, else return nil.
(define-obsolete-function-alias 'condition-case-no-debug
'condition-case-unless-debug "24.1")
-(defmacro with-demoted-errors (&rest body)
+(defmacro with-demoted-errors (format &rest body)
"Run BODY and demote any errors to simple messages.
If `debug-on-error' is non-nil, run BODY without catching its errors.
This is to be used around code which is not expected to signal an error
-but which should be robust in the unexpected case that an error is signaled."
- (declare (debug t) (indent 0))
- (let ((err (make-symbol "err")))
+but which should be robust in the unexpected case that an error is signaled.
+For backward compatibility, if FORMAT is not a constant string, it
+is assumed to be part of BODY, in which case the message format
+used is \"Error: %S\"."
+ (declare (debug t) (indent 1))
+ (let ((err (make-symbol "err"))
+ (format (if (and (stringp format) body) format
+ (prog1 "Error: %S"
+ (if format (push format body))))))
`(condition-case-unless-debug ,err
- (progn ,@body)
- (error (message "Error: %S" ,err) nil))))
+ ,(macroexp-progn body)
+ (error (message ,format ,err) nil))))
(defmacro combine-after-change-calls (&rest body)
"Execute BODY, but don't call the after-change functions till the end.
nil
(("editor") ("editora") ("editorb") ("editorc")
("translator") ("annotator") ("commentator")
- ("introduction") ("foreword") ("afterword") ("titleaddon")
+ ("introduction") ("foreword") ("afterword") ("subtitle") ("titleaddon")
("maintitle") ("mainsubtitle") ("maintitleaddon")
("language") ("origlanguage") ("volume") ("part") ("edition") ("volumes")
("series") ("number") ("note") ("publisher") ("location") ("isbn")
(defvar css-font-lock-defaults
'(css-font-lock-keywords nil t))
+(defcustom css-indent-offset 4
+ "Basic size of one indentation step."
+ :version "22.2"
+ :type 'integer)
+
+(require 'smie)
+
+(defconst css-smie-grammar
+ (smie-prec2->grammar
+ (smie-precs->prec2 '((assoc ";") (assoc ",") (left ":")))))
+
+(defun css-smie--forward-token ()
+ (cond
+ ((and (eq (char-before) ?\})
+ ;; FIXME: If the next char is not whitespace, what should we do?
+ (or (memq (char-after) '(?\s ?\t ?\n))
+ (looking-at comment-start-skip)))
+ (if (memq (char-after) '(?\s ?\t ?\n))
+ (forward-char 1) (forward-comment 1))
+ ";")
+ ((progn (forward-comment (point-max))
+ (looking-at "[;,:]"))
+ (forward-char 1) (match-string 0))
+ (t (smie-default-forward-token))))
+
+(defun css-smie--backward-token ()
+ (let ((pos (point)))
+ (forward-comment (- (point)))
+ (cond
+ ;; FIXME: If the next char is not whitespace, what should we do?
+ ((and (eq (char-before) ?\}) (> pos (point))) ";")
+ ((memq (char-before) '(?\; ?\, ?\:))
+ (forward-char -1) (string (char-after)))
+ (t (smie-default-backward-token)))))
+
+(defun css-smie-rules (kind token)
+ (pcase (cons kind token)
+ (`(:elem . basic) css-indent-offset)
+ (`(:elem . arg) 0)
+ (`(:before . "{") (if (smie-rule-hanging-p)
+ (smie-rule-parent 0)))))
+
;;;###autoload
(define-derived-mode css-mode fundamental-mode "CSS"
"Major mode to edit Cascading Style Sheets."
(setq-local comment-start-skip "/\\*+[ \t]*")
(setq-local comment-end "*/")
(setq-local comment-end-skip "[ \t]*\\*+/")
- (setq-local forward-sexp-function 'css-forward-sexp)
(setq-local parse-sexp-ignore-comments t)
(setq-local indent-line-function 'css-indent-line)
(setq-local fill-paragraph-function 'css-fill-paragraph)
(setq-local add-log-current-defun-function #'css-current-defun-name)
+ (smie-setup css-smie-grammar #'css-smie-rules
+ :forward-token #'css-smie--forward-token
+ :backward-token #'css-smie--backward-token)
(when css-electric-keys
(let ((fc (make-char-table 'auto-fill-chars)))
(set-char-table-parent fc auto-fill-chars)
;; Don't use the default filling code.
t)))))))
-;;; Navigation and indentation.
-
-(defconst css-navigation-syntax-table
- (let ((st (make-syntax-table css-mode-syntax-table)))
- (map-char-table (lambda (c v)
- ;; Turn punctuation (code = 1) into symbol (code = 1).
- (if (eq (car-safe v) 1)
- (set-char-table-range st c (cons 3 (cdr v)))))
- st)
- st))
-
-(defun css-backward-sexp (n)
- (let ((forward-sexp-function nil))
- (if (< n 0) (css-forward-sexp (- n))
- (while (> n 0)
- (setq n (1- n))
- (forward-comment (- (point-max)))
- (if (not (eq (char-before) ?\;))
- (backward-sexp 1)
- (while (progn (backward-sexp 1)
- (save-excursion
- (forward-comment (- (point-max)))
- ;; FIXME: We should also skip punctuation.
- (not (or (bobp) (memq (char-before) '(?\; ?\{))))))))))))
-
-(defun css-forward-sexp (n)
- (let ((forward-sexp-function nil))
- (if (< n 0) (css-backward-sexp (- n))
- (while (> n 0)
- (setq n (1- n))
- (forward-comment (point-max))
- (if (not (eq (char-after) ?\;))
- (forward-sexp 1)
- (while (progn (forward-sexp 1)
- (save-excursion
- (forward-comment (point-max))
- ;; FIXME: We should also skip punctuation.
- (not (memq (char-after) '(?\; ?\})))))))))))
-
-(defun css-indent-calculate-virtual ()
- (if (or (save-excursion (skip-chars-backward " \t") (bolp))
- (if (looking-at "\\s(")
- (save-excursion
- (forward-char 1) (skip-chars-forward " \t")
- (not (or (eolp) (looking-at comment-start-skip))))))
- (current-column)
- (css-indent-calculate)))
-
-(defcustom css-indent-offset 4
- "Basic size of one indentation step."
- :version "22.2"
- :type 'integer
- :group 'css)
-
-(defun css-indent-calculate ()
- (let ((ppss (syntax-ppss))
- pos)
- (with-syntax-table css-navigation-syntax-table
- (save-excursion
- (cond
- ;; Inside a string.
- ((nth 3 ppss) 'noindent)
- ;; Inside a comment.
- ((nth 4 ppss)
- (setq pos (point))
- (forward-line -1)
- (skip-chars-forward " \t")
- (if (>= (nth 8 ppss) (point))
- (progn
- (goto-char (nth 8 ppss))
- (if (eq (char-after pos) ?*)
- (forward-char 1)
- (if (not (looking-at comment-start-skip))
- (error "Internal css-mode error")
- (goto-char (match-end 0))))
- (current-column))
- (if (and (eq (char-after pos) ?*) (eq (char-after) ?*))
- (current-column)
- ;; 'noindent
- (current-column)
- )))
- ;; In normal code.
- (t
- (or
- (when (looking-at "\\s)")
- (forward-char 1)
- (backward-sexp 1)
- (css-indent-calculate-virtual))
- (when (looking-at comment-start-skip)
- (forward-comment (point-max))
- (css-indent-calculate))
- (when (save-excursion (forward-comment (- (point-max)))
- (setq pos (point))
- (eq (char-syntax (preceding-char)) ?\())
- (goto-char (1- pos))
- (if (not (looking-at "\\s([ \t]*"))
- (error "Internal css-mode error")
- (if (or (memq (char-after (match-end 0)) '(?\n nil))
- (save-excursion (goto-char (match-end 0))
- (looking-at comment-start-skip)))
- (+ (css-indent-calculate-virtual) css-indent-offset)
- (progn (goto-char (match-end 0)) (current-column)))))
- (progn
- (css-backward-sexp 1)
- (if (looking-at "\\s(")
- (css-indent-calculate)
- (css-indent-calculate-virtual))))))))))
-
-
-(defun css-indent-line ()
- "Indent current line according to CSS indentation rules."
- (interactive)
- (let* ((savep (point))
- (forward-sexp-function nil)
- (indent (condition-case nil
- (save-excursion
- (forward-line 0)
- (skip-chars-forward " \t")
- (if (>= (point) savep) (setq savep nil))
- (css-indent-calculate))
- (error nil))))
- (if (not (numberp indent)) 'noindent
- (if savep
- (save-excursion (indent-line-to indent))
- (indent-line-to indent)))))
-
(defun css-current-defun-name ()
"Return the name of the CSS section at point, or nil."
(save-excursion
;; ediff-setup-diff-regions is called via a funcall to
;; ediff-setup-diff-regions-function, which can also have the value
;; ediff-setup-diff-regions3, which takes 4 arguments.
-(defun ediff-setup-diff-regions (file-A file-B file-C)
+(defun ediff-setup-diff-regions (file-A file-B _file-C)
;; looking for '-c', '-i', '-u', or 'c', 'i', 'u' among clustered non-long options
(if (string-match "^-[ciu]\\| -[ciu]\\|\\(^\\| \\)-[^- ]+[ciu]"
ediff-diff-options)
;; like shell-command-sentinel but doesn't print an exit status message
;; we do this because diff always exits with status 1, if diffs are found
;; so shell-command-sentinel displays a confusing message to the user
-(defun ediff-process-sentinel (process signal)
+(defun ediff-process-sentinel (process _signal)
(if (and (memq (process-status process) '(exit signal))
(buffer-name (process-buffer process)))
(progn
(ediff-overlay-put extent 'face face)
(ediff-overlay-put extent 'help-echo 'ediff-region-help-echo))
-(defun ediff-region-help-echo (extent-or-window &optional overlay point)
+(defun ediff-region-help-echo (extent-or-window &optional overlay _point)
(unless overlay
(setq overlay extent-or-window))
(let ((is-current (ediff-overlay-get overlay 'ediff))
(or n (setq n ediff-current-difference))
(and (>= n 0) (< n ediff-number-of-differences)))
-(defsubst ediff-show-all-diffs (n)
+(defsubst ediff-show-all-diffs (_n)
"Don't skip difference regions."
nil)
)
(make-variable-buffer-local 'ediff-skip-merge-regions-that-differ-from-default)
+(defvar state-of-merge) ; dynamic var
+
;; check if there is no clash between the ancestor and one of the variants.
;; if it is not a merge job then return true
(defun ediff-merge-region-is-non-clash (n)
(reverse delim-regs-list)
)))
-(defvar state-of-merge) ; dynamic var
-
;; Check if the non-preferred merge has been modified since originally set.
;; This affects only the regions that are marked as default-A/B or combined.
;; If PREFERS-TOO is non-nil, then look at the regions marked as prefers-A/B as
(setq overl
(if (featurep 'xemacs)
(map-extents
- (lambda (ext maparg)
+ (lambda (ext _maparg)
(if (and
(ediff-overlay-get ext 'ediff-meta-info)
(eq (ediff-overlay-get ext 'ediff-meta-session-number)
;; argument is ignored
-(defun ediff-redraw-registry-buffer (&optional ignore)
+(defun ediff-redraw-registry-buffer (&optional _ignore)
(ediff-with-current-buffer ediff-registry-buffer
(let ((point (point))
elt bufAname bufBname bufCname cur-diff total-diffs pt
(defvar ediff-after-quit-hook-internal nil)
(eval-and-compile
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r))))
;; end pacifier
;;BEG, END show the region to be positioned.
;;JOB-NAME holds ediff-job-name. The ediff-windows job positions regions
;;differently.
-(defun ediff-position-region (beg end pos job-name)
+(defun ediff-position-region (beg end pos _job-name)
(if (> end (point-max))
(setq end (point-max)))
(if ediff-windows-job
'ediff-get-lines-to-region-start)
((eq op 'scroll-up)
'ediff-get-lines-to-region-end)
- (t (lambda (a b c) 0))))
+ (t (lambda (_a _b _c) 0))))
(max-lines (max (funcall func 'A n ctl-buf)
(funcall func 'B n ctl-buf)
(if (ediff-buffer-live-p ediff-buffer-C)
;; declare-function does not exist in XEmacs
(eval-and-compile
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r))))
(require 'ediff-init)
(require 'ediff-help)
;;; Functions
-(defun ediff-get-window-by-clicking (wind prev-wind wind-number)
+(defun ediff-get-window-by-clicking (_wind _prev-wind wind-number)
(let (event)
(message
"Select windows by clicking. Please click on Window %d " wind-number)
(beep 1))
(message "Please click on Window %d " wind-number))
(ediff-read-event) ; discard event
- (setq wind (if (featurep 'xemacs)
- (event-window event)
- (posn-window (event-start event))))))
+ (if (featurep 'xemacs)
+ (event-window event)
+ (posn-window (event-start event)))))
;; Select the lowest window on the frame.
;; Compiler pacifier
(eval-and-compile
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r))))
(require 'ediff-util)
;; end pacifier
;;; Functions to start Emerge on files
;;;###autoload
-(defun emerge-files (arg file-A file-B file-out &optional startup-hooks
+(defun emerge-files (_arg file-A file-B file-out &optional startup-hooks
quit-hooks)
"Run Emerge on two files."
(interactive
file-out))
;;;###autoload
-(defun emerge-files-with-ancestor (arg file-A file-B file-ancestor file-out
+(defun emerge-files-with-ancestor (_arg file-A file-B file-ancestor file-out
&optional startup-hooks quit-hooks)
"Run Emerge on two files, giving another file as the ancestor."
(interactive
quit-hooks)))
(defun emerge-revisions-internal (file revision-A revision-B &optional
- startup-hooks quit-hooks output-file)
+ startup-hooks quit-hooks _output-file)
(let ((buffer-A (get-buffer-create (format "%s,%s" file revision-A)))
(buffer-B (get-buffer-create (format "%s,%s" file revision-B)))
(emerge-file-A (emerge-make-temp-file "A"))
done))))
-(defun cvs-sentinel (proc msg)
+(defun cvs-sentinel (proc _msg)
"Sentinel for the cvs update process.
This is responsible for parsing the output from the cvs update when
it is finished."
;;;;
(defun-cvs-mode (cvs-mode-revert-buffer . SIMPLE)
- (&optional ignore-auto noconfirm)
+ (&optional _ignore-auto _noconfirm)
"Rerun `cvs-examine' on the current directory with the default flags."
(interactive)
(cvs-examine default-directory t))
(read-directory-name prompt nil default-directory nil)))
;;;###autoload
-(defun cvs-quickdir (dir &optional flags noshow)
+(defun cvs-quickdir (dir &optional _flags noshow)
"Open a *cvs* buffer on DIR without running cvs.
With a prefix argument, prompt for a directory to use.
A prefix arg >8 (ex: \\[universal-argument] \\[universal-argument]),
(defcustom smerge-diff-buffer-name "*vc-diff*"
"Buffer name to use for displaying diffs."
- :group 'smerge
:type '(choice
(const "*vc-diff*")
(const "*cvs-diff*")
(if (listp diff-switches) diff-switches (list diff-switches)))
"A list of strings specifying switches to be passed to diff.
Used in `smerge-diff-base-mine' and related functions."
- :group 'smerge
:type '(repeat string))
(defcustom smerge-auto-leave t
"Non-nil means to leave `smerge-mode' when the last conflict is resolved."
- :group 'smerge
:type 'boolean)
(defface smerge-mine
:background "#553333")
(((class color))
:foreground "red"))
- "Face for your code."
- :group 'smerge)
+ "Face for your code.")
(define-obsolete-face-alias 'smerge-mine-face 'smerge-mine "22.1")
(defvar smerge-mine-face 'smerge-mine)
:background "#335533")
(((class color))
:foreground "green"))
- "Face for the other code."
- :group 'smerge)
+ "Face for the other code.")
(define-obsolete-face-alias 'smerge-other-face 'smerge-other "22.1")
(defvar smerge-other-face 'smerge-other)
:background "#888833")
(((class color))
:foreground "yellow"))
- "Face for the base code."
- :group 'smerge)
+ "Face for the base code.")
(define-obsolete-face-alias 'smerge-base-face 'smerge-base "22.1")
(defvar smerge-base-face 'smerge-base)
(:background "grey85"))
(((background dark))
(:background "grey30")))
- "Face for the conflict markers."
- :group 'smerge)
+ "Face for the conflict markers.")
(define-obsolete-face-alias 'smerge-markers-face 'smerge-markers "22.1")
(defvar smerge-markers-face 'smerge-markers)
(defface smerge-refined-change
'((t nil))
- "Face used for char-based changes shown by `smerge-refine'."
- :group 'smerge)
+ "Face used for char-based changes shown by `smerge-refine'.")
(defface smerge-refined-removed
'((default
:background "#aa2222")
(t :inverse-video t))
"Face used for removed characters shown by `smerge-refine'."
- :group 'smerge
:version "24.3")
(defface smerge-refined-added
:background "#22aa22")
(t :inverse-video t))
"Face used for added characters shown by `smerge-refine'."
- :group 'smerge
:version "24.3")
(easy-mmode-defmap smerge-basic-map
(defcustom smerge-command-prefix "\C-c^"
"Prefix for `smerge-mode' commands."
- :group 'smerge
:type '(choice (const :tag "ESC" "\e")
(const :tag "C-c ^" "\C-c^" )
(const :tag "none" "")
-;;; vc-annotate.el --- VC Annotate Support
+;;; vc-annotate.el --- VC Annotate Support -*- lexical-binding: t -*-
;; Copyright (C) 1997-1998, 2000-2013 Free Software Foundation, Inc.
(vc-annotate-display-default (or vc-annotate-ratio 1.0)))
;; One of the auto-scaling modes
((eq vc-annotate-display-mode 'scale)
- (vc-exec-after `(vc-annotate-display-autoscale)))
+ (vc-run-delayed (vc-annotate-display-autoscale)))
((eq vc-annotate-display-mode 'fullscale)
- (vc-exec-after `(vc-annotate-display-autoscale t)))
+ (vc-run-delayed (vc-annotate-display-autoscale t)))
((numberp vc-annotate-display-mode) ; A fixed number of days lookback
(vc-annotate-display-default
(/ vc-annotate-display-mode
(t (error "No such display mode: %s"
vc-annotate-display-mode))))
+(defvar vc-sentinel-movepoint)
+
;;;###autoload
(defun vc-annotate (file rev &optional display-mode buf move-point-to vc-bk)
"Display the edit history of the current FILE using colors.
display-mode))))
(with-current-buffer temp-buffer-name
- (vc-exec-after
- `(progn
- ;; Ideally, we'd rather not move point if the user has already
- ;; moved it elsewhere, but really point here is not the position
- ;; of the user's cursor :-(
- (when ,current-line ;(and (bobp))
- (goto-line ,current-line)
- (setq vc-sentinel-movepoint (point)))
- (unless (active-minibuffer-window)
- (message "Annotating... done")))))))
+ (vc-run-delayed
+ ;; Ideally, we'd rather not move point if the user has already
+ ;; moved it elsewhere, but really point here is not the position
+ ;; of the user's cursor :-(
+ (when current-line ;(and (bobp))
+ (goto-char (point-min))
+ (forward-line (1- current-line))
+ (setq vc-sentinel-movepoint (point)))
+ (unless (active-minibuffer-window)
+ (message "Annotating... done"))))))
(defun vc-annotate-prev-revision (prefix)
"Visit the annotation of the revision previous to this one.
(vc-call-backend vc-annotate-backend 'annotate-current-time))
next-time))))
-(defun vc-default-annotate-current-time (backend)
+(defun vc-default-annotate-current-time (_backend)
"Return the current time, encoded as fractional days."
(vc-annotate-convert-time (current-time)))
(let ((default-directory dir))
(vc-arch-command t 'async nil "changes"))
;; The updating could be done asynchronously.
- (vc-exec-after
- `(vc-arch-after-dir-status ',callback)))
+ (vc-run-delayed
+ (vc-arch-after-dir-status callback)))
(defun vc-arch-after-dir-status (callback)
(let* ((state-map '(("M " . edited)
(eval-when-compile
(require 'cl-lib)
+ (require 'vc-dispatcher)
(require 'vc-dir)) ; vc-dir-at-event
;; Clear up the cache to force vc-call to check again and discover
command (cadr args)
args (cddr args)))
(let ((buf (apply 'vc-bzr-async-command command args)))
- (with-current-buffer buf (vc-exec-after '(vc-compilation-mode 'bzr)))
+ (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr)))
(vc-set-async-update buf))))
(defun vc-bzr-merge-branch ()
(command (cadr cmd))
(args (cddr cmd)))
(let ((buf (apply 'vc-bzr-async-command command args)))
- (with-current-buffer buf (vc-exec-after '(vc-compilation-mode 'bzr)))
+ (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr)))
(vc-set-async-update buf))))
(defun vc-bzr-status (file)
(vc-bzr-command "cat" t 0 file "-r" rev)
(vc-bzr-command "cat" t 0 file))))
-(defun vc-bzr-ignore (file &optional directory remove)
- "Ignore FILE under Bazaar.
-If DIRECTORY is non-nil, the repository to use will be deduced by
-DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
- (if remove
- (if directory
- (vc--remove-regexp file (vc-bzr-find-ignore-file directory))
- (vc--remove-regexp file
- (vc-bzr-find-ignore-file default-directory)))
- (vc-bzr-command "ignore" t 0 file)))
-
-(defun vc-bzr-ignore-completion-table (file)
- "Return the list of ignored files."
- (vc--read-lines (vc-bzr-find-ignore-file file)))
-
(defun vc-bzr-find-ignore-file (file)
"Return the root directory of the repository of FILE."
(expand-file-name ".bzrignore"
(defun vc-bzr-dir-status (dir update-function)
"Return a list of conses (file . state) for DIR."
(vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S")
- (vc-exec-after
- `(vc-bzr-after-dir-status (quote ,update-function)
- ;; "bzr status" results are relative to
- ;; the bzr root directory, NOT to the
- ;; directory "bzr status" was invoked in.
- ;; Ugh.
- ;; We pass the relative directory here so
- ;; that `vc-bzr-after-dir-status' can
- ;; frob the results accordingly.
- (file-relative-name ,dir (vc-bzr-root ,dir)))))
+ (vc-run-delayed
+ (vc-bzr-after-dir-status update-function
+ ;; "bzr status" results are relative to
+ ;; the bzr root directory, NOT to the
+ ;; directory "bzr status" was invoked in.
+ ;; Ugh.
+ ;; We pass the relative directory here so
+ ;; that `vc-bzr-after-dir-status' can
+ ;; frob the results accordingly.
+ (file-relative-name dir (vc-bzr-root dir)))))
(defun vc-bzr-dir-status-files (dir files _default-state update-function)
"Return a list of conses (file . state) for DIR."
(apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
- (vc-exec-after
- `(vc-bzr-after-dir-status (quote ,update-function)
- (file-relative-name ,dir (vc-bzr-root ,dir)))))
+ (vc-run-delayed
+ (vc-bzr-after-dir-status update-function
+ (file-relative-name dir (vc-bzr-root dir)))))
(defvar vc-bzr-shelve-map
(let ((map (make-sparse-keymap)))
(if (vc-stay-local-p files 'CVS) 'async 0)
files "log")
(with-current-buffer buffer
- (vc-exec-after (vc-rcs-print-log-cleanup)))
+ (vc-run-delayed (vc-rcs-print-log-cleanup)))
(when limit 'limit-unsupported))
(defun vc-cvs-comment-history (file)
;; (vc-cvs-command (current-buffer) 'async
;; (file-relative-name dir)
;; "-f" "-n" "update" "-d" "-P")
- (vc-exec-after
- `(vc-cvs-after-dir-status (quote ,update-function))))))
+ (vc-run-delayed
+ (vc-cvs-after-dir-status update-function)))))
(defun vc-cvs-dir-status-files (dir files _default-state update-function)
"Create a list of conses (file . state) for DIR."
(apply 'vc-cvs-command (current-buffer) 'async dir "-f" "status" files)
- (vc-exec-after
- `(vc-cvs-after-dir-status (quote ,update-function))))
+ (vc-run-delayed
+ (vc-cvs-after-dir-status update-function)))
(defun vc-cvs-file-to-string (file)
"Read the content of FILE and return it as a string."
;; Normally, we want async code such as sentinels to not move point.
(save-excursion
(goto-char m)
- ;; Each sentinel may move point and the next one should be run
- ;; at that new point. We could get the same result by having
- ;; each sentinel read&set process-mark, but since `cmd' needs
- ;; to work both for async and sync processes, this would be
- ;; difficult to achieve.
+ ;; Each sentinel may move point and the next one should be run
+ ;; at that new point. We could get the same result by having
+ ;; each sentinel read&set process-mark, but since `cmd' needs
+ ;; to work both for async and sync processes, this would be
+ ;; difficult to achieve.
(vc-exec-after code)
(move-marker m (point)))
;; But sometimes the sentinels really want to move point.
"Eval CODE when the current buffer's process is done.
If the current buffer has no process, just evaluate CODE.
Else, add CODE to the process' sentinel.
-CODE can be either a function of no arguments, or an expression
-to evaluate."
+CODE should be a function of no arguments."
(let ((proc (get-buffer-process (current-buffer))))
(cond
;; If there's no background process, just execute the code.
(t (error "Unexpected process state"))))
nil)
+(defmacro vc-run-delayed (&rest body)
+ (declare (indent 0) (debug t))
+ `(vc-exec-after (lambda () ,@body)))
+
(defvar vc-post-command-functions nil
"Hook run at the end of `vc-do-command'.
Each function is called inside the buffer in which the command was run
(set-process-filter proc 'vc-process-filter)
(setq status proc)
(when vc-command-messages
- (vc-exec-after
- `(message "Running %s in background... done" ',full-command))))
+ (vc-run-delayed
+ (message "Running %s in background... done" full-command))))
;; Run synchronously
(when vc-command-messages
(message "Running %s in foreground..." full-command))
(if (integerp status) (format "status %d" status) status)))
(when vc-command-messages
(message "Running %s...OK = %d" full-command status))))
- (vc-exec-after
- `(run-hook-with-args 'vc-post-command-functions
- ',command ',file-or-list ',flags))
+ (vc-run-delayed
+ (run-hook-with-args 'vc-post-command-functions
+ command file-or-list flags))
status))))
(defun vc-do-async-command (buffer root command &rest args)
(cond
((derived-mode-p 'vc-dir-mode)
(with-current-buffer process-buffer
- (vc-exec-after
- `(if (buffer-live-p ,buf)
- (with-current-buffer ,buf
- (vc-dir-refresh))))))
+ (vc-run-delayed
+ (if (buffer-live-p buf)
+ (with-current-buffer buf
+ (vc-dir-refresh))))))
((derived-mode-p 'dired-mode)
(with-current-buffer process-buffer
- (vc-exec-after
- `(and (buffer-live-p ,buf)
- (= (buffer-modified-tick ,buf) ,tick)
- (with-current-buffer ,buf
- (revert-buffer)))))))))
+ (vc-run-delayed
+ (and (buffer-live-p buf)
+ (= (buffer-modified-tick buf) tick)
+ (with-current-buffer buf
+ (revert-buffer)))))))))
;; These functions are used to ensure that the view the user sees is up to date
;; even if the dispatcher client mode has messed with file contents (as in,
(`diff-index
(vc-git-command (current-buffer) 'async files
"diff-index" "--relative" "-z" "-M" "HEAD" "--")))
- (vc-exec-after
- `(vc-git-after-dir-status-stage ',stage ',files ',update-function)))
+ (vc-run-delayed
+ (vc-git-after-dir-status-stage stage files update-function)))
(defun vc-git-dir-status (_dir update-function)
"Return a list of (FILE STATE EXTRA) entries for DIR."
It is based on `log-edit-mode', and has Git-specific extensions.")
(defun vc-git-checkin (files _rev comment)
- (let ((coding-system-for-write vc-git-commits-coding-system))
+ (let* ((file1 (or (car files) default-directory))
+ (root (vc-git-root file1))
+ (default-directory (expand-file-name root))
+ (only (or (cdr files)
+ (not (equal root (abbreviate-file-name file1)))))
+ (coding-system-for-write vc-git-commits-coding-system))
(cl-flet ((boolean-arg-fn
(argument)
(lambda (value) (when (equal value "yes") (list argument)))))
- (apply 'vc-git-command nil 0 files
+ ;; When operating on the whole tree, better pass nil than ".", since "."
+ ;; fails when we're committing a merge.
+ (apply 'vc-git-command nil 0 (if only files)
(nconc (list "commit" "-m")
(log-edit-extract-headers
`(("Author" . "--author")
("Amend" . ,(boolean-arg-fn "--amend"))
("Sign-Off" . ,(boolean-arg-fn "--signoff")))
comment)
- (list "--only" "--"))))))
+ (if only (list "--only" "--")))))))
(defun vc-git-find-revision (file rev buffer)
(let* (process-file-side-effects
nil
"cat-file" "blob" (concat (if rev rev "HEAD") ":" fullname))))
-(defun vc-git-ignore (file &optional directory remove)
- "Ignore FILE under Git.
-If DIRECTORY is non-nil, the repository to use will be deduced by
-DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
- (let (gitignore)
- (if directory
- (setq gitignore (vc-git-find-ignore-file directory))
- (setq gitignore (vc-git-find-ignore-file default-directory)))
- (if remove
- (vc--remove-regexp file gitignore)
- (vc--add-line file gitignore))))
-
-(defun vc-git-ignore-completion-table (file)
- "Return the list of ignored files."
- (vc--read-lines (vc-git-find-ignore-file file)))
-
(defun vc-git-find-ignore-file (file)
"Return the root directory of the repository of FILE."
(expand-file-name ".gitignore"
command (cadr args)
args (cddr args)))
(apply 'vc-do-async-command buffer root git-program command args)
- (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'git)))
+ (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git)))
(vc-set-async-update buffer)))
(defun vc-git-merge-branch ()
nil t)))
(apply 'vc-do-async-command buffer root vc-git-program "merge"
(list merge-source))
- (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'git)))
+ (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git)))
(vc-set-async-update buffer)))
;;; HISTORY FUNCTIONS
(vc-hg-command buffer 0 file "cat" "-r" rev)
(vc-hg-command buffer 0 file "cat"))))
-(defun vc-hg-ignore (file &optional directory remove)
- "Ignore FILE under Mercurial.
-If DIRECTORY is non-nil, the repository to use will be deduced by
-DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
- (let (hgignore)
- (if directory
- (setq hgignore (vc-hg-find-ignore-file directory))
- (setq hgignore (vc-hg-find-ignore-file default-directory)))
- (if remove
- (vc--remove-regexp file hgignore)
- (vc--add-line file hgignore))))
-
-(defun vc-hg-ignore-completion-table (file)
- "Return the list of ignored files."
- (vc--read-lines (vc-hg-find-ignore-file file)))
-
(defun vc-hg-find-ignore-file (file)
"Return the root directory of the repository of FILE."
(expand-file-name ".hgignore"
(defun vc-hg-dir-status (dir update-function)
(vc-hg-command (current-buffer) 'async dir "status" "-C")
- (vc-exec-after
- `(vc-hg-after-dir-status (quote ,update-function))))
+ (vc-run-delayed
+ (vc-hg-after-dir-status update-function)))
(defun vc-hg-dir-status-files (dir files _default-state update-function)
(apply 'vc-hg-command (current-buffer) 'async dir "status" "-C" files)
- (vc-exec-after
- `(vc-hg-after-dir-status (quote ,update-function))))
+ (vc-run-delayed
+ (vc-hg-after-dir-status update-function)))
(defun vc-hg-dir-extra-header (name &rest commands)
(concat (propertize name 'face 'font-lock-type-face)
args (cddr args)))
(apply 'vc-do-async-command buffer root hg-program
command args)
- (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'hg)))
+ (with-current-buffer buffer
+ (vc-run-delayed (vc-compilation-mode 'hg)))
(vc-set-async-update buffer)))))
(defun vc-hg-merge-branch ()
(let* ((root (vc-hg-root default-directory))
(buffer (format "*vc-hg : %s*" (expand-file-name root))))
(apply 'vc-do-async-command buffer root vc-hg-program '("merge"))
- (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'hg)))
+ (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'hg)))
(vc-set-async-update buffer)))
;;; Internal functions
(defun vc-mtn-dir-status (dir update-function)
(vc-mtn-command (current-buffer) 'async dir "status")
- (vc-exec-after
- `(vc-mtn-after-dir-status (quote ,update-function))))
+ (vc-run-delayed
+ (vc-mtn-after-dir-status update-function)))
(defun vc-mtn-working-revision (file)
;; If `mtn' fails or returns status>0, or if the search fails, just
-;;; vc-rcs.el --- support for RCS version-control
+;;; vc-rcs.el --- support for RCS version-control -*- lexical-binding:t -*-
;; Copyright (C) 1992-2013 Free Software Foundation, Inc.
;; No, it was some other error: re-signal it.
(signal (car err) (cdr err)))))))))
-(defun vc-rcs-revert (file &optional contents-done)
+(defun vc-rcs-revert (file &optional _contents-done)
"Revert FILE to the version it was based on. If FILE is a directory,
revert all registered files beneath it."
(if (file-directory-p file)
(when (looking-at "[\b\t\n\v\f\r ]+")
(delete-char (- (match-end 0) (match-beginning 0))))))
-(defun vc-rcs-print-log (files buffer &optional shortlog
- start-revision-ignored limit)
+(defun vc-rcs-print-log (files buffer &optional _shortlog
+ _start-revision-ignored limit)
"Print commit log associated with FILES into specified BUFFER.
Remaining arguments are ignored.
If FILE is a directory the operation is applied to all registered
(string-match "[0-9]+\\'" rev)
(substring rev (match-beginning 0) (match-end 0)))
-(defun vc-rcs-previous-revision (file rev)
+(defun vc-rcs-previous-revision (_file rev)
"Return the revision number immediately preceding REV for FILE,
or nil if there is no previous revision. This default
implementation works for MAJOR.MINOR-style revision numbers as
;; only the former since it behaves identically to the
;; latter in the absence of "@@".)
sub)
- (cl-flet ((incg (beg end)
- (let ((b beg) (e end) @-holes)
+ (cl-flet ((incg (_beg end)
+ (let ((e end) @-holes)
(while (and asc (< (car asc) e))
(push (pop asc) @-holes))
;; Self-deprecate when work is done.
-;;; vc-sccs.el --- support for SCCS version-control
+;;; vc-sccs.el --- support for SCCS version-control -*- lexical-binding:t -*-
;; Copyright (C) 1992-2013 Free Software Foundation, Inc.
;;; Properties of the backend
(defun vc-sccs-revision-granularity () 'file)
-(defun vc-sccs-checkout-model (files) 'locking)
+(defun vc-sccs-checkout-model (_files) 'locking)
;;;
;;; State-querying functions
(vc-name file) (concat "-r" discard))
(vc-sccs-do-command nil 0 "get" (vc-name file) nil))))
-(defun vc-sccs-revert (file &optional contents-done)
+(defun vc-sccs-revert (file &optional _contents-done)
"Revert FILE to the version it was based on. If FILE is a directory,
revert all subfiles."
(if (file-directory-p file)
;;; History functions
;;;
-(defun vc-sccs-print-log (files buffer &optional shortlog start-revision-ignored limit)
+(defun vc-sccs-print-log (files buffer &optional _shortlog _start-revision-ignored limit)
"Print commit log associated with FILES into specified BUFFER.
Remaining arguments are ignored."
(setq files (vc-expand-dirs files))
(autoload 'vc-setup-buffer "vc-dispatcher")
(autoload 'vc-delistify "vc-dispatcher")
+(defvar w32-quote-process-args)
+
;; FIXME use sccsdiff if present?
(defun vc-sccs-diff (files &optional oldvers newvers buffer)
"Get a difference report using SCCS between two filesets."
-;;; vc-svn.el --- non-resident support for Subversion version-control
+;;; vc-svn.el --- non-resident support for Subversion version-control -*- lexical-binding:t -*-
;; Copyright (C) 2003-2013 Free Software Foundation, Inc.
;;; Properties of the backend
(defun vc-svn-revision-granularity () 'repository)
-(defun vc-svn-checkout-model (files) 'implicit)
+(defun vc-svn-checkout-model (_files) 'implicit)
;;;
;;; State-querying functions
(remote (or t (not local) (eq local 'only-file))))
(vc-svn-command (current-buffer) 'async nil "status"
(if remote "-u"))
- (vc-exec-after
- `(vc-svn-after-dir-status (quote ,callback) ,remote))))
+ (vc-run-delayed
+ (vc-svn-after-dir-status callback remote))))
-(defun vc-svn-dir-status-files (dir files default-state callback)
+(defun vc-svn-dir-status-files (dir files _default-state callback)
(apply 'vc-svn-command (current-buffer) 'async nil "status" files)
- (vc-exec-after
- `(vc-svn-after-dir-status (quote ,callback))))
+ (vc-run-delayed
+ (vc-svn-after-dir-status callback)))
(defun vc-svn-dir-extra-headers (dir)
"Generate extra status headers for a Subversion working copy."
;; vc-svn-mode-line-string doesn't exist because the default implementation
;; works just fine.
-(defun vc-svn-previous-revision (file rev)
+(defun vc-svn-previous-revision (_file rev)
(let ((newrev (1- (string-to-number rev))))
(when (< 0 newrev)
(number-to-string newrev))))
(autoload 'vc-switches "vc")
-(defun vc-svn-register (files &optional rev comment)
+(defun vc-svn-register (files &optional _rev _comment)
"Register FILES into the SVN version-control system.
The COMMENT argument is ignored This does an add but not a commit.
Passes either `vc-svn-register-switches' or `vc-register-switches'
"Return non-nil if FILE could be registered in SVN.
This is only possible if SVN is responsible for FILE's directory.")
-(defun vc-svn-checkin (files rev comment &optional extra-args-ignored)
+(defun vc-svn-checkin (files rev comment &optional _extra-args-ignored)
"SVN-specific version of `vc-backend-checkin'."
(if rev (error "Committing to a specific revision is unsupported in SVN"))
(let ((status (apply
(defun vc-svn-ignore (file &optional directory remove)
"Ignore FILE under Subversion.
-If DIRECTORY is non-nil, the repository to use will be deduced by
-DIRECTORY; if REMOVE is non-nil, remove FILE from ignored files."
+FILE is a file wildcard, relative to the root directory of DIRECTORY."
(vc-svn-command t 0 file "propedit" "svn:ignore"))
-(defun vc-svn-ignore-completion-table (file)
+(defun vc-svn-ignore-completion-table (_file)
"Return the list of ignored files."
)
(vc-mode-line file 'SVN)
(message "Checking out %s...done" file))
-(defun vc-svn-update (file editable rev switches)
+(defun vc-svn-update (file _editable rev switches)
(if (and (file-exists-p file) (not rev))
;; If no revision was specified, there's nothing to do.
nil
(error "Couldn't analyze svn update result")))
(message "Merging changes into %s...done" file))))
-(defun vc-svn-modify-change-comment (files rev comment)
+(defun vc-svn-modify-change-comment (_files rev comment)
"Modify the change comments for a specified REV.
You must have ssh access to the repository host, and the directory Emacs
uses locally for temp files must also be writable by you on that host.
(autoload 'vc-setup-buffer "vc-dispatcher")
-(defun vc-svn-print-log (files buffer &optional shortlog start-revision limit)
+(defun vc-svn-print-log (files buffer &optional _shortlog start-revision limit)
"Print commit log associated with FILES into specified BUFFER.
SHORTLOG is ignored.
If START-REVISION is non-nil, it is the newest revision to show.
;; This function is used in `vc-stay-local-p' which backends can use
;; for their convenience.
;;
-;; - ignore (file &optional remove)
+;; - ignore (file &optional directory)
;;
-;; Ignore FILE under the current VCS. When called interactively and
-;; with a prefix argument, remove an ignored file. When called from
-;; Lisp code, if REMOVE is non-nil, remove FILE from ignored files."
+;; Ignore FILE under the VCS of DIRECTORY (default is `default-directory').
+;; FILE is a file wildcard.
+;; When called interactively and with a prefix argument, remove FILE
+;; from ignored files.
+;; When called from Lisp code, if DIRECTORY is non-nil, the
+;; repository to use will be deduced by DIRECTORY.
;;
;; - ignore-completion-table
;;
(let ((vc-handled-backends (list backend)))
(call-interactively 'vc-register)))
-(defun vc-ignore (file &optional directory remove)
+(defun vc-ignore (file &optional directory)
"Ignore FILE under the VCS of DIRECTORY (default is `default-directory').
+FILE is a file wildcard.
When called interactively and with a prefix argument, remove FILE
from ignored files.
When called from Lisp code, if DIRECTORY is non-nil, the
-repository to use will be deduced by DIRECTORY; if REMOVE is
-non-nil, remove FILE from ignored files."
+repository to use will be deduced by DIRECTORY."
(interactive
- (if (null current-prefix-arg)
- (list (read-file-name "The file to ignore: "))
- (list
- (completing-read
- "The file to remove: "
- (vc-call-backend
- (vc-backend default-directory)
- 'ignore-completion-table default-directory)))))
- (let (backend)
- (if directory
- (progn (setq backend (vc-backend default-directory))
- (vc-call-backend backend 'ignore file directory remove))
- (setq backend (vc-backend directory))
- (vc-call-backend backend 'ignore file default-directory remove))))
-
-(defun vc-default-ignore-completion-table (_file)
- "Return the list of ignored files."
- ;; Unused lexical argument `file'
- nil)
+ (list (read-file-name "The file to ignore: ")
+ (completing-read
+ "The file to remove: "
+ (vc-call-backend
+ (vc-backend default-directory)
+ 'ignore-completion-table default-directory))))
+ (let* ((directory (or directory default-directory))
+ (backend (vc-backend default-directory))
+ (remove current-prefix-arg))
+ (vc-call-backend backend 'ignore file directory remove)))
+
+(defun vc-default-ignore (backend file &optional directory remove)
+ "Ignore FILE under the VCS of DIRECTORY (default is `default-directory').
+FILE is a file wildcard, relative to the root directory of DIRECTORY.
+When called from Lisp code, if DIRECTORY is non-nil, the
+repository to use will be deduced by DIRECTORY; if REMOVE is
+non-nil, remove FILE from ignored files.
+Argument BACKEND is the backend you are using."
+ (let ((ignore
+ (vc-call-backend backend 'find-ignore-file (or directory default-directory)))
+ (pattern (file-relative-name
+ (expand-file-name file) (file-name-directory file))))
+ (if remove
+ (vc--remove-regexp pattern ignore)
+ (vc--add-line pattern ignore))))
+
+(defun vc-default-ignore-completion-table (backend file)
+ "Return the list of ignored files under BACKEND."
+ (vc--read-lines
+ (vc-call-backend backend 'find-ignore-file file)))
(defun vc--read-lines (file)
"Return a list of lines of FILE."
;; (vc-file-tree-walk
;; default-directory
;; (lambda (f)
-;; (vc-exec-after
-;; `(let ((coding-system-for-read (vc-coding-system-for-diff ',f)))
-;; (message "Looking at %s" ',f)
-;; (vc-call-backend ',(vc-backend f)
-;; 'diff (list ',f) ',rev1 ',rev2))))))
+;; (vc-run-delayed
+;; (let ((coding-system-for-read (vc-coding-system-for-diff f)))
+;; (message "Looking at %s" f)
+;; (vc-call-backend (vc-backend f)
+;; 'diff (list f) rev1 rev2))))))
(defvar vc-coding-system-inherit-eol t
"When non-nil, inherit the EOL format for reading Diff output from the file.
(diff-mode)
(set (make-local-variable 'diff-vc-backend) (car vc-fileset))
(set (make-local-variable 'revert-buffer-function)
- `(lambda (ignore-auto noconfirm)
- (vc-diff-internal ,async ',vc-fileset ,rev1 ,rev2 ,verbose)))
+ (lambda (_ignore-auto _noconfirm)
+ (vc-diff-internal async vc-fileset rev1 rev2 verbose)))
;; Make the *vc-diff* buffer read only, the diff-mode key
;; bindings are nicer for read only buffers. pcl-cvs does the
;; same thing.
;; The diff process may finish early, so call `vc-diff-finish'
;; after `pop-to-buffer'; the former assumes the diff buffer is
;; shown in some window.
- (vc-exec-after `(vc-diff-finish ,(current-buffer)
- ',(when verbose messages)))
+ (let ((buf (current-buffer)))
+ (vc-run-delayed (vc-diff-finish buf (when verbose messages))))
;; In the async case, we return t even if there are no differences
;; because we don't know that yet.
t)))
(defvar vc-log-view-type nil
"Set this to differentiate the different types of logs.")
(put 'vc-log-view-type 'permanent-local t)
+(defvar vc-sentinel-movepoint)
(defun vc-log-internal-common (backend
buffer-name
(set (make-local-variable 'log-view-vc-fileset) files)
(set (make-local-variable 'revert-buffer-function)
rev-buff-func))
- (vc-exec-after
- `(let ((inhibit-read-only t))
- (funcall ',setup-buttons-func ',backend ',files ',retval)
- (shrink-window-if-larger-than-buffer)
- (funcall ',goto-location-func ',backend)
- (setq vc-sentinel-movepoint (point))
- (set-buffer-modified-p nil)))))
+ (vc-run-delayed
+ (let ((inhibit-read-only t))
+ (funcall setup-buttons-func backend files retval)
+ (shrink-window-if-larger-than-buffer)
+ (funcall goto-location-func backend)
+ (setq vc-sentinel-movepoint (point))
+ (set-buffer-modified-p nil)))))
(defun vc-incoming-outgoing-internal (backend remote-location buffer-name type)
(vc-log-internal-common
+2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ Makefile improvements.
+ * Makefile.in (all): Put this first. Don't use double-colon
+ rules, as they are not portable according to POSIX. Mark as phony.
+
2013-06-30 Paul Eggert <eggert@cs.ucla.edu>
Fix minor problems found by static checking.
-Demacs -I../src \
-I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
+all: liblw.a
+.PHONY: all
+
.c.o:
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
-all:: liblw.a
-
liblw.a: $(OBJS)
rm -f $@
$(AR) $(ARFLAGS) $@ $(OBJS)
ln config.nt emacsclient.rc emacs-src.tags ../${tempdir}/nt
ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt
ln Makefile.in gnulib.mk ../${tempdir}/nt
- ln msysconfig.sh mingw-cfg.site epaths.nt INSTALL.MSYS ../${tempdir}/nt
+ ln msysconfig.sh mingw-cfg.site epaths.nt INSTALL.OLD ../${tempdir}/nt
ln ChangeLog INSTALL README README.W32 makefile.w32-in ../${tempdir}/nt)
echo "Making links to \`nt/inc' and its subdirectories"
+2013-09-02 Jan Djärv <jan.h.d@swipnet.se>
+
+ * Makefile.in (${ns_check_file}): Add so Emacs.app gets properly
+ updated when doing parallel make install.
+
+2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+ for portability to hosts where /bin/sh has problems.
+
2013-06-02 Jan Djärv <jan.h.d@swipnet.se>
* templates/Info-gnustep.plist.in: Add NSDocumentClass EmacsDocument.
### Commentary:
### Code:
-SHELL = /bin/sh
+SHELL = @SHELL@
srcdir = @srcdir@
EXEEXT = @EXEEXT@
ns_appdir = @ns_appdir@
ns_appbindir = @ns_appbindir@
ns_appsrc = @ns_appsrc@
+ns_check_file = @ns_appdir@/@ns_check_file@
-${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
+${ns_check_file} ${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
rm -rf ${ns_appdir}
${MKDIR_P} ${ns_appdir}
( cd ${srcdir}/${ns_appsrc} ; tar cfh - . ) | \
( cd ${ns_appdir} ; umask 022; tar xf - )
touch ${ns_appdir}
-${ns_appbindir}/Emacs: ${ns_appdir} ../src/emacs${EXEEXT}
+${ns_appbindir}/Emacs: ${ns_appdir} ${ns_check_file} ../src/emacs${EXEEXT}
${MKDIR_P} ${ns_appbindir}
cp -f ../src/emacs${EXEEXT} ${ns_appbindir}/Emacs
+2013-08-31 Glenn Morris <rgm@gnu.org>
+
+ * INSTALL: Rename from INSTALL.MSYS.
+ * INSTALL.OLD: Rename from INSTALL.
+ * configure.bat: Update for INSTALL name changes.
+
2013-08-25 Vincent Belaïche <vincentb1@users.sourceforge.net>
* configure.bat: Rather than disabling, make configure.bat produce
- Building and Installing Emacs on Windows
- (from 95 to 7 and beyond)
+ Building and Installing Emacs on MS-Windows
+ using the MSYS and MinGW tools
- Copyright (C) 2001-2013 Free Software Foundation, Inc.
+ Copyright (C) 2013 Free Software Foundation, Inc.
See the end of the file for license conditions.
-*** This method of building Emacs is no longer supported. ***
- Instead, see INSTALL.MSYS.
+The MSYS/MinGW build described here is supported on versions of
+Windows starting with Windows 2000 and newer. Windows 9X are not
+supported (but the Emacs binary produced by this build will run on
+Windows 9X as well).
-* For the impatient
+* For the brave (a.k.a. "impatient"):
- Here are the concise instructions for configuring and building the
- native Windows binary of Emacs, for those who want to skip the
- complex explanations and ``just do it'':
+ For those who have a working MSYS/MinGW development environment and
+ are comfortable with running Posix configure scripts, here are the
+ concise instructions for configuring and building the native Windows
+ binary of Emacs with these tools.
- Do not use this recipe with Cygwin. For building on Cygwin,
- use the normal installation instructions, ../INSTALL.
+ Do not use this recipe with Cygwin. For building on Cygwin, use the
+ normal installation instructions, ../INSTALL.
- Do not use these instructions with MSYS environment. For building
- the native Windows binary with MinGW and MSYS, follow the
- instructions in the file INSTALL.MSYS in this directory.
+ 0. Start the MSYS Bash window. Everything else below is done from
+ that window's Bash prompt.
- For building without MSYS, if you have a Cygwin or MSYS port of Bash
- on your Path, you will be better off removing it from PATH. (For
- details, search for "MSYS sh.exe" below.)
+ 0a. If you are building from the development trunk (as opposed to a
+ release tarball), produce the configure script, by typing from
+ the top-level Emacs source directory:
- 1. Change to the `nt' directory (the directory of this file):
+ ./autogen.sh
- cd nt
+ 1. If you want to build Emacs outside of the source tree
+ (recommended), create the build directory and chdir there.
- 2. Run configure.bat.
+ 2. Invoke the MSYS-specific configure script:
- 2a.If you use MSVC, set up the build environment by running the
- SetEnv.cmd batch file from the appropriate SDK directory. (Skip
- this step if you are using MinGW.) For example:
+ - If you are building outside the source tree:
- "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Debug
+ /PATH/TO/EMACS/SOURCE/TREE/nt/msysconfig.sh --prefix=PREFIX ...
- if you are going to compile a debug version, or
+ - If you are building in-place, i.e. inside the source tree:
- "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Release
+ ./nt/msysconfig.sh --prefix=PREFIX ...
- if you are going to compile an optimized version.
+ It is always preferable to use --prefix to configure Emacs for
+ some specific location of its installed tree; the default
+ /usr/local is not suitable for Windows (see the detailed
+ instructions for the reasons).
- 2b.From the COMMAND.COM/CMD.EXE command prompt type:
+ You can pass other options to the configure script. Here's a
+ typical example (for an in-place debug build):
- configure
+ CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=/d/usr/emacs --enable-checking
- From a Unixy shell prompt:
+ 3. After the configure script finishes, it should display the
+ resulting configuration. After that, type
- cmd /c configure.bat
- or
- command.com /c configure.bat
+ make
- 3. Run the Make utility suitable for your environment. If you build
- with the Microsoft's Visual C compiler:
+ Use "make -j N" if your MSYS Make supports parallel execution;
+ the build will take significantly less time in that case. Here N
+ is the number of simultaneous parallel jobs; use the number of
+ the cores on your system.
- nmake
+ 4. Install the produced binaries:
- For the development environments based on GNU GCC (MinGW, MSYS,
- Cygwin - but see notes about Cygwin make below), depending on how
- Make is called, it could be:
+ make install
- make
- or
- mingw32-make
- or
- gnumake
- or
- gmake
+ If you want the installation tree to go to a place that is
+ different from the one specified by --prefix, say
- (If you are building from Bazaar, say "make bootstrap" or "nmake
- bootstrap" instead, and avoid using Cygwin make.)
+ make install prefix=/where/ever/you/want
- With GNU Make, you can use the -j command-line option to have
- Make execute several commands at once, like this:
+ That's it!
- gmake -j 2
+ If these short instructions somehow fail, read the rest of this
+ file.
- (With versions of GNU Make before 3.82, you need also set the
- XMFLAGS variable, like this:
+* Installing MinGW and MSYS
- gmake -j 2 XMFLAGS="-j 2"
+ Make sure you carefully read the following two sections in their
+ entirety and install/configure the various packages as instructed.
+ A correct installation makes all the rest almost trivial; a botched
+ installation will likely make you miserable for quite some time.
- The XMFLAGS variable overrides the default behavior of version
- 3.82 and older of GNU Make on Windows, whereby recursive Make
- invocations reset the maximum number of simultaneous commands to
- 1. The above command allows up to 4 simultaneous commands at
- once in the top-level Make, and up to 3 in each one of the
- recursive Make's.)
+ There are two alternative to installing MinGW + MSYS: using the GUI
+ installer, called mingw-get, provided by the MinGW project, or
+ manual installation. The next two sections describe each one of
+ these.
- 4. Generate the Info manuals (only if you are building out of Bazaar,
- and if you have makeinfo.exe installed):
+** Installing MinGW and MSYS using mingw-get
- make info
+ A nice installer, called mingw-get, is available for those who don't
+ like to mess with manual installations. You can download it from
+ here:
- (change "make" to "nmake" if you use MSVC).
+ https://sourceforge.net/projects/mingw/files/Installer/mingw-get/
- 5. Install the produced binaries:
+ (This installer only supports packages downloaded from the MinGW
+ site; for the rest you will still need the manual method.)
- make install
+ After installing mingw-get, invoke it to install the packages that
+ are already selected by default on the "Select Components" screen of
+ its wizard.
- That's it!
+ After that, use "mingw-get install PACKAGE" to install the following
+ additional packages:
- If these short instructions somehow fail, read the rest of this
- file.
+ . msys-base
+ . mingw-developer-toolkit
-* Preliminaries
+ (We recommend that you refrain from installing the MSYS Texinfo
+ package, which is part of msys-base, because it might produce mixed
+ EOL format when installing Info files. Instead, install the MinGW
+ port of Texinfo, see the ezwinports URL below. To uninstall the
+ MSYS Texinfo, after installing it as part of msys-base, invoke the
+ command "mingw-get remove msys-texinfo".)
- If you want to build a Cygwin port of Emacs, use the instructions in
- the INSTALL file in the main Emacs directory (the parent of this
- directory). These instructions are for building a native Windows
- binary of Emacs.
+ At this point, you should be ready to configure and build Emacs in
+ its basic configuration. Skip to the "Generating the configure
+ script" section for the build instructions. If you want to build it
+ with image support and other optional libraries, read about the
+ optional libraries near the end of this document, before you start
+ the build. Also, consider installing additional MinGW packages that
+ are required/recommended, especially if you are building from the
+ Bazaar repository, as described in the next section.
- If you used WinZip to unpack the distribution, we suggest to
- remove the files and unpack again with a different program!
- WinZip is known to create some subtle and hard to debug problems,
- such as converting files to DOS CR-LF format, not creating empty
- directories, etc. We suggest to use djtarnt.exe from the GNU FTP
- site. For modern formats, such as .tar.xz, we suggest bsdtar.exe
- from the libarchive package; its precompiled Windows binaries are
- available from this site:
+** Installing MinGW and MSYS manually
+
+*** MinGW
+
+ You will need to install the MinGW port of GCC and Binutils, and the
+ MinGW runtime and Windows API distributions, to compile Emacs. You
+ can find these on the MinGW download/Base page:
+
+ https://sourceforge.net/projects/mingw/files/MinGW/Base/
+
+ In general, install the latest stable versions of the following
+ MinGW packages from that page: gcc, binutils, mingw-rt, w32api. You
+ only need the 'bin' and the 'dll' tarballs of each of the above.
+
+ MinGW packages are distributed as .tar.lzma compressed archives. To
+ install the packages manually, we recommend to use the Windows port
+ of the 'bsdtar' program to unpack the tarballs. 'bsdtar' is
+ available as part of the 'libarchive' package from here:
http://sourceforge.net/projects/ezwinports/files/
- In addition to this file, if you build a development snapshot, you
- should also read INSTALL.BZR in the parent directory.
-
-* Supported development environments
-
- To compile Emacs, you will need either Microsoft Visual C++ 2.0, or
- later and nmake, or a Windows port of GCC 2.95 or later with MinGW
- and Windows API support and a port of GNU Make. You can use the Cygwin
- ports of GCC, but Emacs requires the MinGW headers and libraries to
- build (latest versions of the Cygwin toolkit, at least since v1.3.3,
- include the MinGW headers and libraries as an integral part).
-
- The rest of this file assumes you have a working development
- environment. If you just installed such an environment, try
- building a trivial C "Hello world" program, and see if it works. If
- it doesn't work, resolve that problem first! If you use Microsoft
- Visual Studio .NET 2003, don't forget to run the VCVARS32.BAT batch
- file from the `Bin' subdirectory of the directory where you have
- installed VS.NET. With other versions of MSVC, run the SetEnv.cmd
- batch file from the `Bin' subdirectory of the directory where you
- have the SDK installed.
-
- If you use the MinGW port of GCC and GNU Make to build Emacs, there
- are some compatibility issues wrt Make and the shell that is run by
- Make, either the standard COMMAND.COM/CMD.EXE supplied with Windows
- or sh.exe, a port of a Unixy shell. For reference, below is a list
- of which builds of GNU Make are known to work or not, and whether
- they work in the presence and/or absence of sh.exe, the Cygwin port
- of Bash. Note that any version of Make that is compiled with Cygwin
- will only work with Cygwin tools, due to the use of Cygwin style
- paths. This means Cygwin Make is unsuitable for building parts of
- Emacs that need to invoke Emacs itself (leim and "make bootstrap",
- for example). Also see the Trouble-shooting section below if you
- decide to go ahead and use Cygwin make.
-
- In addition, using 4NT or TCC as your shell is known to fail the
- build process, at least since 4NT version 3.01. Use CMD.EXE, the
- default Windows shell, instead. MSYS sh.exe also appears to cause
- various problems, e.g., it is known to cause failures in commands
- like "cmd /c FOO" in the Makefiles, because it thinks "/c" is a
- Unix-style file name that needs conversion to the Windows format.
- If you have MSYS installed, try "make SHELL=cmd.exe" to force the
- use of cmd.exe instead of the MSYS sh.exe.
-
- sh exists no sh
-
- cygwin b20.1 make (3.75): fails[1, 5] fails[2, 5]
- MSVC compiled gmake 3.77: okay okay
- MSVC compiled gmake 3.78.1: okay okay
- MSVC compiled gmake 3.79.1: okay okay
- mingw32/gcc-2.92.2 make (3.77): okay okay[4]
- cygwin compiled gmake 3.77: fails[1, 5] fails[2, 5]
- cygwin compiled make 3.78.1: fails[5] fails[2, 5]
- cygwin compiled make 3.79.1: fails[3, 5] fails[2?, 5]
- cygwin compiled make 3.80: okay[6] fails?[7]
- cygwin compiled make 3.81: fails fails?[7]
- mingw32 compiled make 3.79.1: okay okay
- mingw32 compiled make 3.80: okay okay[7]
- mingw32 compiled make 3.81: okay okay[8]
-
- Notes:
-
- [1] doesn't cope with makefiles with DOS line endings, so must mount
- emacs source with text!=binary.
- [2] fails when needs to invoke shell commands; okay invoking gcc etc.
- [3] requires LC_MESSAGES support to build; cannot build with early
- versions of Cygwin.
- [4] may fail on Windows 9X and Windows ME; if so, install Bash.
- [5] fails when building leim due to the use of cygwin style paths.
- May work if building emacs without leim.
- [6] need to uncomment 3 lines in nt/gmake.defs that invoke `cygpath'
- (look for "cygpath" near line 85 of gmake.defs).
- [7] not recommended; please report if you try this combination.
- [8] tested only on Windows XP.
-
- Other compilers may work, but specific reports from people that have
- tried suggest that the Intel C compiler (for example) may produce an
- Emacs executable with strange filename completion behavior. Unless
- you would like to assist by finding and fixing the cause of any bugs
- like this, we recommend the use of the supported compilers mentioned
- in the previous paragraph.
-
- You will also need a copy of the POSIX cp, rm and mv programs. These
- and other useful POSIX utilities can be obtained from one of several
- projects:
-
- * http://gnuwin32.sourceforge.net/ ( GnuWin32 )
- * http://www.mingw.org/ ( MinGW )
- * http://www.cygwin.com/ ( Cygwin )
- * http://unxutils.sourceforge.net/ ( UnxUtils )
-
- If you build Emacs on 16-bit versions of Windows (9X or ME), we
- suggest to install the Cygwin port of Bash. That is because the
- native Windows shell COMMAND.COM is too limited; the Emacs build
- procedure tries very hard to support even such limited shells, but
- as none of the Windows developers of Emacs work on Windows 9X, we
- cannot guarantee that it works without a more powerful shell.
-
- Additional instructions and help for building Emacs on Windows can be
- found at the Emacs Wiki:
-
- http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
-
- and on these URLs:
-
- http://ourcomments.org/Emacs/w32-build-emacs.html
- http://derekslager.com/blog/posts/2007/01/emacs-hack-3-compile-emacs-from-cvs-on-windows.ashx
-
- Both of those pages were written before Emacs switched from CVS to
- Bazaar, but the parts about building Emacs still apply in Bazaar.
- The second URL has instructions for building with MSVC, as well as
- with MinGW, while the first URL covers only MinGW, but has more
- details about it.
-
-* Configuring
-
- Configuration of Emacs is now handled by running configure.bat in the
- `nt' subdirectory. It will detect which compiler you have available,
- and generate makefiles accordingly. You can override the compiler
- detection, and control optimization and debug settings, by specifying
- options on the command line when invoking configure.
-
- To configure Emacs to build with GCC or MSVC, whichever is available,
- simply change to the `nt' subdirectory and run `configure.bat' with no
- options. To see what options are available, run `configure --help'.
- Do NOT use the --no-debug option to configure.bat unless you are
- absolutely sure the produced binaries will never need to be run under
- a debugger.
-
- Because of limitations of the stock Windows command shells, special
- care is needed to pass some characters in the arguments of the
- --cflags and --ldflags options. Backslashes should not be used in
- file names passed to the compiler and linker via these options. Use
- forward slashes instead. If the arguments to these two options
- include the `=' character, like when passing a -DFOO=bar preprocessor
- option, the argument with the `=' character should be enclosed in
- quotes, like this:
-
- configure --cflags "-DFOO=bar"
-
- Support for options that include the `=' character require "command
- extensions" to be enabled. (They are enabled by default, but your
- system administrator could have changed that. See "cmd /?" for
- details.) If command extensions are disabled, a warning message might
- be displayed informing you that "using parameters that include the =
- character by enclosing them in quotes will not be supported."
-
- You may also use the --cflags and --ldflags options to pass
- additional parameters to the compiler and linker, respectively; they
- are frequently used to pass -I and -L flags to specify supplementary
- include and library directories. If a directory name includes
- spaces, you will need to enclose it in quotes, as follows
- -I"C:/Program Files/GnuTLS-2.10.1/include". Note that only the
- directory name is enclosed in quotes, not the entire argument. Also
- note that this functionality is only supported if command extensions
- are available. If command extensions are disabled and you attempt to
- use this functionality you may see the following warning message
- "Error in --cflags argument: ... Backslashes and quotes cannot be
- used with --cflags. Please use forward slashes for filenames and
- paths (e.g. when passing directories to -I)."
-
- N.B. It is normal to see a few error messages output while configure
- is running, when gcc support is being tested. These cannot be
- suppressed because of limitations in the Windows 9X command.com shell.
-
- You are encouraged to look at the file config.log which shows details
- for failed tests, after configure.bat finishes. Any unexplained failure
- should be investigated and perhaps reported as a bug (see the section
- about reporting bugs in the file README in this directory and in the
- Emacs manual).
+ The recommended place to install these packages is a single tree
+ starting from some directory on a drive other than the system drive
+ C:. A typical example would be D:\usr, with D:\usr\bin holding the
+ binaries and DLLs (should be added to your Path environment
+ variable), D:\usr\include holding the include files, D:\usr\lib
+ holding the static and import libraries, D:\usr\share holding docs,
+ message catalogs, and package-specific subdirectories, etc.
+
+ Having all the headers and libraries in a single place will greatly
+ reduce the number of -I and -L flags you will have to pass to the
+ configure script (see below), as these files will be right where the
+ compiler expects them.
+
+ We specifically do NOT recommend installing packages below
+ "C:\Program Files" or "C:\Program Files (x86)". These directories
+ are protected on versions of Windows from Vista and on, and you will
+ have difficulties updating and maintaining your installation later,
+ due to UAC elevation prompts, file virtualization, etc. You *have*
+ been warned!
+
+ Additional MinGW packages are required/recommended, especially if
+ you are building from the Bazaar repository:
+
+ . Texinfo (needed to produce the Info manuals when building from
+ bzr, and for "make install")
+
+ Available from http://sourceforge.net/projects/ezwinports/files/.
+
+ . gzip (needed to compress files during "make install")
+
+ Available from http://gnuwin32.sourceforge.net/packages/gzip.htm.
+
+ . pkg-config (needed for building with some optional libraries,
+ such as GnuTLS and libxml2)
+
+ Available from http://www.gtk.org/download/win32.php
+
+ Each package might list other packages as prerequisites on its
+ download page (under "Runtime requirements"); download those as
+ well. (Using the mingw-get installer will fetch those prerequisites
+ automatically for you.) A missing prerequisite will manifest itself
+ by the program failing to run and presenting a pop-up dialog that
+ states the missing or incompatible DLL; be sure to find and install
+ these missing DLLs.
+
+ Once you think you have MinGW installed, test the installation by
+ building a trivial "hello, world!" program, and make sure that it
+ builds without any error messages and the binary works when run.
+
+*** MSYS
+
+ You will need a reasonably full MSYS installation. MSYS is an
+ environment needed to run the Posix configure scripts and the
+ resulting Makefile's, in order to produce native Windows binaries
+ using the MinGW compiler and runtime libraries. Here's the list of
+ MSYS packages that are required:
+
+ . All the packages from the MSYS Base distribution, listed here:
+
+ https://sourceforge.net/projects/mingw/files/MSYS/Base/
+
+ . Additional packages listed below, from the MSYS Extension
+ distribution here:
+
+ https://sourceforge.net/projects/mingw/files/MSYS/Extension/
+
+ - flex
+ - bison
+ - m4
+ - perl
+ - mktemp
+
+ These should only be needed if you intend to build development
+ versions of Emacs from the Bazaar repository.
+
+ . Additional packages (needed only if building from the Bazaar
+ repository): Automake and Autoconf. They are available from
+ here:
+
+ http://sourceforge.net/projects/ezwinports/files/automake-1.11.6-msys-bin.zip/download
+ http://sourceforge.net/projects/ezwinports/files/autoconf-2.65-msys-bin.zip/download
+
+ MSYS packages are distributed as .tar.lzma compressed archives. To
+ install the packages manually, we recommend to use the Windows port
+ of the 'bsdtar' program, already mentioned above.
+
+ If/when you are confident in your MinGW/MSYS installation, and want
+ to speed up the builds, we recommend installing a pre-release
+ version of Make from here:
+
+ https://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/
+
+ These are snapshot builds of many packages, but you only need
+ make.exe from there. The advantage of this make.exe is that it
+ supports parallel builds, so you can use "make -j N" to considerably
+ speed up your builds.
+
+ Several users reported that MSYS 1.0.18 causes Make to hang in
+ parallel builds. If you bump into this, we suggest to downgrade to
+ MSYS 1.0.17, which doesn't have that problem.
+
+ For each of these packages, install the 'bin' and 'dll' tarballs of
+ their latest stable releases. If there's an 'ext' tarball (e.g.,
+ msysCORE and Coreutils have it), download and install those as well.
+
+ Each package might list other packages as prerequisites on its
+ download page (under "Runtime requirements"); download those as
+ well. (Using the mingw-get installer will fetch those prerequisites
+ automatically for you.) A missing prerequisite will manifest itself
+ by the program failing to run and presenting a pop-up dialog that
+ states the missing or incompatible DLL; be sure to find and install
+ these missing DLLs.
+
+ MSYS packages should be installed in a separate tree from MinGW.
+ For example, use D:\MSYS or D:\usr\MSYS as the top-level directory
+ from which you unpack all of the MSYS packages.
+
+ Do NOT add the MSYS bin directory to your Windows Path! Only the
+ MinGW bin directory should be on Path. When you install MSYS, it
+ creates a shortcut on your desktop that invokes the MSYS Bash shell
+ in a Command Prompt window; that shell is already set up so that the
+ MSYS bin directory is on PATH ahead of any other directory. Thus,
+ Bash will find MSYS executables first, which is exactly what you
+ need.
+
+ At this point, you are ready to build Emacs in its basic
+ configuration. If you want to build it with image support and other
+ optional libraries, read about that near the end of this document.
+
+* Generating the configure script
+
+ If you are building a release or pretest tarball, skip this section,
+ because the configure script is already present in the tarball.
+
+ To build a development snapshot from the Emacs Bazaar repository,
+ you will first need to generate the configure script and a few other
+ auto-generated files. (If this step, described below, somehow
+ fails, you can use the files in the autogen/ directory instead, but
+ they might be outdated, and, most importantly, you are well advised
+ not to disregard any failures in your local build procedures, as
+ these are likely to be symptoms of incorrect installation that will
+ bite you down the road.)
+
+ To generate the configure script, type this at the MSYS Bash prompt
+ from the top-level directory of the Emacs tree:
+
+ ./autogen.sh
+
+ If successful, this command should produce the following output:
+
+ $ ./autogen.sh
+ Checking whether you have the necessary tools...
+ (Read INSTALL.BZR for more details on building Emacs)
+
+ Checking for autoconf (need at least version 2.65)...
+ ok
+ Checking for automake (need at least version 1.11)...
+ ok
+ Your system has the required tools, running autoreconf...
+ You can now run `./configure'.
+
+* Configuring Emacs for MinGW:
+
+ Now it's time to run the configure script. You can do that either
+ from a separate build directory that is outside of the Emacs source
+ tree (recommended), or from inside the source tree. The former is
+ recommended because it allows you to have several different builds,
+ e.g., an optimized build and an unoptimized one, of the same
+ revision of the source tree; the source tree will be left in its
+ pristine state, without any build products.
+
+ You invoke the configure script like this:
+
+ /PATH/TO/EMACS/SOURCE/TREE/nt/msysconfig.sh --prefix=PREFIX ...
+
+ or, if you are building in-place, i.e. inside the source tree:
+
+ ./nt/msysconfig.sh --prefix=PREFIX ...
+
+ Here PREFIX is the place where you eventually want to install Emacs
+ once built, e.g. /d/usr. We recommend to always use --prefix when
+ building Emacs on Windows, because the default '/usr/local' is not
+ appropriate for Windows: it will be mapped by MSYS to something like
+ C:\MSYS\local, and it will defeat the purpose of PREFIX, which is to
+ install programs in a single coherent tree resembling Posix systems.
+ Such a single-tree installation makes sure all the other programs
+ and packages ported from GNU or Unix systems will work seamlessly
+ together. Where exactly is the root of that tree on your system is
+ something only you, the user who builds Emacs, can know, and the
+ Emacs build process cannot guess, because usually there's no
+ '/usr/local' directory on any drive on Windows systems.
+
+ Do NOT use Windows-style x:/foo/bar file names on the configure
+ script command line; use the MSYS-style /x/foo/bar instead. Using
+ Windows-style file names was reported to cause subtle and hard to
+ figure out problems during the build. This applies both to the
+ command switches, such as --prefix=, and to the absolute file name
+ of msysconfig.sh, if you are building outside of the source tree.
+
+ You can pass additional options to the configure script, for the
+ full list type
+
+ ./nt/msysconfig.sh --help
+
+ As explained in the help text, you may need to tell the script what
+ are the optional flags to invoke the compiler. This is needed if
+ some of your headers and libraries, e.g., those belonging to
+ optional image libraries, are installed in places where the compiler
+ normally doesn't look for them. (Remember that advice above to
+ avoid such situations? here's is where you will start paying for
+ disregarding that recommendation.) For example, if you have libpng
+ headers in C:\emacs\libs\libpng-1.2.37-lib\include and jpeg library
+ headers in C:\emacs\libs\jpeg-6b-4-lib\include, you will need to say
+ something like this:
+
+ CPPFLAGS='-I/c/emacs/libs/libpng-1.2.37-lib/include -I/c/emacs/libs/jpeg-6b-4-lib/include' ./nt/msysconfig.sh --prefix=PREFIX
+
+ which is quite a mouth-full, especially if you have more directories
+ to specify... Perhaps you may wish to revisit your installation
+ decisions now.
+
+ If you have a global site-lisp directory from previous Emacs
+ installation, and you want Emacs to continue using it, specify it
+ via the --enable-locallisppath switch to msysconfig.sh, like this:
+
+ ./nt/msysconfig.sh --prefix=PREFIX --enable-locallisppath="/d/usr/share/emacs/VERSION/site-lisp:/d/wherever/site-lisp"
+
+ Use the normal MSYS /d/foo/bar style to specify directories by their
+ absolute file names.
+
+ A few frequently used options are needed when you want to produce an
+ unoptimized binary with runtime checks enabled:
+
+ CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=PREFIX --enable-checking
+
+ Once invoked, the configure script will run for some time, and, if
+ successful, will eventually produce a summary of the configuration
+ like this:
+
+ Configured for `i686-pc-mingw32'.
+
+ Where should the build process find the source code? /path/to/emacs/sources
+ What compiler should emacs be built with? gcc -std=gnu99 -O0 -g3
+ Should Emacs use the GNU version of malloc? yes
+ Should Emacs use a relocating allocator for buffers? yes
+ Should Emacs use mmap(2) for buffer allocation? no
+ What window system should Emacs use? w32
+ What toolkit should Emacs use? none
+ Where do we find X Windows header files? NONE
+ Where do we find X Windows libraries? NONE
+ Does Emacs use -lXaw3d? no
+ Does Emacs use -lXpm? yes
+ Does Emacs use -ljpeg? yes
+ Does Emacs use -ltiff? yes
+ Does Emacs use a gif library? yes
+ Does Emacs use -lpng? yes
+ Does Emacs use -lrsvg-2? no
+ Does Emacs use imagemagick? no
+ Does Emacs use -lgpm? no
+ Does Emacs use -ldbus? no
+ Does Emacs use -lgconf? no
+ Does Emacs use GSettings? no
+ Does Emacs use -lselinux? no
+ Does Emacs use -lgnutls? yes
+ Does Emacs use -lxml2? yes
+ Does Emacs use -lfreetype? no
+ Does Emacs use -lm17n-flt? no
+ Does Emacs use -lotf? no
+ Does Emacs use -lxft? no
+ Does Emacs use toolkit scroll bars? yes
+
+ You are almost there, hang on.
+
+ If the output is significantly different, or if configure finishes
+ prematurely and displays some error message, you should examine the
+ configuration log in config.log and find the reason for the failure.
+
+ Once you succeeded in configuring Emacs, and just want to rebuild it
+ after updating your local repository from the main repository, you
+ don't need to re-run the configure script manually, unless you want
+ to change the configure-time options. Just typing "make" will
+ re-run configure if necessary with the exact same options you
+ specified originally, and then go on to invoking Make, described
+ below.
+
+* Running Make.
+
+ This is simple: just type "make" and sit back, watching the fun.
+
+ If you installed a snapshot build of Make, the build will be much
+ faster if you type "make -j N" instead, where N is the number of
+ independent processing units on your machine. E.g., on a core i7
+ system try using N of 6 or even 8. (If this hangs, see the notes
+ above about downgrading to MSYS 1.0.17.)
+
+ When Make finishes, you can install the produced binaries:
+
+ make install
+
+ or, if you want the installed tree to go in a place different from
+ the configured one, type
+
+ make install prefix=WHEREVER
+
+ Congrats! You have built and installed your own Emacs!
+
+* Make targets
+
+ The following make targets may be used by users building the source
+ distribution, or users who have checked out of Bazaar after
+ an initial bootstrapping.
+
+ make
+ Builds Emacs from the available sources and pre-compiled lisp files.
+
+ make install
+ Installs the built programs and the auxiliary files.
+
+ make clean
+ Removes object and executable files produced by the build process in
+ the current configuration. After "make clean", you can rebuild with
+ the same configuration using make. useful when you want to be sure
+ that all of the products are built from coherent sources.
+
+ make distclean
+ In addition to the files removed by make clean, this also removes
+ Makefiles and other generated files to get back to the state of a
+ freshly unpacked source distribution. After make distclean, it is
+ necessary to run the configure script followed by "make", in order
+ to rebuild.
+
+ The following targets are intended only for use with the Bazaar sources.
+
+ make bootstrap
+ Removes all the auto-generated files and all the *.elc byte-compiled
+ files, and builds Emacs from scratch. Useful when some change in
+ basic Emacs functionality makes byte compilation of updated files
+ fail.
+
+ make maintainer-clean
+ Removes everything that can be recreated, including compiled Lisp
+ files, to get back to the state of a fresh Bazaar tree. After make
+ maintainer-clean, it is necessary to run configure and "make" or
+ "make bootstrap" to rebuild. Occasionally it may be necessary to
+ run this target after an update.
* Optional image library support
support for svg.
To build Emacs with support for them, the corresponding headers must
- be in the include path when the configure script is run. This can
- be setup using environment variables, or by specifying --cflags
- -I... options on the command-line to configure.bat. The configure
- script will report whether it was able to detect the headers. If
- the results of this testing appear to be incorrect, please look for
+ be in the include path and libraries should be where the linker
+ looks for them, when the configure script is run. If needed, this
+ can be set up using the CPPFLAGS and CFLAGS variable specified on
+ the configure command line. The configure script will report
+ whether it was able to detect the headers and libraries. If the
+ results of this testing appear to be incorrect, please look for
details in the file config.log: it will show the failed test
programs and compiler error messages that should explain what is
wrong. (Usually, any such failures happen because some headers are
missing due to bad packaging of the image support libraries.)
Note that any file path passed to the compiler or linker must use
- forward slashes; using backslashes will cause compiler warnings or
- errors about unrecognized escape sequences.
+ forward slashes, or double each backslash, as that is how Bash
+ works.
+
+ If the configure script finds the necessary headers and libraries,
+ but they are for some reason incompatible, or if you want to omit
+ support for some image library that is installed on your system for
+ some other reason, use the --without-PACKAGE option to configure,
+ such as --without-gif to omit GIF, --without-tiff to omit TIFF, etc.
+ Passing the --help option to the configure script displays all of
+ the supported --without-PACKAGE options.
To use the external image support, the DLLs implementing the
functionality must be found when Emacs first needs them, either on the
compatible (for example, that they were built with the same compiler).
Binaries for the image libraries (among many others) can be found at
- the GnuWin32 project. PNG, JPEG and TIFF libraries are also
- included with GTK, which is installed along with other Free Software
- that requires it. These are built with MinGW, but they can be used
- with both GCC/MinGW and MSVC builds of Emacs. See the info on
- http://ourcomments.org/Emacs/w32-build-emacs.html, under "How to Get
- Images Support", for more details about installing image support
- libraries. Note specifically that, due to some packaging snafus in
- the GnuWin32-supplied image libraries, you will need to download
+ the GnuWin32 project. The PNG libraries are also included with GTK,
+ which is installed along with other Free Software that requires it.
+ Note specifically that, due to some packaging snafus in the
+ GnuWin32-supplied image libraries, you will need to download
_source_ packages for some of the libraries in order to get the
header files necessary for building Emacs with image support.
- If GTK 2.0 is installed, addpm will arrange for its image libraries
- to be on the DLL search path for Emacs.
-
For PNG images, we recommend to use versions 1.4.x and later of
libpng, because previous versions had security issues. You can find
precompiled libraries and headers on the GTK download page for
* Optional GnuTLS support
- If configure.bat finds the gnutls/gnutls.h file in the include path,
- Emacs is built with GnuTLS support by default; to avoid that you can
- pass the argument --without-gnutls.
+ To compile with GnuTLS, you will need pkg-config to be installed, as
+ the configure script invokes pkg-config to find out which compiler
+ switches to use for GnuTLS. See above for the URL where you can
+ find pkg-config for Windows.
+
+ You will also need to install the p11-kit package, which is a
+ dependency of GnuTLS, and its header files are needed for
+ compilation of programs that use GnuTLS. You can find p11-kit on
+ the same site as GnuTLS, see the URL below.
+
+ If the configure script finds the GnuTLS header files and libraries
+ on your system, Emacs is built with GnuTLS support by default; to
+ avoid that you can pass the argument --without-gnutls.
In order to support GnuTLS at runtime, a GnuTLS-enabled Emacs must
be able to find the relevant DLLs during startup; failure to do so
* Optional libxml2 support
- If configure.bat finds the libxml/HTMLparser.h file in the include path,
- Emacs is built with libxml2 support by default; to avoid that you can
- pass the argument --without-libxml2.
+ To compile with libxml2, you will need pkg-config to be installed,
+ as the configure script invokes pkg-config to find out which
+ compiler switches to use for libxml2. See above for the URL where
+ you can find pkg-config for Windows.
+
+ If the configure script finds the libxml2 header files and libraries
+ on your system, Emacs is built with libxml2 support by default; to
+ avoid that you can pass the argument --without-libxml2.
In order to support libxml2 at runtime, a libxml2-enabled Emacs must
be able to find the relevant DLLs during startup; failure to do so
http://sourceforge.net/projects/ezwinports/files/
- To compile Emacs with libxml2 from that site, you will need to pass
- the "--cflags -I/path/to/include/libxml2" option to configure.bat,
- because libxml2 header files are installed in the include/libxml2
- subdirectory of the directory where you unzip the binary
- distribution. Other binary distributions might use other
- directories, although include/libxml2 is the canonical place where
- libxml2 headers are installed on Posix platforms.
-
- You will also need to install the libiconv "development" tarball,
- because the libiconv headers need to be available to the compiler
- when you compile with libxml2 support. A MinGW port of libiconv can
- be found on the MinGW site:
+ For runtime support of libxml2, you will also need to install the
+ libiconv "development" tarball, because the libiconv headers need to
+ be available to the compiler when you compile with libxml2 support.
+ A MinGW port of libiconv can be found on the MinGW site:
http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/
* Experimental SVG support
+ To compile with SVG, you will need pkg-config to be installed, as
+ the configure script invokes pkg-config to find out which compiler
+ switches to use for SVG. See above for the URL where you can find
+ pkg-config for Windows.
+
SVG support is currently experimental, and not built by default.
- Specify --with-svg and ensure you have all the dependencies in your
+ Specify --with-rsvg and ensure you have all the dependencies in your
include path. Unless you have built a minimalist librsvg yourself
(untested), librsvg depends on a significant chunk of GTK+ to build,
plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime. The
easiest way to obtain the dependencies required for building is to
download a pre-bundled GTK+ development environment for Windows.
- GTK puts its header files all over the place, so you will need to
- run pkgconfig to list the include path you will need (either passed
- to configure.bat as --cflags options, or set in the environment).
To use librsvg at runtime, ensure that librsvg and its dependencies
are on your PATH. If you didn't build librsvg yourself, you will
maybe a problem with the way Cairo or librsvg is using it that
doesn't show up on other platforms.
-* Optional extra runtime checks
-
- The configure.bat option --enable-checking builds Emacs with some
- optional extra runtime checks and assertions enabled. This may be
- useful for debugging.
-
-* Optional extra libraries
-
- You can pass --lib LIBNAME option to configure.bat to cause Emacs to
- link with the specified library. You can use this option more than once.
-
-* Building
-
- After running configure, simply run the appropriate `make' program for
- your compiler to build Emacs. For MSVC, this is nmake; for GCC, it is
- GNU make. (If you are building out of Bazaar, say "make bootstrap" or
- "nmake bootstrap" instead.)
-
- As the files are compiled, you will see some warning messages
- declaring that some functions don't return a value, or that some data
- conversions will be lossy, etc. You can safely ignore these messages.
- The warnings may be fixed in the main FSF source at some point, but
- until then we will just live with them.
-
- With GNU Make, you can use the -j command-line option to have Make
- execute several commands at once, like this:
-
- gmake -j 4 XMFLAGS="-j 3"
-
- The XMFLAGS variable overrides the default behavior of GNU Make on
- Windows, whereby recursive Make invocations reset the maximum number
- of simultaneous commands to 1. The above command allows up to 4
- simultaneous commands at once in the top-level Make, and up to 3 in
- each one of the recursive Make's; you can use other numbers of jobs,
- if you wish.
-
- If you are building from Bazaar, the following commands will produce
- the Info manuals (which are not part of the Bazaar sources):
-
- make info
- or
- nmake info
-
- Note that you will need makeinfo.exe (from the GNU Texinfo package)
- in order for this command to succeed.
-
-* Installing
-
- To install Emacs after it has compiled, simply run `nmake install'
- or `make install', depending on which version of the Make utility
- do you have.
-
- By default, Emacs will be installed in the location where it was
- built, but a different location can be specified either using the
- --prefix option to configure, or by setting INSTALL_DIR when running
- make, like so:
-
- make install INSTALL_DIR=D:/emacs
-
- (for `nmake', type "nmake install INSTALL_DIR=D:/emacs" instead).
-
- The install process will run addpm to setup the registry entries, and
- to create a Start menu icon for Emacs.
-
-* Make targets
-
- The following make targets may be used by users building the source
- distribution, or users who have checked out of Bazaar after
- an initial bootstrapping.
-
- make
- Builds Emacs from the available sources and pre-compiled lisp files.
-
- make install
- Installs programs to the bin directory, and runs addpm to create
- Start Menu icons.
-
- make clean
- Removes object and executable files produced by the build process in
- the current configuration. After make clean, you can rebuild with
- the same configuration using make.
-
- make distclean
- In addition to the files removed by make clean, this also removes
- Makefiles and other generated files to get back to the state of a
- freshly unpacked source distribution. Note that this will not remove
- installed files, or the results of builds performed with different
- compiler or optimization options than the current configuration.
- After make distclean, it is necessary to run configure.bat followed
- by make to rebuild.
-
- make cleanall
- Removes object and executable files that may have been created by
- previous builds with different configure options, in addition to
- the files produced by the current configuration.
-
- make realclean
- Removes the installed files in the bin subdirectory in addition to
- the files removed by make cleanall.
-
- make dist
- Builds Emacs from the available sources and pre-compiled lisp files.
- Packages Emacs binaries as full distribution and barebin distribution.
-
- The following targets are intended only for use with the Bazaar sources.
-
- make bootstrap
- Creates a temporary emacs binary with lisp source files and
- uses it to compile the lisp files. Once the lisp files are built,
- emacs is redumped with the compiled lisp.
-
- make recompile
- Recompiles any changed lisp files after an update. This saves
- doing a full bootstrap after every update. If this or a subsequent
- make fail, you probably need to perform a full bootstrap, though
- running this target multiple times may eventually sort out the
- interdependencies.
-
- make maintainer-clean
- Removes everything that can be recreated, including compiled lisp
- files, to get back to the state of a fresh Bazaar tree. After make
- maintainer-clean, it is necessary to run configure.bat and make
- bootstrap to rebuild. Occasionally it may be necessary to run this
- target after an update.
-
-* Creating binary distributions
-
- Binary distributions (full and barebin distributions) can be
- automatically built and packaged from source tarballs or a bzr
- checkout.
-
- When building Emacs binary distributions, the --distfiles argument
- to configure.bat specifies files to be included in the bin directory
- of the binary distributions. This is intended for libraries that are
- not built as part of Emacs, e.g. image libraries.
-
- For example, specifying
-
- --distfiles D:\distfiles\libXpm.dll
-
- results in libXpm.dll being copied from D:\distfiles to the
- bin directory before packaging starts.
-
- Multiple files can be specified using multiple --distfiles arguments:
-
- --distfiles D:\distfiles\libXpm.dll --distfiles C:\jpeglib\jpeg.dll
-
- For packaging the binary distributions, the 'dist' make target uses
- 7-Zip (http://www.7-zip.org), which must be installed and available
- on the Windows Path.
-
-
-* Trouble-shooting
-
- The main problems that are likely to be encountered when building
- Emacs stem from using an old version of GCC, or old MinGW or Windows API
- headers. Additionally, Cygwin ports of GNU make may require the Emacs
- source tree to be mounted with text!=binary, because the makefiles
- generated by configure.bat necessarily use DOS line endings. Also,
- Cygwin ports of make must run in UNIX mode, either by specifying
- --unix on the command line, or MAKE_MODE=UNIX in the environment.
-
- When configure runs, it attempts to detect when GCC itself, or the
- headers it is using, are not suitable for building Emacs. GCC version
- 2.95 or later is needed, because that is when the Windows port gained
- sufficient support for anonymous structs and unions to cope with some
- definitions from winnt.h that are used by addsection.c.
- Older versions of the Windows API headers that come with Cygwin and MinGW
- may be missing some definitions required by Emacs, or broken in other
- ways. In particular, uniscribe APIs were added to MinGW CVS only on
- 2006-03-26, so releases from before then cannot be used.
-
- When in doubt about correctness of what configure did, look at the file
- config.log, which shows all the failed test programs and compiler
- messages associated with the failures. If that doesn't give a clue,
- please report the problems, together with the relevant fragments from
- config.log, as bugs.
-
- If configure succeeds, but make fails, install the Cygwin port of
- Bash, even if the table above indicates that Emacs should be able to
- build without sh.exe. (Some versions of Windows shells are too dumb
- for Makefile's used by Emacs.)
-
- If you are using certain Cygwin builds of GCC, such as Cygwin version
- 1.1.8, you may need to specify some extra compiler flags like so:
-
- configure --with-gcc --cflags -mwin32 --cflags -D__MSVCRT__
- --ldflags -mwin32
-
- However, the latest Cygwin versions, such as 1.3.3, don't need those
- switches; you can simply use "configure --with-gcc".
-
- We will attempt to auto-detect the need for these flags in a future
- release.
-
-* Debugging
-
- You should be able to debug Emacs using the debugger that is
- appropriate for the compiler you used, namely DevStudio or Windbg if
- compiled with MSVC, or GDB if compiled with GCC. (GDB for Windows
- is available from the MinGW site, http://www.mingw.org/download.shtml.)
-
- When Emacs aborts due to a fatal internal error, Emacs on Windows
- pops up an Emacs Abort Dialog asking you whether you want to debug
- Emacs or terminate it. If Emacs was built with MSVC, click YES
- twice, and Windbg or the DevStudio debugger will start up
- automatically. If Emacs was built with GCC, first start GDB and
- attach it to the Emacs process with the "gdb -p EMACS-PID" command,
- where EMACS-PID is the Emacs process ID (which you can see in the
- Windows Task Manager), type the "continue" command inside GDB, and
- only then click YES on the abort dialog. This will pass control to
- the debugger, and you will be able to debug the cause of the fatal
- error.
-
- The single most important thing to find out when Emacs aborts or
- crashes is where did that happen in the Emacs code. This is called
- "backtrace".
-
- Emacs on Windows uses more than one thread. When Emacs aborts due
- to a fatal error, the current thread may not be the application
- thread running Emacs code. Therefore, to produce a meaningful
- backtrace from a debugger, you need to instruct it to show the
- backtrace for every thread. With GDB, you do it like this:
-
- (gdb) thread apply all backtrace
-
- To run Emacs under a debugger to begin with, simply start it from
- the debugger. With GDB, chdir to the `src' directory (if you have
- the source tree) or to a directory with the `.gdbinit' file (if you
- don't have the source tree), and type these commands:
-
- C:\whatever\src> gdb x:\path\to\emacs.exe
- (gdb) run <ARGUMENTS TO EMACS>
-
- Thereafter, use Emacs as usual; you can minimize the debugger
- window, if you like. The debugger will take control if and when
- Emacs crashes.
-
- Emacs functions implemented in C use a naming convention that reflects
- their names in lisp. The names of the C routines are the lisp names
- prefixed with 'F', and with dashes converted to underscores. For
- example, the function call-process is implemented in C by
- Fcall_process. Similarly, lisp variables are prefixed with 'V', again
- with dashes converted to underscores. These conventions enable you to
- easily set breakpoints or examine familiar lisp variables by name.
-
- Since Emacs data is often in the form of a lisp object, and the
- Lisp_Object type is difficult to examine manually in a debugger,
- Emacs provides a helper routine called debug_print that prints out a
- readable representation of a Lisp_Object. If you are using GDB,
- there is a .gdbinit file in the src directory which provides
- definitions that are useful for examining lisp objects. Therefore,
- the following tips are mainly of interest when using MSVC.
-
- The output from debug_print is sent to stderr, and to the debugger
- via the OutputDebugString routine. The output sent to stderr should
- be displayed in the console window that was opened when the
- emacs.exe executable was started. The output sent to the debugger
- should be displayed in its "Debug" output window.
-
- When you are in the process of debugging Emacs and you would like to
- examine the contents of a Lisp_Object variable, pop up the QuickWatch
- window (QuickWatch has an eyeglass symbol on its button in the
- toolbar). In the text field at the top of the window, enter
- debug_print(<variable>) and hit return. For example, start and run
- Emacs in the debugger until it is waiting for user input. Then click
- on the Break button in the debugger to halt execution. Emacs should
- halt in ZwUserGetMessage waiting for an input event. Use the Call
- Stack window to select the procedure w32_msp_pump up the call stack
- (see below for why you have to do this). Open the QuickWatch window
- and enter debug_print(Vexec_path). Evaluating this expression will
- then print out the contents of the lisp variable exec-path.
-
- If QuickWatch reports that the symbol is unknown, then check the call
- stack in the Call Stack window. If the selected frame in the call
- stack is not an Emacs procedure, then the debugger won't recognize
- Emacs symbols. Instead, select a frame that is inside an Emacs
- procedure and try using debug_print again.
-
- If QuickWatch invokes debug_print but nothing happens, then check the
- thread that is selected in the debugger. If the selected thread is
- not the last thread to run (the "current" thread), then it cannot be
- used to execute debug_print. Use the Debug menu to select the current
- thread and try using debug_print again. Note that the debugger halts
- execution (e.g., due to a breakpoint) in the context of the current
- thread, so this should only be a problem if you've explicitly switched
- threads.
-
\f
This file is part of GNU Emacs.
+++ /dev/null
- Building and Installing Emacs on MS-Windows
- using the MSYS and MinGW tools
-
- Copyright (C) 2013 Free Software Foundation, Inc.
- See the end of the file for license conditions.
-
-The MSYS/MinGW build described here is supported on versions of
-Windows starting with Windows 2000 and newer. Windows 9X are not
-supported (but the Emacs binary produced by this build will run on
-Windows 9X as well).
-
-* For the brave (a.k.a. "impatient"):
-
- For those who have a working MSYS/MinGW development environment and
- are comfortable with running Posix configure scripts, here are the
- concise instructions for configuring and building the native Windows
- binary of Emacs with these tools.
-
- Do not use this recipe with Cygwin. For building on Cygwin, use the
- normal installation instructions, ../INSTALL.
-
- Do not use these instructions if you don't have MSYS installed; for
- that, see the file INSTALL in this directory.
-
- 0. Start the MSYS Bash window. Everything else below is done from
- that window's Bash prompt.
-
- 0a. If you are building from the development trunk (as opposed to a
- release tarball), produce the configure script, by typing from
- the top-level Emacs source directory:
-
- ./autogen.sh
-
- 1. If you want to build Emacs outside of the source tree
- (recommended), create the build directory and chdir there.
-
- 2. Invoke the MSYS-specific configure script:
-
- - If you are building outside the source tree:
-
- /PATH/TO/EMACS/SOURCE/TREE/nt/msysconfig.sh --prefix=PREFIX ...
-
- - If you are building in-place, i.e. inside the source tree:
-
- ./nt/msysconfig.sh --prefix=PREFIX ...
-
- It is always preferable to use --prefix to configure Emacs for
- some specific location of its installed tree; the default
- /usr/local is not suitable for Windows (see the detailed
- instructions for the reasons).
-
- You can pass other options to the configure script. Here's a
- typical example (for an in-place debug build):
-
- CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=/d/usr/emacs --enable-checking
-
- 3. After the configure script finishes, it should display the
- resulting configuration. After that, type
-
- make
-
- Use "make -j N" if your MSYS Make supports parallel execution;
- the build will take significantly less time in that case. Here N
- is the number of simultaneous parallel jobs; use the number of
- the cores on your system.
-
- 4. Install the produced binaries:
-
- make install
-
- If you want the installation tree to go to a place that is
- different from the one specified by --prefix, say
-
- make install prefix=/where/ever/you/want
-
- That's it!
-
- If these short instructions somehow fail, read the rest of this
- file.
-
-* Installing MinGW and MSYS
-
- Make sure you carefully read the following two sections in their
- entirety and install/configure the various packages as instructed.
- A correct installation makes all the rest almost trivial; a botched
- installation will likely make you miserable for quite some time.
-
- There are two alternative to installing MinGW + MSYS: using the GUI
- installer, called mingw-get, provided by the MinGW project, or
- manual installation. The next two sections describe each one of
- these.
-
-** Installing MinGW and MSYS using mingw-get
-
- A nice installer, called mingw-get, is available for those who don't
- like to mess with manual installations. You can download it from
- here:
-
- https://sourceforge.net/projects/mingw/files/Installer/mingw-get/
-
- (This installer only supports packages downloaded from the MinGW
- site; for the rest you will still need the manual method.)
-
- After installing mingw-get, invoke it to install the packages that
- are already selected by default on the "Select Components" screen of
- its wizard.
-
- After that, use "mingw-get install PACKAGE" to install the following
- additional packages:
-
- . msys-base
- . mingw-developer-toolkit
-
- (We recommend that you refrain from installing the MSYS Texinfo
- package, which is part of msys-base, because it might produce mixed
- EOL format when installing Info files. Instead, install the MinGW
- port of Texinfo, see the ezwinports URL below. To uninstall the
- MSYS Texinfo, after installing it as part of msys-base, invoke the
- command "mingw-get remove msys-texinfo".)
-
- At this point, you should be ready to configure and build Emacs in
- its basic configuration. Skip to the "Generating the configure
- script" section for the build instructions. If you want to build it
- with image support and other optional libraries, read about the
- optional libraries near the end of this document, before you start
- the build. Also, consider installing additional MinGW packages that
- are required/recommended, especially if you are building from the
- Bazaar repository, as described in the next section.
-
-** Installing MinGW and MSYS manually
-
-*** MinGW
-
- You will need to install the MinGW port of GCC and Binutils, and the
- MinGW runtime and Windows API distributions, to compile Emacs. You
- can find these on the MinGW download/Base page:
-
- https://sourceforge.net/projects/mingw/files/MinGW/Base/
-
- In general, install the latest stable versions of the following
- MinGW packages from that page: gcc, binutils, mingw-rt, w32api. You
- only need the 'bin' and the 'dll' tarballs of each of the above.
-
- MinGW packages are distributed as .tar.lzma compressed archives. To
- install the packages manually, we recommend to use the Windows port
- of the 'bsdtar' program to unpack the tarballs. 'bsdtar' is
- available as part of the 'libarchive' package from here:
-
- http://sourceforge.net/projects/ezwinports/files/
-
- The recommended place to install these packages is a single tree
- starting from some directory on a drive other than the system drive
- C:. A typical example would be D:\usr, with D:\usr\bin holding the
- binaries and DLLs (should be added to your Path environment
- variable), D:\usr\include holding the include files, D:\usr\lib
- holding the static and import libraries, D:\usr\share holding docs,
- message catalogs, and package-specific subdirectories, etc.
-
- Having all the headers and libraries in a single place will greatly
- reduce the number of -I and -L flags you will have to pass to the
- configure script (see below), as these files will be right where the
- compiler expects them.
-
- We specifically do NOT recommend installing packages below
- "C:\Program Files" or "C:\Program Files (x86)". These directories
- are protected on versions of Windows from Vista and on, and you will
- have difficulties updating and maintaining your installation later,
- due to UAC elevation prompts, file virtualization, etc. You *have*
- been warned!
-
- Additional MinGW packages are required/recommended, especially if
- you are building from the Bazaar repository:
-
- . Texinfo (needed to produce the Info manuals when building from
- bzr, and for "make install")
-
- Available from http://sourceforge.net/projects/ezwinports/files/.
-
- . gzip (needed to compress files during "make install")
-
- Available from http://gnuwin32.sourceforge.net/packages/gzip.htm.
-
- . pkg-config (needed for building with some optional libraries,
- such as GnuTLS and libxml2)
-
- Available from http://www.gtk.org/download/win32.php
-
- Each package might list other packages as prerequisites on its
- download page (under "Runtime requirements"); download those as
- well. (Using the mingw-get installer will fetch those prerequisites
- automatically for you.) A missing prerequisite will manifest itself
- by the program failing to run and presenting a pop-up dialog that
- states the missing or incompatible DLL; be sure to find and install
- these missing DLLs.
-
- Once you think you have MinGW installed, test the installation by
- building a trivial "hello, world!" program, and make sure that it
- builds without any error messages and the binary works when run.
-
-*** MSYS
-
- You will need a reasonably full MSYS installation. MSYS is an
- environment needed to run the Posix configure scripts and the
- resulting Makefile's, in order to produce native Windows binaries
- using the MinGW compiler and runtime libraries. Here's the list of
- MSYS packages that are required:
-
- . All the packages from the MSYS Base distribution, listed here:
-
- https://sourceforge.net/projects/mingw/files/MSYS/Base/
-
- . Additional packages listed below, from the MSYS Extension
- distribution here:
-
- https://sourceforge.net/projects/mingw/files/MSYS/Extension/
-
- - flex
- - bison
- - m4
- - perl
- - mktemp
-
- These should only be needed if you intend to build development
- versions of Emacs from the Bazaar repository.
-
- . Additional packages (needed only if building from the Bazaar
- repository): Automake and Autoconf. They are available from
- here:
-
- http://sourceforge.net/projects/ezwinports/files/automake-1.11.6-msys-bin.zip/download
- http://sourceforge.net/projects/ezwinports/files/autoconf-2.65-msys-bin.zip/download
-
- MSYS packages are distributed as .tar.lzma compressed archives. To
- install the packages manually, we recommend to use the Windows port
- of the 'bsdtar' program, already mentioned above.
-
- If/when you are confident in your MinGW/MSYS installation, and want
- to speed up the builds, we recommend installing a pre-release
- version of Make from here:
-
- https://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/
-
- These are snapshot builds of many packages, but you only need
- make.exe from there. The advantage of this make.exe is that it
- supports parallel builds, so you can use "make -j N" to considerably
- speed up your builds.
-
- Several users reported that MSYS 1.0.18 causes Make to hang in
- parallel builds. If you bump into this, we suggest to downgrade to
- MSYS 1.0.17, which doesn't have that problem.
-
- For each of these packages, install the 'bin' and 'dll' tarballs of
- their latest stable releases. If there's an 'ext' tarball (e.g.,
- msysCORE and Coreutils have it), download and install those as well.
-
- Each package might list other packages as prerequisites on its
- download page (under "Runtime requirements"); download those as
- well. (Using the mingw-get installer will fetch those prerequisites
- automatically for you.) A missing prerequisite will manifest itself
- by the program failing to run and presenting a pop-up dialog that
- states the missing or incompatible DLL; be sure to find and install
- these missing DLLs.
-
- MSYS packages should be installed in a separate tree from MinGW.
- For example, use D:\MSYS or D:\usr\MSYS as the top-level directory
- from which you unpack all of the MSYS packages.
-
- Do NOT add the MSYS bin directory to your Windows Path! Only the
- MinGW bin directory should be on Path. When you install MSYS, it
- creates a shortcut on your desktop that invokes the MSYS Bash shell
- in a Command Prompt window; that shell is already set up so that the
- MSYS bin directory is on PATH ahead of any other directory. Thus,
- Bash will find MSYS executables first, which is exactly what you
- need.
-
- At this point, you are ready to build Emacs in its basic
- configuration. If you want to build it with image support and other
- optional libraries, read about that near the end of this document.
-
-* Generating the configure script
-
- If you are building a release or pretest tarball, skip this section,
- because the configure script is already present in the tarball.
-
- To build a development snapshot from the Emacs Bazaar repository,
- you will first need to generate the configure script and a few other
- auto-generated files. (If this step, described below, somehow
- fails, you can use the files in the autogen/ directory instead, but
- they might be outdated, and, most importantly, you are well advised
- not to disregard any failures in your local build procedures, as
- these are likely to be symptoms of incorrect installation that will
- bite you down the road.)
-
- To generate the configure script, type this at the MSYS Bash prompt
- from the top-level directory of the Emacs tree:
-
- ./autogen.sh
-
- If successful, this command should produce the following output:
-
- $ ./autogen.sh
- Checking whether you have the necessary tools...
- (Read INSTALL.BZR for more details on building Emacs)
-
- Checking for autoconf (need at least version 2.65)...
- ok
- Checking for automake (need at least version 1.11)...
- ok
- Your system has the required tools, running autoreconf...
- You can now run `./configure'.
-
-* Configuring Emacs for MinGW:
-
- Now it's time to run the configure script. You can do that either
- from a separate build directory that is outside of the Emacs source
- tree (recommended), or from inside the source tree. The former is
- recommended because it allows you to have several different builds,
- e.g., an optimized build and an unoptimized one, of the same
- revision of the source tree; the source tree will be left in its
- pristine state, without any build products.
-
- You invoke the configure script like this:
-
- /PATH/TO/EMACS/SOURCE/TREE/nt/msysconfig.sh --prefix=PREFIX ...
-
- or, if you are building in-place, i.e. inside the source tree:
-
- ./nt/msysconfig.sh --prefix=PREFIX ...
-
- Here PREFIX is the place where you eventually want to install Emacs
- once built, e.g. /d/usr. We recommend to always use --prefix when
- building Emacs on Windows, because the default '/usr/local' is not
- appropriate for Windows: it will be mapped by MSYS to something like
- C:\MSYS\local, and it will defeat the purpose of PREFIX, which is to
- install programs in a single coherent tree resembling Posix systems.
- Such a single-tree installation makes sure all the other programs
- and packages ported from GNU or Unix systems will work seamlessly
- together. Where exactly is the root of that tree on your system is
- something only you, the user who builds Emacs, can know, and the
- Emacs build process cannot guess, because usually there's no
- '/usr/local' directory on any drive on Windows systems.
-
- Do NOT use Windows-style x:/foo/bar file names on the configure
- script command line; use the MSYS-style /x/foo/bar instead. Using
- Windows-style file names was reported to cause subtle and hard to
- figure out problems during the build. This applies both to the
- command switches, such as --prefix=, and to the absolute file name
- of msysconfig.sh, if you are building outside of the source tree.
-
- You can pass additional options to the configure script, for the
- full list type
-
- ./nt/msysconfig.sh --help
-
- As explained in the help text, you may need to tell the script what
- are the optional flags to invoke the compiler. This is needed if
- some of your headers and libraries, e.g., those belonging to
- optional image libraries, are installed in places where the compiler
- normally doesn't look for them. (Remember that advice above to
- avoid such situations? here's is where you will start paying for
- disregarding that recommendation.) For example, if you have libpng
- headers in C:\emacs\libs\libpng-1.2.37-lib\include and jpeg library
- headers in C:\emacs\libs\jpeg-6b-4-lib\include, you will need to say
- something like this:
-
- CPPFLAGS='-I/c/emacs/libs/libpng-1.2.37-lib/include -I/c/emacs/libs/jpeg-6b-4-lib/include' ./nt/msysconfig.sh --prefix=PREFIX
-
- which is quite a mouth-full, especially if you have more directories
- to specify... Perhaps you may wish to revisit your installation
- decisions now.
-
- If you have a global site-lisp directory from previous Emacs
- installation, and you want Emacs to continue using it, specify it
- via the --enable-locallisppath switch to msysconfig.sh, like this:
-
- ./nt/msysconfig.sh --prefix=PREFIX --enable-locallisppath="/d/usr/share/emacs/VERSION/site-lisp:/d/wherever/site-lisp"
-
- Use the normal MSYS /d/foo/bar style to specify directories by their
- absolute file names.
-
- A few frequently used options are needed when you want to produce an
- unoptimized binary with runtime checks enabled:
-
- CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=PREFIX --enable-checking
-
- Once invoked, the configure script will run for some time, and, if
- successful, will eventually produce a summary of the configuration
- like this:
-
- Configured for `i686-pc-mingw32'.
-
- Where should the build process find the source code? /path/to/emacs/sources
- What compiler should emacs be built with? gcc -std=gnu99 -O0 -g3
- Should Emacs use the GNU version of malloc? yes
- Should Emacs use a relocating allocator for buffers? yes
- Should Emacs use mmap(2) for buffer allocation? no
- What window system should Emacs use? w32
- What toolkit should Emacs use? none
- Where do we find X Windows header files? NONE
- Where do we find X Windows libraries? NONE
- Does Emacs use -lXaw3d? no
- Does Emacs use -lXpm? yes
- Does Emacs use -ljpeg? yes
- Does Emacs use -ltiff? yes
- Does Emacs use a gif library? yes
- Does Emacs use -lpng? yes
- Does Emacs use -lrsvg-2? no
- Does Emacs use imagemagick? no
- Does Emacs use -lgpm? no
- Does Emacs use -ldbus? no
- Does Emacs use -lgconf? no
- Does Emacs use GSettings? no
- Does Emacs use -lselinux? no
- Does Emacs use -lgnutls? yes
- Does Emacs use -lxml2? yes
- Does Emacs use -lfreetype? no
- Does Emacs use -lm17n-flt? no
- Does Emacs use -lotf? no
- Does Emacs use -lxft? no
- Does Emacs use toolkit scroll bars? yes
-
- You are almost there, hang on.
-
- If the output is significantly different, or if configure finishes
- prematurely and displays some error message, you should examine the
- configuration log in config.log and find the reason for the failure.
-
- Once you succeeded in configuring Emacs, and just want to rebuild it
- after updating your local repository from the main repository, you
- don't need to re-run the configure script manually, unless you want
- to change the configure-time options. Just typing "make" will
- re-run configure if necessary with the exact same options you
- specified originally, and then go on to invoking Make, described
- below.
-
-* Running Make.
-
- This is simple: just type "make" and sit back, watching the fun.
-
- If you installed a snapshot build of Make, the build will be much
- faster if you type "make -j N" instead, where N is the number of
- independent processing units on your machine. E.g., on a core i7
- system try using N of 6 or even 8. (If this hangs, see the notes
- above about downgrading to MSYS 1.0.17.)
-
- When Make finishes, you can install the produced binaries:
-
- make install
-
- or, if you want the installed tree to go in a place different from
- the configured one, type
-
- make install prefix=WHEREVER
-
- Congrats! You have built and installed your own Emacs!
-
-* Make targets
-
- The following make targets may be used by users building the source
- distribution, or users who have checked out of Bazaar after
- an initial bootstrapping.
-
- make
- Builds Emacs from the available sources and pre-compiled lisp files.
-
- make install
- Installs the built programs and the auxiliary files.
-
- make clean
- Removes object and executable files produced by the build process in
- the current configuration. After "make clean", you can rebuild with
- the same configuration using make. useful when you want to be sure
- that all of the products are built from coherent sources.
-
- make distclean
- In addition to the files removed by make clean, this also removes
- Makefiles and other generated files to get back to the state of a
- freshly unpacked source distribution. After make distclean, it is
- necessary to run the configure script followed by "make", in order
- to rebuild.
-
- The following targets are intended only for use with the Bazaar sources.
-
- make bootstrap
- Removes all the auto-generated files and all the *.elc byte-compiled
- files, and builds Emacs from scratch. Useful when some change in
- basic Emacs functionality makes byte compilation of updated files
- fail.
-
- make maintainer-clean
- Removes everything that can be recreated, including compiled Lisp
- files, to get back to the state of a fresh Bazaar tree. After make
- maintainer-clean, it is necessary to run configure and "make" or
- "make bootstrap" to rebuild. Occasionally it may be necessary to
- run this target after an update.
-
-* Optional image library support
-
- In addition to its "native" image formats (pbm and xbm), Emacs can
- handle other image types: xpm, tiff, gif, png, jpeg and experimental
- support for svg.
-
- To build Emacs with support for them, the corresponding headers must
- be in the include path and libraries should be where the linker
- looks for them, when the configure script is run. If needed, this
- can be set up using the CPPFLAGS and CFLAGS variable specified on
- the configure command line. The configure script will report
- whether it was able to detect the headers and libraries. If the
- results of this testing appear to be incorrect, please look for
- details in the file config.log: it will show the failed test
- programs and compiler error messages that should explain what is
- wrong. (Usually, any such failures happen because some headers are
- missing due to bad packaging of the image support libraries.)
-
- Note that any file path passed to the compiler or linker must use
- forward slashes, or double each backslash, as that is how Bash
- works.
-
- If the configure script finds the necessary headers and libraries,
- but they are for some reason incompatible, or if you want to omit
- support for some image library that is installed on your system for
- some other reason, use the --without-PACKAGE option to configure,
- such as --without-gif to omit GIF, --without-tiff to omit TIFF, etc.
- Passing the --help option to the configure script displays all of
- the supported --without-PACKAGE options.
-
- To use the external image support, the DLLs implementing the
- functionality must be found when Emacs first needs them, either on the
- PATH, or in the same directory as emacs.exe. Failure to find a
- library is not an error; the associated image format will simply be
- unavailable. Note that once Emacs has determined that a library can
- not be found, there's no way to force it to try again, other than
- restarting. See the variable `dynamic-library-alist' to configure the
- expected names of the libraries.
-
- Some image libraries have dependencies on one another, or on zlib.
- For example, tiff support depends on the jpeg library. If you did not
- compile the libraries yourself, you must make sure that any dependency
- is in the PATH or otherwise accessible and that the binaries are
- compatible (for example, that they were built with the same compiler).
-
- Binaries for the image libraries (among many others) can be found at
- the GnuWin32 project. The PNG libraries are also included with GTK,
- which is installed along with other Free Software that requires it.
- Note specifically that, due to some packaging snafus in the
- GnuWin32-supplied image libraries, you will need to download
- _source_ packages for some of the libraries in order to get the
- header files necessary for building Emacs with image support.
-
- For PNG images, we recommend to use versions 1.4.x and later of
- libpng, because previous versions had security issues. You can find
- precompiled libraries and headers on the GTK download page for
- Windows (http://www.gtk.org/download/win32.php).
-
- Versions 1.4.0 and later of libpng are binary incompatible with
- earlier versions, so Emacs will only look for libpng libraries which
- are compatible with the version it was compiled against. That
- version is given by the value of the Lisp variable `libpng-version';
- e.g., 10403 means version 1.4.3. The variable `dynamic-library-alist'
- is automatically set to name only those DLL names that are known to
- be compatible with the version given by `libpng-version'. If PNG
- support does not work for you even though you have the support DLL
- installed, check the name of the installed DLL against
- `dynamic-library-alist' and the value of `libpng-version', and
- download compatible DLLs if needed.
-
-* Optional GnuTLS support
-
- To compile with GnuTLS, you will need pkg-config to be installed, as
- the configure script invokes pkg-config to find out which compiler
- switches to use for GnuTLS. See above for the URL where you can
- find pkg-config for Windows.
-
- You will also need to install the p11-kit package, which is a
- dependency of GnuTLS, and its header files are needed for
- compilation of programs that use GnuTLS. You can find p11-kit on
- the same site as GnuTLS, see the URL below.
-
- If the configure script finds the GnuTLS header files and libraries
- on your system, Emacs is built with GnuTLS support by default; to
- avoid that you can pass the argument --without-gnutls.
-
- In order to support GnuTLS at runtime, a GnuTLS-enabled Emacs must
- be able to find the relevant DLLs during startup; failure to do so
- is not an error, but GnuTLS won't be available to the running
- session.
-
- You can get pre-built binaries (including any required DLL and the
- header files) at http://sourceforge.net/projects/ezwinports/files/.
-
-* Optional libxml2 support
-
- To compile with libxml2, you will need pkg-config to be installed,
- as the configure script invokes pkg-config to find out which
- compiler switches to use for libxml2. See above for the URL where
- you can find pkg-config for Windows.
-
- If the configure script finds the libxml2 header files and libraries
- on your system, Emacs is built with libxml2 support by default; to
- avoid that you can pass the argument --without-libxml2.
-
- In order to support libxml2 at runtime, a libxml2-enabled Emacs must
- be able to find the relevant DLLs during startup; failure to do so
- is not an error, but libxml2 features won't be available to the
- running session.
-
- One place where you can get pre-built Windows binaries of libxml2
- (including any required DLL and the header files) is here:
-
- http://sourceforge.net/projects/ezwinports/files/
-
- For runtime support of libxml2, you will also need to install the
- libiconv "development" tarball, because the libiconv headers need to
- be available to the compiler when you compile with libxml2 support.
- A MinGW port of libiconv can be found on the MinGW site:
-
- http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/
-
- You need the libiconv-X.Y.Z-N-mingw32-dev.tar.lzma tarball from that
- site.
-
-* Experimental SVG support
-
- To compile with SVG, you will need pkg-config to be installed, as
- the configure script invokes pkg-config to find out which compiler
- switches to use for SVG. See above for the URL where you can find
- pkg-config for Windows.
-
- SVG support is currently experimental, and not built by default.
- Specify --with-rsvg and ensure you have all the dependencies in your
- include path. Unless you have built a minimalist librsvg yourself
- (untested), librsvg depends on a significant chunk of GTK+ to build,
- plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime. The
- easiest way to obtain the dependencies required for building is to
- download a pre-bundled GTK+ development environment for Windows.
-
- To use librsvg at runtime, ensure that librsvg and its dependencies
- are on your PATH. If you didn't build librsvg yourself, you will
- need to check with where you downloaded it from for the
- dependencies, as there are different build options. If it is a
- short list, then it most likely only lists the immediate
- dependencies of librsvg, but the dependencies themselves have
- dependencies - so don't download individual libraries from GTK+,
- download and install the whole thing. If you think you've got all
- the dependencies and SVG support is still not working, check your
- PATH for other libraries that shadow the ones you downloaded.
- Libraries of the same name from different sources may not be
- compatible, this problem was encountered with libbzip2 from GnuWin32
- with libcroco from gnome.org.
-
- If you can see etc/images/splash.svg, then you have managed to get
- SVG support working. Congratulations for making it through DLL hell
- to this point. You'll probably find that some SVG images crash
- Emacs. Problems have been observed in some images that contain
- text, they seem to be a problem in the Windows port of Pango, or
- maybe a problem with the way Cairo or librsvg is using it that
- doesn't show up on other platforms.
-
-\f
-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/>.
--- /dev/null
+ Building and Installing Emacs on Windows
+ (from 95 to 7 and beyond)
+
+ Copyright (C) 2001-2013 Free Software Foundation, Inc.
+ See the end of the file for license conditions.
+
+*** This method of building Emacs is no longer supported. ***
+ It may fail to produce a correctly working Emacs.
+ Do not report bugs associated with this build method.
+ Instead, follow the new instructions in INSTALL.
+
+* For the impatient
+
+ Here are the concise instructions for configuring and building the
+ native Windows binary of Emacs, for those who want to skip the
+ complex explanations and ``just do it'':
+
+ Do not use this recipe with Cygwin. For building on Cygwin,
+ use the normal installation instructions, ../INSTALL.
+
+ Do not use these instructions with MSYS environment. For building
+ the native Windows binary with MinGW and MSYS, follow the
+ instructions in the file INSTALL in this directory.
+
+ For building without MSYS, if you have a Cygwin or MSYS port of Bash
+ on your Path, you will be better off removing it from PATH. (For
+ details, search for "MSYS sh.exe" below.)
+
+ 1. Change to the `nt' directory (the directory of this file):
+
+ cd nt
+
+ 2. Run configure.bat.
+
+ 2a.If you use MSVC, set up the build environment by running the
+ SetEnv.cmd batch file from the appropriate SDK directory. (Skip
+ this step if you are using MinGW.) For example:
+
+ "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Debug
+
+ if you are going to compile a debug version, or
+
+ "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Release
+
+ if you are going to compile an optimized version.
+
+ 2b.From the COMMAND.COM/CMD.EXE command prompt type:
+
+ configure
+
+ From a Unixy shell prompt:
+
+ cmd /c configure.bat
+ or
+ command.com /c configure.bat
+
+ 3. Run the Make utility suitable for your environment. If you build
+ with the Microsoft's Visual C compiler:
+
+ nmake
+
+ For the development environments based on GNU GCC (MinGW, MSYS,
+ Cygwin - but see notes about Cygwin make below), depending on how
+ Make is called, it could be:
+
+ make
+ or
+ mingw32-make
+ or
+ gnumake
+ or
+ gmake
+
+ (If you are building from Bazaar, say "make bootstrap" or "nmake
+ bootstrap" instead, and avoid using Cygwin make.)
+
+ With GNU Make, you can use the -j command-line option to have
+ Make execute several commands at once, like this:
+
+ gmake -j 2
+
+ (With versions of GNU Make before 3.82, you need also set the
+ XMFLAGS variable, like this:
+
+ gmake -j 2 XMFLAGS="-j 2"
+
+ The XMFLAGS variable overrides the default behavior of version
+ 3.82 and older of GNU Make on Windows, whereby recursive Make
+ invocations reset the maximum number of simultaneous commands to
+ 1. The above command allows up to 4 simultaneous commands at
+ once in the top-level Make, and up to 3 in each one of the
+ recursive Make's.)
+
+ 4. Generate the Info manuals (only if you are building out of Bazaar,
+ and if you have makeinfo.exe installed):
+
+ make info
+
+ (change "make" to "nmake" if you use MSVC).
+
+ 5. Install the produced binaries:
+
+ make install
+
+ That's it!
+
+ If these short instructions somehow fail, read the rest of this
+ file.
+
+* Preliminaries
+
+ If you want to build a Cygwin port of Emacs, use the instructions in
+ the INSTALL file in the main Emacs directory (the parent of this
+ directory). These instructions are for building a native Windows
+ binary of Emacs.
+
+ If you used WinZip to unpack the distribution, we suggest to
+ remove the files and unpack again with a different program!
+ WinZip is known to create some subtle and hard to debug problems,
+ such as converting files to DOS CR-LF format, not creating empty
+ directories, etc. We suggest to use djtarnt.exe from the GNU FTP
+ site. For modern formats, such as .tar.xz, we suggest bsdtar.exe
+ from the libarchive package; its precompiled Windows binaries are
+ available from this site:
+
+ http://sourceforge.net/projects/ezwinports/files/
+
+ In addition to this file, if you build a development snapshot, you
+ should also read INSTALL.BZR in the parent directory.
+
+* Supported development environments
+
+ To compile Emacs, you will need either Microsoft Visual C++ 2.0, or
+ later and nmake, or a Windows port of GCC 2.95 or later with MinGW
+ and Windows API support and a port of GNU Make. You can use the Cygwin
+ ports of GCC, but Emacs requires the MinGW headers and libraries to
+ build (latest versions of the Cygwin toolkit, at least since v1.3.3,
+ include the MinGW headers and libraries as an integral part).
+
+ The rest of this file assumes you have a working development
+ environment. If you just installed such an environment, try
+ building a trivial C "Hello world" program, and see if it works. If
+ it doesn't work, resolve that problem first! If you use Microsoft
+ Visual Studio .NET 2003, don't forget to run the VCVARS32.BAT batch
+ file from the `Bin' subdirectory of the directory where you have
+ installed VS.NET. With other versions of MSVC, run the SetEnv.cmd
+ batch file from the `Bin' subdirectory of the directory where you
+ have the SDK installed.
+
+ If you use the MinGW port of GCC and GNU Make to build Emacs, there
+ are some compatibility issues wrt Make and the shell that is run by
+ Make, either the standard COMMAND.COM/CMD.EXE supplied with Windows
+ or sh.exe, a port of a Unixy shell. For reference, below is a list
+ of which builds of GNU Make are known to work or not, and whether
+ they work in the presence and/or absence of sh.exe, the Cygwin port
+ of Bash. Note that any version of Make that is compiled with Cygwin
+ will only work with Cygwin tools, due to the use of Cygwin style
+ paths. This means Cygwin Make is unsuitable for building parts of
+ Emacs that need to invoke Emacs itself (leim and "make bootstrap",
+ for example). Also see the Trouble-shooting section below if you
+ decide to go ahead and use Cygwin make.
+
+ In addition, using 4NT or TCC as your shell is known to fail the
+ build process, at least since 4NT version 3.01. Use CMD.EXE, the
+ default Windows shell, instead. MSYS sh.exe also appears to cause
+ various problems, e.g., it is known to cause failures in commands
+ like "cmd /c FOO" in the Makefiles, because it thinks "/c" is a
+ Unix-style file name that needs conversion to the Windows format.
+ If you have MSYS installed, try "make SHELL=cmd.exe" to force the
+ use of cmd.exe instead of the MSYS sh.exe.
+
+ sh exists no sh
+
+ cygwin b20.1 make (3.75): fails[1, 5] fails[2, 5]
+ MSVC compiled gmake 3.77: okay okay
+ MSVC compiled gmake 3.78.1: okay okay
+ MSVC compiled gmake 3.79.1: okay okay
+ mingw32/gcc-2.92.2 make (3.77): okay okay[4]
+ cygwin compiled gmake 3.77: fails[1, 5] fails[2, 5]
+ cygwin compiled make 3.78.1: fails[5] fails[2, 5]
+ cygwin compiled make 3.79.1: fails[3, 5] fails[2?, 5]
+ cygwin compiled make 3.80: okay[6] fails?[7]
+ cygwin compiled make 3.81: fails fails?[7]
+ mingw32 compiled make 3.79.1: okay okay
+ mingw32 compiled make 3.80: okay okay[7]
+ mingw32 compiled make 3.81: okay okay[8]
+
+ Notes:
+
+ [1] doesn't cope with makefiles with DOS line endings, so must mount
+ emacs source with text!=binary.
+ [2] fails when needs to invoke shell commands; okay invoking gcc etc.
+ [3] requires LC_MESSAGES support to build; cannot build with early
+ versions of Cygwin.
+ [4] may fail on Windows 9X and Windows ME; if so, install Bash.
+ [5] fails when building leim due to the use of cygwin style paths.
+ May work if building emacs without leim.
+ [6] need to uncomment 3 lines in nt/gmake.defs that invoke `cygpath'
+ (look for "cygpath" near line 85 of gmake.defs).
+ [7] not recommended; please report if you try this combination.
+ [8] tested only on Windows XP.
+
+ Other compilers may work, but specific reports from people that have
+ tried suggest that the Intel C compiler (for example) may produce an
+ Emacs executable with strange filename completion behavior. Unless
+ you would like to assist by finding and fixing the cause of any bugs
+ like this, we recommend the use of the supported compilers mentioned
+ in the previous paragraph.
+
+ You will also need a copy of the POSIX cp, rm and mv programs. These
+ and other useful POSIX utilities can be obtained from one of several
+ projects:
+
+ * http://gnuwin32.sourceforge.net/ ( GnuWin32 )
+ * http://www.mingw.org/ ( MinGW )
+ * http://www.cygwin.com/ ( Cygwin )
+ * http://unxutils.sourceforge.net/ ( UnxUtils )
+
+ If you build Emacs on 16-bit versions of Windows (9X or ME), we
+ suggest to install the Cygwin port of Bash. That is because the
+ native Windows shell COMMAND.COM is too limited; the Emacs build
+ procedure tries very hard to support even such limited shells, but
+ as none of the Windows developers of Emacs work on Windows 9X, we
+ cannot guarantee that it works without a more powerful shell.
+
+ Additional instructions and help for building Emacs on Windows can be
+ found at the Emacs Wiki:
+
+ http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
+
+ and on these URLs:
+
+ http://ourcomments.org/Emacs/w32-build-emacs.html
+ http://derekslager.com/blog/posts/2007/01/emacs-hack-3-compile-emacs-from-cvs-on-windows.ashx
+
+ Both of those pages were written before Emacs switched from CVS to
+ Bazaar, but the parts about building Emacs still apply in Bazaar.
+ The second URL has instructions for building with MSVC, as well as
+ with MinGW, while the first URL covers only MinGW, but has more
+ details about it.
+
+* Configuring
+
+ Configuration of Emacs is now handled by running configure.bat in the
+ `nt' subdirectory. It will detect which compiler you have available,
+ and generate makefiles accordingly. You can override the compiler
+ detection, and control optimization and debug settings, by specifying
+ options on the command line when invoking configure.
+
+ To configure Emacs to build with GCC or MSVC, whichever is available,
+ simply change to the `nt' subdirectory and run `configure.bat' with no
+ options. To see what options are available, run `configure --help'.
+ Do NOT use the --no-debug option to configure.bat unless you are
+ absolutely sure the produced binaries will never need to be run under
+ a debugger.
+
+ Because of limitations of the stock Windows command shells, special
+ care is needed to pass some characters in the arguments of the
+ --cflags and --ldflags options. Backslashes should not be used in
+ file names passed to the compiler and linker via these options. Use
+ forward slashes instead. If the arguments to these two options
+ include the `=' character, like when passing a -DFOO=bar preprocessor
+ option, the argument with the `=' character should be enclosed in
+ quotes, like this:
+
+ configure --cflags "-DFOO=bar"
+
+ Support for options that include the `=' character require "command
+ extensions" to be enabled. (They are enabled by default, but your
+ system administrator could have changed that. See "cmd /?" for
+ details.) If command extensions are disabled, a warning message might
+ be displayed informing you that "using parameters that include the =
+ character by enclosing them in quotes will not be supported."
+
+ You may also use the --cflags and --ldflags options to pass
+ additional parameters to the compiler and linker, respectively; they
+ are frequently used to pass -I and -L flags to specify supplementary
+ include and library directories. If a directory name includes
+ spaces, you will need to enclose it in quotes, as follows
+ -I"C:/Program Files/GnuTLS-2.10.1/include". Note that only the
+ directory name is enclosed in quotes, not the entire argument. Also
+ note that this functionality is only supported if command extensions
+ are available. If command extensions are disabled and you attempt to
+ use this functionality you may see the following warning message
+ "Error in --cflags argument: ... Backslashes and quotes cannot be
+ used with --cflags. Please use forward slashes for filenames and
+ paths (e.g. when passing directories to -I)."
+
+ N.B. It is normal to see a few error messages output while configure
+ is running, when gcc support is being tested. These cannot be
+ suppressed because of limitations in the Windows 9X command.com shell.
+
+ You are encouraged to look at the file config.log which shows details
+ for failed tests, after configure.bat finishes. Any unexplained failure
+ should be investigated and perhaps reported as a bug (see the section
+ about reporting bugs in the file README in this directory and in the
+ Emacs manual).
+
+* Optional image library support
+
+ In addition to its "native" image formats (pbm and xbm), Emacs can
+ handle other image types: xpm, tiff, gif, png, jpeg and experimental
+ support for svg.
+
+ To build Emacs with support for them, the corresponding headers must
+ be in the include path when the configure script is run. This can
+ be setup using environment variables, or by specifying --cflags
+ -I... options on the command-line to configure.bat. The configure
+ script will report whether it was able to detect the headers. If
+ the results of this testing appear to be incorrect, please look for
+ details in the file config.log: it will show the failed test
+ programs and compiler error messages that should explain what is
+ wrong. (Usually, any such failures happen because some headers are
+ missing due to bad packaging of the image support libraries.)
+
+ Note that any file path passed to the compiler or linker must use
+ forward slashes; using backslashes will cause compiler warnings or
+ errors about unrecognized escape sequences.
+
+ To use the external image support, the DLLs implementing the
+ functionality must be found when Emacs first needs them, either on the
+ PATH, or in the same directory as emacs.exe. Failure to find a
+ library is not an error; the associated image format will simply be
+ unavailable. Note that once Emacs has determined that a library can
+ not be found, there's no way to force it to try again, other than
+ restarting. See the variable `dynamic-library-alist' to configure the
+ expected names of the libraries.
+
+ Some image libraries have dependencies on one another, or on zlib.
+ For example, tiff support depends on the jpeg library. If you did not
+ compile the libraries yourself, you must make sure that any dependency
+ is in the PATH or otherwise accessible and that the binaries are
+ compatible (for example, that they were built with the same compiler).
+
+ Binaries for the image libraries (among many others) can be found at
+ the GnuWin32 project. PNG, JPEG and TIFF libraries are also
+ included with GTK, which is installed along with other Free Software
+ that requires it. These are built with MinGW, but they can be used
+ with both GCC/MinGW and MSVC builds of Emacs. See the info on
+ http://ourcomments.org/Emacs/w32-build-emacs.html, under "How to Get
+ Images Support", for more details about installing image support
+ libraries. Note specifically that, due to some packaging snafus in
+ the GnuWin32-supplied image libraries, you will need to download
+ _source_ packages for some of the libraries in order to get the
+ header files necessary for building Emacs with image support.
+
+ If GTK 2.0 is installed, addpm will arrange for its image libraries
+ to be on the DLL search path for Emacs.
+
+ For PNG images, we recommend to use versions 1.4.x and later of
+ libpng, because previous versions had security issues. You can find
+ precompiled libraries and headers on the GTK download page for
+ Windows (http://www.gtk.org/download/win32.php).
+
+ Versions 1.4.0 and later of libpng are binary incompatible with
+ earlier versions, so Emacs will only look for libpng libraries which
+ are compatible with the version it was compiled against. That
+ version is given by the value of the Lisp variable `libpng-version';
+ e.g., 10403 means version 1.4.3. The variable `dynamic-library-alist'
+ is automatically set to name only those DLL names that are known to
+ be compatible with the version given by `libpng-version'. If PNG
+ support does not work for you even though you have the support DLL
+ installed, check the name of the installed DLL against
+ `dynamic-library-alist' and the value of `libpng-version', and
+ download compatible DLLs if needed.
+
+* Optional GnuTLS support
+
+ If configure.bat finds the gnutls/gnutls.h file in the include path,
+ Emacs is built with GnuTLS support by default; to avoid that you can
+ pass the argument --without-gnutls.
+
+ In order to support GnuTLS at runtime, a GnuTLS-enabled Emacs must
+ be able to find the relevant DLLs during startup; failure to do so
+ is not an error, but GnuTLS won't be available to the running
+ session.
+
+ You can get pre-built binaries (including any required DLL and the
+ header files) at http://sourceforge.net/projects/ezwinports/files/.
+
+* Optional libxml2 support
+
+ If configure.bat finds the libxml/HTMLparser.h file in the include path,
+ Emacs is built with libxml2 support by default; to avoid that you can
+ pass the argument --without-libxml2.
+
+ In order to support libxml2 at runtime, a libxml2-enabled Emacs must
+ be able to find the relevant DLLs during startup; failure to do so
+ is not an error, but libxml2 features won't be available to the
+ running session.
+
+ One place where you can get pre-built Windows binaries of libxml2
+ (including any required DLL and the header files) is here:
+
+ http://sourceforge.net/projects/ezwinports/files/
+
+ To compile Emacs with libxml2 from that site, you will need to pass
+ the "--cflags -I/path/to/include/libxml2" option to configure.bat,
+ because libxml2 header files are installed in the include/libxml2
+ subdirectory of the directory where you unzip the binary
+ distribution. Other binary distributions might use other
+ directories, although include/libxml2 is the canonical place where
+ libxml2 headers are installed on Posix platforms.
+
+ You will also need to install the libiconv "development" tarball,
+ because the libiconv headers need to be available to the compiler
+ when you compile with libxml2 support. A MinGW port of libiconv can
+ be found on the MinGW site:
+
+ http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/
+
+ You need the libiconv-X.Y.Z-N-mingw32-dev.tar.lzma tarball from that
+ site.
+
+* Experimental SVG support
+
+ SVG support is currently experimental, and not built by default.
+ Specify --with-svg and ensure you have all the dependencies in your
+ include path. Unless you have built a minimalist librsvg yourself
+ (untested), librsvg depends on a significant chunk of GTK+ to build,
+ plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime. The
+ easiest way to obtain the dependencies required for building is to
+ download a pre-bundled GTK+ development environment for Windows.
+ GTK puts its header files all over the place, so you will need to
+ run pkgconfig to list the include path you will need (either passed
+ to configure.bat as --cflags options, or set in the environment).
+
+ To use librsvg at runtime, ensure that librsvg and its dependencies
+ are on your PATH. If you didn't build librsvg yourself, you will
+ need to check with where you downloaded it from for the
+ dependencies, as there are different build options. If it is a
+ short list, then it most likely only lists the immediate
+ dependencies of librsvg, but the dependencies themselves have
+ dependencies - so don't download individual libraries from GTK+,
+ download and install the whole thing. If you think you've got all
+ the dependencies and SVG support is still not working, check your
+ PATH for other libraries that shadow the ones you downloaded.
+ Libraries of the same name from different sources may not be
+ compatible, this problem was encountered with libbzip2 from GnuWin32
+ with libcroco from gnome.org.
+
+ If you can see etc/images/splash.svg, then you have managed to get
+ SVG support working. Congratulations for making it through DLL hell
+ to this point. You'll probably find that some SVG images crash
+ Emacs. Problems have been observed in some images that contain
+ text, they seem to be a problem in the Windows port of Pango, or
+ maybe a problem with the way Cairo or librsvg is using it that
+ doesn't show up on other platforms.
+
+* Optional extra runtime checks
+
+ The configure.bat option --enable-checking builds Emacs with some
+ optional extra runtime checks and assertions enabled. This may be
+ useful for debugging.
+
+* Optional extra libraries
+
+ You can pass --lib LIBNAME option to configure.bat to cause Emacs to
+ link with the specified library. You can use this option more than once.
+
+* Building
+
+ After running configure, simply run the appropriate `make' program for
+ your compiler to build Emacs. For MSVC, this is nmake; for GCC, it is
+ GNU make. (If you are building out of Bazaar, say "make bootstrap" or
+ "nmake bootstrap" instead.)
+
+ As the files are compiled, you will see some warning messages
+ declaring that some functions don't return a value, or that some data
+ conversions will be lossy, etc. You can safely ignore these messages.
+ The warnings may be fixed in the main FSF source at some point, but
+ until then we will just live with them.
+
+ With GNU Make, you can use the -j command-line option to have Make
+ execute several commands at once, like this:
+
+ gmake -j 4 XMFLAGS="-j 3"
+
+ The XMFLAGS variable overrides the default behavior of GNU Make on
+ Windows, whereby recursive Make invocations reset the maximum number
+ of simultaneous commands to 1. The above command allows up to 4
+ simultaneous commands at once in the top-level Make, and up to 3 in
+ each one of the recursive Make's; you can use other numbers of jobs,
+ if you wish.
+
+ If you are building from Bazaar, the following commands will produce
+ the Info manuals (which are not part of the Bazaar sources):
+
+ make info
+ or
+ nmake info
+
+ Note that you will need makeinfo.exe (from the GNU Texinfo package)
+ in order for this command to succeed.
+
+* Installing
+
+ To install Emacs after it has compiled, simply run `nmake install'
+ or `make install', depending on which version of the Make utility
+ do you have.
+
+ By default, Emacs will be installed in the location where it was
+ built, but a different location can be specified either using the
+ --prefix option to configure, or by setting INSTALL_DIR when running
+ make, like so:
+
+ make install INSTALL_DIR=D:/emacs
+
+ (for `nmake', type "nmake install INSTALL_DIR=D:/emacs" instead).
+
+ The install process will run addpm to setup the registry entries, and
+ to create a Start menu icon for Emacs.
+
+* Make targets
+
+ The following make targets may be used by users building the source
+ distribution, or users who have checked out of Bazaar after
+ an initial bootstrapping.
+
+ make
+ Builds Emacs from the available sources and pre-compiled lisp files.
+
+ make install
+ Installs programs to the bin directory, and runs addpm to create
+ Start Menu icons.
+
+ make clean
+ Removes object and executable files produced by the build process in
+ the current configuration. After make clean, you can rebuild with
+ the same configuration using make.
+
+ make distclean
+ In addition to the files removed by make clean, this also removes
+ Makefiles and other generated files to get back to the state of a
+ freshly unpacked source distribution. Note that this will not remove
+ installed files, or the results of builds performed with different
+ compiler or optimization options than the current configuration.
+ After make distclean, it is necessary to run configure.bat followed
+ by make to rebuild.
+
+ make cleanall
+ Removes object and executable files that may have been created by
+ previous builds with different configure options, in addition to
+ the files produced by the current configuration.
+
+ make realclean
+ Removes the installed files in the bin subdirectory in addition to
+ the files removed by make cleanall.
+
+ make dist
+ Builds Emacs from the available sources and pre-compiled lisp files.
+ Packages Emacs binaries as full distribution and barebin distribution.
+
+ The following targets are intended only for use with the Bazaar sources.
+
+ make bootstrap
+ Creates a temporary emacs binary with lisp source files and
+ uses it to compile the lisp files. Once the lisp files are built,
+ emacs is redumped with the compiled lisp.
+
+ make recompile
+ Recompiles any changed lisp files after an update. This saves
+ doing a full bootstrap after every update. If this or a subsequent
+ make fail, you probably need to perform a full bootstrap, though
+ running this target multiple times may eventually sort out the
+ interdependencies.
+
+ make maintainer-clean
+ Removes everything that can be recreated, including compiled lisp
+ files, to get back to the state of a fresh Bazaar tree. After make
+ maintainer-clean, it is necessary to run configure.bat and make
+ bootstrap to rebuild. Occasionally it may be necessary to run this
+ target after an update.
+
+* Creating binary distributions
+
+ Binary distributions (full and barebin distributions) can be
+ automatically built and packaged from source tarballs or a bzr
+ checkout.
+
+ When building Emacs binary distributions, the --distfiles argument
+ to configure.bat specifies files to be included in the bin directory
+ of the binary distributions. This is intended for libraries that are
+ not built as part of Emacs, e.g. image libraries.
+
+ For example, specifying
+
+ --distfiles D:\distfiles\libXpm.dll
+
+ results in libXpm.dll being copied from D:\distfiles to the
+ bin directory before packaging starts.
+
+ Multiple files can be specified using multiple --distfiles arguments:
+
+ --distfiles D:\distfiles\libXpm.dll --distfiles C:\jpeglib\jpeg.dll
+
+ For packaging the binary distributions, the 'dist' make target uses
+ 7-Zip (http://www.7-zip.org), which must be installed and available
+ on the Windows Path.
+
+
+* Trouble-shooting
+
+ The main problems that are likely to be encountered when building
+ Emacs stem from using an old version of GCC, or old MinGW or Windows API
+ headers. Additionally, Cygwin ports of GNU make may require the Emacs
+ source tree to be mounted with text!=binary, because the makefiles
+ generated by configure.bat necessarily use DOS line endings. Also,
+ Cygwin ports of make must run in UNIX mode, either by specifying
+ --unix on the command line, or MAKE_MODE=UNIX in the environment.
+
+ When configure runs, it attempts to detect when GCC itself, or the
+ headers it is using, are not suitable for building Emacs. GCC version
+ 2.95 or later is needed, because that is when the Windows port gained
+ sufficient support for anonymous structs and unions to cope with some
+ definitions from winnt.h that are used by addsection.c.
+ Older versions of the Windows API headers that come with Cygwin and MinGW
+ may be missing some definitions required by Emacs, or broken in other
+ ways. In particular, uniscribe APIs were added to MinGW CVS only on
+ 2006-03-26, so releases from before then cannot be used.
+
+ When in doubt about correctness of what configure did, look at the file
+ config.log, which shows all the failed test programs and compiler
+ messages associated with the failures. If that doesn't give a clue,
+ please report the problems, together with the relevant fragments from
+ config.log, as bugs.
+
+ If configure succeeds, but make fails, install the Cygwin port of
+ Bash, even if the table above indicates that Emacs should be able to
+ build without sh.exe. (Some versions of Windows shells are too dumb
+ for Makefile's used by Emacs.)
+
+ If you are using certain Cygwin builds of GCC, such as Cygwin version
+ 1.1.8, you may need to specify some extra compiler flags like so:
+
+ configure --with-gcc --cflags -mwin32 --cflags -D__MSVCRT__
+ --ldflags -mwin32
+
+ However, the latest Cygwin versions, such as 1.3.3, don't need those
+ switches; you can simply use "configure --with-gcc".
+
+ We will attempt to auto-detect the need for these flags in a future
+ release.
+
+* Debugging
+
+ You should be able to debug Emacs using the debugger that is
+ appropriate for the compiler you used, namely DevStudio or Windbg if
+ compiled with MSVC, or GDB if compiled with GCC. (GDB for Windows
+ is available from the MinGW site, http://www.mingw.org/download.shtml.)
+
+ When Emacs aborts due to a fatal internal error, Emacs on Windows
+ pops up an Emacs Abort Dialog asking you whether you want to debug
+ Emacs or terminate it. If Emacs was built with MSVC, click YES
+ twice, and Windbg or the DevStudio debugger will start up
+ automatically. If Emacs was built with GCC, first start GDB and
+ attach it to the Emacs process with the "gdb -p EMACS-PID" command,
+ where EMACS-PID is the Emacs process ID (which you can see in the
+ Windows Task Manager), type the "continue" command inside GDB, and
+ only then click YES on the abort dialog. This will pass control to
+ the debugger, and you will be able to debug the cause of the fatal
+ error.
+
+ The single most important thing to find out when Emacs aborts or
+ crashes is where did that happen in the Emacs code. This is called
+ "backtrace".
+
+ Emacs on Windows uses more than one thread. When Emacs aborts due
+ to a fatal error, the current thread may not be the application
+ thread running Emacs code. Therefore, to produce a meaningful
+ backtrace from a debugger, you need to instruct it to show the
+ backtrace for every thread. With GDB, you do it like this:
+
+ (gdb) thread apply all backtrace
+
+ To run Emacs under a debugger to begin with, simply start it from
+ the debugger. With GDB, chdir to the `src' directory (if you have
+ the source tree) or to a directory with the `.gdbinit' file (if you
+ don't have the source tree), and type these commands:
+
+ C:\whatever\src> gdb x:\path\to\emacs.exe
+ (gdb) run <ARGUMENTS TO EMACS>
+
+ Thereafter, use Emacs as usual; you can minimize the debugger
+ window, if you like. The debugger will take control if and when
+ Emacs crashes.
+
+ Emacs functions implemented in C use a naming convention that reflects
+ their names in lisp. The names of the C routines are the lisp names
+ prefixed with 'F', and with dashes converted to underscores. For
+ example, the function call-process is implemented in C by
+ Fcall_process. Similarly, lisp variables are prefixed with 'V', again
+ with dashes converted to underscores. These conventions enable you to
+ easily set breakpoints or examine familiar lisp variables by name.
+
+ Since Emacs data is often in the form of a lisp object, and the
+ Lisp_Object type is difficult to examine manually in a debugger,
+ Emacs provides a helper routine called debug_print that prints out a
+ readable representation of a Lisp_Object. If you are using GDB,
+ there is a .gdbinit file in the src directory which provides
+ definitions that are useful for examining lisp objects. Therefore,
+ the following tips are mainly of interest when using MSVC.
+
+ The output from debug_print is sent to stderr, and to the debugger
+ via the OutputDebugString routine. The output sent to stderr should
+ be displayed in the console window that was opened when the
+ emacs.exe executable was started. The output sent to the debugger
+ should be displayed in its "Debug" output window.
+
+ When you are in the process of debugging Emacs and you would like to
+ examine the contents of a Lisp_Object variable, pop up the QuickWatch
+ window (QuickWatch has an eyeglass symbol on its button in the
+ toolbar). In the text field at the top of the window, enter
+ debug_print(<variable>) and hit return. For example, start and run
+ Emacs in the debugger until it is waiting for user input. Then click
+ on the Break button in the debugger to halt execution. Emacs should
+ halt in ZwUserGetMessage waiting for an input event. Use the Call
+ Stack window to select the procedure w32_msp_pump up the call stack
+ (see below for why you have to do this). Open the QuickWatch window
+ and enter debug_print(Vexec_path). Evaluating this expression will
+ then print out the contents of the lisp variable exec-path.
+
+ If QuickWatch reports that the symbol is unknown, then check the call
+ stack in the Call Stack window. If the selected frame in the call
+ stack is not an Emacs procedure, then the debugger won't recognize
+ Emacs symbols. Instead, select a frame that is inside an Emacs
+ procedure and try using debug_print again.
+
+ If QuickWatch invokes debug_print but nothing happens, then check the
+ thread that is selected in the debugger. If the selected thread is
+ not the last thread to run (the "current" thread), then it cannot be
+ used to execute debug_print. Use the Debug menu to select the current
+ thread and try using debug_print again. Note that the debugger halts
+ execution (e.g., due to a breakpoint) in the context of the current
+ thread, so this should only be a problem if you've explicitly switched
+ threads.
+
+\f
+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/>.
* Further information
- There is a web page that serves as a FAQ for the Windows port of
- Emacs (a.k.a. NTEmacs) at:
+ The FAQ for the MS Windows port of Emacs is distributed with Emacs
+ (info manual "efaq-w32"), and also available at
- http://www.gnu.org/software/emacs/windows/ntemacs.html
+ http://www.gnu.org/software/emacs/manual/efaq-w32.html
There is also a mailing list for discussing issues related to this
port of Emacs. For information about the list, see this Web page:
Use the built in bug reporting functionality in Emacs so that it
will be seen by the right people. You can use the command M-x
- report-emacs-bug to create and send the bug report, but in some
- cases there is a function to report bugs in a specific package;
- e.g. M-x gnus-bug for Gnus, M-x c-submit-bug-report for C/C++/Java
- mode, etc.
-
+ report-emacs-bug to create and send the bug report.
\f
This file is part of GNU Emacs.
this file as part of the Emacs source distribution, please read
those 2 files and not this one.
- Answers to frequently asked questions, and further information about
- this port of GNU Emacs and related software packages can be found via
- http:
-
- http://www.gnu.org/software/emacs/windows/
-
* Preliminaries
Along with this file should be six subdirectories (bin, etc, info,
* Further information
- If you have access to the World Wide Web, I would recommend pointing
- your favorite web browser to the following document (if you haven't
- already):
-
- http://www.gnu.org/software/emacs/windows/
+ The FAQ for the MS Windows port of Emacs is distributed with Emacs
+ (info manual "efaq-w32"), and also available at
- This document serves as an FAQ and a source for further information
- about the Windows port and related software packages.
+ http://www.gnu.org/software/emacs/manual/efaq-w32.html
In addition to the FAQ, there is a mailing list for discussing issues
related to the Windows port of Emacs. For information about the
rem\r
echo ****************************************************************\r
echo *** THIS METHOD OF BUILDING EMACS IS NO LONGER SUPPORTED. **\r
-echo *** INSTEAD, FOLLOW THE INSTRUCTIONS FROM INSTALL.MSYS. **\r
+echo *** INSTEAD, FOLLOW THE INSTRUCTIONS FROM INSTALL. **\r
echo ****************************************************************\r
:confirm_continue\r
set /p answer=Continue running this script at your own risks ? (Y/N)\r
echo. IMPORTANT: This method of building Emacs for MS-Windows is deprecated,\r
echo. and could be removed in a future version of Emacs. The preferred way\r
echo to build Emacs for MS-Windows from now on is using the MSYS environment\r
-echo. and MinGW development tools. Please see nt/INSTALL.MSYS for details.\r
+echo. and MinGW development tools. Please see nt/INSTALL for details.\r
goto end\r
\r
rem ----------------------------------------------------------------------\r
+2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ Makefile improvements.
+ * Makefile.in (all, tags): Don't use double-colon rules, as they
+ are not portable according to POSIX. Mark as phony.
+
2012-12-04 Paul Eggert <eggert@cs.ucla.edu>
Include <config.h> uniformly in oldXMenu sources.
SetSel.o \
XDelAssoc.o XLookAssoc.o XCrAssoc.o XDestAssoc.o XMakeAssoc.o
-all:: libXMenu11.a
+all: libXMenu11.a
+.PHONY: all
ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
$(C_SWITCH_X_SITE) \
rm -f Makefile
maintainer-clean: distclean
-tags::
+tags:
$(TAGS) -t *.[ch]
+.PHONY: tags
+2013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * eval.c (Feval): Document the new use of `lexical'.
+
+2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Review and drop old frame resize hack.
+ * frame.h (struct frame): Remove force_flush_display_p.
+ * dispnew.c (update_frame): Adjust user and don't call
+ flush_frame here. The comment has said that there was an issues
+ with redisplaying fringes, but I don't see any differences with
+ and without this hack. Hopefully we can continue without it.
+ * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
+ current frame matrices twice if resized_p is set.
+
+2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Do not populate pure Xism x_sync to other ports.
+ * frame.h (x_sync): Move under HAVE_X_WINDOWS.
+ * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
+ * nsfns.m, w32xfns.c (x_sync): Remove no-op.
+ * w32term.h (x_sync): Remove prototype.
+
+2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Cleanup frame flushing.
+ * dispextern.h (struct redisplay_interface):
+ Drop flush_display_optional because flush_display is enough
+ for X and flushing via RIF is just a no-op for others.
+ * frame.h (flush_frame): New function.
+ * dispnew.c (update_frame):
+ * minibuf.c (read_minibuf):
+ * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
+ Use it.
+ * keyboard.c (detect_input_pending_run_timers): Do not flush
+ all frames but selected one in redisplay_preserve_echo_area.
+ * nsterm.m (ns_flush): Remove no-op.
+ (ns_redisplay_interface): Adjust user.
+ * w32term.h (x_flush): Remove no-op.
+ (w32_redisplay_interface): Adjust user.
+ * xterm.c (x_flush): Simplify because we do not flush all
+ frames at once any more. Adjust comment.
+ (x_redisplay_interface): Adjust user.
+
+2013-09-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ Port --without-x --enable-gcc-warnings to Fedora 19.
+ * gfilenotify.c (globals_of_gfilenotify):
+ Call g_type_init only if using an older glib version that needs it.
+
+2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
+ (last_glyphless_glyph_merged_face_id): Remove declarations.
+ * dispextern.h (merge_glyphless_glyph_face): Add prototype.
+ * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
+ (last_glyphless_glyph_merged_face_id): Now static.
+ (merge_escape_glyph_face): New function, refactored from...
+ (get_next_display_element): ...here.
+ (merge_glyphless_glyph_face): New function, refactored from...
+ (produce_glyphless_glyph): ...here...
+ * term.c (produce_glyphless_glyph): ...and here.
+
+2013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * eval.c (eval_sub): Only call Ffunction if necessary.
+
+2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Attempt to make redisplay more selective when changing cursor type.
+ * frame.h (struct frame): New bitfield cursor_type_changed.
+ * xdisp.c (cursor_type_changed): Remove.
+ (try_cursor_movement, redisplay_window, try_window_id)
+ (set_frame_cursor_types, try_window_reusing_current_matrix):
+ Adjust to use per-frame bitfield.
+ (redisplay_internal): Look for cursor type change on each visible
+ frame and consider all frames if cursor type has been changed on
+ the frame other than selected. If cursor type has been changed on
+ selected frame only, do not use fast update.
+
+2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Attempt to make redisplay more selective when changing fonts.
+ * frame.h (struct frame): New bitfield fonts_changed.
+ * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
+ (adjust_frame_glyphs): Add prototype.
+ * dispnew.c (fonts_changed_p): Remove.
+ (adjust_glyphs): Remove because we do not
+ adjust matrices on all frames at once any more.
+ (adjust_frame_glyphs): Block and unblock input here.
+ (adjust_glyph_matrix): Use fonts_changed.
+ (change_frame_size_1): Use adjust_frame_glyphs.
+ * font.c (font_open_entity): Use fonts_changed.
+ * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
+ * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
+ * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
+ (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
+ (shrink_mini_window, Fresize_mini_window_internal)
+ (window_scroll_pixel_based, Fset_window_configuration)
+ (apply_window_adjustment, Fset_window_vscroll):
+ * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
+ Use adjust_frame_glyphs.
+ * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
+ (try_window_reusing_current_matrix, try_window_id, display_line)
+ (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
+ (redisplay_internal): Consider fonts_changed and adjust frame
+ matrices for each frame only if the frame is visible. If font
+ has been changed on some frame during full redisplay, retry
+ only visible frames where the font has been actually changed.
+
+2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Cache current header and mode line height for each window.
+ * window.h (struct window): New fields mode_line_height
+ and header_line_height.
+ * window.c (make_window): Initialize them.
+ * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
+ (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
+ (current_mode_line_height, current_header_line_height):
+ Remove declaration.
+ * xdisp.c (current_mode_line_height, current_header_line_height):
+ Remove.
+ (pos_visible_p, init_xdisp): Adjust user.
+ (redisplay_window): Invalidate mode_line_height and
+ header_line_height if current and desired matrices do not agree.
+
+2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
+ * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
+
+2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Make --without-x compatible with --enable-gcc-warnings.
+ * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
+ * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
+ members under HAVE_WINDOW_SYSTEM.
+ * keyboard.c (make_lispy_focus_out): Likewise.
+ (record_menu_key): Move under HAVE_MENUS.
+ * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
+ THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
+ (syms_of_xdisp): Adjust user.
+ (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
+ (start_hourglass, cancel_hourglass):
+ * xfaces.c (toplevel): Likewise with PT_PER_INCH,
+ clear_font_table_count, CLEAR_FONT_TABLE_COUNT
+ and CLEAR_FONT_TABLE_NFONTS.
+ (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
+ Declare only if HAVE_WINDOW_SYSTEM.
+ (lface_same_font_attributes_p, clear_face_gcs): Define only
+ if HAVE_WINDOW_SYSTEM.
+
+2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
+ * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
+ Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
+
+2013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
+
+2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
+ This fixes a type error on hosts where ptrdiff_t is wider than int.
+
+2013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * keyboard.c (read_key_sequence_vs): New function.
+ (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
+ common code.
+
+ * callint.c (Fcall_interactively): Always return a vector for 'K'.
+
+2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ Makefile improvements.
+ * Makefile.in (config.status): Don't use double-colon rules, as
+ they are not portable according to POSIX. Fix shell typo with `;
+ I guess this rule has never been tested?
+ (VCSWITNESS): New macro, to override any environment var.
+
+2013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * xterm.h (struct x_display_info): Do not track X connection
+ fd separately because it is always available from Display.
+ * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
+ Adjust users.
+
+2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * buffer.c (drop_overlay):
+ * fileio.c (restore_point_unwind): Prefer unchain_marker to
+ Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
+
+2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * buffer.c (Fmake_overlay, Fmove_overlay):
+ * intervals.c (set_point_from_marker):
+ * print.c (PRINTPREPARE): Prefer signal_error
+ to plain error and report unsuitable marker too.
+
+2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
+ for 'dragging' member.
+ (struct x_output): Remove set-but-unused leftovers
+ 'left_before_move' and 'top_before_move'.
+ * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
+ * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
+ (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
+ (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
+ (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
+ (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
+ (x_scroll_bar_report_motion, x_set_offset): Related users changed.
+ * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
+
+2013-09-03 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsfont.m (INVALID_GLYPH): New define.
+ (nsfont_encode_char): Use INVALID_GLYPH.
+ (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
+
+2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * xterm.c (x_last_mouse_movement_time): Revert last change.
+ This code should use XDisplayMotionBufferSize to check display's
+ motion history first, and there are few other issues as well.
+ (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
+ (handle_one_xevent): Adjust user.
+
+2013-09-02 Martin Rudalics <rudalics@gmx.at>
+
+ * dispnew.c (Flast_nonminibuf_frame): Move from here ...
+ * frame.c (Flast_nonminibuf_frame): ... to here.
+ (check_minibuf_window): Don't abort if no window was found
+ (Bug#15247).
+
+2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Use XGetMotionEvents to ask the last mouse motion time from X server.
+ * xterm.c (X_MOTION_HISTORY): Default to 1.
+ (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
+ (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
+ (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
+ Ifdef away legacy code.
+ (XTmouse_position, x_scroll_bar_report_motion):
+ Use x_last_mouse_movement_time.
+ (handle_one_xevent): Use event.xunmap and not event.xmap when handling
+ UnmapNotify event.
+
+2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * msdos.c (last_mouse_window): Move to...
+ (dos_rawgetc): ...this function and adjust comment.
+ * nsterm.m (last_window): Rename to last_mouse_window, move to...
+ (mouseMoved): ...this function and adjust comment.
+ * w32term.c (last_window): Likewise with...
+ (w32_read_socket): ...this function.
+ * xterm.c (last_window): Likewise with...
+ (handle_one_xevent): ...this function.
+
+2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
+ * xterm.c (toplevel): Drop obsolete comment and move compose_status...
+ (handle_one_xevent): ...to here.
+ (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
+ otherwise.
+
+2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * msdos.c (IT_set_terminal_window): Remove no-op.
+ (initialize_msdos_display): Adjust terminal setup.
+ * w32console.c (w32con_set_terminal_window): Remove no-op.
+ (initialize_w32_display): Adjust terminal setup.
+ * w32term.c (w32_set_terminal_window): Remove no-op.
+ (w32_create_terminal): Adjust terminal setup.
+ * xterm.c (XTset_terminal_window): Remove no-op.
+ (x_create_terminal): Adjust terminal setup.
+
+2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
+ Remove no-ops.
+ (ns_create_terminal): Adjust terminal setup.
+ * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
+ Remove no-ops.
+ (w32_create_terminal): Adjust terminal setup.
+ * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
+ Remove no-ops.
+ (x_create_terminal): Adjust terminal setup.
+
+2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
+ (CLIP_TEXT_POS_FROM_MARKER): New macro.
+ * dispnew.c (buffer_posn_from_coords):
+ * window.c (Fwindow_end, displayed_window_lines):
+ * xdisp.c (redisplay_mode_lines): Use it.
+
+2013-09-01 Jan Djärv <jan.h.d@swipnet.se>
+
+ * fontset.c (face_for_char): Check char in the current face font first
+ if HAVE_NS (Bug#15138).
+
+2013-08-31 Martin Rudalics <rudalics@gmx.at>
+
+ * window.c (temp_output_buffer_show): Make sure window returned
+ by display_buffer is live (Bug#15213).
+
+2013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Minor cleanup to avoid forward declarations.
+ * coding.h (struct ccl_spec): Remove forward declaration.
+ * composite.h (toplevel): Include font.h.
+ (struct composition_it, struct face, struct font_metrics):
+ Remove forward declaration.
+ * dispextern.h (struct image, struct atimer): Likewise.
+ * emacsgtkfixed.h (struct frame): Likewise.
+ * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
+ * font.h (struct font_driver, struct font, struct glyph_string)
+ (struct face): Remove forward declaration.
+ * fontset.h (struct face, struct font): Likewise.
+ * frame.h (toplevel): Style cleanup.
+ (enum output_method): Move to...
+ * termhooks.h (enum output_method): ...here.
+ (struct glyph, struct frame, struct ns_display_info)
+ (struct x_display_info, struct w32_display_info):
+ Remove forward declaration.
+ * xterm.h (toplevel): Include termhooks.h.
+ (struct font, struct window, struct glyph_matrix, struct frame)
+ (struct input_event, struct face, struct image): Remove forward
+ declaration.
+ * gtkutil.h (struct _widget_value): Likewise.
+ * keyboard.h (toplevel): Include termhooks.h.
+ (struct input_event): Remove forward declaration.
+
+2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * intervals.c (set_point_from_marker): New function.
+ * editfns.c (Fgoto_char):
+ * process.c (Finternal_default_process_filter):
+ * window.c (select_window_1): Use it.
+ * buffer.h (set_point_from_marker): Add prototype.
+
+2013-08-29 Eli Zaretskii <eliz@gnu.org>
+
+ * w32.c (term_winsock): Call release_listen_threads before calling
+ WSACleanup.
+ (_sys_wait_accept): Wait for accept event in a loop with a finite
+ timeout, instead of waiting indefinitely. Will hopefully avoid
+ hanging during exit because WSACleanup deadlocks waiting for the
+ event object to be released. (Bug#14333)
+
+ * w32proc.c (release_listen_threads): New function, signals all
+ the reader threads that listen for connections to stop waiting.
+
+ * w32.h (release_listen_threads): Add prototype.
+
+2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
+ field of new marker (for sanity and safety).
+ * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
+ anyway because XMISCTYPE is a function and can't be an lvalue).
+
+2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * xterm.c (x_clear_area): Lost 7th arg because it is always False.
+ (x_after_update_window_line, x_scroll_bar_create):
+ (x_scroll_bar_set_handle, XTset_vertical_scroll_bar):
+ (handle_one_xevent, x_clear_frame_area):
+ * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
+ * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
+ * xterm.h (x_clear_area): Adjust prototype.
+
+2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Hook scanning and indentation functions to find_newline. This helps
+ to avoid duplicated code and renders more respect to newline cache.
+ * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
+ * cmds.c (Fforward_line):
+ * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
+ Use find_newline and avoid unnecessary point movements.
+ * search.c (scan_newline): Implement on top of find_newline.
+
+2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
+ scoped code (bug#11258).
+
+2013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
+
+ * nsterm.m (last_window): New variable.
+ (EV_TRAILER2): New macro.
+ (EV_TRAILER): Call EV_TRAILER2.
+ (mouseMoved:): Add support for mouse-autoselect-window
+ on nextstep (Bug#6888).
+
+2013-08-28 Andreas Schwab <schwab@suse.de>
+
+ * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
+ (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
+ Remove unused macro definitions.
+ (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
+ (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
+ Only define if emacs.
+
+2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Prefer enum glyph_row_area to int where appropriate.
+ * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
+ Fix comment.
+ (window_box, window_box_width, window_box_left, window_box_left_offset)
+ (window_box_right, window_box_right_offset): Adjust prototypes.
+ * xdisp.c (window_box, window_box_width, window_box_left)
+ (window_box_left_offset, window_box_right, window_box_right_offset):
+ Use enum glyph_row_area. Adjust users and tweak comment where needed.
+ (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
+ * nsterm.m (ns_clip_to_row):
+ * w32term.c (w32_clip_to_row):
+ * xterm.c (x_clip_to_row): Likewise.
+
+2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
+ (Fprevious_overlay_change): Fast path for buffer with no overlays.
+
+2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+ for portability to hosts where /bin/sh has problems.
+
+2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Redesign redisplay interface to drop global output_cursor.
+ * dispextern.h (struct redisplay_interface): Remove cursor_to member.
+ (toplevel): Remove declaration of output_cursor.
+ (set_output_cursor, x_cursor_to): Remove prototype.
+ * window.h (struct window): New member output_cursor.
+ (output_cursor_to): New function to replace RIF member.
+ * dispnew.c (redraw_overlapped_rows, update_marginal_area)
+ (update_text_area, set_window_cursor_after_update): Use it.
+ * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
+ (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
+ * nsterm.m (ns_update_window_begin, ns_update_window_end):
+ * w32term.c (x_update_window_begin, x_update_window_end):
+ * xterm.c (x_update_window_begin, x_update_window_end):
+ Adjust to use per-window output cursor.
+
2013-08-27 Paul Eggert <eggert@cs.ucla.edu>
+ Simplify SELECT_TYPE-related code.
+ Like EMACS_TIME, this portability layer is no longer needed, since
+ Emacs has been using fd_set as a portability layer for some time.
+ * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
+ (SELECT_TYPE): Remove. All uses changed to fd_set.
+ (fd_set) [!FD_SET]: New typedef.
+
Simplify EMACS_TIME-related code.
This portability layer is no longer needed, since Emacs has been
using struct timespec as a portability layer for some time.
# script may need modifying in sync with changes made here. Try to
# avoid shell-ism because the DOS build has to use the DOS shell.
-SHELL = /bin/sh
+SHELL = @SHELL@
# Here are the things that we expect ../configure to edit.
# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
$(OLDXMENU): $(OLDXMENU_TARGET)
-../config.status:: epaths.in
- @echo "The file epaths.h needs to be set up from epaths.in."
- @echo "Please run the `configure' script again."
- exit 1
-
-../config.status:: config.in
- @echo "The file config.h needs to be set up from config.in."
- @echo "Please run the `configure' script again."
+../config.status: config.in epaths.in
+ @echo "The file ${?:.in=.h} needs to be set up from $?."
+ @echo "Please run the 'configure' script again."
exit 1
doc.o: buildobj.h
## VCSWITNESS points to the file that holds info about the current checkout.
## We use it as a heuristic to decide when to rebuild loaddefs.el.
+## If empty it is ignored; the parent makefile can set it to some other value.
+VCSWITNESS =
+
$(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS)
cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=$(bootstrap_exe)
p->charpos = 0;
p->next = NULL;
p->insertion_type = 0;
+ p->need_adjustment = 0;
return val;
}
m->charpos = charpos;
m->bytepos = bytepos;
m->insertion_type = 0;
+ m->need_adjustment = 0;
m->next = BUF_MARKERS (buf);
BUF_MARKERS (buf) = m;
return obj;
Any number of arguments, even zero arguments, are allowed. */
Lisp_Object
-make_event_array (register int nargs, Lisp_Object *args)
+make_event_array (ptrdiff_t nargs, Lisp_Object *args)
{
- int i;
+ ptrdiff_t i;
for (i = 0; i < nargs; i++)
/* The things that fit in a string
eassert (b == XBUFFER (Fmarker_buffer (ov->start)));
modify_overlay (b, marker_position (ov->start),
marker_position (ov->end));
- Fset_marker (ov->start, Qnil, Qnil);
- Fset_marker (ov->end, Qnil, Qnil);
+ unchain_marker (XMARKER (ov->start));
+ unchain_marker (XMARKER (ov->end));
}
The fifth arg REAR-ADVANCE, if non-nil, makes the marker
for the rear of the overlay advance when text is inserted there
\(which means the text *is* included in the overlay). */)
- (Lisp_Object beg, Lisp_Object end, Lisp_Object buffer, Lisp_Object front_advance, Lisp_Object rear_advance)
+ (Lisp_Object beg, Lisp_Object end, Lisp_Object buffer,
+ Lisp_Object front_advance, Lisp_Object rear_advance)
{
Lisp_Object overlay;
struct buffer *b;
XSETBUFFER (buffer, current_buffer);
else
CHECK_BUFFER (buffer);
- if (MARKERP (beg)
- && ! EQ (Fmarker_buffer (beg), buffer))
- error ("Marker points into wrong buffer");
- if (MARKERP (end)
- && ! EQ (Fmarker_buffer (end), buffer))
- error ("Marker points into wrong buffer");
+
+ if (MARKERP (beg) && !EQ (Fmarker_buffer (beg), buffer))
+ signal_error ("Marker points into wrong buffer", beg);
+ if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer))
+ signal_error ("Marker points into wrong buffer", end);
CHECK_NUMBER_COERCE_MARKER (beg);
CHECK_NUMBER_COERCE_MARKER (end);
if (NILP (Fbuffer_live_p (buffer)))
error ("Attempt to move overlay to a dead buffer");
- if (MARKERP (beg)
- && ! EQ (Fmarker_buffer (beg), buffer))
- error ("Marker points into wrong buffer");
- if (MARKERP (end)
- && ! EQ (Fmarker_buffer (end), buffer))
- error ("Marker points into wrong buffer");
+ if (MARKERP (beg) && !EQ (Fmarker_buffer (beg), buffer))
+ signal_error ("Marker points into wrong buffer", beg);
+ if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer))
+ signal_error ("Marker points into wrong buffer", end);
CHECK_NUMBER_COERCE_MARKER (beg);
CHECK_NUMBER_COERCE_MARKER (end);
CHECK_NUMBER_COERCE_MARKER (pos);
+ if (!buffer_has_overlays ())
+ return Qnil;
+
len = 10;
/* We can't use alloca here because overlays_at can call xrealloc. */
overlay_vec = xmalloc (len * sizeof *overlay_vec);
CHECK_NUMBER_COERCE_MARKER (beg);
CHECK_NUMBER_COERCE_MARKER (end);
+ if (!buffer_has_overlays ())
+ return Qnil;
+
len = 10;
overlay_vec = xmalloc (len * sizeof *overlay_vec);
CHECK_NUMBER_COERCE_MARKER (pos);
+ if (!buffer_has_overlays ())
+ return make_number (ZV);
+
len = 10;
overlay_vec = xmalloc (len * sizeof *overlay_vec);
CHECK_NUMBER_COERCE_MARKER (pos);
+ if (!buffer_has_overlays ())
+ return make_number (BEGV);
+
/* At beginning of buffer, we know the answer;
avoid bug subtracting 1 below. */
if (XINT (pos) == BEGV)
extern void set_point_both (ptrdiff_t, ptrdiff_t);
extern void temp_set_point_both (struct buffer *,
ptrdiff_t, ptrdiff_t);
+extern void set_point_from_marker (Lisp_Object);
extern void enlarge_buffer_text (struct buffer *, ptrdiff_t);
\f
Fput_text_property (make_number (0),
make_number (SCHARS (callint_message)),
Qface, Qminibuffer_prompt, callint_message);
- args[i] = Fread_key_sequence (callint_message,
- Qnil, Qt, Qnil, Qnil);
+ args[i] = Fread_key_sequence_vector (callint_message,
+ Qnil, Qt, Qnil, Qnil);
teml = args[i];
visargs[i] = Fkey_description (teml, Qnil);
unbind_to (speccount1, Qnil);
successfully moved (for the return value). */)
(Lisp_Object n)
{
- ptrdiff_t opoint = PT, opoint_byte = PT_BYTE;
- ptrdiff_t pos, pos_byte;
- EMACS_INT count, shortage;
+ ptrdiff_t opoint = PT, pos, pos_byte, shortage, count;
if (NILP (n))
count = 1;
}
if (count <= 0)
- shortage = scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, count - 1, 1);
+ pos = find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, count - 1,
+ &shortage, &pos_byte, 1);
else
- shortage = scan_newline (PT, PT_BYTE, ZV, ZV_BYTE, count, 1);
-
- /* Since scan_newline does TEMP_SET_PT_BOTH,
- and we want to set PT "for real",
- go back to the old point and then come back here. */
- pos = PT;
- pos_byte = PT_BYTE;
- TEMP_SET_PT_BOTH (opoint, opoint_byte);
+ pos = find_newline (PT, PT_BYTE, ZV, ZV_BYTE, count,
+ &shortage, &pos_byte, 1);
+
SET_PT_BOTH (pos, pos_byte);
if (shortage > 0
/* Barf if the key that invoked this was not a character. */
if (!CHARACTERP (last_command_event))
bitch_at_user ();
- {
+ else {
int character = translate_char (Vtranslation_table_for_input,
XINT (last_command_event));
int val = internal_self_insert (character, XFASTINT (n));
struct composition_status cmp_status;
};
-struct ccl_spec;
-
struct undecided_spec
{
/* Inhibit null byte detection. 1 means always inhibit,
#ifndef EMACS_COMPOSITE_H
#define EMACS_COMPOSITE_H
+#include "font.h"
+
INLINE_HEADER_BEGIN
#ifndef COMPOSITE_INLINE
# define COMPOSITE_INLINE INLINE
#define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
? XINT (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0)
-struct composition_it;
-struct face;
-struct font_metrics;
-
extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t);
extern Lisp_Object composition_gstring_from_id (ptrdiff_t);
extern bool composition_gstring_p (Lisp_Object);
/* Set text position POS from marker MARKER. */
#define SET_TEXT_POS_FROM_MARKER(POS, MARKER) \
- (CHARPOS (POS) = marker_position ((MARKER)), \
- BYTEPOS (POS) = marker_byte_position ((MARKER)))
+ (CHARPOS (POS) = marker_position (MARKER), \
+ BYTEPOS (POS) = marker_byte_position (MARKER))
+
+/* Like above, but clip POS within accessible range. */
+
+#define CLIP_TEXT_POS_FROM_MARKER(POS, MARKER) \
+ (CHARPOS (POS) = clip_to_bounds \
+ (BEGV, marker_position (MARKER), ZV), \
+ BYTEPOS (POS) = clip_to_bounds \
+ (BEGV_BYTE, marker_byte_position (MARKER), ZV_BYTE))
/* Set marker MARKER from text position POS. */
Glyph Rows
***********************************************************************/
-/* Area in window glyph matrix. If values are added or removed, the
- function mark_object in alloc.c has to be changed. */
+/* Area in window glyph matrix. If values are added or removed,
+ the function mark_glyph_matrix in alloc.c may need to be changed. */
enum glyph_row_area
{
+ ANY_AREA = -1,
LEFT_MARGIN_AREA,
TEXT_AREA,
RIGHT_MARGIN_AREA,
((ROW)->phys_height - (ROW)->phys_ascent \
> (ROW)->height - (ROW)->ascent)
-/* True means that fonts have been loaded since the last glyph
- matrix adjustments. The function redisplay_internal adjusts glyph
- matrices when this flag is true. */
-
-extern bool fonts_changed_p;
-
/* A glyph for a space. */
extern struct glyph space_glyph;
#define CURRENT_MODE_LINE_FACE_ID(W) \
(CURRENT_MODE_LINE_FACE_ID_3((W), XWINDOW (selected_window), (W)))
-/* Return the current height of the mode line of window W. If not
- known from current_mode_line_height, look at W's current glyph
- matrix, or return a default based on the height of the font of the
- face `mode-line'. */
+/* Return the current height of the mode line of window W. If not known
+ from W->mode_line_height, look at W's current glyph matrix, or return
+ a default based on the height of the font of the face `mode-line'. */
-#define CURRENT_MODE_LINE_HEIGHT(W) \
- (current_mode_line_height >= 0 \
- ? current_mode_line_height \
- : (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
- ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \
- : estimate_mode_line_height (XFRAME ((W)->frame), \
- CURRENT_MODE_LINE_FACE_ID (W))))
+#define CURRENT_MODE_LINE_HEIGHT(W) \
+ (W->mode_line_height >= 0 \
+ ? W->mode_line_height \
+ : (W->mode_line_height \
+ = (MATRIX_MODE_LINE_HEIGHT (W->current_matrix) \
+ ? MATRIX_MODE_LINE_HEIGHT (W->current_matrix) \
+ : estimate_mode_line_height \
+ (XFRAME (W->frame), CURRENT_MODE_LINE_FACE_ID (W)))))
-/* Return the current height of the header line of window W. If not
- known from current_header_line_height, look at W's current glyph
- matrix, or return an estimation based on the height of the font of
- the face `header-line'. */
+/* Return the current height of the header line of window W. If not known
+ from W->header_line_height, look at W's current glyph matrix, or return
+ an estimation based on the height of the font of the face `header-line'. */
#define CURRENT_HEADER_LINE_HEIGHT(W) \
- (current_header_line_height >= 0 \
- ? current_header_line_height \
- : (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
- ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
- : estimate_mode_line_height (XFRAME ((W)->frame), \
- HEADER_LINE_FACE_ID)))
+ (W->header_line_height >= 0 \
+ ? W->header_line_height \
+ : (W->header_line_height \
+ = (MATRIX_HEADER_LINE_HEIGHT (W->current_matrix) \
+ ? MATRIX_HEADER_LINE_HEIGHT (W->current_matrix) \
+ : estimate_mode_line_height \
+ (XFRAME (W->frame), HEADER_LINE_FACE_ID))))
/* Return the height of the desired mode line of window W. */
void (*update_window_end_hook) (struct window *w, bool cursor_on_p,
bool mouse_face_overwritten_p);
- /* Move cursor to row/column position VPOS/HPOS, pixel coordinates
- Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y
- are window-relative pixel positions. */
- void (*cursor_to) (struct window *w, int vpos, int hpos, int y, int x);
-
/* Flush the display of frame F. For X, this is XFlush. */
void (*flush_display) (struct frame *f);
- /* Flush the display of frame F if non-NULL. This is called
- during redisplay, and should be NULL on systems which flush
- automatically before reading input. */
- void (*flush_display_optional) (struct frame *f);
-
/* Clear the mouse highlight in window W, if there is any. */
void (*clear_window_mouse_face) (struct window *w);
#ifdef HAVE_WINDOW_SYSTEM
-/* Structure forward declarations. */
-
-struct image;
-
-
/* Each image format (JPEG, TIFF, ...) supported is described by
a structure of the type below. */
void set_vertical_scroll_bar (struct window *);
#endif
int try_window (Lisp_Object, struct text_pos, int);
-void window_box (struct window *, int, int *, int *, int *, int *);
+void window_box (struct window *, enum glyph_row_area,
+ int *, int *, int *, int *);
int window_box_height (struct window *);
int window_text_bottom_y (struct window *);
-int window_box_width (struct window *, int);
-int window_box_left (struct window *, int);
-int window_box_left_offset (struct window *, int);
-int window_box_right (struct window *, int);
-int window_box_right_offset (struct window *, int);
+int window_box_width (struct window *, enum glyph_row_area);
+int window_box_left (struct window *, enum glyph_row_area);
+int window_box_left_offset (struct window *, enum glyph_row_area);
+int window_box_right (struct window *, enum glyph_row_area);
+int window_box_right_offset (struct window *, enum glyph_row_area);
int estimate_mode_line_height (struct frame *, enum face_id);
void pixel_to_glyph_coords (struct frame *, int, int, int *, int *,
NativeRectangle *, int);
extern Lisp_Object Qtool_bar;
extern bool redisplaying_p;
extern int help_echo_showing_p;
-extern int current_mode_line_height, current_header_line_height;
extern Lisp_Object help_echo_string, help_echo_window;
extern Lisp_Object help_echo_object, previous_help_echo_string;
extern ptrdiff_t help_echo_pos;
extern ptrdiff_t compute_display_string_end (ptrdiff_t,
struct bidi_string_data *);
extern void produce_stretch_glyph (struct it *);
+extern int merge_glyphless_glyph_face (struct it *);
#ifdef HAVE_WINDOW_SYSTEM
struct glyph *, enum glyph_row_area, int);
extern void x_clear_end_of_line (struct window *, struct glyph_row *,
enum glyph_row_area, int);
-
-extern struct cursor_pos output_cursor;
-
extern void x_fix_overlapping_area (struct window *, struct glyph_row *,
enum glyph_row_area, int);
extern void draw_phys_cursor_glyph (struct window *,
struct glyph *, int *, int *, int *);
extern void erase_phys_cursor (struct window *);
extern void display_and_set_cursor (struct window *, bool, int, int, int, int);
-
-extern void set_output_cursor (struct cursor_pos *);
-extern void x_cursor_to (struct window *, int, int, int, int);
-
extern void x_update_cursor (struct frame *, bool);
extern void x_clear_cursor (struct window *);
extern void x_draw_vertical_border (struct window *w);
extern void start_hourglass (void);
extern void cancel_hourglass (void);
extern int hourglass_shown_p;
-
-struct atimer; /* Defined in atimer.h. */
/* If non-null, an asynchronous timer that, when it expires, displays
an hourglass cursor on all frames. */
extern struct atimer *hourglass_atimer;
extern void init_desired_glyphs (struct frame *);
extern bool update_frame (struct frame *, bool, bool);
extern void bitch_at_user (void);
-void adjust_glyphs (struct frame *);
+extern void adjust_frame_glyphs (struct frame *);
void free_glyphs (struct frame *);
void free_window_matrices (struct window *);
void check_glyph_memory (void);
static void update_frame_line (struct frame *, int);
static int required_matrix_height (struct window *);
static int required_matrix_width (struct window *);
-static void adjust_frame_glyphs (struct frame *);
static void change_frame_size_1 (struct frame *, int, int, bool, bool, bool);
static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t);
static void fill_up_frame_row_with_spaces (struct glyph_row *, int);
static struct frame *frame_matrix_frame;
-/* True means that fonts have been loaded since the last glyph
- matrix adjustments. Redisplay must stop, and glyph matrices must
- be adjusted when this flag becomes true during display. The
- reason fonts can be loaded so late is that fonts of fontsets are
- loaded on demand. Another reason is that a line contains many
- characters displayed by zero width or very narrow glyphs of
- variable-width fonts. */
-
-bool fonts_changed_p;
-
/* Convert vpos and hpos from frame to window and vice versa.
This may only be used for terminal frames. */
Get W's size. */
if (w)
{
- window_box (w, -1, 0, 0, &window_width, &window_height);
+ window_box (w, ANY_AREA, 0, 0, &window_width, &window_height);
header_line_p = WINDOW_WANTS_HEADER_LINE_P (w);
header_line_changed_p = header_line_p != matrix->header_line_p;
|| right != matrix->right_margin_glyphs);
if (!marginal_areas_changed_p
- && !fonts_changed_p
+ && !XFRAME (w->frame)->fonts_changed
&& !header_line_changed_p
&& matrix->window_left_col == WINDOW_LEFT_EDGE_COL (w)
&& matrix->window_top_line == WINDOW_TOP_EDGE_LINE (w)
}
}
-
-/* Re-allocate/ re-compute glyph matrices on frame F. If F is null,
- do it for all frames; otherwise do it just for the given frame.
- This function must be called when a new frame is created, its size
- changes, or its window configuration changes. */
+/* Allocate/reallocate glyph matrices of a single frame F.
+ This function must be called when a new frame is created,
+ its size changes, or its window configuration changes. */
void
-adjust_glyphs (struct frame *f)
+adjust_frame_glyphs (struct frame *f)
{
/* Block input so that expose events and other events that access
glyph matrices are not processed while we are changing them. */
block_input ();
- if (f)
- adjust_frame_glyphs (f);
- else
- {
- Lisp_Object tail, lisp_frame;
-
- FOR_EACH_FRAME (tail, lisp_frame)
- adjust_frame_glyphs (XFRAME (lisp_frame));
- }
-
- unblock_input ();
-}
-
-/* Allocate/reallocate glyph matrices of a single frame F. */
-
-static void
-adjust_frame_glyphs (struct frame *f)
-{
if (FRAME_WINDOW_P (f))
adjust_frame_glyphs_for_window_redisplay (f);
else
adjust_decode_mode_spec_buffer (f);
f->glyphs_initialized_p = 1;
+
+ unblock_input ();
}
/* Return true if any window in the tree has nonzero window margins. See
/* Update windows. */
paused_p = update_window_tree (root_window, force_p);
update_end (f);
-
- /* This flush is a performance bottleneck under X,
- and it doesn't seem to be necessary anyway (in general).
- It is necessary when resizing the window with the mouse, or
- at least the fringes are not redrawn in a timely manner. ++kfs */
- if (f->force_flush_display_p)
- {
- FRAME_RIF (f)->flush_display (f);
- f->force_flush_display_p = 0;
- }
}
else
{
for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area)
{
- FRAME_RIF (f)->cursor_to (w, i, 0, row->y,
- area == TEXT_AREA ? row->x : 0);
+ output_cursor_to (w, i, 0, row->y,
+ area == TEXT_AREA ? row->x : 0);
if (row->used[area])
FRAME_RIF (f)->write_glyphs (w, row, row->glyphs[area],
area, row->used[area]);
/* End the update of window W. Don't set the cursor if we
paused updating the display because in this case,
set_window_cursor_after_update hasn't been called, and
- output_cursor doesn't contain the cursor location. */
+ W->output_cursor doesn't contain the cursor location. */
rif->update_window_end_hook (w, !paused_p, mouse_face_overwritten_p);
}
else
/* Set cursor to start of glyphs, write them, and clear to the end
of the area. I don't think that something more sophisticated is
necessary here, since marginal areas will not be the default. */
- rif->cursor_to (w, vpos, 0, desired_row->y, 0);
+ output_cursor_to (w, vpos, 0, desired_row->y, 0);
if (desired_row->used[area])
rif->write_glyphs (w, updated_row, desired_row->glyphs[area],
area, desired_row->used[area]);
&& !(current_row->mode_line_p && vpos > 0))
|| current_row->x != desired_row->x)
{
- rif->cursor_to (w, vpos, 0, desired_row->y, desired_row->x);
+ output_cursor_to (w, vpos, 0, desired_row->y, desired_row->x);
if (desired_row->used[TEXT_AREA])
rif->write_glyphs (w, updated_row, desired_row->glyphs[TEXT_AREA],
break;
}
- rif->cursor_to (w, vpos, start_hpos, desired_row->y, start_x);
+ output_cursor_to (w, vpos, start_hpos, desired_row->y, start_x);
rif->write_glyphs (w, updated_row, start,
TEXT_AREA, i - start_hpos);
changed_p = 1;
/* Write the rest. */
if (i < desired_row->used[TEXT_AREA])
{
- rif->cursor_to (w, vpos, i, desired_row->y, x);
+ output_cursor_to (w, vpos, i, desired_row->y, x);
rif->write_glyphs (w, updated_row, desired_glyph,
TEXT_AREA, desired_row->used[TEXT_AREA] - i);
changed_p = 1;
{
/* If old row extends to the end of the text area, clear. */
if (i >= desired_row->used[TEXT_AREA])
- rif->cursor_to (w, vpos, i, desired_row->y,
- desired_row->pixel_width);
+ output_cursor_to (w, vpos, i, desired_row->y,
+ desired_row->pixel_width);
rif->clear_end_of_line (w, updated_row, TEXT_AREA, -1);
changed_p = 1;
}
int xlim;
if (i >= desired_row->used[TEXT_AREA])
- rif->cursor_to (w, vpos, i, desired_row->y,
- desired_row->pixel_width);
+ output_cursor_to (w, vpos, i, desired_row->y,
+ desired_row->pixel_width);
/* If cursor is displayed at the end of the line, make sure
it's cleared. Nowadays we don't have a phys_cursor_glyph
set_window_cursor_after_update (struct window *w)
{
struct frame *f = XFRAME (w->frame);
- struct redisplay_interface *rif = FRAME_RIF (f);
int cx, cy, vpos, hpos;
/* Not intended for frame matrix updates. */
Horizontal position is -1 when cursor is on the left fringe. */
hpos = clip_to_bounds (-1, hpos, w->current_matrix->matrix_w - 1);
vpos = clip_to_bounds (0, vpos, w->current_matrix->nrows - 1);
- rif->cursor_to (w, vpos, hpos, cy, cx);
+ output_cursor_to (w, vpos, hpos, cy, cx);
}
wrong thing with `face-remapping-alist' (bug#2044). */
Fset_buffer (w->contents);
itdata = bidi_shelve_cache ();
- SET_TEXT_POS_FROM_MARKER (startp, w->start);
- CHARPOS (startp) = min (ZV, max (BEGV, CHARPOS (startp)));
- BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp)));
+ CLIP_TEXT_POS_FROM_MARKER (startp, w->start);
start_display (&it, w, startp);
/* start_display takes into account the header-line row, but IT's
vpos still counts from the glyph row that includes the window's
w->cursor.vpos = w->cursor.y = 0;
}
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
calculate_costs (f);
SET_FRAME_GARBAGED (f);
f->resized_p = 1;
{
return decode_any_window (window)->cursor_off_p ? Qnil : Qt;
}
-
-DEFUN ("last-nonminibuffer-frame", Flast_nonminibuf_frame,
- Slast_nonminibuf_frame, 0, 0, 0,
- doc: /* Value is last nonminibuffer frame. */)
- (void)
-{
- Lisp_Object frame = Qnil;
-
- if (last_nonminibuf_frame)
- XSETFRAME (frame, last_nonminibuf_frame);
-
- return frame;
-}
\f
/***********************************************************************
Initialization
defsubr (&Ssend_string_to_terminal);
defsubr (&Sinternal_show_cursor);
defsubr (&Sinternal_show_cursor_p);
- defsubr (&Slast_nonminibuf_frame);
#ifdef GLYPH_DEBUG
defsubr (&Sdump_redisplay_history);
The return value is POSITION. */)
(register Lisp_Object position)
{
- ptrdiff_t pos;
-
- if (MARKERP (position)
- && current_buffer == XMARKER (position)->buffer)
- {
- pos = marker_position (position);
- if (pos < BEGV)
- SET_PT_BOTH (BEGV, BEGV_BYTE);
- else if (pos > ZV)
- SET_PT_BOTH (ZV, ZV_BYTE);
- else
- SET_PT_BOTH (pos, marker_byte_position (position));
-
- return position;
- }
-
- CHECK_NUMBER_COERCE_MARKER (position);
-
- pos = clip_to_bounds (BEGV, XINT (position), ZV);
- SET_PT (pos);
+ if (MARKERP (position))
+ set_point_from_marker (position);
+ else if (INTEGERP (position))
+ SET_PT (clip_to_bounds (BEGV, XINT (position), ZV));
+ else
+ wrong_type_argument (Qinteger_or_marker_p, position);
return position;
}
#include <config.h>
-#include "emacsgtkfixed.h"
-#include <stdio.h>
-
#include "lisp.h"
#include "frame.h"
#include "xterm.h"
#ifdef HAVE_XWIDGETS
#include "xwidget.h"
#endif
+#include "emacsgtkfixed.h"
+
/* Silence a bogus diagnostic; see GNOME bug 683906. */
#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__)
# pragma GCC diagnostic push
\f
DEFUN ("eval", Feval, Seval, 1, 2, 0,
doc: /* Evaluate FORM and return its value.
-If LEXICAL is t, evaluate using lexical scoping. */)
+If LEXICAL is t, evaluate using lexical scoping.
+LEXICAL can also be an actual lexical environment, in the form of an
+alist mapping symbols to their value. */)
(Lisp_Object form, Lisp_Object lexical)
{
ptrdiff_t count = SPECPDL_INDEX ();
/* Optimize for no indirection. */
fun = original_fun;
- if (SYMBOLP (fun) && !NILP (fun)
- && (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
+ if (!SYMBOLP (fun))
+ fun = Ffunction (Fcons (fun, Qnil));
+ else if (!NILP (fun) && (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
fun = indirect_function (fun);
if (SUBRP (fun))
return 0;
}
-/* `specpdl_ptr->symbol' is a field which describes which variable is
+/* `specpdl_ptr' describes which variable is
let-bound, so it can be properly undone when we unbind_to.
- It can have the following two shapes:
- - SYMBOL : if it's a plain symbol, it means that we have let-bound
- a symbol that is not buffer-local (at least at the time
- the let binding started). Note also that it should not be
+ It can be either a plain SPECPDL_LET or a SPECPDL_LET_LOCAL/DEFAULT.
+ - SYMBOL is the variable being bound. Note that it should not be
aliased (i.e. when let-binding V1 that's aliased to V2, we want
to record V2 here).
- - (SYMBOL WHERE . BUFFER) : this means that it is a let-binding for
- variable SYMBOL which can be buffer-local. WHERE tells us
- which buffer is affected (or nil if the let-binding affects the
- global value of the variable) and BUFFER tells us which buffer was
- current (i.e. if WHERE is non-nil, then BUFFER==WHERE, otherwise
- BUFFER did not yet have a buffer-local value). */
+ - WHERE tells us in which buffer the binding took place.
+ This is used for SPECPDL_LET_LOCAL bindings (i.e. bindings to a
+ buffer-local variable) as well as for SPECPDL_LET_DEFAULT bindings,
+ i.e. bindings to the default value of a variable which can be
+ buffer-local. */
void
specbind (Lisp_Object symbol, Lisp_Object value)
restore_point_unwind (Lisp_Object location)
{
Fgoto_char (location);
- Fset_marker (location, Qnil, Qnil);
+ unchain_marker (XMARKER (location));
}
\f
{
FRAME_SMALLEST_CHAR_WIDTH (f) = min_width;
FRAME_SMALLEST_FONT_HEIGHT (f) = height;
- fonts_changed_p = 1;
+ f->fonts_changed = 1;
}
else
{
if (FRAME_SMALLEST_CHAR_WIDTH (f) > min_width)
- FRAME_SMALLEST_CHAR_WIDTH (f) = min_width, fonts_changed_p = 1;
+ FRAME_SMALLEST_CHAR_WIDTH (f) = min_width, f->fonts_changed = 1;
if (FRAME_SMALLEST_FONT_HEIGHT (f) > height)
- FRAME_SMALLEST_FONT_HEIGHT (f) = height, fonts_changed_p = 1;
+ FRAME_SMALLEST_FONT_HEIGHT (f) = height, f->fonts_changed = 1;
}
#endif
struct font_driver_list *root = f ? f->font_driver_list : font_driver_list;
struct font_driver_list *prev, *list;
+#ifdef HAVE_WINDOW_SYSTEM
if (f && ! driver->draw)
error ("Unusable font driver for a frame: %s",
SDATA (SYMBOL_NAME (driver->type)));
+#endif /* HAVE_WINDOW_SYSTEM */
for (prev = NULL, list = root; list; prev = list, list = list->next)
if (EQ (list->driver->type, driver->type))
extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
-
-struct font_driver;
-struct font;
-struct glyph_string;
-
/* An enumerator for each font property. This is used as an index to
the vector of FONT-SPEC and FONT-ENTITY.
this value. */
#define FONT_PIXEL_SIZE_QUANTUM 1
-struct face;
-
#define FONT_INVALID_CODE 0xFFFFFFFF
/* Font driver. Members specified as "optional" can be NULL. */
unsigned *code, int nglyphs,
struct font_metrics *metrics);
+#ifdef HAVE_WINDOW_SYSTEM
+
/* Optional.
Draw glyphs between FROM and TO of S->char2b at (X Y) pixel
position of frame F with S->FACE and S->GC. If WITH_BACKGROUND,
Free bitmap data in BITMAP. */
void (*free_bitmap) (struct font *font, struct font_bitmap *bitmap);
+#endif /* HAVE_WINDOW_SYSTEM */
+
/* Optional.
Return an outline data for glyph-code CODE of FONT. The format
of the outline data depends on the font-driver. */
#include "intervals.h"
#include "fontset.h"
#include "window.h"
-#ifdef HAVE_X_WINDOWS
-#include "xterm.h"
-#endif
-#ifdef HAVE_NTGUI
-#include "w32term.h"
-#endif
-#ifdef HAVE_NS
-#include "nsterm.h"
-#endif
+#ifdef HAVE_WINDOW_SYSTEM
+#include TERM_HEADER
+#endif /* HAVE_WINDOW_SYSTEM */
#include "termhooks.h"
-
#include "font.h"
/* FONTSET
if (ASCII_CHAR_P (c) || face->fontset < 0)
return face->ascii_face->id;
+#ifdef HAVE_NS
+ if (face->font)
+ {
+ /* Fonts often have characters in other scripts, like symbol, even if they
+ don't match script: symbol. So check if the character is present
+ in the current face first. Only enable for NS for now, but should
+ perhaps be general? */
+ Lisp_Object font_object;
+ XSETFONT (font_object, face->font);
+ if (font_has_char (f, font_object, c)) return face->id;
+ }
+#endif
+
eassert (fontset_id_valid_p (face->fontset));
fontset = FONTSET_FROM_ID (face->fontset);
eassert (!BASE_FONTSET_P (fontset));
#ifndef EMACS_FONTSET_H
#define EMACS_FONTSET_H
-struct face;
-
extern void free_face_fontset (struct frame *, struct face *);
extern int face_for_char (struct frame *, struct face *, int,
int, Lisp_Object);
extern Lisp_Object fontset_name (int);
extern Lisp_Object fontset_ascii (int);
-struct font;
extern int face_for_font (struct frame *, Lisp_Object, struct face *);
#endif /* EMACS_FONTSET_H */
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
FRAME_MENU_BAR_LINES (f) = nlines;
set_menu_bar_lines_1 (f->root_window, nlines - olines);
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
}
}
\f
change_frame_size (f, height, width, 0, 0, 0);
}
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
calculate_costs (f);
XSETFRAME (frame, f);
CHECK_LIVE_FRAME (frame);
return prev_frame (frame, miniframe);
}
+
+DEFUN ("last-nonminibuffer-frame", Flast_nonminibuf_frame,
+ Slast_nonminibuf_frame, 0, 0, 0,
+ doc: /* Return last non-minibuffer frame selected. */)
+ (void)
+{
+ Lisp_Object frame = Qnil;
+
+ if (last_nonminibuf_frame)
+ XSETFRAME (frame, last_nonminibuf_frame);
+
+ return frame;
+}
\f
/* Return 1 if it is ok to delete frame F;
0 if all frames aside from F are invisible.
/* Verify that we can still talk to the frame's X window,
and note any recent change in visibility. */
-#ifdef HAVE_WINDOW_SYSTEM
+#ifdef HAVE_X_WINDOWS
if (FRAME_WINDOW_P (XFRAME (this)))
x_sync (XFRAME (this));
#endif
{
struct frame *f = decode_live_frame (frame);
+ XSETFRAME (frame, f);
+
if (WINDOWP (minibuf_window) && EQ (f->minibuffer_window, minibuf_window))
{
Lisp_Object frames, this, window = make_number (0);
}
}
- if (!WINDOWP (window))
- emacs_abort ();
- else
+ /* Don't abort if no window was found (Bug#15247). */
+ if (WINDOWP (window))
{
/* Use set_window_buffer instead of Fset_window_buffer (see
discussion of bug#11984, bug#12025, bug#12026). */
defsubr (&Sframe_list);
defsubr (&Snext_frame);
defsubr (&Sprevious_frame);
+ defsubr (&Slast_nonminibuf_frame);
defsubr (&Sdelete_frame);
defsubr (&Smouse_position);
defsubr (&Smouse_pixel_position);
#define EMACS_FRAME_H
#include "dispextern.h"
+#include "termhooks.h"
INLINE_HEADER_BEGIN
#ifndef FRAME_INLINE
# define FRAME_INLINE INLINE
#endif
-\f
-/* Miscellanea. */
-
-/* Nonzero means there is at least one garbaged frame. */
-extern bool frame_garbaged;
-
-\f
-/* The structure representing a frame. */
-
-enum output_method
-{
- output_initial,
- output_termcap,
- output_x_window,
- output_msdos_raw,
- output_w32,
- output_ns
-};
-
enum vertical_scroll_bar_type
{
vertical_scroll_bar_none,
FULLSCREEN_WAIT = 0x100
};
-
-#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
-#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
-
+/* The structure representing a frame. */
struct frame
{
Clear the frame in clear_garbaged_frames if set. */
unsigned resized_p : 1;
- /* Set to non-zero in when we want for force a flush_display in
- update_frame, usually after resizing the frame. */
- unsigned force_flush_display_p : 1;
-
/* Set to non-zero if the default face for the frame has been
realized. Reset to zero whenever the default face changes.
Used to see the difference between a font change and face change. */
unsigned external_tool_bar : 1;
#endif
+ /* Nonzero means that fonts have been loaded since the last glyph
+ matrix adjustments. */
+ unsigned fonts_changed : 1;
+
+ /* Nonzero means that cursor type has been changed. */
+ unsigned cursor_type_changed : 1;
+
/* Margin at the top of the frame. Used to display the tool-bar. */
int tool_bar_lines;
#define FRAME_CURSOR_WIDTH(f) ((f)->cursor_width)
#define FRAME_BLINK_OFF_CURSOR_WIDTH(f) ((f)->blink_off_cursor_width)
+#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
+#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
+
/* Return a pointer to the face cache of frame F. */
#define FRAME_FACE_CACHE(F) (F)->face_cache
extern Lisp_Object Qterminal;
extern Lisp_Object Qnoelisp;
+/* Nonzero means there is at least one garbaged frame. */
+extern bool frame_garbaged;
+
extern struct frame *last_nonminibuf_frame;
extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p);
extern void x_set_window_size (struct frame *f, int change_grav,
int cols, int rows);
-extern void x_sync (struct frame *);
extern Lisp_Object x_get_focus_frame (struct frame *);
extern void x_set_mouse_position (struct frame *f, int h, int v);
extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
#if !defined USE_X_TOOLKIT
extern char *x_get_resource_string (const char *, const char *);
#endif
-#endif
+extern void x_sync (struct frame *);
+#endif /* HAVE_X_WINDOWS */
extern void x_query_colors (struct frame *f, XColor *, int);
extern void x_query_color (struct frame *f, XColor *);
#endif /* HAVE_WINDOW_SYSTEM */
\f
+
+FRAME_INLINE void
+flush_frame (struct frame *f)
+{
+ struct redisplay_interface *rif = FRAME_RIF (f);
+
+ if (rif && rif->flush_display)
+ rif->flush_display (f);
+}
+
/***********************************************************************
Multimonitor data
***********************************************************************/
void
globals_of_gfilenotify (void)
{
+#if ! GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
watch_list = Qnil;
}
if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0)
{
GtkWidget *wfixed = f->output_data.x->edit_widget;
+
gtk_widget_queue_draw (wfixed);
gdk_window_process_all_updates ();
- x_clear_area (FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- 0, 0,
- FRAME_PIXEL_WIDTH (f),
- FRAME_INTERNAL_BORDER_WIDTH (f), 0);
- x_clear_area (FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- 0, 0,
- FRAME_INTERNAL_BORDER_WIDTH (f),
- FRAME_PIXEL_HEIGHT (f), 0);
- x_clear_area (FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- 0, FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
- FRAME_PIXEL_WIDTH (f),
- FRAME_INTERNAL_BORDER_WIDTH (f), 0);
- x_clear_area (FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
- 0,
- FRAME_INTERNAL_BORDER_WIDTH (f),
- FRAME_PIXEL_HEIGHT (f), 0);
+
+ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0,
+ FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f));
+
+ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0,
+ FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f));
+
+ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0,
+ FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
+ FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f));
+
+ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+ FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f),
+ 0, FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f));
}
}
gtk_widget_queue_draw (wfixed);
gdk_window_process_all_updates ();
if (oldx != -1 && oldw > 0 && oldh > 0)
- {
- /* Clear under old scroll bar position. This must be done after
- the gtk_widget_queue_draw and gdk_window_process_all_updates
- above. */
- x_clear_area (FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- oldx, oldy, oldw, oldh, 0);
- }
+ /* Clear under old scroll bar position. This must be done after
+ the gtk_widget_queue_draw and gdk_window_process_all_updates
+ above. */
+ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+ oldx, oldy, oldw, oldh);
/* GTK does not redraw until the main loop is entered again, but
if there are no X events pending we will not enter it. So we sync
struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
- if (wscroll && NILP (bar->dragging))
+ if (wscroll && bar->dragging == -1)
{
GtkAdjustment *adj;
gdouble shown;
} xg_menu_item_cb_data;
-struct _widget_value;
-
extern struct _widget_value *malloc_widget_value (void);
extern void free_widget_value (struct _widget_value *);
#endif
#include <setjmp.h>
-
#include <c-ctype.h>
-/* This makes the fields of a Display accessible, in Xlib header files. */
-
-#define XLIB_ILLEGAL_ACCESS
-
#include "lisp.h"
#include "frame.h"
#include "window.h"
register ptrdiff_t col = 0, prev_col = 0;
EMACS_INT goal = goalcol ? *goalcol : MOST_POSITIVE_FIXNUM;
ptrdiff_t end = endpos ? *endpos : PT;
- ptrdiff_t scan, scan_byte;
- ptrdiff_t next_boundary;
- {
- ptrdiff_t opoint = PT, opoint_byte = PT_BYTE;
- scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1);
- scan = PT, scan_byte = PT_BYTE;
- SET_PT_BOTH (opoint, opoint_byte);
+ ptrdiff_t scan, scan_byte, next_boundary;
+
+ scan = find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, NULL, &scan_byte, 1);
next_boundary = scan;
- }
window = Fget_buffer_window (Fcurrent_buffer (), Qnil);
w = ! NILP (window) ? XWINDOW (window) : NULL;
following any initial whitespace. */)
(void)
{
- Lisp_Object val;
- ptrdiff_t opoint = PT, opoint_byte = PT_BYTE;
-
- scan_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, 1);
+ ptrdiff_t posbyte;
- XSETFASTINT (val, position_indentation (PT_BYTE));
- SET_PT_BOTH (opoint, opoint_byte);
- return val;
+ find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, NULL, &posbyte, 1);
+ return make_number (position_indentation (posbyte));
}
static ptrdiff_t
bool
indented_beyond_p (ptrdiff_t pos, ptrdiff_t pos_byte, EMACS_INT column)
{
- ptrdiff_t val;
- ptrdiff_t opoint = PT, opoint_byte = PT_BYTE;
-
- SET_PT_BOTH (pos, pos_byte);
- while (PT > BEGV && FETCH_BYTE (PT_BYTE) == '\n')
- scan_newline (PT - 1, PT_BYTE - 1, BEGV, BEGV_BYTE, -1, 0);
-
- val = position_indentation (PT_BYTE);
- SET_PT_BOTH (opoint, opoint_byte);
- return val >= column;
+ while (pos > BEGV && FETCH_BYTE (pos_byte) == '\n')
+ {
+ DEC_BOTH (pos, pos_byte);
+ pos = find_newline (pos, pos_byte, BEGV, BEGV_BYTE,
+ -1, NULL, &pos_byte, 0);
+ }
+ return position_indentation (pos_byte) >= column;
}
\f
DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2,
set_point_both (charpos, buf_charpos_to_bytepos (current_buffer, charpos));
}
+/* Set PT from MARKER's clipped position. */
+
+void
+set_point_from_marker (Lisp_Object marker)
+{
+ if (XMARKER (marker)->buffer != current_buffer)
+ signal_error ("Marker points into wrong buffer", marker);
+ set_point_both
+ (clip_to_bounds (BEGV, marker_position (marker), ZV),
+ clip_to_bounds (BEGV_BYTE, marker_byte_position (marker), ZV_BYTE));
+}
+
/* If there's an invisible character at position POS + TEST_OFFS in the
current buffer, and the invisible property has a `stickiness' such that
inserting a character at position POS would inherit the property it,
Lisp_Object *, ptrdiff_t);
static Lisp_Object make_lispy_switch_frame (Lisp_Object);
static Lisp_Object make_lispy_focus_in (Lisp_Object);
+#ifdef HAVE_WINDOW_SYSTEM
static Lisp_Object make_lispy_focus_out (Lisp_Object);
+#endif /* HAVE_WINDOW_SYSTEM */
static bool help_char_p (Lisp_Object);
static void save_getcjmp (sys_jmp_buf);
static void restore_getcjmp (sys_jmp_buf);
RETURN_UNGCPRO (c);
}
+#ifdef HAVE_MENUS
+
/* Record a key that came from a mouse menu.
Record it for echoing, for this-command-keys, and so on. */
num_input_events++;
}
+#endif /* HAVE_MENUS */
+
/* Return true if should recognize C as "the help character". */
static bool
{
return list2 (Qfocus_in, frame);
}
+
+#ifdef HAVE_WINDOW_SYSTEM
+
static Lisp_Object
make_lispy_focus_out (Lisp_Object frame)
{
return list2 (Qfocus_out, frame);
}
-\f
+
+#endif /* HAVE_WINDOW_SYSTEM */
+
/* Manipulating modifiers. */
/* Parse the name of SYMBOL, and return the set of modifiers it contains.
return t;
}
-DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0,
- doc: /* Read a sequence of keystrokes and return as a string or vector.
-The sequence is sufficient to specify a non-prefix command in the
-current local and global maps.
-
-First arg PROMPT is a prompt string. If nil, do not prompt specially.
-Second (optional) arg CONTINUE-ECHO, if non-nil, means this key echos
-as a continuation of the previous key.
-
-The third (optional) arg DONT-DOWNCASE-LAST, if non-nil, means do not
-convert the last event to lower case. (Normally any upper case event
-is converted to lower case if the original event is undefined and the lower
-case equivalent is defined.) A non-nil value is appropriate for reading
-a key sequence to be defined.
-
-A C-g typed while in this function is treated like any other character,
-and `quit-flag' is not set.
-
-If the key sequence starts with a mouse click, then the sequence is read
-using the keymaps of the buffer of the window clicked in, not the buffer
-of the selected window as normal.
-
-`read-key-sequence' drops unbound button-down events, since you normally
-only care about the click or drag events which follow them. If a drag
-or multi-click event is unbound, but the corresponding click event would
-be bound, `read-key-sequence' turns the event into a click event at the
-drag's starting position. This means that you don't have to distinguish
-between click and drag, double, or triple events unless you want to.
-
-`read-key-sequence' prefixes mouse events on mode lines, the vertical
-lines separating windows, and scroll bars with imaginary keys
-`mode-line', `vertical-line', and `vertical-scroll-bar'.
-
-Optional fourth argument CAN-RETURN-SWITCH-FRAME non-nil means that this
-function will process a switch-frame event if the user switches frames
-before typing anything. If the user switches frames in the middle of a
-key sequence, or at the start of the sequence but CAN-RETURN-SWITCH-FRAME
-is nil, then the event will be put off until after the current key sequence.
-
-`read-key-sequence' checks `function-key-map' for function key
-sequences, where they wouldn't conflict with ordinary bindings. See
-`function-key-map' for more details.
-
-The optional fifth argument CMD-LOOP, if non-nil, means
-that this key sequence is being read by something that will
-read commands one after another. It should be nil if the caller
-will read just one key sequence. */)
- (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop)
+static Lisp_Object
+read_key_sequence_vs (Lisp_Object prompt, Lisp_Object continue_echo,
+ Lisp_Object dont_downcase_last,
+ Lisp_Object can_return_switch_frame,
+ Lisp_Object cmd_loop, bool allow_string)
{
Lisp_Object keybuf[30];
register int i;
QUIT;
}
UNGCPRO;
- return unbind_to (count, make_event_array (i, keybuf));
+ return unbind_to (count,
+ ((allow_string ? make_event_array : Fvector)
+ (i, keybuf)));
}
-DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
- Sread_key_sequence_vector, 1, 5, 0,
- doc: /* Like `read-key-sequence' but always return a vector. */)
- (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop)
-{
- Lisp_Object keybuf[30];
- register int i;
- struct gcpro gcpro1;
- ptrdiff_t count = SPECPDL_INDEX ();
+DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0,
+ doc: /* Read a sequence of keystrokes and return as a string or vector.
+The sequence is sufficient to specify a non-prefix command in the
+current local and global maps.
- if (!NILP (prompt))
- CHECK_STRING (prompt);
- QUIT;
+First arg PROMPT is a prompt string. If nil, do not prompt specially.
+Second (optional) arg CONTINUE-ECHO, if non-nil, means this key echos
+as a continuation of the previous key.
- specbind (Qinput_method_exit_on_first_char,
- (NILP (cmd_loop) ? Qt : Qnil));
- specbind (Qinput_method_use_echo_area,
- (NILP (cmd_loop) ? Qt : Qnil));
+The third (optional) arg DONT-DOWNCASE-LAST, if non-nil, means do not
+convert the last event to lower case. (Normally any upper case event
+is converted to lower case if the original event is undefined and the lower
+case equivalent is defined.) A non-nil value is appropriate for reading
+a key sequence to be defined.
- memset (keybuf, 0, sizeof keybuf);
- GCPRO1 (keybuf[0]);
- gcpro1.nvars = (sizeof keybuf / sizeof (keybuf[0]));
+A C-g typed while in this function is treated like any other character,
+and `quit-flag' is not set.
- if (NILP (continue_echo))
- {
- this_command_key_count = 0;
- this_command_key_count_reset = 0;
- this_single_command_key_start = 0;
- }
+If the key sequence starts with a mouse click, then the sequence is read
+using the keymaps of the buffer of the window clicked in, not the buffer
+of the selected window as normal.
-#ifdef HAVE_WINDOW_SYSTEM
- if (display_hourglass_p)
- cancel_hourglass ();
-#endif
+`read-key-sequence' drops unbound button-down events, since you normally
+only care about the click or drag events which follow them. If a drag
+or multi-click event is unbound, but the corresponding click event would
+be bound, `read-key-sequence' turns the event into a click event at the
+drag's starting position. This means that you don't have to distinguish
+between click and drag, double, or triple events unless you want to.
- i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])),
- prompt, ! NILP (dont_downcase_last),
- ! NILP (can_return_switch_frame), 0);
+`read-key-sequence' prefixes mouse events on mode lines, the vertical
+lines separating windows, and scroll bars with imaginary keys
+`mode-line', `vertical-line', and `vertical-scroll-bar'.
-#ifdef HAVE_WINDOW_SYSTEM
- if (display_hourglass_p)
- start_hourglass ();
-#endif
+Optional fourth argument CAN-RETURN-SWITCH-FRAME non-nil means that this
+function will process a switch-frame event if the user switches frames
+before typing anything. If the user switches frames in the middle of a
+key sequence, or at the start of the sequence but CAN-RETURN-SWITCH-FRAME
+is nil, then the event will be put off until after the current key sequence.
- if (i == -1)
- {
- Vquit_flag = Qt;
- QUIT;
- }
- UNGCPRO;
- return unbind_to (count, Fvector (i, keybuf));
+`read-key-sequence' checks `function-key-map' for function key
+sequences, where they wouldn't conflict with ordinary bindings. See
+`function-key-map' for more details.
+
+The optional fifth argument CMD-LOOP, if non-nil, means
+that this key sequence is being read by something that will
+read commands one after another. It should be nil if the caller
+will read just one key sequence. */)
+ (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop)
+{
+ return read_key_sequence_vs (prompt, continue_echo, dont_downcase_last,
+ can_return_switch_frame, cmd_loop, true);
+}
+
+DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
+ Sread_key_sequence_vector, 1, 5, 0,
+ doc: /* Like `read-key-sequence' but always return a vector. */)
+ (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop)
+{
+ return read_key_sequence_vs (prompt, continue_echo, dont_downcase_last,
+ can_return_switch_frame, cmd_loop, false);
}
\f
/* Return true if input events are pending. */
get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW);
if (old_timers_run != timers_run && do_display)
- {
- redisplay_preserve_echo_area (8);
- /* The following fixes a bug when using lazy-lock with
- lazy-lock-defer-on-the-fly set to t, i.e. when fontifying
- from an idle timer function. The symptom of the bug is that
- the cursor sometimes doesn't become visible until the next X
- event is processed. --gerd. */
- {
- Lisp_Object tail, frame;
- FOR_EACH_FRAME (tail, frame)
- if (FRAME_RIF (XFRAME (frame)))
- FRAME_RIF (XFRAME (frame))->flush_display (XFRAME (frame));
- }
- }
+ redisplay_preserve_echo_area (8);
return input_pending;
}
#include "systime.h" /* for struct timespec, Time */
#include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */
+#include "termhooks.h"
INLINE_HEADER_BEGIN
#ifndef KEYBOARD_INLINE
/* The primary selection. */
extern Lisp_Object QPRIMARY;
-/* Forward declaration for prototypes. */
-struct input_event;
-
extern Lisp_Object parse_modifiers (Lisp_Object);
extern Lisp_Object reorder_modifiers (Lisp_Object);
extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object,
#define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String))
#define XSETSYMBOL(a, b) ((a) = make_lisp_ptr (b, Lisp_Symbol))
#define XSETFLOAT(a, b) ((a) = make_lisp_ptr (b, Lisp_Float))
-
-/* Misc types. */
-
#define XSETMISC(a, b) ((a) = make_lisp_ptr (b, Lisp_Misc))
-#define XSETMARKER(a, b) (XSETMISC (a, b), XMISCTYPE (a) = Lisp_Misc_Marker)
/* Pseudovector types. */
they are bound by a function application or a let form, stores the
code to be executed for unwind-protect forms.
- If func is non-zero, undoing this binding applies func to old_value;
- This implements record_unwind_protect.
-
- Otherwise, the element is a variable binding.
-
- If the symbol field is a symbol, it is an ordinary variable binding.
-
- Otherwise, it should be a structure (SYMBOL WHERE . CURRENT-BUFFER),
- which means having bound a local value while CURRENT-BUFFER was active.
- If WHERE is nil this means we saw the default value when binding SYMBOL.
- WHERE being a buffer or frame means we saw a buffer-local or frame-local
- value. Other values of WHERE mean an internal error.
-
NOTE: The specbinding union is defined here, because SPECPDL_INDEX is
used all over the place, needs to be fast, and needs to know the size of
union specbinding. But only eval.c should access it. */
extern Lisp_Object QCdata, QCfile;
extern Lisp_Object QCmap;
extern Lisp_Object Qrisky_local_variable;
-extern struct frame *last_glyphless_glyph_frame;
-extern int last_glyphless_glyph_face_id;
-extern int last_glyphless_glyph_merged_face_id;
extern int noninteractive_need_newline;
extern Lisp_Object echo_area_buffer[2];
extern void add_to_log (const char *, Lisp_Object, Lisp_Object);
}
extern Lisp_Object make_multibyte_string (const char *, ptrdiff_t, ptrdiff_t);
-extern Lisp_Object make_event_array (int, Lisp_Object *);
+extern Lisp_Object make_event_array (ptrdiff_t, Lisp_Object *);
extern Lisp_Object make_uninit_string (EMACS_INT);
extern Lisp_Object make_uninit_multibyte_string (EMACS_INT, EMACS_INT);
extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t);
ptrdiff_t, ptrdiff_t, Lisp_Object);
extern ptrdiff_t find_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,
ptrdiff_t, ptrdiff_t *, ptrdiff_t *, bool);
-extern EMACS_INT scan_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,
- EMACS_INT, bool);
+extern ptrdiff_t scan_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,
+ ptrdiff_t, bool);
extern ptrdiff_t find_newline_no_quit (ptrdiff_t, ptrdiff_t,
ptrdiff_t, ptrdiff_t *);
extern ptrdiff_t find_before_next_newline (ptrdiff_t, ptrdiff_t,
XWINDOW (minibuf_window)->cursor.x = 0;
XWINDOW (minibuf_window)->must_be_updated_p = 1;
update_frame (XFRAME (selected_frame), 1, 1);
- {
- struct frame *f = XFRAME (XWINDOW (minibuf_window)->frame);
- struct redisplay_interface *rif = FRAME_RIF (f);
- if (rif && rif->flush_display)
- rif->flush_display (f);
- }
+ flush_frame (XFRAME (XWINDOW (minibuf_window)->frame));
}
/* Make minibuffer contents into a string. */
Mouse Highlight (and friends..)
************************************************************************/
-/* Last window where we saw the mouse. Used by mouse-autoselect-window. */
-static Lisp_Object last_mouse_window;
-
static int mouse_preempted = 0; /* non-zero when XMenu gobbles mouse events */
int
term_setup_done = 0;
}
-static void
-IT_set_terminal_window (struct frame *f, int foo)
-{
-}
-
/* Remember the screen colors of the current frame, to serve as the
default colors for newly-created frames. */
DEFUN ("msdos-remember-default-colors", Fmsdos_remember_default_colors,
term->ring_bell_hook = IT_ring_bell;
term->reset_terminal_modes_hook = IT_reset_terminal_modes;
term->set_terminal_modes_hook = IT_set_terminal_modes;
- term->set_terminal_window_hook = IT_set_terminal_window;
+ term->set_terminal_window_hook = NULL;
term->update_begin_hook = IT_update_begin;
term->update_end_hook = IT_update_end;
term->frame_up_to_date_hook = IT_frame_up_to_date;
/* Generate SELECT_WINDOW_EVENTs when needed. */
if (!NILP (Vmouse_autoselect_window))
{
- mouse_window = window_from_coordinates (SELECTED_FRAME (),
- mouse_last_x,
- mouse_last_y,
- 0, 0);
+ static Lisp_Object last_mouse_window;
+
+ mouse_window = window_from_coordinates
+ (SELECTED_FRAME (), mouse_last_x, mouse_last_y, 0, 0);
/* A window will be selected only when it is not
selected now, and the last mouse movement event was
not in it. A minibuffer window will be selected iff
event.timestamp = event_timestamp ();
kbd_buffer_store_event (&event);
}
+ /* Remember the last window where we saw the mouse. */
last_mouse_window = mouse_window;
}
- else
- last_mouse_window = Qnil;
previous_help_echo_string = help_echo_string;
help_echo_string = help_echo_object = help_echo_window = Qnil;
return nsfocus;
}
-void
-x_sync (struct frame *f)
-{
- /* XXX Not implemented XXX */
- return;
-}
-
-
-
/* ==========================================================================
Lisp definitions that, for whatever reason, we can't alias as 'ns-XXX'.
static void ns_glyph_metrics (struct nsfont_info *font_info,
unsigned char block);
+#define INVALID_GLYPH 0xFFFF
/* ==========================================================================
ns_uni_to_glyphs (font_info, high);
g = font_info->glyphs[high][low];
- return g == 0xFFFF ? FONT_INVALID_CODE : g;
+ return g == INVALID_GLYPH ? FONT_INVALID_CODE : g;
}
#else
g = glyphStorage->cglyphs[i];
/* TODO: is this a good check? maybe need to use coveredChars.. */
- if (g > numGlyphs)
- g = 0xFFFF; /* hopefully unused... */
+ if (g > numGlyphs || g == NSNullGlyph)
+ g = INVALID_GLYPH; /* hopefully unused... */
#endif
*glyphs = g;
}
characterIndex: (NSUInteger)charIndex
{
len = glyphIndex+length;
- for (i =glyphIndex; i<len; i++)
+ for (i =glyphIndex; i<len; i++)
cglyphs[i] = glyphs[i-glyphIndex];
if (len > maxGlyph)
maxGlyph = len;
/* This is a piece of code which is common to all the event handling
methods. Maybe it should even be a function. */
#define EV_TRAILER(e) \
- { \
- XSETFRAME (emacs_event->frame_or_window, emacsframe); \
+ { \
+ XSETFRAME (emacs_event->frame_or_window, emacsframe); \
+ EV_TRAILER2 (e); \
+ }
+
+#define EV_TRAILER2(e) \
+ { \
if (e) emacs_event->timestamp = EV_TIMESTAMP (e); \
if (q_event_ptr) \
{ \
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
NSTRACE (ns_update_window_begin);
- set_output_cursor (&w->cursor);
+ w->output_cursor = w->cursor;
block_input ();
if (cursor_on_p)
display_and_set_cursor (w, 1,
- output_cursor.hpos, output_cursor.vpos,
- output_cursor.x, output_cursor.y);
+ w->output_cursor.hpos, w->output_cursor.vpos,
+ w->output_cursor.x, w->output_cursor.y);
if (draw_window_fringes (w, 1))
x_draw_vertical_border (w);
NSTRACE (ns_update_end);
}
-
-static void
-ns_flush (struct frame *f)
-/* --------------------------------------------------------------------------
- external (RIF) call
- NS impl is no-op since currently we flush in ns_update_end and elsewhere
- -------------------------------------------------------------------------- */
-{
- NSTRACE (ns_flush);
-}
-
-
static void
ns_focus (struct frame *f, NSRect *r, int n)
/* --------------------------------------------------------------------------
static void
-ns_clip_to_row (struct window *w, struct glyph_row *row, int area, BOOL gc)
+ns_clip_to_row (struct window *w, struct glyph_row *row,
+ enum glyph_row_area area, BOOL gc)
/* --------------------------------------------------------------------------
Internal (but parallels other terms): Focus drawing on given row
-------------------------------------------------------------------------- */
}
}
-
-static void
-ns_reset_terminal_modes (struct terminal *terminal)
-/* Externally called as hook */
-{
- NSTRACE (ns_reset_terminal_modes);
-}
-
-
-static void
-ns_set_terminal_modes (struct terminal *terminal)
-/* Externally called as hook */
-{
- NSTRACE (ns_set_terminal_modes);
-}
-
-
-
/* ==========================================================================
Frame / window manager related functions
mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f)));
- output_cursor.hpos = output_cursor.vpos = 0;
- output_cursor.x = -1;
-
r = [view bounds];
block_input ();
/* Get frame-relative bounding box of the text display area of W,
without mode lines. Include in this box the left and right
fringe of W. */
- window_box (w, -1, &x, &y, &width, &height);
+ window_box (w, ANY_AREA, &x, &y, &width, &height);
from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y);
to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y);
}
/* Must clip because of partially visible lines. */
- ns_clip_to_row (w, row, -1, YES);
+ ns_clip_to_row (w, row, ANY_AREA, YES);
if (!p->overlay_p)
{
/* TODO: only needed in rare cases with last-resort font in HELLO..
should we do this more efficiently? */
- ns_clip_to_row (w, glyph_row, -1, NO); /* do ns_focus(f, &r, 1); if remove */
+ ns_clip_to_row (w, glyph_row, ANY_AREA, NO); /* do ns_focus(f, &r, 1); if remove */
face = FACE_FROM_ID (f, phys_cursor_glyph->face_id);
NSTRACE (ns_set_vertical_scroll_bar);
/* Get dimensions. */
- window_box (window, -1, 0, &window_y, 0, &window_height);
+ window_box (window, ANY_AREA, 0, &window_y, 0, &window_height);
top = window_y;
height = window_height;
width = WINDOW_CONFIG_SCROLL_BAR_COLS (window) * FRAME_COLUMN_WIDTH (f);
ns_after_update_window_line,
ns_update_window_begin,
ns_update_window_end,
- x_cursor_to,
- ns_flush,
- 0, /* flush_display_optional */
+ 0, /* flush_display */
x_clear_window_mouse_face,
x_get_glyph_overhangs,
x_fix_overlapping_area,
terminal->ins_del_lines_hook = 0; /* XXX vestigial? */
terminal->delete_glyphs_hook = 0; /* XXX vestigial? */
terminal->ring_bell_hook = ns_ring_bell;
- terminal->reset_terminal_modes_hook = ns_reset_terminal_modes;
- terminal->set_terminal_modes_hook = ns_set_terminal_modes;
+ terminal->reset_terminal_modes_hook = NULL;
+ terminal->set_terminal_modes_hook = NULL;
terminal->update_begin_hook = ns_update_begin;
terminal->update_end_hook = ns_update_end;
terminal->set_terminal_window_hook = NULL; /* XXX vestigial? */
int waiting = 1, nfds;
char c;
- SELECT_TYPE readfds, writefds, *wfds;
+ fd_set readfds, writefds, *wfds;
struct timespec timeout, *tmo;
NSAutoreleasePool *pool = nil;
if (waiting)
{
- SELECT_TYPE fds;
+ fd_set fds;
FD_ZERO (&fds);
FD_SET (selfds[0], &fds);
result = select (selfds[0]+1, &fds, NULL, NULL, NULL);
previous_help_echo_string = help_echo_string;
help_echo_string = Qnil;
+ if (!NILP (Vmouse_autoselect_window))
+ {
+ NSTRACE (mouse_autoselect_window);
+ static Lisp_Object last_mouse_window;
+ Lisp_Object window = window_from_coordinates
+ (emacsframe, last_mouse_motion_position.x,
+ last_mouse_motion_position.y, 0, 0);
+
+ if (WINDOWP (window)
+ && !EQ (window, last_mouse_window)
+ && !EQ (window, selected_window)
+ && (focus_follows_mouse
+ || (EQ (XWINDOW (window)->frame,
+ XWINDOW (selected_window)->frame))))
+ {
+ NSTRACE (in_window);
+ emacs_event->kind = SELECT_WINDOW_EVENT;
+ emacs_event->frame_or_window = window;
+ EV_TRAILER2 (e);
+ }
+ /* Remember the last window where we saw the mouse. */
+ last_mouse_window = window;
+ }
+
if (!note_mouse_movement (emacsframe, last_mouse_motion_position.x,
last_mouse_motion_position.y))
help_echo_string = previous_help_echo_string;
set_buffer_internal (XMARKER (printcharfun)->buffer); \
marker_pos = marker_position (printcharfun); \
if (marker_pos < BEGV || marker_pos > ZV) \
- error ("Marker is outside the accessible part of the buffer"); \
+ signal_error ("Marker is outside the accessible " \
+ "part of the buffer", printcharfun); \
old_point = PT; \
old_point_byte = PT_BYTE; \
SET_PT_BOTH (marker_pos, \
if (NILP (printcharfun)) \
{ \
Lisp_Object string; \
- if (NILP (BVAR (current_buffer, enable_multibyte_characters)) \
+ if (NILP (BVAR (current_buffer, enable_multibyte_characters)) \
&& ! print_escape_multibyte) \
specbind (Qprint_escape_multibyte, Qt); \
- if (! NILP (BVAR (current_buffer, enable_multibyte_characters)) \
+ if (! NILP (BVAR (current_buffer, enable_multibyte_characters)) \
&& ! print_escape_nonascii) \
specbind (Qprint_escape_nonascii, Qt); \
if (print_buffer != 0) \
if (NILP (printcharfun)) \
{ \
if (print_buffer_pos != print_buffer_pos_byte \
- && NILP (BVAR (current_buffer, enable_multibyte_characters))) \
+ && NILP (BVAR (current_buffer, enable_multibyte_characters)))\
{ \
unsigned char *temp = alloca (print_buffer_pos + 1); \
copy_text ((unsigned char *) print_buffer, temp, \
#endif
#ifdef WINDOWSNT
-extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
+extern int sys_select (int, fd_set *, fd_set *, fd_set *,
struct timespec *, void *);
#endif
static void create_process (Lisp_Object, char **, Lisp_Object);
#ifdef USABLE_SIGIO
-static bool keyboard_bit_set (SELECT_TYPE *);
+static bool keyboard_bit_set (fd_set *);
#endif
static void deactivate_process (Lisp_Object);
static void status_notify (struct Lisp_Process *);
/* Mask of bits indicating the descriptors that we wait for input on. */
-static SELECT_TYPE input_wait_mask;
+static fd_set input_wait_mask;
/* Mask that excludes keyboard input descriptor(s). */
-static SELECT_TYPE non_keyboard_wait_mask;
+static fd_set non_keyboard_wait_mask;
/* Mask that excludes process input descriptor(s). */
-static SELECT_TYPE non_process_wait_mask;
+static fd_set non_process_wait_mask;
/* Mask for selecting for write. */
-static SELECT_TYPE write_mask;
+static fd_set write_mask;
#ifdef NON_BLOCKING_CONNECT
/* Mask of bits indicating the descriptors that we wait for connect to
complete on. Once they complete, they are removed from this mask
and added to the input_wait_mask and non_keyboard_wait_mask. */
-static SELECT_TYPE connect_wait_mask;
+static fd_set connect_wait_mask;
/* Number of bits set in connect_wait_mask. */
static int num_pending_connects;
static int max_input_desc;
/* Indexed by descriptor, gives the process (if any) for that descriptor */
-static Lisp_Object chan_process[MAXDESC];
+static Lisp_Object chan_process[FD_SETSIZE];
/* Alist of elements (NAME . PROCESS) */
static Lisp_Object Vprocess_alist;
output from the process is to read at least one char.
Always -1 on systems that support FIONREAD. */
-static int proc_buffered_char[MAXDESC];
+static int proc_buffered_char[FD_SETSIZE];
/* Table of `struct coding-system' for each process. */
-static struct coding_system *proc_decode_coding_system[MAXDESC];
-static struct coding_system *proc_encode_coding_system[MAXDESC];
+static struct coding_system *proc_decode_coding_system[FD_SETSIZE];
+static struct coding_system *proc_encode_coding_system[FD_SETSIZE];
#ifdef DATAGRAM_SOCKETS
/* Table of `partner address' for datagram sockets. */
static struct sockaddr_and_len {
struct sockaddr *sa;
int len;
-} datagram_address[MAXDESC];
+} datagram_address[FD_SETSIZE];
#define DATAGRAM_CHAN_P(chan) (datagram_address[chan].sa != 0)
#define DATAGRAM_CONN_P(proc) (PROCESSP (proc) && datagram_address[XPROCESS (proc)->infd].sa != 0)
#else
#define FOR_READ 1
#define FOR_WRITE 2
int condition; /* mask of the defines above. */
-} fd_callback_info[MAXDESC];
+} fd_callback_info[FD_SETSIZE];
/* Add a file descriptor FD to be monitored for when read is possible.
void
add_read_fd (int fd, fd_callback func, void *data)
{
- eassert (fd < MAXDESC);
+ eassert (fd < FD_SETSIZE);
add_keyboard_wait_descriptor (fd);
fd_callback_info[fd].func = func;
void
delete_read_fd (int fd)
{
- eassert (fd < MAXDESC);
+ eassert (fd < FD_SETSIZE);
delete_keyboard_wait_descriptor (fd);
fd_callback_info[fd].condition &= ~FOR_READ;
void
add_write_fd (int fd, fd_callback func, void *data)
{
- eassert (fd < MAXDESC);
+ eassert (fd < FD_SETSIZE);
FD_SET (fd, &write_mask);
if (fd > max_input_desc)
max_input_desc = fd;
void
delete_write_fd (int fd)
{
- eassert (fd < MAXDESC);
+ eassert (fd < FD_SETSIZE);
FD_CLR (fd, &write_mask);
fd_callback_info[fd].condition &= ~FOR_WRITE;
if (fd_callback_info[fd].condition == 0)
wait for completion is pselect(). */
int sc;
socklen_t len;
- SELECT_TYPE fdset;
+ fd_set fdset;
retry_select:
FD_ZERO (&fdset);
FD_SET (s, &fdset);
struct Lisp_Process *wait_proc, int just_wait_proc)
{
int channel, nfds;
- SELECT_TYPE Available;
- SELECT_TYPE Writeok;
+ fd_set Available;
+ fd_set Writeok;
bool check_write;
int check_delay;
bool no_avail;
timeout to get our attention. */
if (update_tick != process_tick)
{
- SELECT_TYPE Atemp;
- SELECT_TYPE Ctemp;
+ fd_set Atemp;
+ fd_set Ctemp;
if (kbd_on_hold_p ())
FD_ZERO (&Atemp);
the gnutls library -- 2.12.14 has been confirmed
to need it. See
http://comments.gmane.org/gmane.emacs.devel/145074 */
- for (channel = 0; channel < MAXDESC; ++channel)
+ for (channel = 0; channel < FD_SETSIZE; ++channel)
if (! NILP (chan_process[channel]))
{
struct Lisp_Process *p =
bset_read_only (current_buffer, Qnil);
- /* Insert new output into buffer
- at the current end-of-output marker,
- thus preserving logical ordering of input and output. */
+ /* Insert new output into buffer at the current end-of-output
+ marker, thus preserving logical ordering of input and output. */
if (XMARKER (p->mark)->buffer)
- SET_PT_BOTH (clip_to_bounds (BEGV,
- marker_position (p->mark), ZV),
- clip_to_bounds (BEGV_BYTE,
- marker_byte_position (p->mark),
- ZV_BYTE));
+ set_point_from_marker (p->mark);
else
SET_PT_BOTH (ZV, ZV_BYTE);
before = PT;
#else /* not subprocesses */
/* Defined on msdos.c. */
-extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
+extern int sys_select (int, fd_set *, fd_set *, fd_set *,
struct timespec *, void *);
/* Implementation of wait_reading_process_output, assuming that there
while (1)
{
bool timeout_reduced_for_timers = 0;
- SELECT_TYPE waitchannels;
+ fd_set waitchannels;
int xerrno;
/* If calling from keyboard input, do not quit
Vprocess_alist = Qnil;
deleted_pid_list = Qnil;
- for (i = 0; i < MAXDESC; i++)
+ for (i = 0; i < FD_SETSIZE; i++)
{
chan_process[i] = Qnil;
proc_buffered_char[i] = -1;
enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
/* Dummy macros for non-Emacs environments. */
-# define CHAR_CHARSET(c) 0
-# define CHARSET_LEADING_CODE_BASE(c) 0
# define MAX_MULTIBYTE_LENGTH 1
# define RE_MULTIBYTE_P(x) 0
# define RE_TARGET_MULTIBYTE_P(x) 0
# define WORD_BOUNDARY_P(c1, c2) (0)
-# define CHAR_HEAD_P(p) (1)
-# define SINGLE_BYTE_CHAR_P(c) (1)
-# define SAME_CHARSET_P(c1, c2) (1)
# define BYTES_BY_CHAR_HEAD(p) (1)
# define PREV_CHAR_BOUNDARY(p, limit) ((p)--)
# define STRING_CHAR(p) (*(p))
(c = ((p) == (str2) ? *((end1) - 1) : *((p) - 1)))
# define GET_CHAR_AFTER(c, p, len) \
(c = *p, len = 1)
-# define MAKE_CHAR(charset, c1, c2) (c1)
-# define BYTE8_TO_CHAR(c) (c)
# define CHAR_BYTE8_P(c) (0)
# define CHAR_LEADING_CODE(c) (c)
and the 2 bytes of flags at the start of the range table. */
#define CHARSET_RANGE_TABLE(p) (&(p)[4 + CHARSET_BITMAP_SIZE (p)])
+#ifdef emacs
/* Extract the bit flags that start a range table. */
#define CHARSET_RANGE_TABLE_BITS(p) \
((p)[2 + CHARSET_BITMAP_SIZE (p)] \
+ (p)[3 + CHARSET_BITMAP_SIZE (p)] * 0x100)
+#endif
/* Return the address of end of RANGE_TABLE. COUNT is number of
ranges (which is a pair of (start, end)) in the RANGE_TABLE. `* 2'
int bits; /* flag to record character classes */
};
+#ifdef emacs
+
/* Make sure that WORK_AREA can hold more N multibyte characters.
This is used only in set_image_of_range and set_image_of_range_1.
It expects WORK_AREA to be a pointer.
#define SET_RANGE_TABLE_WORK_AREA_BIT(work_area, bit) \
(work_area).bits |= (bit)
-/* Bits used to implement the multibyte-part of the various character classes
- such as [:alnum:] in a charset's range table. */
-#define BIT_WORD 0x1
-#define BIT_LOWER 0x2
-#define BIT_PUNCT 0x4
-#define BIT_SPACE 0x8
-#define BIT_UPPER 0x10
-#define BIT_MULTIBYTE 0x20
-
/* Set a range (RANGE_START, RANGE_END) to WORK_AREA. */
#define SET_RANGE_TABLE_WORK_AREA(work_area, range_start, range_end) \
do { \
(work_area).table[(work_area).used++] = (range_end); \
} while (0)
+#endif /* emacs */
+
/* Free allocated memory for WORK_AREA. */
#define FREE_RANGE_TABLE_WORK_AREA(work_area) \
do { \
#define RANGE_TABLE_WORK_USED(work_area) ((work_area).used)
#define RANGE_TABLE_WORK_BITS(work_area) ((work_area).bits)
#define RANGE_TABLE_WORK_ELT(work_area, i) ((work_area).table[i])
+
+/* Bits used to implement the multibyte-part of the various character classes
+ such as [:alnum:] in a charset's range table. */
+#define BIT_WORD 0x1
+#define BIT_LOWER 0x2
+#define BIT_PUNCT 0x4
+#define BIT_SPACE 0x8
+#define BIT_UPPER 0x10
+#define BIT_MULTIBYTE 0x20
\f
/* Set the bit for character C in a list. */
If ALLOW_QUIT, set immediate_quit. That's good to do
except in special cases. */
-EMACS_INT
+ptrdiff_t
scan_newline (ptrdiff_t start, ptrdiff_t start_byte,
ptrdiff_t limit, ptrdiff_t limit_byte,
- EMACS_INT count, bool allow_quit)
+ ptrdiff_t count, bool allow_quit)
{
- int direction = ((count > 0) ? 1 : -1);
-
- unsigned char *cursor;
- unsigned char *base;
-
- ptrdiff_t ceiling;
- unsigned char *ceiling_addr;
-
- bool old_immediate_quit = immediate_quit;
-
- if (allow_quit)
- immediate_quit++;
+ ptrdiff_t charpos, bytepos, shortage;
- if (count > 0)
- {
- while (start_byte < limit_byte)
- {
- ceiling = BUFFER_CEILING_OF (start_byte);
- ceiling = min (limit_byte - 1, ceiling);
- ceiling_addr = BYTE_POS_ADDR (ceiling) + 1;
- base = (cursor = BYTE_POS_ADDR (start_byte));
-
- do
- {
- unsigned char *nl = memchr (cursor, '\n', ceiling_addr - cursor);
- if (! nl)
- break;
- if (--count == 0)
- {
- immediate_quit = old_immediate_quit;
- start_byte += nl - base + 1;
- start = BYTE_TO_CHAR (start_byte);
- TEMP_SET_PT_BOTH (start, start_byte);
- return 0;
- }
- cursor = nl + 1;
- }
- while (cursor < ceiling_addr);
-
- start_byte += ceiling_addr - base;
- }
- }
+ charpos = find_newline (start, start_byte, limit, limit_byte,
+ count, &shortage, &bytepos, allow_quit);
+ if (shortage)
+ TEMP_SET_PT_BOTH (limit, limit_byte);
else
- {
- while (start_byte > limit_byte)
- {
- ceiling = BUFFER_FLOOR_OF (start_byte - 1);
- ceiling = max (limit_byte, ceiling);
- ceiling_addr = BYTE_POS_ADDR (ceiling);
- base = (cursor = BYTE_POS_ADDR (start_byte - 1) + 1);
- while (1)
- {
- unsigned char *nl = memrchr (ceiling_addr, '\n',
- cursor - ceiling_addr);
- if (! nl)
- break;
-
- if (++count == 0)
- {
- immediate_quit = old_immediate_quit;
- /* Return the position AFTER the match we found. */
- start_byte += nl - base + 1;
- start = BYTE_TO_CHAR (start_byte);
- TEMP_SET_PT_BOTH (start, start_byte);
- return 0;
- }
-
- cursor = nl;
- }
- start_byte += ceiling_addr - base;
- }
- }
-
- TEMP_SET_PT_BOTH (limit, limit_byte);
- immediate_quit = old_immediate_quit;
-
- return count * direction;
+ TEMP_SET_PT_BOTH (charpos, bytepos);
+ return shortage;
}
/* Like find_newline, but doesn't allow QUITting and doesn't return
}
\f
#ifdef USABLE_SIGIO
-static int old_fcntl_flags[MAXDESC];
+static int old_fcntl_flags[FD_SETSIZE];
#endif
void
\f
#ifdef F_SETOWN
-static int old_fcntl_owner[MAXDESC];
+static int old_fcntl_owner[FD_SETSIZE];
#endif /* F_SETOWN */
/* This may also be defined in stdio,
definitions in w32.h are incompatible with the below. */
#ifndef WINDOWSNT
#ifdef FD_SET
-#ifdef FD_SETSIZE
-#define MAXDESC FD_SETSIZE
-#else
-#define MAXDESC 64
+#ifndef FD_SETSIZE
+#define FD_SETSIZE 64
#endif
-#define SELECT_TYPE fd_set
#else /* no FD_SET */
-#define MAXDESC 32
-#define SELECT_TYPE int
+#define FD_SETSIZE 32
+typedef int fd_set;
/* Define the macros to access a single-int bitmap of descriptors. */
#define FD_SET(n, p) (*(p) |= (1 << (n)))
static void
produce_glyphless_glyph (struct it *it, Lisp_Object acronym)
{
- int face_id;
- int len;
+ int len, face_id = merge_glyphless_glyph_face (it);
char buf[sizeof "\\x" + max (6, (sizeof it->c * CHAR_BIT + 3) / 4)];
char const *str = " ";
- /* Get a face ID for the glyph by utilizing a cache (the same way as
- done for `escape-glyph' in get_next_display_element). */
- if (it->f == last_glyphless_glyph_frame
- && it->face_id == last_glyphless_glyph_face_id)
- {
- face_id = last_glyphless_glyph_merged_face_id;
- }
- else
- {
- /* Merge the `glyphless-char' face into the current face. */
- face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
- last_glyphless_glyph_frame = it->f;
- last_glyphless_glyph_face_id = it->face_id;
- last_glyphless_glyph_merged_face_id = face_id;
- }
-
if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE)
{
/* As there's no way to produce a thin space, we produce a space
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-\f
+#ifndef EMACS_TERMHOOKS_H
+#define EMACS_TERMHOOKS_H
+
/* Miscellanea. */
#include "systime.h" /* for Time */
# define TERMHOOKS_INLINE INLINE
#endif
-struct glyph;
-struct frame;
-\f
-
enum scroll_bar_part {
scroll_bar_above_handle,
scroll_bar_handle,
may do something OS dependent, like extended window manager hints on X11. */
extern void (*fullscreen_hook) (struct frame *f);
-\f
+/* Output method of a terminal (and frames on this terminal, respectively). */
+
+enum output_method
+{
+ output_initial,
+ output_termcap,
+ output_x_window,
+ output_msdos_raw,
+ output_w32,
+ output_ns
+};
+
/* Input queue declarations and hooks. */
enum event_kind
extern struct tty_display_info *gpm_tty;
#endif
-\f
-struct ns_display_info;
-struct x_display_info;
-struct w32_display_info;
-
/* Terminal-local parameters. */
struct terminal
{
#endif
INLINE_HEADER_END
+
+#endif /* EMACS_TERMHOOKS_H */
{
if (winsock_lib != NULL && winsock_inuse == 0)
{
+ release_listen_threads ();
/* Not sure what would cause WSAENETDOWN, or even if it can happen
after WSAStartup returns successfully, but it seems reasonable
to allow unloading winsock anyway in that case. */
rc = pfn_WSAEventSelect (SOCK_HANDLE (fd), hEv, FD_ACCEPT);
if (rc != SOCKET_ERROR)
{
- rc = WaitForSingleObject (hEv, INFINITE);
+ do {
+ rc = WaitForSingleObject (hEv, 500);
+ Sleep (5);
+ } while (rc == WAIT_TIMEOUT
+ && cp->status != STATUS_READ_ERROR
+ && cp->char_avail);
pfn_WSAEventSelect (SOCK_HANDLE (fd), NULL, 0);
if (rc == WAIT_OBJECT_0)
cp->status = STATUS_READ_SUCCEEDED;
/* Return the string resource associated with KEY of type TYPE. */
extern LPBYTE w32_get_resource (char * key, LPDWORD type);
+extern void release_listen_threads (void);
extern void init_ntproc (int);
extern void term_ntproc (int);
extern void globals_of_w32 (void);
static void w32con_delete_glyphs (struct frame *f, int n);
static void w32con_reset_terminal_modes (struct terminal *t);
static void w32con_set_terminal_modes (struct terminal *t);
-static void w32con_set_terminal_window (struct frame *f, int size);
static void w32con_update_begin (struct frame * f);
static void w32con_update_end (struct frame * f);
static WORD w32_face_attributes (struct frame *f, int face_id);
SetConsoleCursorPosition (cur_screen, cursor_coords);
}
-static void
-w32con_set_terminal_window (struct frame *f, int size)
-{
-}
-
/***********************************************************************
stubs from termcap.c
***********************************************************************/
term->ring_bell_hook = w32_sys_ring_bell;
term->reset_terminal_modes_hook = w32con_reset_terminal_modes;
term->set_terminal_modes_hook = w32con_set_terminal_modes;
- term->set_terminal_window_hook = w32con_set_terminal_window;
+ term->set_terminal_window_hook = NULL;
term->update_begin_hook = w32con_update_begin;
term->update_end_hook = w32con_update_end;
x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f));
do_pending_window_change (0);
}
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
}
FRAME_TOOL_BAR_LINES (f) = nlines;
resize_frame_windows (f, FRAME_LINES (f), 0);
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
/* We also have to make sure that the internal border at the top of
the frame, below the menu bar or tool bar, is redrawn when the
}
FRAME_TOTAL_COLS (f) = WINDOW_TOTAL_COLS (w);
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
w->pseudo_window_p = 1;
/* Display the tooltip text in a temporary buffer. */
width /= WINDOW_FRAME_COLUMN_WIDTH (w);
w->total_cols = width;
FRAME_TOTAL_COLS (f) = width;
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
w->pseudo_window_p = 1;
clear_glyph_matrix (w->desired_matrix);
clear_glyph_matrix (w->current_matrix);
return NULL;
}
+void
+release_listen_threads (void)
+{
+ int i;
+
+ for (i = child_proc_count - 1; i >= 0; i--)
+ {
+ if (CHILD_ACTIVE (&child_procs[i])
+ && (fd_info[child_procs[i].fd].flags & FILE_LISTEN))
+ child_procs[i].status = STATUS_READ_ERROR;
+ }
+}
/* Thread proc for child process and socket reader threads. Each thread
is normally blocked until woken by select() to check for input by
static int any_help_event_p;
-/* Last window where we saw the mouse. Used by mouse-autoselect-window. */
-static Lisp_Object last_window;
-
extern unsigned int msh_mousewheel;
extern void free_frame_menubar (struct frame *);
static void w32_initialize (void);
static void x_update_end (struct frame *);
static void w32_frame_up_to_date (struct frame *);
-static void w32_set_terminal_modes (struct terminal *);
-static void w32_reset_terminal_modes (struct terminal *);
static void x_clear_frame (struct frame *);
static void frame_highlight (struct frame *);
static void frame_unhighlight (struct frame *);
static void x_draw_hollow_cursor (struct window *, struct glyph_row *);
static void x_draw_bar_cursor (struct window *, struct glyph_row *, int,
enum text_cursor_kinds);
-static void w32_clip_to_row (struct window *, struct glyph_row *, int, HDC);
+static void w32_clip_to_row (struct window *, struct glyph_row *,
+ enum glyph_row_area, HDC);
static BOOL my_show_window (struct frame *, HWND, int);
static void my_set_window_pos (HWND, HWND, int, int, int, int, UINT);
#if 0
}
-/* Start update of window W. Set output_cursor to the cursor
- position of W. */
+/* Start update of window W. */
static void
x_update_window_begin (struct window *w)
SendMessage (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0);
}
- set_output_cursor (&w->cursor);
+ w->output_cursor = w->cursor;
block_input ();
block_input ();
if (cursor_on_p)
- display_and_set_cursor (w, 1, output_cursor.hpos,
- output_cursor.vpos,
- output_cursor.x, output_cursor.y);
+ display_and_set_cursor (w, 1,
+ w->output_cursor.hpos, w->output_cursor.vpos,
+ w->output_cursor.x, w->output_cursor.y);
if (draw_window_fringes (w, 1))
x_draw_vertical_border (w);
}
/* Must clip because of partially visible lines. */
- w32_clip_to_row (w, row, -1, hdc);
+ w32_clip_to_row (w, row, ANY_AREA, hdc);
if (p->which && p->which < max_fringe_bmp)
{
fringe_bmp[which] = 0;
}
-
-\f
-/* This is called when starting Emacs and when restarting after
- suspend. When starting Emacs, no window is mapped. And nothing
- must be done to Emacs's own window if it is suspended (though that
- rarely happens). */
-
-static void
-w32_set_terminal_modes (struct terminal *term)
-{
-}
-
-/* This is called when exiting or suspending Emacs. Exiting will make
- the W32 windows go away, and suspending requires no action. */
-
-static void
-w32_reset_terminal_modes (struct terminal *term)
-{
-}
-
-
-\f
/***********************************************************************
Display Iterator
***********************************************************************/
/* Clearing the frame will erase any cursor, so mark them all as no
longer visible. */
mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f)));
- output_cursor.hpos = output_cursor.vpos = 0;
- output_cursor.x = -1;
- /* We don't set the output cursor here because there will always
- follow an explicit cursor_to. */
block_input ();
w32_clear_window (f);
unblock_input ();
}
-\f
-/* Specify how many text lines, from the top of the window,
- should be affected by insert-lines and delete-lines operations.
- This, and those operations, are used only within an update
- that is bounded by calls to x_update_begin and x_update_end. */
-
-static void
-w32_set_terminal_window (struct frame *f, int n)
-{
- /* This function intentionally left blank. */
-}
-
-\f
/***********************************************************************
Line Dance
***********************************************************************/
/* Get frame-relative bounding box of the text display area of W,
without mode lines. Include in this box the left and right
fringes of W. */
- window_box (w, -1, &x, &y, &width, &height);
+ window_box (w, ANY_AREA, &x, &y, &width, &height);
/* If the fringe is adjacent to the left (right) scroll bar of a
leftmost (rightmost, respectively) window, then extend its
bool fringe_extended_p;
/* Get window dimensions. */
- window_box (w, -1, 0, &window_y, 0, &window_height);
+ window_box (w, ANY_AREA, 0, &window_y, 0, &window_height);
top = window_y;
width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f);
height = window_height;
/* Generate SELECT_WINDOW_EVENTs when needed. */
if (!NILP (Vmouse_autoselect_window))
{
- Lisp_Object window;
- int x = LOWORD (msg.msg.lParam);
- int y = HIWORD (msg.msg.lParam);
-
- window = window_from_coordinates (f, x, y, 0, 0);
+ static Lisp_Object last_mouse_window;
+ Lisp_Object window = window_from_coordinates
+ (f, LOWORD (msg.msg.lParam), HIWORD (msg.msg.lParam), 0, 0);
/* Window will be selected only when it is not
selected now and last mouse movement event was
not in it. Minibuffer window will be selected
only when it is active. */
if (WINDOWP (window)
- && !EQ (window, last_window)
+ && !EQ (window, last_mouse_window)
&& !EQ (window, selected_window)
/* For click-to-focus window managers
create event iff we don't leave the
inev.kind = SELECT_WINDOW_EVENT;
inev.frame_or_window = window;
}
-
- last_window = window;
+ /* Remember the last window where we saw the mouse. */
+ last_mouse_window = window;
}
if (!note_mouse_movement (f, &msg.msg))
help_echo_string = previous_help_echo_string;
mode lines must be clipped to the whole window. */
static void
-w32_clip_to_row (struct window *w, struct glyph_row *row, int area, HDC hdc)
+w32_clip_to_row (struct window *w, struct glyph_row *row,
+ enum glyph_row_area area, HDC hdc)
{
RECT clip_rect;
int window_x, window_y, window_width;
return buffer;
}
-void
-x_flush (struct frame * f)
-{ /* Nothing to do */ }
-
-
extern frame_parm_handler w32_frame_parm_handlers[];
static struct redisplay_interface w32_redisplay_interface =
x_after_update_window_line,
x_update_window_begin,
x_update_window_end,
- x_cursor_to,
- x_flush,
- 0, /* flush_display_optional */
+ 0, /* flush_display */
x_clear_window_mouse_face,
x_get_glyph_overhangs,
x_fix_overlapping_area,
terminal->ins_del_lines_hook = x_ins_del_lines;
terminal->delete_glyphs_hook = x_delete_glyphs;
terminal->ring_bell_hook = w32_ring_bell;
- terminal->reset_terminal_modes_hook = w32_reset_terminal_modes;
- terminal->set_terminal_modes_hook = w32_set_terminal_modes;
+ terminal->reset_terminal_modes_hook = NULL;
+ terminal->set_terminal_modes_hook = NULL;
terminal->update_begin_hook = x_update_begin;
terminal->update_end_hook = x_update_end;
- terminal->set_terminal_window_hook = w32_set_terminal_window;
+ terminal->set_terminal_window_hook = NULL;
terminal->read_socket_hook = w32_read_socket;
terminal->frame_up_to_date_hook = w32_frame_up_to_date;
terminal->mouse_position_hook = w32_mouse_position;
int cols, int rows);
extern int x_display_pixel_height (struct w32_display_info *);
extern int x_display_pixel_width (struct w32_display_info *);
-extern void x_sync (struct frame *);
extern Lisp_Object x_get_focus_frame (struct frame *);
extern void x_set_mouse_position (struct frame *f, int h, int v);
extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
}
return retval;
}
-
-/* x_sync is a no-op on W32. */
-void
-x_sync (struct frame *f)
-{
-}
#include "blockinput.h"
#include "intervals.h"
#include "termhooks.h" /* For FRAME_TERMINAL. */
-
-#ifdef HAVE_X_WINDOWS
-#include "xterm.h"
-#endif /* HAVE_X_WINDOWS */
-#ifdef HAVE_NTGUI
-#include "w32term.h"
-#endif
+#ifdef HAVE_WINDOW_SYSTEM
+#include TERM_HEADER
+#endif /* HAVE_WINDOW_SYSTEM */
#ifdef MSDOS
#include "msdos.h"
#endif
than one window. It also matters when
redisplay_window has altered point after scrolling,
because it makes the change only in the window. */
- {
- register ptrdiff_t new_point = marker_position (XWINDOW (window)->pointm);
- if (new_point < BEGV)
- SET_PT (BEGV);
- else if (new_point > ZV)
- SET_PT (ZV);
- else
- SET_PT (new_point);
- }
+ set_point_from_marker (XWINDOW (window)->pointm);
}
DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0,
&& !noninteractive)
{
struct text_pos startp;
- ptrdiff_t charpos = marker_position (w->start);
struct it it;
struct buffer *old_buffer = NULL;
void *itdata = NULL;
`-l' containing a call to `rmail' with subsequent other
commands. At the end, W->start happened to be BEG, while
rmail had already narrowed the buffer. */
- if (charpos < BEGV)
- SET_TEXT_POS (startp, BEGV, BEGV_BYTE);
- else if (charpos > ZV)
- SET_TEXT_POS (startp, ZV, ZV_BYTE);
- else
- SET_TEXT_POS_FROM_MARKER (startp, w->start);
+ CLIP_TEXT_POS_FROM_MARKER (startp, w->start);
itdata = bidi_shelve_cache ();
start_display (&it, w, startp);
}
}
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
unblock_input ();
run_window_configuration_change_hook (f);
if (!NILP (Vtemp_buffer_show_function))
call1 (Vtemp_buffer_show_function, buf);
- else
+ else if (WINDOW_LIVE_P (window = display_buffer (buf, Qnil, Qnil)))
{
- window = display_buffer (buf, Qnil, Qnil);
-
if (!EQ (XWINDOW (window)->frame, selected_frame))
Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window)));
Vminibuf_scroll_window = window;
non-Lisp data, so do it only for slots which should not be zero. */
w->nrows_scale_factor = w->ncols_scale_factor = 1;
w->left_fringe_width = w->right_fringe_width = -1;
+ w->mode_line_height = w->header_line_height = -1;
w->phys_cursor_type = -1;
w->phys_cursor_width = -1;
w->scroll_bar_width = -1;
windows_or_buffers_changed++;
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
unblock_input ();
run_window_configuration_change_hook (f);
block_input ();
window_resize_apply (p, horflag);
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
/* Set buffer of NEW to buffer of reference window. Don't run
any hooks. */
set_window_buffer (new, r->contents, 0, 1);
recombine_windows (sibling);
}
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
if (!WINDOW_LIVE_P (FRAME_SELECTED_WINDOW (f)))
/* We deleted the frame's selected window. */
w->total_lines -= XINT (value);
/* Enforce full redisplay. FIXME: make it more selective. */
windows_or_buffers_changed++;
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
unblock_input ();
}
}
w->total_lines = 1;
/* Enforce full redisplay. FIXME: make it more selective. */
windows_or_buffers_changed++;
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
unblock_input ();
}
/* If the above failed for whatever strange reason we must make a
windows_or_buffers_changed++;
FRAME_WINDOW_SIZES_CHANGED (f) = 1;
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
unblock_input ();
run_window_configuration_change_hook (f);
visible. */
w->vscroll = (it.last_visible_y
- it.current_y + it.max_ascent + it.max_descent);
- adjust_glyphs (it.f);
+ adjust_frame_glyphs (it.f);
}
else
{
{
struct it it;
struct text_pos start;
- ptrdiff_t charpos = marker_position (w->start);
int height = window_box_height (w);
struct buffer *old_buffer;
int bottom_y;
/* In case W->start is out of the accessible range, do something
reasonable. This happens in Info mode when Info-scroll-down
calls (recenter -1) while W->start is 1. */
- if (charpos < BEGV)
- SET_TEXT_POS (start, BEGV, BEGV_BYTE);
- else if (charpos > ZV)
- SET_TEXT_POS (start, ZV, ZV_BYTE);
- else
- SET_TEXT_POS_FROM_MARKER (start, w->start);
+ CLIP_TEXT_POS_FROM_MARKER (start, w->start);
itdata = bidi_shelve_cache ();
start_display (&it, w, start);
++n;
}
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
unblock_input ();
/* Scan dead buffer windows. */
clear_glyph_matrix (w->current_matrix);
w->window_end_valid = 0;
windows_or_buffers_changed++;
- adjust_glyphs (XFRAME (WINDOW_FRAME (w)));
+ adjust_frame_glyphs (XFRAME (WINDOW_FRAME (w)));
}
\f
/* Adjust glyph matrix of the frame if the virtual display
area becomes larger than before. */
if (w->vscroll < 0 && w->vscroll < old_dy)
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
/* Prevent redisplay shortcuts. */
XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1;
/* Where the cursor actually is. */
struct cursor_pos phys_cursor;
+ /* Internally used for redisplay purposes. */
+ struct cursor_pos output_cursor;
+
/* Vertical cursor position as of last update that completed
without pause. This is the position of last_point. */
int last_cursor_vpos;
A value of -1 means use frame values. */
int scroll_bar_width;
+ /* Effective height of the mode line, or -1 if not known. */
+ int mode_line_height;
+
+ /* Effective height of the header line, or -1 if not known. */
+ int header_line_height;
+
/* Z - the buffer position of the last glyph in the current
matrix of W. Only valid if window_end_valid is nonzero. */
ptrdiff_t window_end_pos;
extern Lisp_Object minibuf_selected_window;
-/* Window that the mouse is over (nil if no mouse support). */
-
-extern Lisp_Object Vmouse_window;
-
-/* Last mouse-click event (nil if no mouse support). */
-
-extern Lisp_Object Vmouse_event;
-
extern Lisp_Object make_window (void);
extern Lisp_Object window_from_coordinates (struct frame *, int, int,
enum window_part *, bool);
extern void syms_of_window (void);
extern void keys_of_window (void);
+/* Move cursor to row/column position VPOS/HPOS, pixel coordinates
+ Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y
+ are window-relative pixel positions. This is always done during
+ window update, so the position is the future output cursor position
+ for currently updated window W. */
+
+WINDOW_INLINE void
+output_cursor_to (struct window *w, int vpos, int hpos, int y, int x)
+{
+ eassert (w);
+ w->output_cursor.hpos = hpos;
+ w->output_cursor.vpos = vpos;
+ w->output_cursor.x = x;
+ w->output_cursor.y = y;
+}
+
INLINE_HEADER_END
#endif /* not WINDOW_H_INCLUDED */
#include "font.h"
#include "fontset.h"
#include "blockinput.h"
-
-#ifdef HAVE_X_WINDOWS
-#include "xterm.h"
-#endif
-#ifdef HAVE_NTGUI
-#include "w32term.h"
-#endif
-#ifdef HAVE_NS
-#include "nsterm.h"
-#endif
-#ifdef USE_GTK
-#include "gtkutil.h"
-#endif
+#ifdef HAVE_WINDOW_SYSTEM
+#include TERM_HEADER
+#endif /* HAVE_WINDOW_SYSTEM */
#include "font.h"
#ifdef HAVE_XWIDGETS
int windows_or_buffers_changed;
-/* Nonzero means a frame's cursor type has been changed. */
-
-static int cursor_type_changed;
-
/* Nonzero after display_mode_line if %l was used and it displayed a
line number. */
int help_echo_showing_p;
-/* If >= 0, computed, exact values of mode-line and header-line height
- to use in the macros CURRENT_MODE_LINE_HEIGHT and
- CURRENT_HEADER_LINE_HEIGHT. */
-
-int current_mode_line_height, current_header_line_height;
-
/* The maximum distance to look ahead for text properties. Values
that are too small let us call compute_char_face and similar
functions too often which is expensive. Values that are too large
/* Platform-independent portion of hourglass implementation. */
+#ifdef HAVE_WINDOW_SYSTEM
+
/* Non-zero means an hourglass cursor is currently shown. */
int hourglass_shown_p;
an hourglass cursor on all frames. */
struct atimer *hourglass_atimer;
+#endif /* HAVE_WINDOW_SYSTEM */
+
/* Name of the face used to display glyphless characters. */
Lisp_Object Qglyphless_char;
/* Method symbols for Vglyphless_char_display. */
static Lisp_Object Qhex_code, Qempty_box, Qthin_space, Qzero_width;
-/* Default pixel width of `thin-space' display method. */
-#define THIN_SPACE_WIDTH 1
-
/* Default number of seconds to wait before displaying an hourglass
cursor. */
#define DEFAULT_HOURGLASS_DELAY 1
-\f
+#ifdef HAVE_WINDOW_SYSTEM
+
+/* Default pixel width of `thin-space' display method. */
+#define THIN_SPACE_WIDTH 1
+
+#endif /* HAVE_WINDOW_SYSTEM */
+
/* Function prototypes. */
static void setup_for_ellipsis (struct it *, int);
return height;
}
-/* Return the pixel width of display area AREA of window W. AREA < 0
- means return the total width of W, not including fringes to
- the left and right of the window. */
+/* Return the pixel width of display area AREA of window W.
+ ANY_AREA means return the total width of W, not including
+ fringes to the left and right of the window. */
int
-window_box_width (struct window *w, int area)
+window_box_width (struct window *w, enum glyph_row_area area)
{
int cols = w->total_cols;
int pixels = 0;
}
/* Return the window-relative coordinate of the left edge of display
- area AREA of window W. AREA < 0 means return the left edge of the
+ area AREA of window W. ANY_AREA means return the left edge of the
whole window, to the right of the left fringe of W. */
int
-window_box_left_offset (struct window *w, int area)
+window_box_left_offset (struct window *w, enum glyph_row_area area)
{
int x;
/* Return the window-relative coordinate of the right edge of display
- area AREA of window W. AREA < 0 means return the right edge of the
+ area AREA of window W. ANY_AREA means return the right edge of the
whole window, to the left of the right fringe of W. */
int
-window_box_right_offset (struct window *w, int area)
+window_box_right_offset (struct window *w, enum glyph_row_area area)
{
return window_box_left_offset (w, area) + window_box_width (w, area);
}
/* Return the frame-relative coordinate of the left edge of display
- area AREA of window W. AREA < 0 means return the left edge of the
+ area AREA of window W. ANY_AREA means return the left edge of the
whole window, to the right of the left fringe of W. */
int
-window_box_left (struct window *w, int area)
+window_box_left (struct window *w, enum glyph_row_area area)
{
struct frame *f = XFRAME (w->frame);
int x;
/* Return the frame-relative coordinate of the right edge of display
- area AREA of window W. AREA < 0 means return the right edge of the
+ area AREA of window W. ANY_AREA means return the right edge of the
whole window, to the left of the right fringe of W. */
int
-window_box_right (struct window *w, int area)
+window_box_right (struct window *w, enum glyph_row_area area)
{
return window_box_left (w, area) + window_box_width (w, area);
}
/* Get the bounding box of the display area AREA of window W, without
- mode lines, in frame-relative coordinates. AREA < 0 means the
+ mode lines, in frame-relative coordinates. ANY_AREA means the
whole window, not including the left and right fringes of
the window. Return in *BOX_X and *BOX_Y the frame-relative pixel
coordinates of the upper-left corner of the box. Return in
*BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */
void
-window_box (struct window *w, int area, int *box_x, int *box_y,
- int *box_width, int *box_height)
+window_box (struct window *w, enum glyph_row_area area, int *box_x,
+ int *box_y, int *box_width, int *box_height)
{
if (box_width)
*box_width = window_box_width (w, area);
}
}
+#ifdef HAVE_WINDOW_SYSTEM
/* Get the bounding box of the display area AREA of window W, without
- mode lines. AREA < 0 means the whole window, not including the
- left and right fringe of the window. Return in *TOP_LEFT_X
+ mode lines and both fringes of the window. Return in *TOP_LEFT_X
and TOP_LEFT_Y the frame-relative pixel coordinates of the
upper-left corner of the box. Return in *BOTTOM_RIGHT_X, and
*BOTTOM_RIGHT_Y the coordinates of the bottom-right corner of the
box. */
static void
-window_box_edges (struct window *w, int area, int *top_left_x, int *top_left_y,
- int *bottom_right_x, int *bottom_right_y)
+window_box_edges (struct window *w, int *top_left_x, int *top_left_y,
+ int *bottom_right_x, int *bottom_right_y)
{
- window_box (w, area, top_left_x, top_left_y, bottom_right_x,
- bottom_right_y);
+ window_box (w, ANY_AREA, top_left_x, top_left_y,
+ bottom_right_x, bottom_right_y);
*bottom_right_x += *top_left_x;
*bottom_right_y += *top_left_y;
}
+#endif /* HAVE_WINDOW_SYSTEM */
-\f
/***********************************************************************
Utilities
***********************************************************************/
/* Compute exact mode line heights. */
if (WINDOW_WANTS_MODELINE_P (w))
- current_mode_line_height
+ w->mode_line_height
= display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w),
BVAR (current_buffer, mode_line_format));
if (WINDOW_WANTS_HEADER_LINE_P (w))
- current_header_line_height
+ w->header_line_height
= display_mode_line (w, HEADER_LINE_FACE_ID,
BVAR (current_buffer, header_line_format));
if (old_buffer)
set_buffer_internal_1 (old_buffer);
- current_header_line_height = current_mode_line_height = -1;
-
if (visible_p && w->hscroll > 0)
*x -=
window_hscroll_limited (w, WINDOW_XFRAME (w))
return glyphless_method;
}
-/* Load IT's display element fields with information about the next
- display element from the current position of IT. Value is zero if
- end of buffer (or C string) is reached. */
+/* Merge escape glyph face and cache the result. */
static struct frame *last_escape_glyph_frame = NULL;
static int last_escape_glyph_face_id = (1 << FACE_ID_BITS);
static int last_escape_glyph_merged_face_id = 0;
-struct frame *last_glyphless_glyph_frame = NULL;
-int last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
-int last_glyphless_glyph_merged_face_id = 0;
+static int
+merge_escape_glyph_face (struct it *it)
+{
+ int face_id;
+
+ if (it->f == last_escape_glyph_frame
+ && it->face_id == last_escape_glyph_face_id)
+ face_id = last_escape_glyph_merged_face_id;
+ else
+ {
+ /* Merge the `escape-glyph' face into the current face. */
+ face_id = merge_faces (it->f, Qescape_glyph, 0, it->face_id);
+ last_escape_glyph_frame = it->f;
+ last_escape_glyph_face_id = it->face_id;
+ last_escape_glyph_merged_face_id = face_id;
+ }
+ return face_id;
+}
+
+/* Likewise for glyphless glyph face. */
+
+static struct frame *last_glyphless_glyph_frame = NULL;
+static int last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
+static int last_glyphless_glyph_merged_face_id = 0;
+
+int
+merge_glyphless_glyph_face (struct it *it)
+{
+ int face_id;
+
+ if (it->f == last_glyphless_glyph_frame
+ && it->face_id == last_glyphless_glyph_face_id)
+ face_id = last_glyphless_glyph_merged_face_id;
+ else
+ {
+ /* Merge the `glyphless-char' face into the current face. */
+ face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
+ last_glyphless_glyph_frame = it->f;
+ last_glyphless_glyph_face_id = it->face_id;
+ last_glyphless_glyph_merged_face_id = face_id;
+ }
+ return face_id;
+}
+
+/* Load IT's display element fields with information about the next
+ display element from the current position of IT. Value is zero if
+ end of buffer (or C string) is reached. */
static int
get_next_display_element (struct it *it)
g = GLYPH_CODE_CHAR (gc);
lface_id = GLYPH_CODE_FACE (gc);
}
- if (lface_id)
- {
- face_id = merge_faces (it->f, Qt, lface_id, it->face_id);
- }
- else if (it->f == last_escape_glyph_frame
- && it->face_id == last_escape_glyph_face_id)
- {
- face_id = last_escape_glyph_merged_face_id;
- }
- else
- {
- /* Merge the escape-glyph face into the current face. */
- face_id = merge_faces (it->f, Qescape_glyph, 0,
- it->face_id);
- last_escape_glyph_frame = it->f;
- last_escape_glyph_face_id = it->face_id;
- last_escape_glyph_merged_face_id = face_id;
- }
+
+ face_id = (lface_id
+ ? merge_faces (it->f, Qt, lface_id, it->face_id)
+ : merge_escape_glyph_face (it));
XSETINT (it->ctl_chars[0], g);
XSETINT (it->ctl_chars[1], c ^ 0100);
escape_glyph = GLYPH_CODE_CHAR (gc);
lface_id = GLYPH_CODE_FACE (gc);
}
- if (lface_id)
- {
- /* The display table specified a face.
- Merge it into face_id and also into escape_glyph. */
- face_id = merge_faces (it->f, Qt, lface_id,
- it->face_id);
- }
- else if (it->f == last_escape_glyph_frame
- && it->face_id == last_escape_glyph_face_id)
- {
- face_id = last_escape_glyph_merged_face_id;
- }
- else
- {
- /* Merge the escape-glyph face into the current face. */
- face_id = merge_faces (it->f, Qescape_glyph, 0,
- it->face_id);
- last_escape_glyph_frame = it->f;
- last_escape_glyph_face_id = it->face_id;
- last_escape_glyph_merged_face_id = face_id;
- }
+
+ face_id = (lface_id
+ ? merge_faces (it->f, Qt, lface_id, it->face_id)
+ : merge_escape_glyph_face (it));
/* Draw non-ASCII hyphen with just highlighting: */
if (FRAME_VISIBLE_P (f) && FRAME_GARBAGED_P (f))
{
if (f->resized_p)
- {
- redraw_frame (f);
- f->force_flush_display_p = 1;
- }
- clear_current_matrices (f);
+ redraw_frame (f);
+ else
+ clear_current_matrices (f);
changed_count++;
f->garbaged = 0;
f->resized_p = 0;
Can do with a display update of the echo area,
unless we displayed some mode lines. */
update_single_window (w, 1);
- FRAME_RIF (f)->flush_display (f);
+ flush_frame (f);
}
else
update_frame (f, 1, 1);
return hooks_run;
}
-
-\f
-/***********************************************************************
- Output Cursor
- ***********************************************************************/
-
-#ifdef HAVE_WINDOW_SYSTEM
-
-/* EXPORT:
- Nominal cursor position -- where to draw output.
- HPOS and VPOS are window relative glyph matrix coordinates.
- X and Y are window relative pixel coordinates. */
-
-struct cursor_pos output_cursor;
-
-
-/* EXPORT:
- Set the global variable output_cursor to CURSOR. All cursor
- positions are relative to currently updated window. */
-
-void
-set_output_cursor (struct cursor_pos *cursor)
-{
- output_cursor.hpos = cursor->hpos;
- output_cursor.vpos = cursor->vpos;
- output_cursor.x = cursor->x;
- output_cursor.y = cursor->y;
-}
-
-
-/* EXPORT for RIF:
- Set a nominal cursor position.
-
- HPOS and VPOS are column/row positions in a window glyph matrix.
- X and Y are window text area relative pixel positions.
-
- This is always done during window update, so the position is the
- future output cursor position for currently updated window W.
- NOTE: W is used only to check whether this function is called
- in a consistent manner via the redisplay interface. */
-
-void
-x_cursor_to (struct window *w, int vpos, int hpos, int y, int x)
-{
- eassert (w);
-
- /* Set the output cursor. */
- output_cursor.hpos = hpos;
- output_cursor.vpos = vpos;
- output_cursor.x = x;
- output_cursor.y = y;
-}
-
-#endif /* HAVE_WINDOW_SYSTEM */
-
-\f
/***********************************************************************
Tool-bars
***********************************************************************/
if (WINDOW_TOTAL_LINES (w) != old_height)
{
clear_glyph_matrix (w->desired_matrix);
- fonts_changed_p = 1;
+ f->fonts_changed = 1;
return 1;
}
}
{
clear_glyph_matrix (w->desired_matrix);
f->n_tool_bar_rows = nrows;
- fonts_changed_p = 1;
+ f->fonts_changed = 1;
return 1;
}
}
last_glyphless_glyph_frame = NULL;
last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
- /* If new fonts have been loaded that make a glyph matrix adjustment
- necessary, do it. */
- if (fonts_changed_p)
- {
- adjust_glyphs (NULL);
- ++windows_or_buffers_changed;
- fonts_changed_p = 0;
- }
-
/* If face_change_count is non-zero, init_iterator will free all
realized faces, which includes the faces referenced from current
matrices. So, we can't reuse current matrices in this case. */
struct frame *f = XFRAME (frame);
if (FRAME_VISIBLE_P (f))
- ++number_of_visible_frames;
+ {
+ ++number_of_visible_frames;
+ /* Adjust matrices for visible frames only. */
+ if (f->fonts_changed)
+ {
+ adjust_frame_glyphs (f);
+ f->fonts_changed = 0;
+ }
+ /* If cursor type has been changed on the frame
+ other than selected, consider all frames. */
+ if (f != sf && f->cursor_type_changed)
+ update_mode_lines++;
+ }
clear_desired_matrices (f);
}
}
consider_all_windows_p = (update_mode_lines
- || buffer_shared_and_changed ()
- || cursor_type_changed);
+ || buffer_shared_and_changed ());
/* If specs for an arrow have changed, do thorough redisplay
to ensure we remove any arrow that should no longer exist. */
if (!display_last_displayed_message_p)
message_cleared_p = 0;
- if (fonts_changed_p)
- goto retry;
- else if (window_height_changed_p)
+ if (window_height_changed_p)
{
consider_all_windows_p = 1;
++update_mode_lines;
&& !current_buffer->prevent_redisplay_optimizations_p
&& FRAME_VISIBLE_P (XFRAME (w->frame))
&& !FRAME_OBSCURED_P (XFRAME (w->frame))
+ && !XFRAME (w->frame)->cursor_type_changed
/* Make sure recorded data applies to current buffer, etc. */
&& this_line_buffer == current_buffer
&& match_p
&& !EQ (FRAME_TTY (f)->top_frame, frame))
continue;
+ retry_frame:
+
if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf)
{
/* Mark all the scroll bars to be removed; we'll redeem
if (FRAME_TERMINAL (f)->judge_scroll_bars_hook)
FRAME_TERMINAL (f)->judge_scroll_bars_hook (f);
- /* If fonts changed, display again. */
- /* ??? rms: I suspect it is a mistake to jump all the way
- back to retry here. It should just retry this frame. */
- if (fonts_changed_p)
- goto retry;
-
if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
{
+ /* If fonts changed on visible frame, display again. */
+ if (f->fonts_changed)
+ {
+ adjust_frame_glyphs (f);
+ f->fonts_changed = 0;
+ goto retry_frame;
+ }
+
/* See if we have to hscroll. */
if (!f->already_hscrolled_p)
{
f->already_hscrolled_p = 1;
if (hscroll_windows (f->root_window))
- goto retry;
+ goto retry_frame;
}
/* Prevent various kinds of signals during display
/* Update the display. */
set_window_update_flags (XWINDOW (f->root_window), 1);
pending |= update_frame (f, 0, 0);
+ f->cursor_type_changed = 0;
f->updated_p = 1;
}
}
update:
/* If fonts changed, display again. */
- if (fonts_changed_p)
+ if (sf->fonts_changed)
goto retry;
/* Prevent various kinds of signals during display update.
XWINDOW (selected_window)->must_be_updated_p = 1;
pending = update_frame (sf, 0, 0);
+ sf->cursor_type_changed = 0;
}
/* We may have called echo_area_display at the top of this
{
XWINDOW (mini_window)->must_be_updated_p = 1;
pending |= update_frame (mini_frame, 0, 0);
+ mini_frame->cursor_type_changed = 0;
if (!pending && hscroll_windows (mini_window))
goto retry;
}
update_mode_lines = 0;
windows_or_buffers_changed = 0;
- cursor_type_changed = 0;
}
/* Start SIGIO interrupts coming again. Having them off during the
else
redisplay_internal ();
- if (FRAME_RIF (SELECTED_FRAME ()) != NULL
- && FRAME_RIF (SELECTED_FRAME ())->flush_display_optional)
- FRAME_RIF (SELECTED_FRAME ())->flush_display_optional (NULL);
+ flush_frame (SELECTED_FRAME ());
}
cases. */
&& !update_mode_lines
&& !windows_or_buffers_changed
- && !cursor_type_changed
+ && !f->cursor_type_changed
/* Can't use this case if highlighting a region. When a
region exists, cursor movement has to do more than just
set the cursor. */
/* Redisplay leaf window WINDOW. JUST_THIS_ONE_P non-zero means only
selected_window is redisplayed.
- We can return without actually redisplaying the window if
- fonts_changed_p. In that case, redisplay_internal will
- retry. */
+ We can return without actually redisplaying the window if fonts has been
+ changed on window's frame. In that case, redisplay_internal will retry. */
static void
redisplay_window (Lisp_Object window, int just_this_one_p)
debug_method_add (w, "try_window_id %d", tem);
#endif
- if (fonts_changed_p)
+ if (f->fonts_changed)
goto need_larger_matrices;
if (tem > 0)
goto done;
IF_DEBUG (debug_method_add (w, "1"));
if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0)
/* -1 means we need to scroll.
- 0 means we need new matrices, but fonts_changed_p
+ 0 means we need new matrices, but fonts_changed
is set in that case, so we will detect it below. */
goto try_to_scroll;
}
- if (fonts_changed_p)
+ if (f->fonts_changed)
goto need_larger_matrices;
if (w->cursor.vpos >= 0)
/* Redisplay the window. */
if (!current_matrix_up_to_date_p
|| windows_or_buffers_changed
- || cursor_type_changed
+ || f->cursor_type_changed
/* Don't use try_window_reusing_current_matrix in this case
because it can have changed the buffer. */
|| !NILP (Vwindow_scroll_functions)
/* If new fonts have been loaded (due to fontsets), give up. We
have to start a new redisplay since we need to re-adjust glyph
matrices. */
- if (fonts_changed_p)
+ if (f->fonts_changed)
goto need_larger_matrices;
/* If cursor did not appear assume that the middle of the window is
if (WINDOW_WANTS_MODELINE_P (w)
&& CURRENT_MODE_LINE_HEIGHT (w) != DESIRED_MODE_LINE_HEIGHT (w))
{
- fonts_changed_p = 1;
+ f->fonts_changed = 1;
+ w->mode_line_height = -1;
MATRIX_MODE_LINE_ROW (w->current_matrix)->height
= DESIRED_MODE_LINE_HEIGHT (w);
}
if (WINDOW_WANTS_HEADER_LINE_P (w)
&& CURRENT_HEADER_LINE_HEIGHT (w) != DESIRED_HEADER_LINE_HEIGHT (w))
{
- fonts_changed_p = 1;
+ f->fonts_changed = 1;
+ w->header_line_height = -1;
MATRIX_HEADER_LINE_ROW (w->current_matrix)->height
= DESIRED_HEADER_LINE_HEIGHT (w);
}
- if (fonts_changed_p)
+ if (f->fonts_changed)
goto need_larger_matrices;
}
}
#endif /* HAVE_WINDOW_SYSTEM */
- /* We go to this label, with fonts_changed_p set,
- if it is necessary to try again using larger glyph matrices.
+ /* We go to this label, with fonts_changed set, if it is
+ necessary to try again using larger glyph matrices.
We have to redeem the scroll bar even in this case,
because the loop in redisplay_internal expects that. */
need_larger_matrices:
{
if (display_line (&it))
last_text_row = it.glyph_row - 1;
- if (fonts_changed_p && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE))
+ if (f->fonts_changed && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE))
return 0;
}
#ifdef HAVE_XWIDGETS_xxx
/* Don't try to reuse the display if windows have been split
or such. */
|| windows_or_buffers_changed
- || cursor_type_changed)
+ || f->cursor_type_changed)
return 0;
/* Can't do this if region may have changed. */
w->cursor.vpos = -1;
last_text_row = last_reused_text_row = NULL;
- while (it.current_y < it.last_visible_y
- && !fonts_changed_p)
+ while (it.current_y < it.last_visible_y && !f->fonts_changed)
{
/* If we have reached into the characters in the START row,
that means the line boundaries have changed. So we
if (pt_row == NULL)
w->cursor.vpos = -1;
last_text_row = NULL;
- while (it.current_y < it.last_visible_y && !fonts_changed_p)
+ while (it.current_y < it.last_visible_y && !f->fonts_changed)
if (display_line (&it))
last_text_row = it.glyph_row - 1;
GIVE_UP (1);
/* This flag is used to prevent redisplay optimizations. */
- if (windows_or_buffers_changed || cursor_type_changed)
+ if (windows_or_buffers_changed || f->cursor_type_changed)
GIVE_UP (2);
/* Verify that narrowing has not changed.
last_text_row = NULL;
overlay_arrow_seen = 0;
while (it.current_y < it.last_visible_y
- && !fonts_changed_p
+ && !f->fonts_changed
&& (first_unchanged_at_end_row == NULL
|| IT_CHARPOS (it) < stop_pos))
{
last_text_row = it.glyph_row - 1;
}
- if (fonts_changed_p)
+ if (f->fonts_changed)
return -1;
/* Display the rest of the lines at the window end. */
it.glyph_row = MATRIX_ROW (desired_matrix, it.vpos);
- while (it.current_y < it.last_visible_y
- && !fonts_changed_p)
+ while (it.current_y < it.last_visible_y && !f->fonts_changed)
{
/* Is it always sure that the display agrees with lines in
the current matrix? I don't think so, so we mark rows
>= it->w->desired_matrix->nrows)
{
it->w->nrows_scale_factor++;
- fonts_changed_p = 1;
+ it->f->fonts_changed = 1;
return 0;
}
{
struct text_pos pt;
- SET_TEXT_POS_FROM_MARKER (pt, w->pointm);
- if (CHARPOS (pt) < BEGV)
- TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE);
- else if (CHARPOS (pt) > (ZV - 1))
- TEMP_SET_PT_BOTH (ZV, ZV_BYTE);
- else
- TEMP_SET_PT_BOTH (CHARPOS (pt), BYTEPOS (pt));
+ CLIP_TEXT_POS_FROM_MARKER (pt, w->pointm);
+ TEMP_SET_PT_BOTH (CHARPOS (pt), BYTEPOS (pt));
}
/* Display mode lines. */
#define IT_EXPAND_MATRIX_WIDTH(it, area) \
{ \
- if (!fonts_changed_p \
+ if (!it->f->fonts_changed \
&& (it->glyph_row->glyphs[area] \
< it->glyph_row->glyphs[area + 1])) \
{ \
it->w->ncols_scale_factor++; \
- fonts_changed_p = 1; \
+ it->f->fonts_changed = 1; \
} \
}
base_height = it->ascent + it->descent;
base_width = font->average_width;
- /* Get a face ID for the glyph by utilizing a cache (the same way as
- done for `escape-glyph' in get_next_display_element). */
- if (it->f == last_glyphless_glyph_frame
- && it->face_id == last_glyphless_glyph_face_id)
- {
- face_id = last_glyphless_glyph_merged_face_id;
- }
- else
- {
- /* Merge the `glyphless-char' face into the current face. */
- face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id);
- last_glyphless_glyph_frame = it->f;
- last_glyphless_glyph_face_id = it->face_id;
- last_glyphless_glyph_merged_face_id = face_id;
- }
+ face_id = merge_glyphless_glyph_face (it);
if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE)
{
/* Write glyphs. */
hpos = start - updated_row->glyphs[updated_area];
- x = draw_glyphs (w, output_cursor.x,
+ x = draw_glyphs (w, w->output_cursor.x,
updated_row, updated_area,
hpos, hpos + len,
DRAW_NORMAL_TEXT, 0);
/* Invalidate old phys cursor if the glyph at its hpos is redrawn. */
if (updated_area == TEXT_AREA
&& w->phys_cursor_on_p
- && w->phys_cursor.vpos == output_cursor.vpos
+ && w->phys_cursor.vpos == w->output_cursor.vpos
&& chpos >= hpos
&& chpos < hpos + len)
w->phys_cursor_on_p = 0;
unblock_input ();
/* Advance the output cursor. */
- output_cursor.hpos += len;
- output_cursor.x = x;
+ w->output_cursor.hpos += len;
+ w->output_cursor.x = x;
}
/* Get the width of the region to shift right. */
shifted_region_width = (window_box_width (w, updated_area)
- - output_cursor.x
+ - w->output_cursor.x
- shift_by_width);
/* Shift right. */
- frame_x = window_box_left (w, updated_area) + output_cursor.x;
- frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, output_cursor.y);
+ frame_x = window_box_left (w, updated_area) + w->output_cursor.x;
+ frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, w->output_cursor.y);
FRAME_RIF (f)->shift_glyphs_for_insert (f, frame_x, frame_y, shifted_region_width,
line_height, shift_by_width);
/* Write the glyphs. */
hpos = start - row->glyphs[updated_area];
- draw_glyphs (w, output_cursor.x, row, updated_area,
+ draw_glyphs (w, w->output_cursor.x, row, updated_area,
hpos, hpos + len,
DRAW_NORMAL_TEXT, 0);
/* Advance the output cursor. */
- output_cursor.hpos += len;
- output_cursor.x += shift_by_width;
+ w->output_cursor.hpos += len;
+ w->output_cursor.x += shift_by_width;
unblock_input ();
}
else
to_x = min (to_x, max_x);
- to_y = min (max_y, output_cursor.y + updated_row->height);
+ to_y = min (max_y, w->output_cursor.y + updated_row->height);
/* Notice if the cursor will be cleared by this operation. */
if (!updated_row->full_width_p)
notice_overwritten_cursor (w, updated_area,
- output_cursor.x, -1,
+ w->output_cursor.x, -1,
updated_row->y,
MATRIX_ROW_BOTTOM_Y (updated_row));
- from_x = output_cursor.x;
+ from_x = w->output_cursor.x;
/* Translate to frame coordinates. */
if (updated_row->full_width_p)
}
min_y = WINDOW_HEADER_LINE_HEIGHT (w);
- from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, output_cursor.y));
+ from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, w->output_cursor.y));
to_y = WINDOW_TO_FRAME_PIXEL_Y (w, to_y);
/* Prevent inadvertently clearing to end of the X window. */
FRAME_BLINK_OFF_CURSOR (f) = DEFAULT_CURSOR;
/* Make sure the cursor gets redrawn. */
- cursor_type_changed = 1;
+ f->cursor_type_changed = 1;
}
{
int x0, x1, y0, y1;
- window_box_edges (w, -1, &x0, &y0, &x1, &y1);
+ window_box_edges (w, &x0, &y0, &x1, &y1);
y1 -= 1;
if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
{
int x0, x1, y0, y1;
- window_box_edges (w, -1, &x0, &y0, &x1, &y1);
+ window_box_edges (w, &x0, &y0, &x1, &y1);
y1 -= 1;
if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
doc: /* Seconds to wait before displaying an hourglass pointer when Emacs is busy. */);
Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY);
+#ifdef HAVE_WINDOW_SYSTEM
hourglass_atimer = NULL;
hourglass_shown_p = 0;
+#endif /* HAVE_WINDOW_SYSTEM */
DEFSYM (Qglyphless_char, "glyphless-char");
DEFSYM (Qhex_code, "hex-code");
void
init_xdisp (void)
{
- current_header_line_height = current_mode_line_height = -1;
-
CHARPOS (this_line_start_pos) = 0;
if (!noninteractive)
help_echo_showing_p = 0;
}
+#ifdef HAVE_WINDOW_SYSTEM
+
/* Platform-independent portion of hourglass implementation. */
/* Cancel a currently active hourglass timer, and start a new one. */
void
start_hourglass (void)
{
-#if defined (HAVE_WINDOW_SYSTEM)
struct timespec delay;
cancel_hourglass ();
hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay,
show_hourglass, NULL);
-#endif
}
void
cancel_hourglass (void)
{
-#if defined (HAVE_WINDOW_SYSTEM)
if (hourglass_atimer)
{
cancel_atimer (hourglass_atimer);
if (hourglass_shown_p)
hide_hourglass ();
-#endif
}
+
+#endif /* HAVE_WINDOW_SYSTEM */
#include "frame.h"
#include "termhooks.h"
-#ifdef HAVE_X_WINDOWS
-#include "xterm.h"
#ifdef USE_MOTIF
#include <Xm/Xm.h>
#include <Xm/XmStrDefs.h>
#endif /* USE_MOTIF */
-#endif /* HAVE_X_WINDOWS */
#ifdef MSDOS
#include "dosfns.h"
#define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO
#define GCGraphicsExposures 0
#endif /* HAVE_NS */
+
+/* Number of pt per inch (from the TeXbook). */
+
+#define PT_PER_INCH 72.27
+
#endif /* HAVE_WINDOW_SYSTEM */
#include "buffer.h"
#include <c-ctype.h>
-/* Number of pt per inch (from the TeXbook). */
-
-#define PT_PER_INCH 72.27
-
/* Non-zero if face attribute ATTR is unspecified. */
#define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified)
static Lisp_Object Qtty_color_alist;
+#ifdef HAVE_WINDOW_SYSTEM
+
/* Counter for calls to clear_face_cache. If this counter reaches
CLEAR_FONT_TABLE_COUNT, and a frame has more than
CLEAR_FONT_TABLE_NFONTS load, unused fonts are freed. */
#define CLEAR_FONT_TABLE_COUNT 100
#define CLEAR_FONT_TABLE_NFONTS 10
+#endif /* HAVE_WINDOW_SYSTEM */
+
/* Non-zero means face attributes have been changed since the last
redisplay. Used in redisplay_internal. */
static int menu_face_changed_default;
-\f
-/* Function prototypes. */
-
-struct table_entry;
struct named_merge_point;
-static void set_font_frame_param (Lisp_Object, Lisp_Object);
static struct face *realize_face (struct face_cache *, Lisp_Object *,
int);
-static struct face *realize_non_ascii_face (struct frame *, Lisp_Object,
- struct face *);
static struct face *realize_x_face (struct face_cache *, Lisp_Object *);
static struct face *realize_tty_face (struct face_cache *, Lisp_Object *);
static bool realize_basic_faces (struct frame *);
static bool realize_default_face (struct frame *);
static void realize_named_face (struct frame *, Lisp_Object, int);
static struct face_cache *make_face_cache (struct frame *);
-static void clear_face_gcs (struct face_cache *);
static void free_face_cache (struct face_cache *);
static int merge_face_ref (struct frame *, Lisp_Object, Lisp_Object *,
int, struct named_merge_point *);
-\f
+#ifdef HAVE_WINDOW_SYSTEM
+static void set_font_frame_param (Lisp_Object, Lisp_Object);
+static void clear_face_gcs (struct face_cache *);
+static struct face *realize_non_ascii_face (struct frame *, Lisp_Object,
+ struct face *);
+#endif /* HAVE_WINDOW_SYSTEM */
+
/***********************************************************************
Utilities
***********************************************************************/
^ XHASH (v[LFACE_HEIGHT_INDEX]));
}
+#ifdef HAVE_WINDOW_SYSTEM
/* Return non-zero if LFACE1 and LFACE2 specify the same font (without
considering charsets/registries). They do if they specify the same
);
}
+#endif /* HAVE_WINDOW_SYSTEM */
-\f
/***********************************************************************
Realized Faces
***********************************************************************/
return c;
}
+#ifdef HAVE_WINDOW_SYSTEM
/* Clear out all graphics contexts for all realized faces, except for
the basic faces. This should be done from time to time just to avoid
{
if (c && FRAME_WINDOW_P (c->f))
{
-#ifdef HAVE_WINDOW_SYSTEM
int i;
for (i = BASIC_FACE_ID_SENTINEL; i < c->used; ++i)
{
unblock_input ();
}
}
-#endif /* HAVE_WINDOW_SYSTEM */
}
}
+#endif /* HAVE_WINDOW_SYSTEM */
/* Free all realized faces in face cache C, including basic faces.
C may be null. If faces are freed, make sure the frame's current
#include <math.h>
#include <unistd.h>
-/* This makes the fields of a Display accessible, in Xlib header files. */
-
-#define XLIB_ILLEGAL_ACCESS
-
#include "lisp.h"
#include "xterm.h"
#include "frame.h"
block_input ();
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- 0, y, width, height, False);
+ 0, y, width, height);
unblock_input ();
}
block_input ();
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- 0, y, width, height, False);
+ 0, y, width, height);
unblock_input ();
}
clear_glyph_matrix (XWINDOW (f->menu_bar_window)->current_matrix);
}
#endif /* not USE_X_TOOLKIT && not USE_GTK */
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
run_window_configuration_change_hook (f);
}
FRAME_TOOL_BAR_LINES (f) = nlines;
resize_frame_windows (f, FRAME_LINES (f), 0);
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
/* We also have to make sure that the internal border at the top of
the frame, below the menu bar or tool bar, is redrawn when the
if (height > 0 && width > 0)
{
block_input ();
- x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- 0, y, width, height, False);
+ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+ 0, y, width, height);
unblock_input ();
}
}
FRAME_TOTAL_COLS (f) = w->total_cols;
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
w->pseudo_window_p = 1;
/* Display the tooltip text in a temporary buffer. */
width /= WINDOW_FRAME_COLUMN_WIDTH (w);
w->total_cols = width;
FRAME_TOTAL_COLS (f) = width;
- adjust_glyphs (f);
+ adjust_frame_glyphs (f);
clear_glyph_matrix (w->desired_matrix);
clear_glyph_matrix (w->current_matrix);
try_window (FRAME_ROOT_WINDOW (f), pos, 0);
#include "frame.h"
int
-xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
+xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds,
struct timespec const *timeout, sigset_t const *sigmask)
{
- SELECT_TYPE all_rfds, all_wfds;
+ fd_set all_rfds, all_wfds;
struct timespec tmo;
struct timespec const *tmop = timeout;
#include "sysselect.h"
extern int xg_select (int max_fds,
- SELECT_TYPE *rfds,
- SELECT_TYPE *wfds,
- SELECT_TYPE *efds,
+ fd_set *rfds, fd_set *wfds, fd_set *efds,
struct timespec const *timeout,
sigset_t const *sigmask);
)
{
struct timespec next_time = timer_check (), *ntp;
- SELECT_TYPE read_fds;
+ fd_set read_fds;
struct x_display_info *dpyinfo;
int n = 0;
int use_xim = 0; /* configure --without-xim */
#endif
-\f
-
/* Non-zero means that a HELP_EVENT has been generated since Emacs
start. */
static bool any_help_event_p;
-/* Last window where we saw the mouse. Used by mouse-autoselect-window. */
-static Lisp_Object last_window;
-
/* This is a chain of structures for all the X displays currently in
use. */
void x_delete_terminal (struct terminal *);
static void x_update_end (struct frame *);
static void XTframe_up_to_date (struct frame *);
-static void XTset_terminal_modes (struct terminal *);
-static void XTreset_terminal_modes (struct terminal *);
static void x_clear_frame (struct frame *);
static _Noreturn void x_ins_del_lines (struct frame *, int, int);
static void frame_highlight (struct frame *);
static void x_draw_bar_cursor (struct window *, struct glyph_row *, int,
enum text_cursor_kinds);
-static void x_clip_to_row (struct window *, struct glyph_row *, int, GC);
+static void x_clip_to_row (struct window *, struct glyph_row *,
+ enum glyph_row_area, GC);
static void x_flush (struct frame *f);
static void x_update_begin (struct frame *);
static void x_update_window_begin (struct window *);
static void x_initialize (void);
-/* Flush display of frame F, or of all frames if F is null. */
+/* Flush display of frame F. */
static void
x_flush (struct frame *f)
{
+ eassert (f && FRAME_X_P (f));
/* Don't call XFlush when it is not safe to redisplay; the X
connection may be broken. */
if (!NILP (Vinhibit_redisplay))
return;
block_input ();
- if (f)
- {
- eassert (FRAME_X_P (f));
- XFlush (FRAME_X_DISPLAY (f));
- }
- else
- {
- /* Flush all displays and so all frames on them. */
- struct x_display_info *xdi;
- for (xdi = x_display_list; xdi; xdi = xdi->next)
- XFlush (xdi->display);
- }
+ XFlush (FRAME_X_DISPLAY (f));
unblock_input ();
}
}
-/* Start update of window W. Set output_cursor to the cursor
- position of W. */
+/* Start update of window W. */
static void
x_update_window_begin (struct window *w)
struct frame *f = XFRAME (WINDOW_FRAME (w));
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
- set_output_cursor (&w->cursor);
+ w->output_cursor = w->cursor;
block_input ();
block_input ();
if (cursor_on_p)
- display_and_set_cursor (w, 1, output_cursor.hpos,
- output_cursor.vpos,
- output_cursor.x, output_cursor.y);
+ display_and_set_cursor (w, 1,
+ w->output_cursor.hpos, w->output_cursor.vpos,
+ w->output_cursor.x, w->output_cursor.y);
if (draw_window_fringes (w, 1))
x_draw_vertical_border (w);
block_input ();
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- 0, y, width, height, False);
+ 0, y, width, height);
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
FRAME_PIXEL_WIDTH (f) - width,
- y, width, height, False);
+ y, width, height);
unblock_input ();
}
}
struct face *face = p->face;
/* Must clip because of partially visible lines. */
- x_clip_to_row (w, row, -1, gc);
+ x_clip_to_row (w, row, ANY_AREA, gc);
if (!p->overlay_p)
{
XSetClipMask (display, gc, None);
}
-\f
-
-/* This is called when starting Emacs and when restarting after
- suspend. When starting Emacs, no X window is mapped. And nothing
- must be done to Emacs's own window if it is suspended (though that
- rarely happens). */
-
-static void
-XTset_terminal_modes (struct terminal *terminal)
-{
-}
-
-/* This is called when exiting or suspending Emacs. Exiting will make
- the X-windows go away, and suspending requires no action. */
-
-static void
-XTreset_terminal_modes (struct terminal *terminal)
-{
-}
-
-\f
/***********************************************************************
Glyph display
***********************************************************************/
If they are <= 0, this is probably an error. */
void
-x_clear_area (Display *dpy, Window window, int x, int y, int width, int height, int exposures)
+x_clear_area (Display *dpy, Window window, int x, int y, int width, int height)
{
eassert (width > 0 && height > 0);
- XClearArea (dpy, window, x, y, width, height, exposures);
+ XClearArea (dpy, window, x, y, width, height, False);
}
/* Clearing the frame will erase any cursor, so mark them all as no
longer visible. */
mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f)));
- output_cursor.hpos = output_cursor.vpos = 0;
- output_cursor.x = -1;
- /* We don't set the output cursor here because there will always
- follow an explicit cursor_to. */
block_input ();
XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
}
}
-\f
-/* Specify how many text lines, from the top of the window,
- should be affected by insert-lines and delete-lines operations.
- This, and those operations, are used only within an update
- that is bounded by calls to x_update_begin and x_update_end. */
-
-static void
-XTset_terminal_window (struct frame *f, int n)
-{
- /* This function intentionally left blank. */
-}
-
-
-\f
/***********************************************************************
Line Dance
***********************************************************************/
/* Get frame-relative bounding box of the text display area of W,
without mode lines. Include in this box the left and right
fringe of W. */
- window_box (w, -1, &x, &y, &width, &height);
+ window_box (w, ANY_AREA, &x, &y, &width, &height);
#ifdef USE_TOOLKIT_SCROLL_BARS
/* If the fringe is adjacent to the left (right) scroll bar of a
return Qnil;
}
-\f
/* Function to report a mouse movement to the mainstream Emacs code.
The input handler calls this.
scroll_bar_end_scroll, 0, 0);
w = XWINDOW (window_being_scrolled);
- if (!NILP (XSCROLL_BAR (w->vertical_scroll_bar)->dragging))
+ if (XSCROLL_BAR (w->vertical_scroll_bar)->dragging != -1)
{
- XSCROLL_BAR (w->vertical_scroll_bar)->dragging = Qnil;
+ XSCROLL_BAR (w->vertical_scroll_bar)->dragging = -1;
/* The thumb size is incorrect while dragging: fix it. */
set_vertical_scroll_bar (w);
}
switch (cs->reason)
{
case XmCR_DECREMENT:
- bar->dragging = Qnil;
+ bar->dragging = -1;
part = scroll_bar_up_arrow;
break;
case XmCR_INCREMENT:
- bar->dragging = Qnil;
+ bar->dragging = -1;
part = scroll_bar_down_arrow;
break;
case XmCR_PAGE_DECREMENT:
- bar->dragging = Qnil;
+ bar->dragging = -1;
part = scroll_bar_above_handle;
break;
case XmCR_PAGE_INCREMENT:
- bar->dragging = Qnil;
+ bar->dragging = -1;
part = scroll_bar_below_handle;
break;
case XmCR_TO_TOP:
- bar->dragging = Qnil;
+ bar->dragging = -1;
part = scroll_bar_to_top;
break;
case XmCR_TO_BOTTOM:
- bar->dragging = Qnil;
+ bar->dragging = -1;
part = scroll_bar_to_bottom;
break;
whole = XM_SB_MAX - slider_size;
portion = min (cs->value, whole);
part = scroll_bar_handle;
- bar->dragging = make_number (cs->value);
+ bar->dragging = cs->value;
}
break;
whole = gtk_adjustment_get_upper (adj) -
gtk_adjustment_get_page_size (adj);
portion = min ((int)position, whole);
- bar->dragging = make_number ((int)portion);
+ bar->dragging = portion;
}
break;
case GTK_SCROLL_STEP_BACKWARD:
part = scroll_bar_up_arrow;
- bar->dragging = Qnil;
+ bar->dragging = -1;
break;
case GTK_SCROLL_STEP_FORWARD:
part = scroll_bar_down_arrow;
- bar->dragging = Qnil;
+ bar->dragging = -1;
break;
case GTK_SCROLL_PAGE_BACKWARD:
part = scroll_bar_above_handle;
- bar->dragging = Qnil;
+ bar->dragging = -1;
break;
case GTK_SCROLL_PAGE_FORWARD:
part = scroll_bar_below_handle;
- bar->dragging = Qnil;
+ bar->dragging = -1;
break;
}
return FALSE;
}
-/* Callback for button release. Sets dragging to Qnil when dragging is done. */
+/* Callback for button release. Sets dragging to -1 when dragging is done. */
static gboolean
xg_end_scroll_callback (GtkWidget *widget,
gpointer user_data)
{
struct scroll_bar *bar = user_data;
- bar->dragging = Qnil;
+ bar->dragging = -1;
if (WINDOWP (window_being_scrolled))
{
x_send_scroll_bar_event (window_being_scrolled,
part = scroll_bar_handle;
window_being_scrolled = bar->window;
- bar->dragging = make_number (portion);
+ bar->dragging = portion;
last_scroll_bar_part = part;
x_send_scroll_bar_event (bar->window, part, portion, whole);
}
part = scroll_bar_move_ratio;
window_being_scrolled = bar->window;
- bar->dragging = Qnil;
+ bar->dragging = -1;
last_scroll_bar_part = part;
x_send_scroll_bar_event (bar->window, part, position, height);
}
shown = (float) portion / whole;
}
- if (NILP (bar->dragging))
+ if (bar->dragging == -1)
{
int size, value;
NULL);
/* Massage the top+shown values. */
- if (NILP (bar->dragging) || last_scroll_bar_part == scroll_bar_down_arrow)
+ if (bar->dragging == -1 || last_scroll_bar_part == scroll_bar_down_arrow)
top = max (0, min (1, top));
else
top = old_top;
for `NARROWPROTO'. See s/freebsd.h for an example. */
if (top != old_top || shown != old_shown)
{
- if (NILP (bar->dragging))
+ if (bar->dragging == -1)
XawScrollbarSetThumb (widget, top, shown);
else
{
this case, no clear_frame is generated to reduce flickering. */
if (width > 0 && height > 0)
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- left, top, width,
- window_box_height (w), False);
+ left, top, width, window_box_height (w));
window = XCreateWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
/* Position and size of scroll bar. */
bar->height = height;
bar->start = 0;
bar->end = 0;
- bar->dragging = Qnil;
+ bar->dragging = -1;
bar->fringe_extended_p = 0;
/* Add bar to its frame's list of scroll bars. */
static void
x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild)
{
- int dragging = ! NILP (bar->dragging);
+ bool dragging = bar->dragging != -1;
Window w = bar->x_window;
struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
GC gc = f->output_data.x->normal_gc;
zero-height areas; that means "clear to end of window." */
if (start > 0)
x_clear_area (FRAME_X_DISPLAY (f), w,
- /* x, y, width, height, and exposures. */
VERTICAL_SCROLL_BAR_LEFT_BORDER,
VERTICAL_SCROLL_BAR_TOP_BORDER,
- inside_width, start,
- False);
+ inside_width, start);
/* Change to proper foreground color if one is specified. */
if (f->output_data.x->scroll_bar_foreground_pixel != -1)
clear zero-height areas; that means "clear to end of window." */
if (end < inside_height)
x_clear_area (FRAME_X_DISPLAY (f), w,
- /* x, y, width, height, and exposures. */
VERTICAL_SCROLL_BAR_LEFT_BORDER,
VERTICAL_SCROLL_BAR_TOP_BORDER + end,
- inside_width, inside_height - end,
- False);
-
+ inside_width, inside_height - end);
}
unblock_input ();
#endif
/* Get window dimensions. */
- window_box (w, -1, 0, &window_y, 0, &window_height);
+ window_box (w, ANY_AREA, 0, &window_y, 0, &window_height);
top = window_y;
width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f);
height = window_height;
#ifdef USE_TOOLKIT_SCROLL_BARS
if (fringe_extended_p)
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- sb_left, top, sb_width, height, False);
+ sb_left, top, sb_width, height);
else
#endif
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- left, top, width, height, False);
+ left, top, width, height);
unblock_input ();
}
{
if (fringe_extended_p)
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- sb_left, top, sb_width, height, False);
+ sb_left, top, sb_width, height);
else
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- left, top, width, height, False);
+ left, top, width, height);
}
#ifdef USE_GTK
xg_update_scrollbar_pos (f,
if (VERTICAL_SCROLL_BAR_WIDTH_TRIM)
{
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM,
- height, False);
+ left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, height);
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
left + width - VERTICAL_SCROLL_BAR_WIDTH_TRIM,
- top, VERTICAL_SCROLL_BAR_WIDTH_TRIM,
- height, False);
+ top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, height);
}
/* Clear areas not covered by the scroll bar because it's not as
{
if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- left + area_width - rest, top,
- rest, height, False);
+ left + area_width - rest, top, rest, height);
else
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- left, top, rest, height, False);
+ left, top, rest, height);
}
}
#else /* not USE_TOOLKIT_SCROLL_BARS */
/* Set the scroll bar's current state, unless we're currently being
dragged. */
- if (NILP (bar->dragging))
+ if (bar->dragging == -1)
{
int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, height);
#ifndef USE_TOOLKIT_SCROLL_BARS
/* If the user has released the handle, set it to its final position. */
- if (event->type == ButtonRelease
- && ! NILP (bar->dragging))
+ if (event->type == ButtonRelease && bar->dragging != -1)
{
- int new_start = y - XINT (bar->dragging);
+ int new_start = y - bar->dragging;
int new_end = new_start + bar->end - bar->start;
x_scroll_bar_set_handle (bar, new_start, new_end, 0);
- bar->dragging = Qnil;
+ bar->dragging = -1;
}
#endif
mark bits. */
static void
-x_scroll_bar_note_movement (struct scroll_bar *bar, XEvent *event)
+x_scroll_bar_note_movement (struct scroll_bar *bar, XMotionEvent *event)
{
struct frame *f = XFRAME (XWINDOW (bar->window)->frame);
- last_mouse_movement_time = event->xmotion.time;
+ last_mouse_movement_time = event->time;
f->mouse_moved = 1;
XSETVECTOR (last_mouse_scroll_bar, bar);
/* If we're dragging the bar, display it. */
- if (! NILP (bar->dragging))
+ if (bar->dragging != -1)
{
/* Where should the handle be now? */
- int new_start = event->xmotion.y - XINT (bar->dragging);
+ int new_start = event->y - bar->dragging;
if (new_start != bar->start)
{
win_y -= VERTICAL_SCROLL_BAR_TOP_BORDER;
- if (! NILP (bar->dragging))
- win_y -= XINT (bar->dragging);
+ if (bar->dragging != -1)
+ win_y -= bar->dragging;
if (win_y < 0)
win_y = 0;
*fp = f;
*bar_window = bar->window;
- if (! NILP (bar->dragging))
+ if (bar->dragging != -1)
*part = scroll_bar_handle;
else if (win_y < bar->start)
*part = scroll_bar_above_handle;
#endif /* not USE_TOOLKIT_SCROLL_BARS */
}
-\f
-/* The main X event-reading loop - XTread_socket. */
-
-/* This holds the state XLookupString needs to implement dead keys
- and other tricks known as "compose processing". _X Window System_
- says that a portable program can't use this, but Stephen Gildea assures
- me that letting the compiler initialize it to zeros will work okay.
-
- This must be defined outside of XTread_socket, for the same reasons
- given for enter_timestamp, above. */
-
-static XComposeStatus compose_status;
+#ifdef ENABLE_CHECKING
/* Record the last 100 characters stored
to help debug the loss-of-chars-during-GC problem. */
temp_index = 0; \
temp_buffer[temp_index++] = (keysym)
+#else /* not ENABLE_CHECKING */
+
+#define STORE_KEYSYM_FOR_DEBUG(keysym) ((void)0)
+
+#endif /* ENABLE_CHECKING */
+
/* Set this to nonzero to fake an "X I/O error"
on a particular display. */
struct coding_system coding;
XEvent event = *eventptr;
Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight;
+ /* This holds the state XLookupString needs to implement dead keys
+ and other tricks known as "compose processing". _X Window System_
+ says that a portable program can't use this, but Stephen Gildea assures
+ me that letting the compiler initialize it to zeros will work okay. */
+ static XComposeStatus compose_status;
+
USE_SAFE_ALLOCA;
*finish = X_EVENT_NORMAL;
{
#ifdef USE_GTK
/* This seems to be needed for GTK 2.6. */
- x_clear_area (event.xexpose.display,
- event.xexpose.window,
- event.xexpose.x, event.xexpose.y,
- event.xexpose.width, event.xexpose.height,
- FALSE);
+ x_clear_area (event.xexpose.display,
+ event.xexpose.window,
+ event.xexpose.x, event.xexpose.y,
+ event.xexpose.width, event.xexpose.height);
#endif
if (!FRAME_VISIBLE_P (f))
{
case UnmapNotify:
/* Redo the mouse-highlight after the tooltip has gone. */
- if (event.xmap.window == tip_window)
+ if (event.xunmap.window == tip_window)
{
tip_window = 0;
redo_mouse_highlight ();
/* Generate SELECT_WINDOW_EVENTs when needed.
Don't let popup menus influence things (bug#1261). */
if (!NILP (Vmouse_autoselect_window) && !popup_activated ())
- {
- Lisp_Object window;
-
- window = window_from_coordinates (f,
- event.xmotion.x, event.xmotion.y,
- 0, 0);
-
- /* Window will be selected only when it is not selected now and
- last mouse movement event was not in it. Minibuffer window
- will be selected only when it is active. */
- if (WINDOWP (window)
- && !EQ (window, last_window)
+ {
+ static Lisp_Object last_mouse_window;
+ Lisp_Object window = window_from_coordinates
+ (f, event.xmotion.x, event.xmotion.y, 0, 0);
+
+ /* Window will be selected only when it is not selected now and
+ last mouse movement event was not in it. Minibuffer window
+ will be selected only when it is active. */
+ if (WINDOWP (window)
+ && !EQ (window, last_mouse_window)
&& !EQ (window, selected_window)
/* For click-to-focus window managers
create event iff we don't leave the
&& (focus_follows_mouse
|| (EQ (XWINDOW (window)->frame,
XWINDOW (selected_window)->frame))))
- {
- inev.ie.kind = SELECT_WINDOW_EVENT;
- inev.ie.frame_or_window = window;
- }
-
- last_window=window;
- }
+ {
+ inev.ie.kind = SELECT_WINDOW_EVENT;
+ inev.ie.frame_or_window = window;
+ }
+ /* Remember the last window where we saw the mouse. */
+ last_mouse_window = window;
+ }
if (!note_mouse_movement (f, &event.xmotion))
help_echo_string = previous_help_echo_string;
}
event.xmotion.window);
if (bar)
- x_scroll_bar_note_movement (bar, &event);
+ x_scroll_bar_note_movement (bar, &event.xmotion);
#endif /* USE_TOOLKIT_SCROLL_BARS */
/* If we move outside the frame, then we're
mode lines must be clipped to the whole window. */
static void
-x_clip_to_row (struct window *w, struct glyph_row *row, int area, GC gc)
+x_clip_to_row (struct window *w, struct glyph_row *row,
+ enum glyph_row_area area, GC gc)
{
struct frame *f = XFRAME (WINDOW_FRAME (w));
XRectangle clip_rect;
static void
x_clear_frame_area (struct frame *f, int x, int y, int width, int height)
{
- x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- x, y, width, height, False);
+ x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), x, y, width, height);
#ifdef USE_GTK
/* Must queue a redraw, because scroll bars might have been cleared. */
if (FRAME_GTK_WIDGET (f))
#endif
}
-#ifndef XFlush
XFlush (FRAME_X_DISPLAY (f));
-#endif
}
\f
if (change_gravity > 0)
{
- FRAME_X_OUTPUT (f)->left_before_move = f->left_pos;
- FRAME_X_OUTPUT (f)->top_before_move = f->top_pos;
-
f->top_pos = yoff;
f->left_pos = xoff;
f->size_hint_flags &= ~ (XNegative | YNegative);
{
int level = interrupt_input_blocked;
- SELECT_TYPE fds;
+ fd_set fds;
struct timespec tmo, tmo_at, time_now;
int fd = ConnectionNumber (FRAME_X_DISPLAY (f));
dpyinfo->x_dnd_atoms_size = 8;
dpyinfo->x_dnd_atoms = xmalloc (sizeof *dpyinfo->x_dnd_atoms
* dpyinfo->x_dnd_atoms_size);
-
- connection = ConnectionNumber (dpyinfo->display);
- dpyinfo->connection = connection;
dpyinfo->gray
= XCreatePixmapFromBitmapData (dpyinfo->display, dpyinfo->root_window,
gray_bits, gray_width, gray_height,
xsettings_initialize (dpyinfo);
+ connection = ConnectionNumber (dpyinfo->display);
+
/* This is only needed for distinguishing keyboard and process input. */
if (connection != 0)
add_keyboard_wait_descriptor (connection);
break;
}
- delete_keyboard_wait_descriptor (dpyinfo->connection);
-
/* Discard this display from x_display_name_list and x_display_list.
We can't use Fdelq because that can quit. */
if (! NILP (x_display_name_list)
x_after_update_window_line,
x_update_window_begin,
x_update_window_end,
- x_cursor_to,
- x_flush,
-#ifdef XFlush
x_flush,
-#else
- 0, /* flush_display_optional */
-#endif
x_clear_window_mouse_face,
x_get_glyph_overhangs,
x_fix_overlapping_area,
x_delete_terminal (struct terminal *terminal)
{
struct x_display_info *dpyinfo = terminal->display_info.x;
+ int connection = -1;
/* Protect against recursive calls. delete_frame in
delete_terminal calls us back when it deletes our last frame. */
and dpyinfo->display was set to 0 to indicate that. */
if (dpyinfo->display)
{
+ connection = ConnectionNumber (dpyinfo->display);
+
x_destroy_all_bitmaps (dpyinfo);
XSetCloseDownMode (dpyinfo->display, DestroyAll);
#endif /* ! USE_GTK */
}
+ /* No more input on this descriptor. */
+ if (connection != -1)
+ delete_keyboard_wait_descriptor (connection);
+
/* Mark as dead. */
dpyinfo->display = NULL;
x_delete_display (dpyinfo);
terminal->delete_glyphs_hook = x_delete_glyphs;
terminal->ring_bell_hook = XTring_bell;
terminal->toggle_invisible_pointer_hook = XTtoggle_invisible_pointer;
- terminal->reset_terminal_modes_hook = XTreset_terminal_modes;
- terminal->set_terminal_modes_hook = XTset_terminal_modes;
+ terminal->reset_terminal_modes_hook = NULL;
+ terminal->set_terminal_modes_hook = NULL;
terminal->update_begin_hook = x_update_begin;
terminal->update_end_hook = x_update_end;
- terminal->set_terminal_window_hook = XTset_terminal_window;
+ terminal->set_terminal_window_hook = NULL;
terminal->read_socket_hook = XTread_socket;
terminal->frame_up_to_date_hook = XTframe_up_to_date;
terminal->mouse_position_hook = XTmouse_position;
#ifndef XTERM_H
#define XTERM_H
-#include "dispextern.h"
-
#include <X11/Xlib.h>
#include <X11/cursorfont.h>
#define USE_GTK_TOOLTIP
#endif
-\f
-/* Bookkeeping to distinguish X versions. */
-
-
#ifdef HAVE_X_I18N
#include <X11/Xlocale.h>
#endif
-\f
+
+#include "dispextern.h"
+#include "termhooks.h"
+
#define BLACK_PIX_DEFAULT(f) BlackPixel (FRAME_X_DISPLAY (f), \
XScreenNumberOfScreen (FRAME_X_SCREEN (f)))
#define WHITE_PIX_DEFAULT(f) WhitePixel (FRAME_X_DISPLAY (f), \
/* The generic display parameters corresponding to this X display. */
struct terminal *terminal;
- /* Connection number (normally a file descriptor number). */
- int connection;
-
/* This says how to access this display in Xlib. */
Display *display;
extern void select_visual (struct x_display_info *);
-\f
-struct font;
-
/* Each X frame object points to its own struct x_output object
in the output_data.x field. The x_output structure contains
the information that is specific to X windows. */
int move_offset_top;
int move_offset_left;
- /* The frame's left/top offsets before we call XMoveWindow. See
- x_check_expected_move. */
- int left_before_move;
- int top_before_move;
-
/* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame. */
unsigned net_wm_state_hidden_seen : 1;
};
/* If the scroll bar handle is currently being dragged by the user,
this is the number of pixels from the top of the handle to the
place where the user grabbed it. If the handle isn't currently
- being dragged, this is Qnil. */
- Lisp_Object dragging;
+ being dragged, this is -1. */
+ int dragging;
/* 1 if the background of the fringe that is adjacent to a scroll
bar is extended to the gap between the fringe and the bar. */
#define SELECTION_EVENT_TIME(eventp) \
(((struct selection_input_event *) (eventp))->time)
-\f
-struct window;
-struct glyph_matrix;
-struct frame;
-struct input_event;
-struct face;
-struct image;
-
/* From xselect.c. */
void x_handle_selection_notify (XSelectionEvent *);
#endif
extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *);
extern void x_query_color (struct frame *f, XColor *);
-extern void x_clear_area (Display *, Window, int, int, int, int, int);
+extern void x_clear_area (Display *, Window, int, int, int, int);
#if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK
extern void x_mouse_leave (struct x_display_info *);
#endif
+2013-09-01 Glenn Morris <rgm@gnu.org>
+
+ * automated/Makefile.in (setwins): Avoid leading space in $wins.
+ Otherwise the sed command used by eg compile-main ends up
+ containing "/*.el". (Bug#15170)
+
+2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
+ for portability to hosts where /bin/sh has problems.
+
2013-08-21 David Engster <deng@randomsample.de>
* automated/eieio-tests.el, automated/eieio-test-persist.el:
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-SHELL = /bin/sh
+SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
setwins=subdirs=`find . -type d -print`; \
for file in $$subdirs; do \
case $$file in */.* | */.*/* | */=* | ./data* ) ;; \
- *) wins="$$wins $$file" ;; \
+ *) wins="$$wins$${wins:+ }$$file" ;; \
esac; \
done
-;;; eieio-testsinvoke.el -- eieio tests for method invokation
+;;; eieio-testsinvoke.el -- eieio tests for method invocation
;; Copyright (C) 2005, 2008, 2010, 2013 Free Software Foundation, Inc.
(setq eieio-test-method-order-list (nreverse eieio-test-method-order-list))
(eieio-test-match ans)))
-;;; Test static invokation
+;;; Test static invocation
;;
(defmethod eitest-H :STATIC ((class eitest-A))
"No need to do work in here."
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
-;;
+;;
;; Test the various features of EIEIO.
(require 'ert)
:initform moose
:type symbol
:allocation :instance
- :documentation "Fisrt slot testing slot arguments."
+ :documentation "First slot testing slot arguments."
:custom symbol
:label "Wild Animal"
:group borg
(defun anormalfunction () "A plain function for error testing." nil)
(should-error
(progn
- (defgeneric anormalfunction ()
+ (defgeneric anormalfunction ()
"Attempt to turn it into a generic.")))
;; Check that generic-p works
;;; HACK ALERT: The new value of a class slot is inherited by the
;; subclass! This is probably a bug. We should either share the slot
;; so sets on the baseclass change the subclass, or we should inherit
- ;; the original value.
+ ;; the original value.
;; (should (eq (get-slot-3 eitest-t2) 'emu))
;; (should (eq (get-slot-3 class-subc) 'emu))
;; (setf (get-slot-3 eitest-t2) 'setf-emu)
"Try to access slot-2 from this class which doesn't have it.
The object S2 passed in will be of class prot-1, which does have
the slot. This could be allowed, and currently is in EIEIO.
-Needed by the eieio persistant base class."
+Needed by the eieio persistent base class."
(oref s2 slot-2))
(defclass prot-1 (prot-0)
(prot0-slot-2 eitest-p1)
;; Accessing private slot out of context must fail
(should-error (oref eitest-p1 slot-3) :type 'invalid-slot-name)
- ;; Access private slot in ethod
+ ;; Access private slot in method
(prot1-slot-3 eitest-p1)
;; Access private slot in subclass method must fail
(should-error (prot1-slot-3 eitest-p2) :type 'invalid-slot-name)
Subclasses to override slot attributes.")
(defclass slotattr-ok (slotattr-base)
- ((initform :initform no-init)
+ ((initform :initform no-init)
(initarg :initarg :initblarg)
(custom :custom string
:label "One String"
Subclasses to override slot attributes.")
(defclass slotattr-class-ok (slotattr-class-base)
- ((initform :initform no-init)
+ ((initform :initform no-init)
(initarg :initarg :initblarg)
(custom :custom string
:label "One String"
Given /toto/ do
print "hello"
end
+
+# Bug#15208
+if something == :==
+ do_something
+end