This commit is contained in:
Joakim Verona 2014-07-31 22:31:57 +02:00
commit 1d8b8a2d8f
247 changed files with 18391 additions and 6682 deletions

View file

@ -1,3 +1,42 @@
2014-07-31 Paul Eggert <eggert@cs.ucla.edu>
Simplify timerfd configuration and fix some minor glitches.
* configure.ac (HAVE_TIMERFD): Define only if TFD_CLOEXEC works,
since the code leaked file descriptors to children when !TFD_CLOEXEC.
(HAVE_TIMERFD_CLOEXEC): Remove; no longer used.
* m4/clock_time.m4 (gl_CLOCK_TIME): Don't check for clock_getres.
This reverts the previous change to this file, so it matches
gnulib again.
2014-07-28 Dmitry Antipov <dmantipov@yandex.ru>
* configure.ac (toplevel): Check whether GNU/Linux-specific
timerfd functions and macros are available.
* m4/clock_time.m4 (gl_CLOCK_TIME): Check for clock_getres as well.
2014-07-13 Paul Eggert <eggert@cs.ucla.edu>
Improve behavior of 'bzr up; cd src; make -k'.
* Makefile.in (ACLOCAL_INPUTS): Add all m4/*.m4 files.
2014-07-12 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:
2014-06-27 mktime: merge #if/#ifdef usage from glibc
* lib/mktime.c: Update from gnulib.
* Makefile.in (install-arch-indep): Avoid readdir race (Bug#17971).
2014-07-10 Dmitry Antipov <dmantipov@yandex.ru>
* configure.ac: Check whether sys/sysinfo.h provides
Linux 'sysinfo' function and 'struct sysinfo' type.
2014-06-28 Glenn Morris <rgm@gnu.org>
* configure.ac (lwlib_deps_frag, oldxmenu_deps_frag): New output files.
* make-dist (lwlib, oldXMenu): Distribute *.mk.
2014-06-27 Glenn Morris <rgm@gnu.org>
* Makefile.in (src): No more need to pass BOOTSTRAPEMACS.

View file

@ -413,7 +413,7 @@ $(srcdir)/configure: $(AUTOCONF_INPUTS)
cd ${srcdir} && ${AUTOCONF}
ACLOCAL_PATH = @ACLOCAL_PATH@
ACLOCAL_INPUTS = $(srcdir)/configure.ac $(srcdir)/m4/gnulib-comp.m4
ACLOCAL_INPUTS = $(srcdir)/configure.ac $(wildcard $(srcdir)/m4/*.m4)
$(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS)
cd $(srcdir) && ACLOCAL_PATH='$(ACLOCAL_PATH)' $(ACLOCAL) -I m4
@ -594,8 +594,9 @@ install-arch-indep: lisp install-info install-man ${INSTALL_ARCH_INDEP_EXTRA}
[ -z "${GZIP_PROG}" ] || { \
echo "Compressing *.el ..." && \
cd "$(DESTDIR)${lispdir}" && \
find . -name '*.elc' -exec $(SHELL) -c \
'${GZIP_PROG} -9n `expr "$$1" : "\\(.*\\)c"`' dummy '{}' ';'; \
for f in `find . -name "*.elc" -print | sed 's/.elc$$/.el/'`; do \
${GZIP_PROG} -9n "$$f"; \
done; \
}
-chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS}

View file

@ -1,3 +1,21 @@
2014-07-14 Paul Eggert <eggert@cs.ucla.edu>
Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
* merge-gnulib (GNULIB_MODULES): Add binary-io. It was already
present implicitly; this just makes the dependence explicit.
2014-06-30 Glenn Morris <rgm@gnu.org>
* update_autogen: Find loaddefs targets rather than
parsing lisp/Makefile.in
2014-06-29 Glenn Morris <rgm@gnu.org>
* update_autogen: Remove need to cd into/out of lisp/.
* grammars/Makefile.in (bootstrap-clean): Don't delete Makefile,
for sake of top-level maintainer-clean rule.
2014-06-26 Eli Zaretskii <eliz@gnu.org>
* notes/unicode: Some notes about what to do when a new Unicode

View file

@ -99,7 +99,10 @@ ${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy
distclean:
rm -f Makefile
bootstrap-clean maintainer-clean: distclean
## Perhaps this should do what extraclean (qv) does.
bootstrap-clean:
maintainer-clean: distclean
## We do not normally delete the generated files, even in bootstrap.
## Creating them does not take long, so we could easily change this.

View file

@ -26,7 +26,7 @@
GNULIB_URL=git://git.savannah.gnu.org/gnulib.git
GNULIB_MODULES='
alloca-opt byteswap c-ctype c-strcase
alloca-opt binary-io byteswap c-ctype c-strcase
careadlinkat close-stream count-one-bits count-trailing-zeros
crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512
dtoastr dtotimespec dup2 environ execinfo faccessat

View file

@ -322,15 +322,20 @@ EOF
echo "Finding loaddef targets..."
sed -n -e '/^AUTOGEN_VCS/,/^$/p' lisp/Makefile.in | \
sed -e '/AUTOGEN_VCS/d' -e '/^$/d' -e 's/\\//' \
>| $tempfile || die "sed error"
find lisp -name '*.el' -exec grep '^;.*generated-autoload-file:' {} + | \
sed -e '/loaddefs\|esh-groups/d' -e 's|/[^/]*: "|/|' -e 's/"//g' \
>| $tempfile || die "Error finding targets"
genfiles=
while read genfile; do
[ -r lisp/$genfile ] || die "Unable to read $genfile"
## Or we can just use sort -u when making tempfile...
case " $genfiles " in
*" $genfile "*) continue ;;
esac
[ -r $genfile ] || die "Unable to read $genfile"
genfiles="$genfiles $genfile"
done < $tempfile
@ -369,18 +374,12 @@ make -C lisp "$@" autoloads EMACS=../src/bootstrap-emacs || die "make src error"
cp $ldefs_in $ldefs_out || die "cp ldefs_boot error"
cd lisp
echo "Checking status of loaddef files..."
## It probably would be fine to just check+commit lisp/, since
## making autoloads should not effect any other files. But better
## safe than sorry.
modified=$(status $genfiles ${ldefs_out#lisp/}) || die
## bzr status output is always relative to top-level, not PWD.
[ "$vcs" = "bzr" ] && cd ../
modified=$(status $genfiles $ldefs_out) || die
commit "loaddefs" $modified || die "commit error"

View file

@ -1512,6 +1512,7 @@ fi
dnl checks for header files
AC_CHECK_HEADERS_ONCE(
sys/systeminfo.h
sys/sysinfo.h
coff.h pty.h
sys/resource.h
sys/utsname.h pwd.h utmp.h util.h)
@ -1527,6 +1528,21 @@ if test $emacs_cv_personality_linux32 = yes; then
[Define to 1 if personality LINUX32 can be set.])
fi
if test "$ac_cv_header_sys_sysinfo_h" = yes; then
AC_MSG_CHECKING([if Linux sysinfo may be used])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/sysinfo.h>]],
[[struct sysinfo si; sysinfo (&si)]])],
emacs_cv_linux_sysinfo=yes, emacs_cv_linux_sysinfo=no)
AC_MSG_RESULT($emacs_cv_linux_sysinfo)
if test $emacs_cv_linux_sysinfo = yes; then
AC_DEFINE([HAVE_LINUX_SYSINFO], 1, [Define to 1 if you have Linux sysinfo function.])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/sysinfo.h>]],
[[struct sysinfo si; return si.mem_unit]])],
AC_DEFINE(LINUX_SYSINFO_UNIT, 1,
[Define to 1 if Linux sysinfo sizes are in multiples of mem_unit bytes.]))
fi
fi
dnl On Solaris 8 there's a compilation warning for term.h because
dnl it doesn't define `bool'.
AC_CHECK_HEADERS(term.h, , , -)
@ -1592,11 +1608,14 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
deps_frag=autodeps.mk
fi
fi
lwlib_deps_frag=$srcdir/lwlib/$deps_frag
oldxmenu_deps_frag=$srcdir/oldXMenu/$deps_frag
deps_frag=$srcdir/src/$deps_frag
AC_SUBST(MKDEPDIR)
AC_SUBST(DEPFLAGS)
AC_SUBST_FILE(deps_frag)
AC_SUBST_FILE(lwlib_deps_frag)
AC_SUBST_FILE(oldxmenu_deps_frag)
lisp_frag=$srcdir/src/lisp.mk
AC_SUBST_FILE(lisp_frag)
@ -3729,6 +3748,19 @@ fi
AC_SUBST(LIBS_TERMCAP)
AC_SUBST(TERMCAP_OBJ)
# GNU/Linux-specific timer functions.
AC_CACHE_CHECK([for timerfd interface], [emacs_cv_have_timerfd],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <sys/timerfd.h>
]],
[[timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC);
timerfd_settime (0, TFD_TIMER_ABSTIME, 0, 0);]])],
[emacs_cv_have_timerfd=yes],
[emacs_cv_have_timerfd=no])])
if test "$emacs_cv_have_timerfd" = yes; then
AC_DEFINE([HAVE_TIMERFD], 1,
[Define to 1 if timerfd functions are supported as in GNU/Linux.])
fi
# Do we have res_init, for detecting changes in /etc/resolv.conf?
# On Darwin, res_init appears not to be useful: see bug#562 and

View file

@ -1,3 +1,18 @@
2014-07-21 Glenn Morris <rgm@gnu.org>
* emacs.texi (Intro): Workaround makeinfo 4 @acronym bug. (Bug#18040)
2014-07-09 Juri Linkov <juri@jurta.org>
* search.texi (Regexp Search): Update lax space matching that is
not active in regexp search by default now. (Bug#17901)
2014-07-03 Glenn Morris <rgm@gnu.org>
* help.texi (Misc Help):
* trouble.texi (Checklist): "Online" help doesn't mean what it
used to any more.
2014-06-23 Glenn Morris <rgm@gnu.org>
* Makefile.in (%.texi): Disable implicit rules.

View file

@ -1476,7 +1476,16 @@ Neal Ziring, Teodor Zlatanov, and Detlev Zundel.
You are reading about GNU Emacs, the GNU incarnation of the
advanced, self-documenting, customizable, extensible editor Emacs.
(The @samp{G} in @acronym{GNU, @acronym{GNU}'s Not Unix} is not silent.)
(The @samp{G} in
@c Workaround makeinfo 4 bug.
@c http://lists.gnu.org/archive/html/bug-texinfo/2004-08/msg00009.html
@iftex
@acronym{GNU, @acronym{GNU}'s Not Unix}
@end iftex
@ifnottex
@acronym{GNU, GNU's Not Unix}
@end ifnottex
is not silent.)
We call Emacs @dfn{advanced} because it can do much more than simple
insertion and deletion of text. It can control subprocesses, indent

View file

@ -490,8 +490,7 @@ currently in use. @xref{Coding Systems}.
@kindex C-h i
@findex info
@cindex Info
@cindex manuals, on-line
@cindex on-line manuals
@cindex manuals, included
@kbd{C-h i} (@code{info}) runs the Info program, which browses
structured documentation files. The entire Emacs manual is available
within Info, along with many other manuals for the GNU system. Type

View file

@ -602,12 +602,13 @@ Incremental regexp and non-regexp searches have independent defaults.
They also have separate search rings, which you can access with
@kbd{M-p} and @kbd{M-n}.
Just as in ordinary incremental search, any @key{SPC} typed in
incremental regexp search matches any sequence of one or more
whitespace characters. The variable @code{search-whitespace-regexp}
specifies the regexp for the lax space matching, and @kbd{M-s @key{SPC}}
(@code{isearch-toggle-lax-whitespace}) toggles the feature.
@xref{Special Isearch}.
Unlike ordinary incremental search, incremental regexp search
do not use lax space matching by default. To toggle this feature
use @kbd{M-s @key{SPC}} (@code{isearch-toggle-lax-whitespace}).
Then any @key{SPC} typed in incremental regexp search will match
any sequence of one or more whitespace characters. The variable
@code{search-whitespace-regexp} specifies the regexp for the lax
space matching. @xref{Special Isearch}.
In some cases, adding characters to the regexp in an incremental
regexp search can make the cursor move back and start again. For

View file

@ -847,7 +847,7 @@ conclusion from our observations.
@item
If the bug is that the Emacs Manual or the Emacs Lisp Reference Manual
fails to describe the actual behavior of Emacs, or that the text is
confusing, copy in the text from the online manual which you think is
confusing, copy in the text from the manual which you think is
at fault. If the section is small, just the section name is enough.
@item

View file

@ -1,3 +1,13 @@
2014-07-16 Álvar Jesús Ibeas Martín <alvar.ibeas@unican.es> (tiny change)
* emacs-lisp-intro.texi (Variables, Buffer Names, if & or)
(Symbols as Chest, fwd-para while): Fix typos.
2014-07-03 Glenn Morris <rgm@gnu.org>
* emacs-lisp-intro.texi (Note for Novices, Finding More, Conclusion):
"Online" help doesn't mean what it used to any more.
2014-06-23 Glenn Morris <rgm@gnu.org>
* Makefile.in (%.texi): Disable implicit rules.

View file

@ -903,7 +903,7 @@ file, @file{cl.el}, that adds many Common Lisp features to Emacs Lisp.)
If you don't know GNU Emacs, you can still read this document
profitably. However, I recommend you learn Emacs, if only to learn to
move around your computer screen. You can teach yourself how to use
Emacs with the on-line tutorial. To use it, type @kbd{C-h t}. (This
Emacs with the built-in tutorial. To use it, type @kbd{C-h t}. (This
means you press and release the @key{CTRL} key and the @kbd{h} at the
same time, and then press and release @kbd{t}.)
@ -1700,7 +1700,7 @@ Another way to think about this is to imagine a symbol as being a chest
of drawers. The function definition is put in one drawer, the value in
another, and so on. What is put in the drawer holding the value can be
changed without affecting the contents of the drawer holding the
function definition, and vice-verse.
function definition, and vice versa.
@menu
* fill-column Example::
@ -2653,7 +2653,7 @@ functions; without the parentheses, the interpreter would attempt to
evaluate the symbols as variables. @xref{Variables}.)
In spite of the distinction between files and buffers, you will often
find that people refer to a file when they mean a buffer and vice-verse.
find that people refer to a file when they mean a buffer and vice versa.
Indeed, most people say, ``I am editing a file,'' rather than saying,
``I am editing a buffer which I will soon save to a file.'' It is
almost always clear from context what people mean. When dealing with
@ -4657,7 +4657,7 @@ specialized library, such as a law library or an engineering library,
rather than a general library. Each library, or file, contains
functions that relate to a particular topic or activity, such as
@file{abbrev.el} for handling abbreviations and other typing
shortcuts, and @file{help.el} for on-line help. (Sometimes several
shortcuts, and @file{help.el} for help. (Sometimes several
libraries provide code for a single activity, as the various
@file{rmail@dots{}} files provide code for reading electronic mail.)
In @cite{The GNU Emacs Manual}, you will see sentences such as ``The
@ -5756,7 +5756,7 @@ so the true-or-false-test looks like this:
@noindent
@code{not} is a function that returns true if its argument is false
and false if its argument is true. So if @code{(bufferp buffer)}
returns true, the @code{not} expression returns false and vice-verse:
returns true, the @code{not} expression returns false and vice versa:
what is ``not true'' is false and what is ``not false'' is true.
Using this test, the @code{if} expression works as follows: when the
@ -9805,7 +9805,7 @@ In an earlier section, I suggested that you might imagine a symbol as
being a chest of drawers. The function definition is put in one
drawer, the value in another, and so on. What is put in the drawer
holding the value can be changed without affecting the contents of the
drawer holding the function definition, and vice-verse.
drawer holding the function definition, and vice versa.
Actually, what is put in each drawer is the address of the value or
function definition. It is as if you found an old chest in the attic,
@ -13235,7 +13235,7 @@ Consider what happens when there is no fill prefix.
@noindent
This @code{while} loop has us searching forward for
@code{sp-parstart}, which is the combination of possible whitespace
with a the local value of the start of a paragraph or of a paragraph
with the local value of the start of a paragraph or of a paragraph
separator. (The latter two are within an expression starting
@code{\(?:} so that they are not referenced by the
@code{match-beginning} function.)
@ -18685,9 +18685,9 @@ easy-to-read description of Emacs Lisp. It is written not only for
experts, but for people who know what you know. (The @cite{Reference
Manual} comes with the standard GNU Emacs distribution. Like this
introduction, it comes as a Texinfo source file, so you can read it
on-line and as a typeset, printed book.)
on your computer and as a typeset, printed book.)
Go to the other on-line help that is part of GNU Emacs: the on-line
Go to the other built-in help that is part of GNU Emacs: the built-in
documentation for all functions and variables, and @code{find-tag},
the program that takes you to sources.

View file

@ -1,3 +1,37 @@
2014-07-11 Eli Zaretskii <eliz@gnu.org>
* internals.texi (Garbage Collection): Fix last change.
2014-07-11 Dmitry Antipov <dmantipov@yandex.ru>
* internals.texi (Garbage Collection): Mention memory-info.
2014-07-11 Michael Albinus <michael.albinus@gmx.de>
* minibuf.texi (Intro to Minibuffers, Reading a Password):
Password hiding is available in batch mode, do not mention it in
the exclusion list. Mention `read-hide-char'. (Bug#17839)
2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
* debugging.texi (Function Debugging, Debugger Commands):
Update debug-on-entry w.r.t behavior after redefinitions (bug#17902).
2014-07-03 Glenn Morris <rgm@gnu.org>
* help.texi (Help Functions): "Online" help doesn't mean what it
used to any more.
2014-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
* keymaps.texi (Key Lookup): Remove mention of indirect entries.
(Scanning Keymaps): Reword the `noindirect' argument.
2014-06-28 Glenn Morris <rgm@gnu.org>
* minibuf.texi (Intro to Minibuffers): Batch mode is basic.
(Reading a Password): Mention batch mode. (Bug#17839)
2014-06-23 Glenn Morris <rgm@gnu.org>
* Makefile.in (%.texi): Disable implicit rules.

View file

@ -226,9 +226,7 @@ function, and then step through its caller.
@deffn Command debug-on-entry function-name
This function requests @var{function-name} to invoke the debugger each
time it is called. It works by inserting the form
@code{(implement-debug-on-entry)} into the function definition as the
first form.
time it is called.
Any function or macro defined as Lisp code may be set to break on
entry, regardless of whether it is interpreted code or compiled code.
@ -244,11 +242,6 @@ When @code{debug-on-entry} is called interactively, it prompts for
up to invoke the debugger on entry, @code{debug-on-entry} does nothing.
@code{debug-on-entry} always returns @var{function-name}.
@strong{Warning:} if you redefine a function after using
@code{debug-on-entry} on it, the code to enter the debugger is
discarded by the redefinition. In effect, redefining the function
cancels the break-on-entry feature for that function.
Here's an example to illustrate use of this function:
@example
@ -277,12 +270,6 @@ Debugger entered--entering a function:
------ Buffer: *Backtrace* ------
@end group
@group
(symbol-function 'fact)
@result{} (lambda (n)
(debug (quote debug))
(if (zerop n) 1 (* n (fact (1- n)))))
@end group
@end example
@end deffn
@ -461,9 +448,7 @@ You can't use @kbd{r} when the debugger was entered due to an error.
@item l
Display a list of functions that will invoke the debugger when called.
This is a list of functions that are set to break on entry by means of
@code{debug-on-entry}. @strong{Warning:} if you redefine such a
function and thus cancel the effect of @code{debug-on-entry}, it may
erroneously show up in this list.
@code{debug-on-entry}.
@item v
Toggle the display of local variables of the current stack frame.

View file

@ -508,7 +508,7 @@ non-@code{nil}, the return value is always a vector.
@node Help Functions
@section Help Functions
Emacs provides a variety of on-line help functions, all accessible to
Emacs provides a variety of built-in help functions, all accessible to
the user as subcommands of the prefix @kbd{C-h}. For more information
about them, see @ref{Help, , Help, emacs, The GNU Emacs Manual}. Here
we describe some program-level interfaces to the same information.

View file

@ -513,6 +513,11 @@ created in this Emacs session. Each of these counters increments for
a certain kind of object. See the documentation string for details.
@end defun
@defun memory-info
This functions returns an amount of total system memory and how much
of it is free. On an unsupported system, the value may be @code{nil}.
@end defun
@defvar gcs-done
This variable contains the total number of garbage collections
done so far in this Emacs session.

View file

@ -1043,22 +1043,6 @@ lambda expression. This is presumed to be a function, and is treated
as such (see above). In order to execute properly as a key binding,
this function must be a command---it must have an @code{interactive}
specification. @xref{Defining Commands}.
@item
If the @sc{car} of @var{list} is a keymap and the @sc{cdr} is an event
type, then this is an @dfn{indirect entry}:
@example
(@var{othermap} . @var{othertype})
@end example
When key lookup encounters an indirect entry, it looks up instead the
binding of @var{othertype} in @var{othermap} and uses that.
This feature permits you to define one key as an alias for another key.
For example, an entry whose @sc{car} is the keymap called @code{esc-map}
and whose @sc{cdr} is 32 (the code for @key{SPC}) means, ``Use the global
binding of @kbd{Meta-@key{SPC}}, whatever that may be''.
@end itemize
@item @var{symbol}
@ -1066,9 +1050,7 @@ binding of @kbd{Meta-@key{SPC}}, whatever that may be''.
The function definition of @var{symbol} is used in place of
@var{symbol}. If that too is a symbol, then this process is repeated,
any number of times. Ultimately this should lead to an object that is
a keymap, a command, or a keyboard macro. A list is allowed if it is a
keymap or a command, but indirect entries are not understood when found
via symbols.
a keymap, a command, or a keyboard macro.
Note that keymaps and keyboard macros (strings and vectors) are not
valid functions, so a symbol with a keymap, string, or vector as its
@ -1097,8 +1079,7 @@ binding is not executable as a command.
@end table
In short, a keymap entry may be a keymap, a command, a keyboard
macro, a symbol that leads to one of them, or an indirection or
@code{nil}.
macro, a symbol that leads to one of them, or @code{nil}.
@node Functions for Key Lookup
@section Functions for Key Lookup
@ -1945,9 +1926,9 @@ entirely of @acronym{ASCII} characters (or meta variants of @acronym{ASCII}
characters) are preferred to all other key sequences and that the
return value can never be a menu binding.
If @var{noindirect} is non-@code{nil}, @code{where-is-internal} doesn't
follow indirect keymap bindings. This makes it possible to search for
an indirect definition itself.
If @var{noindirect} is non-@code{nil}, @code{where-is-internal} doesn't look
inside menu-items to find their commands. This makes it possible to search for
a menu-item itself.
The fifth argument, @var{no-remap}, determines how this function
treats command remappings (@pxref{Remapping Commands}). There are two

View file

@ -101,7 +101,9 @@ the minibuffer is in a separate frame. @xref{Minibuffers and Frames}.
When Emacs is running in batch mode, any request to read from the
minibuffer actually reads a line from the standard input descriptor that
was supplied when Emacs was started.
was supplied when Emacs was started. This supports only basic input:
none of the special minibuffer features (history, completion, etc.)
are available in batch mode.
@node Text from Minibuffer
@section Reading Text Strings with the Minibuffer
@ -2145,8 +2147,10 @@ function @code{read-passwd}.
@defun read-passwd prompt &optional confirm default
This function reads a password, prompting with @var{prompt}. It does
not echo the password as the user types it; instead, it echoes @samp{.}
for each character in the password.
not echo the password as the user types it; instead, it echoes
@samp{.} for each character in the password. If you want to apply
another character to hide the password, let-bind the variable
@code{read-hide-char} with that character.
The optional argument @var{confirm}, if non-@code{nil}, says to read the
password twice and insist it must be the same both times. If it isn't

View file

@ -1,3 +1,30 @@
2014-07-28 Stephen Berman <stephen.berman@gmx.net>
* todo-mode.texi (Marked Items): Correct omission of item deletion
from commands applying to both todo and done items.
2014-07-18 Albert Krewinkel <albert+gnus@zeitkraut.de>
* gnus.texi (Posting Styles): Document the possibility to perform
string replacements when matching against headers.
2014-07-09 Stephen Berman <stephen.berman@gmx.net>
* todo-mode.texi (Levels of Organization): Comment out statement
that Emacs recognizes todo files by their extension, since this
feature has been removed due to bug#17482.
2014-07-03 Michael Albinus <michael.albinus@gmx.de>
* trampver.texi: Update release number.
2014-07-03 Glenn Morris <rgm@gnu.org>
* info.texi, mh-e.texi: "Online help" doesn't mean what it
used to any more.
* idlwave.texi (Introduction): Comment out dead http screenshot links.
2014-06-24 Leo Liu <sdl.web@gmail.com>
* dired-x.texi (Omitting Files in Dired, Omitting Variables):

View file

@ -2880,12 +2880,17 @@ news group.
@item gcc-self
@cindex gcc-self
If @code{(gcc-self . t)} is present in the group parameter list, newly
composed messages will be @code{Gcc}'d to the current group. If
composed messages will be @code{gcc}d to the current group. If
@code{(gcc-self . none)} is present, no @code{Gcc:} header will be
generated, if @code{(gcc-self . "string")} is present, this string will
be inserted literally as a @code{gcc} header. This parameter takes
precedence over any default @code{Gcc} rules as described later
(@pxref{Archived Messages}), with the exception for messages to resend.
generated, if @code{(gcc-self . "group")} is present, this string will
be inserted literally as a @code{Gcc:} header. It should be a group
name. The @code{gcc-self} value may also be a list of strings and
@code{t}, e.g., @code{(gcc-self "group1" "group2" t)} means to
@code{gcc} the newly composed message into the groups @code{"group1"}
and @code{"group2"}, and into the current group. The @code{gcc-self}
parameter takes precedence over any default @code{Gcc} rules as
described later (@pxref{Archived Messages}), with the exception for
messages to resend.
@strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
@code{nntp} groups (or the like) isn't valid. An @code{nntp} server
@ -12813,10 +12818,12 @@ variable, which is a vector of the following headers: number subject
from date id references chars lines xref extra.
In the case of a string value, if the @code{match} is a regular
expression, a @samp{gnus-match-substitute-replacement} is proceed on
the value to replace the positional parameters @samp{\@var{n}} by the
corresponding parenthetical matches (see @xref{Replacing Match,,
Replacing the Text that Matched, elisp, The Emacs Lisp Reference Manual}.)
expression, or if it takes the form @code{(header @var{match}
@var{regexp})}, a @samp{gnus-match-substitute-replacement} is proceed
on the value to replace the positional parameters @samp{\@var{n}} by
the corresponding parenthetical matches (see @xref{Replacing Match,,
Replacing the Text that Matched, elisp, The Emacs Lisp Reference
Manual}.)
@vindex message-reply-headers
@ -12848,6 +12855,10 @@ So here's a new example:
;; @r{If I'm replying to Larsi, set the Organization header.}
((header "from" "larsi.*org")
(Organization "Somewhere, Inc."))
;; @r{Reply to a message from the same subaddress the message}
;; @r{was sent to.}
((header "x-original-to" "me\\(\\+.+\\)@@example.org")
(address "me\\1@@example.org"))
((posting-from-work-p) ;; @r{A user defined function}
(signature-file "~/.work-signature")
(address "user@@bar.foo")

View file

@ -239,24 +239,27 @@ Examining variables and expressions with a mouse click.
And much, much more...
@end itemize
@c Dead links, 2014/06.
@ignore
@ifnottex
@cindex Screenshots
Here are a number of screenshots showing IDLWAVE in action:
@itemize @bullet
@item
@uref{http://idlwave.org/screenshots/emacs_21_nav.gif,An IDLWAVE buffer}
@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_nav.gif,An IDLWAVE buffer}
@item
@uref{http://idlwave.org/screenshots/emacs_21_keys.gif,A keyword being completed}
@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_keys.gif,A keyword being completed}
@item
@uref{http://idlwave.org/screenshots/emacs_21_help.gif,Online help text.}
@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_help.gif,Online help text.}
@item
@uref{http://idlwave.org/screenshots/emacs_21_ri.gif,Routine information displayed}
@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_ri.gif,Routine information displayed}
@item
@uref{http://idlwave.org/screenshots/emacs_21_bp.gif,Debugging code
@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_bp.gif,Debugging code
stopped at a breakpoint}
@end itemize
@end ifnottex
@end ignore
IDLWAVE is the distant successor to the @file{idl.el} and
@file{idl-shell.el} files written by Chris Chase. The modes and files

View file

@ -12,7 +12,7 @@
@comment %**end of header
@copying
This file describes how to use Info, the on-line, menu-driven GNU
This file describes how to use Info, the menu-driven GNU
documentation system.
Copyright @copyright{} 1989, 1992, 1996--2014 Free Software Foundation, Inc.
@ -51,7 +51,7 @@ modify this GNU manual.''
@node Top
@top Info: An Introduction
The GNU Project distributes most of its on-line manuals in the
The GNU Project distributes most of its manuals in the
@dfn{Info format}, which you read using an @dfn{Info reader}. You are
probably using an Info reader to read this now.
@ -98,7 +98,7 @@ program on a computer, so that you can try Info commands while reading
about them. Reading it on paper or with an HTML browser is less
effective, since you must take it on faith that the commands described
really do what the manual says. By all means go through this manual
now that you have it; but please try going through the on-line version
now that you have it; but please try going through the Info version
as well.
@cindex Info reader, how to invoke

View file

@ -227,7 +227,7 @@ have, see @ref{Getting Started}.
@kindex C-h t
If you don't already use GNU Emacs but want to learn more, you can
read an online tutorial by starting GNU Emacs and typing @kbd{C-h t}
read a built-in tutorial by starting GNU Emacs and typing @kbd{C-h t}
(@code{help-with-tutorial}). (To learn about this notation, see
@ref{Conventions}.) If you want to take the plunge, consult the
@iftex
@ -1066,9 +1066,9 @@ This chapter begins the meat of the manual which goes into more detail
about every MH-E command and option.
@cindex Emacs, info
@cindex Emacs, online help
@cindex Emacs, built-in help
@cindex info
@cindex online help
@cindex built-in help
@findex describe-mode
@findex mh-help
@kindex ?
@ -1083,12 +1083,12 @@ summaries at the beginning of each chapter. In case you have or would
like to rebind the keys, the command summaries also list the
associated Emacs Lisp function. Furthermore, even if you're stranded
on a desert island with a laptop and are without your manuals, you can
get a summary of all these commands with GNU Emacs online help: use
get a summary of all these commands with GNU Emacs built-in help: use
@kbd{C-h m} (@code{describe-mode}) for a brief summary of commands,
@kbd{?} (@code{mh-help}) for an even briefer summary@footnote{This
help appears in a buffer called @file{*MH-E Help*}
(@pxref{Miscellaneous}).} (@kbd{C-c ?} in MH-Letter mode), or @kbd{C-h
i} to read this manual via Info. The online help is quite good; try
i} to read this manual via Info. The built-in help is quite good; try
running @kbd{C-h C-h}. This brings up a list of available help topics,
one of which displays the documentation for a given key (like @kbd{C-h
k C-n}). Another useful help feature is to view the manual section
@ -1120,21 +1120,21 @@ exist,
@c Yes, some of the stuff in the following sections is redundant, but
@c TeX barfs if the @ifs are inside the @footnote.
@iftex
@footnote{The @cite{GNU Emacs Lisp Reference Manual} may be available
online in the Info system by typing @kbd{C-h i m Emacs Lisp
@footnote{The @cite{GNU Emacs Lisp Reference Manual} should be available
via the Info system by typing @kbd{C-h i m Emacs Lisp
@key{RET}}. It is also available online at @*
@uref{http://www.gnu.org/software/emacs/manual/elisp.html}.}
@end iftex
@ifinfo
@footnote{@xref{Top, The GNU Emacs Lisp Reference Manual, , elisp, GNU
Emacs Lisp Reference Manual}, which may be available online in the
Emacs Lisp Reference Manual}, which should be available via the
Info system. It is also available online at
@uref{http://www.gnu.org/software/emacs/manual/elisp.html}.}
@end ifinfo
@ifhtml
@footnote{The
@uref{http://www.gnu.org/software/emacs/manual/elisp.html,
The GNU Emacs Lisp Reference Manual} may also be available online in
The GNU Emacs Lisp Reference Manual} should be available via
the Info system by typing @kbd{C-h i m Emacs Lisp @key{RET}}.}
@end ifhtml
and you can look at the code itself for examples. Look in the Emacs
@ -1142,7 +1142,7 @@ Lisp directory on your system (such as
@file{/usr/local/share/emacs/lisp/mh-e}) and find all the @file{mh-*.el}
files there. When calling MH-E and other Emacs Lisp functions directly
from Emacs Lisp code, you'll need to know the correct arguments. Use
the online help for this. For example, try @kbd{C-h f
the built-in help for this. For example, try @kbd{C-h f
mh-execute-commands @key{RET}}. If you write your own functions,
please do not prefix your symbols (variables and functions) with
@samp{mh-}. This prefix is reserved for the MH-E package. To avoid
@ -6405,7 +6405,7 @@ see the section
The Menu Bar} in @cite{The GNU Emacs Manual}.
@end ifhtml
The Emacs manual describes how to get online help for a particular
The Emacs manual describes how to get help for a particular
menu item. You can also look up a menu item in the index of this
manual in two ways: all of the menu items are listed alphabetically,
and you can also browse all of the items under the index entry

View file

@ -158,11 +158,10 @@ you want.
All todo files reside in a single directory, whose location is specified
by the user option @code{todo-directory}. This directory may also
contain other types of Todo files, which are discussed later
(@pxref{Todo Archive Mode} and @ref{Todo Filtered Items Mode}). Emacs
recognizes Todo files by their extension, so when you visit the files
the buffer is in the appropriate mode and the current category is
correctly displayed.
(@pxref{Todo Archive Mode} and @ref{Todo Filtered Items Mode}).
@c Emacs recognizes Todo files by their extension, so when you visit
@c the files the buffer is in the appropriate mode and the current
@c category is correctly displayed.
When you use a Todo mode command to create a todo file, the extension
@samp{.todo} is automatically added to the base name you choose (as a
rule, this name is also used for the other types of Todo files, which
@ -1324,10 +1323,11 @@ If you use @kbd{m}, @kbd{d}, @kbd{A d} or @kbd{u} on multiple
noncontiguous marked items, the relocated items retain their relative
order but are now listed consecutively en bloc.
You can mark both todo and done items, but note that only @kbd{m} can apply
to both; other commands only affect either marked todo or marked done
items, so if both types of items are marked, invoking these commands
has no effect and informs you of your erroneous attempt.
You can mark both todo and done items, but note that only @kbd{m} and
@kbd{k} can apply to both; other commands only affect either marked
todo or marked done items, so if both types of items are marked,
invoking these commands has no effect and informs you of your
erroneous attempt.
@node Todo Categories Mode, Searching for Items, Marked Items, Top
@chapter Todo Categories Mode

View file

@ -5,10 +5,10 @@
@c Copyright (C) 2003-2014 Free Software Foundation, Inc.
@c See file doclicense.texi for copying conditions.
@c In the Tramp CVS, the version number is auto-frobbed from
@c In the Tramp GIT, 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.10
@set trampver 2.2.11-pre
@c Other flags from configuration
@set instprefix /usr/local

View file

@ -1,3 +1,20 @@
2014-07-21 Dmitry Antipov <dmantipov@yandex.ru>
* TODO: remove frame height remark.
2014-07-11 Michael Albinus <michael.albinus@gmx.de>
* NEWS: Passwords in batch mode are hidden.
2014-07-03 Glenn Morris <rgm@gnu.org>
* refcards/calccard.tex (section{Getting Help}):
Meaning of "on-line" has changed.
2014-06-28 Glenn Morris <rgm@gnu.org>
* publicsuffix.txt: Update from source.
2014-06-24 Eli Barzilay <eli@barzilay.org>
* NEWS: calculator.el user-visible changes.

View file

@ -7,9 +7,9 @@ See the end of the file for license conditions.
[People who debug Emacs on Windows using Microsoft debuggers should
read the Windows-specific section near the end of this document.]
** When you debug Emacs with GDB, you should start it in the directory
where the executable was made (the 'src' directory in the Emacs source
tree). That directory has a .gdbinit file that defines various
** When you debug Emacs with GDB, you should start GDB in the directory
where the Emacs executable was made (the 'src' directory in the Emacs
source tree). That directory has a .gdbinit file that defines various
"user-defined" commands for debugging Emacs. (These commands are
described below under "Examining Lisp object values" and "Debugging
Emacs Redisplay problems".)
@ -21,7 +21,9 @@ you will see a warning when GDB starts, like this:
warning: File ".../src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
There are several ways to overcome that difficulty, they are all
described in the node "Auto-loading safe path" in the GDB user manual.
described in the node "Auto-loading safe path" in the GDB user
manual. If nothing else helps, type "source /path/to/.gdbinit RET" at
the GDB prompt, to unconditionally load the GDB init file.
** When you are trying to analyze failed assertions or backtraces, it
is essential to compile Emacs with flags suitable for debugging.

View file

@ -61,6 +61,11 @@ when deciding what terminal-specific initialization code to run.
main features that Emacs was compiled with. This is mainly intended
for use in Emacs bug reports.
+++
** A password is now hidden also when typed in batch mode. Another
hiding character but the default `.' can be used by let-binding the
variable `read-hide-char'.
* Editing Changes in Emacs 24.5
@ -115,10 +120,26 @@ protocols as well as for "telnet" and "ftp" are passed to Tramp.
*** New connection method "nc", which allows to access dumb busyboxes.
** VC and related modes
*** New option `vc-annotate-background-mode' controls whether
the color range from `vc-annotate-color-map' is applied to the
background or to the foreground.
** Calculator: decimal display mode uses "," groups, so it's more
fitting for use in money calculations; factorial works with
non-integer inputs.
** HideIfDef mode now support full C/C++ expressions, argumented macro expansions
, interactive macro evaluation and automatic scanning of #defined symbols.
*** New custom variable `hide-ifdef-header-regexp' to define C/C++ header file
name patterns. Default case-insensitive .h, .hh, .hpp and .hxx.
*** New custom variable `hide-ifdef-expand-reinclusion-protection' to prevent
reinclusion protected header files from being fully hidden.
*** New custom variable `hide-ifdef-exclude-define-regexp' to define symbol
name patterns (e.x. all "FOR_DOXYGEN_ONLY_*") to be excluded.
** Obsolete packages
---
@ -178,6 +199,13 @@ permissions set to temporary values (e.g., for creating private files).
** Functions `rmail-delete-forward' and `rmail-delete-backward' take an
optional repeat-count argument.
---
** New utilities in subr-x.el:
*** New macros `if-let' and `when-let' allow defining bindings and to
execute code depending whether all values are true.
*** New macros `thread-first' and `thread-last' allow threading a form
as the first or last argument of subsequent forms.
* Changes in Emacs 24.5 on Non-Free Operating Systems
@ -842,6 +870,22 @@ display a "Homepage" header.)
** In Prolog mode, `prolog-use-smie' has been removed,
along with the non-SMIE indentation code.
** Python mode
*** Out of the box support for CPython, iPython and readline based shells.
**** `python-shell-completion-module-string-code' is no longer used.
*** Automatic shell prompt detection. New user options:
**** `python-shell-interpreter-interactive-arg'.
**** `python-shell-prompt-detect-enabled'.
**** `python-shell-prompt-detect-failure-warning'.
**** `python-shell-prompt-input-regexps'.
**** `python-shell-prompt-output-regexps'.
*** Python shell support for remote hosts via tramp.
*** Correct display of line numbers for code sent to the Python shell.
** Remember
*** The new command `remember-notes' creates a buffer that is saved on exit.
@ -1143,11 +1187,11 @@ The new optional CHECK-TIMERS parameter allows for the prior behavior.
Some languages match those as »...«, and others as «...», so it is
better for Emacs to stay neutral by default.
** `read-event' does not return decoded chars in ttys any more.
As was the case in Emacs 22 and before, the decoding of terminal
input, according to `keyboard-coding-system', is not performed in
`read-event' any more. But unlike in Emacs 22, this decoding is still
done before `input-decode-map', `function-key-map', etc.
** `read-event' does not always decode chars in ttys any more. As was the case
in Emacs 22 and before, `read-event' (and `read-char') by default read raw
bytes from the terminal. If you want to read decoded chars instead (as was
always the case in Emacs-23, for example), pass a non-nil
`inherit-input-method' argument.
** In `symbol-function', nil and "unbound" are indistinguishable.
`symbol-function' does not signal a `void-function' error any more.
@ -1496,10 +1540,13 @@ edited in another Emacs session or by another user. See the node
"Interlocking" in the Emacs User Manual for the details. To disable
file locking, customize `create-lockfiles' to nil.
** The "generate a backtrace on fatal error" feature now works on MS Windows.
** The "generate a backtrace on fatal error" feature now works on MS-Windows.
The backtrace is written to the 'emacs_backtrace.txt' file in the
directory where Emacs was running.
** The `network-interface-list' and `network-interface-info' functions
are now available on MS-Windows.
** The variable `buffer-file-type' is no longer supported.
Setting it has no effect, and %t in the mode-line format is ignored.
Likewise, `file-name-buffer-file-type-alist' is now obsolete, and

View file

@ -1931,6 +1931,16 @@ MSDN:
includes a short description of MSLU and a link where it can be
downloaded.
** Emacs refuses to start on Windows 9X because ctime64 function is missing
This is a sign that Emacs was compiled with MinGW runtime version
4.0.x or later. These versions of runtime call in their startup code
the ctime64 function, which does not exist in MSVCRT.DLL, the C
runtime shared library, distributed with Windows 9X.
A workaround is to build Emacs with MinGW runtime 3.x (the latest
version is 3.20).
** A few seconds delay is seen at startup and for many file operations
This happens when the Net Logon service is enabled. During Emacs
@ -1965,6 +1975,26 @@ Another possibility is to rebuild Emacs with the -shared-libgcc
switch, which will force Emacs to load libgcc_s_dw2-1.dll on startup,
ahead of any optional DLLs loaded on-demand later in the session.
** File selection dialog opens in incorrect directories
Invoking the file selection dialog on Windows 7 or later shows a
directory that is different from what was passed to `read-file-name'
or `x-file-dialog' via their arguments.
This is due to a deliberate change in behavior of the file selection
dialogs introduced in Windows 7. It is explicitly described in the
MSDN documentation of the GetOpenFileName API used by Emacs to pop up
the file selection dialog. For the details, see
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646839%28v=vs.85%29.aspx
The dialog shows the last directory in which the user selected a file
in a previous invocation of the dialog with the same initial
directory.
You can reset this "memory" of that directory by invoking the file
selection dialog with a different initial directory.
** PATH can contain unexpanded environment variables
Old releases of TCC (version 9) and 4NT (up to version 8) do not correctly
@ -2098,7 +2128,7 @@ The function set-time-zone-rule gives incorrect results for many
non-US timezones. This is due to over-simplistic handling of
daylight savings switchovers by the Windows libraries.
** Files larger than 4GB report wrong size
** Files larger than 4GB report wrong size in a 32-bit Windows build
Files larger than 4GB cause overflow in the size (represented as a
32-bit integer) reported by `file-attributes'. This affects Dired as

View file

@ -62,8 +62,7 @@ suitable for anyone from beginners to experts.
** Convert modes that use view-mode to be derived from special-mode instead.
** Major modes should have a menu entry. Examples of modes that do
not have one at the moment and probably should: text-mode, inferior-lisp-mode.
** Major modes should have a menu entry.
** Check if all items on the mode-line have a suitable tooltip for all modes.
@ -141,12 +140,9 @@ for users to customize.
using a heuristic of some kind?
** Define recompute-arg and recompute-arg-if for fix_command to use.
See rms message of 11 Dec 05.
** Height returned by frame-parameter ... and height given to
make-frame does not mean the same thing. The former includes menu and
tool bar lines, the latter don't. frame-parameter should return height
without menu and tool bar lines.
See rms message of 11 Dec 05 in
http://lists.gnu.org/archive/html/emacs-pretest-bug/2005-12/msg00165.html,
and the rest of that discussion.
** In Emacs Info, examples of using Customize should be clickable
and they should create Custom buffers.
@ -167,14 +163,6 @@ http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00782.html
** Find a proper fix for rcirc multiline nick adding.
http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00684.html
** Implement `network-interface-list' and `network-interface-info'
on MS-Windows. Hint: the information is present in the Registry,
under the keys
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Linkage\
and
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<device>\
where <device> is the network device found under the first key.
** Check for any included packages that define obsolete bug-reporting commands.
Change them to use report-emacs-bug.
*** Related functions:
@ -232,8 +220,15 @@ Perspectives also need to interact with the tabs.
** FFI (foreign function interface)
See eg http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00246.html
One way of doing this is to start with fx's dynamic loading, and use it
to implement things like auto-loaded buffer parsers and database
access in cases which need more than Lisp.
** Replace unexec with a more portable form of dumping
See eg http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01034.html
http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00452.html
One way is to provide portable undumping using mmap (per gerd design).
** Imenu could be extended into a file-structure browsing mechanism
using code like that of customize-groups.
@ -260,13 +255,15 @@ scroll bars are extensible.
by http://savannah.nongnu.org/projects/emacs-rtf/, which is still in
very early stages.
Another place to look is the Wikipedia article at
http://en.wikipedia.org/wiki/Rich_Text_Format
It currently points to the latest spec of RTF v1.9.1 at
http://www.microsoft.com/en-us/download/details.aspx?id=10725
** Implement primitive and higher-level functions to allow filling
properly with variable-pitch faces.
** Implement a smoother vertical scroll facility, one that allows
C-v to scroll through a tall image. The primitive operations
posn-at-point and posn-at-x-y should now make it doable in elisp.
** Implement intelligent search/replace, going beyond query-replace
(see http://groups.csail.mit.edu/uid/projects/clustering/chi04.pdf).
@ -301,9 +298,6 @@ specified filters, specified timers, and specified hooks.
Maybe making Lucid menus work like Gtk's (i.e. just force utf-8) is good
enough now that Emacs can encode most chars into utf-8.
** Remove the limitation that window and frame widths and heights can
be only full columns/lines.
** The GNUstep port needs some serious attention, ideally from someone
familiar with GNUstep and Objective C.
@ -317,6 +311,7 @@ http://lists.gnu.org/archive/html/emacs-devel/2009-04/msg00034.html
** Allow frames(terminals) created by emacsclient to inherit their environment
from the emacsclient process.
** Remove the default toggling behavior of minor modes when called from elisp
rather than interactively. This a trivial one-liner in easy-mode.el.
@ -388,23 +383,6 @@ rather than interactively. This a trivial one-liner in easy-mode.el.
user-selected input method, with the default being the union of
latin-1-prefix and latin-1-postfix.
** Switch the Windows port to using Unicode keyboard input (maybe).
Based on http://msdn2.microsoft.com/en-us/library/ms633586.aspx,
this boils down to (1) calling RegisterClassW function to register
Emacs windows, and (2) modifying ALL system messages to use Unicode.
In particular, WM_CHAR messages, which result from keyboard input,
will then come in encoded in UTF-16.
One advantage of switching to Unicode is to toss encoded-kbd usage,
which will solve the problem with binding non-ASCII keys with modifiers.
Problem: using this on Windows 9x/ME requires installing the
Microsoft Layer for Unicode (MSLU), which might not implement all
the required functionality that is available built-in on Windows XP
and later. We should not make this change if it would pressure
users of unauthorized copies of older versions of Windows to
downgrade to versions that require activation.
** Implement a clean way to use different major modes for
different parts of a buffer. This could be useful in editing
Bison input files, for instance, or other kinds of text
@ -452,9 +430,6 @@ rather than interactively. This a trivial one-liner in easy-mode.el.
multiple inheritance ? faster where-is ? no more fix_submap_inheritance ?
what else ?
** Provide real menus on ttys. The MS-DOS implementation can serve as
an example how to do part of this; see the XMenu* functions on msdos.c.
** Implement popular parts of the rest of the CL functions as compiler
macros in cl-macs. [Is this still relevant now that cl-lib exists?]
@ -518,15 +493,9 @@ rather than interactively. This a trivial one-liner in easy-mode.el.
tree displays generally, mode-line mail indicator. [See work done
already for Emacs 23 and consult fx.]
** Do something to make rms happy with fx's dynamic loading, and use it
to implement things like auto-loaded buffer parsers and database
access in cases which need more than Lisp.
** Extend ps-print to deal with multiple font sizes, images, and extra
encodings.
** Provide portable undumping using mmap (per gerd design).
** Make byte-compile avoid binding an expanded defsubst's args
when the body only calls primitives.
@ -735,7 +704,7 @@ preferring the ImageMagick loader? The user might like zooming etc in jpegs.
Try (setq image-type-header-regexps nil) for a quick hack to prefer
ImageMagick over the jpg loader.
*** For some reason its unbearably slow to look at a page in a large
*** For some reason it's unbearably slow to look at a page in a large
image bundle using the :index feature. The ImageMagick "display"
command is also a bit slow, but nowhere near as slow as the Emacs
code. It seems ImageMagick tries to unpack every page when loading the

File diff suppressed because it is too large Load diff

View file

@ -297,7 +297,7 @@ \section{Getting Help}
\key{describe key briefly}{h c}
\key{describe key fully}{h k}
\key{describe function or command}{h f}
\key{read on-line manual}{h i{\rm\enskip or\enskip}\calcprefix i}
\key{read Info manual}{h i{\rm\enskip or\enskip}\calcprefix i}
\key{read full Calc summary}{h s{\rm\enskip or\enskip}\calcprefix s}
\section{Error Recovery}

View file

@ -1,3 +1,40 @@
2014-07-15 Paul Eggert <eggert@cs.ucla.edu>
Use "b" flag more consistently; avoid "t" (Bug#18006).
* make-docfile.c (READ_TEXT): Remove; all uses replaced by "r".
(READ_BINARY): Remove; all uses replaced by "rb".
2014-07-14 Paul Eggert <eggert@cs.ucla.edu>
Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
* etags.c, hexl.c, make-docfile.c:
Include binary-io.h instead of fcntl.h and/or io.h.
(main): Use set_binary_mode or SET_BINARY
in place of handcrafted code.
* etags.c (main) [DOS_NT]:
* movemail.c (main) [WINDOWSNT]:
Don't mess with _fmode.
* etags.c (main, process_file_name, analyse_regex):
Use fopen/popen's "b" flag instead.
* movemail.c (main, popmail): Use open/lk_open/mkostemp's O_BINARY
instead.
2014-07-13 Paul Eggert <eggert@cs.ucla.edu>
* make-docfile.c: Simplify a bit, to simplify further refactoring.
(outfile): Remove static var. All uses changed to use stdout,
since it's always stdout anyway. While we're at it, prefer
putchar/puts/fputs to printf when there are no format strings.
(main): Use freopen rather than fopen, so that stdout is reused.
Move O_BINARY stuff after the freopen, so it affects the
reopened file.
(write_c_args): Omit first arg, since it's always stdout now.
All uses changed.
2014-07-12 Paul Eggert <eggert@cs.ucla.edu>
* etags.c (Lisp_functions): Also record cl-defun etc. (Bug#17965)
2014-06-26 Glenn Morris <rgm@gnu.org>
* Makefile.in (blessmail): Depend on lisp/mail/blessmail.el.

View file

@ -105,17 +105,13 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
#ifdef MSDOS
# undef MSDOS
# define MSDOS true
# include <fcntl.h>
# include <sys/param.h>
# include <io.h>
#else
# define MSDOS false
#endif /* MSDOS */
#ifdef WINDOWSNT
# include <fcntl.h>
# include <direct.h>
# include <io.h>
# define MAXPATHLEN _MAX_PATH
# undef HAVE_NTGUI
# undef DOS_NT
@ -131,6 +127,7 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <binary-io.h>
#include <c-strcase.h>
#include <assert.h>
@ -1002,13 +999,8 @@ main (int argc, char **argv)
linebuffer filename_lb;
bool help_asked = false;
ptrdiff_t len;
char *optstring;
int opt;
#ifdef DOS_NT
_fmode = O_BINARY; /* all of files are treated as binary files */
#endif /* DOS_NT */
char *optstring;
int opt;
progname = argv[0];
nincluded_files = 0;
@ -1195,15 +1187,10 @@ main (int argc, char **argv)
if (streq (tagfile, "-"))
{
tagf = stdout;
#ifdef DOS_NT
/* Switch redirected `stdout' to binary mode (setting `_fmode'
doesn't take effect until after `stdout' is already open). */
if (!isatty (fileno (stdout)))
setmode (fileno (stdout), O_BINARY);
#endif /* DOS_NT */
SET_BINARY (fileno (stdout));
}
else
tagf = fopen (tagfile, append_to_tagfile ? "a" : "w");
tagf = fopen (tagfile, append_to_tagfile ? "ab" : "wb");
if (tagf == NULL)
pfatal (tagfile);
}
@ -1306,7 +1293,7 @@ main (int argc, char **argv)
append_to_tagfile = true;
}
tagf = fopen (tagfile, append_to_tagfile ? "a" : "w");
tagf = fopen (tagfile, append_to_tagfile ? "ab" : "wb");
if (tagf == NULL)
pfatal (tagfile);
put_entries (nodehead); /* write all the tags (CTAGS) */
@ -1547,11 +1534,11 @@ process_file_name (char *file, language *lang)
if (real_name == compressed_name)
{
char *cmd = concat (compr->command, " ", real_name);
inf = (FILE *) popen (cmd, "r");
inf = popen (cmd, "rb");
free (cmd);
}
else
inf = fopen (real_name, "r");
inf = fopen (real_name, "rb");
if (inf == NULL)
{
perror (real_name);
@ -4747,6 +4734,9 @@ Lisp_functions (FILE *inf)
}
}
if (strneq (dbp + 1, "cl-", 3) || strneq (dbp + 1, "CL-", 3))
dbp += 3;
if (strneq (dbp+1, "def", 3) || strneq (dbp+1, "DEF", 3))
{
dbp = skip_non_spaces (dbp);
@ -5611,7 +5601,7 @@ analyse_regex (char *regex_arg)
char *regexfile = regex_arg + 1;
/* regexfile is a file containing regexps, one per line. */
regexfp = fopen (regexfile, "r");
regexfp = fopen (regexfile, "rb");
if (regexfp == NULL)
pfatal (regexfile);
linebuffer_init (&regexbuf);

View file

@ -24,15 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <ctype.h>
#ifdef DOS_NT
#include <fcntl.h>
#if __DJGPP__ >= 2
#include <io.h>
#endif
#endif
#ifdef WINDOWSNT
#include <io.h>
#endif
#include <binary-io.h>
#define DEFAULT_GROUPING 0x01
#define DEFAULT_BASE 16
@ -155,20 +148,12 @@ main (int argc, char **argv)
if (un_flag)
{
char buf[18];
SET_BINARY (fileno (stdout));
#ifdef DOS_NT
#if (__DJGPP__ >= 2) || (defined WINDOWSNT)
if (!isatty (fileno (stdout)))
setmode (fileno (stdout), O_BINARY);
#else
(stdout)->_flag &= ~_IOTEXT; /* print binary */
_setmode (fileno (stdout), O_BINARY);
#endif
#endif
for (;;)
{
register int i, c = 0, d;
int i, c = 0, d;
char buf[18];
#define hexchar(x) (isdigit (x) ? x - '0' : x - 'a' + 10)
@ -210,15 +195,7 @@ main (int argc, char **argv)
}
else
{
#ifdef DOS_NT
#if (__DJGPP__ >= 2) || (defined WINDOWSNT)
if (!isatty (fileno (fp)))
setmode (fileno (fp), O_BINARY);
#else
(fp)->_flag &= ~_IOTEXT; /* read binary */
_setmode (fileno (fp), O_BINARY);
#endif
#endif
SET_BINARY (fileno (fp));
address = 0;
string[0] = ' ';
string[17] = '\0';

View file

@ -38,17 +38,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <stdlib.h> /* config.h unconditionally includes this anyway */
#ifdef MSDOS
#include <fcntl.h>
#endif /* MSDOS */
#ifdef WINDOWSNT
/* Defined to be sys_fopen in ms-w32.h, but only #ifdef emacs, so this
is really just insurance. */
#undef fopen
#include <fcntl.h>
#include <direct.h>
#endif /* WINDOWSNT */
#include <binary-io.h>
#ifdef DOS_NT
/* Defined to be sys_chdir in ms-w32.h, but only #ifdef emacs, so this
is really just insurance.
@ -56,12 +55,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
Similarly, msdos defines this as sys_chdir, but we're not linking with the
file where that function is defined. */
#undef chdir
#define READ_TEXT "rt"
#define READ_BINARY "rb"
#define IS_SLASH(c) ((c) == '/' || (c) == '\\' || (c) == ':')
#else /* not DOS_NT */
#define READ_TEXT "r"
#define READ_BINARY "r"
#define IS_SLASH(c) ((c) == '/')
#endif /* not DOS_NT */
@ -73,9 +68,6 @@ static void write_globals (void);
#include <unistd.h>
/* Stdio stream for output to the DOC file. */
FILE *outfile;
/* Name this program was invoked with. */
char *progname;
@ -135,33 +127,24 @@ main (int argc, char **argv)
progname = argv[0];
outfile = stdout;
/* Don't put CRs in the DOC file. */
#ifdef MSDOS
_fmode = O_BINARY;
#if 0 /* Suspicion is that this causes hanging.
So instead we require people to use -o on MSDOS. */
(stdout)->_flag &= ~_IOTEXT;
_setmode (fileno (stdout), O_BINARY);
#endif
outfile = 0;
#endif /* MSDOS */
#ifdef WINDOWSNT
_fmode = O_BINARY;
_setmode (fileno (stdout), O_BINARY);
#endif /* WINDOWSNT */
/* If first two args are -o FILE, output to FILE. */
i = 1;
if (argc > i + 1 && !strcmp (argv[i], "-o"))
{
outfile = fopen (argv[i + 1], "w");
if (! freopen (argv[i + 1], "w", stdout))
{
perror (argv[i + 1]);
return EXIT_FAILURE;
}
i += 2;
}
if (argc > i + 1 && !strcmp (argv[i], "-a"))
{
outfile = fopen (argv[i + 1], "a");
if (! freopen (argv[i + 1], "a", stdout))
{
perror (argv[i + 1]);
return EXIT_FAILURE;
}
i += 2;
}
if (argc > i + 1 && !strcmp (argv[i], "-d"))
@ -179,8 +162,7 @@ main (int argc, char **argv)
++i;
}
if (outfile == 0)
fatal ("No output file specified", "");
set_binary_mode (fileno (stdout), O_BINARY);
if (generate_globals)
start_globals ();
@ -215,13 +197,11 @@ put_filename (char *filename)
filename = tmp + 1;
}
putc (037, outfile);
putc ('S', outfile);
fprintf (outfile, "%s\n", filename);
printf ("\037S%s\n", filename);
}
/* Read file FILENAME and output its doc strings to outfile. */
/* Return 1 if file is not found, 0 if it is found. */
/* Read file FILENAME and output its doc strings to stdout.
Return 1 if file is not found, 0 if it is found. */
static int
scan_file (char *filename)
@ -232,19 +212,19 @@ scan_file (char *filename)
if (!generate_globals)
put_filename (filename);
if (len > 4 && !strcmp (filename + len - 4, ".elc"))
return scan_lisp_file (filename, READ_BINARY);
return scan_lisp_file (filename, "rb");
else if (len > 3 && !strcmp (filename + len - 3, ".el"))
return scan_lisp_file (filename, READ_TEXT);
return scan_lisp_file (filename, "r");
else
return scan_c_file (filename, READ_TEXT);
return scan_c_file (filename, "r");
}
static void
start_globals (void)
{
fprintf (outfile, "/* This file was auto-generated by make-docfile. */\n");
fprintf (outfile, "/* DO NOT EDIT. */\n");
fprintf (outfile, "struct emacs_globals {\n");
puts ("/* This file was auto-generated by make-docfile. */");
puts ("/* DO NOT EDIT. */");
puts ("struct emacs_globals {");
}
static char input_buffer[128];
@ -373,7 +353,7 @@ scan_keyword_or_put_char (int ch, struct rcsoc_state *state)
/* Skip a C string or C-style comment from INFILE, and return the
character that follows. COMMENT non-zero means skip a comment. If
PRINTFLAG is positive, output string contents to outfile. If it is
PRINTFLAG is positive, output string contents to stdout. If it is
negative, store contents in buf. Convert escape sequences \n and
\t to newline and tab; discard \ followed by newline.
If SAW_USAGE is non-zero, then any occurrences of the string `usage:'
@ -388,7 +368,7 @@ read_c_string_or_comment (FILE *infile, int printflag, int comment, int *saw_usa
state.in_file = infile;
state.buf_ptr = (printflag < 0 ? input_buffer : 0);
state.out_file = (printflag > 0 ? outfile : 0);
state.out_file = (printflag > 0 ? stdout : 0);
state.pending_spaces = 0;
state.pending_newlines = 0;
state.keyword = (saw_usage ? "usage:" : 0);
@ -465,18 +445,18 @@ read_c_string_or_comment (FILE *infile, int printflag, int comment, int *saw_usa
/* Write to file OUT the argument names of function FUNC, whose text is in BUF.
/* Write to stdout the argument names of function FUNC, whose text is in BUF.
MINARGS and MAXARGS are the minimum and maximum number of arguments. */
static void
write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs)
write_c_args (char *func, char *buf, int minargs, int maxargs)
{
register char *p;
int in_ident = 0;
char *ident_start IF_LINT (= NULL);
size_t ident_length = 0;
fprintf (out, "(fn");
fputs ("(fn", stdout);
if (*buf == '(')
++buf;
@ -517,10 +497,10 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs)
if (strncmp (ident_start, "void", ident_length) == 0)
continue;
putc (' ', out);
putchar (' ');
if (minargs == 0 && maxargs > 0)
fprintf (out, "&optional ");
fputs ("&optional ", stdout);
minargs--;
maxargs--;
@ -528,7 +508,7 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs)
/* In C code, `default' is a reserved word, so we spell it
`defalt'; demangle that here. */
if (ident_length == 6 && memcmp (ident_start, "defalt", 6) == 0)
fprintf (out, "DEFAULT");
fputs ("DEFAULT", stdout);
else
while (ident_length-- > 0)
{
@ -539,12 +519,12 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs)
else if (c == '_')
/* Print underscore as hyphen. */
c = '-';
putc (c, out);
putchar (c);
}
}
}
putc (')', out);
putchar (')');
}
/* The types of globals. These are sorted roughly in decreasing alignment
@ -613,8 +593,8 @@ compare_globals (const void *a, const void *b)
static void
close_emacs_globals (void)
{
fprintf (outfile, "};\n");
fprintf (outfile, "extern struct emacs_globals globals;\n");
puts ("};");
puts ("extern struct emacs_globals globals;");
}
static void
@ -641,7 +621,7 @@ write_globals (void)
if (!seen_defun)
{
close_emacs_globals ();
fprintf (outfile, "\n");
putchar ('\n');
seen_defun = 1;
}
break;
@ -651,9 +631,9 @@ write_globals (void)
if (type)
{
fprintf (outfile, " %s f_%s;\n", type, globals[i].name);
fprintf (outfile, "#define %s globals.f_%s\n",
globals[i].name, globals[i].name);
printf (" %s f_%s;\n", type, globals[i].name);
printf ("#define %s globals.f_%s\n",
globals[i].name, globals[i].name);
}
else
{
@ -664,16 +644,16 @@ write_globals (void)
|| strcmp (globals[i].name, "Fkill_emacs") == 0
|| strcmp (globals[i].name, "Fexit_recursive_edit") == 0
|| strcmp (globals[i].name, "Fabort_recursive_edit") == 0)
fprintf (outfile, "_Noreturn ");
fputs ("_Noreturn ", stdout);
fprintf (outfile, "EXFUN (%s, ", globals[i].name);
printf ("EXFUN (%s, ", globals[i].name);
if (globals[i].value == -1)
fprintf (outfile, "MANY");
fputs ("MANY", stdout);
else if (globals[i].value == -2)
fprintf (outfile, "UNEVALLED");
fputs ("UNEVALLED", stdout);
else
fprintf (outfile, "%d", globals[i].value);
fprintf (outfile, ")");
printf ("%d", globals[i].value);
putchar (')');
/* It would be nice to have a cleaner way to deal with these
special hacks, too. */
@ -681,9 +661,9 @@ write_globals (void)
|| 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");
fputs (" ATTRIBUTE_CONST", stdout);
fprintf (outfile, ";\n");
puts (";");
}
while (i + 1 < num_globals
@ -952,9 +932,7 @@ scan_c_file (char *filename, const char *mode)
int comment = c != '"';
int saw_usage;
putc (037, outfile);
putc (defvarflag ? 'V' : 'F', outfile);
fprintf (outfile, "%s\n", input_buffer);
printf ("\037%c%s\n", defvarflag ? 'V' : 'F', input_buffer);
if (comment)
getc (infile); /* Skip past `*'. */
@ -996,8 +974,8 @@ scan_c_file (char *filename, const char *mode)
while (c != ')');
*p = '\0';
/* Output them. */
fprintf (outfile, "\n\n");
write_c_args (outfile, input_buffer, argbuf, minargs, maxargs);
fputs ("\n\n", stdout);
write_c_args (input_buffer, argbuf, minargs, maxargs);
}
else if (defunflag && maxargs == -1 && !saw_usage)
/* The DOC should provide the usage form. */
@ -1433,12 +1411,10 @@ scan_lisp_file (const char *filename, const char *mode)
In the latter case, the opening quote (and leading backslash-newline)
have already been read. */
putc (037, outfile);
putc (type, outfile);
fprintf (outfile, "%s\n", buffer);
printf ("\037%c%s\n", type, buffer);
if (saved_string)
{
fputs (saved_string, outfile);
fputs (saved_string, stdout);
/* Don't use one dynamic doc string twice. */
free (saved_string);
saved_string = 0;

View file

@ -191,11 +191,6 @@ main (int argc, char **argv)
uid_t real_gid = getgid ();
uid_t priv_gid = getegid ();
#ifdef WINDOWSNT
/* Ensure all file i/o is in binary mode. */
_fmode = _O_BINARY;
#endif
delete_lockname = 0;
while ((c = getopt (argc, argv, ARGSTR)) != EOF)
@ -304,7 +299,7 @@ main (int argc, char **argv)
memcpy (tempname, inname, inname_dirlen);
strcpy (tempname + inname_dirlen, "EXXXXXX");
desc = mkostemp (tempname, 0);
desc = mkostemp (tempname, O_BINARY);
if (desc < 0)
{
int mkostemp_errno = errno;
@ -358,12 +353,12 @@ main (int argc, char **argv)
#ifndef MAIL_USE_MMDF
#ifdef MAIL_USE_SYSTEM_LOCK
indesc = open (inname, O_RDWR);
indesc = open (inname, O_RDWR | O_BINARY);
#else /* if not MAIL_USE_SYSTEM_LOCK */
indesc = open (inname, O_RDONLY);
indesc = open (inname, O_RDONLY | O_BINARY);
#endif /* not MAIL_USE_SYSTEM_LOCK */
#else /* MAIL_USE_MMDF */
indesc = lk_open (inname, O_RDONLY, 0, 0, 10);
indesc = lk_open (inname, O_RDONLY | O_BINARY, 0, 0, 10);
#endif /* MAIL_USE_MMDF */
if (indesc < 0)
@ -372,7 +367,7 @@ main (int argc, char **argv)
/* Make sure the user can read the output file. */
umask (umask (0) & 0377);
outdesc = open (outname, O_WRONLY | O_CREAT | O_EXCL, 0666);
outdesc = open (outname, O_WRONLY | O_BINARY | O_CREAT | O_EXCL, 0666);
if (outdesc < 0)
pfatal_with_name (outname);
@ -675,7 +670,7 @@ popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse
return EXIT_SUCCESS;
}
mbfi = open (outfile, O_WRONLY | O_CREAT | O_EXCL, 0666);
mbfi = open (outfile, O_WRONLY | O_BINARY | O_CREAT | O_EXCL, 0666);
if (mbfi < 0)
{
pop_close (server);

View file

@ -38,7 +38,7 @@
#include <string.h> /* For the real memcpy prototype. */
#if DEBUG
#if defined DEBUG && DEBUG
# include <stdio.h>
# include <stdlib.h>
/* Make it work even if the system's libc has its own mktime routine. */
@ -600,7 +600,7 @@ libc_hidden_def (mktime)
libc_hidden_weak (timelocal)
#endif
#if DEBUG
#if defined DEBUG && DEBUG
static int
not_equal_tm (const struct tm *a, const struct tm *b)

View file

@ -1,3 +1,804 @@
2014-07-30 Christophe Deleuze <christophe.deleuze@free.fr> (tiny change)
* calendar/icalendar.el (icalendar--decode-isodatetime): Use
actual current-time-zone when converting to local time. (Bug#15408)
2014-07-29 Martin Rudalics <rudalics@gmx.at>
* window.el (window--state-put-2): Handle horizontal scroll
bars, if present.
2014-07-29 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
* menu-bar.el (menu-bar-update-buffers): Update item list format
in `buffers-menu' to confirm with changes to `get_keyelt'
(r117463). (Bug#18016)
2014-07-28 Fabián Ezequiel Gallina <fgallina@gnu.org>
* progmodes/python.el (inferior-python-mode): Make input prompts
read-only.
2014-07-28 Emilio C. Lopes <eclig@gmx.net>
* net/tramp-sh.el (tramp-get-remote-python): Also search for
executables named "python2" or "python3".
(tramp-get-remote-uid-with-python): Use parentheses around
arguments to `print' to make it compatible with Python 3.
(tramp-get-remote-gid-with-python): Ditto. (Bug#18118)
2014-07-28 Eli Zaretskii <eliz@gnu.org>
* window.el (window--pixel-to-total): Use FRAME's root window, not
that of the selected frame. (Bug#18112, Bug#16674)
2014-07-28 Andreas Schwab <schwab@linux-m68k.org>
* textmodes/tex-mode.el (tex-font-lock-verb): Doc fix.
(Bug#18117)
2014-07-28 Fabián Ezequiel Gallina <fgallina@gnu.org>
* progmodes/python.el (inferior-python-mode): Doc fix.
2014-07-28 Stephen Berman <stephen.berman@gmx.net>
* calendar/todo-mode.el (todo-edit-item--next-key): If next key is
not a character, ignore it instead of raising an error.
* calendar/todo-mode.el: Fix handling of marked items and make
minor code improvements.
(todo-edit-item): If there are marked items, ensure user can only
invoke editing commands that work with marked items.
(todo-edit-item--text): When there are marked items, make it a
noop if invoked with point not on an item; otherwise, ensure it
applies only to item at point.
(todo-item-undone): If there are marked not-done items, return
point to its original position before signaling user error.
(todo--user-error-if-marked-done-item): New function.
(todo-edit-item--header, todo-edit-item--diary-inclusion)
(todo-item-done): Use it.
2014-07-28 Glenn Morris <rgm@gnu.org>
* files.el (toggle-read-only): Re-add basic doc-string.
* vc/vc-hooks.el (vc-toggle-read-only): Tweak obsolescence mesage.
* progmodes/prolog.el (prolog-mode-keybindings-edit):
Replace missing `switch-to-prolog' with `run-prolog'.
(switch-to-prolog): Define as (obsolete) alias, as in 23.4.
2014-07-28 Stephen Berman <stephen.berman@gmx.net>
* calendar/todo-mode.el (todo-set-top-priorities): Fix overwriting
of file-wide setting when changing category-wide setting.
2014-07-28 Stephen Berman <stephen.berman@gmx.net>
* doc-view.el (doc-view-open-text): Don't require that the
document is saved in a file (e.g., email attachment).
2014-07-28 Fabián Ezequiel Gallina <fgallina@gnu.org>
Parse completion input in a iPython friendly way. (Bug#18084)
* progmodes/python.el
(python-shell-completion-at-point): Rename from
python-shell-completion-complete-at-point.
(inferior-python-mode): Use it.
(python-completion-at-point): Rename from
python-completion-complete-at-point. Parse input up to first
backward occurrence of whitespace, open-paren, close-paren or
string delimiter.
(python-mode): Use it.
2014-07-28 Fabián Ezequiel Gallina <fgallina@gnu.org>
Prevent Python process shell buffer to pop twice.
* progmodes/python.el (python-shell-switch-to-shell): Do not call
pop-to-buffer.
2014-07-28 Fabián Ezequiel Gallina <fgallina@gnu.org>
* progmodes/python.el
(python-shell-with-shell-buffer): New macro.
(python-shell-font-lock-get-or-create-buffer)
(python-shell-font-lock-kill-buffer)
(python-shell-font-lock-with-font-lock-buffer)
(python-shell-font-lock-cleanup-buffer)
(python-shell-font-lock-toggle): Use it.
(python-shell-font-lock-turn-on)
(python-shell-font-lock-turn-off): Use it. Make command.
2014-07-28 Fabián Ezequiel Gallina <fgallina@gnu.org>
Grab all Python process output before inferior-python-mode hooks.
* progmodes/python.el (inferior-python-mode): Call
accept-process-output and sit-for to ensure all output for process
has been received before running hooks.
(python-shell-internal-get-or-create-process): Cleanup
accept-process-output and sit-for calls.
2014-07-28 Fabián Ezequiel Gallina <fgallina@gnu.org>
More robust shell startup and code setup.
* progmodes/python.el (python-shell-make-comint): Remove
accept-process-output call.
(python-shell-get-buffer): Return current buffer if major-mode is
inferior-python-mode.
(python-shell-get-or-create-process): Use it.
(python-shell-send-setup-code): Send all setup code in one string,
output success message and accept-process-output.
2014-07-27 Eli Zaretskii <eliz@gnu.org>
* scroll-bar.el (scroll-bar-toolkit-horizontal-scroll): Add
rudimentary support for bidirectional text.
2014-07-27 Martin Rudalics <rudalics@gmx.at>
* frame.el (frame-notice-user-settings): Rewrite using
frame-initial-frame-tool-bar-height.
* menu-bar.el (menu-bar-horizontal-scroll-bar)
(menu-bar-no-horizontal-scroll-bar): New functions.
(menu-bar-showhide-scroll-bar-menu): Add bindings for horizontal
scroll bars.
* scroll-bar.el (scroll-bar-lines)
(set-horizontal-scroll-bar-mode)
(get-horizontal-scroll-bar-mode, horizontal-scroll-bar-mode)
(scroll-bar-horizontal-drag-1, scroll-bar-horizontal-drag)
(scroll-bar-toolkit-horizontal-scroll): New functions.
(horizontal-scroll-bar-mode)
(previous-horizontal-scroll-bar-mode)
(horizontal-scroll-bar-mode-explicit): New variables.
(horizontal-scroll-bar-mode): New option.
(toggle-horizontal-scroll-bar): Do something.
(top-level): Bind horizontal-scroll-bar mouse-1.
* startup.el (tool-bar-originally-present): Remove variable.
(command-line): Don't set tool-bar-originally-present.
* window.el (window-min-height): Update doc-string.
(window--dump-frame): Dump horizontal scroll bar values.
(window--min-size-1): Handle minibuffer window separately.
Count in margins and horizontal scroll bar. Return safe value
iff IGNORE equals 'safe.
(frame-windows-min-size): New function (used by frame resizing
routines).
(fit-frame-to-buffer, fit-window-to-buffer): Count in horizontal
scroll bars.
(window--sanitize-window-sizes): New function.
(window-split-min-size): Remove.
(split-window): Count divider-width. Don't use
`window-split-min-size' any more. Reword error messages.
Sanitize windows sizes after splitting.
2014-07-27 Thien-Thi Nguyen <ttn@gnu.org>
Use `defvar-local' more.
* progmodes/hideshow.el
(hs-c-start-regexp, hs-block-start-regexp)
(hs-block-start-mdata-select, hs-block-end-regexp)
(hs-forward-sexp-func, hs-adjust-block-beginning): ...here;
remove corresponding `make-variable-buffer-local' top-level calls.
2014-07-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
Cleanup error signals. (Bug#18067)
* progmodes/python.el
(python-indent-shift-left): Use user-error instead.
(python-shell-prompt-detect): Use lwarn with python group.
(python-completion-complete-at-point)
(python-eldoc--get-doc-at-point): Don't signal error.
2014-07-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
Support for packages in Python shell. (Bug#13570)
* progmodes/python.el (python-shell--package-depth): New var.
(python-shell-package-enable): New command.
(python-util-list-directories, python-util-list-files)
(python-util-list-packages): New functions.
2014-07-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
Faster comint output. (Bug#16875)
* progmodes/python.el:
(python-comint-output-filter-function): Make obsolete.
(python-comint-postoutput-scroll-to-bottom): New function.
(inferior-python-mode): Set comint-output-filter-functions to a
minimum.
2014-07-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
* progmodes/python.el (python-shell-font-lock-post-command-hook):
Safeguard current point and undo history.
2014-07-26 Fabián Ezequiel Gallina <fgallina@gnu.org>
Robust shell syntax highlighting. (Bug#18084, Bug#16875)
* progmodes/python.el:
(python-shell-prompt-input-regexps): Add iPython block prompt.
(python-shell-output-syntax-table): Delete var.
(python-shell-font-lock-with-font-lock-buffer): New macro.
(python-shell-font-lock-get-or-create-buffer)
(python-shell-font-lock-kill-buffer)
(python-shell-font-lock-cleanup-buffer)
(python-shell-font-lock-post-command-hook)
(python-shell-font-lock-turn-off): New functions.
(python-shell-font-lock-turn-on): New function.
(inferior-python-mode): Use it.
(python-shell-font-lock-toggle): New command.
(python-shell-font-lock-enable): Rename from
python-shell-enable-font-lock.
(run-python-internal): Use it.
(python-shell-font-lock-comint-output-filter-function): New function.
(python-shell-comint-end-of-output-p): New function.
(python-shell-output-filter): Use it.
(python-util-comint-last-prompt): New function.
(python-util-text-properties-replace-name): New function.
2014-07-25 Glenn Morris <rgm@gnu.org>
* vc/ediff-init.el (ediff-toggle-read-only-function):
* vc/ediff-util.el (ediff-toggle-read-only):
Replace obsolete toggle-read-only with read-only-mode.
2014-07-24 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-cache.el (tramp-flush-file-function): Wrap the code
with `save-match-data'. (Bug#18095)
2014-07-21 Vincent Belaïche <vincentb1@users.sourceforge.net>
* ses.el (ses-truncate-cell): Use cl-progv instead of eval in
order to ensure that row and col are lexically bound inside the
evaluated sexp.
2014-07-21 Glenn Morris <rgm@gnu.org>
* progmodes/hideif.el (hide-ifdef-mode-submap):
Also substitute read-only-mode.
* bindings.el (mode-line-toggle-read-only):
* bs.el (bs-toggle-readonly):
* buff-menu.el (Buffer-menu-toggle-read-only):
* dired.el (dired-toggle-read-only):
* files.el (view-read-only, find-file-read-only)
(find-file-read-only-other-window)
(find-file-read-only-other-frame):
* progmodes/hideif.el (hide-ifdef-toggle-outside-read-only):
Doc fixes re toggle-read-only.
2014-07-21 Fabián Ezequiel Gallina <fgallina@gnu.org>
* progmodes/python.el: Add comment about pipe buffering and
solutions for missing/delayed output in inferior Python shells.
(Bug#17304)
* progmodes/python.el (python-mode): Don't set
mode-require-final-newline. (Bug#17990)
Make python.el work with IPython automatically. (Bug#15510)
* progmodes/python.el:
(python-shell-completion-setup-code): New value supporting iPython.
(python-shell-completion-string-code): New value supporting iPython.
(python-shell-completion-get-completions): Use them.
(python-shell-completion-module-string-code): Make obsolete.
(python-shell-prompt-input-regexps)
(python-shell-prompt-output-regexps): Add safeguard for ipdb.
(python-shell-output-filter): Fix comment typo.
Fix Python shell prompts detection for remote hosts.
* progmodes/python.el (python-shell-prompt-detect): Replace
call-process with process-file and make it more robust.
Autodetect Python shell prompts. (Bug#17370)
* progmodes/python.el:
(python-shell-interpreter-interactive-arg)
(python-shell-prompt-detect-enabled)
(python-shell-prompt-detect-failure-warning)
(python-shell-prompt-input-regexps)
(python-shell-prompt-output-regexps): New vars.
(python-shell-prompt-calculated-input-regexp)
(python-shell-prompt-calculated-output-regexp): New vars.
(python-shell-get-process-name)
(python-shell-internal-get-process-name)
(python-shell-output-filter)
(python-shell-completion-get-completions): Use them.
(python-shell-prompt-detect)
(python-shell-prompt-validate-regexps): New functions.
(python-shell-prompt-set-calculated-regexps): New function.
(inferior-python-mode): Use it. Also honor overriden
python-shell-interpreter and python-shell-interpreter-args.
(python-shell-make-comint): Honor overriden
python-shell-interpreter and python-shell-interpreter-args.
(python-shell-get-or-create-process): Make it testable by allowing
to call run-python non-interactively.
(python-util-valid-regexp-p): New function.
(python-shell-prompt-regexp, python-shell-prompt-block-regexp)
(python-shell-prompt-output-regexp)
(python-shell-prompt-pdb-regexp): Use it as defcustom :safe.
2014-07-21 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/smie.el (smie-config--guess-1): Split from
smie-config--guess.
(smie-config--guess): Use it.
* emacs-lisp/edebug.el: Use nadvice.
(edebug-original-read): Remove.
(edebug--read): Rename from edebug-read and add `orig' arg.
(edebug-uninstall-read-eval-functions)
(edebug-install-read-eval-functions): Use nadvice.
(edebug-read-sexp, edebug-read-storing-offsets, edebug-read-symbol)
(edebug-read-and-maybe-wrap-form1, edebug-instrument-callee)
(edebug-read-string, edebug-read-function): Use just `read'.
(edebug-original-debug-on-entry): Remove.
(edebug--debug-on-entry): Rename from edebug-debug-on-entry and add
`orig' arg.
(debug-on-entry): Override with nadvice.
* mouse.el (tear-off-window): Rename from mouse-tear-off-window since
it also makes sense to bind it to a non-mouse event.
* vc/vc-bzr.el (vc-bzr-shelve): Make it operate on fileset.
2014-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
* xt-mouse.el (xterm-mouse-event): Don't assume last-click is non-nil
(bug#18015).
* rect.el (rectangle--string-preview): Don't assume there
a non-nil default (bug#17984).
2014-07-16 Glenn Morris <rgm@gnu.org>
* desktop.el (after-init-hook): Disable startup frame restoration
in non-graphical situations. (Bug#17693)
* vc/vc-dispatcher.el (vc-log-edit): Do set up the log buffer
if it was "empty", or used for a different set of files. (Bug#17884)
2014-07-16 Eli Zaretskii <eliz@gnu.org>
* bindings.el (mode-line-remote): If default-directory is not a
string, don't call file-remote-p on it; instead state in the
help-echo that it is nil. (Bug#17986)
2014-07-14 Daniel Colascione <dancol@dancol.org>
* progmodes/cc-langs.el: Change comments from `cl-macroexpand-all'
to `macroexpand-all'
* progmodes/cc-defs.el (c-lang-defconst-eval-immediately):
Use `macroexpand-all' instead of `cl-macroexpand-all'.
2014-07-12 Paul Eggert <eggert@cs.ucla.edu>
Fix bug: C-x v v discarded existing log message (Bug#17884).
* vc/vc-dispatcher.el (vc-log-edit):
Don't clobber an already-existing log message.
2014-07-12 Glenn Morris <rgm@gnu.org>
* vc/log-edit.el (log-edit-changelog-entries):
Check for a visited-but-never-saved ChangeLog.
2014-07-12 Stefan Monnier <monnier@iro.umontreal.ca>
* vc/log-edit.el (log-edit-changelog-entries): Don't both visiting
a non-existing file (bug#17970).
* faces.el (face-name): Undo last change.
(x-resolve-font-name): Don't call face-name (bug#17956).
2014-07-12 Fabián Ezequiel Gallina <fgallina@gnu.org>
Fix dedenters and electric colon handling. (Bug#15163)
* progmodes/python.el
(python-rx-constituents): Add dedenter and block-ender.
(python-indent-dedenters, python-indent-block-enders): Delete.
(python-indent-context): Return new case for dedenter-statement.
(python-indent-calculate-indentation): Handle new case.
(python-indent-calculate-levels): Fix levels calculation for
dedenter statements.
(python-indent-post-self-insert-function): Fix colon handling.
(python-info-dedenter-opening-block-message): New function.
(python-indent-line): Use it.
(python-info-closing-block)
(python-info-closing-block-message): Remove.
(python-info-dedenter-opening-block-position)
(python-info-dedenter-opening-block-positions)
(python-info-dedenter-statement-p): New functions.
2014-07-11 Dmitry Antipov <dmantipov@yandex.ru>
* files.el (out-of-memory-warning-percentage): New defcustom.
(warn-maybe-out-of-memory): Use it.
2014-07-11 Michael Albinus <michael.albinus@gmx.de>
* subr.el (read-passwd): Use `read-hide-char' if non-nil. Bind it
when calling `read-string'. (Bug#17839)
2014-07-10 Eli Zaretskii <eliz@gnu.org>
* files.el (warn-maybe-out-of-memory): Fix the wording of the
warning.
2014-07-10 Dmitry Antipov <dmantipov@yandex.ru>
* files.el (warn-maybe-out-of-memory): New function.
(find-file-noselect): Use it.
2014-07-09 Sam Steingold <sds@gnu.org>
* progmodes/cperl-mode.el (cperl-block-p): Treat the perl keyword
`constant' like `bless', `return' &c
2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
* rect.el (apply-on-rectangle): Check forward-line really moved to the
next line.
2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/sh-script.el (sh-smie-sh-rules): Don't align with a && in
the middle of a line (bug#17896).
2014-07-09 Juri Linkov <juri@jurta.org>
* startup.el (command-line): Append displaying the warning about
the errors in the init file to the end of `after-init-hook'.
(Bug#17927)
* faces.el (face-name): Return input arg `face' as-is
when it's not a symbol.
(x-resolve-font-name): Don't check if the face is a symbol.
(Bug#17956)
* facemenu.el (list-colors-print): In help-echo format use %.2f
instead of %d because now HSV values are floating-point components
between 0.0 and 1.0.
2014-07-09 Glenn Morris <rgm@gnu.org>
* emulation/cua-rect.el (cua--activate-rectangle):
Avoid setting cua--rectangle to nil. (Bug#17877)
2014-07-09 Stephen Berman <stephen.berman@gmx.net>
* calendar/todo-mode.el: Fix wrong-type-argument error when
marking multiple consecutive items.
(todo-toggle-mark-item): Don't try to mark the empty lines at the
end of the todo and done items sections. Note in doc string that
items marked by passing a numeric prefix argument can include the
last todo and first done items.
(todo-mark-category): Don't try to mark the empty line between the
todo and done items sections.
2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/edebug.el (edebug-eval-defun): Print result using
proper Lisp quoting (bug#17934).
* progmodes/ruby-mode.el (ruby-mode-variables): Don't meddle with
require-final-newline since prog-mode already took care of it (bug#17947).
2014-07-09 Stephen Berman <stephen.berman@gmx.net>
* calendar/todo-mode.el: Fix two bugs. Shorten Commentary and
refer to the Todo mode Info manual. Update the comment on
requiring cl-lib.
(todo-find-filtered-items-file): Add todo-prefix overlays.
(todo-filter-items): Reorder a let-bound variable to avoid a
wrong-type-argument error on canceling the file choice dialog.
2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/octave.el (inferior-octave-mode):
Set comint-input-ring-size to a number (bug#17912).
2014-07-09 Juri Linkov <juri@jurta.org>
* desktop.el (desktop-minor-mode-table): Add `defining-kbd-macro'
and `isearch-mode' associated with nil. (Bug#17849)
2014-07-08 Stefan Monnier <monnier@iro.umontreal.ca>
* linum.el (linum--face-height): New function (bug#17813).
(linum-update-window): Use it to adjust margin to linum's width.
* leim/quail/sisheng.el (sisheng-list): Don't bother with-case-table.
* eshell/em-smart.el (eshell-smart-scroll-window): Use
with-selected-window.
* xt-mouse.el (xterm-mouse-translate-1): Intern drag event (bug#17894).
Remove also pointless window&mark manipulation.
* progmodes/perl-mode.el: Use syntax-ppss; fix one indentation case.
(perl-indent-line): Use syntax-ppss to detect we're in a doc-section.
(perl-continuation-line-p): Don't skip over anything else than labels.
Return the previous char.
(perl-calculate-indent): Use syntax-ppss instead of parse-start
and update callers accordingly. For continuation lines, check the
the case of array hashes.
(perl-backward-to-noncomment): Make it non-interactive.
(perl-backward-to-start-of-continued-exp): Rewrite.
2014-07-08 Sam Steingold <sds@gnu.org>
* progmodes/inf-lisp.el (lisp-eval-paragraph, lisp-eval-form-and-next):
New user commands.
2014-07-08 Juri Linkov <juri@jurta.org>
* vc/vc-annotate.el (vc-annotate-background-mode): New defcustom.
(vc-annotate-color-map): Use less saturated colors (20%) for
background-mode.
(vc-annotate-very-old-color): Add default value for background-mode.
(vc-annotate-background): Set default value to nil since now text on
the default backgrounds should be legible in light and dark modes.
(vc-annotate-lines): Use `vc-annotate-background-mode'. Doc fix.
(Bug#17808)
2014-07-08 Juri Linkov <juri@jurta.org>
* simple.el (transpose-chars): Don't move point into read-only area.
(Bug#17829)
2014-07-08 Juri Linkov <juri@jurta.org>
* window.el (with-displayed-buffer-window): New macro.
(with-temp-buffer-window, with-current-buffer-window):
Use `macroexp-let2' to evaluate and bind variables
in the same order as macro arguments.
(display-buffer--action-function-custom-type):
Add `display-buffer-below-selected' and `display-buffer-at-bottom'.
* minibuffer.el (minibuffer-completion-help): Replace
`with-output-to-temp-buffer' with `with-displayed-buffer-window'
with actions that display *Completions* at-bottom when called
from the minibuffer, or below-selected in a normal buffer.
Associate `window-height' with `fit-window-to-buffer'.
Let-bind `pop-up-windows' to nil.
* dired.el (dired-mark-pop-up): Use `with-displayed-buffer-window'
instead of `with-current-buffer-window'. (Bug#17809)
2014-07-07 Luke Lee <luke.yx.lee@gmail.com>
* progmodes/hideif.el (hide-ifdef-env): Change to global.
(hide-ifdef-env-backup): New variable.
(hide-ifdef-expand-reinclusion-protection, hide-ifdef-header-regexp):
New customizable variables.
(hif-clear-all-ifdef-defined): New defun.
(hif-merge-ifdef-region, hide-ifdef-region-internal, hide-ifdef-region)
(hif-show-ifdef-region): Merge hidden regions to prevent continuous "...".
(hif-tokenize): Fix for MS-DOS/Win EOL style.
(hif-endif-to-ifdef, hif-make-range, hif-find-range, hif-possibly-hide):
Fix bug to hide the correct #elif region(s).
(hif-range-elif): New defun.
(hif-recurse-level): New var.
(hif-evaluate-region, hif-evaluate-macro): New defun.
(hide-ifdef-guts): Prevent reinclusion protected C/C++ headers from
fully hidden.
(hide-ifdef-define, hide-ifdefs, hide-ifdef-block, show-ifdef-block):
Better interaction.
2014-07-04 Michael Albinus <michael.albinus@gmx.de>
* net/dbus.el (dbus-peer-handler): New defun.
(dbus-register-service): Register it. (Bug#17858)
(dbus-managed-objects-handler): Fix docstring.
2014-07-04 Phil Sainty <psainty@orcon.net.nz> (tiny change)
* emacs-lisp/lisp.el (narrow-to-defun-include-comments): New var.
(narrow-to-defun): New arg include-comments, defaulting to it
(bug#16328).
2014-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
* rect.el (rectangle--highlight-for-redisplay): Don't pass `orig' with
different calling convention to rectangle--unhighlight-for-redisplay.
2014-07-03 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-call-process): Handle error strings.
* net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'.
* net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime)
(tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'.
* net/trampver.el: Update release number.
2014-07-03 Juri Linkov <juri@jurta.org>
* desktop.el (desktop-save): Rename arg `auto-save' to
`only-if-changed'. Doc fix. (Bug#17873)
2014-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
* mouse.el (mouse-yank-primary, mouse-yank-secondary):
Use insert-for-yank (bug#17271).
2014-07-03 Leo Liu <sdl.web@gmail.com>
* emacs-lisp/pp.el (pp-eval-expression, pp-eval-last-sexp):
Support lexical-binding.
2014-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
* vc/log-edit.el (log-edit-goto-eoh): New function.
(log-edit--match-first-line): Use it (bug#17861).
2014-07-03 Glenn Morris <rgm@gnu.org>
* vc/log-edit.el (log-edit-hook): Add missing :version.
2014-07-03 Fabián Ezequiel Gallina <fgallina@gnu.org>
* progmodes/python.el (python-indent-post-self-insert-function):
Enhancements to electric indentation behavior inside
parens. (Bug#17658)
2014-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
* ps-def.el (ps-generate-postscript-with-faces1): Don't mess with
buffer-invisibility-spec (bug#17867).
2014-07-03 Andreas Schwab <schwab@linux-m68k.org>
* vc/vc-git.el (vc-git-checkin): When operating on the whole tree
pass "-a".
2014-07-03 Glenn Morris <rgm@gnu.org>
* cus-edit.el (help):
* finder.el (finder-known-keywords):
* help.el (help-for-help-internal):
* vc/ediff-mult.el (ediff-meta-buffer-verbose-message)
(ediff-redraw-registry-buffer):
* vc/ediff-ptch.el (ediff-patch-file-internal):
Doc fixes re "online" help. (Bug#17803)
* progmodes/idlwave.el (idlwave): Update url-link for custom group.
(idlwave-mode): Doc URL update.
2014-07-01 Juri Linkov <juri@jurta.org>
* man.el: Display man pages immediately and use process-filter
to format them asynchronously.
(Man-width): Doc fix.
(man): Doc fix.
(Man-start-calling): Use `with-selected-window' to get
`frame-width' and `window-width'.
(Man-getpage-in-background): Call `Man-notify-when-ready'
immediately after creating a new buffer. Call `Man-mode' and set
`mode-line-process' in the created buffer. Set process-filter to
`Man-bgproc-filter' in start-process branch. In call-process branch
call either `Man-fontify-manpage' or `Man-cleanup-manpage'.
Use `Man-start-calling' inside `with-current-buffer'.
(Man-fontify-manpage): Don't print messages. Fix boundary condition.
(Man-cleanup-manpage): Don't print messages.
(Man-bgproc-filter): New function.
(Man-bgproc-sentinel): Add `save-excursion' to keep point when
user moved it during asynchronous formatting. Move calls of
`Man-fontify-manpage' and `Man-cleanup-manpage' to
`Man-bgproc-filter'. Move the call of `Man-mode' to
`Man-getpage-in-background'. Use `quit-restore-window'
instead of `kill-buffer'. Use `message' instead of `error'
because errors are caught by process sentinel.
(Man-mode): Move calls of `Man-build-page-list',
`Man-strip-page-headers', `Man-unindent', `Man-goto-page' to
`Man-bgproc-sentinel'. Doc fix. (Bug#2588, bug#5054, bug#9084, bug#17831)
* man.el (Man-bgproc-sentinel): Use `Man-page-from-arguments'
for the message about the man page cleaned up.
2014-07-01 Mario Lang <mlang@delysid.org>
* net/gnutls.el (gnutls-negotiate): Prevent destructive modification of
cosutomization option `gnutls-verify-error'.
2014-07-01 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (deactivate-mark, set-mark-command, handle-shift-selection):
Don't keep transient-mark-mode buffer-local when not needed (bug#6316).
* xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal): Don't burp if the terminal
is suspended (bug#17857).
2014-07-01 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Prefer utf-8 coding. (Bug#17859)
2014-06-30 Fabián Ezequiel Gallina <fgallina@gnu.org>
* emacs-lisp/subr-x.el (string-reverse): Define as obsolete alias
for `reverse'.
2014-06-30 Glenn Morris <rgm@gnu.org>
* emacs-lisp/autoload.el (autoload-ensure-writable): New variable.
(autoload-ensure-default-file): Maybe make existing output writable.
* Makefile.in (AUTOGEN_VCS): Remove.
(autoloads): Use autoload-ensure-writable rather than AUTOGEN_VCS.
2014-06-30 Fabián Ezequiel Gallina <fgallina@gnu.org>
* emacs-lisp/subr-x.el (string-reverse): Use `reverse'.
2014-06-30 Fabián Ezequiel Gallina <fgallina@gnu.org>
New if-let, when-let, thread-first and thread-last macros.
* emacs-lisp/subr-x.el
(internal--listify, internal--check-binding)
(internal--build-binding-value-form, internal--build-binding)
(internal--build-bindings): New functions.
(internal--thread-argument, thread-first, thread-last)
(if-let, when-let): New macros.
2014-06-30 Grégoire Jadi <daimrod@gmail.com>
* net/rcirc.el (rcirc-buffer-process): Restore previous
behaviour. (Bug#17772)
2014-06-29 Alan Mackenzie <acm@muc.de>
Don't call c-parse-state when c++-template-syntax-table is active.
* progmodes/cc-engine.el (c-guess-continued-construct CASE G)
(c-guess-basic-syntax CASE 5D.3): Rearrange so that
c-syntactic-skip-backwards isn't called with the pertinent syntax table.
2014-06-28 Stephen Berman <stephen.berman@gmx.net>
* calendar/todo-mode.el (todo-set-top-priorities): Fix logic to
account for file-wide setting of todo-top-priorities-overrides.
Make code a bit cleaner.
2014-06-28 Glenn Morris <rgm@gnu.org>
* net/eww.el (eww-mode) <eww-current-title>: Make local. (Bug#17860)
2014-06-28 Stephen Berman <stephen.berman@gmx.net>
* calendar/todo-mode.el (todo-prefix-overlays): If there is no
category-wide setting of todo-top-priorities-overrides, check for
a file-wide setting and fontify accordingly.
2014-06-28 Glenn Morris <rgm@gnu.org>
* subr.el (read-passwd): Warn about batch mode. (Bug#17839)
2014-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/hideif.el: Use lexical-binding. Fix up cl-lib usage.
2014-06-28 K. Handa <handa@gnu.org>
Fix Bug#17739.
* composite.el: Setup composition-function-table for dotted circle.
(compose-gstring-for-dotted-circle): New function.
* 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.
@ -15,8 +816,8 @@
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
* 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).
@ -34,8 +835,8 @@
* 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.
* progmodes/asm-mode.el (asm-calculate-indentation):
Use indent-next-tab-stop.
* indent.el (indent-accumulate-tab-stops): New function.
@ -98,6 +899,32 @@
* 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)
@ -1525,7 +2352,7 @@
Remove HISTFILE and HISTSIZE; it's too late to set them here.
Add :version entry.
(tramp-open-shell): Do not let-bind `tramp-end-of-output'.
Add "HISTSIZE=/dev/null" to the shell's env arguments. Do not send
Add "HISTFILE=/dev/null" to the shell's env arguments. Do not send
extra "PSx=..." commands.
(tramp-maybe-open-connection): Setenv HISTFILE to /dev/null.
(Bug#17295)
@ -3225,7 +4052,7 @@
2014-03-10 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Do not add `nil' to the environment, when there's no remote `locale'.
Do not add nil to the environment, when there's no remote `locale'.
(tramp-find-inline-encoding): Check, that the remote host has
installed perl, before sending scripts.

View file

@ -70,18 +70,6 @@ AUTOGENEL = loaddefs.el \
cedet/srecode/loaddefs.el \
org/org-loaddefs.el
# Versioned files that are the value of someone's `generated-autoload-file'.
# Note that update_loaddefs parses this.
AUTOGEN_VCS = \
ps-print.el \
obsolete/tpu-edt.el \
mail/rmail.el \
dired.el \
ibuffer.el \
htmlfontify.el \
emacs-lisp/eieio.el \
textmodes/reftex.el
# Value of max-lisp-eval-depth when compiling initially.
# During bootstrapping the byte-compiler is run interpreted when compiling
# itself, and uses more stack than usual.
@ -149,9 +137,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 +155,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,25 +164,24 @@ custom-deps: doit
$(lisp)/finder-inf.el:
$(MAKE) finder-data
finder-data: doit
finder-data:
$(setwins_finder); \
echo Directories: $$wins; \
$(emacs) -l finder \
--eval '(setq generated-finder-keywords-file (unmsys--file-name "$(srcdir)/finder-inf.el"))' \
-f finder-compile-keywords-make-dist $$wins
# The chmod +w is to handle env var CVSREAD=1.
# Use expand-file-name rather than $abs_scrdir so that Emacs does not
# get confused when it compares file-names for equality.
#
# 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
cd $(lisp) && chmod +w $(AUTOGEN_VCS)
autoloads: $(LOADDEFS)
$(setwins_almost); \
echo Directories: $$wins; \
$(emacs) -l autoload \
--eval '(setq autoload-ensure-writable t)' \
--eval '(setq autoload-builtin-package-versions t)' \
--eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$(srcdir)/loaddefs.el")))' \
-f batch-update-autoloads $$wins
@ -216,7 +201,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; \
@ -308,7 +293,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
@ -332,7 +317,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
@ -363,17 +348,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
@ -404,7 +387,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)

View file

@ -36,7 +36,7 @@ corresponding to the mode line clicked."
(defun mode-line-toggle-read-only (event)
"Like `toggle-read-only', for the mode-line."
"Like toggling `read-only-mode', for the mode-line."
(interactive "e")
(with-selected-window (posn-window (event-start event))
(read-only-mode 'toggle)))
@ -229,11 +229,13 @@ mnemonics of the following coding systems:
'help-echo (purecopy (lambda (window _object _point)
(format "%s"
(with-selected-window window
(concat
(if (file-remote-p default-directory)
"Current directory is remote: "
"Current directory is local: ")
default-directory)))))))
(if (stringp default-directory)
(concat
(if (file-remote-p default-directory)
"Current directory is remote: "
"Current directory is local: ")
default-directory)
"Current directory is nil")))))))
"Mode line construct to indicate a remote buffer.")
;;;###autoload
(put 'mode-line-remote 'risky-local-variable t)

View file

@ -954,7 +954,7 @@ Default is `bs--current-sort-function'."
(defun bs-toggle-readonly ()
"Toggle read-only status for buffer on current line.
Uses function `toggle-read-only'."
Uses function `read-only-mode'."
(interactive)
(with-current-buffer (bs--current-buffer)
(read-only-mode 'toggle))

View file

@ -539,7 +539,7 @@ The current window remains selected."
(defun Buffer-menu-toggle-read-only ()
"Toggle read-only status of buffer on this line.
This behaves like invoking \\[toggle-read-only] in that buffer."
This behaves like invoking \\[read-only-mode] in that buffer."
(interactive)
(let ((read-only
(with-current-buffer (Buffer-menu-buffer t)

View file

@ -563,7 +563,12 @@ FIXME: multiple comma-separated values should be allowed!"
;; UTC specifier present
(char-equal ?Z (aref isodatetimestring 15)))
;; if not UTC add current-time-zone offset
(setq second (+ (car (current-time-zone)) second)))
;; current-time-zone should be called with actual UTC time
;; (daylight saving at that time may differ to current one)
(setq second (+ (car (current-time-zone
(encode-time second minute hour day month year
0)))
second)))
;; shift if necessary
(if day-shift
(let ((mdy (calendar-gregorian-from-absolute

View file

@ -24,63 +24,37 @@
;;; Commentary:
;; This package provides facilities for making, displaying, navigating
;; and editing todo lists, which are prioritized lists of todo items.
;; Todo lists are identified with named categories, so you can group
;; together and separately prioritize thematically related todo items.
;; Each category is stored in a file, which thus provides a further
;; level of organization. You can create as many todo files, and in
;; each as many categories, as you want.
;; This package provides facilities for making and maintaining
;; prioritized lists of things to do. These todo lists are identified
;; with named categories, so you can group together thematically
;; related todo items. Each category is stored in a file, providing a
;; further level of organization. You can create as many todo files,
;; and in each as many categories, as you want.
;; With Todo mode you can navigate among the items of a category, and
;; between categories in the same and in different todo files. You
;; can edit todo items, reprioritize them within their category, move
;; them to another category, delete them, or mark items as done and
;; store them separately from the not yet done items in a category.
;; You can add new todo files, edit and delete them. You can add new
;; categories, rename and delete them, move categories to another file
;; and merge the items of two categories. You can also reorder the
;; sequence of categories in a todo file for the purpose of
;; navigation. You can display summary tables of the categories in a
;; file and the types of items they contain. And you can compile
;; lists of existing items from multiple categories in one or more
;; todo files, which are filtered by various criteria.
;; can add and edit todo items, reprioritize them, move them to
;; another category, or delete them. You can also mark items as done
;; and store them within their category or in separate archive files.
;; You can include todo items in the Emacs Fancy Diary display and
;; treat them as appointments. You can add new todo files, and rename
;; or delete them. You can add new categories to a file, rename or
;; delete them, move a category to another file and merge the items of
;; two categories. You can also reorder the sequence of categories in
;; a todo file for the purpose of navigation. You can display
;; sortable summary tables of the categories in a file and the types
;; of items they contain. And you can filter items by various
;; criteria from multiple categories in one or more todo files to
;; create prioritizable cross-category overviews of your todo items.
;; To get started, load this package and type `M-x todo-show'. This
;; will prompt you for the name of the first todo file, its first
;; category and the category's first item, create these and display
;; them in Todo mode. Now you can insert further items into the list
;; (i.e., the category) and assign them priorities by typing `i i'.
;; You will probably find it convenient to give `todo-show' a global
;; key binding in your init file, since it is one of the entry points
;; to Todo mode; a good choice is `C-c t', since `todo-show' is
;; bound to `t' in Todo mode.
;; To see a list of all Todo mode commands and their key bindings,
;; including other entry points, type `C-h m' in Todo mode. Consult
;; the documentation strings of the commands for details of their use.
;; The `todo' customization group and its subgroups list the options
;; you can set to alter the behavior of many commands and various
;; aspects of the display.
;; This package is a new version of Oliver Seidel's todo-mode.el.
;; While it retains the same basic organization and handling of todo
;; lists and the basic UI, it significantly extends these and adds
;; many features. This required also making changes to the internals,
;; including the file format. If you have a todo file in old format,
;; then the first time you invoke `todo-show' (i.e., before you have
;; created any todo file in the current format), it will ask you
;; whether to convert that file and show it. If you choose not to
;; convert the old-style file at this time, you can do so later by
;; calling the command `todo-convert-legacy-files'.
;; To get started, type `M-x todo-show'. For full details of the user
;; interface, commands and options, consult the Todo mode user manual,
;; which is included in the Info documentation.
;;; Code:
(require 'diary-lib)
;; For cl-remove-duplicates (in todo-insertion-commands-args) and
;; cl-oddp.
(require 'cl-lib)
(require 'cl-lib) ; For cl-oddp and cl-assert.
;; -----------------------------------------------------------------------------
;;; Setting up todo files, categories, and items
@ -1736,31 +1710,40 @@ means prompt user and omit comment only on confirmation."
(defun todo-toggle-mark-item (&optional n)
"Mark item with `todo-item-mark' if unmarked, otherwise unmark it.
With a positive numerical prefix argument N, change the
marking of the next N items."
With positive numerical prefix argument N, change the marking of
the next N items in the current category. If both the todo and
done items sections are visible, the sequence of N items can
consist of the the last todo items and the first done items."
(interactive "p")
(when (todo-item-string)
(unless (> n 1) (setq n 1))
(dotimes (i n)
(let* ((cat (todo-current-category))
(marks (assoc cat todo-categories-with-marks))
(ov (progn
(unless (looking-at todo-item-start)
(todo-item-start))
(todo-get-overlay 'prefix)))
(pref (overlay-get ov 'before-string)))
(if (todo-marked-item-p)
(progn
(overlay-put ov 'before-string (substring pref 1))
(if (= (cdr marks) 1) ; Deleted last mark in this category.
(setq todo-categories-with-marks
(assq-delete-all cat todo-categories-with-marks))
(setcdr marks (1- (cdr marks)))))
(overlay-put ov 'before-string (concat todo-item-mark pref))
(if marks
(setcdr marks (1+ (cdr marks)))
(push (cons cat 1) todo-categories-with-marks))))
(todo-forward-item))))
(catch 'end
(dotimes (i n)
(let* ((cat (todo-current-category))
(marks (assoc cat todo-categories-with-marks))
(ov (progn
(unless (looking-at todo-item-start)
(todo-item-start))
(todo-get-overlay 'prefix)))
(pref (overlay-get ov 'before-string)))
(if (todo-marked-item-p)
(progn
(overlay-put ov 'before-string (substring pref 1))
(if (= (cdr marks) 1) ; Deleted last mark in this category.
(setq todo-categories-with-marks
(assq-delete-all cat todo-categories-with-marks))
(setcdr marks (1- (cdr marks)))))
(overlay-put ov 'before-string (concat todo-item-mark pref))
(if marks
(setcdr marks (1+ (cdr marks)))
(push (cons cat 1) todo-categories-with-marks))))
(todo-forward-item)
;; Don't try to mark the empty lines at the end of the todo
;; and done items sections.
(when (looking-at "^$")
(if (eobp)
(throw 'end nil)
(todo-forward-item)))))))
(defun todo-mark-category ()
"Mark all visible items in this category with `todo-item-mark'."
@ -1777,7 +1760,12 @@ marking of the next N items."
(if marks
(setcdr marks (1+ (cdr marks)))
(push (cons cat 1) todo-categories-with-marks))))
(todo-forward-item)))))
(todo-forward-item)
;; Don't try to mark the empty line between the todo and done
;; items sections.
(when (looking-at "^$")
(unless (eobp)
(todo-forward-item)))))))
(defun todo-unmark-category ()
"Remove `todo-item-mark' from all visible items in this category."
@ -2080,85 +2068,101 @@ the item at point."
(defun todo-edit-item (&optional arg)
"Choose an editing operation for the current item and carry it out."
(interactive "P")
(cond ((todo-done-item-p)
(todo-edit-item--next-key todo-edit-done-item--param-key-alist))
((todo-item-string)
(todo-edit-item--next-key todo-edit-item--param-key-alist arg))))
(let ((marked (assoc (todo-current-category) todo-categories-with-marks)))
(cond ((and (todo-done-item-p) (not marked))
(todo-edit-item--next-key todo-edit-done-item--param-key-alist))
((or marked (todo-item-string))
(todo-edit-item--next-key todo-edit-item--param-key-alist arg)))))
(defun todo-edit-item--text (&optional arg)
"Function providing the text editing facilities of `todo-edit-item'."
(let* ((opoint (point))
(start (todo-item-start))
(end (save-excursion (todo-item-end)))
(item-beg (progn
(re-search-forward
(concat todo-date-string-start todo-date-pattern
"\\( " diary-time-regexp "\\)?"
(regexp-quote todo-nondiary-end) "?")
(line-end-position) t)
(1+ (- (point) start))))
(include-header (eq arg 'include-header))
(comment-edit (eq arg 'comment-edit))
(comment-delete (eq arg 'comment-delete))
(header-string (substring (todo-item-string) 0 item-beg))
(item (if (or include-header comment-edit comment-delete)
(todo-item-string)
(substring (todo-item-string) item-beg)))
(multiline (> (length (split-string item "\n")) 1))
(comment (save-excursion
(todo-item-start)
(re-search-forward
(concat " \\[" (regexp-quote todo-comment-string)
": \\([^]]+\\)\\]") end t)))
(prompt (if comment "Edit comment: " "Enter a comment: "))
(buffer-read-only nil))
(cond
((or comment-edit comment-delete)
(save-excursion
(todo-item-start)
(if (re-search-forward (concat " \\[" (regexp-quote todo-comment-string)
": \\([^]]+\\)\\]") end t)
(if comment-delete
(when (todo-y-or-n-p "Delete comment? ")
(delete-region (match-beginning 0) (match-end 0)))
(replace-match (read-string prompt (cons (match-string 1) 1))
nil nil nil 1))
(if comment-delete
(user-error "There is no comment to delete")
(insert " [" todo-comment-string ": "
(prog1 (read-string prompt)
;; If user moved point during editing,
;; make sure it moves back.
(goto-char opoint)
(todo-item-end))
"]")))))
((or multiline (eq arg 'multiline))
(let ((buf todo-edit-buffer))
(set-window-buffer (selected-window)
(set-buffer (make-indirect-buffer (buffer-name) buf)))
(narrow-to-region (todo-item-start) (todo-item-end))
(todo-edit-mode)
(message "%s" (substitute-command-keys
(concat "Type \\[todo-edit-quit] "
"to return to Todo mode.\n")))))
(t
(let ((new (concat (if include-header "" header-string)
(read-string "Edit: " (if include-header
(cons item item-beg)
(cons item 0))))))
(when include-header
(while (not (string-match (concat todo-date-string-start
todo-date-pattern) new))
(setq new (read-from-minibuffer
"Item must start with a date: " new))))
;; Ensure lines following hard newlines are indented.
(setq new (replace-regexp-in-string "\\(\n\\)[^[:blank:]]"
"\n\t" new nil nil 1))
;; If user moved point during editing, make sure it moves back.
(goto-char opoint)
(todo-remove-item)
(todo-insert-with-overlays new)
(move-to-column item-beg))))))
(let ((full-item (todo-item-string)))
;; If there are marked items and user invokes a text-editing
;; commands with point not on an item, todo-item-start is nil and
;; 1+ signals an error, so just make this a noop.
(when full-item
(let* ((opoint (point))
(start (todo-item-start))
(end (save-excursion (todo-item-end)))
(item-beg (progn
(re-search-forward
(concat todo-date-string-start todo-date-pattern
"\\( " diary-time-regexp "\\)?"
(regexp-quote todo-nondiary-end) "?")
(line-end-position) t)
(1+ (- (point) start))))
(include-header (eq arg 'include-header))
(comment-edit (eq arg 'comment-edit))
(comment-delete (eq arg 'comment-delete))
(header-string (substring full-item 0 item-beg))
(item (if (or include-header comment-edit comment-delete)
full-item
(substring full-item item-beg)))
(multiline (or (eq arg 'multiline)
(> (length (split-string item "\n")) 1)))
(comment (save-excursion
(todo-item-start)
(re-search-forward
(concat " \\[" (regexp-quote todo-comment-string)
": \\([^]]+\\)\\]") end t)))
(prompt (if comment "Edit comment: " "Enter a comment: "))
(buffer-read-only nil))
;; When there are marked items, user can invoke todo-edit-item
;; even if point is not on an item, but text editing only
;; applies to the item at point.
(when (or (and (todo-done-item-p)
(or comment-edit comment-delete))
(and (not (todo-done-item-p))
(or (not arg) include-header multiline)))
(cond
((or comment-edit comment-delete)
(save-excursion
(todo-item-start)
(if (re-search-forward (concat " \\["
(regexp-quote todo-comment-string)
": \\([^]]+\\)\\]") end t)
(if comment-delete
(when (todo-y-or-n-p "Delete comment? ")
(delete-region (match-beginning 0) (match-end 0)))
(replace-match (read-string prompt (cons (match-string 1) 1))
nil nil nil 1))
(if comment-delete
(user-error "There is no comment to delete")
(insert " [" todo-comment-string ": "
(prog1 (read-string prompt)
;; If user moved point during editing,
;; make sure it moves back.
(goto-char opoint)
(todo-item-end))
"]")))))
(multiline
(let ((buf todo-edit-buffer))
(set-window-buffer (selected-window)
(set-buffer (make-indirect-buffer
(buffer-name) buf)))
(narrow-to-region (todo-item-start) (todo-item-end))
(todo-edit-mode)
(message "%s" (substitute-command-keys
(concat "Type \\[todo-edit-quit] "
"to return to Todo mode.\n")))))
(t
(let ((new (concat (if include-header "" header-string)
(read-string "Edit: " (if include-header
(cons item item-beg)
(cons item 0))))))
(when include-header
(while (not (string-match (concat todo-date-string-start
todo-date-pattern) new))
(setq new (read-from-minibuffer
"Item must start with a date: " new))))
;; Ensure lines following hard newlines are indented.
(setq new (replace-regexp-in-string "\\(\n\\)[^[:blank:]]"
"\n\t" new nil nil 1))
;; If user moved point during editing, make sure it moves back.
(goto-char opoint)
(todo-remove-item)
(todo-insert-with-overlays new)
(move-to-column item-beg)))))))))
(defun todo-edit-quit ()
"Return from Todo Edit mode to Todo mode.
@ -2213,16 +2217,16 @@ made in the number or names of categories."
(defun todo-edit-item--header (what &optional inc)
"Function providing header editing facilities of `todo-edit-item'."
(let* ((cat (todo-current-category))
(marked (assoc cat todo-categories-with-marks))
(first t)
(todo-date-from-calendar t)
;; INC must be an integer, but users could pass it via
;; `todo-edit-item' as e.g. `-' or `C-u'.
(inc (prefix-numeric-value inc))
(buffer-read-only nil)
ndate ntime year monthname month day
dayname) ; Needed by calendar-date-display-form.
(let ((marked (assoc (todo-current-category) todo-categories-with-marks))
(first t)
(todo-date-from-calendar t)
;; INC must be an integer, but users could pass it via
;; `todo-edit-item' as e.g. `-' or `C-u'.
(inc (prefix-numeric-value inc))
(buffer-read-only nil)
ndate ntime year monthname month day
dayname) ; Needed by calendar-date-display-form.
(when marked (todo--user-error-if-marked-done-item))
(save-excursion
(or (and marked (goto-char (point-min))) (todo-item-start))
(catch 'end
@ -2384,47 +2388,45 @@ made in the number or names of categories."
(defun todo-edit-item--diary-inclusion (&optional nonmarking)
"Function providing diary marking facilities of `todo-edit-item'."
(let ((buffer-read-only)
(marked (assoc (todo-current-category)
todo-categories-with-marks)))
(marked (assoc (todo-current-category) todo-categories-with-marks)))
(when marked (todo--user-error-if-marked-done-item))
(catch 'stop
(save-excursion
(when marked (goto-char (point-min)))
(while (not (eobp))
(if (todo-done-item-p)
(throw 'stop (message "Done items cannot be edited"))
(unless (and marked (not (todo-marked-item-p)))
(let* ((beg (todo-item-start))
(lim (save-excursion (todo-item-end)))
(end (save-excursion
(or (todo-time-string-matcher lim)
(todo-date-string-matcher lim)))))
(if nonmarking
(if (looking-at (regexp-quote diary-nonmarking-symbol))
(replace-match "")
(when (looking-at (regexp-quote todo-nondiary-start))
(save-excursion
(replace-match "")
(search-forward todo-nondiary-end (1+ end) t)
(replace-match "")
(todo-update-count 'diary 1)))
(insert diary-nonmarking-symbol))
(if (looking-at (regexp-quote todo-nondiary-start))
(progn
(unless (and marked (not (todo-marked-item-p)))
(let* ((beg (todo-item-start))
(lim (save-excursion (todo-item-end)))
(end (save-excursion
(or (todo-time-string-matcher lim)
(todo-date-string-matcher lim)))))
(if nonmarking
(if (looking-at (regexp-quote diary-nonmarking-symbol))
(replace-match "")
(when (looking-at (regexp-quote todo-nondiary-start))
(save-excursion
(replace-match "")
(search-forward todo-nondiary-end (1+ end) t)
(replace-match "")
(todo-update-count 'diary 1))
(when end
(when (looking-at (regexp-quote diary-nonmarking-symbol))
(replace-match "")
(setq end (1- end))) ; Since we deleted nonmarking symbol.
(insert todo-nondiary-start)
(goto-char (1+ end))
(insert todo-nondiary-end)
(todo-update-count 'diary -1))))))
(unless marked (throw 'stop nil))
(todo-forward-item)))))
(todo-update-categories-sexp)))
(todo-update-count 'diary 1)))
(insert diary-nonmarking-symbol))
(if (looking-at (regexp-quote todo-nondiary-start))
(progn
(replace-match "")
(search-forward todo-nondiary-end (1+ end) t)
(replace-match "")
(todo-update-count 'diary 1))
(when end
(when (looking-at (regexp-quote diary-nonmarking-symbol))
(replace-match "")
(setq end (1- end))) ; Since we deleted nonmarking symbol.
(insert todo-nondiary-start)
(goto-char (1+ end))
(insert todo-nondiary-end)
(todo-update-count 'diary -1))))))
(unless marked (throw 'stop nil))
(todo-forward-item)))))
(todo-update-categories-sexp))
(defun todo-edit-category-diary-inclusion (arg)
"Make all items in this category diary items.
@ -2795,21 +2797,7 @@ visible."
(interactive "P")
(let* ((cat (todo-current-category))
(marked (assoc cat todo-categories-with-marks)))
(when marked
(save-excursion
(save-restriction
(goto-char (point-max))
(todo-backward-item)
(unless (todo-done-item-p)
(widen)
(unless (re-search-forward
(concat "^" (regexp-quote todo-category-beg)) nil t)
(goto-char (point-max)))
(forward-line -1))
(while (todo-done-item-p)
(when (todo-marked-item-p)
(user-error "This command does not apply to done items"))
(todo-backward-item)))))
(when marked (todo--user-error-if-marked-done-item))
(unless (and (not marked)
(or (todo-done-item-p)
;; Point is between todo and done items.
@ -2897,7 +2885,9 @@ comments without asking."
(while (not (eobp))
(when (or (not marked) (and marked (todo-marked-item-p)))
(if (not (todo-done-item-p))
(user-error "Only done items can be undone")
(progn
(goto-char opoint)
(user-error "Only done items can be undone"))
(todo-item-start)
(unless marked
(setq ov (make-overlay (save-excursion (todo-item-start))
@ -3971,7 +3961,8 @@ regexp items."
(setq file (cdr (assoc-string file falist)))
(find-file file)
(unless (derived-mode-p 'todo-filtered-items-mode)
(todo-filtered-items-mode))))
(todo-filtered-items-mode))
(todo-prefix-overlays)))
(defun todo-go-to-source-item ()
"Display the file and category of the filtered item at point."
@ -4080,7 +4071,6 @@ multifile commands for further details."
(progn (todo-multiple-filter-files)
todo-multiple-filter-files))
(list todo-current-todo-file)))
(multi (> (length flist) 1))
(fname (if (equal flist 'quit)
;; Pressed `cancel' in t-m-f-f file selection dialog.
(keyboard-quit)
@ -4089,6 +4079,7 @@ multifile commands for further details."
(cond (top ".todt")
(diary ".tody")
(regexp ".todr")))))
(multi (> (length flist) 1))
(rxfiles (when regexp
(directory-files todo-directory t ".*\\.todr$" t)))
(file-exists (or (file-exists-p fname) rxfiles))
@ -4292,30 +4283,31 @@ set the user customizable option `todo-top-priorities-overrides'."
(file todo-current-todo-file)
(rules todo-top-priorities-overrides)
(frule (assoc-string file rules))
(crule (assoc-string cat (nth 2 frule)))
(crules (nth 2 frule))
(cur (or (if arg (cdr crule) (nth 1 frule))
todo-top-priorities))
(crule (assoc-string cat crules))
(fcur (or (nth 1 frule)
todo-top-priorities))
(ccur (or (and arg (cdr crule))
fcur))
(prompt (if arg (concat "Number of top priorities in this category"
" (currently %d): ")
(concat "Default number of top priorities per category"
" in this file (currently %d): ")))
(new -1)
nrule)
(new -1))
(while (< new 0)
(let ((cur0 cur))
(setq new (read-number (format prompt cur0))
(let ((cur (if arg ccur fcur)))
(setq new (read-number (format prompt cur))
prompt "Enter a non-negative number: "
cur0 nil)))
(setq nrule (if arg
(append (delete crule crules) (list (cons cat new)))
(append (list file new) (list crules))))
(setq rules (cons (if arg
(list file cur nrule)
nrule)
(delete frule rules)))
(customize-save-variable 'todo-top-priorities-overrides rules)
(todo-prefix-overlays)))
cur nil)))
(let ((nrule (if arg
(append (delete crule crules) (list (cons cat new)))
(append (list file new) (list crules)))))
(setq rules (cons (if arg
(list file fcur nrule)
nrule)
(delete frule rules)))
(customize-save-variable 'todo-top-priorities-overrides rules)
(todo-prefix-overlays))))
(defun todo-find-item (str)
"Search for filtered item STR in its saved todo file.
@ -5232,6 +5224,25 @@ Overrides `diary-goto-entry'."
(progn (goto-char (point-min))
(looking-at todo-done-string-start)))))
(defun todo--user-error-if-marked-done-item ()
"Signal user error on marked done items.
Helper funtion for editing commands that only apply to (possibly
marked) not done todo items."
(save-excursion
(save-restriction
(goto-char (point-max))
(todo-backward-item)
(unless (todo-done-item-p)
(widen)
(unless (re-search-forward
(concat "^" (regexp-quote todo-category-beg)) nil t)
(goto-char (point-max)))
(forward-line -1))
(while (todo-done-item-p)
(when (todo-marked-item-p)
(user-error "This command does not apply to done items"))
(todo-backward-item)))))
(defun todo-reset-done-separator (sep)
"Replace existing overlays of done items separator string SEP."
(save-excursion
@ -5303,6 +5314,8 @@ of each other."
(todo-current-category)
(nth 2 (assoc-string todo-current-todo-file
todo-top-priorities-overrides))))
(nth 1 (assoc-string todo-current-todo-file
todo-top-priorities-overrides))
todo-top-priorities))
done prefix)
(save-excursion
@ -5538,8 +5551,8 @@ already entered and those still available."
'(add/edit delete))
" comment"))))
params " "))
(this-key (char-to-string
(read-key (concat todo-edit-item--prompt p->k))))
(this-key (let ((key (read-key (concat todo-edit-item--prompt p->k))))
(and (characterp key) (char-to-string key))))
(this-param (car (rassoc this-key params))))
(pcase this-param
(`edit (todo-edit-item--text))

View file

@ -671,6 +671,49 @@ All non-spacing characters have this function in
(setq i (1+ i))))
gstring))))))
(defun compose-gstring-for-dotted-circle (gstring)
(let* ((dc (lgstring-glyph gstring 0)) ; glyph of dotted-circle
(dc-id (lglyph-code dc))
(fc (lgstring-glyph gstring 1)) ; glyph of the following char
(fc-id (lglyph-code fc))
(gstr (and nil (font-shape-gstring gstring))))
(if (and gstr
(or (= (lgstring-glyph-len gstr) 1)
(and (= (lgstring-glyph-len gstr) 2)
(= (lglyph-to (lgstring-glyph gstr 0))
(lglyph-to (lgstring-glyph gstr 1))))))
;; It seems that font-shape-gstring has composed glyphs.
gstr
;; Artificially compose the following glyph with the preceding
;; dotted-circle.
(setq dc (lgstring-glyph gstring 0)
fc (lgstring-glyph gstring 1))
(let ((dc-width (lglyph-width dc))
(fc-width (- (lglyph-rbearing fc) (lglyph-lbearing fc)))
(from (lglyph-from dc))
(to (lglyph-to fc))
(xoff 0) (yoff 0) (width 0))
(if (and (< (lglyph-descent fc) 0)
(> (lglyph-ascent dc) (- (lglyph-descent fc))))
;; Set YOFF so that the following glyph is put on top of
;; the dotted-circle.
(setq yoff (- (- (lglyph-descent fc)) (lglyph-ascent dc))))
(if (> (lglyph-width fc) 0)
(setq xoff (- (lglyph-rbearing fc))))
(if (< dc-width fc-width)
;; The following glyph is wider, but we don't know how to
;; align both glyphs. So, try the easiet method;
;; i.e. align left edges of the glyphs.
(setq xoff (- xoff (- dc-width) (- (lglyph-lbearing fc )))
width (- fc-width dc-width)))
(if (or (/= xoff 0) (/= yoff 0) (/= width 0) (/= (lglyph-width fc) 0))
(lglyph-set-adjustment fc xoff yoff width))
(lglyph-set-from-to dc from to)
(lglyph-set-from-to fc from to))
(if (> (lgstring-glyph-len gstring) 2)
(lgstring-set-glyph gstring 2 nil))
gstring)))
;; Allow for bootstrapping without uni-*.el.
(when unicode-category-table
(let ((elt `([,(purecopy "\\c.\\c^+") 1 compose-gstring-for-graphic]
@ -679,7 +722,10 @@ All non-spacing characters have this function in
#'(lambda (key val)
(if (memq val '(Mn Mc Me))
(set-char-table-range composition-function-table key elt)))
unicode-category-table)))
unicode-category-table))
;; for dotted-circle
(aset composition-function-table #x25CC
`([,(purecopy ".\\c^") 0 compose-gstring-for-dotted-circle])))
(defun compose-gstring-for-terminal (gstring)
"Compose glyph-string GSTRING for terminal display.

View file

@ -324,7 +324,7 @@
:group 'emacs)
(defgroup help nil
"Support for on-line help systems."
"Support for Emacs help systems."
:group 'emacs)
(defgroup multimedia nil

View file

@ -528,6 +528,8 @@ Furthermore the major mode function must be autoloaded.")
(defcustom desktop-minor-mode-table
'((auto-fill-function auto-fill-mode)
(defining-kbd-macro nil)
(isearch-mode nil)
(vc-mode nil)
(vc-dired-mode nil)
(erc-track-minor-mode nil)
@ -942,12 +944,13 @@ Frames with a non-nil `desktop-dont-save' parameter are not saved."
:predicate #'desktop--check-dont-save))))
;;;###autoload
(defun desktop-save (dirname &optional release auto-save)
(defun desktop-save (dirname &optional release only-if-changed)
"Save the desktop in a desktop file.
Parameter DIRNAME specifies where to save the desktop file.
Optional parameter RELEASE says whether we're done with this desktop.
If AUTO-SAVE is non-nil, compare the saved contents to the one last saved,
and don't save the buffer if they are the same."
If ONLY-IF-CHANGED is non-nil, compare the current desktop information
to that in the desktop file, and if the desktop information has not
changed since it was last saved then do not rewrite the file."
(interactive (list
;; Or should we just use (car desktop-path)?
(let ((default (if (member "." desktop-path)
@ -1020,7 +1023,7 @@ and don't save the buffer if they are the same."
(setq default-directory desktop-dirname)
;; When auto-saving, avoid writing if nothing has changed since the last write.
(let* ((beg (and auto-save
(let* ((beg (and only-if-changed
(save-excursion
(goto-char (point-min))
;; Don't check the header with changing timestamp
@ -1513,8 +1516,15 @@ If there are no buffers left to create, kill the timer."
(setq command-line-args (delete key command-line-args))
(desktop-save-mode 0)))
(when desktop-save-mode
(desktop-read)
(setq inhibit-startup-screen t))))
;; People don't expect emacs -nw, or --daemon,
;; to create graphical frames (bug#17693).
;; TODO perhaps there should be a separate value
;; for desktop-restore-frames to control this startup behavior?
(let ((desktop-restore-frames (and desktop-restore-frames
initial-window-system
(not (daemonp)))))
(desktop-read)
(setq inhibit-startup-screen t)))))
(provide 'desktop)

View file

@ -2015,7 +2015,7 @@ Actual changes in files cannot be undone by Emacs."))
"Edit Dired buffer with Wdired, or make it read-only.
If the current buffer can be edited with Wdired, (i.e. the major
mode is `dired-mode'), call `wdired-change-to-wdired-mode'.
Otherwise, call `toggle-read-only'."
Otherwise, toggle `read-only-mode'."
(interactive)
(if (derived-mode-p 'dired-mode)
(wdired-change-to-wdired-mode)
@ -3103,20 +3103,20 @@ argument or confirmation)."
;; 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
(cons 'display-buffer-below-selected
'((window-height . fit-window-to-buffer)))
#'(lambda (window _value)
(with-selected-window window
(unwind-protect
(apply function args)
(when (window-live-p window)
(quit-restore-window window 'kill)))))
;; Handle (t FILE) just like (FILE), here. That value is
;; used (only in some cases), to mean just one file that was
;; marked, rather than the current line file.
(with-displayed-buffer-window
buffer
(cons 'display-buffer-below-selected
'((window-height . fit-window-to-buffer)))
#'(lambda (window _value)
(with-selected-window window
(unwind-protect
(apply function args)
(when (window-live-p window)
(quit-restore-window window 'kill)))))
;; Handle (t FILE) just like (FILE), here. That value is
;; used (only in some cases), to mean just one file that was
;; marked, rather than the current line file.
(with-current-buffer buffer
(dired-format-columns-of-files
(if (eq (car files) t) (cdr files) files))
(remove-text-properties (point-min) (point-max)

View file

@ -1396,11 +1396,12 @@ For now these keys are useful:
(interactive)
(if doc-view--current-converter-processes
(message "DocView: please wait till conversion finished.")
(let ((txt (expand-file-name "doc.txt" (doc-view--current-cache-dir))))
(let ((txt (expand-file-name "doc.txt" (doc-view--current-cache-dir)))
(bname (or buffer-file-name (buffer-name))))
(if (file-readable-p txt)
(let ((name (concat "Text contents of "
(file-name-nondirectory buffer-file-name)))
(dir (file-name-directory buffer-file-name)))
(file-name-nondirectory bname)))
(dir (or (file-name-directory bname) default-directory)))
(with-current-buffer (find-file txt)
(rename-buffer name)
(setq default-directory dir)))

View file

@ -25,7 +25,7 @@
;;; Commentary:
;; This package provides a pre-packaged `Electric Help Mode' for
;; browsing on-line help screens. There is one entry point,
;; browsing Emacs help screens. There is one entry point,
;; `with-electric-help'; all you have to give it is a no-argument
;; function that generates the actual text of the help into the current
;; buffer.

View file

@ -351,9 +351,26 @@ not be relied upon."
";;; " basename
" ends here\n")))
(defvar autoload-ensure-writable nil
"Non-nil means `autoload-ensure-default-file' makes existing file writable.")
;; Just in case someone tries to get you to overwrite a file that you
;; don't want to.
;;;###autoload
(put 'autoload-ensure-writable 'risky-local-variable t)
(defun autoload-ensure-default-file (file)
"Make sure that the autoload file FILE exists and if not create it."
(unless (file-exists-p file)
"Make sure that the autoload file FILE exists, creating it if needed.
If the file already exists and `autoload-ensure-writable' is non-nil,
make it writable."
(if (file-exists-p file)
;; Probably pointless, but replaces the old AUTOGEN_VCS in lisp/Makefile,
;; which was designed to handle CVSREAD=1 and equivalent.
(and autoload-ensure-writable
(let ((modes (file-modes file)))
(if (zerop (logand modes #o0200))
;; Ignore any errors here, and let subsequent attempts
;; to write the file raise any real error.
(ignore-errors (set-file-modes file (logior modes #o0200))))))
(write-region (autoload-rubric file) nil file))
file)

View file

@ -2514,7 +2514,8 @@ non-nil value, that slot cannot be set via `setf'.
',accessor ',name))))
,(if (eq type 'vector) `(aref cl-x ,pos)
(if (= pos 0) '(car cl-x)
`(nth ,pos cl-x)))) forms)
`(nth ,pos cl-x))))
forms)
(push (cons accessor t) side-eff)
(if (cadr (memq :read-only (cddr desc)))
(push `(gv-define-expander ,accessor

View file

@ -410,12 +410,7 @@ Return the result of the last expression in BODY."
;; read is redefined to maybe instrument forms.
;; eval-defun is redefined to check edebug-all-forms and edebug-all-defs.
;; Save the original read function
(defalias 'edebug-original-read
(symbol-function (if (fboundp 'edebug-original-read)
'edebug-original-read 'read)))
(defun edebug-read (&optional stream)
(defun edebug--read (orig &optional stream)
"Read one Lisp expression as text from STREAM, return as Lisp object.
If STREAM is nil, use the value of `standard-input' (which see).
STREAM or the value of `standard-input' may be:
@ -433,10 +428,7 @@ the option `edebug-all-forms'."
(or stream (setq stream standard-input))
(if (eq stream (current-buffer))
(edebug-read-and-maybe-wrap-form)
(edebug-original-read stream)))
(or (fboundp 'edebug-original-eval-defun)
(defalias 'edebug-original-eval-defun (symbol-function 'eval-defun)))
(funcall (or orig #'read) stream)))
(defvar edebug-result) ; The result of the function call returned by body.
@ -497,7 +489,7 @@ the minibuffer."
(setq edebug-result (eval (eval-sexp-add-defvars form) lexical-binding))
(if (not edebugging)
(prog1
(princ edebug-result)
(prin1 edebug-result)
(let ((str (eval-expression-print-format edebug-result)))
(if str (princ str))))
edebug-result)))
@ -567,16 +559,13 @@ already is one.)"
(defun edebug-install-read-eval-functions ()
(interactive)
;; Don't install if already installed.
(unless load-read-function
(setq load-read-function 'edebug-read)
(defalias 'eval-defun 'edebug-eval-defun)))
(add-function :around load-read-function #'edebug--read)
(advice-add 'eval-defun :override 'edebug-eval-defun))
(defun edebug-uninstall-read-eval-functions ()
(interactive)
(setq load-read-function nil)
(defalias 'eval-defun (symbol-function 'edebug-original-eval-defun)))
(remove-function load-read-function #'edebug--read)
(advice-remove 'eval-defun 'edebug-eval-defun))
;;; Edebug internal data
@ -721,8 +710,8 @@ Maybe clear the markers and delete the symbol's edebug property?"
(cond
;; read goes one too far if a (possibly quoted) string or symbol
;; is immediately followed by non-whitespace.
((eq class 'symbol) (edebug-original-read (current-buffer)))
((eq class 'string) (edebug-original-read (current-buffer)))
((eq class 'symbol) (read (current-buffer)))
((eq class 'string) (read (current-buffer)))
((eq class 'quote) (forward-char 1)
(list 'quote (edebug-read-sexp)))
((eq class 'backquote)
@ -730,7 +719,7 @@ Maybe clear the markers and delete the symbol's edebug property?"
((eq class 'comma)
(list '\, (edebug-read-sexp)))
(t ; anything else, just read it.
(edebug-original-read (current-buffer))))))
(read (current-buffer))))))
;;; Offsets for reader
@ -826,14 +815,11 @@ Maybe clear the markers and delete the symbol's edebug property?"
(funcall
(or (cdr (assq (edebug-next-token-class) edebug-read-alist))
;; anything else, just read it.
'edebug-original-read)
#'read)
stream))))
(defun edebug-read-symbol (stream)
(edebug-original-read stream))
(defun edebug-read-string (stream)
(edebug-original-read stream))
(defalias 'edebug-read-symbol #'read)
(defalias 'edebug-read-string #'read)
(defun edebug-read-quote (stream)
;; Turn 'thing into (quote thing)
@ -877,7 +863,7 @@ Maybe clear the markers and delete the symbol's edebug property?"
((memq (following-char) '(?: ?B ?O ?X ?b ?o ?x ?1 ?2 ?3 ?4 ?5 ?6
?7 ?8 ?9 ?0))
(backward-char 1)
(edebug-original-read stream))
(read stream))
(t (edebug-syntax-error "Bad char after #"))))
(defun edebug-read-list (stream)
@ -1048,16 +1034,15 @@ Maybe clear the markers and delete the symbol's edebug property?"
edebug-gate
edebug-best-error
edebug-error-point
no-match
;; Do this once here instead of several times.
(max-lisp-eval-depth (+ 800 max-lisp-eval-depth))
(max-specpdl-size (+ 2000 max-specpdl-size)))
(setq no-match
(catch 'no-match
(setq result (edebug-read-and-maybe-wrap-form1))
nil))
(if no-match
(apply 'edebug-syntax-error no-match))
(let ((no-match
(catch 'no-match
(setq result (edebug-read-and-maybe-wrap-form1))
nil)))
(if no-match
(apply 'edebug-syntax-error no-match)))
result))
@ -1076,7 +1061,7 @@ Maybe clear the markers and delete the symbol's edebug property?"
(if (and (eq 'lparen (edebug-next-token-class))
(eq 'symbol (progn (forward-char 1) (edebug-next-token-class))))
;; Find out if this is a defining form from first symbol
(setq def-kind (edebug-original-read (current-buffer))
(setq def-kind (read (current-buffer))
spec (and (symbolp def-kind) (get-edebug-spec def-kind))
defining-form-p (and (listp spec)
(eq '&define (car spec)))
@ -1084,7 +1069,7 @@ Maybe clear the markers and delete the symbol's edebug property?"
def-name (if (and defining-form-p
(eq 'name (car (cdr spec)))
(eq 'symbol (edebug-next-token-class)))
(edebug-original-read (current-buffer))))))
(read (current-buffer))))))
;;;(message "all defs: %s all forms: %s" edebug-all-defs edebug-all-forms)
(cond
(defining-form-p
@ -3209,7 +3194,7 @@ function or macro is called, Edebug will be called there as well."
(if (looking-at "\(")
(edebug--form-data-name
(edebug-get-form-data-entry (point)))
(edebug-original-read (current-buffer))))))
(read (current-buffer))))))
(edebug-instrument-function func))))
@ -3237,25 +3222,14 @@ canceled the first time the function is entered."
(put function 'edebug-on-entry nil))
(if (not (fboundp 'edebug-original-debug-on-entry))
(fset 'edebug-original-debug-on-entry (symbol-function 'debug-on-entry)))
'(fset 'debug-on-entry 'edebug-debug-on-entry) ;; Should we do this?
'(advice-add 'debug-on-entry :around 'edebug--debug-on-entry) ;; Should we do this?
;; Also need edebug-cancel-debug-on-entry
'(defun edebug-debug-on-entry (function)
"Request FUNCTION to invoke debugger each time it is called.
If the user continues, FUNCTION's execution proceeds.
Works by modifying the definition of FUNCTION,
which must be written in Lisp, not predefined.
Use `cancel-debug-on-entry' to cancel the effect of this command.
Redefining FUNCTION also does that.
This version is from Edebug. If the function is instrumented for
Edebug, it calls `edebug-on-entry'."
(interactive "aDebug on entry (to function): ")
'(defun edebug--debug-on-entry (orig function)
"If the function is instrumented for Edebug, call `edebug-on-entry'."
(let ((func-data (get function 'edebug)))
(if (or (null func-data) (markerp func-data))
(edebug-original-debug-on-entry function)
(funcall orig function)
(edebug-on-entry function))))
@ -4136,9 +4110,8 @@ With prefix argument, make it a temporary breakpoint."
'edebug--called-interactively-skip)
(remove-hook 'cl-read-load-hooks 'edebug--require-cl-read)
(edebug-uninstall-read-eval-functions)
;; continue standard unloading
;; Continue standard unloading.
nil)
(provide 'edebug)
;;; edebug.el ends here

View file

@ -522,11 +522,15 @@ it marks the next defun after the ones already marked."
(beginning-of-defun))
(re-search-backward "^\n" (- (point) 1) t)))))
(defun narrow-to-defun (&optional _arg)
(defvar narrow-to-defun-include-comments nil
"If non-nil, `narrow-to-defun' will also show comments preceding the defun.")
(defun narrow-to-defun (&optional include-comments)
"Make text outside current defun invisible.
The defun visible is the one that contains point or follows point.
Optional ARG is ignored."
(interactive)
The current defun is the one that contains point or follows point.
Preceding comments are included if INCLUDE-COMMENTS is non-nil.
Interactively, the behavior depends on `narrow-to-defun-include-comments'."
(interactive (list narrow-to-defun-include-comments))
(save-excursion
(widen)
(let ((opoint (point))
@ -562,6 +566,18 @@ Optional ARG is ignored."
(setq end (point))
(beginning-of-defun)
(setq beg (point)))
(when include-comments
(goto-char beg)
;; Move back past all preceding comments (and whitespace).
(when (forward-comment -1)
(while (forward-comment -1))
;; Move forwards past any page breaks within these comments.
(when (and page-delimiter (not (string= page-delimiter "")))
(while (re-search-forward page-delimiter beg t)))
;; Lastly, move past any empty lines.
(skip-chars-forward "[:space:]\n")
(beginning-of-line)
(setq beg (point))))
(goto-char end)
(re-search-backward "^\n" (- (point) 1) t)
(narrow-to-region beg end))))

View file

@ -129,7 +129,7 @@ Also add the value to the front of the list in the variable `values'."
(interactive
(list (read--expression "Eval: ")))
(message "Evaluating...")
(setq values (cons (eval expression) values))
(setq values (cons (eval expression lexical-binding) values))
(pp-display-expression (car values) "*Pp Eval Output*"))
;;;###autoload
@ -165,7 +165,7 @@ With argument, pretty-print output into current buffer.
Ignores leading comment characters."
(interactive "P")
(if arg
(insert (pp-to-string (eval (pp-last-sexp))))
(insert (pp-to-string (eval (pp-last-sexp) lexical-binding)))
(pp-eval-expression (pp-last-sexp))))
;;;###autoload

View file

@ -632,14 +632,14 @@ e.g. a LEFT-LEVEL of nil means this is a token that behaves somewhat like
an open-paren, whereas a RIGHT-LEVEL of nil would correspond to something
like a close-paren.")
(defvar smie-forward-token-function 'smie-default-forward-token
(defvar smie-forward-token-function #'smie-default-forward-token
"Function to scan forward for the next token.
Called with no argument should return a token and move to its end.
If no token is found, return nil or the empty string.
It can return nil when bumping into a parenthesis, which lets SMIE
use syntax-tables to handle them in efficient C code.")
(defvar smie-backward-token-function 'smie-default-backward-token
(defvar smie-backward-token-function #'smie-default-backward-token
"Function to scan backward the previous token.
Same calling convention as `smie-forward-token-function' except
it should move backward to the beginning of the previous token.")
@ -806,9 +806,9 @@ Possible return values:
nil: we skipped over an identifier, matched parentheses, ..."
(smie-next-sexp
(indirect-function smie-backward-token-function)
(indirect-function 'backward-sexp)
(indirect-function 'smie-op-left)
(indirect-function 'smie-op-right)
(indirect-function #'backward-sexp)
(indirect-function #'smie-op-left)
(indirect-function #'smie-op-right)
halfsexp))
(defun smie-forward-sexp (&optional halfsexp)
@ -827,9 +827,9 @@ Possible return values:
nil: we skipped over an identifier, matched parentheses, ..."
(smie-next-sexp
(indirect-function smie-forward-token-function)
(indirect-function 'forward-sexp)
(indirect-function 'smie-op-right)
(indirect-function 'smie-op-left)
(indirect-function #'forward-sexp)
(indirect-function #'smie-op-right)
(indirect-function #'smie-op-left)
halfsexp))
;;; Miscellaneous commands using the precedence parser.
@ -1121,7 +1121,7 @@ OPENER is non-nil if TOKEN is an opener and nil if it's a closer."
:type 'integer
:group 'smie)
(defvar smie-rules-function 'ignore
(defvar smie-rules-function #'ignore
"Function providing the indentation rules.
It takes two arguments METHOD and ARG where the meaning of ARG
and the expected return value depends on METHOD.
@ -2121,41 +2121,45 @@ position corresponding to each rule."
otraces)
;; Finally, guess the indentation rules.
(let ((ssigs nil)
(rules nil))
;; Sort the sigs by frequency of occurrence.
(maphash (lambda (sig sig-data) (push (cons sig sig-data) ssigs)) sigs)
(setq ssigs (sort ssigs (lambda (sd1 sd2) (> (cadr sd1) (cadr sd2)))))
(while ssigs
(pcase-let ((`(,sig ,total ,off-alist ,cotraces) (pop ssigs)))
(cl-assert (= total (apply #'+ (mapcar #'cdr off-alist))))
(let* ((sorted-off-alist
(sort off-alist (lambda (x y) (> (cdr x) (cdr y)))))
(offset (caar sorted-off-alist)))
(if (zerop offset)
;; Nothing to do with this sig; indentation is
;; correct already.
nil
(push (cons (+ offset (nth 2 sig)) sig) rules)
;; Adjust the rest of the data.
(pcase-dolist ((and cotrace `(,count ,toffset . ,trace))
cotraces)
(setf (nth 1 cotrace) (- toffset offset))
(dolist (sig trace)
(let ((sig-data (cdr (assq sig ssigs))))
(when sig-data
(let* ((ooff-data (assq toffset (nth 1 sig-data)))
(noffset (- toffset offset))
(noff-data
(or (assq noffset (nth 1 sig-data))
(let ((off-data (cons noffset 0)))
(push off-data (nth 1 sig-data))
off-data))))
(cl-assert (>= (cdr ooff-data) count))
(cl-decf (cdr ooff-data) count)
(cl-incf (cdr noff-data) count))))))))))
(message "Guessing...done")
rules))))
(prog1
(smie-config--guess-1 sigs)
(message "Guessing...done")))))
(defun smie-config--guess-1 (sigs)
(let ((ssigs nil)
(rules nil))
;; Sort the sigs by frequency of occurrence.
(maphash (lambda (sig sig-data) (push (cons sig sig-data) ssigs)) sigs)
(setq ssigs (sort ssigs (lambda (sd1 sd2) (> (cadr sd1) (cadr sd2)))))
(while ssigs
(pcase-let ((`(,sig ,total ,off-alist ,cotraces) (pop ssigs)))
(cl-assert (= total (apply #'+ (mapcar #'cdr off-alist))))
(let* ((sorted-off-alist
(sort off-alist (lambda (x y) (> (cdr x) (cdr y)))))
(offset (caar sorted-off-alist)))
(if (zerop offset)
;; Nothing to do with this sig; indentation is
;; correct already.
nil
(push (cons (+ offset (nth 2 sig)) sig) rules)
;; Adjust the rest of the data.
(pcase-dolist ((and cotrace `(,count ,toffset . ,trace))
cotraces)
(setf (nth 1 cotrace) (- toffset offset))
(dolist (sig trace)
(let ((sig-data (cdr (assq sig ssigs))))
(when sig-data
(let* ((ooff-data (assq toffset (nth 1 sig-data)))
(noffset (- toffset offset))
(noff-data
(or (assq noffset (nth 1 sig-data))
(let ((off-data (cons noffset 0)))
(push off-data (nth 1 sig-data))
off-data))))
(cl-assert (>= (cdr ooff-data) count))
(cl-decf (cdr ooff-data) count)
(cl-incf (cdr noff-data) count))))))))))
rules))
(defun smie-config-guess ()
"Try and figure out this buffer's indentation settings.

View file

@ -32,6 +32,113 @@
;;; Code:
(require 'pcase)
(defmacro internal--thread-argument (first? &rest forms)
"Internal implementation for `thread-first' and `thread-last'.
When Argument FIRST? is non-nil argument is threaded first, else
last. FORMS are the expressions to be threaded."
(pcase forms
(`(,x (,f . ,args) . ,rest)
`(internal--thread-argument
,first? ,(if first? `(,f ,x ,@args) `(,f ,@args ,x)) ,@rest))
(`(,x ,f . ,rest) `(internal--thread-argument ,first? (,f ,x) ,@rest))
(_ (car forms))))
(defmacro thread-first (&rest forms)
"Thread FORMS elements as the first argument of their succesor.
Example:
(thread-first
5
(+ 20)
(/ 25)
-
(+ 40))
Is equivalent to:
(+ (- (/ (+ 5 20) 25)) 40)
Note how the single `-' got converted into a list before
threading."
(declare (indent 1)
(debug (form &rest [&or symbolp (sexp &rest form)])))
`(internal--thread-argument t ,@forms))
(defmacro thread-last (&rest forms)
"Thread FORMS elements as the last argument of their succesor.
Example:
(thread-last
5
(+ 20)
(/ 25)
-
(+ 40))
Is equivalent to:
(+ 40 (- (/ 25 (+ 20 5))))
Note how the single `-' got converted into a list before
threading."
(declare (indent 1) (debug thread-first))
`(internal--thread-argument nil ,@forms))
(defsubst internal--listify (elt)
"Wrap ELT in a list if it is not one."
(if (not (listp elt))
(list elt)
elt))
(defsubst internal--check-binding (binding)
"Check BINDING is properly formed."
(when (> (length binding) 2)
(signal
'error
(cons "`let' bindings can have only one value-form" binding)))
binding)
(defsubst internal--build-binding-value-form (binding prev-var)
"Build the conditional value form for BINDING using PREV-VAR."
`(,(car binding) (and ,prev-var ,(cadr binding))))
(defun internal--build-binding (binding prev-var)
"Check and build a single BINDING with PREV-VAR."
(thread-first
binding
internal--listify
internal--check-binding
(internal--build-binding-value-form prev-var)))
(defun internal--build-bindings (bindings)
"Check and build conditional value forms for BINDINGS."
(let ((prev-var t))
(mapcar (lambda (binding)
(let ((binding (internal--build-binding binding prev-var)))
(setq prev-var (car binding))
binding))
bindings)))
(defmacro if-let (bindings then &rest else)
"Process BINDINGS and if all values are non-nil eval THEN, else ELSE.
Argument BINDINGS is a list of tuples whose car is a symbol to be
bound and (optionally) used in THEN, and its cadr is a sexp to be
evaled to set symbol's value. In the special case you only want
to bind a single value, BINDINGS can just be a plain tuple."
(declare (indent 2) (debug ((&rest (symbolp form)) form body)))
(when (and (<= (length bindings) 2)
(not (listp (car bindings))))
;; Adjust the single binding case
(setq bindings (list bindings)))
`(let* ,(internal--build-bindings bindings)
(if ,(car (internal--listify (car (last bindings))))
,then
,@else)))
(defmacro when-let (bindings &rest body)
"Process BINDINGS and if all values are non-nil eval BODY.
Argument BINDINGS is a list of tuples whose car is a symbol to be
bound and (optionally) used in BODY, and its cadr is a sexp to be
evaled to set symbol's value. In the special case you only want
to bind a single value, BINDINGS can just be a plain tuple."
(declare (indent 1) (debug if-let))
(list 'if-let bindings (macroexp-progn body)))
(defsubst hash-table-keys (hash-table)
"Return a list of keys in HASH-TABLE."
(let ((keys '()))
@ -52,9 +159,7 @@
"Join all STRINGS using SEPARATOR."
(mapconcat 'identity strings separator))
(defsubst string-reverse (str)
"Reverse the string STR."
(apply 'string (nreverse (string-to-list str))))
(define-obsolete-function-alias 'string-reverse 'reverse "24.5")
(defsubst string-trim-left (string)
"Remove leading whitespace from STRING."

View file

@ -726,11 +726,11 @@ If command is repeated at same position, delete the rectangle."
;; Set cua--rectangle to indicate we're marking a rectangle.
;; Be careful if we are already marking a rectangle.
(setq cua--rectangle
(if (and cua--last-rectangle
(or (and cua--last-rectangle
(eq (car cua--last-rectangle) (current-buffer))
(eq (car (cdr cua--last-rectangle)) (point)))
(cdr (cdr cua--last-rectangle))
(cua--rectangle-get-corners))
(eq (car (cdr cua--last-rectangle)) (point))
(cdr (cdr cua--last-rectangle)))
(cua--rectangle-get-corners))
cua--status-string (if (cua--rectangle-virtual-edges) " [R]" "")
cua--last-rectangle nil)
(activate-mark))

View file

@ -107,7 +107,7 @@
;; ----------------
;; Bug reports and ideas contributed by many users have helped
;; improve Viper and the various versions of VIP.
;; See the on-line manual for a complete list of contributors.
;; See the manual for a complete list of contributors.
;;
;;
;;; Notes:

View file

@ -1,3 +1,7 @@
2014-07-08 Stefan Monnier <monnier@iro.umontreal.ca>
* erc.el (erc-channel-receive-names): Reduce redundancy.
2014-06-19 Kelvin White <kelvin.white77@gmail.com>
* erc-backend.el: Handle user modes in relevant server responses

View file

@ -9,7 +9,7 @@
;; Andreas Fuchs (afs@void.at)
;; Gergely Nagy (algernon@midgard.debian.net)
;; David Edmondson (dme@dme.org)
;; Kelvin White <kelvin.white77@gmail.com>
;; Kelvin White (kwhite@gnu.org)
;; Maintainer: emacs-devel@gnu.org
;; Keywords: IRC, chat, client, Internet
;; Version: 5.3
@ -2797,7 +2797,8 @@ VALUE is computed by evaluating the rest of LINE in Lisp."
(concat "\n" (pp-to-string val))
(format " %S\n" val)))))
(apropos-internal "^erc-" 'custom-variable-p))))
(current-buffer)) t)
(current-buffer))
t)
(t nil)))
(defalias 'erc-cmd-VAR 'erc-cmd-SET)
(defalias 'erc-cmd-VARIABLE 'erc-cmd-SET)
@ -3874,7 +3875,8 @@ If FACE is non-nil, it will be used to propertize the prompt. If it is nil,
(insert (read-from-minibuffer "Message: "
(string (if (featurep 'xemacs)
last-command-char
last-command-event)) read-map))
last-command-event))
read-map))
(erc-send-current-line)))
(defvar erc-action-history-list ()
@ -4106,10 +4108,12 @@ E.g. \"Read error to Nick [user@some.host]: 110\" would be shortened to
host (regexp-quote host))
(or (when (string-match (concat "^\\(Read error\\) to "
nick "\\[" host "\\]: "
"\\(.+\\)$") reason)
"\\(.+\\)$")
reason)
(concat (match-string 1 reason) ": " (match-string 2 reason)))
(when (string-match (concat "^\\(Ping timeout\\) for "
nick "\\[" host "\\]$") reason)
nick "\\[" host "\\]$")
reason)
(match-string 1 reason))
reason))
@ -4226,7 +4230,8 @@ See also `erc-format-nick-function'."
(let ((nick (erc-server-user-nickname user)))
(concat (erc-propertize
(erc-get-user-mode-prefix nick)
'face 'erc-nick-prefix-face) nick)))
'face 'erc-nick-prefix-face)
nick)))
(defun erc-get-user-mode-prefix (user)
(when user
@ -4252,7 +4257,8 @@ also `erc-format-nick-function'."
(let ((nick (erc-server-user-nickname user)))
(concat (erc-propertize
(erc-get-user-mode-prefix nick)
'face 'erc-nick-prefix-face) nick nick))))
'face 'erc-nick-prefix-face)
nick))))
(defun erc-format-my-nick ()
"Return the beginning of this user's message, correctly propertized."
@ -4772,24 +4778,16 @@ channel."
(let ((updatep t))
(setq name item op 'off voice 'off halfop 'off admin 'off owner 'off)
(if (rassq (elt item 0) prefix)
(cond ((= (length item) 1)
(setq updatep nil))
((eq (elt item 0) voice-ch)
(setq name (substring item 1)
voice 'on))
((eq (elt item 0) hop-ch)
(setq name (substring item 1)
halfop 'on))
((eq (elt item 0) op-ch)
(setq name (substring item 1)
op 'on))
((eq (elt item 0) adm-ch)
(setq name (substring item 1)
admin 'on))
((eq (elt item 0) own-ch)
(setq name (substring item 1)
owner 'on))
(t (setq name (substring item 1)))))
(if (= (length item) 1)
(setq updatep nil)
(setq name (substring item 1))
(setf (pcase (aref item 0)
((pred (eq voice-ch)) voice)
((pred (eq hop-ch)) hop)
((pred (eq op-ch)) op)
((pred (eq adm-ch)) adm)
((pred (eq own-ch)) own))
'on)))
(when updatep
(puthash (erc-downcase name) t
erc-channel-new-member-names)

View file

@ -188,7 +188,8 @@ The options are `begin', `after' or `end'."
(add-hook 'eshell-post-command-hook
(function
(lambda ()
(setq eshell-smart-command-done t))) t t)
(setq eshell-smart-command-done t)))
t t)
(unless (eq eshell-review-quick-commands t)
(add-hook 'eshell-post-command-hook
@ -200,8 +201,7 @@ The options are `begin', `after' or `end'."
(unless eshell-currently-handling-window
(let ((inhibit-point-motion-hooks t)
(eshell-currently-handling-window t))
(save-selected-window
(select-window wind)
(with-selected-window wind
(eshell-smart-redisplay)))))
(defun eshell-refresh-windows (&optional frame)
@ -212,12 +212,12 @@ The options are `begin', `after' or `end'."
(lambda (wind)
(with-current-buffer (window-buffer wind)
(if eshell-mode
(let (window-scroll-functions)
(let (window-scroll-functions) ;;FIXME: Why?
(eshell-smart-scroll-window wind (window-start))
(setq affected t))))))
0 frame)
(if affected
(let (window-scroll-functions)
(let (window-scroll-functions) ;;FIXME: Why?
(eshell-redisplay)))))
(defun eshell-smart-display-setup ()

View file

@ -620,7 +620,7 @@ color. The function should accept a single argument, the color name."
'help-echo
(let ((hsv (apply 'color-rgb-to-hsv
(color-name-to-rgb (car color)))))
(format "H:%d S:%d V:%d"
(format "H:%.2f S:%.2f V:%.2f"
(nth 0 hsv) (nth 1 hsv) (nth 2 hsv)))))
(when callback
(make-text-button

View file

@ -2746,8 +2746,6 @@ If PATTERN is nil, return the name of the frame's base font, which never
contains wildcards.
Given optional arguments FACE and FRAME, return a font which is
also the same size as FACE on FRAME, or fail."
(or (symbolp face)
(setq face (face-name face)))
(and (eq frame t)
(setq frame nil))
(if pattern

View file

@ -564,7 +564,7 @@ A value of nil means ignore them; anything else means query."
In fact, this means that all read-only buffers normally have
View mode enabled, including buffers that are read-only because
you visit a file you cannot alter, and buffers you make read-only
using \\[toggle-read-only]."
using \\[read-only-mode]."
:type 'boolean
:group 'view)
@ -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)
@ -1500,7 +1502,7 @@ file names with wildcards."
(defun find-file-read-only (filename &optional wildcards)
"Edit file FILENAME but don't allow changes.
Like \\[find-file], but marks buffer as read-only.
Use \\[toggle-read-only] to permit editing."
Use \\[read-only-mode] to permit editing."
(interactive
(find-file-read-args "Find file read-only: "
(confirm-nonexistent-file-or-buffer)))
@ -1509,7 +1511,7 @@ Use \\[toggle-read-only] to permit editing."
(defun find-file-read-only-other-window (filename &optional wildcards)
"Edit file FILENAME in another window but don't allow changes.
Like \\[find-file-other-window], but marks buffer as read-only.
Use \\[toggle-read-only] to permit editing."
Use \\[read-only-mode] to permit editing."
(interactive
(find-file-read-args "Find file read-only other window: "
(confirm-nonexistent-file-or-buffer)))
@ -1518,7 +1520,7 @@ Use \\[toggle-read-only] to permit editing."
(defun find-file-read-only-other-frame (filename &optional wildcards)
"Edit file FILENAME in another frame but don't allow changes.
Like \\[find-file-other-frame], but marks buffer as read-only.
Use \\[toggle-read-only] to permit editing."
Use \\[read-only-mode] to permit editing."
(interactive
(find-file-read-args "Find file read-only other frame: "
(confirm-nonexistent-file-or-buffer)))
@ -1784,6 +1786,14 @@ When nil, never request confirmation."
:version "22.1"
:type '(choice integer (const :tag "Never request confirmation" nil)))
(defcustom out-of-memory-warning-percentage 50
"Warn if file size exceeds this percentage of available free memory.
When nil, never issue warning."
:group 'files
:group 'find-file
:version "24.4"
:type '(choice integer (const :tag "Never issue warning" nil)))
(defun abort-if-file-too-large (size op-type filename)
"If file SIZE larger than `large-file-warning-threshold', allow user to abort.
OP-TYPE specifies the file operation being performed (for message to user)."
@ -1794,6 +1804,25 @@ OP-TYPE specifies the file operation being performed (for message to user)."
(file-size-human-readable size) op-type))))
(error "Aborted")))
(defun warn-maybe-out-of-memory (size)
"Warn if an attempt to open file of SIZE bytes may run out of memory."
(when (and (numberp size) (not (zerop size))
(integerp out-of-memory-warning-percentage))
(let ((meminfo (memory-info)))
(when (consp meminfo)
(let ((total-free-memory (float (+ (nth 1 meminfo) (nth 3 meminfo)))))
(when (> (/ size 1024)
(/ (* total-free-memory out-of-memory-warning-percentage)
100.0))
(warn
"You are trying to open a file whose size (%s)
exceeds the %S%% of currently available free memory (%s).
If that fails, try to open it with `find-file-literally'
\(but note that some characters might be displayed incorrectly)."
(file-size-human-readable size)
out-of-memory-warning-percentage
(file-size-human-readable (* total-free-memory 1024)))))))))
(defun find-file-noselect (filename &optional nowarn rawfile wildcards)
"Read file FILENAME into a buffer and return the buffer.
If a buffer exists visiting FILENAME, return that one, but
@ -1846,7 +1875,8 @@ the various files."
(setq buf other))))
;; Check to see if the file looks uncommonly large.
(when (not (or buf nowarn))
(abort-if-file-too-large (nth 7 attributes) "open" filename))
(abort-if-file-too-large (nth 7 attributes) "open" filename)
(warn-maybe-out-of-memory (nth 7 attributes)))
(if buf
;; We are using an existing buffer.
(let (nonexistent)
@ -4987,6 +5017,7 @@ prints a message in the minibuffer. Instead, use `set-buffer-modified-p'."
(set-buffer-modified-p arg))
(defun toggle-read-only (&optional arg interactive)
"Change whether this buffer is read-only."
(declare (obsolete read-only-mode "24.3"))
(interactive (list current-prefix-arg t))
(if interactive

View file

@ -52,7 +52,7 @@
(frames . "Emacs frames and window systems")
(games . "games, jokes and amusements")
(hardware . "interfacing with system hardware")
(help . "on-line help systems")
(help . "Emacs help systems")
(hypermedia . "links between text or other media types")
(i18n . "internationalization and character-set support")
(internal . "code for Emacs internals, build process, defaults")

View file

@ -256,60 +256,43 @@ there (in decreasing order of priority)."
;; If the initial frame is still around, apply initial-frame-alist
;; and default-frame-alist to it.
(when (frame-live-p frame-initial-frame)
;; When tool-bar has been switched off, correct the frame size
;; by the lines added in x-create-frame for the tool-bar and
;; switch `tool-bar-mode' off.
(when (display-graphic-p)
(let ((tool-bar-lines (or (assq 'tool-bar-lines initial-frame-alist)
(assq 'tool-bar-lines window-system-frame-alist)
(assq 'tool-bar-lines default-frame-alist))))
(when (and tool-bar-originally-present
(or (null tool-bar-lines)
(null (cdr tool-bar-lines))
(eq 0 (cdr tool-bar-lines))))
(let* ((char-height (frame-char-height frame-initial-frame))
(image-height tool-bar-images-pixel-height)
(margin (cond ((and (consp tool-bar-button-margin)
(integerp (cdr tool-bar-button-margin))
(> tool-bar-button-margin 0))
(cdr tool-bar-button-margin))
((and (integerp tool-bar-button-margin)
(> tool-bar-button-margin 0))
tool-bar-button-margin)
(t 0)))
(relief (if (and (integerp tool-bar-button-relief)
(> tool-bar-button-relief 0))
tool-bar-button-relief 3))
(lines (/ (+ image-height
(* 2 margin)
(* 2 relief)
(1- char-height))
char-height))
(height (frame-parameter frame-initial-frame 'height))
(newparms (list (cons 'height (- height lines))))
(initial-top (cdr (assq 'top
frame-initial-geometry-arguments)))
(let ((tool-bar-lines
(or (assq 'tool-bar-lines initial-frame-alist)
(assq 'tool-bar-lines window-system-frame-alist)
(assq 'tool-bar-lines default-frame-alist))))
;; Shrink frame by its initial tool bar height iff either zero
;; tool bar lines have been requested in one of the frame's
;; alists or tool bar mode has been turned off explicitly in
;; the user's init file.
(when (and tool-bar-lines
(> frame-initial-frame-tool-bar-height 0)
(or (not tool-bar-mode)
(null (cdr tool-bar-lines))
(eq 0 (cdr tool-bar-lines))))
(set-frame-height
frame-initial-frame (- (frame-text-height frame-initial-frame)
frame-initial-frame-tool-bar-height)
nil t)
(let* ((initial-top
(cdr (assq 'top frame-initial-geometry-arguments)))
(top (frame-parameter frame-initial-frame 'top)))
(when (and (consp initial-top) (eq '- (car initial-top)))
(let ((adjusted-top
(cond ((and (consp top)
(eq '+ (car top)))
(list '+
(+ (cadr top)
(* lines char-height))))
((and (consp top)
(eq '- (car top)))
(list '-
(- (cadr top)
(* lines char-height))))
(t (+ top (* lines char-height))))))
(setq newparms
(append newparms
`((top . ,adjusted-top))
nil))))
(modify-frame-parameters frame-initial-frame newparms)
(tool-bar-mode -1)))))
(cond
((and (consp top) (eq '+ (car top)))
(list '+ (+ (cadr top)
frame-initial-frame-tool-bar-height)))
((and (consp top) (eq '- (car top)))
(list '- (- (cadr top)
frame-initial-frame-tool-bar-height)))
(t (+ top frame-initial-frame-tool-bar-height)))))
(modify-frame-parameters
frame-initial-frame '((top . adjusted-top))))))
(tool-bar-mode -1))))
;; The initial frame we create above always has a minibuffer.
;; If the user wants to remove it, or make it a minibuffer-only

View file

@ -1,3 +1,19 @@
2014-07-22 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-utils.el (gnus-recursive-directory-files):
Unify hard or symbolic links (bug#18063).
2013-07-17 Albert Krewinkel <albert@zeitkraut.de>
* gnus-msg.el (gnus-configure-posting-style):
Allow string replacements in values when matching against a header.
2014-07-07 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-start.el (gnus-dribble-read-file): Don't stop the auto-saving of
the dribble buffer even when it is shrunk a lot.
<http://thread.gmane.org/gmane.emacs.gnus.user/16923>
2014-06-26 Glenn Morris <rgm@gnu.org>
* mm-util.el (help-function-arglist): Remove outdated declaration.

View file

@ -1726,7 +1726,20 @@ this is a reply."
(var (or gnus-outgoing-message-group gnus-message-archive-group))
(gcc-self-val
(and group (not (gnus-virtual-group-p group))
(gnus-group-find-parameter group 'gcc-self)))
(gnus-group-find-parameter group 'gcc-self t)))
(gcc-self-get (lambda (gcc-self-val group)
(if (stringp gcc-self-val)
(if (string-match " " gcc-self-val)
(concat "\"" gcc-self-val "\"")
gcc-self-val)
;; In nndoc groups, we use the parent group name
;; instead of the current group.
(let ((group (or (gnus-group-find-parameter
gnus-newsgroup-name 'parent-group)
group)))
(if (string-match " " group)
(concat "\"" group "\"")
group)))))
result
(groups
(cond
@ -1777,19 +1790,11 @@ this is a reply."
(if gcc-self-val
;; Use the `gcc-self' param value instead.
(progn
(insert
(if (stringp gcc-self-val)
(if (string-match " " gcc-self-val)
(concat "\"" gcc-self-val "\"")
gcc-self-val)
;; In nndoc groups, we use the parent group name
;; instead of the current group.
(let ((group (or (gnus-group-find-parameter
gnus-newsgroup-name 'parent-group)
group)))
(if (string-match " " group)
(concat "\"" group "\"")
group))))
(insert (if (listp gcc-self-val)
(mapconcat (lambda (val)
(funcall gcc-self-get val group))
gcc-self-val ", ")
(funcall gcc-self-get gcc-self-val group)))
(if (not (eq gcc-self-val 'none))
(insert "\n")
(gnus-delete-line)))
@ -1826,7 +1831,7 @@ this is a reply."
(with-current-buffer gnus-summary-buffer
gnus-posting-styles)
gnus-posting-styles))
style match attribute value v results
style match attribute value v results matched-string
filep name address element)
;; If the group has a posting-style parameter, add it at the end with a
;; regexp matching everything, to be sure it takes precedence over all
@ -1846,7 +1851,9 @@ this is a reply."
(when (cond
((stringp match)
;; Regexp string match on the group name.
(string-match match group))
(when (string-match match group)
(setq matched-string group)
t))
((eq match 'header)
;; Obsolete format of header match.
(and (gnus-buffer-live-p gnus-article-copy)
@ -1875,7 +1882,8 @@ this is a reply."
(nnheader-narrow-to-headers)
(let ((header (message-fetch-field (nth 1 match))))
(and header
(string-match (nth 2 match) header)))))))
(string-match (nth 2 match) header)
(setq matched-string header)))))))
(t
;; This is a form to be evalled.
(eval match)))))
@ -1896,10 +1904,11 @@ this is a reply."
(setq v
(cond
((stringp value)
(if (and (stringp match)
(if (and matched-string
(gnus-string-match-p "\\\\[&[:digit:]]" value)
(match-beginning 1))
(gnus-match-substitute-replacement value nil nil group)
(gnus-match-substitute-replacement value nil nil
matched-string)
value))
((or (symbolp value)
(functionp value))

View file

@ -889,6 +889,11 @@ If REGEXP is given, lines that match it will be deleted."
(setq buffer-save-without-query t)
(erase-buffer)
(setq buffer-file-name dribble-file)
;; The buffer may be shrunk a lot when deleting old entries.
;; It caused the auto-saving to stop.
(if (featurep 'emacs)
(set (make-local-variable 'auto-save-include-big-deletions) t)
(set (make-local-variable 'disable-auto-save-when-buffer-shrinks) nil))
(auto-save-mode t)
(buffer-disable-undo)
(bury-buffer (current-buffer))

View file

@ -1910,17 +1910,25 @@ Sizes are in pixels."
image)))
image)))
(eval-when-compile (require 'gmm-utils))
(defun gnus-recursive-directory-files (dir)
"Return all regular files below DIR."
(let (files)
(dolist (file (directory-files dir t))
(when (and (not (member (file-name-nondirectory file) '("." "..")))
(file-readable-p file))
(cond
((file-regular-p file)
(push file files))
((file-directory-p file)
(setq files (append (gnus-recursive-directory-files file) files))))))
"Return all regular files below DIR.
The first found will be returned if a file has hard or symbolic links."
(let (files attr attrs)
(gmm-labels
((fn (directory)
(dolist (file (directory-files directory t))
(setq attr (file-attributes (file-truename file)))
(when (and (not (member attr attrs))
(not (member (file-name-nondirectory file)
'("." "..")))
(file-readable-p file))
(push attr attrs)
(cond ((file-regular-p file)
(push file files))
((file-directory-p file)
(fn file)))))))
(fn dir))
files))
(defun gnus-list-memq-of-list (elements list)

View file

@ -23,7 +23,7 @@
;;; Commentary:
;; This code implements GNU Emacs's on-line help system, the one invoked by
;; This code implements GNU Emacs's built-in help system, the one invoked by
;; `M-x help-for-help'.
;;; Code:
@ -198,13 +198,13 @@ d PATTERN Show a list of functions, variables, and other items whose
documentation matches the PATTERN (a list of words or a regexp).
e Go to the *Messages* buffer which logs echo-area messages.
f FUNCTION Display documentation for the given function.
F COMMAND Show the on-line manual's section that describes the command.
F COMMAND Show the Emacs manual's section that describes the command.
g Display information about the GNU project.
h Display the HELLO file which illustrates various scripts.
i Start the Info documentation reader: read on-line manuals.
i Start the Info documentation reader: read included manuals.
I METHOD Describe a specific input method, or RET for current.
k KEYS Display the full documentation for the key sequence.
K KEYS Show the on-line manual's section for the command bound to KEYS.
K KEYS Show the Emacs manual's section for the command bound to KEYS.
l Show last 300 input keystrokes (lossage).
L LANG-ENV Describes a specific language environment, or RET for current.
m Display documentation of current minor modes and current major mode,
@ -214,7 +214,7 @@ p TOPIC Find packages matching a given topic keyword.
P PACKAGE Describe the given Emacs Lisp package.
r Display the Emacs manual in Info mode.
s Display contents of current syntax table, plus explanations.
S SYMBOL Show the section for the given symbol in the on-line manual
S SYMBOL Show the section for the given symbol in the Info manual
for the programming language used in this buffer.
t Start the Emacs learn-by-doing tutorial.
v VARIABLE Display the given variable's documentation and value.

View file

@ -1389,11 +1389,13 @@ Setup char-width-table appropriate for non-CJK language environment."
(when (setq unicode-category-table
(unicode-property-table-internal 'general-category))
(map-char-table #'(lambda (key val)
(if (and val
(or (and (/= (aref (symbol-name val) 0) ?M)
(/= (aref (symbol-name val) 0) ?C))
(eq val 'Zs)))
(modify-category-entry key ?.)))
(if val
(cond ((or (and (/= (aref (symbol-name val) 0) ?M)
(/= (aref (symbol-name val) 0) ?C))
(eq val 'Zs))
(modify-category-entry key ?.))
((eq val 'Mn)
(modify-category-entry key ?^)))))
unicode-category-table))
(optimize-char-table (standard-category-table))

File diff suppressed because it is too large Load diff

View file

@ -250,39 +250,38 @@ Example: nve5 -> nüe
;; Call quail-make-sisheng-rules for all syllables in sisheng-syllable-table.
;;
(let (sisheng-list)
(with-case-table (standard-case-table) ;FIXME: Why?
(dolist (syllable sisheng-syllable-table)
(setq sisheng-list
(append (quail-make-sisheng-rules syllable)
sisheng-list)))
(dolist (syllable sisheng-syllable-table)
(setq sisheng-list
(append (quail-make-sisheng-rules syllable)
sisheng-list)))
(dolist (syllable sisheng-syllable-table)
(setq sisheng-list
(append (quail-make-sisheng-rules (upcase-initials syllable))
sisheng-list)))
(dolist (syllable sisheng-syllable-table)
(setq sisheng-list
(append (quail-make-sisheng-rules (upcase-initials syllable))
sisheng-list)))
(dolist (syllable sisheng-syllable-table)
(setq sisheng-list
(append (quail-make-sisheng-rules (upcase syllable))
sisheng-list)))
(dolist (syllable sisheng-syllable-table)
(setq sisheng-list
(append (quail-make-sisheng-rules (upcase syllable))
sisheng-list)))
(eval `(quail-define-rules
,@sisheng-list
(eval `(quail-define-rules
,@sisheng-list
("lv5" [""])
("lve5" ["lüe"])
("nv5" [""])
("nve5" ["nüe"])
("lv5" [""])
("lve5" ["lüe"])
("nv5" [""])
("nve5" ["nüe"])
("Lv5" [""])
("Lve5" ["Lüe"])
("Nv5" [""])
("Nve5" ["Nüe"])
("Lv5" [""])
("Lve5" ["Lüe"])
("Nv5" [""])
("Nve5" ["Nüe"])
("LV5" [""])
("LVE5" ["LÜE"])
("NV5" [""])
("NVE5" ["NÜE"])))))
("LV5" [""])
("LVE5" ["LÜE"])
("NV5" [""])
("NVE5" ["NÜE"]))))
;; Local Variables:
;; coding: utf-8

View file

@ -138,6 +138,9 @@ Linum mode is a buffer-local minor mode."
(mapc #'delete-overlay linum-available)
(setq linum-available nil))))
(defun linum--face-height (face)
(aref (font-info (face-font face)) 2))
(defun linum-update-window (win)
"Update line numbers for the portion visible in window WIN."
(goto-char (window-start win))
@ -178,6 +181,12 @@ Linum mode is a buffer-local minor mode."
(let ((inhibit-point-motion-hooks t))
(forward-line))
(setq line (1+ line)))
(when (display-graphic-p)
(setq width (ceiling
;; We'd really want to check the widths rather than the
;; heights, but it's a start.
(/ (* width 1.0 (linum--face-height 'linum))
(frame-char-height)))))
(set-window-margins win width (cdr (window-margins win)))))
(defun linum-after-change (beg end _len)

View file

@ -173,13 +173,12 @@ Any other value of `Man-notify-method' is equivalent to `meek'."
(defcustom Man-width nil
"Number of columns for which manual pages should be formatted.
If nil, the width of the window selected at the moment of man
invocation is used. If non-nil, the width of the frame selected
at the moment of man invocation is used. The value also can be a
positive integer."
If nil, use the width of the window where the manpage is displayed.
If non-nil, use the width of the frame where the manpage is displayed.
The value also can be a positive integer for a fixed width."
:type '(choice (const :tag "Window width" nil)
(const :tag "Frame width" t)
(integer :tag "Specific width" :value 65))
(integer :tag "Fixed width" :value 65))
:group 'man)
(defcustom Man-frame-parameters nil
@ -930,12 +929,14 @@ test/automated/man-tests.el in the emacs bzr repository."
;;;###autoload
(defun man (man-args)
"Get a Un*x manual page and put it in a buffer.
This command is the top-level command in the man package. It
runs a Un*x command to retrieve and clean a manpage in the
This command is the top-level command in the man package.
It runs a Un*x command to retrieve and clean a manpage in the
background and places the results in a `Man-mode' browsing
buffer. See variable `Man-notify-method' for what happens when
the buffer is ready. If a buffer already exists for this man
page, it will display immediately.
buffer. The variable `Man-width' defines the number of columns in
formatted manual pages. The buffer is displayed immediately.
The variable `Man-notify-method' defines how the buffer is displayed.
If a buffer already exists for this man page, it will be displayed
without running the man command.
For a manpage from a particular section, use either of the
following. \"cat(1)\" is how cross-references appear and is
@ -1030,15 +1031,22 @@ names or descriptions. The pattern argument is usually an
;; ther is available).
(when (or window-system
(not (or (getenv "MANWIDTH") (getenv "COLUMNS"))))
;; This isn't strictly correct, since we don't know how
;; the page will actually be displayed, but it seems
;; reasonable.
;; Since the page buffer is displayed beforehand,
;; we can select its window and get the window/frame width.
(setenv "COLUMNS" (number-to-string
(cond
((and (integerp Man-width) (> Man-width 0))
Man-width)
(Man-width (frame-width))
((window-width))))))
(Man-width
(if (window-live-p (get-buffer-window (current-buffer) t))
(with-selected-window (get-buffer-window (current-buffer) t)
(frame-width))
(frame-width)))
(t
(if (window-live-p (get-buffer-window (current-buffer) t))
(with-selected-window (get-buffer-window (current-buffer) t)
(window-width))
(window-width)))))))
;; Since man-db 2.4.3-1, man writes plain text with no escape
;; sequences when stdout is not a tty. In 2.5.0, the following
;; env-var was added to allow control of this (see Debian Bug#340673).
@ -1057,33 +1065,45 @@ Return the buffer in which the manpage will appear."
(message "Invoking %s %s in the background" manual-program man-args)
(setq buffer (generate-new-buffer bufname))
(with-current-buffer buffer
(Man-notify-when-ready buffer)
(setq buffer-undo-list t)
(setq Man-original-frame (selected-frame))
(setq Man-arguments man-args))
(Man-start-calling
(if (fboundp 'start-process)
(set-process-sentinel
(start-process manual-program buffer
(if (memq system-type '(cygwin windows-nt))
shell-file-name
"sh")
shell-command-switch
(format (Man-build-man-command) man-args))
'Man-bgproc-sentinel)
(let ((exit-status
(call-process shell-file-name nil (list buffer nil) nil
shell-command-switch
(format (Man-build-man-command) man-args)))
(msg ""))
(or (and (numberp exit-status)
(= exit-status 0))
(and (numberp exit-status)
(setq msg
(format "exited abnormally with code %d"
exit-status)))
(setq msg exit-status))
(Man-bgproc-sentinel bufname msg)))))
buffer))
(setq Man-arguments man-args)
(Man-mode)
(setq mode-line-process
(concat " " (propertize (if Man-fontify-manpage-flag
"[formatting...]"
"[cleaning...]")
'face 'mode-line-emphasis)))
(Man-start-calling
(if (fboundp 'start-process)
(let ((proc (start-process
manual-program buffer
(if (memq system-type '(cygwin windows-nt))
shell-file-name
"sh")
shell-command-switch
(format (Man-build-man-command) man-args))))
(set-process-sentinel proc 'Man-bgproc-sentinel)
(set-process-filter proc 'Man-bgproc-filter))
(let* ((inhibit-read-only t)
(exit-status
(call-process shell-file-name nil (list buffer nil) nil
shell-command-switch
(format (Man-build-man-command) man-args)))
(msg ""))
(or (and (numberp exit-status)
(= exit-status 0))
(and (numberp exit-status)
(setq msg
(format "exited abnormally with code %d"
exit-status)))
(setq msg exit-status))
(if Man-fontify-manpage-flag
(Man-fontify-manpage)
(Man-cleanup-manpage))
(Man-bgproc-sentinel bufname msg))))))
buffer))
(defun Man-update-manpage ()
"Reformat current manpage by calling the man command again synchronously."
@ -1168,7 +1188,6 @@ See the variable `Man-notify-method' for the different notification behaviors."
"Convert overstriking and underlining to the correct fonts.
Same for the ANSI bold and normal escape sequences."
(interactive)
(message "Please wait: formatting the %s man page..." Man-arguments)
(goto-char (point-min))
;; Fontify ANSI escapes.
(let ((ansi-color-apply-face-function
@ -1183,7 +1202,7 @@ Same for the ANSI bold and normal escape sequences."
;; Multibyte characters exist.
(progn
(goto-char (point-min))
(while (search-forward "__\b\b" nil t)
(while (and (search-forward "__\b\b" nil t) (not (eobp)))
(backward-delete-char 4)
(put-text-property (point) (1+ (point)) 'face 'Man-underline))
(goto-char (point-min))
@ -1191,7 +1210,7 @@ Same for the ANSI bold and normal escape sequences."
(backward-delete-char 4)
(put-text-property (1- (point)) (point) 'face 'Man-underline))))
(goto-char (point-min))
(while (search-forward "_\b" nil t)
(while (and (search-forward "_\b" nil t) (not (eobp)))
(backward-delete-char 2)
(put-text-property (point) (1+ (point)) 'face 'Man-underline))
(goto-char (point-min))
@ -1223,8 +1242,7 @@ Same for the ANSI bold and normal escape sequences."
(while (re-search-forward Man-heading-regexp nil t)
(put-text-property (match-beginning 0)
(match-end 0)
'face 'Man-overstrike)))
(message "%s man page formatted" (Man-page-from-arguments Man-arguments)))
'face 'Man-overstrike))))
(defun Man-highlight-references (&optional xref-man-type)
"Highlight the references on mouse-over.
@ -1286,8 +1304,6 @@ Normally skip any jobs that should have been done by the sed script,
but when called interactively, do those jobs even if the sed
script would have done them."
(interactive "p")
(message "Please wait: cleaning up the %s man page..."
Man-arguments)
(if (or interactive (not Man-sed-script))
(progn
(goto-char (point-min))
@ -1309,8 +1325,35 @@ script would have done them."
;; their preceding chars (but don't put Man-overstrike). (Bug#5566)
(goto-char (point-min))
(while (re-search-forward ".\b" nil t) (backward-delete-char 2))
(Man-softhyphen-to-minus)
(message "%s man page cleaned up" Man-arguments))
(Man-softhyphen-to-minus))
(defun Man-bgproc-filter (process string)
"Manpage background process filter.
When manpage command is run asynchronously, PROCESS is the process
object for the manpage command; when manpage command is run
synchronously, PROCESS is the name of the buffer where the manpage
command is run. Second argument STRING is the entire string of output."
(save-excursion
(let ((Man-buffer (process-buffer process)))
(if (null (buffer-name Man-buffer)) ;; deleted buffer
(set-process-buffer process nil)
(with-current-buffer Man-buffer
(let ((inhibit-read-only t)
(beg (marker-position (process-mark process))))
(save-excursion
(goto-char beg)
(insert string)
(save-restriction
(narrow-to-region
(save-excursion
(goto-char beg)
(line-beginning-position))
(point))
(if Man-fontify-manpage-flag
(Man-fontify-manpage)
(Man-cleanup-manpage)))
(set-marker (process-mark process) (point-max)))))))))
(defun Man-bgproc-sentinel (process msg)
"Manpage background process sentinel.
@ -1329,63 +1372,75 @@ manpage command."
(set-process-buffer process nil))
(with-current-buffer Man-buffer
(let ((case-fold-search nil))
(goto-char (point-min))
(cond ((or (looking-at "No \\(manual \\)*entry for")
(looking-at "[^\n]*: nothing appropriate$"))
(setq err-mess (buffer-substring (point)
(progn
(end-of-line) (point)))
delete-buff t))
(save-excursion
(let ((case-fold-search nil))
(goto-char (point-min))
(cond ((or (looking-at "No \\(manual \\)*entry for")
(looking-at "[^\n]*: nothing appropriate$"))
(setq err-mess (buffer-substring (point)
(progn
(end-of-line) (point)))
delete-buff t))
;; "-k foo", successful exit, but no output (from man-db)
;; ENHANCE-ME: share the check for -k with
;; `Man-highlight-references'. The \\s- bits here are
;; meant to allow for multiple options with -k among them.
((and (string-match "\\(\\`\\|\\s-\\)-k\\s-" Man-arguments)
(eq (process-status process) 'exit)
(= (process-exit-status process) 0)
(= (point-min) (point-max)))
(setq err-mess (format "%s: no matches" Man-arguments)
delete-buff t))
;; "-k foo", successful exit, but no output (from man-db)
;; ENHANCE-ME: share the check for -k with
;; `Man-highlight-references'. The \\s- bits here are
;; meant to allow for multiple options with -k among them.
((and (string-match "\\(\\`\\|\\s-\\)-k\\s-" Man-arguments)
(eq (process-status process) 'exit)
(= (process-exit-status process) 0)
(= (point-min) (point-max)))
(setq err-mess (format "%s: no matches" Man-arguments)
delete-buff t))
((or (stringp process)
(not (and (eq (process-status process) 'exit)
(= (process-exit-status process) 0))))
(or (zerop (length msg))
(progn
(setq err-mess
(concat (buffer-name Man-buffer)
": process "
(let ((eos (1- (length msg))))
(if (= (aref msg eos) ?\n)
(substring msg 0 eos) msg))))
(goto-char (point-max))
(insert (format "\nprocess %s" msg))))
))
(if delete-buff
(kill-buffer Man-buffer)
(if Man-fontify-manpage-flag
(Man-fontify-manpage)
(Man-cleanup-manpage))
((or (stringp process)
(not (and (eq (process-status process) 'exit)
(= (process-exit-status process) 0))))
(or (zerop (length msg))
(progn
(setq err-mess
(concat (buffer-name Man-buffer)
": process "
(let ((eos (1- (length msg))))
(if (= (aref msg eos) ?\n)
(substring msg 0 eos) msg))))
(goto-char (point-max))
(insert (format "\nprocess %s" msg))))
))
(if delete-buff
(if (window-live-p (get-buffer-window Man-buffer t))
(quit-restore-window
(get-buffer-window Man-buffer t) 'kill)
(kill-buffer Man-buffer))
(run-hooks 'Man-cooked-hook)
(Man-mode)
(run-hooks 'Man-cooked-hook)
(if (not Man-page-list)
(let ((args Man-arguments))
(kill-buffer (current-buffer))
(user-error "Can't find the %s manpage"
(Man-page-from-arguments args)))
(set-buffer-modified-p nil))))
;; Restore case-fold-search before calling
;; Man-notify-when-ready because it may switch buffers.
(Man-build-page-list)
(Man-strip-page-headers)
(Man-unindent)
(Man-goto-page 1 t)
(if (not delete-buff)
(Man-notify-when-ready Man-buffer))
(if (not Man-page-list)
(let ((args Man-arguments))
(if (window-live-p (get-buffer-window (current-buffer) t))
(quit-restore-window
(get-buffer-window (current-buffer) t) 'kill)
(kill-buffer (current-buffer)))
(message "Can't find the %s manpage"
(Man-page-from-arguments args)))
(if Man-fontify-manpage-flag
(message "%s man page formatted"
(Man-page-from-arguments Man-arguments))
(message "%s man page cleaned up"
(Man-page-from-arguments Man-arguments)))
(unless (and (processp process)
(not (eq (process-status process) 'exit)))
(setq mode-line-process nil))
(set-buffer-modified-p nil)))))
(if err-mess
(error "%s" err-mess))
(message "%s" err-mess))
))))
(defun Man-page-from-arguments (args)
@ -1429,7 +1484,7 @@ The following man commands are available in the buffer. Try
The following variables may be of some use. Try
\"\\[describe-variable] <variable-name> RET\" for more information:
`Man-notify-method' What happens when manpage formatting is done.
`Man-notify-method' What happens when manpage is ready to display.
`Man-downcase-section-letters-flag' Force section letters to lower case.
`Man-circular-pages-flag' Treat multiple manpage list as circular.
`Man-section-translations-alist' List of section numbers and their Un*x equiv.
@ -1458,11 +1513,7 @@ The following key bindings are currently in effect in the buffer:
(set (make-local-variable 'outline-regexp) Man-heading-regexp)
(set (make-local-variable 'outline-level) (lambda () 1))
(set (make-local-variable 'bookmark-make-record-function)
'Man-bookmark-make-record)
(Man-build-page-list)
(Man-strip-page-headers)
(Man-unindent)
(Man-goto-page 1 t))
'Man-bookmark-make-record))
(defsubst Man-build-section-alist ()
"Build the list of manpage sections."
@ -1516,7 +1567,6 @@ The following key bindings are currently in effect in the buffer:
(page-end (point-max))
(header ""))
(goto-char page-start)
;; (switch-to-buffer (current-buffer))(debug)
(while (not (eobp))
(setq header
(if (looking-at Man-page-header-regexp)

View file

@ -887,8 +887,35 @@ by \"Save Options\" in Custom buffers.")
(interactive)
(customize-set-variable 'scroll-bar-mode nil))
(defun menu-bar-horizontal-scroll-bar ()
"Display horizontal scroll bars on each window."
(interactive)
(customize-set-variable 'horizontal-scroll-bar-mode t))
(defun menu-bar-no-horizontal-scroll-bar ()
"Turn off horizontal scroll bars."
(interactive)
(customize-set-variable 'horizontal-scroll-bar-mode nil))
(defvar menu-bar-showhide-scroll-bar-menu
(let ((menu (make-sparse-keymap "Scroll-bar")))
(bindings--define-key menu [horizontal]
'(menu-item "Horizontal"
menu-bar-horizontal-scroll-bar
:help "Horizontal scroll bar"
:visible (display-graphic-p)
:button (:radio . (eq (cdr (assq 'horizontal-scroll-bars
(frame-parameters)))
t))))
(bindings--define-key menu [none-horizontal]
'(menu-item "None-horizontal"
menu-bar-no-horizontal-scroll-bar
:help "Turn off horizontal scroll bars"
:visible (display-graphic-p)
:button (:radio . (eq (cdr (assq 'horizontal-scroll-bars
(frame-parameters)))
nil))))
(bindings--define-key menu [right]
'(menu-item "On the Right"
@ -896,7 +923,8 @@ by \"Save Options\" in Custom buffers.")
:help "Scroll-bar on the right side"
:visible (display-graphic-p)
:button (:radio . (eq (cdr (assq 'vertical-scroll-bars
(frame-parameters))) 'right))))
(frame-parameters)))
'right))))
(bindings--define-key menu [left]
'(menu-item "On the Left"
@ -904,7 +932,8 @@ by \"Save Options\" in Custom buffers.")
:help "Scroll-bar on the left side"
:visible (display-graphic-p)
:button (:radio . (eq (cdr (assq 'vertical-scroll-bars
(frame-parameters))) 'left))))
(frame-parameters)))
'left))))
(bindings--define-key menu [none]
'(menu-item "None"
@ -912,7 +941,8 @@ by \"Save Options\" in Custom buffers.")
:help "Turn off scroll-bar"
:visible (display-graphic-p)
:button (:radio . (eq (cdr (assq 'vertical-scroll-bars
(frame-parameters))) nil))))
(frame-parameters)))
nil))))
menu))
(defun menu-bar-frame-for-menubar ()
@ -1958,11 +1988,10 @@ It must accept a buffer as its only required argument.")
(dolist (pair alist)
(setq i (1- i))
(aset buffers-vec i
(nconc (list (car pair)
(cons nil nil))
`(lambda ()
(interactive)
(funcall menu-bar-select-buffer-function ,(cdr pair))))))
(cons (car pair)
`(lambda ()
(interactive)
(funcall menu-bar-select-buffer-function ,(cdr pair))))))
(list buffers-vec))))
;; Make a Frames menu if we have more than one frame.
@ -1974,10 +2003,8 @@ It must accept a buffer as its only required argument.")
(i 0))
(dolist (frame frames)
(aset frames-vec i
(nconc
(list
(frame-parameter frame 'name)
(cons nil nil))
(cons
(frame-parameter frame 'name)
`(lambda ()
(interactive) (menu-bar-select-frame ,frame))))
(setq i (1+ i)))

View file

@ -1794,8 +1794,29 @@ variables.")
;; window, mark it as softly-dedicated, so bury-buffer in
;; minibuffer-hide-completions will know whether to
;; delete the window or not.
(display-buffer-mark-dedicated 'soft))
(with-output-to-temp-buffer "*Completions*"
(display-buffer-mark-dedicated 'soft)
;; Disable `pop-up-windows' temporarily to allow
;; `display-buffer--maybe-pop-up-frame-or-window'
;; in the display actions below to pop up a frame
;; if `pop-up-frames' is non-nil, but not to pop up a window.
(pop-up-windows nil))
(with-displayed-buffer-window
"*Completions*"
;; This is a copy of `display-buffer-fallback-action'
;; where `display-buffer-use-some-window' is replaced
;; with `display-buffer-at-bottom'.
`((display-buffer--maybe-same-window
display-buffer-reuse-window
display-buffer--maybe-pop-up-frame-or-window
;; Use `display-buffer-below-selected' for inline completions,
;; but not in the minibuffer (e.g. in `eval-expression')
;; for which `display-buffer-at-bottom' is used.
,(if (and completion-in-region-mode-predicate
(not (minibuffer-selected-window)))
'display-buffer-below-selected
'display-buffer-at-bottom))
(window-height . fit-window-to-buffer))
nil
;; Remove the base-size tail because `sort' requires a properly
;; nil-terminated list.
(when last (setcdr last nil))
@ -3285,6 +3306,7 @@ the same set of elements."
(string-match completion-pcm--delim-wild-regex str
(car bounds)))
(if (zerop (car bounds))
;; FIXME: Don't hardcode "-" (bug#17559).
(mapconcat 'string str "-")
;; If there's a boundary, it's trickier. The main use-case
;; we consider here is file-name completion. We'd like

View file

@ -313,13 +313,14 @@ This command must be bound to a mouse click."
(or (eq frame oframe)
(set-mouse-position (selected-frame) (1- (frame-width)) 0))))
(defun mouse-tear-off-window (click)
"Delete the window clicked on, and create a new frame displaying its buffer."
(define-obsolete-function-alias 'mouse-tear-off-window 'tear-off-window "24.4")
(defun tear-off-window (click)
"Delete the selected window, and create a new frame displaying its buffer."
(interactive "e")
(mouse-minibuffer-check click)
(let* ((window (posn-window (event-start click)))
(buf (window-buffer window))
(frame (make-frame)))
(frame (make-frame))) ;FIXME: Use pop-to-buffer.
(select-frame frame)
(switch-to-buffer buf)
(delete-window window)))
@ -1079,7 +1080,7 @@ regardless of where you click."
(unless primary
(error "No selection is available"))
(push-mark (point))
(insert primary)))
(insert-for-yank primary)))
(defun mouse-kill-ring-save (click)
"Copy the region between point and the mouse click in the kill ring.
@ -1361,7 +1362,7 @@ regardless of where you click."
(or mouse-yank-at-point (mouse-set-point click))
(let ((secondary (x-get-selection 'SECONDARY)))
(if secondary
(insert secondary)
(insert-for-yank secondary)
(error "No secondary selection"))))
(defun mouse-kill-secondary ()

View file

@ -544,6 +544,10 @@ placed in the queue.
`:already-owner': Service is already the primary owner."
;; Add Peer handler.
(dbus-register-method
bus service nil dbus-interface-peer "Ping" 'dbus-peer-handler 'dont-register)
;; Add ObjectManager handler.
(dbus-register-method
bus service nil dbus-interface-objectmanager "GetManagedObjects"
@ -1151,6 +1155,22 @@ apply
bus service dbus-path-dbus dbus-interface-peer "Ping")))
(dbus-error nil)))
(defun dbus-peer-handler ()
"Default handler for the \"org.freedesktop.DBus.Peer\" interface.
It will be registered for all objects created by `dbus-register-service'."
(let* ((last-input-event last-input-event)
(method (dbus-event-member-name last-input-event)))
(cond
;; "Ping" does not return an output parameter.
((string-equal method "Ping")
:ignore)
;; "GetMachineId" returns "s".
((string-equal method "GetMachineId")
(signal
'dbus-error
(list
(format "%s.GetMachineId not implemented" dbus-interface-peer)))))))
;;; D-Bus introspection.
@ -1672,7 +1692,7 @@ and \"org.freedesktop.DBus.Properties.GetAll\", which is slow."
(defun dbus-managed-objects-handler ()
"Default handler for the \"org.freedesktop.DBus.ObjectManager\" interface.
It will be registered for all objects created by `dbus-register-method'."
It will be registered for all objects created by `dbus-register-service'."
(let* ((last-input-event last-input-event)
(bus (dbus-event-bus-name last-input-event))
(path (dbus-event-path-name last-input-event)))

View file

@ -478,6 +478,7 @@ word(s) will be searched for via `eww-search-prefix'."
(setq-local eww-current-url 'author)
(setq-local eww-current-dom nil)
(setq-local eww-current-source nil)
(setq-local eww-current-title "")
(setq-local browse-url-browser-function 'eww-browse-url)
(setq-local after-change-functions 'eww-process-text-input)
(setq-local eww-history nil)

View file

@ -214,7 +214,7 @@ defaults to GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT."
(cl-mapcan
(lambda (check)
(when (string-match (car check) hostname)
(cdr check)))
(copy-sequence (cdr check))))
gnutls-verify-error))
;; else it's nil
(t nil))))

View file

@ -679,7 +679,8 @@ When 0, do not auto-reconnect."
(format "%s: %s (%S)"
(process-name process)
sentinel
(process-status process)) (not rcirc-target))
(process-status process))
(not rcirc-target))
(rcirc-disconnect-buffer)))
(when (and (string= sentinel "deleted")
(< 0 rcirc-reconnect-delay))
@ -802,11 +803,11 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
(defun rcirc-buffer-process (&optional buffer)
"Return the process associated with channel BUFFER.
With no argument or nil as argument, use the current buffer."
(let ((buffer (or buffer (if (buffer-live-p rcirc-server-buffer)
rcirc-server-buffer
(error "Server buffer deleted")))))
(or (with-current-buffer buffer rcirc-process)
rcirc-process)))
(let ((buffer (or buffer (and (buffer-live-p rcirc-server-buffer)
rcirc-server-buffer))))
(if buffer
(with-current-buffer buffer rcirc-process)
rcirc-process)))
(defun rcirc-server-name (process)
"Return PROCESS server name, given by the 001 response."

View file

@ -458,9 +458,7 @@ Emacs dired can't find files."
(insert " " (mapconcat 'identity sorted-lines "\n ")))
;; Add final newline.
(goto-char (point-max))
(unless (= (point) (line-beginning-position))
(insert "\n"))))
(unless (bolp) (insert "\n"))))
(defun tramp-adb-ls-output-time-less-p (a b)
"Sort \"ls\" output by time, descending."

View file

@ -201,17 +201,19 @@ Remove also properties of all files in subdirectories."
;; Reverting or killing a buffer should also flush file properties.
;; They could have been changed outside Tramp. In eshell, "ls" would
;; not show proper directory contents when a file has been copied or
;; deleted before.
;; deleted before. We must apply `save-match-data', because it would
;; corrupt other packages otherwise (reported from org).
(defun tramp-flush-file-function ()
"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))))))
(save-match-data
(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)

View file

@ -1265,8 +1265,7 @@ target of the symlink differ."
(format "%s -ild %s"
(tramp-get-ls-command v)
(tramp-shell-quote-argument localname)))
(setq attr (buffer-substring (point)
(progn (end-of-line) (point)))))
(setq attr (buffer-substring (point) (point-at-eol))))
(tramp-set-file-property
v localname "visited-file-modtime-ild" attr))
(when (boundp 'last-coding-system-used)
@ -1317,8 +1316,7 @@ of."
(tramp-get-ls-command v)
(tramp-shell-quote-argument localname)))
(with-current-buffer (tramp-get-buffer v)
(setq attr (buffer-substring
(point) (progn (end-of-line) (point)))))
(setq attr (buffer-substring (point) (point-at-eol))))
(equal
attr
(tramp-get-file-property
@ -3964,15 +3962,16 @@ process to set up. VEC specifies the connection."
;; Try to set up the coding system correctly.
;; CCC this can't be the right way to do it. Hm.
(tramp-message vec 5 "Determining coding system")
(tramp-send-command vec "echo foo ; echo bar" t)
(with-current-buffer (process-buffer proc)
(goto-char (point-min))
(if (featurep 'mule)
;; Use MULE to select the right EOL convention for communicating
;; with the process.
(let* ((cs (or (tramp-compat-funcall 'process-coding-system proc)
(cons 'undecided 'undecided)))
cs-decode cs-encode)
(let ((cs (or (when (string-match
"utf8" (or (tramp-get-remote-locale vec) ""))
(cons 'utf-8 'utf-8))
(tramp-compat-funcall 'process-coding-system proc)
(cons 'undecided 'undecided)))
cs-decode cs-encode)
(when (symbolp cs) (setq cs (cons cs cs)))
(setq cs-decode (car cs))
(setq cs-encode (cdr cs))
@ -3980,6 +3979,8 @@ process to set up. VEC specifies the connection."
(unless cs-encode (setq cs-encode 'undecided))
(setq cs-encode (tramp-compat-coding-system-change-eol-conversion
cs-encode 'unix))
(tramp-send-command vec "echo foo ; echo bar" t)
(goto-char (point-min))
(when (search-forward "\r" nil t)
(setq cs-decode (tramp-compat-coding-system-change-eol-conversion
cs-decode 'dos)))
@ -5255,7 +5256,9 @@ Return ATTR."
(defun tramp-get-remote-python (vec)
(with-tramp-connection-property vec "python"
(tramp-message vec 5 "Finding a suitable `python' command")
(tramp-find-executable vec "python" (tramp-get-remote-path vec))))
(or (tramp-find-executable vec "python" (tramp-get-remote-path vec))
(tramp-find-executable vec "python2" (tramp-get-remote-path vec))
(tramp-find-executable vec "python3" (tramp-get-remote-path vec)))))
(defun tramp-get-remote-uid-with-python (vec id-format)
(tramp-send-command-and-read
@ -5263,8 +5266,8 @@ Return ATTR."
(format "%s -c \"%s\""
(tramp-get-remote-python vec)
(if (equal id-format 'integer)
"import os; print os.getuid()"
"import os, pwd; print '\\\"' + pwd.getpwuid(os.getuid())[0] + '\\\"'"))))
"import os; print (os.getuid())"
"import os, pwd; print ('\\\"' + pwd.getpwuid(os.getuid())[0] + '\\\"')"))))
(defun tramp-get-remote-uid (vec id-format)
(with-tramp-connection-property vec (format "uid-%s" id-format)
@ -5304,8 +5307,8 @@ Return ATTR."
(format "%s -c \"%s\""
(tramp-get-remote-python vec)
(if (equal id-format 'integer)
"import os; print os.getgid()"
"import os, grp; print '\\\"' + grp.getgrgid(os.getgid())[0] + '\\\"'"))))
"import os; print (os.getgid())"
"import os, grp; print ('\\\"' + grp.getgrgid(os.getgid())[0] + '\\\"')"))))
(defun tramp-get-remote-gid (vec id-format)
(with-tramp-connection-property vec (format "gid-%s" id-format)

View file

@ -4127,10 +4127,9 @@ ALIST is of the form ((FROM . TO) ...)."
(defun tramp-call-process
(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."
It always returns a return code. The Lisp error raised when
PROGRAM is nil is trapped also, returning 1. Furthermore, traces
are written with verbosity of 6."
(let ((v (or vec
(vector tramp-current-method tramp-current-user
tramp-current-host nil nil)))
@ -4144,6 +4143,9 @@ Furthermore, traces are written with verbosity of 6."
(setq result
(apply
'call-process program infile (or destination t) display args))
;; `result' could also be an error string.
(when (stringp result)
(signal 'file-error (list result)))
(with-current-buffer
(if (bufferp destination) destination (current-buffer))
(tramp-message v 6 "%d\n%s" result (buffer-string))))

View file

@ -24,14 +24,14 @@
;;; Code:
;; In the Tramp CVS repository, the version number and the bug report
;; In the Tramp GIT repository, the version number and the bug report
;; address are auto-frobbed from configure.ac, so you should edit that
;; file and run "autoconf && ./configure" to change them. (X)Emacs
;; version check is defined in macro AC_EMACS_INFO of aclocal.m4;
;; should be changed only there.
;;;###tramp-autoload
(defconst tramp-version "2.2.10"
(defconst tramp-version "2.2.11-pre"
"This version of Tramp.")
;;;###tramp-autoload
@ -44,7 +44,7 @@
(= emacs-major-version 21)
(>= emacs-minor-version 4)))
"ok"
(format "Tramp 2.2.10 is not fit for %s"
(format "Tramp 2.2.11-pre is not fit for %s"
(when (string-match "^.*$" (emacs-version))
(match-string 0 (emacs-version)))))))
(unless (string-match "\\`ok\\'" x) (error "%s" x)))

View file

@ -823,6 +823,8 @@ be after it."
(defmacro c-with-syntax-table (table &rest code)
;; Temporarily switches to the specified syntax table in a failsafe
;; way to execute code.
;; Maintainers' note: If TABLE is `c++-template-syntax-table', DON'T call
;; any forms inside this that call `c-parse-state'. !!!!
`(let ((c-with-syntax-table-orig-table (syntax-table)))
(unwind-protect
(progn
@ -1834,12 +1836,9 @@ system."
immediately, i.e. at the same time as the `c-lang-defconst' form
itself is evaluated."
;; Evaluate at macro expansion time, i.e. in the
;; `cl-macroexpand-all' inside `c-lang-defconst'.
;; `macroexpand-all' inside `c-lang-defconst'.
(eval form))
;; Only used at compile time - suppress "might not be defined at runtime".
(declare-function cl-macroexpand-all "cl" (form &optional env))
(defmacro c-lang-defconst (name &rest args)
"Set the language specific values of the language constant NAME.
The second argument can optionally be a docstring. The rest of the
@ -1881,7 +1880,7 @@ constant. A file is identified by its base name."
(let* ((sym (intern (symbol-name name) c-lang-constants))
;; Make `c-lang-const' expand to a straightforward call to
;; `c-get-lang-constant' in `cl-macroexpand-all' below.
;; `c-get-lang-constant' in `macroexpand-all' below.
;;
;; (The default behavior, i.e. to expand to a call inside
;; `eval-when-compile' should be equivalent, since that macro
@ -1944,7 +1943,7 @@ constant. A file is identified by its base name."
;; reason, but we also use this expansion handle
;; `c-lang-defconst-eval-immediately' and to register
;; dependencies on the `c-lang-const's in VAL.)
(setq val (cl-macroexpand-all val))
(setq val (macroexpand-all val))
(setq bindings (cons (cons assigned-mode val) bindings)
args (cdr args))))

View file

@ -9355,16 +9355,16 @@ comment at the start of cc-engine.el for more info."
(not (looking-at c-<-op-cont-regexp))))))
(c-with-syntax-table c++-template-syntax-table
(goto-char placeholder)
(c-beginning-of-statement-1 containing-sexp t)
(if (save-excursion
(c-backward-syntactic-ws containing-sexp)
(eq (char-before) ?<))
;; In a nested template arglist.
(progn
(goto-char placeholder)
(c-syntactic-skip-backward "^,;" containing-sexp t)
(c-forward-syntactic-ws))
(back-to-indentation)))
(c-beginning-of-statement-1 containing-sexp t))
(if (save-excursion
(c-backward-syntactic-ws containing-sexp)
(eq (char-before) ?<))
;; In a nested template arglist.
(progn
(goto-char placeholder)
(c-syntactic-skip-backward "^,;" containing-sexp t)
(c-forward-syntactic-ws))
(back-to-indentation))
;; FIXME: Should use c-add-stmt-syntax, but it's not yet
;; template aware.
(c-add-syntax 'template-args-cont (point) placeholder))
@ -10022,16 +10022,16 @@ comment at the start of cc-engine.el for more info."
(eq (char-after placeholder) ?<))))))
(c-with-syntax-table c++-template-syntax-table
(goto-char placeholder)
(c-beginning-of-statement-1 lim t)
(if (save-excursion
(c-backward-syntactic-ws lim)
(eq (char-before) ?<))
;; In a nested template arglist.
(progn
(goto-char placeholder)
(c-syntactic-skip-backward "^,;" lim t)
(c-forward-syntactic-ws))
(back-to-indentation)))
(c-beginning-of-statement-1 lim t))
(if (save-excursion
(c-backward-syntactic-ws lim)
(eq (char-before) ?<))
;; In a nested template arglist.
(progn
(goto-char placeholder)
(c-syntactic-skip-backward "^,;" lim t)
(c-forward-syntactic-ws))
(back-to-indentation))
;; FIXME: Should use c-add-stmt-syntax, but it's not yet
;; template aware.
(c-add-syntax 'template-args-cont (point) placeholder))

View file

@ -213,7 +213,6 @@ the evaluated constant value at compile time."
;; These are defined in cl as aliases to the cl- versions.
;(declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys) t)
;(declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest) t)
;(declare-function cl-macroexpand-all "cl" (form &optional env))
(eval-and-compile
;; Some helper functions used when building the language constants.
@ -394,7 +393,9 @@ The syntax tables aren't stored directly since they're quite large."
;; lists are parsed. Note that this encourages incorrect parsing of
;; templates since they might contain normal operators that uses the
;; '<' and '>' characters. Therefore this syntax table might go
;; away when CC Mode handles templates correctly everywhere.
;; away when CC Mode handles templates correctly everywhere. WHILE
;; THIS SYNTAX TABLE IS CURRENT, `c-parse-state' MUST _NOT_ BE
;; CALLED!!!
t nil
(java c++) `(lambda ()
(let ((table (funcall ,(c-lang-const c-make-mode-syntax-table))))
@ -3183,7 +3184,7 @@ accomplish that conveniently."
`(lambda ()
;; This let sets up the context for `c-mode-var' and similar
;; that could be in the result from `cl-macroexpand-all'.
;; that could be in the result from `macroexpand-all'.
(let ((c-buffer-is-cc-mode ',mode)
current-var source-eval)
(c-make-emacs-variables-local)
@ -3193,7 +3194,7 @@ accomplish that conveniently."
(setq ,@(let ((c-buffer-is-cc-mode mode)
(c-lang-const-expansion 'immediate))
;; `c-lang-const' will expand to the evaluated
;; constant immediately in `cl-macroexpand-all'
;; constant immediately in `macroexpand-all'
;; below.
(cl-mapcan
(lambda (init)

View file

@ -4828,9 +4828,9 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
(and (memq (char-syntax (preceding-char)) '(?w ?_))
(progn
(backward-sexp)
;; sub {BLK}, print {BLK} $data, but NOT `bless', `return', `tr'
;; sub {BLK}, print {BLK} $data, but NOT `bless', `return', `tr', `constant'
(or (and (looking-at "[a-zA-Z0-9_:]+[ \t\n\f]*[{#]") ; Method call syntax
(not (looking-at "\\(bless\\|return\\|q[wqrx]?\\|tr\\|[smy]\\)\\>")))
(not (looking-at "\\(bless\\|return\\|q[wqrx]?\\|tr\\|[smy]\\|constant\\)\\>")))
;; sub bless::foo {}
(progn
(cperl-backward-to-noncomment (point-min))

View file

@ -71,8 +71,8 @@
;; For example:
;; (add-to-list 'auto-mode-alist '("\\.f\\'" . f90-mode))
;; Once you have entered f90-mode, you may get more info by using
;; the command describe-mode (C-h m). For online help use
;; Once you have entered f90-mode, you can get more info by using
;; the command describe-mode (C-h m). For help use
;; C-h f <Name of function you want described>, or
;; C-h v <Name of variable you want described>.

File diff suppressed because it is too large Load diff

View file

@ -390,37 +390,31 @@ Use the command `hs-minor-mode' to toggle or set this variable.")
:help "Do not hidden code or comment blocks when isearch matches inside them"
:active t :style radio :selected (eq hs-isearch-open nil)])))
(defvar hs-c-start-regexp nil
(defvar-local hs-c-start-regexp nil
"Regexp for beginning of comments.
Differs from mode-specific comment regexps in that
surrounding whitespace is stripped.")
(make-variable-buffer-local 'hs-c-start-regexp)
(defvar hs-block-start-regexp nil
(defvar-local hs-block-start-regexp nil
"Regexp for beginning of block.")
(make-variable-buffer-local 'hs-block-start-regexp)
(defvar hs-block-start-mdata-select nil
(defvar-local hs-block-start-mdata-select nil
"Element in `hs-block-start-regexp' match data to consider as block start.
The internal function `hs-forward-sexp' moves point to the beginning of this
element (using `match-beginning') before calling `hs-forward-sexp-func'.")
(make-variable-buffer-local 'hs-block-start-mdata-select)
(defvar hs-block-end-regexp nil
(defvar-local hs-block-end-regexp nil
"Regexp for end of block.")
(make-variable-buffer-local 'hs-block-end-regexp)
(defvar hs-forward-sexp-func 'forward-sexp
(defvar-local hs-forward-sexp-func 'forward-sexp
"Function used to do a `forward-sexp'.
Should change for Algol-ish modes. For single-character block
delimiters -- ie, the syntax table regexp for the character is
either `(' or `)' -- `hs-forward-sexp-func' would just be
`forward-sexp'. For other modes such as simula, a more specialized
function is necessary.")
(make-variable-buffer-local 'hs-forward-sexp-func)
(defvar hs-adjust-block-beginning nil
(defvar-local hs-adjust-block-beginning nil
"Function used to tweak the block beginning.
The block is hidden from the position returned by this function,
as opposed to hiding it from the position returned when searching
@ -439,7 +433,6 @@ It should return the position from where we should start hiding.
It should not move the point.
See `hs-c-like-adjust-block-beginning' for an example of using this.")
(make-variable-buffer-local 'hs-adjust-block-beginning)
(defvar hs-headline nil
"Text of the line where a hidden block begins, set during isearch.

View file

@ -49,14 +49,14 @@
;;
;; New versions of IDLWAVE, documentation, and more information available
;; from:
;; http://idlwave.org
;; http://github.com/jdtsmith/idlwave
;;
;; INSTALLATION
;; ============
;; Put this file on the emacs load path and load it with the following
;; line in your init file:
;;
;; (add-hook 'idlwave-load-hook
;; (add-hook 'idlwave-load-hook
;; (lambda () (require 'idlw-complete-structtag)))
;;
;; DESCRIPTION

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