merge trunk
This commit is contained in:
commit
f036e167fe
194 changed files with 19678 additions and 3969 deletions
39
ChangeLog
39
ChangeLog
|
@ -1,3 +1,42 @@
|
|||
2014-06-27 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (src): No more need to pass BOOTSTRAPEMACS.
|
||||
|
||||
* make-dist: Exclude test/automated/*.log.
|
||||
|
||||
2014-06-26 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (mostlyclean, clean): Maybe clean test/automated.
|
||||
|
||||
2014-06-21 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* configure.ac: Warn about --enable-link-time-optimization's issues
|
||||
in --help message (Bug#17806).
|
||||
|
||||
Port to GCC 4.9.0 with link time optimization (Bug#17806).
|
||||
* configure.ac (CFLAGS): With link time optimization,
|
||||
use -ffat-lto-objects if supported; otherwise Emacs won't
|
||||
build with GCC 4.9.0.
|
||||
|
||||
2014-06-20 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Diagnose failures due to colons in directory names (Bug#17278).
|
||||
* Makefile.in (epaths-force): Don't allow ':' in directories whose
|
||||
names go into a colon-separated path.
|
||||
* configure.ac: Fail if submake fails.
|
||||
|
||||
2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Omit redundant extern decls.
|
||||
Most of this patch is from Dmitry Antipov, in:
|
||||
http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
|
||||
* configure.ac (WERROR_CFLAGS): Add -Wredundant-decls.
|
||||
|
||||
Merge from gnulib, incorporating:
|
||||
2014-06-17 acl: port to gcc -Wredundant-decls
|
||||
2014-06-01 gnulib-common.m4: Fix typo in _GL_UNUSED_LABEL.
|
||||
* lib/acl.h, m4/gnulib-common.m4: Update from gnulib.
|
||||
|
||||
2014-06-15 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in: Use `make -C' rather than `cd && make' throughout.
|
||||
|
|
30
Makefile.in
30
Makefile.in
|
@ -297,6 +297,14 @@ removenullpaths=sed -e 's/^:*//' -e 's/:*$$//g' -e 's/::*/:/g'
|
|||
# to just letting configure generate epaths.h from epaths.in in a
|
||||
# similar way to how Makefile is made from Makefile.in.
|
||||
epaths-force:
|
||||
@for dir in '$(abs_srcdir)' '$(lispdir)' '$(archlibdir)'; do \
|
||||
case $$dir in \
|
||||
*:*) \
|
||||
echo >&2 "Build or installation directory '$$dir'"; \
|
||||
echo >&2 "cannot contain ':'."; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done
|
||||
@(standardlisppath=`echo "${standardlisppath}" | ${removenullpaths}` ; \
|
||||
locallisppath=`echo "${locallisppath}" | ${removenullpaths}` ; \
|
||||
buildlisppath=`echo "${buildlisppath}" | ${removenullpaths}` ; \
|
||||
|
@ -360,16 +368,6 @@ lisp: src
|
|||
lib lib-src lisp nt: Makefile
|
||||
$(MAKE) -C $@ all
|
||||
|
||||
# Pass to src/Makefile.in an additional BOOTSTRAPEMACS variable which
|
||||
# is either set to bootstrap-emacs (in case bootstrap-emacs has not been
|
||||
# constructed yet) or the empty string (otherwise).
|
||||
# src/Makefile.in uses it to implement conditional dependencies, so that
|
||||
# files that need bootstrap-emacs to be built do not additionally need
|
||||
# to be kept fresher than bootstrap-emacs. Otherwise changing a single
|
||||
# file src/foo.c forces dumping a new bootstrap-emacs, then re-byte-compiling
|
||||
# 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.
|
||||
#
|
||||
# Note the use of single quotes in the value of vcswitness.
|
||||
# This passes an unexpanded $srcdir to src's Makefile, which then
|
||||
# expands it using its own value of srcdir (which points to the
|
||||
|
@ -378,10 +376,7 @@ src: Makefile
|
|||
dirstate='.bzr/checkout/dirstate'; \
|
||||
vcswitness='$$(srcdir)/../'$$dirstate; \
|
||||
[ -r "$(srcdir)/$$dirstate" ] || vcswitness=''; \
|
||||
cd $@ || exit; \
|
||||
boot=bootstrap-emacs$(EXEEXT); \
|
||||
[ ! -x "$$boot" ] || boot=''; \
|
||||
$(MAKE) all BOOTSTRAPEMACS="$$boot" VCSWITNESS="$$vcswitness"
|
||||
$(MAKE) -C $@ all VCSWITNESS="$$vcswitness"
|
||||
|
||||
blessmail: Makefile src
|
||||
$(MAKE) -C lib-src maybe-blessmail
|
||||
|
@ -790,7 +785,9 @@ mostlyclean_dirs = src oldXMenu lwlib lib lib-src nt doc/emacs doc/misc \
|
|||
$(foreach dir,$(mostlyclean_dirs),$(eval $(call submake_template,$(dir),mostlyclean)))
|
||||
|
||||
mostlyclean: $(mostlyclean_dirs:=_mostlyclean)
|
||||
|
||||
for dir in test/automated; do \
|
||||
[ ! -d $$dir ] || $(MAKE) -C $$dir mostlyclean; \
|
||||
done
|
||||
|
||||
### `clean'
|
||||
### Delete all files from the current directory that are normally
|
||||
|
@ -805,6 +802,9 @@ clean_dirs = $(mostlyclean_dirs) nextstep
|
|||
$(foreach dir,$(clean_dirs),$(eval $(call submake_template,$(dir),clean)))
|
||||
|
||||
clean: $(clean_dirs:=_clean)
|
||||
for dir in test/automated; do \
|
||||
[ ! -d $$dir ] || $(MAKE) -C $$dir clean; \
|
||||
done
|
||||
-rm -f etc/emacs.tmpdesktop
|
||||
|
||||
### `bootclean'
|
||||
|
|
|
@ -1,3 +1,40 @@
|
|||
2014-06-26 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* notes/unicode: Some notes about what to do when a new Unicode
|
||||
version is imported.
|
||||
|
||||
2014-06-26 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* authors.el: Move here from ../lisp/emacs-lisp.
|
||||
|
||||
2014-06-25 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* grammars/Makefile.in (${bovinedir}/c-by.el, ${bovinedir}/make-by.el):
|
||||
(${wisentdir}/js-wy.el, ${wisentdir}/python-wy.el):
|
||||
Replace with pattern rules.
|
||||
(${bovinedir}/scm-by.el, ${wisentdir}/javat-wy.el)
|
||||
(${cedetdir}/srecode/srt-wy.el): Use $<.
|
||||
|
||||
* unidata/Makefile.in (${top_srcdir}/src/macuvs.h): Make and load .elc.
|
||||
(.el.elc): Replace with pattern rule.
|
||||
(%.elc): New.
|
||||
(unidata.txt): Use $<.
|
||||
(compile): Remove.
|
||||
(${DSTDIR}/charprop.el): Use order-only prereqs rather than a sub-make.
|
||||
|
||||
* unidata/uvs.el (uvs-print-table-ivd): Fix free variable typo.
|
||||
|
||||
2014-06-21 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* unidata/BidiMirroring.txt: Update to 7.0.0 (only comment changes).
|
||||
* unidata/UnicodeData.txt: Update to 7.0.0.
|
||||
* unidata/IVD_Sequences.txt: Update to 2014-05-16 version.
|
||||
|
||||
2014-06-21 Stephen Berman <Stephen.Berman@gmx.net>
|
||||
|
||||
* notes/elpa: Use "git" instead of "bzr" in the name of machine to
|
||||
clone the repository from.
|
||||
|
||||
2014-06-13 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* unidata/Makefile.in (${DSTDIR}/charprop.el):
|
||||
|
|
|
@ -622,11 +622,12 @@ Changes to files in this list are not listed.")
|
|||
"temacs.opt" "descrip.mms" "compile.com" "link.com"
|
||||
"compact.el" "fadr.el"
|
||||
"calc/calc-maint.el"
|
||||
"emacs-lisp/cl-specs.el"
|
||||
"emacs-lisp/eieio-comp.el"
|
||||
"erc-hecomplete.el"
|
||||
"eshell/esh-maint.el"
|
||||
"language/persian.el"
|
||||
"meese.el" "iswitchb.el"
|
||||
"ledit.el" "meese.el" "iswitchb.el" "longlines.el"
|
||||
"mh-exec.el" "mh-init.el" "mh-customize.el"
|
||||
"net/zone-mode.el" "xesam.el"
|
||||
"term/mac-win.el" "sup-mouse.el"
|
||||
|
@ -647,6 +648,7 @@ Changes to files in this list are not listed.")
|
|||
"dns-mode.el" "run-at-time.el" "gnus-encrypt.el" "sha1-el.el"
|
||||
"gnus-gl.el" "gnus.sum.el" "proto-stream.el" "color.el" "color-lab.el"
|
||||
"eww.el" "shr-color.el" "shr.el" "earcon.el" "gnus-audio.el" "encrypt.el"
|
||||
"format-spec.el" "gnus-move.el"
|
||||
;; doc
|
||||
"getopt.c" "texindex.c" "news.texi" "vc.texi" "vc2-xtra.texi"
|
||||
"back.texi" "vol1.texi" "vol2.texi" "elisp-covers.texi" "two.el"
|
||||
|
@ -752,7 +754,11 @@ in the repository.")
|
|||
("progmodes/octave-inf.el" . "octave.el")
|
||||
("progmodes/octave-mod.el" . "octave.el")
|
||||
;; Obsolete.
|
||||
("emacs-lisp/assoc.el" . "assoc.el")
|
||||
("emacs-lisp/cust-print.el" . "cust-print.el")
|
||||
("mail/mailpost.el" . "mailpost.el")
|
||||
("play/bruce.el" . "bruce.el")
|
||||
("play/yow.el" . "yow.el")
|
||||
("patcomp.el" . "patcomp.el")
|
||||
;; From lisp to etc/forms.
|
||||
("forms-d2.el" . "forms-d2.el")
|
||||
|
@ -771,6 +777,7 @@ in the repository.")
|
|||
("build-install" . "build-ins.in")
|
||||
("build-install.in" . "build-ins.in")
|
||||
("unidata/Makefile" . "unidata/Makefile.in")
|
||||
("mac/uvs.el" . "unidata/uvs.el")
|
||||
;; Moved from top to etc/
|
||||
("CONTRIBUTE" . "CONTRIBUTE")
|
||||
("FTP" . "FTP")
|
|
@ -66,39 +66,32 @@ bovine: ${BOVINE}
|
|||
|
||||
wisent: ${WISENT}
|
||||
|
||||
|
||||
${bovinedir}/c-by.el: ${srcdir}/c.by
|
||||
## c-by.el, make-by.el.
|
||||
${bovinedir}/%-by.el: ${srcdir}/%.by
|
||||
[ ! -f "$@" ] || chmod +w "$@"
|
||||
${make_bovine} -o "$@" ${srcdir}/c.by
|
||||
|
||||
${bovinedir}/make-by.el: ${srcdir}/make.by
|
||||
[ ! -f "$@" ] || chmod +w "$@"
|
||||
${make_bovine} -o "$@" ${srcdir}/make.by
|
||||
${make_bovine} -o "$@" $<
|
||||
|
||||
${bovinedir}/scm-by.el: ${srcdir}/scheme.by
|
||||
[ ! -f "$@" ] || chmod +w "$@"
|
||||
${make_bovine} -o "$@" ${srcdir}/scheme.by
|
||||
${make_bovine} -o "$@" $<
|
||||
|
||||
|
||||
${cedetdir}/semantic/grammar-wy.el: ${srcdir}/grammar.wy
|
||||
## grammar-wy.el
|
||||
${cedetdir}/semantic/%-wy.el: ${srcdir}/%.wy
|
||||
[ ! -f "$@" ] || chmod +w "$@"
|
||||
${make_wisent} -o "$@" ${srcdir}/grammar.wy
|
||||
${make_wisent} -o "$@" $<
|
||||
|
||||
## js-wy.el, python-wy.el
|
||||
${wisentdir}/%-wy.el: ${srcdir}/%.wy
|
||||
[ ! -f "$@" ] || chmod +w "$@"
|
||||
${make_wisent} -o "$@" $<
|
||||
|
||||
${wisentdir}/javat-wy.el: ${srcdir}/java-tags.wy
|
||||
[ ! -f "$@" ] || chmod +w "$@"
|
||||
${make_wisent} -o "$@" ${srcdir}/java-tags.wy
|
||||
|
||||
${wisentdir}/js-wy.el: ${srcdir}/js.wy
|
||||
[ ! -f "$@" ] || chmod +w "$@"
|
||||
${make_wisent} -o "$@" ${srcdir}/js.wy
|
||||
|
||||
${wisentdir}/python-wy.el: ${srcdir}/python.wy
|
||||
[ ! -f "$@" ] || chmod +w "$@"
|
||||
${make_wisent} -o "$@" ${srcdir}/python.wy
|
||||
${make_wisent} -o "$@" $<
|
||||
|
||||
${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy
|
||||
[ ! -f "$@" ] || chmod +w "$@"
|
||||
${make_wisent} -o "$@" ${srcdir}/srecode-template.wy
|
||||
${make_wisent} -o "$@" $<
|
||||
|
||||
|
||||
.PHONY: distclean bootstrap-clean maintainer-clean extraclean
|
||||
|
|
|
@ -3,9 +3,9 @@ NOTES ON THE EMACS PACKAGE ARCHIVE
|
|||
The GNU Emacs package archive, at elpa.gnu.org, is managed using a Git
|
||||
repository named "elpa", hosted on Savannah. To check it out:
|
||||
|
||||
git clone git://bzr.sv.gnu.org/emacs/elpa
|
||||
git clone git://git.sv.gnu.org/emacs/elpa
|
||||
cd elpa
|
||||
git remote set-url --push origin git+ssh://bzr.sv.gnu.org/srv/git/emacs/elpa
|
||||
git remote set-url --push origin git+ssh://git.sv.gnu.org/srv/git/emacs/elpa
|
||||
[create task branch for edits, etc.]
|
||||
|
||||
Changes to this branch propagate to elpa.gnu.org via a "deployment" script run
|
||||
|
|
|
@ -3,6 +3,39 @@
|
|||
Copyright (C) 2002-2014 Free Software Foundation, Inc.
|
||||
See the end of the file for license conditions.
|
||||
|
||||
Importing a new Unicode Standard version into Emacs
|
||||
-------------------------------------------------------------
|
||||
|
||||
Emacs uses the following files from the Unicode Character Database
|
||||
(a.k.a. "UCD):
|
||||
|
||||
. UnicodeData.txt
|
||||
. BidiMirroring.txt
|
||||
. IVD_Sequences.txt
|
||||
|
||||
First, these files need to be copied into admin/unidata/, and then
|
||||
Emacs should be rebuilt for them to take effect. Rebuilding Emacs
|
||||
updates several derived files elsewhere in the Emacs source tree,
|
||||
mainly in lisp/international/.
|
||||
|
||||
When Emacs is rebuilt for the first time after importing the new
|
||||
files, pay attention to any warning or error messages. In particular,
|
||||
admin/unidata/unidata-gen.el will complain if UnicodeData.txt defines
|
||||
new bidirectional attributes of characters, because unidata-gen.el,
|
||||
bidi.c and dispextern.h need to be updated in that case; failure to do
|
||||
so will cause aborts in redisplay.
|
||||
|
||||
Next, review the changes in UnicodeData.txt vs the previous version
|
||||
used by Emacs. Any changes, be it introduction of new scripts or
|
||||
addition of codepoints to existing scripts, need corresponding changes
|
||||
in the data used for filling char-script-table, see characters.el
|
||||
around line 1300. Other databases and settings in characters.el, such
|
||||
as the data for char-width-table, might also need changes.
|
||||
|
||||
Any new scripts added by UnicodeData.txt will also need updates to
|
||||
script-representative-chars defined in fontset.el. Other databases in
|
||||
fontset.el might also need to be updated as needed.
|
||||
|
||||
Problems, fixmes and other unicode-related issues
|
||||
-------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
# BidiMirroring-6.3.0.txt
|
||||
# Date: 2013-02-12, 08:20:00 GMT [KW, LI]
|
||||
# BidiMirroring-7.0.0.txt
|
||||
# Date: 2013-12-17, 00:00:00 GMT [KW, LI]
|
||||
#
|
||||
# Bidi_Mirroring_Glyph Property
|
||||
#
|
||||
# This file is an informative contributory data file in the
|
||||
# Unicode Character Database.
|
||||
#
|
||||
# Copyright (c) 1991-2013 Unicode, Inc.
|
||||
# Copyright (c) 1991-2014 Unicode, Inc.
|
||||
# For terms of use, see http://www.unicode.org/terms_of_use.html
|
||||
#
|
||||
# This data file lists characters that have the Bidi_Mirrored=Yes property
|
||||
# value, for which there is another Unicode character that typically has a glyph
|
||||
# that is the mirror image of the original character's glyph.
|
||||
#
|
||||
# The repertoire covered by the file is Unicode 6.3.0.
|
||||
# The repertoire covered by the file is Unicode 7.0.0.
|
||||
#
|
||||
# The file contains a list of lines with mappings from one code point
|
||||
# to another one for character-based mirroring.
|
||||
|
@ -37,12 +37,12 @@
|
|||
# that means that no other character exists whose glyph is suitable
|
||||
# for character-based mirroring.
|
||||
#
|
||||
# For information on bidi mirroring, see UAX #9: Bidirectional Algorithm,
|
||||
# For information on bidi mirroring, see UAX #9: Unicode Bidirectional Algorithm,
|
||||
# at http://www.unicode.org/unicode/reports/tr9/
|
||||
#
|
||||
# This file was originally created by Markus Scherer.
|
||||
# Extended for Unicode 3.2, 4.0, 4.1, 5.0, 5.1, 5.2, and 6.0 by Ken Whistler,
|
||||
# and for Unicode 6.1, 6.2, and 6.3 by Ken Whistler and Laurentiu Iancu.
|
||||
# and for Unicode 6.1, 6.2, 6.3, and 7.0 by Ken Whistler and Laurentiu Iancu.
|
||||
#
|
||||
# ############################################################
|
||||
#
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -35,24 +35,23 @@ emacs = "${EMACS}" -batch --no-site-file --no-site-lisp
|
|||
|
||||
all: ${top_srcdir}/src/macuvs.h ${DSTDIR}/charprop.el
|
||||
|
||||
${top_srcdir}/src/macuvs.h: ${srcdir}/uvs.el ${srcdir}/IVD_Sequences.txt
|
||||
${EMACS} -batch -l "${srcdir}/uvs.el" \
|
||||
## Specify .elc as an order-only prereq so as to not needlessly rebuild
|
||||
## target just because the .elc is missing.
|
||||
## Same with charprop.el below.
|
||||
${top_srcdir}/src/macuvs.h: ${srcdir}/uvs.el ${srcdir}/IVD_Sequences.txt | \
|
||||
${srcdir}/uvs.elc
|
||||
${emacs} -L ${srcdir} -l uvs \
|
||||
--eval '(uvs-print-table-ivd "${srcdir}/IVD_Sequences.txt" "Adobe-Japan1")' \
|
||||
> $@
|
||||
|
||||
.el.elc:
|
||||
%.elc: %.el
|
||||
${emacs} -f batch-byte-compile $<
|
||||
|
||||
unidata.txt: ${srcdir}/UnicodeData.txt
|
||||
sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < ${srcdir}/UnicodeData.txt > $@
|
||||
sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < $< > $@
|
||||
|
||||
compile: ${srcdir}/unidata-gen.elc
|
||||
|
||||
## Depend on .el rather than .elc so as not to needlessly rebuild
|
||||
## uni-*.el files just because .elc is missing.
|
||||
## Same for UnicodeData.txt v unidata.txt.
|
||||
${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.el ${srcdir}/UnicodeData.txt
|
||||
${MAKE} compile unidata.txt EMACS="${EMACS}"
|
||||
${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.el ${srcdir}/UnicodeData.txt | \
|
||||
${srcdir}/unidata-gen.elc unidata.txt
|
||||
-if [ -f "$@" ]; then \
|
||||
cd ${DSTDIR} && chmod +w charprop.el `sed -n 's/^;; FILE: //p' < charprop.el`; \
|
||||
fi
|
||||
|
|
|
@ -6,13 +6,13 @@ copyright.html.
|
|||
The names, URLs, and dates for these files are as follows.
|
||||
|
||||
BidiMirroring.txt
|
||||
http://www.unicode.org/Public/6.3.0/ucd/BidiMirroring.txt
|
||||
2013-02-12
|
||||
http://www.unicode.org/Public/UNIDATA/BidiMirroring.txt
|
||||
2013-12-17
|
||||
|
||||
IVD_Sequences.txt
|
||||
http://www.unicode.org/ivd/data/2012-03-02/IVD_Sequences.txt
|
||||
2012-03-02
|
||||
http://www.unicode.org/ivd/data/2014-05-16/IVD_Sequences.txt
|
||||
2014-05-16
|
||||
|
||||
UnicodeData.txt
|
||||
http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
|
||||
2012-04-07
|
||||
2014-03-10
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -198,8 +198,8 @@ corresponding number."
|
|||
(let ((uvs-alist
|
||||
(with-temp-buffer
|
||||
(insert-file-contents filename)
|
||||
(setq uvs-alist (uvs-alist-from-ivd collection-id
|
||||
sequence-id-to-glyph-func)))))
|
||||
(uvs-alist-from-ivd collection-id
|
||||
sequence-id-to-glyph-func))))
|
||||
(princ "/* Automatically generated by uvs.el. */\n")
|
||||
(princ
|
||||
(format "static const unsigned char mac_uvs_table_%s_bytes[] =\n {\n"
|
||||
|
|
17
configure.ac
17
configure.ac
|
@ -882,6 +882,7 @@ else
|
|||
for w in $ws; do
|
||||
gl_WARN_ADD([$w])
|
||||
done
|
||||
gl_WARN_ADD([-Wredundant-decls]) # Prefer this, as we don't use Bison.
|
||||
gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
|
||||
gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now
|
||||
gl_WARN_ADD([-Wno-type-limits]) # Too many warnings for now
|
||||
|
@ -930,8 +931,11 @@ edit_cflags="
|
|||
AC_ARG_ENABLE(link-time-optimization,
|
||||
[AS_HELP_STRING([--enable-link-time-optimization],
|
||||
[build emacs with link-time optimization.
|
||||
This is supported for gcc since 4.5.0 and clang.
|
||||
Note that clang support is experimental - see INSTALL])],
|
||||
This requires GCC 4.5.0 or later, or clang.
|
||||
(Note that clang support is experimental - see INSTALL.)
|
||||
It also makes Emacs harder to debug, and when we tried it
|
||||
with GCC 4.9.0 x86-64 it made Emacs slower, so it's not
|
||||
recommended for typical use.])],
|
||||
if test "${enableval}" != "no"; then
|
||||
ac_lto_supported=no
|
||||
if test $emacs_cv_clang = yes; then
|
||||
|
@ -969,6 +973,13 @@ if test "${enableval}" != "no"; then
|
|||
# command, so plugin name is appended to ARFLAGS.
|
||||
ARFLAGS="cru --plugin $GOLD_PLUGIN"
|
||||
RANLIB="$RANLIB --plugin $GOLD_PLUGIN"
|
||||
else
|
||||
dnl The following is needed for GCC 4.9.0. The GCC 4.9.0 release notes
|
||||
dnl suggest that instead of -ffat-lto-objects we should use gcc-ar and
|
||||
dnl gcc-ranlib in place of ar and ranlib, but gcc-ar makes /usr/bin/ar
|
||||
dnl dump core on Fedora 20, so play it safe for now.
|
||||
gl_COMPILER_OPTION_IF([-ffat-lto-objects],
|
||||
[CFLAGS="$CFLAGS -ffat-lto-objects"])
|
||||
fi
|
||||
fi
|
||||
fi)
|
||||
|
@ -5120,7 +5131,7 @@ if test "${opsys}" = "mingw32"; then
|
|||
${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
|
||||
else
|
||||
${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
|
||||
fi
|
||||
fi || AC_MSG_ERROR(['src/epaths.h' could not be made.])
|
||||
], [GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"])
|
||||
|
||||
dnl NB we have to cheat and use the ac_... version because abs_top_srcdir
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
2014-06-23 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (%.texi): Disable implicit rules.
|
||||
(mkinfodir): Remove.
|
||||
(.dvi.ps): Replace with pattern rule.
|
||||
(${buildinfodir}): New rule.
|
||||
($(buildinfodir)/emacs.info): Use order-only prereq for output dir.
|
||||
Use $<.
|
||||
(emacs.dvi, emacs.pdf, emacs.html, emacs-xtra.dvi, emacs-xtra.pdf):
|
||||
Use $<.
|
||||
(%.ps): New rule.
|
||||
|
||||
2014-06-15 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (bootstrap-clean): New.
|
||||
|
|
|
@ -142,44 +142,44 @@ EMACSSOURCES= \
|
|||
${srcdir}/kmacro.texi \
|
||||
$(EMACS_XTRA)
|
||||
|
||||
## The info/ directory exists in release tarfiles but not the repository.
|
||||
mkinfodir = @${MKDIR_P} ${buildinfodir}
|
||||
## Disable implicit rules.
|
||||
%.texi: ;
|
||||
|
||||
.PHONY: info dvi html pdf ps
|
||||
|
||||
.SUFFIXES: .ps .dvi
|
||||
|
||||
.dvi.ps:
|
||||
$(DVIPS) -o $@ $<
|
||||
|
||||
info: $(buildinfodir)/emacs.info
|
||||
dvi: $(DVI_TARGETS)
|
||||
html: $(HTML_TARGETS)
|
||||
pdf: $(PDF_TARGETS)
|
||||
ps: $(PS_TARGETS)
|
||||
|
||||
## The info/ directory exists in release tarfiles but not the repository.
|
||||
${buildinfodir}:
|
||||
${MKDIR_P} $@
|
||||
|
||||
# Note that all the Info targets build the Info files in srcdir.
|
||||
# There is no provision for Info files to exist in the build directory.
|
||||
# In a distribution of Emacs, the Info files should be up to date.
|
||||
# Note: "<" is not portable in ordinary make rules.
|
||||
$(buildinfodir)/emacs.info: ${EMACSSOURCES}
|
||||
$(mkinfodir)
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs.texi
|
||||
$(buildinfodir)/emacs.info: ${EMACSSOURCES} | ${buildinfodir}
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
|
||||
|
||||
emacs.dvi: ${EMACSSOURCES}
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
|
||||
$(ENVADD) $(TEXI2DVI) $<
|
||||
|
||||
emacs.pdf: ${EMACSSOURCES}
|
||||
$(ENVADD) $(TEXI2PDF) ${srcdir}/emacs.texi
|
||||
$(ENVADD) $(TEXI2PDF) $<
|
||||
|
||||
emacs.html: ${EMACSSOURCES}
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/emacs.texi
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
|
||||
|
||||
emacs-xtra.dvi: $(EMACS_XTRA)
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
|
||||
$(ENVADD) $(TEXI2DVI) $<
|
||||
|
||||
emacs-xtra.pdf: $(EMACS_XTRA)
|
||||
$(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi
|
||||
$(ENVADD) $(TEXI2PDF) $<
|
||||
|
||||
%.ps: %.dvi
|
||||
$(DVIPS) -o $@ $<
|
||||
|
||||
.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean
|
||||
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
2014-06-23 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (%.texi): Disable implicit rules.
|
||||
(mkinfodir): Remove.
|
||||
(.dvi.ps): Replace with explicit rule.
|
||||
(${buildinfodir}): New rule.
|
||||
(${buildinfodir}/eintr.info): Use order-only prereq for output dir.
|
||||
Use $<.
|
||||
(emacs-lisp-intro.dvi, emacs-lisp-intro.pdf, emacs-lisp-intro.html):
|
||||
Use $<.
|
||||
(emacs-lisp-intro.ps): New rule.
|
||||
|
||||
2014-06-15 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (bootstrap-clean): New.
|
||||
|
|
|
@ -66,40 +66,39 @@ HTML_TARGETS = emacs-lisp-intro.html
|
|||
PDF_TARGETS = emacs-lisp-intro.pdf
|
||||
PS_TARGETS = emacs-lisp-intro.ps
|
||||
|
||||
mkinfodir = @${MKDIR_P} ${buildinfodir}
|
||||
|
||||
srcs = ${srcdir}/emacs-lisp-intro.texi ${srcdir}/doclicense.texi \
|
||||
${emacsdir}/emacsver.texi
|
||||
|
||||
## Disable implicit rules.
|
||||
%.texi: ;
|
||||
|
||||
.PHONY: info dvi html pdf ps
|
||||
|
||||
.SUFFIXES: .ps .dvi
|
||||
|
||||
.dvi.ps:
|
||||
$(DVIPS) -o $@ $<
|
||||
|
||||
info: ${buildinfodir}/eintr.info
|
||||
|
||||
dvi: $(DVI_TARGETS)
|
||||
html: $(HTML_TARGETS)
|
||||
pdf: $(PDF_TARGETS)
|
||||
ps: $(PS_TARGETS)
|
||||
|
||||
${buildinfodir}:
|
||||
${MKDIR_P} $@
|
||||
|
||||
# The file name eintr must fit within 5 characters, to allow for
|
||||
# -NN extensions to fit into DOS 8+3 limits without clashing.
|
||||
# Note: "<" is not portable in ordinary make rules.
|
||||
${buildinfodir}/eintr.info: ${srcs}
|
||||
$(mkinfodir)
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi
|
||||
${buildinfodir}/eintr.info: ${srcs} | ${buildinfodir}
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
|
||||
|
||||
emacs-lisp-intro.dvi: ${srcs}
|
||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-lisp-intro.texi
|
||||
$(ENVADD) $(TEXI2DVI) $<
|
||||
|
||||
emacs-lisp-intro.pdf: ${srcs}
|
||||
$(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-lisp-intro.texi
|
||||
$(ENVADD) $(TEXI2PDF) $<
|
||||
|
||||
emacs-lisp-intro.html: ${srcs}
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
|
||||
|
||||
emacs-lisp-intro.ps: emacs-lisp-intro.dvi
|
||||
$(DVIPS) -o $@ $<
|
||||
|
||||
.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
2014-06-23 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (%.texi): Disable implicit rules.
|
||||
(mkinfodir): Remove.
|
||||
(.dvi.ps): Replace with explicit rule.
|
||||
(html): Declare as PHONY.
|
||||
(${buildinfodir}): New rule.
|
||||
($(buildinfodir)/elisp.info): Use order-only prereq for output dir.
|
||||
Use $<.
|
||||
(elisp.dvi, elisp.html, elisp.pdf): Use $<.
|
||||
(elisp.ps): New rule.
|
||||
|
||||
2014-06-21 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* positions.texi (Screen Lines): Clarify how columns are counted
|
||||
by vertical-motion.
|
||||
|
||||
2014-06-15 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (bootstrap-clean): New.
|
||||
|
|
|
@ -124,14 +124,10 @@ srcs = \
|
|||
$(srcdir)/gpl.texi \
|
||||
$(srcdir)/doclicense.texi
|
||||
|
||||
mkinfodir = @${MKDIR_P} ${buildinfodir}
|
||||
## Disable implicit rules.
|
||||
%.texi: ;
|
||||
|
||||
.PHONY: info dvi pdf ps
|
||||
|
||||
.SUFFIXES: .ps .dvi
|
||||
|
||||
.dvi.ps:
|
||||
$(DVIPS) -o $@ $<
|
||||
.PHONY: info dvi html pdf ps
|
||||
|
||||
info: $(buildinfodir)/elisp.info
|
||||
dvi: $(DVI_TARGETS)
|
||||
|
@ -139,19 +135,23 @@ html: $(HTML_TARGETS)
|
|||
pdf: $(PDF_TARGETS)
|
||||
ps: $(PS_TARGETS)
|
||||
|
||||
## Note: "<" is not portable in ordinary make rules.
|
||||
$(buildinfodir)/elisp.info: $(srcs)
|
||||
$(mkinfodir)
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $(srcdir)/elisp.texi
|
||||
${buildinfodir}:
|
||||
${MKDIR_P} $@
|
||||
|
||||
$(buildinfodir)/elisp.info: $(srcs) | ${buildinfodir}
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
|
||||
|
||||
elisp.dvi: $(srcs)
|
||||
$(ENVADD) $(TEXI2DVI) $(srcdir)/elisp.texi
|
||||
$(ENVADD) $(TEXI2DVI) $<
|
||||
|
||||
elisp.html: $(srcs)
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $(srcdir)/elisp.texi
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
|
||||
|
||||
elisp.pdf: $(srcs)
|
||||
$(ENVADD) $(TEXI2PDF) $(srcdir)/elisp.texi
|
||||
$(ENVADD) $(TEXI2PDF) $<
|
||||
|
||||
elisp.ps: elisp.dvi
|
||||
$(DVIPS) -o $@ $<
|
||||
|
||||
.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean
|
||||
|
||||
|
|
|
@ -500,7 +500,11 @@ is negative, it moves up instead.
|
|||
The @var{count} argument can be a cons cell, @code{(@var{cols}
|
||||
. @var{lines})}, instead of an integer. Then the function moves by
|
||||
@var{lines} screen lines, and puts point @var{cols} columns from the
|
||||
start of that screen line.
|
||||
visual start of that screen line. Note that @var{cols} are counted
|
||||
from the @emph{visual} start of the line; if the window is scrolled
|
||||
horizontally (@pxref{Horizontal Scrolling}), the column on which point
|
||||
will end is in addition to the number of columns by which the text is
|
||||
scrolled.
|
||||
|
||||
The return value is the number of screen lines over which point was
|
||||
moved. The value may be less in absolute value than @var{count} if
|
||||
|
|
|
@ -1,3 +1,45 @@
|
|||
2014-06-24 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* dired-x.texi (Omitting Files in Dired, Omitting Variables):
|
||||
Fix key binding to dired-omit-mode. (Bug#16354)
|
||||
|
||||
2014-06-24 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* autotype.texi (Skeleton Language): Document the \n feature better.
|
||||
|
||||
2014-06-23 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (%.texi): Disable implicit rules.
|
||||
|
||||
2014-06-22 Mario Lang <mlang@delysid.org>
|
||||
|
||||
* srecode.texi (Base Arguments): The the -> to the.
|
||||
|
||||
* org.texi (Images in ODT export): The the -> the.
|
||||
|
||||
2014-06-21 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* autotype.texi (Skeleton Language): Document the feature of \n
|
||||
when at eol.
|
||||
|
||||
2014-06-21 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* dbus.texi (Type Conversion): Formatting edits in example.
|
||||
|
||||
2014-06-15 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
Sync with Tramp 2.2.10.
|
||||
|
||||
* tramp.texi (Inline methods): Remove restriction on "telnet".
|
||||
Recommend sharing ssh connections for "plink".
|
||||
(External methods): Remove "sftp". Merge "pscp" and "psftp"
|
||||
descriptions. Recommend sharing ssh connections. Add "nc" method.
|
||||
(GVFS based methods): Add "sftp".
|
||||
(Customizing Completion, External packages, Issues):
|
||||
Use @dots{}.
|
||||
|
||||
* trampver.texi: Update release number.
|
||||
|
||||
2014-06-15 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (bootstrap-clean): New.
|
||||
|
|
|
@ -107,6 +107,9 @@ gfdl = ${srcdir}/doclicense.texi
|
|||
## Prevent implicit rule triggering for foo.info.
|
||||
.SUFFIXES:
|
||||
|
||||
## Disable implicit rules.
|
||||
%.texi: ;
|
||||
|
||||
# Default.
|
||||
info: $(INFO_TARGETS)
|
||||
|
||||
|
|
|
@ -232,8 +232,12 @@ Insert string or character. Literal strings and characters are passed through
|
|||
@code{skeleton-transformation} when that is non-@code{nil}.
|
||||
@item @code{?\n}
|
||||
@c ??? something seems very wrong here.
|
||||
Insert a newline and align under current line. Use newline character
|
||||
@code{?\n} to prevent alignment.
|
||||
Insert a newline and align under current line, but not if this is the
|
||||
last element of a skeleton and the newline would be inserted at end of
|
||||
line, or this is the first element and the newline would be inserted
|
||||
at beginning of line. Use newline character @code{?\n} to prevent
|
||||
alignment. Use @code{"\n"} as the first or last string element of a
|
||||
skeleton to insert a newline unconditionally.
|
||||
@item @code{_}
|
||||
Interesting point. When wrapping skeletons around successive regions, they are
|
||||
put at these places. Point is left at first @code{_} where nothing is wrapped.
|
||||
|
|
|
@ -1060,11 +1060,11 @@ elements of this array. Example:
|
|||
"" ;; No icon.
|
||||
"Notification summary" ;; Summary.
|
||||
(format ;; Body.
|
||||
"This is a test notification, raised from %s" (emacs-version))
|
||||
"This is a test notification, raised from\n%S" (emacs-version))
|
||||
'(:array) ;; No actions (empty array of strings).
|
||||
'(:array :signature "@{sv@}") ;; No hints
|
||||
;; (empty array of dictionary entries).
|
||||
:int32 -1) ;; Default timeout.
|
||||
:int32 -1) ;; Default timeout.
|
||||
|
||||
@result{} 3
|
||||
@end lisp
|
||||
|
|
|
@ -283,8 +283,8 @@ Marked files are never omitted.
|
|||
@end itemize
|
||||
|
||||
@table @kbd
|
||||
@item M-o
|
||||
@kindex M-o
|
||||
@item C-x M-o
|
||||
@kindex C-x M-o
|
||||
@findex dired-omit-mode
|
||||
(@code{dired-omit-mode}) Toggle between displaying and omitting
|
||||
``uninteresting'' files.
|
||||
|
@ -324,7 +324,7 @@ Default: @code{nil}
|
|||
If non-@code{nil}, ``uninteresting'' files are not listed.
|
||||
Uninteresting files are those whose files whose names match regexp
|
||||
@code{dired-omit-files}, plus those ending with extensions in
|
||||
@code{dired-omit-extensions}. @kbd{M-o} (@code{dired-omit-mode})
|
||||
@code{dired-omit-extensions}. @kbd{C-x M-o} (@code{dired-omit-mode})
|
||||
toggles its value, which is buffer-local. Put
|
||||
|
||||
@example
|
||||
|
@ -333,8 +333,8 @@ toggles its value, which is buffer-local. Put
|
|||
|
||||
@noindent
|
||||
inside your @code{dired-mode-hook} to have omitting initially turned on in
|
||||
@emph{every} Dired buffer (@pxref{Installation}). You can then use @kbd{M-o} to
|
||||
unomit in that buffer.
|
||||
@emph{every} Dired buffer (@pxref{Installation}). You can then use
|
||||
@kbd{C-x M-o} to unomit in that buffer.
|
||||
|
||||
To enable omitting automatically only in certain directories you can add
|
||||
a directory local setting
|
||||
|
|
|
@ -12228,7 +12228,7 @@ height:width ratio, do the following
|
|||
@cindex #+ATTR_ODT
|
||||
You can control the manner in which an image is anchored by setting the
|
||||
@code{:anchor} property of it's @code{#+ATTR_ODT} line. You can specify one
|
||||
of the the following three values for the @code{:anchor} property:
|
||||
of the following three values for the @code{:anchor} property:
|
||||
@samp{"as-char"}, @samp{"paragraph"} and @samp{"page"}.
|
||||
|
||||
To create an image that is anchored to a page, do the following:
|
||||
|
|
|
@ -1191,7 +1191,7 @@ If there is an active region via @code{transient-mark-mode}, or
|
|||
@code{mouse-drag-region}, then the @code{REGION} section will be
|
||||
enabled.
|
||||
|
||||
In addition, @code{REGIONTEXT} will be set the the text in the region,
|
||||
In addition, @code{REGIONTEXT} will be set to the text in the region,
|
||||
and that region of text will be ``killed'' from the current buffer.
|
||||
|
||||
If standard-output is NOT the current buffer, then the region will not
|
||||
|
|
|
@ -605,11 +605,10 @@ action.
|
|||
@cindex methods, inline
|
||||
|
||||
The inline methods in @value{tramp} are quite powerful and can work in
|
||||
situations where you cannot use an external transfer program to connect.
|
||||
Inline methods are the only methods that work when connecting to the
|
||||
remote host via telnet. (There are also strange inline methods which
|
||||
allow you to transfer files between @emph{user identities} rather than
|
||||
hosts, see below.)
|
||||
situations where you cannot use an external transfer program to
|
||||
connect. There are also strange inline methods which allow you to
|
||||
transfer files between @emph{user identities} rather than hosts, see
|
||||
below.
|
||||
|
||||
These methods depend on the existence of a suitable encoding and
|
||||
decoding command on remote host. Locally, @value{tramp} may be able to
|
||||
|
@ -748,7 +747,10 @@ This method is mostly interesting for Windows users using the PuTTY
|
|||
implementation of SSH@. It uses @samp{plink -ssh} to log in to the
|
||||
remote host.
|
||||
|
||||
This supports the @samp{-P} argument.
|
||||
With a recent PuTTY, it is recommended to check the @samp{Share SSH
|
||||
connections if possible} control for that session.
|
||||
|
||||
This method supports the @samp{-P} argument.
|
||||
|
||||
|
||||
@item @option{plinkx}
|
||||
|
@ -757,9 +759,10 @@ This supports the @samp{-P} argument.
|
|||
|
||||
Another method using PuTTY on Windows. Instead of host names, it
|
||||
expects PuTTY session names, calling @samp{plink -load @var{session}
|
||||
-t"}. User names are relevant only in case the corresponding session
|
||||
hasn't defined a user name. Different port numbers must be defined in
|
||||
the session.
|
||||
-t}. User names and port numbers must be defined in the session.
|
||||
|
||||
With a recent PuTTY, it is recommended to check the @samp{Share SSH
|
||||
connections if possible} control for that session.
|
||||
|
||||
@end table
|
||||
|
||||
|
@ -820,22 +823,6 @@ specify @samp{-p 42} in the argument list for @command{ssh}, and to
|
|||
specify @samp{-P 42} in the argument list for @command{scp}.
|
||||
|
||||
|
||||
@item @option{sftp}---@command{ssh} and @command{sftp}
|
||||
@cindex method sftp
|
||||
@cindex sftp method
|
||||
@cindex sftp (with sftp method)
|
||||
@cindex ssh (with sftp method)
|
||||
|
||||
That is mostly the same method as @option{scp}, but using
|
||||
@command{sftp} as transfer command. So the same remarks are valid.
|
||||
|
||||
This command does not work like @value{ftppackagename}, where
|
||||
@command{ftp} is called interactively, and all commands are send from
|
||||
within this session. Instead of, @command{ssh} is used for login.
|
||||
|
||||
This method supports the @samp{-p} argument.
|
||||
|
||||
|
||||
@item @option{rsync}---@command{ssh} and @command{rsync}
|
||||
@cindex method rsync
|
||||
@cindex rsync method
|
||||
|
@ -881,33 +868,27 @@ This method supports the @samp{-p} argument.
|
|||
|
||||
|
||||
@item @option{pscp}---@command{plink} and @command{pscp}
|
||||
@item @option{psftp}---@command{plink} and @command{psftp}
|
||||
@cindex method pscp
|
||||
@cindex pscp method
|
||||
@cindex pscp (with pscp method)
|
||||
@cindex plink (with pscp method)
|
||||
@cindex PuTTY (with pscp method)
|
||||
|
||||
This method is similar to @option{scp}, but it uses the
|
||||
@command{plink} command to connect to the remote host, and it uses
|
||||
@command{pscp} for transferring the files. These programs are part
|
||||
of PuTTY, an SSH implementation for Windows.
|
||||
|
||||
This method supports the @samp{-P} argument.
|
||||
|
||||
|
||||
@item @option{psftp}---@command{plink} and @command{psftp}
|
||||
@cindex method psftp
|
||||
@cindex psftp method
|
||||
@cindex psftp (with psftp method)
|
||||
@cindex pscp (with psftp method)
|
||||
@cindex plink (with psftp method)
|
||||
@cindex PuTTY (with psftp method)
|
||||
|
||||
As you would expect, this method is similar to @option{sftp}, but it
|
||||
uses the @command{plink} command to connect to the remote host, and it
|
||||
uses @command{psftp} for transferring the files. These programs are
|
||||
part of PuTTY, an SSH implementation for Windows.
|
||||
These methods are similar to @option{scp} or @option{sftp}, but they
|
||||
use the @command{plink} command to connect to the remote host, and
|
||||
they use @command{pscp} or @command{psftp} for transferring the files.
|
||||
These programs are part of PuTTY, an SSH implementation for Windows.
|
||||
|
||||
This method supports the @samp{-P} argument.
|
||||
With a recent PuTTY, it is recommended to configure the @samp{Share
|
||||
SSH connections if possible} control for that session.
|
||||
|
||||
These methods support the @samp{-P} argument.
|
||||
|
||||
|
||||
@item @option{fcp}---@command{fsh} and @command{fcp}
|
||||
|
@ -938,6 +919,19 @@ opens just one connection to the remote host and then keeps it open,
|
|||
anyway.
|
||||
|
||||
|
||||
@item @option{nc}---@command{telnet} and @command{nc}
|
||||
@cindex method nc
|
||||
@cindex nc method
|
||||
@cindex nc (with nc method)
|
||||
@cindex telnet (with nc method)
|
||||
|
||||
Using @command{telnet} to connect to the remote host and @command{nc}
|
||||
for file transfer is often the only possibility to access dumb
|
||||
devices, like routers or NAS hosts. Those hosts have just a
|
||||
restricted @command{busybox} as local shell, and there is no program
|
||||
to encode and decode files for transfer.
|
||||
|
||||
|
||||
@item @option{ftp}
|
||||
@cindex method ftp
|
||||
@cindex ftp method
|
||||
|
@ -1066,6 +1060,17 @@ OBEX is an FTP-like access protocol for simple devices, like cell
|
|||
phones. For the time being, @value{tramp} only supports OBEX over Bluetooth.
|
||||
|
||||
|
||||
@item @option{sftp}
|
||||
@cindex method sftp
|
||||
@cindex sftp method
|
||||
|
||||
As you might expect, this method uses @command{sftp} in order to
|
||||
access the remote host. Contrary to the @option{ssh} and @option{scp}
|
||||
methods, it doesn't open an @command{ssh} session for login.
|
||||
Therefore, it could be used to access to remote hosts which refuse
|
||||
@command{ssh} for security reasons.
|
||||
|
||||
|
||||
@item @option{synce}
|
||||
@cindex method synce
|
||||
@cindex synce method
|
||||
|
@ -1077,10 +1082,10 @@ FUSE, it also needs the SYNCE-GVFS plugin.
|
|||
@end table
|
||||
|
||||
@defopt tramp-gvfs-methods
|
||||
This customer option, a list, defines the external methods which
|
||||
shall be used with GVFS@. Per default, these are @option{dav},
|
||||
@option{davs}, @option{obex} and @option{synce}. Other possible
|
||||
values are @option{ftp}, @option{sftp} and @option{smb}.
|
||||
This customer option, a list, defines the external methods which shall
|
||||
be used with GVFS@. Per default, these are @option{dav},
|
||||
@option{davs}, @option{obex}, @option{sftp} and @option{synce}. Other
|
||||
possible values are @option{ftp} and @option{smb}.
|
||||
@end defopt
|
||||
@end ifset
|
||||
|
||||
|
@ -1503,7 +1508,7 @@ customize which files are taken into account for user and host name
|
|||
completion (@pxref{File name completion}). For every method, it keeps
|
||||
a set of configuration files, accompanied by a Lisp function able to
|
||||
parse that file. Entries in @code{tramp-completion-function-alist}
|
||||
have the form (@var{method} @var{pair1} @var{pair2} ...).
|
||||
have the form (@var{method} @var{pair1} @var{pair2} @dots{}).
|
||||
|
||||
Each @var{pair} is composed of (@var{function} @var{file}).
|
||||
@var{function} is responsible to extract user names and host names
|
||||
|
@ -3774,7 +3779,7 @@ a non-@code{nil} value.
|
|||
|
||||
@lisp
|
||||
(let ((non-essential t))
|
||||
...)
|
||||
@dots{})
|
||||
@end lisp
|
||||
|
||||
|
||||
|
@ -3793,7 +3798,7 @@ should let-bind the variable @code{process-file-side-effects} to
|
|||
|
||||
@lisp
|
||||
(let (process-file-side-effects)
|
||||
...)
|
||||
@dots{})
|
||||
@end lisp
|
||||
|
||||
For asynchronous processes, @value{tramp} flushes the file attributes
|
||||
|
@ -3934,7 +3939,7 @@ file:
|
|||
|
||||
The autoload of the @value{emacsname} @value{tramp} package must be
|
||||
disabled. This can be achieved by setting file permissions @code{000}
|
||||
to the files @file{.../xemacs-packages/lisp/tramp/auto-autoloads.el*}.
|
||||
to the files @file{@dots{}/xemacs-packages/lisp/tramp/auto-autoloads.el*}.
|
||||
|
||||
In case of unified file names, all @value{emacsname} download sites are
|
||||
added to @code{tramp-default-method-alist} with default method
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
@c In the Tramp CVS, the version number is auto-frobbed from
|
||||
@c configure.ac, so you should edit that file and run
|
||||
@c "autoconf && ./configure" to change the version number.
|
||||
@set trampver 2.2.9-24.4
|
||||
@set trampver 2.2.10
|
||||
|
||||
@c Other flags from configuration
|
||||
@set instprefix /usr/local
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
2014-06-24 Eli Barzilay <eli@barzilay.org>
|
||||
|
||||
* NEWS: calculator.el user-visible changes.
|
||||
|
||||
2014-06-15 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* NEWS: New Tramp method "nc".
|
||||
|
||||
2014-06-08 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* themes/deeper-blue-theme.el: Use another fix. (Bug#17695)
|
||||
|
|
21
etc/NEWS
21
etc/NEWS
|
@ -46,6 +46,8 @@ Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to.
|
|||
|
||||
* Changes in Emacs 24.5
|
||||
|
||||
** New var `truncate-string-ellipsis' to choose how to indicate truncation.
|
||||
|
||||
---
|
||||
** The default value of `history-length' has increased to 100.
|
||||
|
||||
|
@ -72,8 +74,13 @@ performance improvements when pasting large amounts of text.
|
|||
|
||||
* Changes in Specialized Modes and Packages in Emacs 24.5
|
||||
|
||||
** Rectangle Mark mode can now have corners past EOL or in the middle of a TAB.
|
||||
Also C-x C-x in rectangle-mark-mode now cycles through the four corners.
|
||||
** Lisp mode
|
||||
*** Strings after `:documentation' are highlighted as docstrings.
|
||||
|
||||
** Rectangle editing
|
||||
*** Rectangle Mark mode can have corners past EOL or in the middle of a TAB.
|
||||
*** C-x C-x in rectangle-mark-mode now cycles through the four corners.
|
||||
*** `string-rectangle' provides on-the-fly preview of the result.
|
||||
|
||||
** New font-lock functions font-lock-ensure and font-lock-flush, which
|
||||
should be used instead of font-lock-fontify-buffer when called from Elisp.
|
||||
|
@ -89,6 +96,8 @@ should be used instead of font-lock-fontify-buffer when called from Elisp.
|
|||
*** Calendar can list and mark diary entries with Chinese dates.
|
||||
See `diary-chinese-list-entries' and `diary-chinese-mark-entries'.
|
||||
|
||||
** New ERT function `ert-summarize-tests-batch-and-exit'.
|
||||
|
||||
---
|
||||
** The Rmail commands d, C-d and u now handle repeat counts to delete or
|
||||
undelete multiple messages.
|
||||
|
@ -102,6 +111,14 @@ specify the type of shell in use (bash, csh, etc).
|
|||
When `url-handler-mode' is enabled, file operations for these
|
||||
protocols as well as for "telnet" and "ftp" are passed to Tramp.
|
||||
|
||||
** Tramp
|
||||
|
||||
*** New connection method "nc", which allows to access dumb busyboxes.
|
||||
|
||||
** Calculator: decimal display mode uses "," groups, so it's more
|
||||
fitting for use in money calculations; factorial works with
|
||||
non-integer inputs.
|
||||
|
||||
** Obsolete packages
|
||||
|
||||
---
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
2014-06-26 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (blessmail): Depend on lisp/mail/blessmail.el.
|
||||
Use $<, $@.
|
||||
(regex.o, etags${EXEEXT}, ctags${EXEEXT}, ebrowse${EXEEXT})
|
||||
(profile${EXEEXT}, make-docfile${EXEEXT}, movemail${EXEEXT})
|
||||
(pop.o, emacsclient${EXEEXT}, emacsclientw${EXEEXT}, ntlib.o)
|
||||
(hexl${EXEEXT}, update-game-score${EXEEXT}, emacsclient.res): Use $<.
|
||||
(ctags${EXEEXT}): Add $srcdir to dependency rather than using VPATH.
|
||||
|
||||
2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Omit redundant extern decls.
|
||||
* emacsclient.c (getenv): Remove decl.
|
||||
* make-docfile.c (write_globals): Add ATTRIBUTE_CONST for
|
||||
Fbyteorder, Ftool_bar_height, Fmax_char, Fidentity.
|
||||
|
||||
2014-06-15 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (LDFLAGS): Explicitly set via configure.
|
||||
|
||||
2014-06-15 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* Makefile.in (CPPFLAGS): Define.
|
||||
|
||||
2014-06-15 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (../lib/libgnu.a):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
### @configure_input@
|
||||
|
||||
# Copyright (C) 1985, 1987-1988, 1993-1994, 2001-2014 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1985, 1987-1988, 1993-1994, 2001-2014
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
# This file is part of GNU Emacs.
|
||||
|
||||
|
@ -28,6 +28,9 @@ EMACSOPT = -batch --no-site-file --no-site-lisp
|
|||
|
||||
CC=@CC@
|
||||
CFLAGS=@CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
|
||||
version=@version@
|
||||
## Used in $archlibdir.
|
||||
configuration=@configuration@
|
||||
|
@ -192,6 +195,7 @@ BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
|
|||
-I${srcdir} -I${srcdir}/../src -I${srcdir}/../lib
|
||||
|
||||
ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
|
||||
## Unused.
|
||||
LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS}
|
||||
CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS}
|
||||
|
||||
|
@ -207,9 +211,9 @@ $(EXE_FILES): ../lib/libgnu.a
|
|||
|
||||
## Only used if we need blessmail, but no harm in always defining.
|
||||
## This makes the actual blessmail executable.
|
||||
blessmail:
|
||||
$(EMACS) $(EMACSOPT) -l $(srcdir)/../lisp/mail/blessmail.el
|
||||
chmod +x blessmail
|
||||
blessmail: $(srcdir)/../lisp/mail/blessmail.el
|
||||
$(EMACS) $(EMACSOPT) -l $<
|
||||
chmod +x $@
|
||||
|
||||
## This checks if we need to run blessmail.
|
||||
## Do not charge ahead and do it! Let the installer decide.
|
||||
|
@ -307,7 +311,7 @@ TAGS: etags${EXEEXT}
|
|||
$(MAKE) -C ../lib libgnu.a
|
||||
|
||||
regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h)
|
||||
${CC} -c ${CPP_CFLAGS} ${srcdir}/../src/regex.c
|
||||
${CC} -c ${CPP_CFLAGS} $<
|
||||
|
||||
|
||||
etags_deps = ${srcdir}/etags.c regex.o $(NTLIB) $(config_h)
|
||||
|
@ -315,42 +319,41 @@ etags_cflags = -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" -o $@
|
|||
etags_libs = regex.o $(LOADLIBES) $(NTLIB)
|
||||
|
||||
etags${EXEEXT}: ${etags_deps}
|
||||
$(CC) ${ALL_CFLAGS} $(etags_cflags) $(srcdir)/etags.c $(etags_libs)
|
||||
$(CC) ${ALL_CFLAGS} $(etags_cflags) $< $(etags_libs)
|
||||
|
||||
## ctags.c is distinct from etags.c so that parallel makes do not write two
|
||||
## etags.o files on top of each other.
|
||||
## FIXME?
|
||||
## Can't we use a wrapper that calls 'etags --ctags'?
|
||||
ctags${EXEEXT}: ctags.c ${etags_deps}
|
||||
$(CC) ${ALL_CFLAGS} $(etags_cflags) $(srcdir)/ctags.c $(etags_libs)
|
||||
ctags${EXEEXT}: ${srcdir}/ctags.c ${etags_deps}
|
||||
$(CC) ${ALL_CFLAGS} $(etags_cflags) $< $(etags_libs)
|
||||
|
||||
ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(NTLIB) \
|
||||
$(config_h)
|
||||
$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \
|
||||
${srcdir}/ebrowse.c $(LOADLIBES) $(NTLIB) -o $@
|
||||
$< $(LOADLIBES) $(NTLIB) -o $@
|
||||
|
||||
profile${EXEEXT}: ${srcdir}/profile.c $(NTLIB) $(config_h)
|
||||
$(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \
|
||||
$(CC) ${ALL_CFLAGS} $< \
|
||||
$(LOADLIBES) $(NTLIB) $(LIB_CLOCK_GETTIME) -o $@
|
||||
|
||||
make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(NTLIB) $(config_h)
|
||||
$(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) $(NTLIB) \
|
||||
-o $@
|
||||
$(CC) ${ALL_CFLAGS} $< $(LOADLIBES) $(NTLIB) -o $@
|
||||
|
||||
movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(NTLIB) $(config_h)
|
||||
$(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \
|
||||
$(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} $< pop.o \
|
||||
$(LOADLIBES) $(NTLIB) $(LIBS_MOVE) -o $@
|
||||
|
||||
pop.o: ${srcdir}/pop.c ${srcdir}/pop.h ${srcdir}/../lib/min-max.h $(config_h)
|
||||
$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c
|
||||
$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} $<
|
||||
|
||||
emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(config_h)
|
||||
$(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \
|
||||
$(CC) ${ALL_CFLAGS} $< \
|
||||
-DVERSION="\"${version}\"" $(NTLIB) $(LOADLIBES) $(LIB_FDATASYNC) \
|
||||
$(LIB_WSOCK32) $(LIBS_ECLIENT) -o $@
|
||||
|
||||
emacsclientw${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(CLIENTRES) $(config_h)
|
||||
$(CC) ${ALL_CFLAGS} $(CLIENTRES) -mwindows ${srcdir}/emacsclient.c \
|
||||
$(CC) ${ALL_CFLAGS} $(CLIENTRES) -mwindows $< \
|
||||
-DVERSION="\"${version}\"" $(LOADLIBES) $(LIB_FDATASYNC) \
|
||||
$(LIB_WSOCK32) $(LIBS_ECLIENT) -o $@
|
||||
|
||||
|
@ -362,18 +365,16 @@ NTDEPS = $(NTINC)/ms-w32.h $(NTINC)/sys/stat.h $(NTINC)/inttypes.h \
|
|||
# The dependency on $(NTDEPS) is a trick intended to cause recompile of
|
||||
# programs on MinGW whenever some private header in nt/inc is modified.
|
||||
ntlib.o: ${srcdir}/ntlib.c ${srcdir}/ntlib.h $(NTDEPS)
|
||||
$(CC) -c ${CPP_CFLAGS} ${srcdir}/ntlib.c
|
||||
$(CC) -c ${CPP_CFLAGS} $<
|
||||
|
||||
hexl${EXEEXT}: ${srcdir}/hexl.c $(NTLIB) $(config_h)
|
||||
$(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o $@
|
||||
$(CC) ${ALL_CFLAGS} $< $(LOADLIBES) -o $@
|
||||
|
||||
update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB) $(config_h)
|
||||
$(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \
|
||||
${srcdir}/update-game-score.c $(LOADLIBES) $(NTLIB) \
|
||||
-o $@
|
||||
$< $(LOADLIBES) $(NTLIB) -o $@
|
||||
|
||||
emacsclient.res: $(NTINC)/../emacsclient.rc
|
||||
$(WINDRES) -O coff --include-dir=$(NTINC)/.. -o $@ \
|
||||
$(NTINC)/../emacsclient.rc
|
||||
$(WINDRES) -O coff --include-dir=$(NTINC)/.. -o $@ $<
|
||||
|
||||
## Makefile ends here.
|
||||
|
|
|
@ -82,10 +82,6 @@ char *w32_getenv (char *);
|
|||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
|
||||
char *getenv (const char *);
|
||||
|
||||
#ifndef VERSION
|
||||
#define VERSION "unspecified"
|
||||
#endif
|
||||
|
|
|
@ -665,6 +665,7 @@ write_globals (void)
|
|||
|| strcmp (globals[i].name, "Fexit_recursive_edit") == 0
|
||||
|| strcmp (globals[i].name, "Fabort_recursive_edit") == 0)
|
||||
fprintf (outfile, "_Noreturn ");
|
||||
|
||||
fprintf (outfile, "EXFUN (%s, ", globals[i].name);
|
||||
if (globals[i].value == -1)
|
||||
fprintf (outfile, "MANY");
|
||||
|
@ -672,7 +673,17 @@ write_globals (void)
|
|||
fprintf (outfile, "UNEVALLED");
|
||||
else
|
||||
fprintf (outfile, "%d", globals[i].value);
|
||||
fprintf (outfile, ");\n");
|
||||
fprintf (outfile, ")");
|
||||
|
||||
/* It would be nice to have a cleaner way to deal with these
|
||||
special hacks, too. */
|
||||
if (strcmp (globals[i].name, "Fbyteorder") == 0
|
||||
|| strcmp (globals[i].name, "Ftool_bar_height") == 0
|
||||
|| strcmp (globals[i].name, "Fmax_char") == 0
|
||||
|| strcmp (globals[i].name, "Fidentity") == 0)
|
||||
fprintf (outfile, " ATTRIBUTE_CONST");
|
||||
|
||||
fprintf (outfile, ";\n");
|
||||
}
|
||||
|
||||
while (i + 1 < num_globals
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
Written by Paul Eggert. */
|
||||
|
||||
#ifndef _GL_ACL_H
|
||||
#define _GL_ACL_H 1
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -28,3 +31,5 @@ int set_acl (char const *, int, mode_t);
|
|||
int qcopy_acl (char const *, int, char const *, int, mode_t);
|
||||
int copy_acl (char const *, int, char const *, int, mode_t);
|
||||
int chmod_or_fchmod (char const *, int, mode_t);
|
||||
|
||||
#endif
|
||||
|
|
564
lisp/ChangeLog
564
lisp/ChangeLog
|
@ -8,6 +8,553 @@
|
|||
* international/characters.el: Add category "^" to all
|
||||
non-spacing characters.
|
||||
|
||||
2014-06-28 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (doit): Remove force rule.
|
||||
(custom-deps, finder-data, autoloads, update-subdirs)
|
||||
(compile-one-process): PHONY targets do not need force rules.
|
||||
|
||||
* Makefile.in (compile-main, compile, compile-always):
|
||||
No need to explicitly pass variables to ourself in recursive calls.
|
||||
|
||||
2014-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* files.el (minibuffer-with-setup-hook): Evaluate the first arg eagerly.
|
||||
|
||||
2014-06-26 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (update-authors): Update for moved authors.el.
|
||||
|
||||
2014-06-26 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* skeleton.el (skeleton-end-hook): Default to nil and move the
|
||||
work to skeleton-insert. (Bug#17850)
|
||||
|
||||
2014-06-26 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* calc/calc-alg.el (math-beforep):
|
||||
* progmodes/cc-guess.el (c-guess-view-reorder-offsets-alist-in-style):
|
||||
Simplify because string-lessp can accept symbols as args.
|
||||
|
||||
2014-06-26 Daiki Ueno <ueno@gnu.org>
|
||||
|
||||
* emacs-lisp/package.el (package--check-signature):
|
||||
If package-check-signature is allow-unsigned, don't signal error when
|
||||
we can't verify signature because of missing public key
|
||||
(bug#17625).
|
||||
|
||||
2014-06-26 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* emacs-lisp/cl-macs.el (help-add-fundoc-usage):
|
||||
Remove outdated declaration.
|
||||
|
||||
* emacs-lisp/authors.el (authors-valid-file-names)
|
||||
(authors-renamed-files-alist): Additions.
|
||||
|
||||
2014-06-26 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* textmodes/picture.el (picture-set-tab-stops):
|
||||
* ruler-mode.el (ruler-mode-mouse-add-tab-stop)
|
||||
(ruler-mode-ruler): Fix to work with nil tab-stop-list.
|
||||
|
||||
* progmodes/asm-mode.el (asm-calculate-indentation):
|
||||
Use indent-next-tab-stop.
|
||||
|
||||
* indent.el (indent-accumulate-tab-stops): New function.
|
||||
|
||||
2014-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/package.el (package-list-unsigned): New var (bug#17625).
|
||||
(package-desc-status): Obey it.
|
||||
|
||||
2014-06-26 Stephen Berman <stephen.berman@gmx.net>
|
||||
|
||||
* calendar/todo-mode.el: Fix two bugs.
|
||||
(todo-insert-item--basic): If user cancels item insertion to
|
||||
another category before setting priority, show original category
|
||||
whether it is in the same or a different file.
|
||||
(todo-set-item-priority): After selecting category, instead of
|
||||
moving point to top, which extends an active region, restore it.
|
||||
|
||||
2014-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* help-fns.el (describe-function-1): Check file-name is a string before
|
||||
calling help-fns--autoloaded-p (bug#17564).
|
||||
|
||||
2014-06-26 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* desktop.el (desktop-auto-save-enable)
|
||||
(desktop-auto-save-disable): New functions.
|
||||
(desktop-save-mode, desktop-auto-save-timeout): Use them.
|
||||
(desktop-read): Disable the autosave before loading the desktop,
|
||||
and enable afterwards. (Bug#17351)
|
||||
|
||||
2014-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
Fix some indentation problem with \; and pipes (bug#17842).
|
||||
* progmodes/sh-script.el (sh-mode-syntax-table): Set syntax of ;|&.
|
||||
(sh-smie--default-forward-token, sh-smie--default-backward-token):
|
||||
New functions.
|
||||
(sh-smie-sh-forward-token, sh-smie-sh-backward-token)
|
||||
(sh-smie-rc-forward-token, sh-smie-rc-backward-token): Use them.
|
||||
(sh-smie-sh-rules): Fix indentation of a pipe at BOL.
|
||||
|
||||
2014-06-26 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* emacs-lisp/find-func.el (find-function-C-source-directory):
|
||||
Use file-accessible-directory-p.
|
||||
|
||||
* ps-samp.el: Make it slightly less awful.
|
||||
(ps-rmail-mode-hook, ps-gnus-article-prepare-hook, ps-vm-mode-hook):
|
||||
(ps-gnus-summary-setup, ps-info-mode-hook): Use [print] key.
|
||||
Only set local values.
|
||||
(ps-article-subject, ps-article-author): Use standard functions
|
||||
like mail-fetch-field.
|
||||
(ps-info-file, ps-info-node): Use match-string.
|
||||
(ps-jts-ps-setup, ps-jack-setup): Remove, merging into...
|
||||
(ps-samp-ps-setup): ... new function.
|
||||
|
||||
* progmodes/idlw-shell.el (idlwave-shell-make-temp-file):
|
||||
Optimize away code unneeded on any modern Emacs.
|
||||
|
||||
* emacs-lisp/authors.el: Move to ../admin.
|
||||
|
||||
* emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): New.
|
||||
|
||||
2014-06-26 Luke Lee <luke.yx.lee@gmail.com>
|
||||
|
||||
* progmodes/hideif.el (hif-string-to-number): Fix return value bug.
|
||||
(hif-simple-token-only, hif-tokenize): Comment in detail mainly for
|
||||
performance enhancements.
|
||||
(hif-parse-if-exp): Rename to `hif-parse-exp'. Enhance for macro
|
||||
expansion.
|
||||
(hif-factor, hif-string-concatenation, intern-safe): Support string
|
||||
concatenation and argumented macro expansion.
|
||||
(hif-if-valid-identifier-p, hif-define-operator, hif-flatten)
|
||||
(hif-expand-token-list, hif-get-argument-list, hif-define-macro)
|
||||
(hif-delimit, hif-macro-supply-arguments, hif-invoke, hif-canonicalize)
|
||||
(hif-canonicalize-tokens, hif-place-macro-invocation)
|
||||
(hif-parse-macro-arglist): Mostly new functions for supporting
|
||||
argumented macro expansion.
|
||||
(hif-string-concatenation, hif-stringify, hif-token-concat)
|
||||
(hif-token-stringification, hif-token-concatenation):
|
||||
Stringification and concatenation.
|
||||
(hif-find-next-relevant): Fix comments.
|
||||
(hif-ifdef-to-endif, hif-looking-at-elif, hif-hide-line): Bug fix for
|
||||
some cases involving #elif.
|
||||
(hif-find-define, hif-add-new-defines): New functions for automatically
|
||||
scanning of defined symbols.
|
||||
(hide-ifdef-guts): Fix for defined symbol auto scanning.
|
||||
(hide-ifdef-undef): Fix behavior to match CPP.
|
||||
|
||||
2014-06-25 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in ($(lisp)/progmodes/cc-defs.elc)
|
||||
($(lisp)/progmodes/cc-fonts.elc, $(lisp)/progmodes/cc-langs.elc)
|
||||
($(lisp)/progmodes/cc-vars.elc): Drop hand-written deps on non-cc
|
||||
files. They are not relevant to the original issue (bug#1004),
|
||||
and cause unnecessary recompilation (bug#2151).
|
||||
|
||||
2014-06-25 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* play/landmark.el: Use lexical-binding and avoid `intangible'.
|
||||
(landmark--last-pos): New var.
|
||||
(landmark--intangible-chars): New const.
|
||||
(landmark--intangible): New function.
|
||||
(landmark-mode, landmark-move): Use it.
|
||||
(landmark-mode): Remove properties.
|
||||
(landmark-plot-square, landmark-point-square, landmark-goto-xy)
|
||||
(landmark-cross-qtuple):
|
||||
Don't worry about `intangible' any more.
|
||||
(landmark-click, landmark-point-y): Same; and don't assume point-min==1.
|
||||
(landmark-init-display): Don't set `intangible' and `point-entered'.
|
||||
(square): Remove. Inline it instead.
|
||||
(landmark--distance): Rename from `distance'.
|
||||
(landmark-calc-distance-of-robot-from): Rename from
|
||||
calc-distance-of-robot-from.
|
||||
(landmark-calc-smell-internal): Rename from calc-smell-internal.
|
||||
|
||||
2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* files.el (dir-locals-find-file, file-relative-name):
|
||||
* info.el (Info-complete-menu-item):
|
||||
* minibuffer.el (completion-table-subvert): Prefer string-prefix-p
|
||||
to compare-strings to avoid out-of-range errors.
|
||||
* subr.el (string-prefix-p): Adjust to match strict range
|
||||
checking in compare-strings.
|
||||
|
||||
2014-06-24 Leonard Randall <leonard.a.randall@gmail.com> (tiny change)
|
||||
|
||||
* textmodes/reftex-parse.el (reftex-using-biblatex-p): Make search
|
||||
for comment lines non-greedy and stopping at newlines to fix stack
|
||||
overflows with large files.
|
||||
|
||||
2014-06-24 Eli Barzilay <eli@barzilay.org>
|
||||
|
||||
* calculator.el (calculator-last-input): Drop 'ascii-character property
|
||||
lookup.
|
||||
|
||||
2014-06-24 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* align.el (align-adjust-col-for-rule): Unbreak due to defaulting
|
||||
tab-stop-list to nil. (Bug#16381)
|
||||
|
||||
* indent.el (indent-next-tab-stop): Rename from indent--next-tab-stop.
|
||||
(indent-rigidly-left-to-tab-stop)
|
||||
(indent-rigidly-right-to-tab-stop, tab-to-tab-stop)
|
||||
(move-to-tab-stop): Change callers.
|
||||
|
||||
2014-06-24 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* skeleton.el (skeleton-insert): Yet another fix of the doc string
|
||||
wrt behavior of \n as the first/last element of a skeleton.
|
||||
|
||||
2014-06-24 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp-adb.el (tramp-adb-handle-process-file):
|
||||
* net/tramp-sh.el (tramp-sh-handle-process-file):
|
||||
* net/tramp-smb.el (tramp-smb-handle-process-file): Do not raise
|
||||
the output buffer when DISPLAY is non-nil. (Bug#17815)
|
||||
|
||||
2014-06-24 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* play/landmark.el (landmark-move-down, landmark-move-up):
|
||||
Fix 2007-10-20 change - preserve horizontal position.
|
||||
|
||||
2014-06-23 Sam Steingold <sds@gnu.org>
|
||||
|
||||
* simple.el (kill-append): Remove undo boundary depending on ...
|
||||
(kill-append-merge-undo): New user option.
|
||||
|
||||
2014-06-23 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* simple.el (handle-shift-selection, exchange-point-and-mark)
|
||||
(activate-mark): Set transient-mark-mode buffer-locally (bug#6316).
|
||||
(transient-mark-mode): Use&set the global value.
|
||||
* mouse.el (mouse-set-region-1, mouse-drag-track): Idem.
|
||||
* emulation/edt.el (edt-emulation-off): Save&restore the global
|
||||
transient-mark-mode setting.
|
||||
* obsolete/pc-select.el (pc-selection-mode): Use the
|
||||
transient-mark-mode function.
|
||||
|
||||
2014-06-23 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* international/fontset.el (script-representative-chars):
|
||||
Add representative characters for scripts added in Unicode 7.0.
|
||||
(otf-script-alist): Synchronize with the latest registry of OTF
|
||||
script tags.
|
||||
|
||||
* international/characters.el (char-script-table): Update for
|
||||
scripts added and codepoint ranges changed in Unicode 7.0.
|
||||
|
||||
2014-06-23 Eli Barzilay <eli@barzilay.org>
|
||||
|
||||
* calculator.el (calculator-standard-displayer): Fix bug in use of
|
||||
`calculator-groupize-number'.
|
||||
(calculator-funcall): Fix broken `cl-flet' use by moving it into the
|
||||
`eval' code, so it works in v24.3.1 too.
|
||||
(calculator-last-input): Comment to clarify purpose.
|
||||
|
||||
2014-06-22 Mario Lang <mlang@delysid.org>
|
||||
|
||||
* textmodes/rst.el (rst-comment-region): From from -> from.
|
||||
|
||||
* net/tramp-adb.el (tramp-adb-send-command-and-check): And and -> and.
|
||||
|
||||
2013-06-22 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* electric.el (electric-layout-post-self-insert-function):
|
||||
* emacs-lisp/ert.el (ert--insert-infos):
|
||||
* obsolete/vi.el (vi-set-mark):
|
||||
* term.el (term-handle-scroll):
|
||||
* textmodes/bibtex.el (bibtex-fill-field, bibtex-fill-entry):
|
||||
* wid-edit.el (widget-editable-list-value-create):
|
||||
Prefer point-marker to copy-marker of point.
|
||||
|
||||
2014-06-21 Fabián Ezequiel Gallina <fgallina@gnu.org>
|
||||
|
||||
Fix completion retrieval parsing (bug#17209).
|
||||
* progmodes/python.el (python-mode):
|
||||
(python-util-strip-string): New function.
|
||||
(python-shell-completion-get-completions): Use it.
|
||||
|
||||
2014-06-21 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* skeleton.el (skeleton-insert): Fix last change.
|
||||
|
||||
2014-06-21 Fabián Ezequiel Gallina <fgallina@gnu.org>
|
||||
|
||||
Enhancements for outline integration (bug#17796).
|
||||
* progmodes/python.el (python-mode): Properly set
|
||||
outline-heading-end-regexp so that comments after colons for
|
||||
defuns are supported.
|
||||
|
||||
2014-06-21 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* skeleton.el (skeleton-insert): Doc fix.
|
||||
|
||||
2014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/smie.el (smie-config--guess): Fix typo.
|
||||
(smie-config-guess): Use smie-config-local so the rules are obeyed
|
||||
(bug#17818).
|
||||
|
||||
* mouse.el (mouse-drag-line): Don't re-add to unread-comment-events,
|
||||
since it's already done inside the loop (bug#17819).
|
||||
|
||||
2014-06-21 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* mouse.el (mouse-drag-line): Re-remove code initially removed
|
||||
on 2013-03-09 and inadvertently reintroduced on 2013-11-30
|
||||
(Bug#17819).
|
||||
|
||||
2014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/sh-script.el (sh-smie-sh-rules): For { after &&, don't
|
||||
align with the surrounding parent (bug#17721).
|
||||
|
||||
2014-06-21 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* textmodes/texinfo.el (texinfo-mode): Set skeleton-end-newline
|
||||
locally to nil.
|
||||
(texinfo-insert-block, texinfo-insert-@end)
|
||||
(texinfo-insert-@example, texinfo-insert-@quotation): Adjust to
|
||||
local setting of skeleton-end-newline by adding an explicit \n to
|
||||
the skeletons where appropriate. (Bug#17801)
|
||||
|
||||
2014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/smie.el (smie--hanging-eolp-function): New var.
|
||||
(smie-indent--hanging-p): Use it.
|
||||
* progmodes/sh-script.el (sh-set-shell): Set it (bug#17621).
|
||||
|
||||
2014-06-21 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* simple.el (read-quoted-char): Don't let help chars pop up help
|
||||
buffer. (Bug#16617)
|
||||
|
||||
2014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/sh-script.el (sh-smie-sh-rules): Use same rule for && as
|
||||
for | (bug#17621).
|
||||
|
||||
* xt-mouse.el (xterm-mouse--read-event-sequence-1000):
|
||||
Drop unknown events instead of burping.
|
||||
|
||||
2014-06-21 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* term/w32-win.el (dynamic-library-alist): Support giflib 5.1.0
|
||||
and later. (Bug#17790)
|
||||
|
||||
2014-06-21 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* dired.el (dired-mark-pop-up): Let-bind display-buffer-mark-dedicated
|
||||
to `soft'. (Bug#17554)
|
||||
|
||||
2014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* delsel.el (electric-newline-and-maybe-indent): Mark it as well
|
||||
(bug#17737).
|
||||
|
||||
2014-06-21 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Don't fontify
|
||||
`!' in `!~' with `font-lock-negation-char-face'. (Bug#17732)
|
||||
|
||||
2014-06-21 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/dbus.el (dbus-call-method): Push only non D-Bus events into
|
||||
`unread-command-events'.
|
||||
|
||||
2014-06-19 William Xu <william.xwl@gmail.com>
|
||||
|
||||
* progmodes/hideif.el (hif-string-to-number): Don't return float for
|
||||
hex integer constants (bug#17807).
|
||||
|
||||
2014-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* international/mule-util.el (truncate-string-ellipsis): New var.
|
||||
(truncate-string-to-width): Use it.
|
||||
|
||||
2014-06-19 Robert Brown <robert.brown@gmail.com> (tiny change)
|
||||
|
||||
* emacs-lisp/lisp-mode.el (lisp-string-after-doc-keyword-p): New fun.
|
||||
(lisp-string-in-doc-position-p): New function, extracted from
|
||||
lisp-font-lock-syntactic-face-function.
|
||||
(lisp-font-lock-syntactic-face-function): Use them (bug#9130).
|
||||
|
||||
2014-06-19 Grégoire Jadi <daimrod@gmail.com>
|
||||
|
||||
* net/rcirc.el (rcirc-omit-mode): Fix recenter error. (Bug#17769)
|
||||
|
||||
2014-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* play/bubbles.el (bubbles--initialize, bubbles--show-scores)
|
||||
(bubbles--game-over): Don't add `intangible' properties since they
|
||||
didn't work anyway.
|
||||
|
||||
2014-06-18 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* vc/ediff-init.el (ediff-current-diff-Ancestor)
|
||||
(ediff-fine-diff-Ancestor, ediff-even-diff-A, ediff-even-diff-B)
|
||||
(ediff-even-diff-C, ediff-even-diff-Ancestor, ediff-odd-diff-A)
|
||||
(ediff-odd-diff-B, ediff-odd-diff-C, ediff-odd-diff-Ancestor):
|
||||
Add `min-colors 88' version with removed black/white foregrounds.
|
||||
(Bug#10181)
|
||||
|
||||
2014-06-18 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* vc/diff-mode.el (diff-changed): Empty face definition to use
|
||||
`diff-removed' and `diff-added' on tty as well. (Bug#10181)
|
||||
(diff-context): Use darker color on light background and
|
||||
lighter color on dark background.
|
||||
|
||||
2014-06-18 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* vc/diff-mode.el (diff-refine-changed): Rename from
|
||||
`diff-refine-change' for consistency with `diff-changed'.
|
||||
(diff-refine-change): Add obsolete face alias. (Bug#10181)
|
||||
|
||||
* vc/smerge-mode.el (smerge-refined-changed): Rename from
|
||||
`smerge-refined-change'.
|
||||
(smerge-refined-change): Add obsolete face alias.
|
||||
|
||||
2014-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* rect.el (rectangle-preview): New custom.
|
||||
(rectangle): New group.
|
||||
(rectangle--pos-cols): Add `window' argument.
|
||||
(rectangle--string-preview-state, rectangle--string-preview-window):
|
||||
New vars.
|
||||
(rectangle--string-flush-preview, rectangle--string-erase-preview)
|
||||
(rectangle--space-to, rectangle--string-preview): New functions.
|
||||
(string-rectangle): Use them.
|
||||
(rectangle--inhibit-region-highlight): New var.
|
||||
(rectangle--highlight-for-redisplay): Obey it. Make sure
|
||||
`apply-on-region' uses the point-crutches of the right window.
|
||||
Use :align-to rather than multiple spaces.
|
||||
|
||||
2014-06-16 Andrea Rossetti <andrea.rossetti@gmail.com> (tiny change)
|
||||
|
||||
* ruler-mode.el (ruler-mode-window-col)
|
||||
(ruler-mode-mouse-set-left-margin)
|
||||
(ruler-mode-mouse-set-right-margin): Fix calculation of column
|
||||
from mouse position (Bug#17768).
|
||||
|
||||
2014-06-16 Ron Schnell <ronnie@driver-aces.com>
|
||||
|
||||
* play/dunnet.el (dun-doassign): Fix bug where UNIX variable assignment
|
||||
without varname or rhs causes crash.
|
||||
(dun-ftp): Fix bug where blank ftp password is allowed, making it
|
||||
impossible to win endgame.
|
||||
(dun-unix-verbs): Add ssh as alias to rlogin, because nobody knows what
|
||||
rlogin is anymore.
|
||||
(dun-help): Bump version number; update contact info.
|
||||
|
||||
2014-06-15 Eli Barzilay <eli@barzilay.org>
|
||||
|
||||
* calculator.el (calculator-prompt, calculator-remove-zeros)
|
||||
(calculator-mode-hook, calculator-operators, calculator-stack)
|
||||
(calculator-mode): Tweak docstring.
|
||||
(calculator-user-operators): Tweak docstring, fix a bug in the last
|
||||
example.
|
||||
(calculator-displayer): `std' case has an optional boolean.
|
||||
(calculator-displayers): Use the new boolean to group in decimal mode.
|
||||
(calculator-mode-map, calculator, calculator-message)
|
||||
(calculator-op-arity, calculator-add-operators)
|
||||
(calculator-string-to-number, calculator-displayer-prev)
|
||||
(calculator-displayer-next, calculator-remove-zeros)
|
||||
(calculator-eng-display, calculator-number-to-string)
|
||||
(calculator-update-display, calculator-last-input)
|
||||
(calculator-clear-fragile, calculator-digit, calculator-decimal)
|
||||
(calculator-exp, calculator-saved-move, calculator-clear)
|
||||
(calculator-copy, calculator-put-value, calculator-help)
|
||||
(calculator-expt, calculator-truncate): Minor code improvements.
|
||||
(calculator-need-3-lines): New function pulling out code from
|
||||
`calculator'.
|
||||
(calculator-get-display): Rename from `calculator-get-prompt', and
|
||||
improved.
|
||||
(calculator-push-curnum): Rename from `calculator-curnum-value', and
|
||||
extended for all uses of it. All callers changed.
|
||||
(calculator-groupize-number): New utility for splitting a number into
|
||||
groups.
|
||||
(calculator-standard-displayer): Improve code, new optional argument to
|
||||
use comma-split groups, make second argument optional too to use with
|
||||
'left/'right inputs. All callers changed.
|
||||
(calculator-reduce-stack-once): New utility, doing the meat of what
|
||||
`calculator-reduce-stack' used to do, much improved (mostly using
|
||||
`pcase' for conciseness and clarity).
|
||||
(calculator-reduce-stack): Now doing just the reduction loop using
|
||||
`calculator-reduce-stack-once'.
|
||||
(calculator-funcall): Improve code, make it work in v24.3.1 too.
|
||||
(calculator-last-input): Improve code, remove some old cruft.
|
||||
(calculator-quit): Kill `calculator-buffer' in electric mode too.
|
||||
(calculator-integer-p): Remove.
|
||||
(calculator-fact): Improve code, make it work on non-integer values
|
||||
too (using truncated numbers).
|
||||
|
||||
2014-06-15 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
Sync with Tramp 2.2.10.
|
||||
|
||||
* net/tramp.el (tramp-methods): Tweak docstring.
|
||||
(tramp-handle-file-accessible-directory-p): Check for
|
||||
`file-readable-p' instead of `file-executable-p'.
|
||||
(tramp-check-cached-permissions):
|
||||
Use `tramp-compat-file-attributes'.
|
||||
(tramp-call-process): Add new argument VEC. Adapt callees in all
|
||||
tramp*.el files.
|
||||
|
||||
* net/tramp-adb.el (tramp-adb-handle-write-region): Improve messages.
|
||||
(tramp-adb-maybe-open-connection): Don't set
|
||||
`tramp-current-*' variables.
|
||||
|
||||
* net/tramp-cache.el (tramp-flush-file-function): Do not flush
|
||||
file properties of temporary buffers.
|
||||
|
||||
* net/tramp-ftp.el (top): Remove special handling for URL syntax.
|
||||
|
||||
* net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add.
|
||||
(tramp-gvfs-handle-delete-file): Flush file
|
||||
properties, not directory properties.
|
||||
(tramp-gvfs-handle-file-attributes): Use `string-to-number' when
|
||||
reading "unix::mode".
|
||||
(tramp-gvfs-handle-file-name-all-completions):
|
||||
Use "-h" option for "gvfs-ls".
|
||||
(tramp-gvfs-url-file-name): `user' and `localname' could be nil.
|
||||
(tramp-gvfs-send-command): Simplify traces.
|
||||
|
||||
* net/tramp-sh.el (vc-handled-backends, vc-bzr-program)
|
||||
(vc-git-program, vc-hg-program): Declare.
|
||||
(tramp-methods) <sftp>: Remove. It has never worked satisfactorily.
|
||||
(tramp-methods) <nc>: Add new method.
|
||||
(tramp-methods) <telnet>: Redirect stderr to "/dev/null".
|
||||
(tramp-methods) <plink, plinkx, pscp, psftp>: Improve
|
||||
`tramp-login-args'.
|
||||
(tramp-default-user-alist): Add "nc".
|
||||
(top): Remove completion function for "sftp". Add completion
|
||||
functions for "nc" and "psftp".
|
||||
(tramp-do-copy-or-rename-file-out-of-band): Tweak docstring.
|
||||
Implement support for "nc" method.
|
||||
(tramp-sh-handle-expand-file-name, tramp-local-coding-commands)
|
||||
(tramp-remote-coding-commands, tramp-call-local-coding-command):
|
||||
Tweak docstring.
|
||||
(tramp-sh-handle-write-region): Tweak error message.
|
||||
(tramp-sh-handle-vc-registered): Remove backends when the remote
|
||||
binary does not exist.
|
||||
(tramp-find-inline-encoding): Do not raise an error.
|
||||
(tramp-make-copy-program-file-name): Tweak docstring. Handle also
|
||||
the "nc" case. Quote result also locally.
|
||||
|
||||
* net/tramp-smb.el (tramp-smb-handle-copy-directory)
|
||||
(tramp-smb-handle-set-file-acl): Use `start-process'.
|
||||
(tramp-smb-handle-insert-directory): Use progress reporter.
|
||||
(tramp-smb-handle-rename-file): Flush also file properties of
|
||||
FILENAME.
|
||||
|
||||
* net/trampver.el: Update release number.
|
||||
>>>>>>> MERGE-SOURCE
|
||||
|
||||
2014-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* ses.el: Miscellaneous cleanups; use lexical-binding; avoid
|
||||
|
@ -78,7 +625,8 @@
|
|||
|
||||
2014-06-14 Ron Schnell <ronnie@driver-aces.com>
|
||||
|
||||
* play/dunnet.el If a lamp is in the room, you won't be eaten by a grue.
|
||||
* play/dunnet.el (dun-describe-room, dun-mode):
|
||||
If a lamp is in the room, you won't be eaten by a grue.
|
||||
|
||||
2014-06-13 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
|
@ -11774,7 +12322,7 @@
|
|||
|
||||
2013-07-07 Michael Kifer <kifer@cs.stonybrook.edu>
|
||||
|
||||
* ediff.el (ediff-version): Version update.
|
||||
* vc/ediff.el (ediff-version): Version update.
|
||||
(ediff-files-command, ediff3-files-command, ediff-merge-command)
|
||||
(ediff-merge-with-ancestor-command, ediff-directories-command)
|
||||
(ediff-directories3-command, ediff-merge-directories-command)
|
||||
|
@ -11782,19 +12330,21 @@
|
|||
All are command-line interfaces to ediff: to facilitate calling
|
||||
Emacs with the appropriate ediff functions invoked.
|
||||
|
||||
* viper-cmd.el (viper-del-forward-char-in-insert): New function.
|
||||
* emulation/viper-cmd.el (viper-del-forward-char-in-insert):
|
||||
New function.
|
||||
(viper-save-kill-buffer): Check if buffer is modified.
|
||||
|
||||
* viper.el (viper-version): Version update.
|
||||
* emulation/viper.el (viper-version): Version update.
|
||||
(viper-emacs-state-mode-list): Add egg-status-buffer-mode.
|
||||
|
||||
2013-07-07 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* faces.el (tty-run-terminal-initialization): Run new tty-setup-hook.
|
||||
* viper-cmd.el (viper-envelop-ESC-key): Remove function.
|
||||
* emulation/viper-cmd.el (viper-envelop-ESC-key): Remove function.
|
||||
(viper-intercept-ESC-key): Simplify.
|
||||
* viper-keym.el (viper-ESC-key): Make it a constant, don't use kbd.
|
||||
* viper.el (viper--tty-ESC-filter, viper--lookup-key)
|
||||
* emulation/viper-keym.el (viper-ESC-key): Make it a constant,
|
||||
don't use kbd.
|
||||
* emulation/viper.el (viper--tty-ESC-filter, viper--lookup-key)
|
||||
(viper-catch-tty-ESC, viper-uncatch-tty-ESC)
|
||||
(viper-setup-ESC-to-escape): New functions.
|
||||
(viper-go-away, viper-set-hooks): Call viper-setup-ESC-to-escape.
|
||||
|
|
|
@ -8501,7 +8501,7 @@
|
|||
|
||||
2012-07-25 Jay Belanger <jay.p.belanger@gmail.com>
|
||||
|
||||
* calc-alg.el (math-simplify-divide): Don't cross multiply
|
||||
* calc/calc-alg.el (math-simplify-divide): Don't cross multiply
|
||||
in an equation when the lhs is a variable.
|
||||
|
||||
2012-07-24 Julien Danjou <julien@danjou.info>
|
||||
|
|
|
@ -149,9 +149,7 @@ setwins_for_subdirs=for file in `find ${srcdir} -type d -print`; do \
|
|||
# we add them here to make sure they get built.
|
||||
all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el
|
||||
|
||||
doit:
|
||||
|
||||
.PHONY: all doit custom-deps finder-data autoloads update-subdirs
|
||||
.PHONY: all custom-deps finder-data autoloads update-subdirs
|
||||
|
||||
# custom-deps and finder-data both used to scan _all_ the *.el files.
|
||||
# This could lead to problems in parallel builds if automatically
|
||||
|
@ -169,7 +167,7 @@ doit:
|
|||
# (see finder-no-scan-regexp and custom-dependencies-no-scan-regexp).
|
||||
$(lisp)/cus-load.el:
|
||||
$(MAKE) custom-deps
|
||||
custom-deps: doit
|
||||
custom-deps:
|
||||
$(setwins_almost); \
|
||||
echo Directories: $$wins; \
|
||||
$(emacs) -l cus-dep \
|
||||
|
@ -178,7 +176,7 @@ custom-deps: doit
|
|||
|
||||
$(lisp)/finder-inf.el:
|
||||
$(MAKE) finder-data
|
||||
finder-data: doit
|
||||
finder-data:
|
||||
$(setwins_finder); \
|
||||
echo Directories: $$wins; \
|
||||
$(emacs) -l finder \
|
||||
|
@ -192,7 +190,7 @@ finder-data: doit
|
|||
# Note that we set no-update-autoloads in _generated_ leim files.
|
||||
# If you want to allow autoloads in such files, remove that,
|
||||
# and make this depend on leim.
|
||||
autoloads: $(LOADDEFS) doit
|
||||
autoloads: $(LOADDEFS)
|
||||
cd $(lisp) && chmod +w $(AUTOGEN_VCS)
|
||||
$(setwins_almost); \
|
||||
echo Directories: $$wins; \
|
||||
|
@ -216,7 +214,7 @@ obsolete-autoloads: ${lisp}/obsolete/*.el
|
|||
# we know that if we have an emacs executable, we also have a subdirs.el.
|
||||
$(lisp)/subdirs.el:
|
||||
$(MAKE) update-subdirs
|
||||
update-subdirs: doit
|
||||
update-subdirs:
|
||||
$(setwins_for_subdirs); \
|
||||
for file in $$wins; do \
|
||||
$(srcdir)/../build-aux/update-subdirs $$file; \
|
||||
|
@ -238,7 +236,8 @@ bzr-update: compile finder-data custom-deps
|
|||
# Update the AUTHORS file.
|
||||
|
||||
update-authors:
|
||||
$(emacs) -l authors -f batch-update-authors $(top_srcdir)/etc/AUTHORS $(top_srcdir)
|
||||
$(emacs) -L "$(top_srcdir)/admin" -l authors \
|
||||
-f batch-update-authors "$(top_srcdir)/etc/AUTHORS" "$(top_srcdir)"
|
||||
|
||||
|
||||
ETAGS = ../lib-src/etags
|
||||
|
@ -307,7 +306,7 @@ compile-onefile:
|
|||
compile-first: $(COMPILE_FIRST)
|
||||
|
||||
# In `compile-main' we could directly do
|
||||
# ... | xargs $(MAKE) EMACS="$(EMACS)"
|
||||
# ... | xargs $(MAKE)
|
||||
# and it works, but it generates a lot of messages like
|
||||
# make[2]: gnus/gnus-mlspl.elc is up to date.
|
||||
# so instead, we use "xargs echo" to split the list of file into manageable
|
||||
|
@ -331,7 +330,7 @@ compile-main: leim semantic compile-clean
|
|||
echo "$${el}c"; \
|
||||
done | xargs $(XARGS_LIMIT) echo) | \
|
||||
while read chunk; do \
|
||||
$(MAKE) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \
|
||||
$(MAKE) compile-targets TARGETS="$$chunk"; \
|
||||
done
|
||||
|
||||
.PHONY: compile-clean
|
||||
|
@ -362,17 +361,15 @@ semantic:
|
|||
# date. Some .el files don't get compiled because they set the
|
||||
# local variable no-byte-compile.
|
||||
# Calling make recursively because suffix rule cannot have prerequisites.
|
||||
# Explicitly pass EMACS (sometimes ../src/bootstrap-emacs) to those
|
||||
# sub-makes that run rules that use it, for the sake of some non-GNU makes.
|
||||
compile: $(LOADDEFS) autoloads compile-first
|
||||
$(MAKE) compile-main EMACS="$(EMACS)"
|
||||
$(MAKE) compile-main
|
||||
|
||||
# Compile all Lisp files. This is like `compile' but compiles files
|
||||
# unconditionally. Some files don't actually get compiled because they
|
||||
# set the local variable no-byte-compile.
|
||||
compile-always: doit
|
||||
compile-always:
|
||||
cd $(lisp) && rm -f *.elc */*.elc */*/*.elc */*/*/*.elc
|
||||
$(MAKE) compile EMACS="$(EMACS)"
|
||||
$(MAKE) compile
|
||||
|
||||
.PHONY: backup-compiled-files compile-after-backup
|
||||
|
||||
|
@ -403,7 +400,7 @@ compile-after-backup: backup-compiled-files compile-always
|
|||
# There is no reason to use this rule unless you only have a single
|
||||
# core and CPU time is an issue.
|
||||
.PHONY: compile-one-process
|
||||
compile-one-process: doit $(LOADDEFS) compile-first $(lisp)/progmodes/cc-mode.elc
|
||||
compile-one-process: $(LOADDEFS) compile-first $(lisp)/progmodes/cc-mode.elc
|
||||
$(emacs) $(BYTE_COMPILE_FLAGS) \
|
||||
--eval "(batch-byte-recompile-directory 0)" $(lisp)
|
||||
|
||||
|
@ -519,28 +516,22 @@ $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-awk.elc\
|
|||
$(lisp)/progmodes/cc-vars.elc: \
|
||||
$(lisp)/progmodes/cc-bytecomp.elc $(lisp)/progmodes/cc-defs.elc
|
||||
|
||||
$(lisp)/progmodes/cc-align.elc: \
|
||||
$(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
|
||||
|
||||
$(lisp)/progmodes/cc-cmds.elc: \
|
||||
$(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-cmds.elc: \
|
||||
$(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
|
||||
|
||||
$(lisp)/progmodes/cc-compat.elc: \
|
||||
$(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-styles.elc \
|
||||
$(lisp)/progmodes/cc-engine.elc
|
||||
|
||||
$(lisp)/progmodes/cc-defs.elc: $(lisp)/progmodes/cc-bytecomp.elc \
|
||||
$(lisp)/emacs-lisp/cl.elc $(lisp)/emacs-lisp/regexp-opt.elc
|
||||
$(lisp)/progmodes/cc-defs.elc: $(lisp)/progmodes/cc-bytecomp.elc
|
||||
|
||||
$(lisp)/progmodes/cc-engine.elc: $(lisp)/progmodes/cc-langs.elc \
|
||||
$(lisp)/progmodes/cc-vars.elc
|
||||
|
||||
$(lisp)/progmodes/cc-fonts.elc: $(lisp)/progmodes/cc-langs.elc \
|
||||
$(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
|
||||
$(lisp)/font-lock.elc
|
||||
$(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
|
||||
|
||||
$(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc \
|
||||
$(lisp)/emacs-lisp/cl.elc
|
||||
$(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc
|
||||
|
||||
$(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
|
||||
$(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
|
||||
|
@ -550,6 +541,4 @@ $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
|
|||
$(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \
|
||||
$(lisp)/progmodes/cc-align.elc
|
||||
|
||||
$(lisp)/progmodes/cc-vars.elc: $(lisp)/custom.elc $(lisp)/widget.elc
|
||||
|
||||
# Makefile ends here.
|
||||
|
|
|
@ -1130,13 +1130,8 @@ TAB-STOP specifies whether SPACING refers to tab-stop boundaries."
|
|||
column
|
||||
(if (not tab-stop)
|
||||
(+ column spacing)
|
||||
(let ((stops tab-stop-list))
|
||||
(while stops
|
||||
(if (and (> (car stops) column)
|
||||
(= (setq spacing (1- spacing)) 0))
|
||||
(setq column (car stops)
|
||||
stops nil)
|
||||
(setq stops (cdr stops)))))
|
||||
(dotimes (_ spacing)
|
||||
(setq column (indent-next-tab-stop column)))
|
||||
column)))
|
||||
|
||||
(defsubst align-column (pos)
|
||||
|
|
|
@ -293,7 +293,7 @@
|
|||
(Math-objectp a))
|
||||
((eq (car a) 'var)
|
||||
(if (eq (car b) 'var)
|
||||
(string-lessp (symbol-name (nth 1 a)) (symbol-name (nth 1 b)))
|
||||
(string-lessp (nth 1 a) (nth 1 b))
|
||||
(not (Math-numberp b))))
|
||||
((eq (car b) 'var) (Math-numberp a))
|
||||
((eq (car a) (car b))
|
||||
|
@ -302,7 +302,7 @@
|
|||
(and b
|
||||
(or (null a)
|
||||
(math-beforep (car a) (car b)))))
|
||||
(t (string-lessp (symbol-name (car a)) (symbol-name (car b))))))
|
||||
(t (string-lessp (car a) (car b)))))
|
||||
|
||||
|
||||
(defsubst math-simplify-extended (a)
|
||||
|
|
|
@ -1019,8 +1019,9 @@ number of digits displayed (`calculator-number-digits')."
|
|||
(s (calculator-remove-zeros (format s num)))
|
||||
(s (if (or (not group-p) (string-match-p "[eE]" s)) s
|
||||
(replace-regexp-in-string
|
||||
"\\([0-9]+\\)\\(?:\\.\\|$\\)"
|
||||
(lambda (s) (calculator-groupize-number s 3 ","))
|
||||
"\\([0-9]+\\)\\(?:\\..*\\|$\\)"
|
||||
(lambda (_) (calculator-groupize-number
|
||||
(match-string 1 s) 3 ","))
|
||||
s nil nil 1))))
|
||||
s)))
|
||||
|
||||
|
@ -1197,12 +1198,13 @@ arguments."
|
|||
(let ((TX (and X (calculator-truncate X)))
|
||||
(TY (and Y (calculator-truncate Y)))
|
||||
(DX (if (and X calculator-deg) (/ (* X pi) 180) X))
|
||||
(L calculator-saved-list))
|
||||
(cl-flet ((F (&optional x y) (calculator-funcall f x y))
|
||||
(D (x) (if calculator-deg (/ (* x 180) float-pi) x)))
|
||||
(eval `(let ((X ,X) (Y ,Y) (DX ,DX) (TX ,TX) (TY ,TY) (L ',L))
|
||||
,f)
|
||||
t)))))
|
||||
(L calculator-saved-list)
|
||||
(fF `(calculator-funcall ',f x y))
|
||||
(fD `(if calculator-deg (/ (* x 180) float-pi) x)))
|
||||
(eval `(cl-flet ((F (&optional x y) ,fF) (D (x) ,fD))
|
||||
(let ((X ,X) (Y ,Y) (DX ,DX) (TX ,TX) (TY ,TY) (L ',L))
|
||||
,f))
|
||||
t))))
|
||||
|
||||
;;;---------------------------------------------------------------------
|
||||
;;; Input interaction
|
||||
|
@ -1213,12 +1215,13 @@ Use KEYS if given, otherwise use `this-command-keys'."
|
|||
(let ((inp (or keys (this-command-keys))))
|
||||
(if (or (stringp inp) (not (arrayp inp)))
|
||||
inp
|
||||
;; translates kp-x to x and [tries to] create a string to lookup
|
||||
;; Translates kp-x to x and [tries to] create a string to lookup
|
||||
;; operators; assume all symbols are translatable via
|
||||
;; `function-key-map' or with an 'ascii-character property
|
||||
;; `function-key-map'. This is needed because we have key
|
||||
;; bindings for kp-* (which might be the wrong thing to do) so
|
||||
;; they don't get translated in `this-command-keys'.
|
||||
(concat (mapcar (lambda (k)
|
||||
(if (numberp k) k (or (get k 'ascii-character)
|
||||
(error "??bad key??"))))
|
||||
(if (numberp k) k (error "??bad key?? (%S)" k)))
|
||||
(or (lookup-key function-key-map inp) inp))))))
|
||||
|
||||
(defun calculator-clear-fragile (&optional op)
|
||||
|
|
|
@ -1962,13 +1962,12 @@ their associated keys and their effects."
|
|||
;; If user cancels before setting priority, restore
|
||||
;; display.
|
||||
(unless item-added
|
||||
(if ocat
|
||||
(progn
|
||||
(unless (equal cat ocat)
|
||||
(todo-category-number ocat)
|
||||
(todo-category-select))
|
||||
(and done-only (todo-toggle-view-done-only)))
|
||||
(set-window-buffer (selected-window) (set-buffer obuf)))
|
||||
(set-window-buffer (selected-window) (set-buffer obuf))
|
||||
(when ocat
|
||||
(unless (equal cat ocat)
|
||||
(todo-category-number ocat)
|
||||
(todo-category-select))
|
||||
(and done-only (todo-toggle-view-done-only)))
|
||||
(goto-char opoint))
|
||||
;; If the todo items section is not visible when the
|
||||
;; insertion command is called (either because only done
|
||||
|
@ -2553,9 +2552,9 @@ meaning to raise or lower the item's priority by one."
|
|||
(goto-char (point-min))
|
||||
(setq done (re-search-forward todo-done-string-start nil t))))
|
||||
(let ((todo-show-with-done done))
|
||||
(todo-category-select)
|
||||
;; Keep top of category in view while setting priority.
|
||||
(goto-char (point-min)))))
|
||||
;; Keep current item or top of moved to category in view
|
||||
;; while setting priority.
|
||||
(save-excursion (todo-category-select)))))
|
||||
;; Prompt for priority only when the category has at least one
|
||||
;; todo item.
|
||||
(when (> maxnum 1)
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2014-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* semantic/ia.el (semantic-ia-complete-symbol-menu): Use posn-at-point
|
||||
instead of senator-completion-menu-point-as-event; un-comment, tho keep
|
||||
the "no smart completion" fallback commented since it still doesn't work.
|
||||
|
||||
2014-05-01 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* ede.el (ede-project-directories, ede-check-project-directory):
|
||||
|
|
|
@ -150,45 +150,47 @@ Completion options are calculated with `semantic-analyze-possible-completions'."
|
|||
:group 'semantic
|
||||
:type semantic-format-tag-custom-list)
|
||||
|
||||
;; Disabled - see http://debbugs.gnu.org/14522
|
||||
;; ;;;###autoload
|
||||
;; (defun semantic-ia-complete-symbol-menu (point)
|
||||
;; "Complete the current symbol via a menu based at POINT.
|
||||
;; Completion options are calculated with `semantic-analyze-possible-completions'."
|
||||
;; (interactive "d")
|
||||
;; (require 'imenu)
|
||||
;; (let* ((a (semantic-analyze-current-context point))
|
||||
;; (syms (semantic-analyze-possible-completions a))
|
||||
;; )
|
||||
;; ;; Complete this symbol.
|
||||
;; (if (not syms)
|
||||
;; (progn
|
||||
;; (message "No smart completions found. Trying Senator.")
|
||||
;; (when (semantic-analyze-context-p a)
|
||||
;; ;; This is a quick way of getting a nice completion list
|
||||
;; ;; in the menu if the regular context mechanism fails.
|
||||
;; (senator-completion-menu-popup)))
|
||||
;;
|
||||
;; (let* ((menu
|
||||
;; (mapcar
|
||||
;; (lambda (tag)
|
||||
;; (cons
|
||||
;; (funcall semantic-ia-completion-menu-format-tag-function tag)
|
||||
;; (vector tag)))
|
||||
;; syms))
|
||||
;; (ans
|
||||
;; (imenu--mouse-menu
|
||||
;; ;; XEmacs needs that the menu has at least 2 items. So,
|
||||
;; ;; include a nil item that will be ignored by imenu.
|
||||
;; (cons nil menu)
|
||||
;; (senator-completion-menu-point-as-event)
|
||||
;; "Completions")))
|
||||
;; (when ans
|
||||
;; (if (not (semantic-tag-p ans))
|
||||
;; (setq ans (aref (cdr ans) 0)))
|
||||
;; (delete-region (car (oref a bounds)) (cdr (oref a bounds)))
|
||||
;; (semantic-ia-insert-tag ans))
|
||||
;; ))))
|
||||
;;;###autoload
|
||||
(defun semantic-ia-complete-symbol-menu (point)
|
||||
"Complete the current symbol via a menu based at POINT.
|
||||
Completion options are calculated with `semantic-analyze-possible-completions'."
|
||||
(interactive "d")
|
||||
(require 'imenu)
|
||||
(let* ((a (semantic-analyze-current-context point))
|
||||
(syms (semantic-analyze-possible-completions a))
|
||||
)
|
||||
;; Complete this symbol.
|
||||
(if (not syms)
|
||||
(progn
|
||||
(message "No smart completions found.")
|
||||
;; Disabled - see http://debbugs.gnu.org/14522
|
||||
;; (message "No smart completions found. Trying Senator.")
|
||||
;; (when (semantic-analyze-context-p a)
|
||||
;; ;; This is a quick way of getting a nice completion list
|
||||
;; ;; in the menu if the regular context mechanism fails.
|
||||
;; (senator-completion-menu-popup))
|
||||
)
|
||||
|
||||
(let* ((menu
|
||||
(mapcar
|
||||
(lambda (tag)
|
||||
(cons
|
||||
(funcall semantic-ia-completion-menu-format-tag-function tag)
|
||||
(vector tag)))
|
||||
syms))
|
||||
(ans
|
||||
(imenu--mouse-menu
|
||||
;; XEmacs needs that the menu has at least 2 items. So,
|
||||
;; include a nil item that will be ignored by imenu.
|
||||
(cons nil menu)
|
||||
`(down-mouse-1 ,(posn-at-point))
|
||||
"Completions")))
|
||||
(when ans
|
||||
(if (not (semantic-tag-p ans))
|
||||
(setq ans (aref (cdr ans) 0)))
|
||||
(delete-region (car (oref a bounds)) (cdr (oref a bounds)))
|
||||
(semantic-ia-insert-tag ans))
|
||||
))))
|
||||
|
||||
;;; Completions Tip
|
||||
;;
|
||||
|
|
|
@ -188,6 +188,7 @@ See `delete-selection-helper'."
|
|||
(put 'reindent-then-newline-and-indent 'delete-selection t)
|
||||
(put 'newline-and-indent 'delete-selection t)
|
||||
(put 'newline 'delete-selection t)
|
||||
(put 'electric-newline-and-maybe-indent 'delete-selection t)
|
||||
(put 'open-line 'delete-selection 'kill)
|
||||
|
||||
;; This is very useful for canceling a selection in the minibuffer without
|
||||
|
|
|
@ -174,11 +174,8 @@ For further details, see info node `(emacs)Saving Emacs Sessions'."
|
|||
:global t
|
||||
:group 'desktop
|
||||
(if desktop-save-mode
|
||||
(when (and (integerp desktop-auto-save-timeout)
|
||||
(> desktop-auto-save-timeout 0))
|
||||
(add-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer))
|
||||
(remove-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)
|
||||
(desktop-auto-save-cancel-timer)))
|
||||
(desktop-auto-save-enable)
|
||||
(desktop-auto-save-disable)))
|
||||
|
||||
(defun desktop-save-mode-off ()
|
||||
"Disable `desktop-save-mode'. Provided for use in hooks."
|
||||
|
@ -219,9 +216,8 @@ Zero or nil means disable auto-saving due to idleness."
|
|||
(set-default symbol value)
|
||||
(ignore-errors
|
||||
(if (and (integerp value) (> value 0))
|
||||
(add-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)
|
||||
(remove-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)
|
||||
(desktop-auto-save-cancel-timer))))
|
||||
(desktop-auto-save-enable value)
|
||||
(desktop-auto-save-disable))))
|
||||
:group 'desktop
|
||||
:version "24.4")
|
||||
|
||||
|
@ -1132,6 +1128,10 @@ Using it may cause conflicts. Use it anyway? " owner)))))
|
|||
(unless desktop-dirname
|
||||
(message "Desktop file in use; not loaded.")))
|
||||
(desktop-lazy-abort)
|
||||
;; Temporarily disable the autosave that will leave it
|
||||
;; disabled when loading the desktop fails with errors,
|
||||
;; thus not overwriting the desktop with broken contents.
|
||||
(desktop-auto-save-disable)
|
||||
;; Evaluate desktop buffer and remember when it was modified.
|
||||
(load (desktop-full-file-name) t t t)
|
||||
(setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name))))
|
||||
|
@ -1184,6 +1184,7 @@ Using it may cause conflicts. Use it anyway? " owner)))))
|
|||
(set-window-prev-buffers window nil)
|
||||
(set-window-next-buffers window nil))))
|
||||
(setq desktop-saved-frameset nil)
|
||||
(desktop-auto-save-enable)
|
||||
t))
|
||||
;; No desktop file found.
|
||||
(desktop-clear)
|
||||
|
@ -1230,6 +1231,15 @@ directory DIRNAME."
|
|||
;; Auto-Saving.
|
||||
(defvar desktop-auto-save-timer nil)
|
||||
|
||||
(defun desktop-auto-save-enable (&optional timeout)
|
||||
(when (and (integerp (or timeout desktop-auto-save-timeout))
|
||||
(> (or timeout desktop-auto-save-timeout) 0))
|
||||
(add-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)))
|
||||
|
||||
(defun desktop-auto-save-disable ()
|
||||
(remove-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)
|
||||
(desktop-auto-save-cancel-timer))
|
||||
|
||||
(defun desktop-auto-save ()
|
||||
"Save the desktop periodically.
|
||||
Called by the timer created in `desktop-auto-save-set-timer'."
|
||||
|
|
|
@ -3099,7 +3099,10 @@ argument or confirmation)."
|
|||
;; If FILES defaulted to the current line's file.
|
||||
(= (length files) 1))
|
||||
(apply function args)
|
||||
(let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*"))))
|
||||
(let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*")))
|
||||
;; Mark *Marked Files* window as softly-dedicated, to prevent
|
||||
;; other buffers e.g. *Completions* from reusing it (bug#17554).
|
||||
(display-buffer-mark-dedicated 'soft))
|
||||
(with-current-buffer buffer
|
||||
(with-current-buffer-window
|
||||
buffer
|
||||
|
|
|
@ -368,7 +368,7 @@ newline after CHAR but stay in the same place.")
|
|||
(setq pos (electric--after-char-pos))
|
||||
;; Not in a string or comment.
|
||||
(not (nth 8 (save-excursion (syntax-ppss pos)))))
|
||||
(let ((end (copy-marker (point)))
|
||||
(let ((end (point-marker))
|
||||
(sym (if (functionp rule) (funcall rule) rule)))
|
||||
(set-marker-insertion-type end (not (eq sym 'after-stay)))
|
||||
(goto-char pos)
|
||||
|
|
|
@ -382,8 +382,6 @@ its argument list allows full Common Lisp conventions."
|
|||
(if (car res) `(progn ,(car res) ,form) form))
|
||||
`(function ,func)))
|
||||
|
||||
(declare-function help-add-fundoc-usage "help-fns" (docstring arglist))
|
||||
|
||||
(defun cl--make-usage-var (x)
|
||||
"X can be a var or a (destructuring) lambda-list."
|
||||
(cond
|
||||
|
|
|
@ -1320,7 +1320,7 @@ RESULT must be an `ert-test-result-with-condition'."
|
|||
(unwind-protect
|
||||
(progn
|
||||
(insert message "\n")
|
||||
(setq end (copy-marker (point)))
|
||||
(setq end (point-marker))
|
||||
(goto-char begin)
|
||||
(insert " " prefix)
|
||||
(forward-line 1)
|
||||
|
@ -1463,6 +1463,65 @@ the tests)."
|
|||
(kill-emacs 2))))
|
||||
|
||||
|
||||
(defun ert-summarize-tests-batch-and-exit ()
|
||||
"Summarize the results of testing.
|
||||
Expects to be called in batch mode, with logfiles as command-line arguments.
|
||||
The logfiles should have the `ert-run-tests-batch' format. When finished,
|
||||
this exits Emacs, with status as per `ert-run-tests-batch-and-exit'."
|
||||
(or noninteractive
|
||||
(user-error "This function is only for use in batch mode"))
|
||||
(let ((nlogs (length command-line-args-left))
|
||||
(ntests 0) (nrun 0) (nexpected 0) (nunexpected 0) (nskipped 0)
|
||||
nnotrun logfile notests badtests unexpected)
|
||||
(with-temp-buffer
|
||||
(while (setq logfile (pop command-line-args-left))
|
||||
(erase-buffer)
|
||||
(insert-file-contents logfile)
|
||||
(if (not (re-search-forward "^Running \\([0-9]+\\) tests" nil t))
|
||||
(push logfile notests)
|
||||
(setq ntests (+ ntests (string-to-number (match-string 1))))
|
||||
(if (not (re-search-forward "^\\(Aborted: \\)?\
|
||||
Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\
|
||||
\\(?:, \\([0-9]+\\) unexpected\\)?\
|
||||
\\(?:, \\([0-9]+\\) skipped\\)?" nil t))
|
||||
(push logfile badtests)
|
||||
(if (match-string 1) (push logfile badtests))
|
||||
(setq nrun (+ nrun (string-to-number (match-string 2)))
|
||||
nexpected (+ nexpected (string-to-number (match-string 3))))
|
||||
(when (match-string 4)
|
||||
(push logfile unexpected)
|
||||
(setq nunexpected (+ nunexpected
|
||||
(string-to-number (match-string 4)))))
|
||||
(if (match-string 5)
|
||||
(setq nskipped (+ nskipped
|
||||
(string-to-number (match-string 5)))))))))
|
||||
(setq nnotrun (- ntests nrun))
|
||||
(message "\nSUMMARY OF TEST RESULTS")
|
||||
(message "-----------------------")
|
||||
(message "Files examined: %d" nlogs)
|
||||
(message "Ran %d tests%s, %d results as expected%s%s"
|
||||
nrun
|
||||
(if (zerop nnotrun) "" (format ", %d failed to run" nnotrun))
|
||||
nexpected
|
||||
(if (zerop nunexpected)
|
||||
""
|
||||
(format ", %d unexpected" nunexpected))
|
||||
(if (zerop nskipped)
|
||||
""
|
||||
(format ", %d skipped" nskipped)))
|
||||
(when notests
|
||||
(message "%d files did not contain any tests:" (length notests))
|
||||
(mapc (lambda (l) (message " %s" l)) notests))
|
||||
(when badtests
|
||||
(message "%d files did not finish:" (length badtests))
|
||||
(mapc (lambda (l) (message " %s" l)) badtests))
|
||||
(when unexpected
|
||||
(message "%d files contained unexpected results:" (length unexpected))
|
||||
(mapc (lambda (l) (message " %s" l)) unexpected))
|
||||
(kill-emacs (cond ((or notests badtests (not (zerop nnotrun))) 2)
|
||||
(unexpected 1)
|
||||
(t 0)))))
|
||||
|
||||
;;; Utility functions for load/unload actions.
|
||||
|
||||
(defun ert--activate-font-lock-keywords ()
|
||||
|
|
|
@ -178,8 +178,7 @@ LIBRARY should be a string (the name of the library)."
|
|||
|
||||
(defvar find-function-C-source-directory
|
||||
(let ((dir (expand-file-name "src" source-directory)))
|
||||
(when (and (file-directory-p dir) (file-readable-p dir))
|
||||
dir))
|
||||
(if (file-accessible-directory-p dir) dir))
|
||||
"Directory where the C source files of Emacs can be found.
|
||||
If nil, do not try to find the source code of functions and variables
|
||||
defined in C.")
|
||||
|
|
|
@ -413,6 +413,41 @@ It has `lisp-mode-abbrev-table' as its parent."
|
|||
(defvar lisp-cl-font-lock-keywords lisp-cl-font-lock-keywords-1
|
||||
"Default expressions to highlight in Lisp modes.")
|
||||
|
||||
(defun lisp-string-in-doc-position-p (listbeg startpos)
|
||||
(let* ((firstsym (and listbeg
|
||||
(save-excursion
|
||||
(goto-char listbeg)
|
||||
(and (looking-at "([ \t\n]*\\(\\(\\sw\\|\\s_\\)+\\)")
|
||||
(match-string 1)))))
|
||||
(docelt (and firstsym
|
||||
(function-get (intern-soft firstsym)
|
||||
lisp-doc-string-elt-property))))
|
||||
(and docelt
|
||||
;; It's a string in a form that can have a docstring.
|
||||
;; Check whether it's in docstring position.
|
||||
(save-excursion
|
||||
(when (functionp docelt)
|
||||
(goto-char (match-end 1))
|
||||
(setq docelt (funcall docelt)))
|
||||
(goto-char listbeg)
|
||||
(forward-char 1)
|
||||
(condition-case nil
|
||||
(while (and (> docelt 0) (< (point) startpos)
|
||||
(progn (forward-sexp 1) t))
|
||||
(setq docelt (1- docelt)))
|
||||
(error nil))
|
||||
(and (zerop docelt) (<= (point) startpos)
|
||||
(progn (forward-comment (point-max)) t)
|
||||
(= (point) startpos))))))
|
||||
|
||||
(defun lisp-string-after-doc-keyword-p (listbeg startpos)
|
||||
(and listbeg ; We are inside a Lisp form.
|
||||
(save-excursion
|
||||
(goto-char startpos)
|
||||
(ignore-errors
|
||||
(progn (backward-sexp 1)
|
||||
(looking-at ":documentation\\_>"))))))
|
||||
|
||||
(defun lisp-font-lock-syntactic-face-function (state)
|
||||
(if (nth 3 state)
|
||||
;; This might be a (doc)string or a |...| symbol.
|
||||
|
@ -420,32 +455,9 @@ It has `lisp-mode-abbrev-table' as its parent."
|
|||
(if (eq (char-after startpos) ?|)
|
||||
;; This is not a string, but a |...| symbol.
|
||||
nil
|
||||
(let* ((listbeg (nth 1 state))
|
||||
(firstsym (and listbeg
|
||||
(save-excursion
|
||||
(goto-char listbeg)
|
||||
(and (looking-at "([ \t\n]*\\(\\(\\sw\\|\\s_\\)+\\)")
|
||||
(match-string 1)))))
|
||||
(docelt (and firstsym
|
||||
(function-get (intern-soft firstsym)
|
||||
lisp-doc-string-elt-property))))
|
||||
(if (and docelt
|
||||
;; It's a string in a form that can have a docstring.
|
||||
;; Check whether it's in docstring position.
|
||||
(save-excursion
|
||||
(when (functionp docelt)
|
||||
(goto-char (match-end 1))
|
||||
(setq docelt (funcall docelt)))
|
||||
(goto-char listbeg)
|
||||
(forward-char 1)
|
||||
(condition-case nil
|
||||
(while (and (> docelt 0) (< (point) startpos)
|
||||
(progn (forward-sexp 1) t))
|
||||
(setq docelt (1- docelt)))
|
||||
(error nil))
|
||||
(and (zerop docelt) (<= (point) startpos)
|
||||
(progn (forward-comment (point-max)) t)
|
||||
(= (point) (nth 8 state)))))
|
||||
(let ((listbeg (nth 1 state)))
|
||||
(if (or (lisp-string-in-doc-position-p listbeg startpos)
|
||||
(lisp-string-after-doc-keyword-p listbeg startpos))
|
||||
font-lock-doc-face
|
||||
font-lock-string-face))))
|
||||
font-lock-comment-face))
|
||||
|
|
|
@ -828,14 +828,20 @@ GnuPG keyring is located under \"gnupg\" in `package-user-dir'."
|
|||
(buffer-string))))
|
||||
(epg-context-set-home-directory context homedir)
|
||||
(epg-verify-string context sig-content (buffer-string))
|
||||
;; The .sig file may contain multiple signatures. Success if one
|
||||
;; of the signatures is good.
|
||||
(let ((good-signatures
|
||||
(delq nil (mapcar (lambda (sig)
|
||||
(if (eq (epg-signature-status sig) 'good)
|
||||
sig))
|
||||
(epg-context-result-for context 'verify)))))
|
||||
(if (null good-signatures)
|
||||
(let (good-signatures had-fatal-error)
|
||||
;; The .sig file may contain multiple signatures. Success if one
|
||||
;; of the signatures is good.
|
||||
(dolist (sig (epg-context-result-for context 'verify))
|
||||
(if (eq (epg-signature-status sig) 'good)
|
||||
(push sig good-signatures)
|
||||
;; If package-check-signature is allow-unsigned, don't
|
||||
;; signal error when we can't verify signature because of
|
||||
;; missing public key. Other errors are still treated as
|
||||
;; fatal (bug#17625).
|
||||
(unless (and (eq package-check-signature 'allow-unsigned)
|
||||
(eq (epg-signature-status sig) 'no-pubkey))
|
||||
(setq had-fatal-error t))))
|
||||
(if (and (null good-signatures) had-fatal-error)
|
||||
(error "Failed to verify signature %s: %S"
|
||||
sig-file
|
||||
(mapcar #'epg-signature-to-string
|
||||
|
@ -1664,6 +1670,9 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC."
|
|||
(defvar package-list-unversioned nil
|
||||
"If non-nil include packages that don't have a version in `list-package'.")
|
||||
|
||||
(defvar package-list-unsigned nil
|
||||
"If non-nil, mention in the list which packages were installed w/o signature.")
|
||||
|
||||
(defun package-desc-status (pkg-desc)
|
||||
(let* ((name (package-desc-name pkg-desc))
|
||||
(dir (package-desc-dir pkg-desc))
|
||||
|
@ -1684,9 +1693,8 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC."
|
|||
(dir ;One of the installed packages.
|
||||
(cond
|
||||
((not (file-exists-p (package-desc-dir pkg-desc))) "deleted")
|
||||
((eq pkg-desc (cadr (assq name package-alist))) (if signed
|
||||
"installed"
|
||||
"unsigned"))
|
||||
((eq pkg-desc (cadr (assq name package-alist)))
|
||||
(if (or (not package-list-unsigned) signed) "installed" "unsigned"))
|
||||
(t "obsolete")))
|
||||
(t
|
||||
(let* ((ins (cadr (assq name package-alist)))
|
||||
|
@ -1696,9 +1704,9 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC."
|
|||
(if (memq name package-menu--new-package-list)
|
||||
"new" "available"))
|
||||
((version-list-< version ins-v) "obsolete")
|
||||
((version-list-= version ins-v) (if signed
|
||||
"installed"
|
||||
"unsigned"))))))))
|
||||
((version-list-= version ins-v)
|
||||
(if (or (not package-list-unsigned) signed)
|
||||
"installed" "unsigned"))))))))
|
||||
|
||||
(defun package-menu--refresh (&optional packages keywords)
|
||||
"Re-populate the `tabulated-list-entries'.
|
||||
|
|
|
@ -1155,6 +1155,15 @@ NUMBER offset by NUMBER, relative to a base token
|
|||
The functions whose name starts with \"smie-rule-\" are helper functions
|
||||
designed specifically for use in this function.")
|
||||
|
||||
(defvar smie--hanging-eolp-function
|
||||
;; FIXME: This is a quick hack for 24.4. Don't document it and replace with
|
||||
;; a well-defined function with a cleaner interface instead!
|
||||
(lambda ()
|
||||
(skip-chars-forward " \t")
|
||||
(or (eolp)
|
||||
(and ;; (looking-at comment-start-skip) ;(bug#16041).
|
||||
(forward-comment (point-max))))))
|
||||
|
||||
(defalias 'smie-rule-hanging-p 'smie-indent--hanging-p)
|
||||
(defun smie-indent--hanging-p ()
|
||||
"Return non-nil if the current token is \"hanging\".
|
||||
|
@ -1168,10 +1177,7 @@ the beginning of a line."
|
|||
(not (eobp))
|
||||
;; Could be an open-paren.
|
||||
(forward-char 1))
|
||||
(skip-chars-forward " \t")
|
||||
(or (eolp)
|
||||
(and ;; (looking-at comment-start-skip) ;(bug#16041).
|
||||
(forward-comment (point-max))))
|
||||
(funcall smie--hanging-eolp-function)
|
||||
(point))))))
|
||||
|
||||
(defalias 'smie-rule-bolp 'smie-indent--bolp)
|
||||
|
@ -2132,7 +2138,7 @@ position corresponding to each rule."
|
|||
nil
|
||||
(push (cons (+ offset (nth 2 sig)) sig) rules)
|
||||
;; Adjust the rest of the data.
|
||||
(pcase-dolist ((and cotrace `(,count ,toffset ,trace))
|
||||
(pcase-dolist ((and cotrace `(,count ,toffset . ,trace))
|
||||
cotraces)
|
||||
(setf (nth 1 cotrace) (- toffset offset))
|
||||
(dolist (sig trace)
|
||||
|
@ -2161,15 +2167,14 @@ To save the result for future sessions, use `smie-config-save'."
|
|||
(cond
|
||||
((null config) (message "Nothing to change"))
|
||||
((null smie-config--buffer-local)
|
||||
(message "Local rules set")
|
||||
(setq smie-config--buffer-local config))
|
||||
(smie-config-local config)
|
||||
(message "Local rules set"))
|
||||
((y-or-n-p "Replace existing local config? ")
|
||||
(message "Local rules replaced")
|
||||
(setq smie-config--buffer-local config))
|
||||
(smie-config-local config))
|
||||
((y-or-n-p "Merge with existing local config? ")
|
||||
(message "Local rules adjusted")
|
||||
(setq smie-config--buffer-local
|
||||
(append config smie-config--buffer-local)))
|
||||
(smie-config-local (append config smie-config--buffer-local)))
|
||||
(t
|
||||
(message "Rules guessed: %S" config)))))
|
||||
|
||||
|
|
|
@ -2033,7 +2033,8 @@ created."
|
|||
;; Make highlighting of selected text work properly for EDT commands.
|
||||
(if (featurep 'emacs)
|
||||
(progn
|
||||
(setq edt-orig-transient-mark-mode transient-mark-mode)
|
||||
(setq edt-orig-transient-mark-mode
|
||||
(default-value 'transient-mark-mode))
|
||||
(add-hook 'activate-mark-hook
|
||||
(function
|
||||
(lambda ()
|
||||
|
@ -2068,7 +2069,7 @@ created."
|
|||
(edt-reset)
|
||||
(force-mode-line-update t)
|
||||
(if (featurep 'emacs)
|
||||
(setq transient-mark-mode edt-orig-transient-mark-mode))
|
||||
(setq-default transient-mark-mode edt-orig-transient-mark-mode))
|
||||
(message "Original key bindings restored; EDT Emulation disabled"))
|
||||
|
||||
(defun edt-default-menu-bar-update-buffers ()
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
2014-06-19 Kelvin White <kelvin.white77@gmail.com>
|
||||
|
||||
* erc-backend.el: Handle user modes in relevant server responses
|
||||
* erc.el: Better user mode support.
|
||||
(erc-channel-user): Add members for new modes.
|
||||
(erc-channel-member-halfop-p, erc-channel-user-admin-p)
|
||||
(erc-channel-user-owner-p): Use new struct members.
|
||||
(erc-format-nick, erc-format-@nick): Display user modes as nick prefix.
|
||||
(erc-nick-prefix-face, erc-my-nick-prefix-face): Add new faces
|
||||
(erc-get-user-mode-prefix): Return symbol for mode prefix.
|
||||
(erc-update-channel-member, erc-update-current-channel-member)
|
||||
(erc-channel-receive-names): Update channel users.
|
||||
(erc-nick-at-point): Return correct user info.
|
||||
|
||||
2014-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* erc.el (erc-invite-only-mode, erc-toggle-channel-mode): Simplify.
|
||||
|
@ -615,4 +629,3 @@ See ChangeLog.08 for earlier changes.
|
|||
;; coding: utf-8
|
||||
;; add-log-time-zone-rule: t
|
||||
;; End:
|
||||
|
||||
|
|
|
@ -679,7 +679,7 @@ Conditionally try to reconnect and take appropriate action."
|
|||
(when (buffer-live-p buf)
|
||||
(with-current-buffer buf
|
||||
(erc-log (format
|
||||
"SENTINEL: proc: %S status: %S event: %S (quitting: %S)"
|
||||
"SENTINEL: proc: %S status: %S event: %S (quitting: %S)"
|
||||
cproc (process-status cproc) event erc-server-quitting))
|
||||
(if (string-match "^open" event)
|
||||
;; newly opened connection (no wait)
|
||||
|
@ -1208,7 +1208,6 @@ add things to `%s' instead."
|
|||
parsed 'notice 'active
|
||||
'INVITE ?n nick ?u login ?h host ?c chnl)))))
|
||||
|
||||
|
||||
(define-erc-response-handler (JOIN)
|
||||
"Handle join messages."
|
||||
nil
|
||||
|
@ -1244,7 +1243,7 @@ add things to `%s' instead."
|
|||
(erc-format-message
|
||||
'JOIN ?n nick ?u login ?h host ?c chnl))))))
|
||||
(when buffer (set-buffer buffer))
|
||||
(erc-update-channel-member chnl nick nick t nil nil host login)
|
||||
(erc-update-channel-member chnl nick nick t nil nil nil nil nil host login)
|
||||
;; on join, we want to stay in the new channel buffer
|
||||
;;(set-buffer ob)
|
||||
(erc-display-message parsed nil buffer str))))))
|
||||
|
@ -1413,7 +1412,7 @@ add things to `%s' instead."
|
|||
;; message. We will accumulate private identities indefinitely
|
||||
;; at this point.
|
||||
(erc-update-channel-member (if privp nick tgt) nick nick
|
||||
privp nil nil host login nil nil t)
|
||||
privp nil nil nil nil nil host login nil nil t)
|
||||
(let ((cdata (erc-get-channel-user nick)))
|
||||
(setq fnick (funcall erc-format-nick-function
|
||||
(car cdata) (cdr cdata))))))
|
||||
|
@ -1470,7 +1469,7 @@ add things to `%s' instead."
|
|||
(current-time))))
|
||||
(pcase-let ((`(,nick ,login ,host)
|
||||
(erc-parse-user (erc-response.sender parsed))))
|
||||
(erc-update-channel-member ch nick nick nil nil nil host login)
|
||||
(erc-update-channel-member ch nick nick nil nil nil nil nil nil host login)
|
||||
(erc-update-channel-topic ch (format "%s\C-o (%s, %s)" topic nick time))
|
||||
(erc-display-message parsed 'notice (erc-get-buffer ch proc)
|
||||
'TOPIC ?n nick ?u login ?h host
|
||||
|
@ -1800,8 +1799,7 @@ See `erc-display-server-message'." nil
|
|||
(when (string-match "\\(^[0-9]+ \\)\\(.*\\)$" full-name)
|
||||
(setq hopcount (match-string 1 full-name))
|
||||
(setq full-name (match-string 2 full-name)))
|
||||
(erc-update-channel-member channel nick nick nil nil nil host
|
||||
user full-name)
|
||||
(erc-update-channel-member channel nick nick nil nil nil nil nil nil host user full-name)
|
||||
(erc-display-message parsed 'notice 'active 's352
|
||||
?c channel ?n nick ?a away-flag
|
||||
?u user ?h host ?f full-name))))
|
||||
|
|
3941
lisp/erc/erc.el
3941
lisp/erc/erc.el
File diff suppressed because it is too large
Load diff
|
@ -1382,14 +1382,16 @@ called additional times).
|
|||
This macro actually adds an auxiliary function that calls FUN,
|
||||
rather than FUN itself, to `minibuffer-setup-hook'."
|
||||
(declare (indent 1) (debug t))
|
||||
(let ((hook (make-symbol "setup-hook")))
|
||||
`(let (,hook)
|
||||
(let ((hook (make-symbol "setup-hook"))
|
||||
(funsym (make-symbol "fun")))
|
||||
`(let ((,funsym ,fun)
|
||||
,hook)
|
||||
(setq ,hook
|
||||
(lambda ()
|
||||
;; Clear out this hook so it does not interfere
|
||||
;; with any recursive minibuffer usage.
|
||||
(remove-hook 'minibuffer-setup-hook ,hook)
|
||||
(funcall ,fun)))
|
||||
(funcall ,funsym)))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(add-hook 'minibuffer-setup-hook ,hook)
|
||||
|
@ -3659,10 +3661,9 @@ of no valid cache entry."
|
|||
;;; (setq locals-file nil))
|
||||
;; Find the best cached value in `dir-locals-directory-cache'.
|
||||
(dolist (elt dir-locals-directory-cache)
|
||||
(when (and (eq t (compare-strings file nil (length (car elt))
|
||||
(car elt) nil nil
|
||||
(memq system-type
|
||||
'(windows-nt cygwin ms-dos))))
|
||||
(when (and (string-prefix-p (car elt) file
|
||||
(memq system-type
|
||||
'(windows-nt cygwin ms-dos)))
|
||||
(> (length (car elt)) (length (car dir-elt))))
|
||||
(setq dir-elt elt)))
|
||||
(if (and dir-elt
|
||||
|
@ -4507,18 +4508,14 @@ on a DOS/Windows machine, it returns FILENAME in expanded form."
|
|||
(let ((ancestor ".")
|
||||
(filename-dir (file-name-as-directory filename)))
|
||||
(while (not
|
||||
(or
|
||||
(eq t (compare-strings filename-dir nil (length directory)
|
||||
directory nil nil fold-case))
|
||||
(eq t (compare-strings filename nil (length directory)
|
||||
directory nil nil fold-case))))
|
||||
(or (string-prefix-p directory filename-dir fold-case)
|
||||
(string-prefix-p directory filename fold-case)))
|
||||
(setq directory (file-name-directory (substring directory 0 -1))
|
||||
ancestor (if (equal ancestor ".")
|
||||
".."
|
||||
(concat "../" ancestor))))
|
||||
;; Now ancestor is empty, or .., or ../.., etc.
|
||||
(if (eq t (compare-strings filename nil (length directory)
|
||||
directory nil nil fold-case))
|
||||
(if (string-prefix-p directory filename fold-case)
|
||||
;; We matched within FILENAME's directory part.
|
||||
;; Add the rest of FILENAME onto ANCESTOR.
|
||||
(let ((rest (substring filename (length directory))))
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
2014-06-26 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* mm-util.el (help-function-arglist): Remove outdated declaration.
|
||||
|
||||
2014-06-24 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* html2text.el (html2text-get-attr): Rewrite to handle spaces in quoted
|
||||
attribute values. (Bug#17834)
|
||||
|
||||
2013-06-22 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* gnus-sum.el (gnus-summary-edit-article-done):
|
||||
Prefer point-marker to copy-marker of point.
|
||||
|
||||
2014-06-05 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus-art.el (gnus-article-edit-part): Don't modifiy markers.
|
||||
|
|
|
@ -10613,7 +10613,7 @@ groups."
|
|||
(let ((lines (count-lines (point) (point-max)))
|
||||
(length (- (point-max) (point)))
|
||||
(case-fold-search t)
|
||||
(body (copy-marker (point))))
|
||||
(body (point-marker)))
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward "^content-length:[ \t]\\([0-9]+\\)" body t)
|
||||
(delete-region (match-beginning 1) (match-end 1))
|
||||
|
|
|
@ -179,72 +179,20 @@ formatting, and then moved afterward.")
|
|||
|
||||
(defun html2text-get-attr (p1 p2)
|
||||
(goto-char p1)
|
||||
(re-search-forward " +[^ ]" p2 t)
|
||||
(let* ((attr-string (buffer-substring-no-properties (1- (point)) (1- p2)))
|
||||
(tmp-list (split-string attr-string))
|
||||
(attr-list)
|
||||
(counter 0)
|
||||
(prev (car tmp-list))
|
||||
(this (nth 1 tmp-list))
|
||||
(next (nth 2 tmp-list))
|
||||
(index 1))
|
||||
|
||||
(cond
|
||||
;; size=3
|
||||
((string-match "[^ ]=[^ ]" prev)
|
||||
(let ((attr (nth 0 (split-string prev "=")))
|
||||
(value (substring prev (1+ (string-match "=" prev)))))
|
||||
(setq attr-list (cons (list attr value) attr-list))))
|
||||
;; size= 3
|
||||
((string-match "[^ ]=\\'" prev)
|
||||
(setq attr-list (cons (list (substring prev 0 -1) this) attr-list))))
|
||||
|
||||
(while (< index (length tmp-list))
|
||||
(cond
|
||||
;; size=3
|
||||
((string-match "[^ ]=[^ ]" this)
|
||||
(let ((attr (nth 0 (split-string this "=")))
|
||||
(value (substring this (1+ (string-match "=" this)))))
|
||||
(setq attr-list (cons (list attr value) attr-list))))
|
||||
;; size =3
|
||||
((string-match "\\`=[^ ]" this)
|
||||
(setq attr-list (cons (list prev (substring this 1)) attr-list)))
|
||||
;; size= 3
|
||||
((string-match "[^ ]=\\'" this)
|
||||
(setq attr-list (cons (list (substring this 0 -1) next) attr-list)))
|
||||
;; size = 3
|
||||
((string= "=" this)
|
||||
(setq attr-list (cons (list prev next) attr-list))))
|
||||
(setq index (1+ index))
|
||||
(setq prev this)
|
||||
(setq this next)
|
||||
(setq next (nth (1+ index) tmp-list)))
|
||||
;;
|
||||
;; Tags with no accompanying "=" i.e. value=nil
|
||||
;;
|
||||
(setq prev (car tmp-list))
|
||||
(setq this (nth 1 tmp-list))
|
||||
(setq next (nth 2 tmp-list))
|
||||
(setq index 1)
|
||||
|
||||
(when (and (not (string-match "=" prev))
|
||||
(not (string= (substring this 0 1) "=")))
|
||||
(setq attr-list (cons (list prev nil) attr-list)))
|
||||
(while (< index (1- (length tmp-list)))
|
||||
(when (and (not (string-match "=" this))
|
||||
(not (or (string= (substring next 0 1) "=")
|
||||
(string= (substring prev -1) "="))))
|
||||
(setq attr-list (cons (list this nil) attr-list)))
|
||||
(setq index (1+ index))
|
||||
(setq prev this)
|
||||
(setq this next)
|
||||
(setq next (nth (1+ index) tmp-list)))
|
||||
|
||||
(when (and this
|
||||
(not (string-match "=" this))
|
||||
(not (string= (substring prev -1) "=")))
|
||||
(setq attr-list (cons (list this nil) attr-list)))
|
||||
;; return - value
|
||||
(re-search-forward "\\s-+" p2 t)
|
||||
(let (attr-list)
|
||||
(while (re-search-forward "[-a-z0-9._]+" p2 t)
|
||||
(setq attr-list
|
||||
(cons
|
||||
(list (match-string 0)
|
||||
(when (looking-at "\\s-*=")
|
||||
(goto-char (match-end 0))
|
||||
(skip-chars-forward "[:space:]")
|
||||
(when (or (looking-at "\"[^\"]*\"\\|'[^']*'")
|
||||
(looking-at "[-a-z0-9._:]+"))
|
||||
(goto-char (match-end 0))
|
||||
(match-string 0))))
|
||||
attr-list)))
|
||||
attr-list))
|
||||
|
||||
;;
|
||||
|
|
|
@ -1374,8 +1374,6 @@ If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'."
|
|||
(write-region start end filename append visit lockname)))
|
||||
|
||||
(autoload 'gmm-write-region "gmm-utils")
|
||||
(declare-function help-function-arglist "help-fns"
|
||||
(def &optional preserve-names))
|
||||
|
||||
;; It is not a MIME function, but some MIME functions use it.
|
||||
(if (and (fboundp 'make-temp-file)
|
||||
|
|
|
@ -483,7 +483,7 @@ FILE is the file where FUNCTION was probably defined."
|
|||
(beg (if (and (or (byte-code-function-p def)
|
||||
(keymapp def)
|
||||
(memq (car-safe def) '(macro lambda closure)))
|
||||
file-name
|
||||
(stringp file-name)
|
||||
(help-fns--autoloaded-p function file-name))
|
||||
(if (commandp def)
|
||||
"an interactive autoloaded "
|
||||
|
|
|
@ -249,7 +249,7 @@ indentation by specifying a large negative ARG."
|
|||
(indent-rigidly--pop-undo)
|
||||
(let* ((current (indent-rigidly--current-indentation beg end))
|
||||
(rtl (eq (current-bidi-paragraph-direction) 'right-to-left))
|
||||
(next (indent--next-tab-stop current (if rtl nil 'prev))))
|
||||
(next (indent-next-tab-stop current (if rtl nil 'prev))))
|
||||
(indent-rigidly beg end (- next current))))
|
||||
|
||||
(defun indent-rigidly-right-to-tab-stop (beg end)
|
||||
|
@ -258,7 +258,7 @@ indentation by specifying a large negative ARG."
|
|||
(indent-rigidly--pop-undo)
|
||||
(let* ((current (indent-rigidly--current-indentation beg end))
|
||||
(rtl (eq (current-bidi-paragraph-direction) 'right-to-left))
|
||||
(next (indent--next-tab-stop current (if rtl 'prev))))
|
||||
(next (indent-next-tab-stop current (if rtl 'prev))))
|
||||
(indent-rigidly beg end (- next current))))
|
||||
|
||||
(defun indent-line-to (column)
|
||||
|
@ -654,7 +654,7 @@ You can add or remove colons and then do \\<edit-tab-stops-map>\\[edit-tab-stops
|
|||
(setq tab-stop-list tabs))
|
||||
(message "Tab stops installed"))
|
||||
|
||||
(defun indent--next-tab-stop (column &optional prev)
|
||||
(defun indent-next-tab-stop (column &optional prev)
|
||||
"Return the next tab stop after COLUMN.
|
||||
If PREV is non-nil, return the previous one instead."
|
||||
(let ((tabs tab-stop-list))
|
||||
|
@ -677,6 +677,13 @@ If PREV is non-nil, return the previous one instead."
|
|||
(if (<= column last) -1 (/ (- column last 1) step))
|
||||
(1+ (/ (- column last) step)))))))))
|
||||
|
||||
(defun indent-accumulate-tab-stops (limit)
|
||||
"Get a list of tab stops before LIMIT (inclusive)."
|
||||
(let ((tab 0) (tab-stops))
|
||||
(while (<= (setq tab (indent-next-tab-stop tab)) limit)
|
||||
(push tab tab-stops))
|
||||
(nreverse tab-stops)))
|
||||
|
||||
(defun tab-to-tab-stop ()
|
||||
"Insert spaces or tabs to next defined tab-stop column.
|
||||
The variable `tab-stop-list' is a list of columns at which there are tab stops.
|
||||
|
@ -684,7 +691,7 @@ Use \\[edit-tab-stops] to edit them interactively."
|
|||
(interactive)
|
||||
(and abbrev-mode (= (char-syntax (preceding-char)) ?w)
|
||||
(expand-abbrev))
|
||||
(let ((nexttab (indent--next-tab-stop (current-column))))
|
||||
(let ((nexttab (indent-next-tab-stop (current-column))))
|
||||
(delete-horizontal-space t)
|
||||
(indent-to nexttab)))
|
||||
|
||||
|
@ -693,7 +700,7 @@ Use \\[edit-tab-stops] to edit them interactively."
|
|||
The variable `tab-stop-list' is a list of columns at which there are tab stops.
|
||||
Use \\[edit-tab-stops] to edit them interactively."
|
||||
(interactive)
|
||||
(let ((nexttab (indent--next-tab-stop (current-column))))
|
||||
(let ((nexttab (indent-next-tab-stop (current-column))))
|
||||
(let ((before (point)))
|
||||
(move-to-column nexttab t)
|
||||
(save-excursion
|
||||
|
|
|
@ -2691,9 +2691,7 @@ Because of ambiguities, this should be concatenated with something like
|
|||
(equal (nth 1 Info-complete-cache) Info-current-node)
|
||||
(equal (nth 2 Info-complete-cache) Info-complete-next-re)
|
||||
(equal (nth 5 Info-complete-cache) Info-complete-nodes)
|
||||
(let ((prev (nth 3 Info-complete-cache)))
|
||||
(eq t (compare-strings string 0 (length prev)
|
||||
prev 0 nil t))))
|
||||
(string-prefix-p (nth 3 Info-complete-cache) string) t)
|
||||
;; We can reuse the previous list.
|
||||
(setq completions (nth 4 Info-complete-cache))
|
||||
;; The cache can't be used.
|
||||
|
|
|
@ -1176,8 +1176,8 @@ Setup char-width-table appropriate for non-CJK language environment."
|
|||
(elt
|
||||
'((#x0000 #x007F latin)
|
||||
(#x00A0 #x024F latin)
|
||||
(#x0250 #x02AF phonetic)
|
||||
(#x02B0 #x036F latin)
|
||||
(#x0250 #x02AF phonetic) ; IPA Extensions
|
||||
(#x02B0 #x036F latin) ; Spacing Modifiers and Diacriticals
|
||||
(#x0370 #x03E1 greek)
|
||||
(#x03E2 #x03EF coptic)
|
||||
(#x03F0 #x03F3 greek)
|
||||
|
@ -1186,12 +1186,12 @@ Setup char-width-table appropriate for non-CJK language environment."
|
|||
(#x0590 #x05FF hebrew)
|
||||
(#x0600 #x06FF arabic)
|
||||
(#x0700 #x074F syriac)
|
||||
(#x0750 #x077F arabic)
|
||||
(#x0750 #x077F arabic) ; Arabic Supplement
|
||||
(#x0780 #x07BF thaana)
|
||||
(#x07C0 #x07FF nko)
|
||||
(#x0800 #x083F samaritan)
|
||||
(#x0840 #x085F mandaic)
|
||||
(#x08A0 #x08FF arabic)
|
||||
(#x08A0 #x08FF arabic) ; Arabic Extended-A
|
||||
(#x0900 #x097F devanagari)
|
||||
(#x0980 #x09FF bengali)
|
||||
(#x0A00 #x0A7F gurmukhi)
|
||||
|
@ -1205,10 +1205,10 @@ Setup char-width-table appropriate for non-CJK language environment."
|
|||
(#x0E00 #x0E7F thai)
|
||||
(#x0E80 #x0EFF lao)
|
||||
(#x0F00 #x0FFF tibetan)
|
||||
(#x1000 #x109F burmese) ; according to Unicode 6.1, should be "myanmar"
|
||||
(#x1000 #x109F burmese) ; Myanmar
|
||||
(#x10A0 #x10FF georgian)
|
||||
(#x1100 #x11FF hangul)
|
||||
(#x1200 #x139F ethiopic)
|
||||
(#x1200 #x139F ethiopic) ; Ethiopic and Ethiopic Supplement
|
||||
(#x13A0 #x13FF cherokee)
|
||||
(#x1400 #x167F canadian-aboriginal)
|
||||
(#x1680 #x169F ogham)
|
||||
|
@ -1219,13 +1219,14 @@ Setup char-width-table appropriate for non-CJK language environment."
|
|||
(#x1760 #x177F tagbanwa)
|
||||
(#x1780 #x17FF khmer)
|
||||
(#x1800 #x18AF mongolian)
|
||||
(#x18B0 #x18FF canadian-aboriginal)
|
||||
(#x18B0 #x18FF canadian-aboriginal) ; Canadian Aboriginal Syllabics Extended
|
||||
(#x1900 #x194F limbu)
|
||||
(#x1950 #x197F tai-le)
|
||||
(#x1980 #x19DF tai-lue)
|
||||
(#x19E0 #x19FF khmer)
|
||||
(#x1980 #x19DF tai-lue) ; New Tai Lue
|
||||
(#x19E0 #x19FF khmer) ; Khmer Symbols
|
||||
(#x1A00 #x1A00 buginese)
|
||||
(#x1A20 #x1AAF tai-tham)
|
||||
(#x1AB0 #x1AFF latin) ; Combining Diacritical Marks Extended
|
||||
(#x1B00 #x1B7F balinese)
|
||||
(#x1B80 #x1BBF sundanese)
|
||||
(#x1BC0 #x1BFF batak)
|
||||
|
@ -1233,58 +1234,63 @@ Setup char-width-table appropriate for non-CJK language environment."
|
|||
(#x1C50 #x1C7F ol-chiki)
|
||||
(#x1CC0 #x1CCF sundanese)
|
||||
(#x1CD0 #x1CFF vedic)
|
||||
(#x1D00 #x1DBF phonetic)
|
||||
(#x1DC0 #x1EFF latin)
|
||||
(#x1F00 #x1FFF greek)
|
||||
(#x1D00 #x1DBF phonetic) ; Phonetic Extensions & Supplement
|
||||
(#x1DC0 #x1EFF latin) ; Latin Extended Additional
|
||||
(#x1F00 #x1FFF greek) ; Greek Extended
|
||||
(#x2000 #x27FF symbol)
|
||||
(#x2800 #x28FF braille)
|
||||
(#x2900 #x2BFF symbol)
|
||||
(#x2C00 #x2C5F glagolitic)
|
||||
(#x2C60 #x2C7F latin)
|
||||
(#x2C60 #x2C7F latin) ; Latin Extended-C
|
||||
(#x2C80 #x2CFF coptic)
|
||||
(#x2D00 #x2D2F georgian)
|
||||
(#x2D00 #x2D2F georgian) ; Georgian Supplement
|
||||
(#x2D30 #x2D7F tifinagh)
|
||||
(#x2D80 #x2DDF ethiopic)
|
||||
(#x2DE0 #x2DFF cyrillic)
|
||||
(#x2D80 #x2DDF ethiopic) ; Ethiopic Extended
|
||||
(#x2DE0 #x2DFF cyrillic) ; Cyrillic Extended-A
|
||||
(#x2E00 #x2E7F symbol)
|
||||
(#x2E80 #x2FDF han)
|
||||
(#x2FF0 #x2FFF ideographic-description)
|
||||
(#x3000 #x303F cjk-misc)
|
||||
(#x3040 #x30FF kana)
|
||||
(#x3040 #x30FF kana) ; Hiragana and Katakana
|
||||
(#x3100 #x312F bopomofo)
|
||||
(#x3130 #x318F hangul)
|
||||
(#x3130 #x318F hangul) ; Hangul Compatibility Jamo
|
||||
(#x3190 #x319F kanbun)
|
||||
(#x31A0 #x31BF bopomofo)
|
||||
(#x31C0 #x31EF cjk-misc)
|
||||
(#x31F0 #x31FF kana)
|
||||
(#x31A0 #x31BF bopomofo) ; Bopomofo Extended
|
||||
(#x31C0 #x31EF cjk-misc) ; CJK Strokes
|
||||
(#x31F0 #x31FF kana) ; Katakana Phonetic Extensions
|
||||
(#x3200 #x9FAF han)
|
||||
(#xA000 #xA4CF yi)
|
||||
(#xA4D0 #xA4FF lisu)
|
||||
(#xA500 #xA63F vai)
|
||||
(#xA640 #xA69F cyrillic)
|
||||
(#xA640 #xA69F cyrillic) ; Cyrillic Extended-B
|
||||
(#xA6A0 #xA6FF bamum)
|
||||
(#xA700 #xA7FF latin)
|
||||
(#xA800 #xA82F syloti-nagri)
|
||||
(#xA830 #xA83F north-indic-number)
|
||||
(#xA840 #xA87F phags-pa)
|
||||
(#xA880 #xA8DF saurashtra)
|
||||
(#xA8E0 #xA8FF devanagari)
|
||||
(#xA8E0 #xA8FF devanagari) ; Devanagari Extended
|
||||
(#xA900 #xA92F kayah-li)
|
||||
(#xA930 #xA95F rejang)
|
||||
(#xA960 #xA97F hangul)
|
||||
(#xA960 #xA97F hangul) ; Hangul Jamo Extended
|
||||
(#xA980 #xA9DF javanese)
|
||||
(#xA9E0 #xA9FF burmese) ; Myanmar Extended-B
|
||||
(#xAA00 #xAA5F cham)
|
||||
(#xAA60 #xAA7B burmese) ; Unicode 6.1: "myanmar"
|
||||
(#xAA60 #xAA7F burmese) ; Myanmar Extended-A
|
||||
(#xAA80 #xAADF tai-viet)
|
||||
(#xAAE0 #xAAFF meetei-mayek)
|
||||
(#xAB00 #xAB2F ethiopic)
|
||||
(#xAAE0 #xAAFF meetei-mayek) ; Meetei Mayek Extensions
|
||||
(#xAB00 #xAB2F ethiopic) ; Ethiopic Extended-A
|
||||
(#xAB30 #xAB6F latin) ; Latin Extended-E
|
||||
(#xABC0 #xABFF meetei-mayek)
|
||||
(#xAC00 #xD7FF hangul)
|
||||
(#xF900 #xFAFF han)
|
||||
(#xFB1D #xFB4F hebrew)
|
||||
(#xFB50 #xFDFF arabic)
|
||||
(#xFB00 #xFB06 latin) ; Latin ligatures
|
||||
(#xFB13 #xFB17 armenian) ; Armenian ligatures
|
||||
(#xFB1D #xFB4F hebrew) ; Alphabetic Presentation Forms
|
||||
(#xFB50 #xFDFF arabic) ; Arabic Presentation Forms-A
|
||||
(#xFE20 #xFE2F latin) ; Combining Half Marks
|
||||
(#xFE30 #xFE4F han)
|
||||
(#xFE70 #xFEFF arabic)
|
||||
(#xFE70 #xFEFF arabic) ; Arabic Presentation Forms-B
|
||||
(#xFF00 #xFF5F cjk-misc)
|
||||
(#xFF61 #xFF9F kana)
|
||||
(#xFFE0 #xFFE6 cjk-misc)
|
||||
|
@ -1295,51 +1301,75 @@ Setup char-width-table appropriate for non-CJK language environment."
|
|||
(#x101D0 #x101FF phaistos-disc)
|
||||
(#x10280 #x1029F lycian)
|
||||
(#x102A0 #x102DF carian)
|
||||
(#x102E0 #x102FF coptic) ; Coptic Epact Numbers
|
||||
(#x10300 #x1032F olt-italic)
|
||||
(#x10330 #x1034F gothic)
|
||||
(#x10350 #x1037F old-permic)
|
||||
(#x10380 #x1039F ugaritic)
|
||||
(#x103A0 #x103DF old-persian)
|
||||
(#x10400 #x1044F deseret)
|
||||
(#x10450 #x1047F shavian)
|
||||
(#x10480 #x104AF osmanya)
|
||||
(#x10500 #x1052F elbasan)
|
||||
(#x10530 #x1056F caucasian-albanian)
|
||||
(#x10600 #x106BF linear-a)
|
||||
(#x10800 #x1083F cypriot-syllabary)
|
||||
(#x10840 #x1085F aramaic)
|
||||
(#x10860 #x1087F palmyrene)
|
||||
(#x10880 #x108AF nabataean)
|
||||
(#x10900 #x1091F phoenician)
|
||||
(#x10920 #x1093F lydian)
|
||||
(#x10980 #x109FF meroitic)
|
||||
(#x10A00 #x10A5F kharoshthi)
|
||||
(#x10A60 #x10A7F old-south-arabian)
|
||||
(#x10A80 #x10A9F old-north-arabian)
|
||||
(#x10AC0 #x10AFF manichaean)
|
||||
(#x10B00 #x10B3F avestan)
|
||||
(#x10B40 #x10B5F inscriptional-parthian)
|
||||
(#x10B60 #x10B7F inscriptional-pahlavi)
|
||||
(#x10B80 #x10BAF psalter-pahlavi)
|
||||
(#x10C00 #x10C4F old-turkic)
|
||||
(#x10E60 #x10E7F rumi-number)
|
||||
(#x11000 #x1107F brahmi)
|
||||
(#x11080 #x110CF kaithi)
|
||||
(#x110D0 #x110FF sora-sompeng)
|
||||
(#x11100 #x1114F chakma)
|
||||
(#x11150 #x1117F mahajani)
|
||||
(#x11180 #x111DF sharada)
|
||||
(#x111E0 #x111FF sinhala-archaic-number)
|
||||
(#x11200 #x1124F khojki)
|
||||
(#x112B0 #x112FF khudawadi)
|
||||
(#x11300 #x1137F grantha)
|
||||
(#x11480 #x114DF tirhuta)
|
||||
(#x11580 #x115FF siddham)
|
||||
(#x11600 #x1165F modi)
|
||||
(#x11680 #x116CF takri)
|
||||
(#x118A0 #x118FF warang-citi)
|
||||
(#x11AC0 #x11AFF pau-cin-hau)
|
||||
(#x12000 #x123FF cuneiform)
|
||||
(#x12400 #x1247F cuneiform-numbers-and-punctuation)
|
||||
(#x13000 #x1342F egyptian)
|
||||
(#x16800 #x16A3F bamum)
|
||||
(#x16A40 #x16A6F mro)
|
||||
(#x16AD0 #x16AFF bassa-vah)
|
||||
(#x16B00 #x16B8F pahawh-hmong)
|
||||
(#x16F00 #x16F9F miao)
|
||||
(#x1B000 #x1B0FF kana)
|
||||
(#x1B000 #x1B0FF kana) ; Kana Supplement
|
||||
(#x1BC00 #x1BCAF duployan-shorthand)
|
||||
(#x1D000 #x1D0FF byzantine-musical-symbol)
|
||||
(#x1D100 #x1D1FF musical-symbol)
|
||||
(#x1D200 #x1D24F ancient-greek-musical-notation)
|
||||
(#x1D300 #x1D35F tai-xuan-jing-symbol)
|
||||
(#x1D360 #x1D37F counting-rod-numeral)
|
||||
(#x1D400 #x1D7FF mathematical)
|
||||
(#x1EE00 #x1EEFF arabic)
|
||||
(#x1E800 #x1E8DF mende-kikakui)
|
||||
(#x1EE00 #x1EEFF arabic) ; Arabic Mathematical Alphabetic Symbols
|
||||
(#x1F000 #x1F02F mahjong-tile)
|
||||
(#x1F030 #x1F09F domino-tile)
|
||||
(#x1F0A0 #x1F0FF playing-cards)
|
||||
(#x1F100 #x1F1FF symbol)
|
||||
(#x1F200 #x1F2FF han)
|
||||
(#x1F300 #x1F64F symbol)
|
||||
(#x1F680 #x1F77F symbol)
|
||||
(#x1F100 #x1F1FF symbol) ; Enclosed Alphanumeric Supplement
|
||||
(#x1F200 #x1F2FF han) ; Enclosed Ideographic Supplement
|
||||
(#x1F300 #x1F8FF symbol)
|
||||
(#x20000 #x2B81F han)
|
||||
(#x2F800 #x2FFFF han)))
|
||||
(set-char-table-range char-script-table
|
||||
|
|
|
@ -199,91 +199,158 @@
|
|||
(carian #x102A0)
|
||||
(olt-italic #x10300)
|
||||
(ugaritic #x10380)
|
||||
(old-permic #x10350)
|
||||
(old-persian #x103A0)
|
||||
(deseret #x10400)
|
||||
(shavian #x10450)
|
||||
(osmanya #x10480)
|
||||
(elbasan #x10500)
|
||||
(caucasian-albanian #x10530)
|
||||
(linear-a #x10600)
|
||||
(cypriot-syllabary #x10800)
|
||||
(palmyrene #x10860)
|
||||
(nabataean #x10880)
|
||||
(phoenician #x10900)
|
||||
(lydian #x10920)
|
||||
(kharoshthi #x10A00)
|
||||
(manichaean #x10AC0)
|
||||
(mahajani #x11150)
|
||||
(sinhala-archaic-number #x111E1)
|
||||
(khojki #x11200)
|
||||
(khudawadi #x112B0)
|
||||
(grantha #x11305)
|
||||
(tirhuta #x11481)
|
||||
(siddham #x11580)
|
||||
(modi #x11600)
|
||||
(takri #x11680)
|
||||
(warang-citi #x118A1)
|
||||
(pau-cin-hau #x11AC0)
|
||||
(cuneiform #x12000)
|
||||
(cuneiform-numbers-and-punctuation #x12400)
|
||||
(mro #x16A40)
|
||||
(bassa-vah #x16AD0)
|
||||
(pahawh-hmong #x16B11)
|
||||
(duployan-shorthand #x1BC20)
|
||||
(byzantine-musical-symbol #x1D000)
|
||||
(musical-symbol #x1D100)
|
||||
(ancient-greek-musical-notation #x1D200)
|
||||
(tai-xuan-jing-symbol #x1D300)
|
||||
(counting-rod-numeral #x1D360)
|
||||
(mende-kikakui #x1E810)
|
||||
(mahjong-tile #x1F000)
|
||||
(domino-tile #x1F030)))
|
||||
|
||||
(defvar otf-script-alist)
|
||||
|
||||
;; The below was synchronized with the latest Jan 3, 2013 version of
|
||||
;; https://www.microsoft.com/typography/otspec/scripttags.htm.
|
||||
(setq otf-script-alist
|
||||
'((arab . arabic)
|
||||
(armi . aramaic)
|
||||
(armn . armenian)
|
||||
(avst . avestan)
|
||||
(bali . balinese)
|
||||
(bamu . bamum)
|
||||
(batk . batak)
|
||||
(bng2 . bengali)
|
||||
(beng . bengali)
|
||||
(bopo . bopomofo)
|
||||
(brai . braille)
|
||||
(brah . brahmi)
|
||||
(bugi . buginese)
|
||||
(buhd . buhid)
|
||||
(byzm . byzantine-musical-symbol)
|
||||
(cans . canadian-aboriginal)
|
||||
(cari . carian)
|
||||
(cakm . chakma)
|
||||
(cham . cham)
|
||||
(cher . cherokee)
|
||||
(copt . coptic)
|
||||
(xsux . cuneiform)
|
||||
(cyrl . cyrillic)
|
||||
(cprt . cypriot)
|
||||
(cyrl . cyrillic)
|
||||
(dsrt . deseret)
|
||||
(deva . devanagari)
|
||||
(dev2 . devanagari)
|
||||
(egyp . egyptian)
|
||||
(ethi . ethiopic)
|
||||
(geor . georgian)
|
||||
(glag . glagolitic)
|
||||
(goth . gothic)
|
||||
(grek . greek)
|
||||
(gujr . gujarati)
|
||||
(gjr2 . gujarati)
|
||||
(guru . gurmukhi)
|
||||
(gur2 . gurmukhi)
|
||||
(hani . han)
|
||||
(hang . hangul)
|
||||
(jamo . hangul)
|
||||
(hano . hanunoo)
|
||||
(hebr . hebrew)
|
||||
(kana . kana)
|
||||
(phli . inscriptional-pahlavi)
|
||||
(prti . inscriptional-parthian)
|
||||
(java . javanese)
|
||||
(kthi . kaithi)
|
||||
(kana . kana) ; Hiragana
|
||||
(knda . kannada)
|
||||
(knd2 . kannada)
|
||||
(kali . kayah-li)
|
||||
(khar . kharoshthi)
|
||||
(khmr . khmer)
|
||||
(lao\ . lao)
|
||||
(latn . latin)
|
||||
(lepc . lepcha)
|
||||
(limb . limbu)
|
||||
(linb . linear_b)
|
||||
(mlym . malayalam)
|
||||
(mlm2 . malayalam)
|
||||
(mand . mandaic)
|
||||
(math . mathematical)
|
||||
(mtei . meetei-mayek)
|
||||
(merc . meroitic)
|
||||
(mero . meroitic)
|
||||
(mong . mongolian)
|
||||
(musc . musical-symbol)
|
||||
(mymr . burmese)
|
||||
(nko\ . nko)
|
||||
(ogam . ogham)
|
||||
(olck . ol-chiki)
|
||||
(ital . old_italic)
|
||||
(xpeo . old_persian)
|
||||
(sarb . old-south-arabian)
|
||||
(orkh . old-turkic)
|
||||
(orya . oriya)
|
||||
(ory2 . oriya)
|
||||
(osma . osmanya)
|
||||
(phag . phags-pa)
|
||||
(phnx . phoenician)
|
||||
(rjng . rejang)
|
||||
(runr . runic)
|
||||
(samr . samaritan)
|
||||
(saur . saurashtra)
|
||||
(shrd . sharada)
|
||||
(shaw . shavian)
|
||||
(sinh . sinhala)
|
||||
(sora . sora-sompeng)
|
||||
(sund . sundanese)
|
||||
(sylo . syloti_nagri)
|
||||
(syrc . syriac)
|
||||
(tglg . tagalog)
|
||||
(tagb . tagbanwa)
|
||||
(taml . tamil)
|
||||
(tale . tai_le)
|
||||
(talu . tai-lue)
|
||||
(lana . tai-tham)
|
||||
(tavt . tai-viet)
|
||||
(takr . takri)
|
||||
(taml . tamil)
|
||||
(tml2 . tamil)
|
||||
(telu . telugu)
|
||||
(thaa . thaana)
|
||||
(thai . thai)
|
||||
(tibt . tibetan)
|
||||
(tfng . tifinagh)
|
||||
(ugar . ugaritic)
|
||||
(vai\ . vai)
|
||||
(yi\ \ . yi)))
|
||||
|
||||
;; Set standard fontname specification of characters in the default
|
||||
|
@ -312,7 +379,7 @@
|
|||
|
||||
(eval-when-compile
|
||||
|
||||
;; Build a data to initialize the default fontset at compile time to
|
||||
;; Build data to initialize the default fontset at compile time to
|
||||
;; avoid loading charsets that won't be necessary at runtime.
|
||||
|
||||
;; The value is (CJK-REGISTRY-VECTOR TARGET-SPEC ...), where
|
||||
|
|
|
@ -56,6 +56,9 @@
|
|||
(setq i (1+ i)))))
|
||||
string)
|
||||
|
||||
(defvar truncate-string-ellipsis "..." ;"…"
|
||||
"String to use to indicate truncation.")
|
||||
|
||||
;;;###autoload
|
||||
(defun truncate-string-to-width (str end-column
|
||||
&optional start-column padding ellipsis)
|
||||
|
@ -80,11 +83,11 @@ If ELLIPSIS is non-nil, it should be a string which will replace the
|
|||
end of STR (including any padding) if it extends beyond END-COLUMN,
|
||||
unless the display width of STR is equal to or less than the display
|
||||
width of ELLIPSIS. If it is non-nil and not a string, then ELLIPSIS
|
||||
defaults to \"...\"."
|
||||
defaults to `truncate-string-ellipsis'."
|
||||
(or start-column
|
||||
(setq start-column 0))
|
||||
(when (and ellipsis (not (stringp ellipsis)))
|
||||
(setq ellipsis "..."))
|
||||
(setq ellipsis truncate-string-ellipsis))
|
||||
(let ((str-len (length str))
|
||||
(str-width (string-width str))
|
||||
(ellipsis-len (if ellipsis (length ellipsis) 0))
|
||||
|
|
|
@ -244,8 +244,7 @@ The result is a completion table which completes strings of the
|
|||
form (concat S1 S) in the same way as TABLE completes strings of
|
||||
the form (concat S2 S)."
|
||||
(lambda (string pred action)
|
||||
(let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil
|
||||
completion-ignore-case))
|
||||
(let* ((str (if (string-prefix-p s1 string completion-ignore-case)
|
||||
(concat s2 (substring string (length s1)))))
|
||||
(res (if str (complete-with-action action table str pred))))
|
||||
(when res
|
||||
|
@ -257,8 +256,7 @@ the form (concat S2 S)."
|
|||
(+ beg (- (length s1) (length s2))))
|
||||
. ,(and (eq (car-safe res) 'boundaries) (cddr res)))))
|
||||
((stringp res)
|
||||
(if (eq t (compare-strings res 0 (length s2) s2 nil nil
|
||||
completion-ignore-case))
|
||||
(if (string-prefix-p s2 string completion-ignore-case)
|
||||
(concat s1 (substring res (length s2)))))
|
||||
((eq action t)
|
||||
(let ((bounds (completion-boundaries str table pred "")))
|
||||
|
|
|
@ -390,8 +390,6 @@ must be one of the symbols `header', `mode', or `vertical'."
|
|||
(window (posn-window start))
|
||||
(frame (window-frame window))
|
||||
(minibuffer-window (minibuffer-window frame))
|
||||
(on-link (and mouse-1-click-follows-link
|
||||
(mouse-on-link-p start)))
|
||||
(side (and (eq line 'vertical)
|
||||
(or (cdr (assq 'vertical-scroll-bars
|
||||
(frame-parameters frame)))
|
||||
|
@ -487,15 +485,7 @@ must be one of the symbols `header', `mode', or `vertical'."
|
|||
(unless (zerop growth)
|
||||
(setq dragged t)
|
||||
(adjust-window-trailing-edge
|
||||
window (if (eq line 'mode) growth (- growth)) nil t))))))
|
||||
;; Process the terminating event.
|
||||
(when (and (mouse-event-p event) on-link (not dragged)
|
||||
(mouse--remap-link-click-p start-event event))
|
||||
;; If mouse-2 has never been done by the user, it doesn't have
|
||||
;; the necessary property to be interpreted correctly.
|
||||
(put 'mouse-2 'event-kind 'mouse-click)
|
||||
(setcar event 'mouse-2)
|
||||
(push event unread-command-events))))
|
||||
window (if (eq line 'mode) growth (- growth)) nil t))))))))
|
||||
|
||||
(defun mouse-drag-mode-line (start-event)
|
||||
"Change the height of a window by dragging on the mode line."
|
||||
|
@ -589,10 +579,10 @@ command alters the kill ring or not."
|
|||
(defun mouse-set-region-1 ()
|
||||
;; Set transient-mark-mode for a little while.
|
||||
(unless (eq (car-safe transient-mark-mode) 'only)
|
||||
(setq transient-mark-mode
|
||||
(cons 'only
|
||||
(unless (eq transient-mark-mode 'lambda)
|
||||
transient-mark-mode))))
|
||||
(setq-local transient-mark-mode
|
||||
(cons 'only
|
||||
(unless (eq transient-mark-mode 'lambda)
|
||||
transient-mark-mode))))
|
||||
(setq mouse-last-region-beg (region-beginning))
|
||||
(setq mouse-last-region-end (region-end))
|
||||
(setq mouse-last-region-tick (buffer-modified-tick)))
|
||||
|
@ -811,10 +801,10 @@ The region will be defined with mark and point."
|
|||
|
||||
;; Activate the region, using `mouse-start-end' to determine where
|
||||
;; to put point and mark (e.g., double-click will select a word).
|
||||
(setq transient-mark-mode
|
||||
(if (eq transient-mark-mode 'lambda)
|
||||
'(only)
|
||||
(cons 'only transient-mark-mode)))
|
||||
(setq-local transient-mark-mode
|
||||
(if (eq transient-mark-mode 'lambda)
|
||||
'(only)
|
||||
(cons 'only transient-mark-mode)))
|
||||
(let ((range (mouse-start-end start-point start-point click-count)))
|
||||
(push-mark (nth 0 range) t t)
|
||||
(goto-char (nth 1 range)))
|
||||
|
|
|
@ -318,10 +318,12 @@ object is returned instead of a list containing this single Lisp object.
|
|||
(while (eq (car result) :pending)
|
||||
(let ((event (let ((inhibit-redisplay t) unread-command-events)
|
||||
(read-event nil nil check-interval))))
|
||||
(when event
|
||||
(setf unread-command-events
|
||||
(nconc unread-command-events
|
||||
(cons event nil))))
|
||||
(when event
|
||||
(if (ignore-errors (dbus-check-event event))
|
||||
(setf result (gethash key dbus-return-values-table))
|
||||
(setf unread-command-events
|
||||
(nconc unread-command-events
|
||||
(cons event nil)))))
|
||||
(when (< check-interval 1)
|
||||
(setf check-interval (* check-interval 1.05))))))
|
||||
(when (eq (car result) :error)
|
||||
|
|
|
@ -1903,7 +1903,9 @@ Uninteresting lines are those whose responses are listed in
|
|||
(message "Rcirc-Omit mode enabled"))
|
||||
(remove-from-invisibility-spec '(rcirc-omit . nil))
|
||||
(message "Rcirc-Omit mode disabled"))
|
||||
(recenter (when (> (point) rcirc-prompt-start-marker) -1)))
|
||||
(dolist (window (get-buffer-window-list (current-buffer)))
|
||||
(with-selected-window window
|
||||
(recenter (when (> (point) rcirc-prompt-start-marker) -1)))))
|
||||
|
||||
(defun rcirc-switch-to-server-buffer ()
|
||||
"Switch to the server buffer associated with current channel buffer."
|
||||
|
|
|
@ -609,10 +609,10 @@ But handle the case, if the \"test\" command is not available."
|
|||
'write-region
|
||||
(list start end tmpfile append 'no-message lockname confirm))
|
||||
(with-tramp-progress-reporter
|
||||
v 3 (format "Moving tmp file %s to %s" tmpfile filename)
|
||||
v 3 (format "Moving tmp file `%s' to `%s'" tmpfile filename)
|
||||
(unwind-protect
|
||||
(when (tramp-adb-execute-adb-command v "push" tmpfile localname)
|
||||
(tramp-error v 'file-error "Cannot write: `%s' filename"))
|
||||
(tramp-error v 'file-error "Cannot write: `%s'" filename))
|
||||
(delete-file tmpfile)))
|
||||
|
||||
(when (or (eq visit t) (stringp visit))
|
||||
|
@ -801,11 +801,11 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
|
|||
v (format "(cd %s; %s)"
|
||||
(tramp-shell-quote-argument localname) command)
|
||||
"")
|
||||
;; We should show the output anyway.
|
||||
;; We should add the output anyway.
|
||||
(when outbuf
|
||||
(with-current-buffer outbuf
|
||||
(insert-buffer-substring (tramp-get-connection-buffer v)))
|
||||
(when display (display-buffer outbuf))))
|
||||
(when (and display (get-buffer-window outbuf t)) (redisplay))))
|
||||
;; When the user did interrupt, we should do it also. We use
|
||||
;; return code -1 as marker.
|
||||
(quit
|
||||
|
@ -998,7 +998,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
|
|||
(with-temp-buffer
|
||||
(prog1
|
||||
(unless
|
||||
(zerop (apply 'tramp-call-process tramp-adb-program nil t nil args))
|
||||
(zerop
|
||||
(apply 'tramp-call-process vec tramp-adb-program nil t nil args))
|
||||
(buffer-string))
|
||||
(tramp-message vec 6 "%s" (buffer-string)))))
|
||||
|
||||
|
@ -1031,7 +1032,7 @@ This happens for Android >= 4.0."
|
|||
|
||||
(defun tramp-adb-send-command-and-check
|
||||
(vec command)
|
||||
"Run COMMAND and and check its exit status.
|
||||
"Run COMMAND and check its exit status.
|
||||
Sends `echo $?' along with the COMMAND for checking the exit status. If
|
||||
COMMAND is nil, just sends `echo $?'. Returns the exit status found."
|
||||
(tramp-adb-send-command
|
||||
|
@ -1107,10 +1108,7 @@ connection if a previous connection has died for some reason."
|
|||
(and p (processp p) (memq (process-status p) '(run open)))
|
||||
(save-match-data
|
||||
(when (and p (processp p)) (delete-process p))
|
||||
(setq tramp-current-method (tramp-file-name-method vec)
|
||||
tramp-current-user (tramp-file-name-user vec)
|
||||
tramp-current-host (tramp-file-name-host vec)
|
||||
devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))
|
||||
(setq devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))
|
||||
(if (not devices)
|
||||
(tramp-error vec 'file-error "No device connected"))
|
||||
(if (and (> (length host) 0) (not (member host devices)))
|
||||
|
|
|
@ -203,13 +203,15 @@ Remove also properties of all files in subdirectories."
|
|||
;; not show proper directory contents when a file has been copied or
|
||||
;; deleted before.
|
||||
(defun tramp-flush-file-function ()
|
||||
"Flush all Tramp cache properties from `buffer-file-name'."
|
||||
(let ((bfn (if (stringp (buffer-file-name))
|
||||
(buffer-file-name)
|
||||
default-directory)))
|
||||
(when (tramp-tramp-file-p bfn)
|
||||
(with-parsed-tramp-file-name bfn nil
|
||||
(tramp-flush-file-property v localname)))))
|
||||
"Flush all Tramp cache properties from `buffer-file-name'.
|
||||
This is suppressed for temporary buffers."
|
||||
(unless (string-match "^ \\*temp\\*" (or (buffer-name) ""))
|
||||
(let ((bfn (if (stringp (buffer-file-name))
|
||||
(buffer-file-name)
|
||||
default-directory)))
|
||||
(when (tramp-tramp-file-p bfn)
|
||||
(with-parsed-tramp-file-name bfn nil
|
||||
(tramp-flush-file-property v localname))))))
|
||||
|
||||
(add-hook 'before-revert-hook 'tramp-flush-file-function)
|
||||
(add-hook 'eshell-pre-command-hook 'tramp-flush-file-function)
|
||||
|
|
|
@ -120,17 +120,6 @@ present for backward compatibility."
|
|||
tramp-ftp-method
|
||||
'((tramp-parse-netrc "~/.netrc"))))
|
||||
|
||||
;; If there is URL syntax, `substitute-in-file-name' needs special
|
||||
;; handling.
|
||||
(put 'substitute-in-file-name 'ange-ftp 'tramp-handle-substitute-in-file-name)
|
||||
(add-hook 'tramp-ftp-unload-hook
|
||||
(lambda ()
|
||||
(setplist 'substitute-in-file-name
|
||||
(delete 'ange-ftp
|
||||
(delete 'tramp-handle-substitute-in-file-name
|
||||
(symbol-plist
|
||||
'substitute-in-file-name))))))
|
||||
|
||||
;;;###tramp-autoload
|
||||
(defun tramp-ftp-file-name-handler (operation &rest args)
|
||||
"Invoke the Ange-FTP handler for OPERATION.
|
||||
|
|
|
@ -49,14 +49,14 @@
|
|||
|
||||
;; The customer option `tramp-gvfs-methods' contains the list of
|
||||
;; supported connection methods. Per default, these are "dav",
|
||||
;; "davs", "obex" and "synce". Note that with "obex" it might be
|
||||
;; necessary to pair with the other bluetooth device, if it hasn't
|
||||
;; "davs", "obex", "sftp" and "synce". Note that with "obex" it might
|
||||
;; be necessary to pair with the other bluetooth device, if it hasn't
|
||||
;; been done already. There might be also some few seconds delay in
|
||||
;; discovering available bluetooth devices.
|
||||
|
||||
;; Other possible connection methods are "ftp", "sftp" and "smb".
|
||||
;; When one of these methods is added to the list, the remote access
|
||||
;; for that method is performed via GVFS instead of the native Tramp
|
||||
;; Other possible connection methods are "ftp" and "smb". When one of
|
||||
;; these methods is added to the list, the remote access for that
|
||||
;; method is performed via GVFS instead of the native Tramp
|
||||
;; implementation.
|
||||
|
||||
;; GVFS offers even more connection methods. The complete list of
|
||||
|
@ -110,7 +110,7 @@
|
|||
(require 'custom))
|
||||
|
||||
;;;###tramp-autoload
|
||||
(defcustom tramp-gvfs-methods '("dav" "davs" "obex" "synce")
|
||||
(defcustom tramp-gvfs-methods '("dav" "davs" "obex" "sftp" "synce")
|
||||
"List of methods for remote files, accessed with GVFS."
|
||||
:group 'tramp
|
||||
:version "23.2"
|
||||
|
@ -661,7 +661,7 @@ is no information where to trace the message.")
|
|||
"Like `delete-file' for Tramp files."
|
||||
(with-parsed-tramp-file-name filename nil
|
||||
(tramp-flush-file-property v (file-name-directory localname))
|
||||
(tramp-flush-directory-property v localname)
|
||||
(tramp-flush-file-property v localname)
|
||||
(unless
|
||||
(tramp-gvfs-send-command
|
||||
v (if (and trash delete-by-moving-to-trash) "gvfs-trash" "gvfs-rm")
|
||||
|
@ -794,7 +794,8 @@ is no information where to trace the message.")
|
|||
(goto-char (point-min))
|
||||
(setq res-filemodes
|
||||
(if (re-search-forward "unix::mode:\\s-+\\([0-9]+\\)" nil t)
|
||||
(tramp-file-mode-from-int (match-string 1))
|
||||
(tramp-file-mode-from-int
|
||||
(string-to-number (match-string 1)))
|
||||
(if dirp "drwx------" "-rwx------")))
|
||||
;; ... inode and device
|
||||
(goto-char (point-min))
|
||||
|
@ -899,7 +900,7 @@ is no information where to trace the message.")
|
|||
entry)
|
||||
;; Get a list of directories and files.
|
||||
(tramp-gvfs-send-command
|
||||
v "gvfs-ls" (tramp-gvfs-url-file-name directory))
|
||||
v "gvfs-ls" "-h" (tramp-gvfs-url-file-name directory))
|
||||
|
||||
;; Now grab the output.
|
||||
(with-temp-buffer
|
||||
|
@ -1118,9 +1119,9 @@ is no information where to trace the message.")
|
|||
(setq user
|
||||
(concat (match-string 2 user) ";" (match-string 1 user))))
|
||||
(url-parse-make-urlobj
|
||||
method (url-hexify-string user) nil
|
||||
method (and user (url-hexify-string user)) nil
|
||||
(tramp-file-name-real-host v) (tramp-file-name-port v)
|
||||
(url-hexify-string localname) nil nil t))
|
||||
(and localname (url-hexify-string localname)) nil nil t))
|
||||
(url-parse-make-urlobj
|
||||
"file" nil nil nil nil
|
||||
(url-hexify-string (file-truename filename)) nil nil t))))
|
||||
|
@ -1555,14 +1556,10 @@ connection if a previous connection has died for some reason."
|
|||
"Send the COMMAND with its ARGS to connection VEC.
|
||||
COMMAND is usually a command from the gvfs-* utilities.
|
||||
`call-process' is applied, and it returns `t' if the return code is zero."
|
||||
(let (result)
|
||||
(with-current-buffer (tramp-get-connection-buffer vec)
|
||||
(tramp-gvfs-maybe-open-connection vec)
|
||||
(erase-buffer)
|
||||
(tramp-message vec 6 "%s %s" command (mapconcat 'identity args " "))
|
||||
(setq result (apply 'tramp-call-process command nil t nil args))
|
||||
(tramp-message vec 6 "\n%s" (buffer-string))
|
||||
(zerop result))))
|
||||
(with-current-buffer (tramp-get-connection-buffer vec)
|
||||
(tramp-gvfs-maybe-open-connection vec)
|
||||
(erase-buffer)
|
||||
(zerop (apply 'tramp-call-process vec command nil t nil args))))
|
||||
|
||||
|
||||
;; D-Bus BLUEZ functions.
|
||||
|
@ -1671,7 +1668,7 @@ be used."
|
|||
(list user host)))
|
||||
(zeroconf-list-services "_webdav._tcp")))
|
||||
|
||||
;; Add completion function for DAV and DAVS methods.
|
||||
;; Add completion function for SFTP, DAV and DAVS methods.
|
||||
(when (and tramp-gvfs-enabled
|
||||
(member zeroconf-service-avahi (dbus-list-known-names :system)))
|
||||
(zeroconf-init tramp-gvfs-zeroconf-domain)
|
||||
|
|
|
@ -35,6 +35,10 @@
|
|||
(defvar directory-sep-char)
|
||||
(defvar tramp-gw-tunnel-method)
|
||||
(defvar tramp-gw-socks-method)
|
||||
(defvar vc-handled-backends)
|
||||
(defvar vc-bzr-program)
|
||||
(defvar vc-git-program)
|
||||
(defvar vc-hg-program)
|
||||
|
||||
(defcustom tramp-inline-compress-start-size 4096
|
||||
"The minimum size of compressing where inline transfer.
|
||||
|
@ -141,17 +145,6 @@ detected as prompt when being sent on echoing hosts, therefore.")
|
|||
("-o" "StrictHostKeyChecking=no")))
|
||||
(tramp-default-port 22)))
|
||||
;;;###tramp-autoload
|
||||
(add-to-list 'tramp-methods
|
||||
'("sftp"
|
||||
(tramp-login-program "ssh")
|
||||
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
|
||||
("-e" "none") ("%h")))
|
||||
(tramp-async-args (("-q")))
|
||||
(tramp-remote-shell "/bin/sh")
|
||||
(tramp-remote-shell-args ("-c"))
|
||||
(tramp-copy-program "sftp")
|
||||
(tramp-copy-args ("%c"))))
|
||||
;;;###tramp-autoload
|
||||
(add-to-list 'tramp-methods
|
||||
'("rsync"
|
||||
(tramp-login-program "ssh")
|
||||
|
@ -210,11 +203,25 @@ detected as prompt when being sent on echoing hosts, therefore.")
|
|||
(add-to-list 'tramp-methods
|
||||
'("telnet"
|
||||
(tramp-login-program "telnet")
|
||||
(tramp-login-args (("%h") ("%p")))
|
||||
(tramp-login-args (("%h") ("%p") ("2>/dev/null")))
|
||||
(tramp-remote-shell "/bin/sh")
|
||||
(tramp-remote-shell-args ("-c"))
|
||||
(tramp-default-port 23)))
|
||||
;;;###tramp-autoload
|
||||
(add-to-list 'tramp-methods
|
||||
'("nc"
|
||||
(tramp-login-program "telnet")
|
||||
(tramp-login-args (("%h") ("%p") ("2>/dev/null")))
|
||||
(tramp-remote-shell "/bin/sh")
|
||||
(tramp-remote-shell-args ("-c"))
|
||||
(tramp-copy-program "nc")
|
||||
;; We use "-v" for better error tracking.
|
||||
(tramp-copy-args (("-w" "1") ("-v") ("%h") ("%r")))
|
||||
(tramp-remote-copy-program "nc")
|
||||
;; We use "-p" as required for busyboxes.
|
||||
(tramp-remote-copy-args (("-l") ("-p" "%r")))
|
||||
(tramp-default-port 23)))
|
||||
;;;###tramp-autoload
|
||||
(add-to-list 'tramp-methods
|
||||
'("su"
|
||||
(tramp-login-program "su")
|
||||
|
@ -249,9 +256,16 @@ detected as prompt when being sent on echoing hosts, therefore.")
|
|||
(tramp-remote-shell-args ("-c"))))
|
||||
;;;###tramp-autoload
|
||||
(add-to-list 'tramp-methods
|
||||
'("plink"
|
||||
`("plink"
|
||||
(tramp-login-program "plink")
|
||||
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h")))
|
||||
;; ("%h") must be a single element, see `tramp-compute-multi-hops'.
|
||||
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("-t")
|
||||
("%h") ("\"")
|
||||
(,(format
|
||||
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
|
||||
tramp-terminal-type
|
||||
tramp-initial-end-of-output))
|
||||
("/bin/sh") ("\"")))
|
||||
(tramp-remote-shell "/bin/sh")
|
||||
(tramp-remote-shell-args ("-c"))
|
||||
(tramp-default-port 22)))
|
||||
|
@ -259,21 +273,25 @@ detected as prompt when being sent on echoing hosts, therefore.")
|
|||
(add-to-list 'tramp-methods
|
||||
`("plinkx"
|
||||
(tramp-login-program "plink")
|
||||
;; ("%h") must be a single element, see
|
||||
;; `tramp-compute-multi-hops'.
|
||||
(tramp-login-args (("-load") ("%h") ("-t")
|
||||
(tramp-login-args (("-load") ("%h") ("-t") ("\"")
|
||||
(,(format
|
||||
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
|
||||
tramp-terminal-type
|
||||
tramp-initial-end-of-output))
|
||||
("/bin/sh")))
|
||||
("/bin/sh") ("\"")))
|
||||
(tramp-remote-shell "/bin/sh")
|
||||
(tramp-remote-shell-args ("-c"))))
|
||||
;;;###tramp-autoload
|
||||
(add-to-list 'tramp-methods
|
||||
'("pscp"
|
||||
`("pscp"
|
||||
(tramp-login-program "plink")
|
||||
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h")))
|
||||
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("-t")
|
||||
("%h") ("\"")
|
||||
(,(format
|
||||
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
|
||||
tramp-terminal-type
|
||||
tramp-initial-end-of-output))
|
||||
("/bin/sh") ("\"")))
|
||||
(tramp-remote-shell "/bin/sh")
|
||||
(tramp-remote-shell-args ("-c"))
|
||||
(tramp-copy-program "pscp")
|
||||
|
@ -284,9 +302,15 @@ detected as prompt when being sent on echoing hosts, therefore.")
|
|||
(tramp-default-port 22)))
|
||||
;;;###tramp-autoload
|
||||
(add-to-list 'tramp-methods
|
||||
'("psftp"
|
||||
`("psftp"
|
||||
(tramp-login-program "plink")
|
||||
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h")))
|
||||
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("-t")
|
||||
("%h") ("\"")
|
||||
(,(format
|
||||
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
|
||||
tramp-terminal-type
|
||||
tramp-initial-end-of-output))
|
||||
("/bin/sh") ("\"")))
|
||||
(tramp-remote-shell "/bin/sh")
|
||||
(tramp-remote-shell-args ("-c"))
|
||||
(tramp-copy-program "pscp")
|
||||
|
@ -319,7 +343,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
|
|||
(add-to-list 'tramp-default-user-alist
|
||||
`(,(concat
|
||||
"\\`"
|
||||
(regexp-opt '("rcp" "remcp" "rsh" "telnet" "krlogin" "fcp"))
|
||||
(regexp-opt
|
||||
'("rcp" "remcp" "rsh" "telnet" "nc" "krlogin" "fcp"))
|
||||
"\\'")
|
||||
nil ,(user-login-name)))
|
||||
|
||||
|
@ -370,7 +395,6 @@ detected as prompt when being sent on echoing hosts, therefore.")
|
|||
(tramp-set-completion-function "remcp" tramp-completion-function-alist-rsh)
|
||||
(tramp-set-completion-function "scp" tramp-completion-function-alist-ssh)
|
||||
(tramp-set-completion-function "scpx" tramp-completion-function-alist-ssh)
|
||||
(tramp-set-completion-function "sftp" tramp-completion-function-alist-ssh)
|
||||
(tramp-set-completion-function "rsync" tramp-completion-function-alist-ssh)
|
||||
(tramp-set-completion-function "rsh" tramp-completion-function-alist-rsh)
|
||||
(tramp-set-completion-function "remsh" tramp-completion-function-alist-rsh)
|
||||
|
@ -378,6 +402,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
|
|||
(tramp-set-completion-function "sshx" tramp-completion-function-alist-ssh)
|
||||
(tramp-set-completion-function
|
||||
"telnet" tramp-completion-function-alist-telnet)
|
||||
(tramp-set-completion-function "nc" tramp-completion-function-alist-telnet)
|
||||
(tramp-set-completion-function "su" tramp-completion-function-alist-su)
|
||||
(tramp-set-completion-function "sudo" tramp-completion-function-alist-su)
|
||||
(tramp-set-completion-function "ksu" tramp-completion-function-alist-su)
|
||||
|
@ -387,6 +412,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
|
|||
(tramp-set-completion-function
|
||||
"plinkx" tramp-completion-function-alist-putty)
|
||||
(tramp-set-completion-function "pscp" tramp-completion-function-alist-ssh)
|
||||
(tramp-set-completion-function "psftp" tramp-completion-function-alist-ssh)
|
||||
(tramp-set-completion-function "fcp" tramp-completion-function-alist-ssh)))
|
||||
|
||||
;; "getconf PATH" yields:
|
||||
|
@ -1346,7 +1372,7 @@ of."
|
|||
;; We are local, so we don't need the UTC settings.
|
||||
(zerop
|
||||
(tramp-call-process
|
||||
"touch" nil nil nil "-t"
|
||||
nil "touch" nil nil nil "-t"
|
||||
(format-time-string "%Y%m%d%H%M.%S" time)
|
||||
(tramp-shell-quote-argument filename)))))
|
||||
|
||||
|
@ -1380,7 +1406,7 @@ be non-negative integers."
|
|||
(let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer)))
|
||||
(gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer))))
|
||||
(tramp-call-process
|
||||
"chown" nil nil nil
|
||||
nil "chown" nil nil nil
|
||||
(format "%d:%d" uid gid) (tramp-shell-quote-argument filename))))))
|
||||
|
||||
(defun tramp-remote-selinux-p (vec)
|
||||
|
@ -1542,7 +1568,7 @@ be non-negative integers."
|
|||
(defun tramp-sh-handle-file-directory-p (filename)
|
||||
"Like `file-directory-p' for Tramp files."
|
||||
(with-parsed-tramp-file-name filename nil
|
||||
;; `file-directory-p' is used as predicate for filename completion.
|
||||
;; `file-directory-p' is used as predicate for file name completion.
|
||||
;; Sometimes, when a connection is not established yet, it is
|
||||
;; desirable to return t immediately for "/method:foo:". It can
|
||||
;; be expected that this is always a directory.
|
||||
|
@ -1644,10 +1670,10 @@ be non-negative integers."
|
|||
vec
|
||||
(format
|
||||
(concat
|
||||
;; We must care about filenames with spaces, or starting with
|
||||
;; We must care about file names with spaces, or starting with
|
||||
;; "-"; this would confuse xargs. "ls -aQ" might be a solution,
|
||||
;; but it does not work on all remote systems. Therefore, we
|
||||
;; quote the filenames via sed.
|
||||
;; quote the file names via sed.
|
||||
"cd %s; echo \"(\"; (%s -a | sed -e s/\\$/\\\"/g -e s/^/\\\"/g | "
|
||||
"xargs %s -c "
|
||||
"'(\"%%n\" (\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t %%ie0 -1)'"
|
||||
|
@ -1670,15 +1696,15 @@ be non-negative integers."
|
|||
(mapcar
|
||||
'list
|
||||
(or
|
||||
;; Try cache entries for filename, filename with last
|
||||
;; character removed, filename with last two characters
|
||||
;; Try cache entries for `filename', `filename' with last
|
||||
;; character removed, `filename' with last two characters
|
||||
;; removed, ..., and finally the empty string - all
|
||||
;; concatenated to the local directory name.
|
||||
(let ((remote-file-name-inhibit-cache
|
||||
(or remote-file-name-inhibit-cache
|
||||
tramp-completion-reread-directory-timeout)))
|
||||
|
||||
;; This is inefficient for very long filenames, pity
|
||||
;; This is inefficient for very long file names, pity
|
||||
;; `reduce' is not available...
|
||||
(car
|
||||
(apply
|
||||
|
@ -1742,7 +1768,7 @@ be non-negative integers."
|
|||
(tramp-shell-quote-argument localname)
|
||||
(tramp-get-ls-command v)
|
||||
;; When `filename' is empty, just `ls' without
|
||||
;; filename argument is more efficient than `ls *'
|
||||
;; `filename' argument is more efficient than `ls *'
|
||||
;; for very large directories and might avoid the
|
||||
;; `Argument list too long' error.
|
||||
;;
|
||||
|
@ -1981,7 +2007,7 @@ file names."
|
|||
;; create a new buffer, insert the contents of the
|
||||
;; source file into it, then write out the buffer to
|
||||
;; the target file. The advantage is that it doesn't
|
||||
;; matter which filename handlers are used for the
|
||||
;; matter which file name handlers are used for the
|
||||
;; source and target file.
|
||||
(t
|
||||
(tramp-do-copy-or-rename-file-via-buffer
|
||||
|
@ -2212,19 +2238,19 @@ the uid and gid from FILENAME."
|
|||
(set-file-modes newname file-modes))))))
|
||||
|
||||
(defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date)
|
||||
"Invoke rcp program to copy.
|
||||
"Invoke `scp' program to copy.
|
||||
The method used must be an out-of-band method."
|
||||
(let* ((t1 (tramp-tramp-file-p filename))
|
||||
(t2 (tramp-tramp-file-p newname))
|
||||
(orig-vec (tramp-dissect-file-name (if t1 filename newname)))
|
||||
copy-program copy-args copy-env copy-keep-date port spec
|
||||
options source target)
|
||||
copy-program copy-args copy-env copy-keep-date port listener spec
|
||||
options source target remote-copy-program remote-copy-args)
|
||||
|
||||
(with-parsed-tramp-file-name (if t1 filename newname) nil
|
||||
(if (and t1 t2)
|
||||
|
||||
;; Both are Tramp files. We shall optimize it when the
|
||||
;; methods for filename and newname are the same.
|
||||
;; methods for FILENAME and NEWNAME are the same.
|
||||
(let* ((dir-flag (file-directory-p filename))
|
||||
(tmpfile (tramp-compat-make-temp-file localname dir-flag)))
|
||||
(if dir-flag
|
||||
|
@ -2285,6 +2311,13 @@ The method used must be an out-of-band method."
|
|||
(setq user (or (tramp-file-name-user v)
|
||||
(tramp-get-connection-property v "login-as" nil)))
|
||||
|
||||
;; Check for listener port.
|
||||
(when (tramp-get-method-parameter method 'tramp-remote-copy-args)
|
||||
(setq listener (number-to-string (+ 50000 (random 10000))))
|
||||
(while
|
||||
(zerop (tramp-call-process v "nc" nil nil nil "-z" host listener))
|
||||
(setq listener (number-to-string (+ 50000 (random 10000))))))
|
||||
|
||||
;; Compose copy command.
|
||||
(setq host (or host "")
|
||||
user (or user "")
|
||||
|
@ -2297,7 +2330,7 @@ The method used must be an out-of-band method."
|
|||
tramp-ssh-controlmaster-options "")
|
||||
spec)
|
||||
spec (format-spec-make
|
||||
?h host ?u user ?p port ?c options
|
||||
?h host ?u user ?p port ?r listener ?c options
|
||||
?k (if keep-date " " ""))
|
||||
copy-program (tramp-get-method-parameter
|
||||
method 'tramp-copy-program)
|
||||
|
@ -2325,12 +2358,57 @@ The method used must be an out-of-band method."
|
|||
(lambda (x)
|
||||
(setq x (mapcar (lambda (y) (format-spec y spec)) x))
|
||||
(unless (member "" x) (mapconcat 'identity x " ")))
|
||||
(tramp-get-method-parameter method 'tramp-copy-env))))
|
||||
(tramp-get-method-parameter method 'tramp-copy-env)))
|
||||
remote-copy-program (tramp-get-method-parameter
|
||||
method 'tramp-remote-copy-program)
|
||||
remote-copy-args
|
||||
(delete
|
||||
;; " " has either been a replacement of "%k" (when
|
||||
;; keep-date argument is non-nil), or a replacement
|
||||
;; for the whole keep-date sublist.
|
||||
" "
|
||||
(dolist
|
||||
(x
|
||||
(tramp-get-method-parameter method 'tramp-remote-copy-args)
|
||||
remote-copy-args)
|
||||
(setq remote-copy-args
|
||||
(append
|
||||
remote-copy-args
|
||||
(let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
|
||||
(if (member "" y) '(" ") y)))))))
|
||||
|
||||
;; Check for program.
|
||||
;; Check for local copy program.
|
||||
(unless (executable-find copy-program)
|
||||
(tramp-error
|
||||
v 'file-error "Cannot find copy program: %s" copy-program))
|
||||
v 'file-error "Cannot find local copy program: %s" copy-program))
|
||||
|
||||
;; Install listener on the remote side. The prompt must be
|
||||
;; consumed later on, when the process does not listen anymore.
|
||||
(when remote-copy-program
|
||||
(unless (with-tramp-connection-property
|
||||
v (concat "remote-copy-program-" remote-copy-program)
|
||||
(tramp-find-executable
|
||||
v remote-copy-program (tramp-get-remote-path v)))
|
||||
(tramp-error
|
||||
v 'file-error
|
||||
"Cannot find remote listener: %s" remote-copy-program))
|
||||
(setq remote-copy-program
|
||||
(mapconcat
|
||||
'identity
|
||||
(append
|
||||
(list remote-copy-program) remote-copy-args
|
||||
(list (if t1 (concat "<" source) (concat ">" target)) "&"))
|
||||
" "))
|
||||
(tramp-send-command v remote-copy-program)
|
||||
(with-timeout
|
||||
(1 (tramp-error
|
||||
v 'file-error
|
||||
"Listener process not running on remote host: `%s'"
|
||||
remote-copy-program))
|
||||
(tramp-send-command v (format "netstat -l | grep -q :%s" listener))
|
||||
(while (not (tramp-send-command-and-check v nil))
|
||||
(tramp-send-command
|
||||
v (format "netstat -l | grep -q :%s" listener)))))
|
||||
|
||||
(with-temp-buffer
|
||||
(unwind-protect
|
||||
|
@ -2347,24 +2425,26 @@ The method used must be an out-of-band method."
|
|||
(tramp-message
|
||||
orig-vec 6 "%s=\"%s\"" (car copy-env) (cadr copy-env))
|
||||
(setenv (pop copy-env) (pop copy-env)))
|
||||
(setq
|
||||
copy-args
|
||||
(append
|
||||
copy-args
|
||||
(if remote-copy-program
|
||||
(list (if t1 (concat ">" target) (concat "<" source)))
|
||||
(list source target))))
|
||||
|
||||
;; Use an asynchronous process. By this, password can
|
||||
;; be handled. The default directory must be local, in
|
||||
;; order to apply the correct `copy-program'. We don't
|
||||
;; set a timeout, because the copying of large files can
|
||||
;; last longer than 60 secs.
|
||||
(let ((p (let ((default-directory
|
||||
(tramp-compat-temporary-file-directory)))
|
||||
(apply 'start-process-shell-command
|
||||
(tramp-get-connection-name v)
|
||||
(tramp-get-connection-buffer v)
|
||||
copy-program
|
||||
(append
|
||||
copy-args
|
||||
(list
|
||||
source target
|
||||
"&&" "echo" "tramp_exit_status" "0"
|
||||
"||" "echo" "tramp_exit_status" "1"))))))
|
||||
;; be handled. We don't set a timeout, because the
|
||||
;; copying of large files can last longer than 60
|
||||
;; secs.
|
||||
(let ((p (apply 'start-process-shell-command
|
||||
(tramp-get-connection-name v)
|
||||
(tramp-get-connection-buffer v)
|
||||
copy-program
|
||||
(append
|
||||
copy-args
|
||||
(list "&&" "echo" "tramp_exit_status" "0"
|
||||
"||" "echo" "tramp_exit_status" "1")))))
|
||||
(tramp-message
|
||||
orig-vec 6 "%s"
|
||||
(mapconcat 'identity (process-command p) " "))
|
||||
|
@ -2391,7 +2471,14 @@ The method used must be an out-of-band method."
|
|||
|
||||
;; Reset the transfer process properties.
|
||||
(tramp-set-connection-property v "process-name" nil)
|
||||
(tramp-set-connection-property v "process-buffer" nil)))
|
||||
(tramp-set-connection-property v "process-buffer" nil)
|
||||
;; Clear the remote prompt.
|
||||
(when (and remote-copy-program
|
||||
(not (tramp-send-command-and-check v nil)))
|
||||
;; Houston, we have a problem! Likely, the listener is
|
||||
;; still running, so let's clear everything (but the
|
||||
;; cached password).
|
||||
(tramp-cleanup-connection v 'keep-debug 'keep-password))))
|
||||
|
||||
;; Handle KEEP-DATE argument.
|
||||
(when (and keep-date (not copy-keep-date))
|
||||
|
@ -2621,7 +2708,8 @@ This is like `dired-recursive-delete-directory' for Tramp files."
|
|||
(delete-region (match-beginning 0) (point)))
|
||||
|
||||
;; Some busyboxes are reluctant to discard colors.
|
||||
(unless (string-match "color" (tramp-get-connection-property v "ls" ""))
|
||||
(unless
|
||||
(string-match "color" (tramp-get-connection-property v "ls" ""))
|
||||
(goto-char beg)
|
||||
(while (re-search-forward tramp-color-escape-sequence-regexp nil t)
|
||||
(replace-match "")))
|
||||
|
@ -2651,9 +2739,9 @@ This is like `dired-recursive-delete-directory' for Tramp files."
|
|||
|
||||
(defun tramp-sh-handle-expand-file-name (name &optional dir)
|
||||
"Like `expand-file-name' for Tramp files.
|
||||
If the localname part of the given filename starts with \"/../\" then
|
||||
the result will be a local, non-Tramp, filename."
|
||||
;; If DIR is not given, use DEFAULT-DIRECTORY or "/".
|
||||
If the localname part of the given file name starts with \"/../\" then
|
||||
the result will be a local, non-Tramp, file name."
|
||||
;; If DIR is not given, use `default-directory' or "/".
|
||||
(setq dir (or dir default-directory "/"))
|
||||
;; Unless NAME is absolute, concat DIR and NAME.
|
||||
(unless (file-name-absolute-p name)
|
||||
|
@ -2906,13 +2994,13 @@ the result will be a local, non-Tramp, filename."
|
|||
command)
|
||||
t t)
|
||||
0 1))
|
||||
;; We should show the output anyway.
|
||||
;; We should add the output anyway.
|
||||
(when outbuf
|
||||
(with-current-buffer outbuf
|
||||
(insert
|
||||
(with-current-buffer (tramp-get-connection-buffer v)
|
||||
(buffer-string))))
|
||||
(when display (display-buffer outbuf))))
|
||||
(when (and display (get-buffer-window outbuf t)) (redisplay))))
|
||||
;; When the user did interrupt, we should do it also. We use
|
||||
;; return code -1 as marker.
|
||||
(quit
|
||||
|
@ -3133,7 +3221,7 @@ the result will be a local, non-Tramp, filename."
|
|||
(symbol-value 'last-coding-system-used))))
|
||||
|
||||
;; The permissions of the temporary file should be set. If
|
||||
;; filename does not exist (eq modes nil) it has been
|
||||
;; FILENAME does not exist (eq modes nil) it has been
|
||||
;; renamed to the backup file. This case `save-buffer'
|
||||
;; handles permissions.
|
||||
;; Ensure that it is still readable.
|
||||
|
@ -3144,7 +3232,7 @@ the result will be a local, non-Tramp, filename."
|
|||
|
||||
;; This is a bit lengthy due to the different methods
|
||||
;; possible for file transfer. First, we check whether the
|
||||
;; method uses an rcp program. If so, we call it.
|
||||
;; method uses an scp program. If so, we call it.
|
||||
;; Otherwise, both encoding and decoding command must be
|
||||
;; specified. However, if the method _also_ specifies an
|
||||
;; encoding function, then that is used for encoding the
|
||||
|
@ -3238,7 +3326,7 @@ the result will be a local, non-Tramp, filename."
|
|||
(erase-buffer)
|
||||
(and
|
||||
;; cksum runs locally, if possible.
|
||||
(zerop (tramp-call-process "cksum" tmpfile t))
|
||||
(zerop (tramp-call-process v "cksum" tmpfile t))
|
||||
;; cksum runs remotely.
|
||||
(tramp-send-command-and-check
|
||||
v
|
||||
|
@ -3264,7 +3352,7 @@ the result will be a local, non-Tramp, filename."
|
|||
(tramp-error
|
||||
v 'file-error
|
||||
(concat "Method `%s' should specify both encoding and "
|
||||
"decoding command or an rcp program")
|
||||
"decoding command or an scp program")
|
||||
method))))
|
||||
|
||||
;; Make `last-coding-system-used' have the right value.
|
||||
|
@ -3281,7 +3369,7 @@ the result will be a local, non-Tramp, filename."
|
|||
(when (or (eq visit t) (stringp visit))
|
||||
(let ((file-attr (tramp-compat-file-attributes filename 'integer)))
|
||||
(set-visited-file-modtime
|
||||
;; We must pass modtime explicitly, because filename can
|
||||
;; We must pass modtime explicitly, because FILENAME can
|
||||
;; be different from (buffer-file-name), f.e. if
|
||||
;; `file-precious-flag' is set.
|
||||
(nth 5 file-attr))
|
||||
|
@ -3369,7 +3457,28 @@ the result will be a local, non-Tramp, filename."
|
|||
;; calls shall be answered from the file cache. We unset
|
||||
;; `process-file-side-effects' and `remote-file-name-inhibit-cache'
|
||||
;; in order to keep the cache.
|
||||
(let (remote-file-name-inhibit-cache process-file-side-effects)
|
||||
(let ((vc-handled-backends vc-handled-backends)
|
||||
remote-file-name-inhibit-cache process-file-side-effects)
|
||||
;; Reduce `vc-handled-backends' in order to minimize process calls.
|
||||
(when (and (memq 'Bzr vc-handled-backends)
|
||||
(boundp 'vc-bzr-program)
|
||||
(not (with-tramp-connection-property v vc-bzr-program
|
||||
(tramp-find-executable
|
||||
v vc-bzr-program (tramp-get-remote-path v)))))
|
||||
(setq vc-handled-backends (delq 'Bzr vc-handled-backends)))
|
||||
(when (and (memq 'Git vc-handled-backends)
|
||||
(boundp 'vc-git-program)
|
||||
(not (with-tramp-connection-property v vc-git-program
|
||||
(tramp-find-executable
|
||||
v vc-git-program (tramp-get-remote-path v)))))
|
||||
(setq vc-handled-backends (delq 'Git vc-handled-backends)))
|
||||
(when (and (memq 'Hg vc-handled-backends)
|
||||
(boundp 'vc-hg-program)
|
||||
(not (with-tramp-connection-property v vc-hg-program
|
||||
(tramp-find-executable
|
||||
v vc-hg-program (tramp-get-remote-path v)))))
|
||||
(setq vc-handled-backends (delq 'Hg vc-handled-backends)))
|
||||
;; Run.
|
||||
(ignore-errors
|
||||
(tramp-run-real-handler 'vc-registered (list file))))))))
|
||||
|
||||
|
@ -4010,7 +4119,7 @@ FORMAT is symbol describing the encoding/decoding format. It can be
|
|||
ENCODING and DECODING can be strings, giving commands, or symbols,
|
||||
giving functions. If they are strings, then they can contain
|
||||
the \"%s\" format specifier. If that specifier is present, the input
|
||||
filename will be put into the command line at that spot. If the
|
||||
file name will be put into the command line at that spot. If the
|
||||
specifier is not present, the input should be read from standard
|
||||
input.
|
||||
|
||||
|
@ -4045,7 +4154,7 @@ FORMAT is a symbol describing the encoding/decoding format. It can be
|
|||
ENCODING and DECODING can be strings, giving commands, or symbols,
|
||||
giving variables. If they are strings, then they can contain
|
||||
the \"%s\" format specifier. If that specifier is present, the input
|
||||
filename will be put into the command line at that spot. If the
|
||||
file name will be put into the command line at that spot. If the
|
||||
specifier is not present, the input should be read from standard
|
||||
input.
|
||||
|
||||
|
@ -4171,32 +4280,28 @@ Goes through the list `tramp-local-coding-commands' and
|
|||
(setq rem-dec (nth 2 ritem))
|
||||
(setq found t)))))))
|
||||
|
||||
;; Did we find something?
|
||||
(unless found
|
||||
(tramp-error
|
||||
vec 'file-error "Couldn't find an inline transfer encoding"))
|
||||
|
||||
;; Set connection properties. Since the commands are risky (due
|
||||
;; to output direction), we cache them in the process cache.
|
||||
(tramp-message vec 5 "Using local encoding `%s'" loc-enc)
|
||||
(tramp-set-connection-property p "local-encoding" loc-enc)
|
||||
(tramp-message vec 5 "Using local decoding `%s'" loc-dec)
|
||||
(tramp-set-connection-property p "local-decoding" loc-dec)
|
||||
(tramp-message vec 5 "Using remote encoding `%s'" rem-enc)
|
||||
(tramp-set-connection-property p "remote-encoding" rem-enc)
|
||||
(tramp-message vec 5 "Using remote decoding `%s'" rem-dec)
|
||||
(tramp-set-connection-property p "remote-decoding" rem-dec))))
|
||||
(when found
|
||||
;; Set connection properties. Since the commands are risky
|
||||
;; (due to output direction), we cache them in the process cache.
|
||||
(tramp-message vec 5 "Using local encoding `%s'" loc-enc)
|
||||
(tramp-set-connection-property p "local-encoding" loc-enc)
|
||||
(tramp-message vec 5 "Using local decoding `%s'" loc-dec)
|
||||
(tramp-set-connection-property p "local-decoding" loc-dec)
|
||||
(tramp-message vec 5 "Using remote encoding `%s'" rem-enc)
|
||||
(tramp-set-connection-property p "remote-encoding" rem-enc)
|
||||
(tramp-message vec 5 "Using remote decoding `%s'" rem-dec)
|
||||
(tramp-set-connection-property p "remote-decoding" rem-dec)))))
|
||||
|
||||
(defun tramp-call-local-coding-command (cmd input output)
|
||||
"Call the local encoding or decoding command.
|
||||
If CMD contains \"%s\", provide input file INPUT there in command.
|
||||
Otherwise, INPUT is passed via standard input.
|
||||
INPUT can also be nil which means `/dev/null'.
|
||||
OUTPUT can be a string (which specifies a filename), or t (which
|
||||
OUTPUT can be a string (which specifies a file name), or t (which
|
||||
means standard output and thus the current buffer), or nil (which
|
||||
means discard it)."
|
||||
(tramp-call-process
|
||||
tramp-encoding-shell
|
||||
nil tramp-encoding-shell
|
||||
(when (and input (not (string-match "%s" cmd))) input)
|
||||
(if (eq output t) t nil)
|
||||
nil
|
||||
|
@ -4844,15 +4949,18 @@ Return ATTR."
|
|||
""))
|
||||
|
||||
(defun tramp-make-copy-program-file-name (vec)
|
||||
"Create a file name suitable to be passed to `rcp' and workalikes."
|
||||
(let ((user (tramp-file-name-user vec))
|
||||
"Create a file name suitable to be passed to `scp' or `nc' and workalikes."
|
||||
(let ((method (tramp-file-name-method vec))
|
||||
(user (tramp-file-name-user vec))
|
||||
(host (tramp-file-name-real-host vec))
|
||||
(localname (tramp-shell-quote-argument
|
||||
(tramp-file-name-localname vec))))
|
||||
(shell-quote-argument
|
||||
(if (not (zerop (length user)))
|
||||
(format "%s@%s:%s" user host localname)
|
||||
(format "%s:%s" host localname)))))
|
||||
(cond
|
||||
((tramp-get-method-parameter method 'tramp-remote-copy-program)
|
||||
localname)
|
||||
((not (zerop (length user)))
|
||||
(shell-quote-argument (format "%s@%s:%s" user host localname)))
|
||||
(t (shell-quote-argument (format "%s:%s" host localname))))))
|
||||
|
||||
(defun tramp-method-out-of-band-p (vec size)
|
||||
"Return t if this is an out-of-band method, nil otherwise."
|
||||
|
@ -5371,9 +5479,5 @@ function cell is returned to be applied on a buffer."
|
|||
;; rsync).
|
||||
;; * Keep a second connection open for out-of-band methods like scp or
|
||||
;; rsync.
|
||||
;; * Try telnet+curl as new method. It might be useful for busybox,
|
||||
;; without built-in uuencode/uudecode.
|
||||
;; * Try telnet+nc as new method. It might be useful for busybox,
|
||||
;; without built-in uuencode/uudecode.
|
||||
|
||||
;;; tramp-sh.el ends here
|
||||
|
|
|
@ -447,8 +447,7 @@ pass to the OPERATION."
|
|||
(expand-file-name
|
||||
tramp-temp-name-prefix
|
||||
(tramp-compat-temporary-file-directory))))
|
||||
(args (list tramp-smb-program
|
||||
(concat "//" real-host "/" share) "-E")))
|
||||
(args (list (concat "//" real-host "/" share) "-E")))
|
||||
|
||||
(if (not (zerop (length real-user)))
|
||||
(setq args (append args (list "-U" real-user)))
|
||||
|
@ -495,10 +494,11 @@ pass to the OPERATION."
|
|||
;; Use an asynchronous processes. By this,
|
||||
;; password can be handled.
|
||||
(let* ((default-directory tmpdir)
|
||||
(p (start-process-shell-command
|
||||
(p (apply
|
||||
'start-process
|
||||
(tramp-get-connection-name v)
|
||||
(tramp-get-connection-buffer v)
|
||||
(mapconcat 'identity args " "))))
|
||||
tramp-smb-program args)))
|
||||
|
||||
(tramp-message
|
||||
v 6 "%s" (mapconcat 'identity (process-command p) " "))
|
||||
|
@ -938,99 +938,100 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
|
|||
(setq filename (file-name-as-directory filename))
|
||||
(setq filename (directory-file-name filename)))
|
||||
(with-parsed-tramp-file-name filename nil
|
||||
(save-match-data
|
||||
(let ((base (file-name-nondirectory filename))
|
||||
;; We should not destroy the cache entry.
|
||||
(entries (copy-sequence
|
||||
(tramp-smb-get-file-entries
|
||||
(file-name-directory filename)))))
|
||||
(with-tramp-progress-reporter v 0 (format "Opening directory %s" filename)
|
||||
(save-match-data
|
||||
(let ((base (file-name-nondirectory filename))
|
||||
;; We should not destroy the cache entry.
|
||||
(entries (copy-sequence
|
||||
(tramp-smb-get-file-entries
|
||||
(file-name-directory filename)))))
|
||||
|
||||
(when wildcard
|
||||
(string-match "\\." base)
|
||||
(setq base (replace-match "\\\\." nil nil base))
|
||||
(string-match "\\*" base)
|
||||
(setq base (replace-match ".*" nil nil base))
|
||||
(string-match "\\?" base)
|
||||
(setq base (replace-match ".?" nil nil base)))
|
||||
(when wildcard
|
||||
(string-match "\\." base)
|
||||
(setq base (replace-match "\\\\." nil nil base))
|
||||
(string-match "\\*" base)
|
||||
(setq base (replace-match ".*" nil nil base))
|
||||
(string-match "\\?" base)
|
||||
(setq base (replace-match ".?" nil nil base)))
|
||||
|
||||
;; Filter entries.
|
||||
(setq entries
|
||||
(delq
|
||||
nil
|
||||
(if (or wildcard (zerop (length base)))
|
||||
;; Check for matching entries.
|
||||
(mapcar
|
||||
(lambda (x)
|
||||
(when (string-match
|
||||
(format "^%s" base) (nth 0 x))
|
||||
x))
|
||||
entries)
|
||||
;; We just need the only and only entry FILENAME.
|
||||
(list (assoc base entries)))))
|
||||
;; Filter entries.
|
||||
(setq entries
|
||||
(delq
|
||||
nil
|
||||
(if (or wildcard (zerop (length base)))
|
||||
;; Check for matching entries.
|
||||
(mapcar
|
||||
(lambda (x)
|
||||
(when (string-match
|
||||
(format "^%s" base) (nth 0 x))
|
||||
x))
|
||||
entries)
|
||||
;; We just need the only and only entry FILENAME.
|
||||
(list (assoc base entries)))))
|
||||
|
||||
;; Sort entries.
|
||||
(setq entries
|
||||
(sort
|
||||
entries
|
||||
(lambda (x y)
|
||||
(if (string-match "t" switches)
|
||||
;; Sort by date.
|
||||
(tramp-time-less-p (nth 3 y) (nth 3 x))
|
||||
;; Sort by name.
|
||||
(string-lessp (nth 0 x) (nth 0 y))))))
|
||||
;; Sort entries.
|
||||
(setq entries
|
||||
(sort
|
||||
entries
|
||||
(lambda (x y)
|
||||
(if (string-match "t" switches)
|
||||
;; Sort by date.
|
||||
(tramp-time-less-p (nth 3 y) (nth 3 x))
|
||||
;; Sort by name.
|
||||
(string-lessp (nth 0 x) (nth 0 y))))))
|
||||
|
||||
;; Handle "-F" switch.
|
||||
(when (string-match "F" switches)
|
||||
;; Handle "-F" switch.
|
||||
(when (string-match "F" switches)
|
||||
(mapc
|
||||
(lambda (x)
|
||||
(when (not (zerop (length (car x))))
|
||||
(cond
|
||||
((char-equal ?d (string-to-char (nth 1 x)))
|
||||
(setcar x (concat (car x) "/")))
|
||||
((char-equal ?x (string-to-char (nth 1 x)))
|
||||
(setcar x (concat (car x) "*"))))))
|
||||
entries))
|
||||
|
||||
;; Print entries.
|
||||
(mapc
|
||||
(lambda (x)
|
||||
(when (not (zerop (length (car x))))
|
||||
(cond
|
||||
((char-equal ?d (string-to-char (nth 1 x)))
|
||||
(setcar x (concat (car x) "/")))
|
||||
((char-equal ?x (string-to-char (nth 1 x)))
|
||||
(setcar x (concat (car x) "*"))))))
|
||||
entries))
|
||||
(when (not (zerop (length (nth 0 x))))
|
||||
(when (string-match "l" switches)
|
||||
(let ((attr
|
||||
(when (tramp-smb-get-stat-capability v)
|
||||
(ignore-errors
|
||||
(file-attributes filename 'string)))))
|
||||
(insert
|
||||
(format
|
||||
"%10s %3d %-8s %-8s %8s %s "
|
||||
(or (nth 8 attr) (nth 1 x)) ; mode
|
||||
(or (nth 1 attr) 1) ; inode
|
||||
(or (nth 2 attr) "nobody") ; uid
|
||||
(or (nth 3 attr) "nogroup") ; gid
|
||||
(or (nth 7 attr) (nth 2 x)) ; size
|
||||
(format-time-string
|
||||
(if (tramp-time-less-p
|
||||
(tramp-time-subtract (current-time) (nth 3 x))
|
||||
tramp-half-a-year)
|
||||
"%b %e %R"
|
||||
"%b %e %Y")
|
||||
(nth 3 x)))))) ; date
|
||||
|
||||
;; Print entries.
|
||||
(mapc
|
||||
(lambda (x)
|
||||
(when (not (zerop (length (nth 0 x))))
|
||||
(when (string-match "l" switches)
|
||||
(let ((attr
|
||||
(when (tramp-smb-get-stat-capability v)
|
||||
(ignore-errors
|
||||
(file-attributes filename 'string)))))
|
||||
;; We mark the file name. The inserted name could be
|
||||
;; from somewhere else, so we use the relative file name
|
||||
;; of `default-directory'.
|
||||
(let ((start (point)))
|
||||
(insert
|
||||
(format
|
||||
"%10s %3d %-8s %-8s %8s %s "
|
||||
(or (nth 8 attr) (nth 1 x)) ; mode
|
||||
(or (nth 1 attr) 1) ; inode
|
||||
(or (nth 2 attr) "nobody") ; uid
|
||||
(or (nth 3 attr) "nogroup") ; gid
|
||||
(or (nth 7 attr) (nth 2 x)) ; size
|
||||
(format-time-string
|
||||
(if (tramp-time-less-p
|
||||
(tramp-time-subtract (current-time) (nth 3 x))
|
||||
tramp-half-a-year)
|
||||
"%b %e %R"
|
||||
"%b %e %Y")
|
||||
(nth 3 x)))))) ; date
|
||||
|
||||
;; We mark the file name. The inserted name could be
|
||||
;; from somewhere else, so we use the relative file name
|
||||
;; of `default-directory'.
|
||||
(let ((start (point)))
|
||||
(insert
|
||||
(format
|
||||
"%s\n"
|
||||
(file-relative-name
|
||||
(expand-file-name
|
||||
(nth 0 x) (file-name-directory filename))
|
||||
(when full-directory-p (file-name-directory filename)))))
|
||||
(put-text-property start (1- (point)) 'dired-filename t))
|
||||
(forward-line)
|
||||
(beginning-of-line)))
|
||||
entries)))))
|
||||
"%s\n"
|
||||
(file-relative-name
|
||||
(expand-file-name
|
||||
(nth 0 x) (file-name-directory filename))
|
||||
(when full-directory-p (file-name-directory filename)))))
|
||||
(put-text-property start (1- (point)) 'dired-filename t))
|
||||
(forward-line)
|
||||
(beginning-of-line)))
|
||||
entries))))))
|
||||
|
||||
(defun tramp-smb-handle-make-directory (dir &optional parents)
|
||||
"Like `make-directory' for Tramp files."
|
||||
|
@ -1224,8 +1225,8 @@ target of the symlink differ."
|
|||
(error
|
||||
(setq ret 1)))
|
||||
|
||||
;; We should show the output anyway.
|
||||
(when (and outbuf display) (display-buffer outbuf))
|
||||
;; We should redisplay the output.
|
||||
(when (and display outbuf (get-buffer-window outbuf t)) (redisplay))
|
||||
|
||||
;; Cleanup. We remove all file cache values for the connection,
|
||||
;; because the remote process could have changed them.
|
||||
|
@ -1277,6 +1278,8 @@ target of the symlink differ."
|
|||
|
||||
;; We must also flush the cache of the directory, because
|
||||
;; `file-attributes' reads the values from there.
|
||||
(tramp-flush-file-property v1 (file-name-directory v1-localname))
|
||||
(tramp-flush-file-property v1 v1-localname)
|
||||
(tramp-flush-file-property v2 (file-name-directory v2-localname))
|
||||
(tramp-flush-file-property v2 v2-localname)
|
||||
(unless (tramp-smb-get-share v2)
|
||||
|
@ -1349,7 +1352,7 @@ target of the symlink differ."
|
|||
;; Use an asynchronous processes. By this, password can
|
||||
;; be handled.
|
||||
(let ((p (apply
|
||||
'start-process-shell-command
|
||||
'start-process
|
||||
(tramp-get-connection-name v)
|
||||
(tramp-get-connection-buffer v)
|
||||
tramp-smb-acl-program args)))
|
||||
|
|
|
@ -240,7 +240,7 @@ pair of the form (KEY VALUE). The following KEYs are defined:
|
|||
tamper the process output.
|
||||
* `tramp-copy-program'
|
||||
This specifies the name of the program to use for remotely copying
|
||||
the file; this might be the absolute filename of rcp or the name of
|
||||
the file; this might be the absolute filename of scp or the name of
|
||||
a workalike program. It is always applied on the local host.
|
||||
* `tramp-copy-args'
|
||||
This specifies the list of parameters to pass to the above mentioned
|
||||
|
@ -248,6 +248,13 @@ pair of the form (KEY VALUE). The following KEYs are defined:
|
|||
* `tramp-copy-env'
|
||||
A list of environment variables and their values, which will
|
||||
be set when calling `tramp-copy-program'.
|
||||
* `tramp-remote-copy-program'
|
||||
The listener program to be applied on remote side, if needed.
|
||||
* `tramp-remote-copy-args'
|
||||
The list of parameters to pass to the listener program, the hints
|
||||
for `tramp-login-args' also apply here. Additionally, \"%r\" could
|
||||
be used here and in `tramp-copy-args'. It denotes a randomly
|
||||
chosen port for the remote listener.
|
||||
* `tramp-copy-keep-date'
|
||||
This specifies whether the copying program when the preserves the
|
||||
timestamp of the original file.
|
||||
|
@ -275,7 +282,7 @@ pair of the form (KEY VALUE). The following KEYs are defined:
|
|||
What does all this mean? Well, you should specify `tramp-login-program'
|
||||
for all methods; this program is used to log in to the remote site. Then,
|
||||
there are two ways to actually transfer the files between the local and the
|
||||
remote side. One way is using an additional rcp-like program. If you want
|
||||
remote side. One way is using an additional scp-like program. If you want
|
||||
to do this, set `tramp-copy-program' in the method.
|
||||
|
||||
Another possibility for file transfer is inline transfer, i.e. the
|
||||
|
@ -1762,7 +1769,7 @@ Example:
|
|||
(and (memq system-type '(cygwin windows-nt))
|
||||
(zerop
|
||||
(tramp-call-process
|
||||
"reg" nil nil nil "query" (nth 1 (car v)))))
|
||||
v "reg" nil nil nil "query" (nth 1 (car v)))))
|
||||
;; Configuration file.
|
||||
(file-exists-p (nth 1 (car v)))))
|
||||
(setq r (delete (car v) r)))
|
||||
|
@ -2816,7 +2823,7 @@ User is always nil."
|
|||
(if (memq system-type '(windows-nt))
|
||||
(with-temp-buffer
|
||||
(when (zerop (tramp-call-process
|
||||
"reg" nil t nil "query" registry-or-dirname))
|
||||
nil "reg" nil t nil "query" registry-or-dirname))
|
||||
(goto-char (point-min))
|
||||
(loop while (not (eobp)) collect
|
||||
(tramp-parse-putty-group registry-or-dirname))))
|
||||
|
@ -2895,7 +2902,7 @@ User is always nil."
|
|||
(defun tramp-handle-file-accessible-directory-p (filename)
|
||||
"Like `file-accessible-directory-p' for Tramp files."
|
||||
(and (file-directory-p filename)
|
||||
(file-executable-p filename)))
|
||||
(file-readable-p filename)))
|
||||
|
||||
(defun tramp-handle-file-exists-p (filename)
|
||||
"Like `file-exists-p' for Tramp files."
|
||||
|
@ -3906,7 +3913,7 @@ be granted."
|
|||
(tramp-get-file-property
|
||||
vec (tramp-file-name-localname vec)
|
||||
(concat "file-attributes-" suffix) nil)
|
||||
(file-attributes
|
||||
(tramp-compat-file-attributes
|
||||
(tramp-make-tramp-file-name
|
||||
(tramp-file-name-method vec)
|
||||
(tramp-file-name-user vec)
|
||||
|
@ -4118,14 +4125,16 @@ ALIST is of the form ((FROM . TO) ...)."
|
|||
;;; Compatibility functions section:
|
||||
|
||||
(defun tramp-call-process
|
||||
(program &optional infile destination display &rest args)
|
||||
(vec program &optional infile destination display &rest args)
|
||||
"Calls `call-process' on the local host.
|
||||
This is needed because for some Emacs flavors Tramp has
|
||||
defadvised `call-process' to behave like `process-file'. The
|
||||
Lisp error raised when PROGRAM is nil is trapped also, returning 1.
|
||||
Furthermore, traces are written with verbosity of 6."
|
||||
(let ((v (vector tramp-current-method tramp-current-user tramp-current-host
|
||||
nil nil))
|
||||
(let ((v (or vec
|
||||
(vector tramp-current-method tramp-current-user
|
||||
tramp-current-host nil nil)))
|
||||
(destination (if (eq destination t) (current-buffer) destination))
|
||||
result)
|
||||
(tramp-message
|
||||
v 6 "`%s %s' %s %s"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
;; should be changed only there.
|
||||
|
||||
;;;###tramp-autoload
|
||||
(defconst tramp-version "2.2.9-24.4"
|
||||
(defconst tramp-version "2.2.10"
|
||||
"This version of Tramp.")
|
||||
|
||||
;;;###tramp-autoload
|
||||
|
@ -44,7 +44,7 @@
|
|||
(= emacs-major-version 21)
|
||||
(>= emacs-minor-version 4)))
|
||||
"ok"
|
||||
(format "Tramp 2.2.9-24.4 is not fit for %s"
|
||||
(format "Tramp 2.2.10 is not fit for %s"
|
||||
(when (string-match "^.*$" (emacs-version))
|
||||
(match-string 0 (emacs-version)))))))
|
||||
(unless (string-match "\\`ok\\'" x) (error "%s" x)))
|
||||
|
|
|
@ -388,7 +388,7 @@ but before calling PC Selection mode):
|
|||
(fboundp 'normal-erase-is-backspace-mode))
|
||||
(normal-erase-is-backspace-mode 1))
|
||||
(setq highlight-nonselected-windows nil)
|
||||
(setq transient-mark-mode t)
|
||||
(transient-mark-mode 1)
|
||||
(setq mark-even-if-inactive t)
|
||||
(delete-selection-mode 1))
|
||||
;;else
|
||||
|
|
|
@ -1200,7 +1200,7 @@ SPECIAL FEATURE: char argument can be used to specify shift amount(1-9)."
|
|||
(let ((aelt (assq char vi-mark-alist)))
|
||||
(if aelt
|
||||
(move-marker (cdr aelt) (point)) ; fixed 6/12/86
|
||||
(setq aelt (cons char (copy-marker (point))))
|
||||
(setq aelt (cons char (point-marker)))
|
||||
(setq vi-mark-alist (cons aelt vi-mark-alist))))))
|
||||
|
||||
(defun vi-find-matching-paren ()
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
2014-06-23 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* org-compat.el (activate-mark): Set transient-mark-mode buffer-locally.
|
||||
|
||||
2014-06-22 Mario Lang <mlang@delysid.org>
|
||||
|
||||
* org-list.el (org-list-insert-item): The the -> the.
|
||||
|
||||
* org-bibtex.el (org-bibtex-fields): The the -> the.
|
||||
|
||||
2013-06-22 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* ob-core.el (org-babel-insert-result): Prefer point-min-marker
|
||||
and point-max-marker.
|
||||
* org-mouse.el (org-mouse-do-remotely): Prefer point-marker
|
||||
to copy-marker of point.
|
||||
|
||||
2014-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* org-compat.el (org-font-lock-ensure): New function.
|
||||
|
|
|
@ -2039,8 +2039,8 @@ code ---- the results are extracted in the syntax of the source
|
|||
t info hash indent)))
|
||||
(results-switches
|
||||
(cdr (assoc :results_switches (nth 2 info))))
|
||||
(visible-beg (copy-marker (point-min)))
|
||||
(visible-end (copy-marker (point-max)))
|
||||
(visible-beg (point-min-marker))
|
||||
(visible-end (point-max-marker))
|
||||
;; When results exist outside of the current visible
|
||||
;; region of the buffer, be sure to widen buffer to
|
||||
;; update them.
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
(:pages . "One or more page numbers or range of numbers, such as 42-111 or 7,41,73-97 or 43+ (the ‘+’ in this last example indicates pages following that don’t form simple range). BibTEX requires double dashes for page ranges (--).")
|
||||
(:publisher . "The publisher’s name.")
|
||||
(:school . "The name of the school where a thesis was written.")
|
||||
(:series . "The name of a series or set of books. When citing an entire book, the the title field gives its title and an optional series field gives the name of a series or multi-volume set in which the book is published.")
|
||||
(:series . "The name of a series or set of books. When citing an entire book, the title field gives its title and an optional series field gives the name of a series or multi-volume set in which the book is published.")
|
||||
(:title . "The work’s title, typed as explained in the LaTeX book.")
|
||||
(:type . "The type of a technical report for example, 'Research Note'.")
|
||||
(:volume . "The volume of a journal or multi-volume book.")
|
||||
|
|
|
@ -295,7 +295,7 @@ Works on both Emacs and XEmacs."
|
|||
(setq mark-active t)
|
||||
(when (and (boundp 'transient-mark-mode)
|
||||
(not transient-mark-mode))
|
||||
(setq transient-mark-mode 'lambda))
|
||||
(set (make-local-variable 'transient-mark-mode) 'lambda))
|
||||
(when (boundp 'zmacs-regions)
|
||||
(setq zmacs-regions t)))))
|
||||
|
||||
|
|
|
@ -1254,7 +1254,7 @@ some heuristics to guess the result."
|
|||
If POS is before first character after bullet of the item, the
|
||||
new item will be created before the current one.
|
||||
|
||||
STRUCT is the list structure. PREVS is the the alist of previous
|
||||
STRUCT is the list structure. PREVS is the alist of previous
|
||||
items, as returned by `org-list-prevs-alist'.
|
||||
|
||||
Insert a checkbox if CHECKBOX is non-nil, and string AFTER-BULLET
|
||||
|
|
|
@ -1005,7 +1005,7 @@ This means, between the beginning of line and the point."
|
|||
(let ((endmarker (with-current-buffer buffer
|
||||
(outline-end-of-subtree)
|
||||
(forward-char 1)
|
||||
(copy-marker (point)))))
|
||||
(point-marker))))
|
||||
(org-with-remote-undo buffer
|
||||
(with-current-buffer buffer
|
||||
(widen)
|
||||
|
@ -1015,7 +1015,7 @@ This means, between the beginning of line and the point."
|
|||
(and (outline-next-heading)
|
||||
(org-flag-heading nil))) ; show the next heading
|
||||
(org-back-to-heading)
|
||||
(setq marker (copy-marker (point)))
|
||||
(setq marker (point-marker))
|
||||
(goto-char (max (point-at-bol) (- (point-at-eol) anticol)))
|
||||
(funcall command)
|
||||
(message "_cmd: %S" org-mouse-cmd)
|
||||
|
|
|
@ -3182,9 +3182,9 @@ with the prefix ARG."
|
|||
(save-excursion
|
||||
;; Insert a temporary formula at right after the table
|
||||
(goto-char (org-table-TBLFM-begin))
|
||||
(setq s (set-marker (make-marker) (point)))
|
||||
(setq s (point-marker))
|
||||
(insert (concat formula "\n"))
|
||||
(setq e (set-marker (make-marker) (point)))
|
||||
(setq e (point-marker))
|
||||
;; Recalculate the table
|
||||
(beginning-of-line 0) ; move to the inserted line
|
||||
(skip-chars-backward " \r\n\t")
|
||||
|
|
|
@ -1005,20 +1005,17 @@ Set `bubbles--col-offset' and `bubbles--row-offset'."
|
|||
(set-buffer-modified-p nil)
|
||||
(erase-buffer)
|
||||
(insert " ")
|
||||
(add-text-properties
|
||||
(point-min) (point) (list 'intangible t 'display
|
||||
(cons 'space
|
||||
(list :height bubbles--row-offset))))
|
||||
(put-text-property (point-min) (point)
|
||||
'display
|
||||
(cons 'space (list :height bubbles--row-offset)))
|
||||
(insert "\n")
|
||||
(let ((max-char (length (bubbles--colors))))
|
||||
(dotimes (i (bubbles--grid-height))
|
||||
(let ((p (point)))
|
||||
(insert " ")
|
||||
(add-text-properties
|
||||
p (point) (list 'intangible t
|
||||
'display (cons 'space
|
||||
(list :width
|
||||
bubbles--col-offset)))))
|
||||
(put-text-property p (point)
|
||||
'display
|
||||
(cons 'space (list :width bubbles--col-offset))))
|
||||
(dotimes (j (bubbles--grid-width))
|
||||
(let* ((index (random max-char))
|
||||
(char (nth index bubbles-chars)))
|
||||
|
@ -1026,10 +1023,9 @@ Set `bubbles--col-offset' and `bubbles--row-offset'."
|
|||
(add-text-properties (1- (point)) (point) (list 'index index))))
|
||||
(insert "\n"))
|
||||
(insert "\n ")
|
||||
(add-text-properties
|
||||
(1- (point)) (point) (list 'intangible t 'display
|
||||
(cons 'space
|
||||
(list :width bubbles--col-offset)))))
|
||||
(put-text-property (1- (point)) (point)
|
||||
'display
|
||||
(cons 'space (list :width bubbles--col-offset))))
|
||||
(put-text-property (point-min) (point-max) 'pointer 'arrow))
|
||||
(bubbles-mode)
|
||||
(bubbles--reset-score)
|
||||
|
@ -1179,10 +1175,9 @@ Use optional parameter POS instead of point if given."
|
|||
(delete-region (point) (point-max))
|
||||
(insert (format "Selected: %4d\n" bubbles--neighborhood-score))
|
||||
(insert " ")
|
||||
(add-text-properties (1- (point)) (point)
|
||||
(list 'intangible t 'display
|
||||
(cons 'space
|
||||
(list :width bubbles--col-offset))))
|
||||
(put-text-property (1- (point)) (point)
|
||||
'display
|
||||
(cons 'space (list :width bubbles--col-offset)))
|
||||
(insert (format "Score: %4d" bubbles--score))
|
||||
(put-text-property pos (point) 'status t))))
|
||||
|
||||
|
@ -1200,10 +1195,9 @@ Use optional parameter POS instead of point if given."
|
|||
(goto-char (point-max))
|
||||
(let* ((inhibit-read-only t))
|
||||
(insert "\n ")
|
||||
(add-text-properties (1- (point)) (point)
|
||||
(list 'intangible t 'display
|
||||
(cons 'space
|
||||
(list :width bubbles--col-offset))))
|
||||
(put-text-property (1- (point)) (point)
|
||||
'display
|
||||
(cons 'space (list :width bubbles--col-offset)))
|
||||
(insert "Game Over!"))
|
||||
;; save score
|
||||
(gamegrid-add-score (format "bubbles-%s-%d-%d-%d-scores"
|
||||
|
|
|
@ -898,7 +898,7 @@ to swim.")
|
|||
|
||||
(defun dun-help (args)
|
||||
(dun-mprincl
|
||||
"Welcome to dunnet (2.01), by Ron Schnell (ronnie@driver-aces.com).
|
||||
"Welcome to dunnet (2.02), by Ron Schnell (ronnie@driver-aces.com - @RonnieSchnell).
|
||||
Here is some useful information (read carefully because there are one
|
||||
or more clues in here):
|
||||
- If you have a key that can open a door, you do not need to explicitly
|
||||
|
@ -1387,8 +1387,8 @@ for a moment, then straighten yourself up.
|
|||
(setq dungeon-mode 'dungeon)
|
||||
(setq dun-unix-verbs '((ls . dun-ls) (ftp . dun-ftp) (echo . dun-echo)
|
||||
(exit . dun-uexit) (cd . dun-cd) (pwd . dun-pwd)
|
||||
(rlogin . dun-rlogin) (uncompress . dun-uncompress)
|
||||
(cat . dun-cat)))
|
||||
(rlogin . dun-rlogin) (ssh . dun-rlogin)
|
||||
(uncompress . dun-uncompress) (cat . dun-cat)))
|
||||
|
||||
(setq dun-dos-verbs '((dir . dun-dos-dir) (type . dun-dos-type)
|
||||
(exit . dun-dos-exit) (command . dun-dos-spawn)
|
||||
|
@ -2539,25 +2539,31 @@ treasures for points?" "4" "four")
|
|||
(dun-mprincl "Incorrect.")))
|
||||
|
||||
(let (varname epoint afterq i value)
|
||||
(setq varname (substring line 0 esign))
|
||||
(if (not (setq epoint (string-match ")" line)))
|
||||
(if (string= (substring line (1+ esign) (+ esign 2))
|
||||
"\"")
|
||||
(progn
|
||||
(setq afterq (substring line (+ esign 2)))
|
||||
(setq epoint (+
|
||||
(string-match "\"" afterq)
|
||||
(+ esign 3))))
|
||||
(setq varname (replace-regexp-in-string " " "" (substring line 0 esign)))
|
||||
|
||||
(if (not (setq epoint (string-match " " line)))
|
||||
(setq epoint (length line))))
|
||||
(setq epoint (1+ epoint))
|
||||
(while (and
|
||||
(not (= epoint (length line)))
|
||||
(setq i (string-match ")" (substring line epoint))))
|
||||
(setq epoint (+ epoint i 1))))
|
||||
(setq value (substring line (1+ esign) epoint))
|
||||
(dun-eval varname value))))
|
||||
(if (or (= (length varname) 0) (< (- (length line) esign) 2))
|
||||
(progn
|
||||
(dun-mprinc line)
|
||||
(dun-mprincl " : not found."))
|
||||
|
||||
(if (not (setq epoint (string-match ")" line)))
|
||||
(if (string= (substring line (1+ esign) (+ esign 2))
|
||||
"\"")
|
||||
(progn
|
||||
(setq afterq (substring line (+ esign 2)))
|
||||
(setq epoint (+
|
||||
(string-match "\"" afterq)
|
||||
(+ esign 3))))
|
||||
|
||||
(if (not (setq epoint (string-match " " line)))
|
||||
(setq epoint (length line))))
|
||||
(setq epoint (1+ epoint))
|
||||
(while (and
|
||||
(not (= epoint (length line)))
|
||||
(setq i (string-match ")" (substring line epoint))))
|
||||
(setq epoint (+ epoint i 1))))
|
||||
(setq value (substring line (1+ esign) epoint))
|
||||
(dun-eval varname value)))))
|
||||
|
||||
(defun dun-eval (varname value)
|
||||
(let (eval-error)
|
||||
|
@ -2741,16 +2747,20 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..")
|
|||
(if dun-batch-mode
|
||||
(dun-mprincl "Login failed.")
|
||||
(dun-mprincl "\nLogin failed."))
|
||||
(if dun-batch-mode
|
||||
(dun-mprincl
|
||||
"Guest login okay, user access restrictions apply.")
|
||||
(dun-mprincl
|
||||
"\nGuest login okay, user access restrictions apply."))
|
||||
(dun-ftp-commands)
|
||||
(setq newlist
|
||||
(if (= (length ident) 0)
|
||||
(if dun-batch-mode
|
||||
(dun-mprincl "Password is required.")
|
||||
(dun-mprincl "\nPassword is required."))
|
||||
(if dun-batch-mode
|
||||
(dun-mprincl
|
||||
"Guest login okay, user access restrictions apply.")
|
||||
(dun-mprincl
|
||||
"\nGuest login okay, user access restrictions apply."))
|
||||
(dun-ftp-commands)
|
||||
(setq newlist
|
||||
'("What password did you use during anonymous ftp to gamma?"))
|
||||
(setq newlist (append newlist (list ident)))
|
||||
(rplaca (nthcdr 1 dun-endgame-questions) newlist)))))))))
|
||||
(setq newlist (append newlist (list ident)))
|
||||
(rplaca (nthcdr 1 dun-endgame-questions) newlist))))))))))
|
||||
|
||||
(defun dun-ftp-commands ()
|
||||
(setq dun-exitf nil)
|
||||
|
|
|
@ -1,16 +1,11 @@
|
|||
;;; landmark.el --- neural-network robot that learns landmarks
|
||||
;;; landmark.el --- Neural-network robot that learns landmarks -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 1996-1997, 2000-2014 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Terrence Brannon (was: <brannon@rana.usc.edu>)
|
||||
;; Created: December 16, 1996 - first release to usenet
|
||||
;; Keywords: games, gomoku, neural network, adaptive search, chemotaxis
|
||||
|
||||
;;;_* Usage
|
||||
;;; Just type
|
||||
;;; M-x eval-buffer
|
||||
;;; M-x landmark-test-run
|
||||
|
||||
;; Keywords: games, neural network, adaptive search, chemotaxis
|
||||
;; Version: 1.0
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
@ -29,6 +24,9 @@
|
|||
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; To try this, just type: M-x landmark-test-run
|
||||
|
||||
;; Landmark is a relatively non-participatory game in which a robot
|
||||
;; attempts to maneuver towards a tree at the center of the window
|
||||
;; based on unique olfactory cues from each of the 4 directions. If
|
||||
|
@ -228,9 +226,6 @@
|
|||
'landmark-font-lock-face-X)))
|
||||
"Font lock rules for Landmark.")
|
||||
|
||||
(put 'landmark-mode 'front-sticky
|
||||
(put 'landmark-mode 'rear-nonsticky '(intangible)))
|
||||
(put 'landmark-mode 'intangible 1)
|
||||
;; This one is for when they set view-read-only to t: Landmark cannot
|
||||
;; allow View Mode to be activated in its buffer.
|
||||
(define-derived-mode landmark-mode special-mode "Lm"
|
||||
|
@ -247,7 +242,8 @@ Entry to this mode calls the value of `landmark-mode-hook' if that value
|
|||
is non-nil. One interesting value is `turn-on-font-lock'."
|
||||
(landmark-display-statistics)
|
||||
(setq-local font-lock-defaults '(landmark-font-lock-keywords t))
|
||||
(setq buffer-read-only t))
|
||||
(setq buffer-read-only t)
|
||||
(add-hook 'post-command-hook #'landmark--intangible nil t))
|
||||
|
||||
|
||||
;;;_ + THE SCORE TABLE.
|
||||
|
@ -682,8 +678,8 @@ along the DX, DY direction, considering that DVAL has been added on SQUARE."
|
|||
(landmark-prompt-for-other-game))
|
||||
(t
|
||||
(message "Let me think...")
|
||||
(let (square score)
|
||||
(setq square (landmark-strongest-square))
|
||||
(let ((square (landmark-strongest-square))
|
||||
score)
|
||||
(cond ((null square)
|
||||
(landmark-terminate-game 'nobody-won))
|
||||
(t
|
||||
|
@ -725,8 +721,7 @@ along the DX, DY direction, considering that DVAL has been added on SQUARE."
|
|||
(min (max (/ (+ (- (cdr click)
|
||||
landmark-y-offset
|
||||
1)
|
||||
(let ((inhibit-point-motion-hooks t))
|
||||
(count-lines 1 (window-start)))
|
||||
(count-lines (point-min) (window-start))
|
||||
landmark-square-height
|
||||
(% landmark-square-height 2)
|
||||
(/ landmark-square-height 2))
|
||||
|
@ -752,8 +747,8 @@ If the game is finished, this command requests for another game."
|
|||
((not landmark-game-in-progress)
|
||||
(landmark-prompt-for-other-game))
|
||||
(t
|
||||
(let (square score)
|
||||
(setq square (landmark-point-square))
|
||||
(let ((square (landmark-point-square))
|
||||
score)
|
||||
(cond ((null square)
|
||||
(error "Your point is not on a square. Retry!"))
|
||||
((not (zerop (aref landmark-board square)))
|
||||
|
@ -847,16 +842,15 @@ If the game is finished, this command requests for another game."
|
|||
|
||||
(defun landmark-point-y ()
|
||||
"Return the board row where point is."
|
||||
(let ((inhibit-point-motion-hooks t))
|
||||
(1+ (/ (- (count-lines 1 (point)) landmark-y-offset (if (bolp) 0 1))
|
||||
landmark-square-height))))
|
||||
(1+ (/ (- (count-lines (point-min) (point))
|
||||
landmark-y-offset (if (bolp) 0 1))
|
||||
landmark-square-height)))
|
||||
|
||||
(defun landmark-point-square ()
|
||||
"Return the index of the square point is on."
|
||||
(let ((inhibit-point-motion-hooks t))
|
||||
(landmark-xy-to-index (1+ (/ (- (current-column) landmark-x-offset)
|
||||
landmark-square-width))
|
||||
(landmark-point-y))))
|
||||
(landmark-point-y)))
|
||||
|
||||
(defun landmark-goto-square (index)
|
||||
"Move point to square number INDEX."
|
||||
|
@ -864,23 +858,21 @@ If the game is finished, this command requests for another game."
|
|||
|
||||
(defun landmark-goto-xy (x y)
|
||||
"Move point to square at X, Y coords."
|
||||
(let ((inhibit-point-motion-hooks t))
|
||||
(goto-char (point-min))
|
||||
(forward-line (+ landmark-y-offset (* landmark-square-height (1- y)))))
|
||||
(forward-line (+ landmark-y-offset (* landmark-square-height (1- y))))
|
||||
(move-to-column (+ landmark-x-offset (* landmark-square-width (1- x)))))
|
||||
|
||||
(defun landmark-plot-square (square value)
|
||||
"Draw 'X', 'O' or '.' on SQUARE depending on VALUE, leave point there."
|
||||
(or (= value 1)
|
||||
(landmark-goto-square square))
|
||||
(let ((inhibit-read-only t)
|
||||
(inhibit-point-motion-hooks t))
|
||||
(insert-and-inherit (cond ((= value 1) ?.)
|
||||
((= value 2) ?N)
|
||||
((= value 3) ?S)
|
||||
((= value 4) ?E)
|
||||
((= value 5) ?W)
|
||||
((= value 6) ?^)))
|
||||
(let ((inhibit-read-only t))
|
||||
(insert (cond ((= value 1) ?.)
|
||||
((= value 2) ?N)
|
||||
((= value 3) ?S)
|
||||
((= value 4) ?E)
|
||||
((= value 5) ?W)
|
||||
((= value 6) ?^)))
|
||||
|
||||
(and (zerop value)
|
||||
(add-text-properties (1- (point)) (point)
|
||||
|
@ -895,8 +887,7 @@ mouse-1: get robot moving, mouse-2: play on this square")))
|
|||
"Display an N by M Landmark board."
|
||||
(buffer-disable-undo (current-buffer))
|
||||
(let ((inhibit-read-only t)
|
||||
(point 1) opoint
|
||||
(intangible t)
|
||||
(point (point-min)) opoint
|
||||
(i m) j x)
|
||||
;; Try to minimize number of chars (because of text properties)
|
||||
(setq tab-width
|
||||
|
@ -905,7 +896,7 @@ mouse-1: get robot moving, mouse-2: play on this square")))
|
|||
(max (/ (+ (% landmark-x-offset landmark-square-width)
|
||||
landmark-square-width 1) 2) 2)))
|
||||
(erase-buffer)
|
||||
(newline landmark-y-offset)
|
||||
(insert-char ?\n landmark-y-offset)
|
||||
(while (progn
|
||||
(setq j n
|
||||
x (- landmark-x-offset landmark-square-width))
|
||||
|
@ -913,9 +904,7 @@ mouse-1: get robot moving, mouse-2: play on this square")))
|
|||
(insert-char ?\t (/ (- (setq x (+ x landmark-square-width))
|
||||
(current-column))
|
||||
tab-width))
|
||||
(insert-char ? (- x (current-column)))
|
||||
(if (setq intangible (not intangible))
|
||||
(put-text-property point (point) 'intangible 2))
|
||||
(insert-char ?\s (- x (current-column)))
|
||||
(and (zerop j)
|
||||
(= i (- m 2))
|
||||
(progn
|
||||
|
@ -932,14 +921,7 @@ mouse-1: get robot moving, mouse-2: play on this square")))
|
|||
(if (= i (1- m))
|
||||
(setq opoint point))
|
||||
(insert-char ?\n landmark-square-height))
|
||||
(or (eq (char-after 1) ?.)
|
||||
(put-text-property 1 2 'point-entered
|
||||
(lambda (_x _y) (if (bobp) (forward-char)))))
|
||||
(or intangible
|
||||
(put-text-property point (point) 'intangible 2))
|
||||
(put-text-property point (point) 'point-entered
|
||||
(lambda (_x _y) (if (eobp) (backward-char))))
|
||||
(put-text-property (point-min) (point) 'category 'landmark-mode))
|
||||
(insert-char ?\n))
|
||||
(landmark-goto-xy (/ (1+ n) 2) (/ (1+ m) 2)) ; center of the board
|
||||
(sit-for 0)) ; Display NOW
|
||||
|
||||
|
@ -1001,8 +983,7 @@ mouse-1: get robot moving, mouse-2: play on this square")))
|
|||
"Cross every square between SQUARE1 and SQUARE2 in the DX, DY direction."
|
||||
(save-excursion ; Not moving point from last square
|
||||
(let ((depl (landmark-xy-to-index dx dy))
|
||||
(inhibit-read-only t)
|
||||
(inhibit-point-motion-hooks t))
|
||||
(inhibit-read-only t))
|
||||
;; WARNING: this function assumes DEPL > 0 and SQUARE2 > SQUARE1
|
||||
(while (/= square1 square2)
|
||||
(landmark-goto-square square1)
|
||||
|
@ -1021,32 +1002,56 @@ mouse-1: get robot moving, mouse-2: play on this square")))
|
|||
(setq landmark-n (1+ landmark-n))
|
||||
(forward-line 1)
|
||||
(indent-to column)
|
||||
(insert-and-inherit ?|))))
|
||||
(insert ?|))))
|
||||
((= dx -1) ; 1st Diagonal
|
||||
(indent-to (prog1 (- (current-column) (/ landmark-square-width 2))
|
||||
(forward-line (/ landmark-square-height 2))))
|
||||
(insert-and-inherit ?/))
|
||||
(insert ?/))
|
||||
(t ; 2nd Diagonal
|
||||
(indent-to (prog1 (+ (current-column) (/ landmark-square-width 2))
|
||||
(forward-line (/ landmark-square-height 2))))
|
||||
(insert-and-inherit ?\\))))))
|
||||
(insert ?\\))))))
|
||||
(sit-for 0)) ; Display NOW
|
||||
|
||||
|
||||
;;;_ + CURSOR MOTION.
|
||||
|
||||
(defvar-local landmark--last-pos 0)
|
||||
|
||||
(defconst landmark--intangible-chars "- \t\n|/\\\\")
|
||||
|
||||
(defun landmark--intangible ()
|
||||
(when (or (eobp)
|
||||
(save-excursion
|
||||
(not (zerop (skip-chars-forward landmark--intangible-chars)))))
|
||||
(if (<= landmark--last-pos (point)) ;Moving forward.
|
||||
(progn
|
||||
(skip-chars-forward landmark--intangible-chars)
|
||||
(when (eobp)
|
||||
(skip-chars-backward landmark--intangible-chars)
|
||||
(forward-char -1)))
|
||||
(skip-chars-backward landmark--intangible-chars)
|
||||
(if (bobp)
|
||||
(skip-chars-forward landmark--intangible-chars)
|
||||
(forward-char -1))))
|
||||
(setq landmark--last-pos (point)))
|
||||
|
||||
;; previous-line and next-line don't work right with intangible newlines
|
||||
(defun landmark-move-down ()
|
||||
"Move point down one row on the Landmark board."
|
||||
(interactive)
|
||||
(if (< (landmark-point-y) landmark-board-height)
|
||||
(forward-line 1)));;; landmark-square-height)))
|
||||
(let ((col (current-column)))
|
||||
(forward-line 1) ;;; landmark-square-height
|
||||
(move-to-column col))))
|
||||
|
||||
(defun landmark-move-up ()
|
||||
"Move point up one row on the Landmark board."
|
||||
(interactive)
|
||||
(if (> (landmark-point-y) 1)
|
||||
(forward-line (- landmark-square-height))))
|
||||
(let ((col (current-column)))
|
||||
(forward-line (- landmark-square-height))
|
||||
(move-to-column col))))
|
||||
|
||||
(defun landmark-move-ne ()
|
||||
"Move point North East on the Landmark board."
|
||||
|
@ -1137,7 +1142,7 @@ because it is overwritten by \"One moment please\"."
|
|||
|
||||
|
||||
(defun landmark-print-distance ()
|
||||
(insert (format "tree: %S \n" (calc-distance-of-robot-from 'landmark-tree)))
|
||||
(insert (format "tree: %S \n" (landmark-calc-distance-of-robot-from 'landmark-tree)))
|
||||
(mapc 'landmark-print-distance-int landmark-directions))
|
||||
|
||||
|
||||
|
@ -1302,9 +1307,9 @@ After this limit is reached, landmark-random-move is called to push him out of i
|
|||
;;;_ - landmark-plot-internal (sym)
|
||||
(defun landmark-plot-internal (sym)
|
||||
(landmark-plot-square (landmark-xy-to-index
|
||||
(get sym 'x)
|
||||
(get sym 'y))
|
||||
(get sym 'sym)))
|
||||
(get sym 'x)
|
||||
(get sym 'y))
|
||||
(get sym 'sym)))
|
||||
;;;_ - landmark-plot-landmarks ()
|
||||
(defun landmark-plot-landmarks ()
|
||||
(setq landmark-cx (/ landmark-board-width 2))
|
||||
|
@ -1335,26 +1340,24 @@ After this limit is reached, landmark-random-move is called to push him out of i
|
|||
|
||||
|
||||
;;;_ + Distance-calculation functions
|
||||
;;;_ - square (a)
|
||||
(defun square (a)
|
||||
(* a a))
|
||||
|
||||
;;;_ - distance (x x0 y y0)
|
||||
(defun distance (x x0 y y0)
|
||||
(sqrt (+ (square (- x x0)) (square (- y y0)))))
|
||||
(defun landmark--distance (x x0 y y0)
|
||||
(let ((dx (- x x0)) (dy (- y y0)))
|
||||
(sqrt (+ (* dx dx) (* dy dy)))))
|
||||
|
||||
;;;_ - calc-distance-of-robot-from (direction)
|
||||
(defun calc-distance-of-robot-from (direction)
|
||||
;;;_ - landmark-calc-distance-of-robot-from (direction)
|
||||
(defun landmark-calc-distance-of-robot-from (direction)
|
||||
(put direction 'distance
|
||||
(distance (get direction 'x)
|
||||
(landmark-index-to-x (landmark-point-square))
|
||||
(get direction 'y)
|
||||
(landmark-index-to-y (landmark-point-square)))))
|
||||
(landmark--distance (get direction 'x)
|
||||
(landmark-index-to-x (landmark-point-square))
|
||||
(get direction 'y)
|
||||
(landmark-index-to-y (landmark-point-square)))))
|
||||
|
||||
;;;_ - calc-smell-internal (sym)
|
||||
(defun calc-smell-internal (sym)
|
||||
;;;_ - landmark-calc-smell-internal (sym)
|
||||
(defun landmark-calc-smell-internal (sym)
|
||||
(let ((r (get sym 'r))
|
||||
(d (calc-distance-of-robot-from sym)))
|
||||
(d (landmark-calc-distance-of-robot-from sym)))
|
||||
(if (> (* 0.5 (- 1 (/ d r))) 0)
|
||||
(* 0.5 (- 1 (/ d r)))
|
||||
0)))
|
||||
|
@ -1401,12 +1404,12 @@ After this limit is reached, landmark-random-move is called to push him out of i
|
|||
|
||||
(defun landmark-calc-current-smells ()
|
||||
(mapc (lambda (direction)
|
||||
(put direction 'smell (calc-smell-internal direction)))
|
||||
(put direction 'smell (landmark-calc-smell-internal direction)))
|
||||
landmark-directions))
|
||||
|
||||
(defun landmark-calc-payoff ()
|
||||
(put 'z 't-1 (get 'z 't))
|
||||
(put 'z 't (calc-smell-internal 'landmark-tree))
|
||||
(put 'z 't (landmark-calc-smell-internal 'landmark-tree))
|
||||
(if (= (- (get 'z 't) (get 'z 't-1)) 0.0)
|
||||
(cl-incf landmark-no-payoff)
|
||||
(setf landmark-no-payoff 0)))
|
||||
|
@ -1447,8 +1450,9 @@ After this limit is reached, landmark-random-move is called to push him out of i
|
|||
(message "e-w normalization"))))
|
||||
|
||||
(mapc (lambda (pair)
|
||||
(if (> (get (car pair) 'y_t) 0)
|
||||
(funcall (car (cdr pair)))))
|
||||
(when (> (get (car pair) 'y_t) 0)
|
||||
(funcall (car (cdr pair)))
|
||||
(landmark--intangible)))
|
||||
'(
|
||||
(landmark-n landmark-move-up)
|
||||
(landmark-s landmark-move-down)
|
||||
|
@ -1470,7 +1474,7 @@ After this limit is reached, landmark-random-move is called to push him out of i
|
|||
|
||||
(defun landmark-amble-robot ()
|
||||
(interactive)
|
||||
(while (> (calc-distance-of-robot-from 'landmark-tree) 0)
|
||||
(while (> (landmark-calc-distance-of-robot-from 'landmark-tree) 0)
|
||||
|
||||
(landmark-store-old-y_t)
|
||||
(landmark-calc-current-smells)
|
||||
|
@ -1504,8 +1508,7 @@ If the game is finished, this command requests for another game."
|
|||
((not landmark-game-in-progress)
|
||||
(landmark-prompt-for-other-game))
|
||||
(t
|
||||
(let (square)
|
||||
(setq square (landmark-point-square))
|
||||
(let ((square (landmark-point-square)))
|
||||
(cond ((null square)
|
||||
(error "Your point is not on a square. Retry!"))
|
||||
((not (zerop (aref landmark-board square)))
|
||||
|
@ -1516,7 +1519,7 @@ If the game is finished, this command requests for another game."
|
|||
|
||||
(landmark-store-old-y_t)
|
||||
(landmark-calc-current-smells)
|
||||
(put 'z 't (calc-smell-internal 'landmark-tree))
|
||||
(put 'z 't (landmark-calc-smell-internal 'landmark-tree))
|
||||
|
||||
(landmark-random-move)
|
||||
|
||||
|
@ -1589,7 +1592,9 @@ If the game is finished, this command requests for another game."
|
|||
;; distance on scent.
|
||||
|
||||
(defun landmark-set-landmark-signal-strengths ()
|
||||
(setq landmark-tree-r (* (sqrt (+ (square landmark-cx) (square landmark-cy))) 1.5))
|
||||
(setq landmark-tree-r (* (sqrt (+ (* landmark-cx landmark-cx)
|
||||
(* landmark-cy landmark-cy)))
|
||||
1.5))
|
||||
(mapc (lambda (direction)
|
||||
(put direction 'r (* landmark-cx 1.1)))
|
||||
landmark-ew)
|
||||
|
@ -1608,7 +1613,7 @@ If the game is finished, this command requests for another game."
|
|||
"Run 100 Landmark games, each time saving the weights from the previous game."
|
||||
(interactive)
|
||||
(landmark 1)
|
||||
(dotimes (scratch-var 100)
|
||||
(dotimes (_ 100)
|
||||
(landmark 2)))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -172,7 +172,7 @@ Special commands:
|
|||
;; Simple `;' comments go to the comment-column.
|
||||
(and (looking-at "\\s<\\(\\S<\\|\\'\\)") comment-column)
|
||||
;; The rest goes at the first tab stop.
|
||||
(or (car tab-stop-list) tab-width)))
|
||||
(or (indent-next-tab-stop 0))))
|
||||
|
||||
(defun asm-colon ()
|
||||
"Insert a colon; if it follows a label, delete the label's indentation."
|
||||
|
|
|
@ -504,8 +504,7 @@ is called with one argument, the guessed style."
|
|||
(cond
|
||||
((or (and a-guessed? b-guessed?)
|
||||
(not (or a-guessed? b-guessed?)))
|
||||
(string-lessp (symbol-name (car a))
|
||||
(symbol-name (car b))))
|
||||
(string-lessp (car a) (car b)))
|
||||
(a-guessed? t)
|
||||
(b-guessed? nil)))))))
|
||||
style)
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
;;
|
||||
;; Hide-ifdef suppresses the display of code that the preprocessor wouldn't
|
||||
;; pass through. Support complete C/C++ expression and precedence.
|
||||
;; It will automatically scan for new #define symbols and macros on the way
|
||||
;; parsing.
|
||||
;;
|
||||
;; The hidden code is marked by ellipses (...). Be
|
||||
;; cautious when editing near ellipses, since the hidden text is
|
||||
|
@ -97,11 +99,12 @@
|
|||
;; Extensively modified by Daniel LaLiberte (while at Gould).
|
||||
;;
|
||||
;; Extensively modified by Luke Lee in 2013 to support complete C expression
|
||||
;; evaluation.
|
||||
;; evaluation and argumented macro expansion.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'cc-mode)
|
||||
(require 'cl-lib)
|
||||
|
||||
(defgroup hide-ifdef nil
|
||||
"Hide selected code within `ifdef'."
|
||||
|
@ -133,6 +136,9 @@
|
|||
:group 'hide-ifdef
|
||||
:version "23.1")
|
||||
|
||||
(defcustom hide-ifdef-exclude-define-regexp nil
|
||||
"Ignore #define names if those names match this exclusion pattern."
|
||||
:type 'string)
|
||||
|
||||
(defvar hide-ifdef-mode-submap
|
||||
;; Set up the submap that goes after the prefix key.
|
||||
|
@ -198,7 +204,7 @@
|
|||
(cons '(hide-ifdef-hiding " Hiding")
|
||||
minor-mode-alist)))
|
||||
|
||||
;; fix c-mode syntax table so we can recognize whole symbols.
|
||||
;; Fix c-mode syntax table so we can recognize whole symbols.
|
||||
(defvar hide-ifdef-syntax-table
|
||||
(let ((st (copy-syntax-table c-mode-syntax-table)))
|
||||
(modify-syntax-entry ?_ "w" st)
|
||||
|
@ -327,7 +333,7 @@ that form should be displayed.")
|
|||
|
||||
|
||||
(defun hif-set-var (var value)
|
||||
"Prepend (var value) pair to `hide-ifdef-env'."
|
||||
"Prepend (VAR VALUE) pair to `hide-ifdef-env'."
|
||||
(setq hide-ifdef-env (cons (cons var value) hide-ifdef-env)))
|
||||
|
||||
(declare-function semantic-c-hideif-lookup "semantic/bovine/c" (var))
|
||||
|
@ -356,15 +362,35 @@ that form should be displayed.")
|
|||
;;; The code that understands what ifs and ifdef in files look like.
|
||||
|
||||
(defconst hif-cpp-prefix "\\(^\\|\r\\)[ \t]*#[ \t]*")
|
||||
(defconst hif-ifxdef-regexp (concat hif-cpp-prefix "if\\(n\\)?def"))
|
||||
(defconst hif-ifndef-regexp (concat hif-cpp-prefix "ifndef"))
|
||||
(defconst hif-ifx-regexp (concat hif-cpp-prefix "if\\(n?def\\)?[ \t]+"))
|
||||
(defconst hif-elif-regexp (concat hif-cpp-prefix "elif"))
|
||||
(defconst hif-else-regexp (concat hif-cpp-prefix "else"))
|
||||
(defconst hif-endif-regexp (concat hif-cpp-prefix "endif"))
|
||||
(defconst hif-ifx-else-endif-regexp
|
||||
(concat hif-ifx-regexp "\\|" hif-else-regexp "\\|" hif-endif-regexp))
|
||||
(concat hif-ifx-regexp "\\|" hif-elif-regexp "\\|" hif-else-regexp "\\|"
|
||||
hif-endif-regexp))
|
||||
(defconst hif-macro-expr-prefix-regexp
|
||||
(concat hif-cpp-prefix "\\(if\\(n?def\\)?\\|elif\\|define\\)[ \t]+"))
|
||||
|
||||
;; Used to store the current token and the whole token list during parsing.
|
||||
;; Only bound dynamically.
|
||||
(defconst hif-white-regexp "[ \t]*")
|
||||
(defconst hif-define-regexp
|
||||
(concat hif-cpp-prefix "\\(define\\|undef\\)"))
|
||||
(defconst hif-id-regexp
|
||||
(concat "[[:alpha:]_][[:alnum:]_]*"))
|
||||
(defconst hif-macroref-regexp
|
||||
(concat hif-white-regexp "\\(" hif-id-regexp "\\)" hif-white-regexp
|
||||
"\\("
|
||||
"(" hif-white-regexp
|
||||
"\\(" hif-id-regexp "\\)?" hif-white-regexp
|
||||
"\\(" "," hif-white-regexp hif-id-regexp hif-white-regexp "\\)*"
|
||||
"\\(\\.\\.\\.\\)?" hif-white-regexp
|
||||
")"
|
||||
"\\)?" ))
|
||||
|
||||
;; Store the current token and the whole token list during parsing.
|
||||
;; Bound dynamically.
|
||||
(defvar hif-token)
|
||||
(defvar hif-token-list)
|
||||
|
||||
|
@ -397,7 +423,12 @@ that form should be displayed.")
|
|||
("/" . hif-divide)
|
||||
("%" . hif-modulo)
|
||||
("?" . hif-conditional)
|
||||
(":" . hif-colon)))
|
||||
(":" . hif-colon)
|
||||
("," . hif-comma)
|
||||
("#" . hif-stringify)
|
||||
("..." . hif-etc)))
|
||||
|
||||
(defconst hif-valid-token-list (mapcar 'cdr hif-token-alist))
|
||||
|
||||
(defconst hif-token-regexp
|
||||
(concat (regexp-opt (mapcar 'car hif-token-alist))
|
||||
|
@ -412,13 +443,25 @@ that form should be displayed.")
|
|||
(if (or (not base) (= base 10))
|
||||
(string-to-number string base)
|
||||
(let* ((parts (split-string string "\\." t "[ \t]+"))
|
||||
(frac (cadr parts))
|
||||
(quot (expt (* base 1.0) (length frac))))
|
||||
(frac (cadr parts))
|
||||
(fraclen (length frac))
|
||||
(quot (expt (if (zerop fraclen)
|
||||
base
|
||||
(* base 1.0)) fraclen)))
|
||||
(/ (string-to-number (concat (car parts) frac) base) quot))))
|
||||
|
||||
;; The dynamic binding variable `hif-simple-token-only' is shared only by
|
||||
;; `hif-tokenize' and `hif-find-define'. The purpose is to prevent `hif-tokenize'
|
||||
;; from returning one more value to indicate a simple token is scanned. This help
|
||||
;; speeding up macro evaluation on those very simple cases like integers or
|
||||
;; literals.
|
||||
;; Check the long comments before `hif-find-define' for more details. [lukelee]
|
||||
(defvar hif-simple-token-only)
|
||||
|
||||
(defun hif-tokenize (start end)
|
||||
"Separate string between START and END into a list of tokens."
|
||||
(let ((token-list nil))
|
||||
(setq hif-simple-token-only t)
|
||||
(with-syntax-table hide-ifdef-syntax-table
|
||||
(save-excursion
|
||||
(goto-char start)
|
||||
|
@ -431,8 +474,10 @@ that form should be displayed.")
|
|||
((looking-at hif-string-literal-regexp)
|
||||
(push (substring-no-properties (match-string 1)) token-list)
|
||||
(goto-char (match-end 0)))
|
||||
|
||||
((looking-at hif-token-regexp)
|
||||
(let ((token (buffer-substring (point) (match-end 0))))
|
||||
(let ((token (buffer-substring-no-properties
|
||||
(point) (match-end 0))))
|
||||
(goto-char (match-end 0))
|
||||
;; (message "token: %s" token) (sit-for 1)
|
||||
(push
|
||||
|
@ -440,7 +485,7 @@ that form should be displayed.")
|
|||
(if (string-equal token "defined") 'hif-defined)
|
||||
;; TODO:
|
||||
;; 1. postfix 'l', 'll', 'ul' and 'ull'
|
||||
;; 2. floating number formats
|
||||
;; 2. floating number formats (like 1.23e4)
|
||||
;; 3. 098 is interpreted as octal conversion error
|
||||
(if (string-match "0x\\([0-9a-fA-F]+\\.?[0-9a-fA-F]*\\)"
|
||||
token)
|
||||
|
@ -450,9 +495,12 @@ that form should be displayed.")
|
|||
(if (string-match "\\`[1-9][0-9]*\\(\\.[0-9]+\\)?\\'"
|
||||
token)
|
||||
(string-to-number token)) ;; decimal
|
||||
(intern token))
|
||||
(prog1 (intern token)
|
||||
(setq hif-simple-token-only nil)))
|
||||
token-list)))
|
||||
|
||||
(t (error "Bad #if expression: %s" (buffer-string)))))))
|
||||
|
||||
(nreverse token-list)))
|
||||
|
||||
;;------------------------------------------------------------------------
|
||||
|
@ -487,9 +535,117 @@ that form should be displayed.")
|
|||
"Pop the next token from token-list into the let variable `hif-token'."
|
||||
(setq hif-token (pop hif-token-list)))
|
||||
|
||||
(defun hif-parse-if-exp (token-list)
|
||||
"Parse the TOKEN-LIST. Return translated list in prefix form."
|
||||
(let ((hif-token-list token-list))
|
||||
(defsubst hif-if-valid-identifier-p (id)
|
||||
(not (or (numberp id)
|
||||
(stringp id))))
|
||||
|
||||
(defun hif-define-operator (tokens)
|
||||
"`Upgrade' hif-define xxx to '(hif-define xxx)' so it won't be subsitituted."
|
||||
(let ((result nil)
|
||||
(tok nil))
|
||||
(while (setq tok (pop tokens))
|
||||
(push
|
||||
(if (eq tok 'hif-defined)
|
||||
(progn
|
||||
(setq tok (cadr tokens))
|
||||
(if (eq (car tokens) 'hif-lparen)
|
||||
(if (and (hif-if-valid-identifier-p tok)
|
||||
(eq (caddr tokens) 'hif-rparen))
|
||||
(setq tokens (cdddr tokens))
|
||||
(error "#define followed by non-identifier: %S" tok))
|
||||
(setq tok (car tokens)
|
||||
tokens (cdr tokens))
|
||||
(unless (hif-if-valid-identifier-p tok)
|
||||
(error "#define followed by non-identifier: %S" tok)))
|
||||
(list 'hif-defined 'hif-lparen tok 'hif-rparen))
|
||||
tok)
|
||||
result))
|
||||
(nreverse result)))
|
||||
|
||||
(defun hif-flatten (l)
|
||||
"Flatten a tree."
|
||||
(apply #'nconc
|
||||
(mapcar (lambda (x) (if (listp x)
|
||||
(hif-flatten x)
|
||||
(list x))) l)))
|
||||
|
||||
(defun hif-expand-token-list (tokens &optional macroname expand_list)
|
||||
"Perform expansion on TOKENS till everything expanded.
|
||||
Self-reference (directly or indirectly) tokens are not expanded.
|
||||
EXPAND_LIST is the list of macro names currently being expanded, use for
|
||||
detecting self-reference."
|
||||
(catch 'self-referencing
|
||||
(let ((expanded nil)
|
||||
(remains (hif-define-operator
|
||||
(hif-token-concatenation
|
||||
(hif-token-stringification tokens))))
|
||||
tok rep)
|
||||
(if macroname
|
||||
(setq expand_list (cons macroname expand_list)))
|
||||
;; Expanding all tokens till list exhausted
|
||||
(while (setq tok (pop remains))
|
||||
(if (memq tok expand_list)
|
||||
;; For self-referencing tokens, don't expand it
|
||||
(throw 'self-referencing tokens))
|
||||
(push
|
||||
(cond
|
||||
((or (memq tok hif-valid-token-list)
|
||||
(numberp tok)
|
||||
(stringp tok))
|
||||
tok)
|
||||
|
||||
((setq rep (hif-lookup tok))
|
||||
(if (and (listp rep)
|
||||
(eq (car rep) 'hif-define-macro)) ; A defined macro
|
||||
;; Recursively expand it
|
||||
(if (cadr rep) ; Argument list is not nil
|
||||
(if (not (eq (car remains) 'hif-lparen))
|
||||
;; No argument, no invocation
|
||||
tok
|
||||
;; Argumented macro, get arguments and invoke it.
|
||||
;; Dynamically bind hif-token-list and hif-token
|
||||
;; for hif-macro-supply-arguments
|
||||
(let* ((hif-token-list (cdr remains))
|
||||
(hif-token nil)
|
||||
(parmlist (mapcar 'hif-expand-token-list
|
||||
(hif-get-argument-list
|
||||
tok)))
|
||||
(result
|
||||
(hif-expand-token-list
|
||||
(hif-macro-supply-arguments tok parmlist)
|
||||
tok expand_list)))
|
||||
(setq remains (cons hif-token hif-token-list))
|
||||
result))
|
||||
;; Argument list is nil, direct expansion
|
||||
(setq rep (hif-expand-token-list
|
||||
(caddr rep) ; Macro's token list
|
||||
tok expand_list))
|
||||
;; Replace all remaining references immediately
|
||||
(setq remains (substitute tok rep remains))
|
||||
rep)
|
||||
;; Lookup tok returns an atom
|
||||
rep))
|
||||
|
||||
;;[2013-10-22 16:06:12 +0800] Must keep the token, removing
|
||||
;; this token might results in an incomplete expression that
|
||||
;; cannot be parsed further.
|
||||
;;((= 1 (hif-defined tok)) ; defined (hif-defined tok)=1,
|
||||
;; ;;but empty (hif-lookup tok)=nil, thus remove this token
|
||||
;; (setq remains (delete tok remains))
|
||||
;; nil)
|
||||
|
||||
(t ; Usual IDs
|
||||
tok))
|
||||
|
||||
expanded))
|
||||
|
||||
(hif-flatten (nreverse expanded)))))
|
||||
|
||||
(defun hif-parse-exp (token-list &optional macroname)
|
||||
"Parse the TOKEN-LIST.
|
||||
Return translated list in prefix form. MACRONAME is applied when invoking
|
||||
macros to prevent self-reference."
|
||||
(let ((hif-token-list (hif-expand-token-list token-list macroname)))
|
||||
(hif-nexttoken)
|
||||
(prog1
|
||||
(and hif-token
|
||||
|
@ -498,7 +654,7 @@ that form should be displayed.")
|
|||
(error "Error: unexpected token: %s" hif-token)))))
|
||||
|
||||
(defun hif-exprlist ()
|
||||
"Parse an exprlist: expr { ',' expr}"
|
||||
"Parse an exprlist: expr { ',' expr}."
|
||||
(let ((result (hif-expr)))
|
||||
(if (eq hif-token 'hif-comma)
|
||||
(let ((temp (list result)))
|
||||
|
@ -579,7 +735,8 @@ that form should be displayed.")
|
|||
"Parse a comp-expr : logshift | comp-expr `<'|`>'|`>='|`<=' logshift."
|
||||
(let ((result (hif-logshift-expr))
|
||||
(comp-token nil))
|
||||
(while (memq hif-token '(hif-greater hif-less hif-greater-equal hif-less-equal))
|
||||
(while (memq hif-token '(hif-greater hif-less hif-greater-equal
|
||||
hif-less-equal))
|
||||
(setq comp-token hif-token)
|
||||
(hif-nexttoken)
|
||||
(setq result (list comp-token result (hif-logshift-expr))))
|
||||
|
@ -618,7 +775,9 @@ that form should be displayed.")
|
|||
result))
|
||||
|
||||
(defun hif-factor ()
|
||||
"Parse a factor: '!' factor | '~' factor | '(' expr ')' | 'defined(' id ')' | 'id(parmlist)' | strings | id."
|
||||
"Parse a factor.
|
||||
factor : '!' factor | '~' factor | '(' expr ')' | 'defined(' id ')' |
|
||||
'id(parmlist)' | strings | id."
|
||||
(cond
|
||||
((eq hif-token 'hif-not)
|
||||
(hif-nexttoken)
|
||||
|
@ -651,6 +810,8 @@ that form should be displayed.")
|
|||
|
||||
((numberp hif-token)
|
||||
(prog1 hif-token (hif-nexttoken)))
|
||||
((stringp hif-token)
|
||||
(hif-string-concatenation))
|
||||
|
||||
;; Unary plus/minus.
|
||||
((memq hif-token '(hif-minus hif-plus))
|
||||
|
@ -658,10 +819,91 @@ that form should be displayed.")
|
|||
|
||||
(t ; identifier
|
||||
(let ((ident hif-token))
|
||||
(if (memq ident '(or and))
|
||||
(error "Error: missing identifier"))
|
||||
(hif-nexttoken)
|
||||
`(hif-lookup (quote ,ident))))))
|
||||
(if (eq hif-token 'hif-lparen)
|
||||
(hif-place-macro-invocation ident)
|
||||
`(hif-lookup (quote ,ident)))))))
|
||||
|
||||
(defun hif-get-argument-list (ident)
|
||||
(let ((nest 0)
|
||||
(parmlist nil) ; A "token" list of parameters, will later be parsed
|
||||
(parm nil))
|
||||
|
||||
(while (or (not (eq (hif-nexttoken) 'hif-rparen))
|
||||
(/= nest 0))
|
||||
(if (eq (car (last parm)) 'hif-comma)
|
||||
(setq parm nil))
|
||||
(cond
|
||||
((eq hif-token 'hif-lparen)
|
||||
(setq nest (1+ nest)))
|
||||
((eq hif-token 'hif-rparen)
|
||||
(setq nest (1- nest)))
|
||||
((and (eq hif-token 'hif-comma)
|
||||
(= nest 0))
|
||||
(push (nreverse parm) parmlist)
|
||||
(setq parm nil)))
|
||||
(push hif-token parm))
|
||||
|
||||
(push (nreverse parm) parmlist) ; Okay even if PARM is nil
|
||||
(hif-nexttoken) ; Drop the `hif-rparen', get next token
|
||||
(nreverse parmlist)))
|
||||
|
||||
(defun hif-place-macro-invocation (ident)
|
||||
(let ((parmlist (hif-get-argument-list ident)))
|
||||
`(hif-invoke (quote ,ident) (quote ,parmlist))))
|
||||
|
||||
(defun hif-string-concatenation ()
|
||||
"Parse concatenated strings: string | strings string."
|
||||
(let ((result (substring-no-properties hif-token)))
|
||||
(while (stringp (hif-nexttoken))
|
||||
(setq result (concat
|
||||
(substring result 0 -1) ; remove trailing '"'
|
||||
(substring hif-token 1)))) ; remove leading '"'
|
||||
result))
|
||||
|
||||
(defun hif-define-macro (parmlist token-body)
|
||||
"A marker for defined macro with arguments.
|
||||
This macro cannot be evaluated alone without parameters inputed."
|
||||
;;TODO: input arguments at run time, use minibuffer to query all arguments
|
||||
(error
|
||||
"Argumented macro cannot be evaluated without passing any parameter"))
|
||||
|
||||
(defun hif-stringify (a)
|
||||
"Stringify a number, string or symbol."
|
||||
(cond
|
||||
((numberp a)
|
||||
(number-to-string a))
|
||||
((atom a)
|
||||
(symbol-name a))
|
||||
((stringp a)
|
||||
(concat "\"" a "\""))
|
||||
(t
|
||||
(error "Invalid token to stringify"))))
|
||||
|
||||
(defun intern-safe (str)
|
||||
(if (stringp str)
|
||||
(intern str)))
|
||||
|
||||
(defun hif-token-concat (a b)
|
||||
"Concatenate two tokens into a longer token.
|
||||
Currently support only simple token concatenation. Also support weird (but
|
||||
valid) token concatenation like '>' ## '>' becomes '>>'. Here we take care only
|
||||
those that can be evaluated during preprocessing time and ignore all those that
|
||||
can only be evaluated at C(++) runtime (like '++', '--' and '+='...)."
|
||||
(if (or (memq a hif-valid-token-list)
|
||||
(memq b hif-valid-token-list))
|
||||
(let* ((ra (car (rassq a hif-token-alist)))
|
||||
(rb (car (rassq b hif-token-alist)))
|
||||
(result (and ra rb
|
||||
(cdr (assoc (concat ra rb) hif-token-alist)))))
|
||||
(or result
|
||||
;;(error "Invalid token to concatenate")
|
||||
(error "Concatenating \"%s\" and \"%s\" does not give a valid \
|
||||
preprocessing token"
|
||||
(or ra (symbol-name a))
|
||||
(or rb (symbol-name b)))))
|
||||
(intern-safe (concat (hif-stringify a)
|
||||
(hif-stringify b)))))
|
||||
|
||||
(defun hif-mathify (val)
|
||||
"Treat VAL as a number: if it's t or nil, use 1 or 0."
|
||||
|
@ -717,30 +959,160 @@ that form should be displayed.")
|
|||
|
||||
|
||||
(defun hif-comma (&rest expr)
|
||||
"Evaluate a list of expr, return the result of the last item."
|
||||
"Evaluate a list of EXPR, return the result of the last item."
|
||||
(let ((result nil))
|
||||
(dolist (e expr)
|
||||
(ignore-errors
|
||||
(setq result (funcall hide-ifdef-evaluator e))))
|
||||
result))
|
||||
|
||||
(defun hif-token-stringification (l)
|
||||
"Scan token list for `hif-stringify' ('#') token and stringify the next token."
|
||||
(let (result)
|
||||
(while l
|
||||
(push (if (eq (car l) 'hif-stringify)
|
||||
(prog1
|
||||
(if (cadr l)
|
||||
(hif-stringify (cadr l))
|
||||
(error "No token to stringify"))
|
||||
(setq l (cdr l)))
|
||||
(car l))
|
||||
result)
|
||||
(setq l (cdr l)))
|
||||
(nreverse result)))
|
||||
|
||||
(defun hif-token-concatenation (l)
|
||||
"Scan token list for `hif-token-concat' ('##') token and concatenate two tokens."
|
||||
(let ((prev nil)
|
||||
result)
|
||||
(while l
|
||||
(while (eq (car l) 'hif-token-concat)
|
||||
(unless prev
|
||||
(error "No token before ## to concatenate"))
|
||||
(unless (cdr l)
|
||||
(error "No token after ## to concatenate"))
|
||||
(setq prev (hif-token-concat prev (cadr l)))
|
||||
(setq l (cddr l)))
|
||||
(if prev
|
||||
(setq result (append result (list prev))))
|
||||
(setq prev (car l)
|
||||
l (cdr l)))
|
||||
(if prev
|
||||
(append result (list prev))
|
||||
result)))
|
||||
|
||||
(defun hif-delimit (lis atom)
|
||||
(nconc (mapcan (lambda (l) (list l atom))
|
||||
(butlast lis))
|
||||
(last lis)))
|
||||
|
||||
;; Perform token replacement:
|
||||
(defun hif-macro-supply-arguments (macro-name actual-parms)
|
||||
"Expand a macro call, replace ACTUAL-PARMS in the macro body."
|
||||
(let* ((SA (assoc macro-name hide-ifdef-env))
|
||||
(macro (and SA
|
||||
(cdr SA)
|
||||
(eq (cadr SA) 'hif-define-macro)
|
||||
(cddr SA)))
|
||||
(formal-parms (and macro (car macro)))
|
||||
(macro-body (and macro (cadr macro)))
|
||||
actual-count
|
||||
formal-count
|
||||
actual
|
||||
formal
|
||||
etc)
|
||||
|
||||
(when (and actual-parms formal-parms macro-body)
|
||||
;; For each actual parameter, evaluate each one and associate it
|
||||
;; with an actual parameter, put it into local table and finally
|
||||
;; evaluate the macro body.
|
||||
(if (setq etc (eq (car formal-parms) 'hif-etc))
|
||||
;; Take care of `hif-etc' first. Prefix `hif-comma' back if needed.
|
||||
(setq formal-parms (cdr formal-parms)))
|
||||
(setq formal-count (length formal-parms)
|
||||
actual-count (length actual-parms))
|
||||
|
||||
(if (> formal-count actual-count)
|
||||
(error "Too few parmameter for macro %S" macro-name)
|
||||
(if (< formal-count actual-count)
|
||||
(or etc
|
||||
(error "Too many parameters for macro %S" macro-name))))
|
||||
|
||||
;; Perform token replacement on the MACRO-BODY with the parameters
|
||||
(while (setq formal (pop formal-parms))
|
||||
;; Prevent repetitive substitutation, thus cannot use `subst'
|
||||
;; for example:
|
||||
;; #define mac(a,b) (a+b)
|
||||
;; #define testmac mac(b,y)
|
||||
;; testmac should expand to (b+y): replace of argument a and b
|
||||
;; occurs simultaneously, not sequentially. If sequentially,
|
||||
;; according to the argument order, it will become:
|
||||
;; 1. formal parm #1 'a' replaced by actual parm 'b', thus (a+b)
|
||||
;; becomes (b+b)
|
||||
;; 2. formal parm #2 'b' replaced by actual parm 'y', thus (b+b)
|
||||
;; becomes (y+y).
|
||||
(setq macro-body
|
||||
;; Unlike `subst', `substitute' replace only the top level
|
||||
;; instead of the whole tree; more importantly, it's not
|
||||
;; destructive.
|
||||
(substitute (if (and etc (null formal-parms))
|
||||
(hif-delimit actual-parms 'hif-comma)
|
||||
(car actual-parms))
|
||||
formal macro-body))
|
||||
(setq actual-parms (cdr actual-parms)))
|
||||
|
||||
;; Replacement completed, flatten the whole token list
|
||||
(setq macro-body (hif-flatten macro-body))
|
||||
|
||||
;; Stringification and token concatenation happens here
|
||||
(hif-token-concatenation (hif-token-stringification macro-body)))))
|
||||
|
||||
(defun hif-invoke (macro-name actual-parms)
|
||||
"Invoke a macro by expanding it, reparse macro-body and finally invoke it."
|
||||
;; Reparse the macro body and evaluate it
|
||||
(funcall hide-ifdef-evaluator
|
||||
(hif-parse-exp
|
||||
(hif-macro-supply-arguments macro-name actual-parms)
|
||||
macro-name)))
|
||||
|
||||
;;;----------- end of parser -----------------------
|
||||
|
||||
|
||||
(defun hif-canonicalize ()
|
||||
"When at beginning of #ifX, return a Lisp expression for its condition."
|
||||
(defun hif-canonicalize-tokens (regexp) ; For debugging
|
||||
"Return the expanded result of the scanned tokens."
|
||||
(save-excursion
|
||||
(let ((negate (looking-at hif-ifndef-regexp)))
|
||||
(re-search-forward hif-ifx-regexp)
|
||||
(let* ((tokens (hif-tokenize (point)
|
||||
(progn (hif-end-of-line) (point))))
|
||||
(expr (hif-parse-if-exp tokens)))
|
||||
;; (message "hif-canonicalized: %s" expr)
|
||||
(if negate
|
||||
(list 'hif-not expr)
|
||||
expr)))))
|
||||
(re-search-forward regexp)
|
||||
(let* ((curr-regexp (match-string 0))
|
||||
(defined (string-match hif-ifxdef-regexp curr-regexp))
|
||||
(negate (and defined
|
||||
(string= (match-string 2 curr-regexp) "n")))
|
||||
(hif-simple-token-only nil) ;; Dynamic binding var for `hif-tokenize'
|
||||
(tokens (hif-tokenize (point)
|
||||
(progn (hif-end-of-line) (point)))))
|
||||
(if defined
|
||||
(setq tokens (list 'hif-defined tokens)))
|
||||
(if negate
|
||||
(setq tokens (list 'hif-not tokens)))
|
||||
tokens)))
|
||||
|
||||
(defun hif-canonicalize (regexp)
|
||||
"Return a Lisp expression for its condition by scanning current buffer.
|
||||
Do this when cursor is at the beginning of `regexp' (i.e. #ifX)."
|
||||
(let ((case-fold-search nil))
|
||||
(save-excursion
|
||||
(re-search-forward regexp)
|
||||
(let* ((curr-regexp (match-string 0))
|
||||
(defined (string-match hif-ifxdef-regexp curr-regexp))
|
||||
(negate (and defined
|
||||
(string= (match-string 2 curr-regexp) "n")))
|
||||
(hif-simple-token-only nil) ; Dynamic binding for `hif-tokenize'
|
||||
(tokens (hif-tokenize (point)
|
||||
(progn (hif-end-of-line) (point)))))
|
||||
(if defined
|
||||
(setq tokens (list 'hif-defined tokens)))
|
||||
(if negate
|
||||
(setq tokens (list 'hif-not tokens)))
|
||||
(hif-parse-exp tokens)))))
|
||||
|
||||
(defun hif-find-any-ifX ()
|
||||
"Move to next #if..., or #ifndef, at point or after."
|
||||
|
@ -751,10 +1123,10 @@ that form should be displayed.")
|
|||
|
||||
|
||||
(defun hif-find-next-relevant ()
|
||||
"Move to next #if..., #else, or #endif, after the current line."
|
||||
"Move to next #if..., #elif..., #else, or #endif, after the current line."
|
||||
;; (message "hif-find-next-relevant at %d" (point))
|
||||
(end-of-line)
|
||||
;; avoid infinite recursion by only going to beginning of line if match found
|
||||
;; Avoid infinite recursion by only going to line-beginning if match found
|
||||
(if (re-search-forward hif-ifx-else-endif-regexp (point-max) t)
|
||||
(beginning-of-line)))
|
||||
|
||||
|
@ -762,29 +1134,33 @@ that form should be displayed.")
|
|||
"Move to previous #if..., #else, or #endif, before the current line."
|
||||
;; (message "hif-find-previous-relevant at %d" (point))
|
||||
(beginning-of-line)
|
||||
;; avoid infinite recursion by only going to beginning of line if match found
|
||||
;; Avoid infinite recursion by only going to line-beginning if match found
|
||||
(if (re-search-backward hif-ifx-else-endif-regexp (point-min) t)
|
||||
(beginning-of-line)))
|
||||
|
||||
|
||||
(defun hif-looking-at-ifX () ;; Should eventually see #if
|
||||
(looking-at hif-ifx-regexp))
|
||||
(defun hif-looking-at-ifX ()
|
||||
(looking-at hif-ifx-regexp)) ; Should eventually see #if
|
||||
(defun hif-looking-at-endif ()
|
||||
(looking-at hif-endif-regexp))
|
||||
(defun hif-looking-at-else ()
|
||||
(looking-at hif-else-regexp))
|
||||
|
||||
(defun hif-looking-at-elif ()
|
||||
(looking-at hif-elif-regexp))
|
||||
|
||||
|
||||
(defun hif-ifdef-to-endif ()
|
||||
"If positioned at #ifX or #else form, skip to corresponding #endif."
|
||||
"If positioned at #ifX, #elif, or #else form, skip to corresponding #endif."
|
||||
;; (message "hif-ifdef-to-endif at %d" (point)) (sit-for 1)
|
||||
(hif-find-next-relevant)
|
||||
(cond ((hif-looking-at-ifX)
|
||||
(hif-ifdef-to-endif) ; find endif of nested if
|
||||
(hif-ifdef-to-endif)) ; find outer endif or else
|
||||
(hif-ifdef-to-endif) ; Find endif of nested if
|
||||
(hif-ifdef-to-endif)) ; Find outer endif or else
|
||||
((hif-looking-at-elif)
|
||||
(hif-ifdef-to-endif))
|
||||
((hif-looking-at-else)
|
||||
(hif-ifdef-to-endif)) ; find endif following else
|
||||
(hif-ifdef-to-endif)) ; Find endif following else
|
||||
((hif-looking-at-endif)
|
||||
'done)
|
||||
(t
|
||||
|
@ -952,10 +1328,11 @@ Point is left unchanged."
|
|||
(hif-make-range start end else))))
|
||||
|
||||
|
||||
;;; A bit slimy.
|
||||
;; A bit slimy.
|
||||
|
||||
(defun hif-hide-line (point)
|
||||
"Hide the line containing point. Does nothing if `hide-ifdef-lines' is nil."
|
||||
"Hide the line containing point.
|
||||
Does nothing if `hide-ifdef-lines' is nil."
|
||||
(when hide-ifdef-lines
|
||||
(save-excursion
|
||||
(goto-char point)
|
||||
|
@ -999,7 +1376,7 @@ Point is left unchanged."
|
|||
"Called at #ifX expression, this hides those parts that should be hidden.
|
||||
It uses the judgment of `hide-ifdef-evaluator'."
|
||||
;; (message "hif-possibly-hide") (sit-for 1)
|
||||
(let ((test (hif-canonicalize))
|
||||
(let ((test (hif-canonicalize hif-ifx-regexp))
|
||||
(range (hif-find-range)))
|
||||
;; (message "test = %s" test) (sit-for 1)
|
||||
|
||||
|
@ -1027,16 +1404,145 @@ It uses the judgment of `hide-ifdef-evaluator'."
|
|||
(goto-char (hif-range-end range))
|
||||
(end-of-line)))
|
||||
|
||||
(defun hif-parse-macro-arglist (str)
|
||||
"Parse argument list formatted as '( arg1 [ , argn] [...] )'.
|
||||
The '...' is also included. Return a list of the arguments, if '...' exists the
|
||||
first arg will be `hif-etc'."
|
||||
(let* ((hif-simple-token-only nil) ; Dynamic binding var for `hif-tokenize'
|
||||
(tokenlist
|
||||
(cdr (hif-tokenize
|
||||
(- (point) (length str)) (point)))) ; Remove `hif-lparen'
|
||||
etc result token)
|
||||
(while (not (eq (setq token (pop tokenlist)) 'hif-rparen))
|
||||
(cond
|
||||
((eq token 'hif-etc)
|
||||
(setq etc t))
|
||||
((eq token 'hif-comma)
|
||||
t)
|
||||
(t
|
||||
(push token result))))
|
||||
(if etc
|
||||
(cons 'hif-etc (nreverse result))
|
||||
(nreverse result))))
|
||||
|
||||
;; The original version of hideif evaluates the macro early and store the
|
||||
;; final values for the defined macro into the symbol database (aka
|
||||
;; `hide-ifdef-env'). The evaluation process is "strings -> tokens -> parsed
|
||||
;; tree -> [value]". (The square bracket refers to what's stored in in our
|
||||
;; `hide-ifdef-env'.)
|
||||
;;
|
||||
;; This forbids the evaluation of an argumented macro since the parameters
|
||||
;; are applied at run time. In order to support argumented macro I then
|
||||
;; postponed the evaluation process one stage and store the "parsed tree"
|
||||
;; into symbol database. The evaluation process was then "strings -> tokens
|
||||
;; -> [parsed tree] -> value". Hideif therefore run slower since it need to
|
||||
;; evaluate the parsed tree everytime when trying to expand the symbol. These
|
||||
;; temporarily code changes are obsolete and not in Emacs source repository.
|
||||
;;
|
||||
;; Furthermore, CPP did allow partial expression to be defined in several
|
||||
;; macros and later got concatenated into a complete expression and then
|
||||
;; evaluate it. In order to match this behavior I had to postpone one stage
|
||||
;; further, otherwise those partial expression will be fail on parsing and
|
||||
;; we'll miss all macros that reference it. The evaluation process thus
|
||||
;; became "strings -> [tokens] -> parsed tree -> value." This degraded the
|
||||
;; performance since we need to parse tokens and evaluate them everytime
|
||||
;; when that symbol is referenced.
|
||||
;;
|
||||
;; In real cases I found a lot portion of macros are "simple macros" that
|
||||
;; expand to literals like integers or other symbols. In order to enhance
|
||||
;; the performance I use this `hif-simple-token-only' to notify my code and
|
||||
;; save the final [value] into symbol database. [lukelee]
|
||||
|
||||
(defun hif-find-define (&optional min max)
|
||||
"Parse texts and retrieve all defines within the region MIN and MAX."
|
||||
(interactive)
|
||||
(and min (goto-char min))
|
||||
(and (re-search-forward hif-define-regexp max t)
|
||||
(or
|
||||
(let* ((defining (string= "define" (match-string 2)))
|
||||
(name (and (re-search-forward hif-macroref-regexp max t)
|
||||
(match-string 1)))
|
||||
(parsed nil)
|
||||
(parmlist (and (match-string 3) ; First arg id found
|
||||
(hif-parse-macro-arglist (match-string 2)))))
|
||||
(if defining
|
||||
;; Ignore name (still need to return 't), or define the name
|
||||
(or (and hide-ifdef-exclude-define-regexp
|
||||
(string-match hide-ifdef-exclude-define-regexp
|
||||
name))
|
||||
|
||||
(let* ((start (point))
|
||||
(end (progn (hif-end-of-line) (point)))
|
||||
(hif-simple-token-only nil) ; Dynamic binding
|
||||
(tokens
|
||||
(and name
|
||||
;; `hif-simple-token-only' is set/clear
|
||||
;; only in this block
|
||||
(condition-case nil
|
||||
;; Prevent C statements like
|
||||
;; 'do { ... } while (0)'
|
||||
(hif-tokenize start end)
|
||||
(error
|
||||
;; We can't just return nil here since
|
||||
;; this will stop hideif from searching
|
||||
;; for more #defines.
|
||||
(setq hif-simple-token-only t)
|
||||
(buffer-substring-no-properties
|
||||
start end)))))
|
||||
;; For simple tokens we save only the parsed result;
|
||||
;; otherwise we save the tokens and parse it after
|
||||
;; parameter replacement
|
||||
(expr (and tokens
|
||||
;; `hif-simple-token-only' is checked only
|
||||
;; here.
|
||||
(or (and hif-simple-token-only
|
||||
(listp tokens)
|
||||
(= (length tokens) 1)
|
||||
(hif-parse-exp tokens))
|
||||
`(hif-define-macro ,parmlist
|
||||
,tokens))))
|
||||
(SA (and name
|
||||
(assoc (intern name) hide-ifdef-env))))
|
||||
(and name
|
||||
(if SA
|
||||
(or (setcdr SA expr) t)
|
||||
;; Lazy evaluation, eval only if hif-lookup find it.
|
||||
;; Define it anyway, even if nil it's still in list
|
||||
;; and therefore considerred defined
|
||||
(push (cons (intern name) expr) hide-ifdef-env)))))
|
||||
;; #undef
|
||||
(and name
|
||||
(hif-undefine-symbol (intern name))))))
|
||||
t))
|
||||
|
||||
|
||||
(defun hif-add-new-defines (&optional min max)
|
||||
"Scan and add all #define macros between MIN and MAX."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
;; (mark-region min max) ;; for debugging
|
||||
(while (hif-find-define min max)
|
||||
(setf min (point)))
|
||||
(if max (goto-char max)
|
||||
(goto-char (point-max))))))
|
||||
|
||||
(defun hide-ifdef-guts ()
|
||||
"Does most of the work of `hide-ifdefs'.
|
||||
It does not do the work that's pointless to redo on a recursive entry."
|
||||
;; (message "hide-ifdef-guts")
|
||||
(save-excursion
|
||||
(let ((case-fold-search nil)
|
||||
min max)
|
||||
(goto-char (point-min))
|
||||
(while (hif-find-any-ifX)
|
||||
(hif-possibly-hide))))
|
||||
(setf min (point))
|
||||
(loop do
|
||||
(setf max (hif-find-any-ifX))
|
||||
(hif-add-new-defines min max)
|
||||
(if max
|
||||
(hif-possibly-hide))
|
||||
(setf min (point))
|
||||
while max))))
|
||||
|
||||
;;===%%SF%% hide-ifdef-hiding (End) ===
|
||||
|
||||
|
@ -1050,7 +1556,8 @@ It does not do the work that's pointless to redo on a recursive entry."
|
|||
(message "Hide-Read-Only %s"
|
||||
(if hide-ifdef-read-only "ON" "OFF"))
|
||||
(if hide-ifdef-hiding
|
||||
(setq buffer-read-only (or hide-ifdef-read-only hif-outside-read-only)))
|
||||
(setq buffer-read-only (or hide-ifdef-read-only
|
||||
hif-outside-read-only)))
|
||||
(force-mode-line-update))
|
||||
|
||||
(defun hide-ifdef-toggle-outside-read-only ()
|
||||
|
@ -1086,13 +1593,26 @@ It does not do the work that's pointless to redo on a recursive entry."
|
|||
(hif-set-var var 1)
|
||||
(if hide-ifdef-hiding (hide-ifdefs)))
|
||||
|
||||
(defun hide-ifdef-undef (var)
|
||||
"Undefine a VAR so that #ifdef VAR would not be included."
|
||||
(interactive "SUndefine what? ")
|
||||
(hif-set-var var nil)
|
||||
(if hide-ifdef-hiding (hide-ifdefs)))
|
||||
(defun hif-undefine-symbol (var)
|
||||
(setq hide-ifdef-env
|
||||
(delete (assoc var hide-ifdef-env) hide-ifdef-env)))
|
||||
|
||||
|
||||
(defun hide-ifdef-undef (start end)
|
||||
"Undefine a VAR so that #ifdef VAR would not be included."
|
||||
(interactive "r")
|
||||
(let* ((symstr
|
||||
(or (and mark-active
|
||||
(buffer-substring-no-properties start end))
|
||||
(read-string "Undefine what? " (current-word))))
|
||||
(sym (and symstr
|
||||
(intern symstr))))
|
||||
(if (zerop (hif-defined sym))
|
||||
(message "`%s' not defined, no need to undefine it" symstr)
|
||||
(hif-undefine-symbol sym)
|
||||
(if hide-ifdef-hiding (hide-ifdefs))
|
||||
(message "`%S' undefined" sym))))
|
||||
|
||||
(defun hide-ifdefs (&optional nomsg)
|
||||
"Hide the contents of some #ifdefs.
|
||||
Assume that defined symbols have been added to `hide-ifdef-env'.
|
||||
|
|
|
@ -590,27 +590,28 @@ TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or
|
|||
|
||||
(defun idlwave-shell-make-temp-file (prefix)
|
||||
"Create a temporary file."
|
||||
; Hard coded make-temp-file for Emacs<21
|
||||
(if (fboundp 'make-temp-file)
|
||||
(if (featurep 'emacs)
|
||||
(make-temp-file prefix)
|
||||
(let (file
|
||||
(temp-file-dir (if (boundp 'temporary-file-directory)
|
||||
temporary-file-directory
|
||||
"/tmp")))
|
||||
(while (condition-case ()
|
||||
(progn
|
||||
(setq file
|
||||
(make-temp-name
|
||||
(expand-file-name prefix temp-file-dir)))
|
||||
(if (featurep 'xemacs)
|
||||
(write-region "" nil file nil 'silent nil)
|
||||
(write-region "" nil file nil 'silent nil 'excl))
|
||||
nil)
|
||||
(file-already-exists t))
|
||||
;; the file was somehow created by someone else between
|
||||
;; `make-temp-name' and `write-region', let's try again.
|
||||
nil)
|
||||
file)))
|
||||
(if (fboundp 'make-temp-file)
|
||||
(make-temp-file prefix)
|
||||
(let (file
|
||||
(temp-file-dir (if (boundp 'temporary-file-directory)
|
||||
temporary-file-directory
|
||||
"/tmp")))
|
||||
(while (condition-case ()
|
||||
(progn
|
||||
(setq file
|
||||
(make-temp-name
|
||||
(expand-file-name prefix temp-file-dir)))
|
||||
(if (featurep 'xemacs)
|
||||
(write-region "" nil file nil 'silent nil)
|
||||
(write-region "" nil file nil 'silent nil 'excl))
|
||||
nil)
|
||||
(file-already-exists t))
|
||||
;; the file was somehow created by someone else between
|
||||
;; `make-temp-name' and `write-region', let's try again.
|
||||
nil)
|
||||
file))))
|
||||
|
||||
|
||||
(defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur"
|
||||
|
|
|
@ -2461,8 +2461,10 @@ LINE is used to detect the context on how to complete given INPUT."
|
|||
(and completion-code
|
||||
(> (length input) 0)
|
||||
(with-current-buffer (process-buffer process)
|
||||
(let ((completions (python-shell-send-string-no-output
|
||||
(format completion-code input) process)))
|
||||
(let ((completions
|
||||
(python-util-strip-string
|
||||
(python-shell-send-string-no-output
|
||||
(format completion-code input) process))))
|
||||
(and (> (length completions) 2)
|
||||
(split-string completions
|
||||
"^'\\|^\"\\|;\\|'$\\|\"$" t)))))))
|
||||
|
@ -3648,6 +3650,14 @@ returned as is."
|
|||
n (1- n)))
|
||||
(reverse acc))))
|
||||
|
||||
(defun python-util-strip-string (string)
|
||||
"Strip STRING whitespace and newlines from end and beginning."
|
||||
(replace-regexp-in-string
|
||||
(rx (or (: string-start (* (any whitespace ?\r ?\n)))
|
||||
(: (* (any whitespace ?\r ?\n)) string-end)))
|
||||
""
|
||||
string))
|
||||
|
||||
|
||||
(defun python-electric-pair-string-delimiter ()
|
||||
(when (and electric-pair-mode
|
||||
|
@ -3736,7 +3746,7 @@ returned as is."
|
|||
|
||||
(set (make-local-variable 'outline-regexp)
|
||||
(python-rx (* space) block-start))
|
||||
(set (make-local-variable 'outline-heading-end-regexp) ":\\s-*\n")
|
||||
(set (make-local-variable 'outline-heading-end-regexp) ":[^\n]*\n")
|
||||
(set (make-local-variable 'outline-level)
|
||||
#'(lambda ()
|
||||
"`outline-level' function for Python mode."
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue