Merge from trunk

This commit is contained in:
Stefan Monnier 2011-03-21 12:42:16 -04:00
commit cafdcef32d
250 changed files with 7207 additions and 3869 deletions

View file

@ -1,3 +1,27 @@
2011-03-20 Glenn Morris <rgm@gnu.org>
* autogen/: New directory, to be excluded from releases.
* autogen/copy_autogen, autogen/update_autogen: New scripts.
* autogen/README: New file.
* autogen/aclocal.m4, autogen/config.in, autogen/configure:
* autogen/Makefile.in: Add auto-updated generated files.
* autogen.sh: No longer a no-op, now it tests for autotools
and runs them as necessary.
* configure.in: Defaule maintainer-mode to on.
* aclocal.m4, configure, lib/Makefile.in: Remove files.
2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
Update for gnulib.
* Makefile.in (GNULIB_MODULES): Add intprops, as Emacs now
includes <intprops.h> directly.
* lib/sys_stat.in.h: New version from Gnulib, which fixes a bug
when building Emacs on Solaris 9 and running it on Solaris 10.
2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
* configure.in: Require 3.0 for --with-gtk3. Add HAVE_GTK3.
2011-03-06 Glenn Morris <rgm@gnu.org>
* configure.in (FREETYPE_LIBS): Actually set it to something.
@ -47,7 +71,7 @@
2011-02-21 Christoph Scholtes <cschol2112@gmail.com>
* lib/makefile.w32-in: ($(BLD)/md5.$(O)): Added dependency on
* lib/makefile.w32-in ($(BLD)/md5.$(O)): Added dependency on
$(EMACS_ROOT)/nt/inc/stdint.h.
2011-02-21 Eli Zaretskii <eliz@gnu.org>
@ -86,7 +110,7 @@
way to test this so I left it alone.
* configure: Regenerate.
2011-02-20 Christoph Scholtes <cschol2112@gmail.com>
2011-02-20 Christoph Scholtes <cschol2112@gmail.com>
* lib/makefile.w32-in ($(BLD)/md5.$(O)): New recipe, moved from
src/makefile.w32-in.
@ -949,7 +973,7 @@
2010-06-28 Jan Djärv <jan.h.d@swipnet.se>
* configure.in: Add --with-x-toolkit=gtk3. Remove HAVE_GTK_MULTIDISPLAY,
* configure.in: Add --with-x-toolkit=gtk3. Remove HAVE_GTK_MULTIDISPLAY,
check for gtk_file_chooser_dialog_new, and HAVE_GTK_FILE_BOTH (implied
by minimum required Gtk+ 2.6). Add checks for functions introduced
in Gtk+ 2.14 or newer (bug#6505).

View file

@ -4,15 +4,30 @@ See the end of the file for license conditions.
Building and Installing Emacs from Bazaar
If this is the first time you go through it, you'll need to configure
before bootstrapping:
Building Emacs from Bazaar requires some tools that are not needed
when building from a release. You will need:
autoconf - at least the version specified near the start of
configure.in (in the AC_PREREQ command).
automake - we recommend at least version 1.11.
makeinfo - not strictly necessary, but highly recommended, so that
you can build the manuals.
The `autogen.sh' script can help you figure out if you have the
necessary tools.
The first time you build, there are a couple of extra steps.
First, generate the `configure' script:
$ ./autogen.sh
(or you can just run `autoreconf -I m4').
You can then configure your build (use `./configure --help' to see
options you can set):
$ ./configure
(Normally there is no need to run `autoconf' etc. If you do need it,
the relevant command is `autoreconf -I m4'. Be aware that this will
likely lead to conflicts next time you update from Bazaar.)
Some of the files that are included in the Emacs tarball, such as
byte-compiled Lisp files, are not stored in Bazaar. Therefore, to
build from Bazaar you must run "make bootstrap" instead of just "make":

View file

@ -332,7 +332,7 @@ DOS_gnulib_comp.m4 = gl-comp.m4
# as per $(gnulib_srcdir)/DEPENDENCIES.
GNULIB_MODULES = \
crypto/md5 dtoastr filemode getloadavg getopt-gnu \
ignore-value lstat mktime readlink strftime symlink sys_stat
ignore-value intprops lstat mktime readlink strftime symlink sys_stat
GNULIB_TOOL_FLAGS = \
--import --no-changelog --no-vc-files --makefile-name=gnulib.mk
sync-from-gnulib: $(gnulib_srcdir)

View file

@ -212,6 +212,236 @@ Root must be the root of an Emacs source tree."
"\\\\def\\\\year{")
"\\([0-9]\\{4\\}\\)}.+%.+copyright year"))))))
;;; Various bits of magic for generating the web manuals
(defun make-manuals (root)
"Generate the web manuals for the Emacs webpage."
(interactive "DEmacs root directory: ")
(let* ((dest (expand-file-name "manual" root))
(html-node-dir (expand-file-name "html_node" dest))
(html-mono-dir (expand-file-name "html_mono" dest))
(txt-dir (expand-file-name "text" dest))
(dvi-dir (expand-file-name "dvi" dest))
(ps-dir (expand-file-name "ps" dest)))
(when (file-directory-p dest)
(if (y-or-n-p (format "Directory %s exists, delete it first?" dest))
(delete-directory dest t)
(error "Aborted")))
(make-directory dest)
(make-directory html-node-dir)
(make-directory html-mono-dir)
(make-directory txt-dir)
(make-directory dvi-dir)
(make-directory ps-dir)
;; Emacs manual
(let ((texi (expand-file-name "doc/emacs/emacs.texi" root)))
(manual-html-node texi (expand-file-name "emacs" html-node-dir))
(manual-html-mono texi (expand-file-name "emacs.html" html-mono-dir))
(manual-txt texi (expand-file-name "emacs.txt" txt-dir))
(manual-pdf texi (expand-file-name "emacs.pdf" dest))
(manual-dvi texi (expand-file-name "emacs.dvi" dvi-dir)
(expand-file-name "emacs.ps" ps-dir)))
;; Lisp manual
(let ((texi (expand-file-name "doc/lispref/elisp.texi" root)))
(manual-html-node texi (expand-file-name "elisp" html-node-dir))
(manual-html-mono texi (expand-file-name "elisp.html" html-mono-dir))
(manual-txt texi (expand-file-name "elisp.txt" txt-dir))
(manual-pdf texi (expand-file-name "elisp.pdf" dest))
(manual-dvi texi (expand-file-name "elisp.dvi" dvi-dir)
(expand-file-name "elisp.ps" ps-dir)))
(message "Manuals created in %s" dest)))
(defconst manual-doctype-string
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
\"http://www.w3.org/TR/html4/loose.dtd\">\n\n")
(defconst manual-meta-string
"<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
<link rev=\"made\" href=\"mailto:webmasters@gnu.org\">
<link rel=\"icon\" type=\"image/png\" href=\"/graphics/gnu-head-mini.png\">
<meta name=\"ICBM\" content=\"42.256233,-71.006581\">
<meta name=\"DC.title\" content=\"gnu.org\">\n\n")
(defconst manual-style-string "<style type=\"text/css\">
@import url('/style.css');\n</style>\n")
(defun manual-html-mono (texi-file dest)
"Run Makeinfo on TEXI-FILE, emitting mono HTML output to DEST.
This function also edits the HTML files so that they validate as
HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
the @import directive."
(call-process "makeinfo" nil nil nil
"--html" "--no-split" texi-file "-o" dest)
(with-temp-buffer
(insert-file-contents dest)
(setq buffer-file-name dest)
(manual-html-fix-headers)
(manual-html-fix-index-1)
(manual-html-fix-index-2 t)
(manual-html-fix-node-div)
(goto-char (point-max))
(re-search-backward "</body>[\n \t]*</html>")
(insert "</div>\n\n")
(save-buffer)))
(defun manual-html-node (texi-file dir)
"Run Makeinfo on TEXI-FILE, emitting per-node HTML output to DIR.
This function also edits the HTML files so that they validate as
HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
the @import directive."
(unless (file-exists-p texi-file)
(error "Manual file %s not found" texi-file))
(call-process "makeinfo" nil nil nil
"--html" texi-file "-o" dir)
;; Loop through the node files, fixing them up.
(dolist (f (directory-files dir nil "\\.html\\'"))
(let (opoint)
(with-temp-buffer
(insert-file-contents (expand-file-name f dir))
(setq buffer-file-name (expand-file-name f dir))
(if (looking-at "<meta http-equiv")
;; Ignore those HTML files that are just redirects.
(set-buffer-modified-p nil)
(manual-html-fix-headers)
(if (equal f "index.html")
(let (copyright-text)
(manual-html-fix-index-1)
;; Move copyright notice to the end.
(re-search-forward "[ \t]*<p>Copyright &copy;")
(setq opoint (match-beginning 0))
(re-search-forward "</blockquote>")
(setq copyright-text (buffer-substring opoint (point)))
(delete-region opoint (point))
(manual-html-fix-index-2)
(insert copyright-text "\n</div>\n"))
;; For normal nodes, give the header div a blue bg.
(manual-html-fix-node-div))
(save-buffer))))))
(defun manual-txt (texi-file dest)
"Run Makeinfo on TEXI-FILE, emitting plaintext output to DEST."
(call-process "makeinfo" nil nil nil
"--plaintext" "--no-split" texi-file "-o" dest)
(shell-command (concat "gzip -c " dest " > " (concat dest ".gz"))))
(defun manual-pdf (texi-file dest)
"Run texi2pdf on TEXI-FILE, emitting plaintext output to DEST."
(call-process "texi2pdf" nil nil nil texi-file "-o" dest))
(defun manual-dvi (texi-file dest ps-dest)
"Run texi2dvi on TEXI-FILE, emitting dvi output to DEST.
Also generate postscript output in PS-DEST."
(call-process "texi2dvi" nil nil nil texi-file "-o" dest)
(call-process "dvips" nil nil nil dest "-o" ps-dest)
(call-process "gzip" nil nil nil dest)
(call-process "gzip" nil nil nil ps-dest))
(defun manual-html-fix-headers ()
"Fix up HTML headers for the Emacs manual in the current buffer."
(let (opoint)
(insert manual-doctype-string)
(search-forward "<head>\n")
(insert manual-meta-string)
(search-forward "<meta")
(setq opoint (match-beginning 0))
(re-search-forward "<!--")
(goto-char (match-beginning 0))
(delete-region opoint (point))
(insert manual-style-string)
(search-forward "<meta http-equiv=\"Content-Style")
(setq opoint (match-beginning 0))
(search-forward "</head>")
(delete-region opoint (match-beginning 0))))
(defun manual-html-fix-node-div ()
"Fix up HTML \"node\" divs in the current buffer."
(let (opoint div-end)
(while (search-forward "<div class=\"node\">" nil t)
(replace-match
"<div class=\"node\" style=\"background-color:#DDDDFF\">"
t t)
(setq opoint (point))
(re-search-forward "</div>")
(setq div-end (match-beginning 0))
(goto-char opoint)
(if (search-forward "<hr>" div-end 'move)
(replace-match "" t t)))))
(defun manual-html-fix-index-1 ()
(let (opoint)
(re-search-forward "<body>\n\\(<h1 class=\"settitle\\)")
(setq opoint (match-beginning 1))
(search-forward "<h2 class=\"unnumbered")
(goto-char (match-beginning 0))
(delete-region opoint (point))
(insert "<div id=\"content\" class=\"inner\">\n\n")))
(defun manual-html-fix-index-2 (&optional table-workaround)
"Replace the index list in the current buffer with a HTML table."
(let (done open-td tag desc)
;; Convert the list that Makeinfo made into a table.
(search-forward "<ul class=\"menu\">")
(replace-match "<table style=\"float:left\" width=\"100%\">")
(forward-line 1)
(while (not done)
(cond
((or (looking-at "<li>\\(<a.+</a>\\):[ \t]+\\(.*\\)$")
(looking-at "<li>\\(<a.+</a>\\)$"))
(setq tag (match-string 1))
(setq desc (match-string 2))
(replace-match "" t t)
(when open-td
(save-excursion
(forward-char -1)
(skip-chars-backward " ")
(delete-region (point) (line-end-position))
(insert "</td>\n </tr>")))
(insert " <tr>\n ")
(if table-workaround
;; This works around a Firefox bug in the mono file.
(insert "<td bgcolor=\"white\">")
(insert "<td>"))
(insert tag "</td>\n <td>" (or desc ""))
(setq open-td t))
((eq (char-after) ?\n)
(delete-char 1)
;; Negate the following `forward-line'.
(forward-line -1))
((looking-at "<!-- ")
(search-forward "-->"))
((looking-at "<p>[- ]*The Detailed Node Listing[- \n]*")
(replace-match " </td></tr></table>\n
<h3>Detailed Node Listing</h3>\n\n" t t)
(search-forward "<p>")
(search-forward "<p>")
(goto-char (match-beginning 0))
(skip-chars-backward "\n ")
(setq open-td nil)
(insert "</p>\n\n<table style=\"float:left\" width=\"100%\">"))
((looking-at "</li></ul>")
(replace-match "" t t))
((looking-at "<p>")
(replace-match "" t t)
(when open-td
(insert " </td></tr>")
(setq open-td nil))
(insert " <tr>
<th colspan=\"2\" align=\"left\" style=\"text-align:left\">")
(re-search-forward "</p>[ \t\n]*<ul class=\"menu\">")
(replace-match " </th></tr>"))
((looking-at "[ \t]*</ul>[ \t]*$")
(replace-match
(if open-td
" </td></tr>\n</table>"
"</table>") t t)
(setq done t))
(t
(if (eobp)
(error "Parse error in %s" f))
(unless open-td
(setq done t))))
(forward-line 1))))
(provide 'admin)
;;; admin.el ends here

View file

@ -28,11 +28,14 @@ For each step, check for possible errors.
refer to a newer release of Emacs. (This is probably needed only
when preparing a major Emacs release, or branching for it.)
5. autoreconf -I m4 --force
5. Edit configure.in so that maintainer-mode is off by default.
(FIXME - need to find a better way of dealing with this).
autoreconf -I m4 --force
make bootstrap
6. Commit configure, src/config.in, etc/AUTHORS, all the files changed
by M-x set-version, and lisp/cus-edit.el (if modified).
6. Commit etc/AUTHORS, all the files changed by M-x set-version, and
lisp/cus-edit.el (if modified).
Copy lisp/loaddefs.el to lisp/ldefs-boot.el and commit lisp/ldefs-boot.el.
For a release, also commit the ChangeLog files in all directories.

View file

@ -23,3 +23,10 @@ on what branch at any time.
If you are looking at this file in a branch other than the trunk,
there may be some branch-specific documentation below this line.
________________________________________________________________________
* elpa
This branch does not contain a copy of Emacs, but of the Emacs Lisp
package archive (elpa.gnu.org). See admin/notes/elpa for further
explanation, and the README file in the branch for usage
instructions.

View file

@ -1,42 +1,24 @@
NOTES ON THE EMACS PACKAGE ARCHIVE
Here are instructions on uploading files to the package archive at
elpa.gnu.org, for Emacs maintainers. (If you are not a maintainer,
contact us if you want to submit a package.)
The GNU Emacs package archive, at elpa.gnu.org, is managed using a Bzr
branch named "elpa", hosted on Savannah. To check it out:
1. You will need login access to elpa.gnu.org. You will also need to
get the FSF sysadmins to allow ssh access through the FSF firewall
for your local machine. Ensure that your uid, USER, is in the
`elpa' group on elpa.gnu.org; this gives you write access to the
bzr repository from which the packages are managed.
bzr branch bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa elpa
cd elpa
echo "public_branch = bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa" >> .bzr/branch/branch.conf
bzr bind bzr+ssh://USERNAME@bzr.savannah.gnu.org/emacs/elpa
[create task branch for edits, etc.]
2. Go to your bzr repository on your local machine. Of, if you don't
have one (you should, if you're tracking Emacs bzr), make one:
Changes to this branch propagate to elpa.gnu.org in a semi-manual way.
There exists a copy of the elpa branch on that machine. Someone with
access logs in, pulls the latest changes from Savannah, and runs a
"deployment" script. This script (which is itself kept in the Bzr
branch) generates the content visible at http://elpa.gnu.org/packages.
cd $DEVHOME
bzr init-repo elpa/
cd elpa
The reason we set things up this way, instead of using the package
upload commands in package-x.el, is to let Emacs hackers conveniently
edit the contents of the "elpa" branch. (In particular, multi-file
packages are stored on the branch in source form, not as tarfiles.)
Create a branch for elpa:
bzr branch bzr+ssh://USER@elpa.gnu.org/home/elpa/package-repo package-repo
Bind the branch:
cd package-repo/
echo "public_branch = bzr+ssh://USER@elpa.gnu.org/home/elpa/package-repo" >> .bzr/branch/branch.conf
bzr bind bzr+ssh://USER@elpa.gnu.org/home/elpa/package-repo
Now you should be able to do `bzr up' and `bzr commit'.
3. Changes in bzr do not immediately propagate to the user-facing tree
(i.e., what users see when they do `M-x list-packages'). That tree
is created by a (daily) cron job that does "bzr export". If for
some reason you need to refresh the user-facing tree immediately,
run /home/elpa/bin/package-update.sh as the "elpa" user.
The Org mode dailies are not part of the repository. After the
package-update.sh script creates the user-facing tree, it copies
the daily tarfile hosted on orgmode.org directly into that tree.
4. FIXME: How to actually upload a package file.
It is easy to use the elpa branch to deploy a "local" copy of the
package archive. For details, see the README file in the elpa branch.

View file

@ -1,7 +1,207 @@
#!/bin/sh
### autogen.sh - tool to help build Emacs from a bzr checkout
echo "Please read INSTALL.BZR for instructions on how to build Emacs from Bazaar."
## Copyright (C) 2011 Free Software Foundation, Inc.
# Exit with failure, since people may have generic build scripts that
# try things like "autogen.sh && ./configure && make".
exit 1
## Author: Glenn Morris <rgm@gnu.org>
## This file is part of GNU Emacs.
## GNU Emacs is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
## GNU Emacs is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
### Commentary:
## The Emacs bzr repository does not include the configure script
## (and associated helpers). The first time you fetch Emacs from bzr,
## run this script to generate the necessary files.
## For more details, see the file INSTALL.BZR.
### Code:
## Tools we need:
progs="autoconf automake"
## Minimum versions we need:
autoconf_min=`sed -n 's/^ *AC_PREREQ(\([0-9\.]*\)).*/\1/p' configure.in`
## FIXME how to determine this from the sources?
automake_min=1.11
## $1 = program, eg "autoconf".
## Echo the version string, eg "2.59".
## FIXME does not handle things like "1.4a", but AFAIK those are
## all old versions, so it is OK to fail there.
## Also note that we do not handle micro versions.
get_version ()
{
$1 --version 2>&1 | sed -n '1 s/.* \([1-9][0-9\.]*\).*/\1/p'
}
## $1 = version string, eg "2.59"
## Echo the major version, eg "2".
major_version ()
{
echo $1 | sed -e 's/\([0-9][0-9]*\)\..*/\1/'
}
## $1 = version string, eg "2.59"
## Echo the minor version, eg "59".
minor_version ()
{
echo $1 | sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/'
}
## $1 = program
## $2 = minimum version.
## Return 0 if program is present with version >= minumum version.
## Return 1 if program is missing.
## Return 2 if program is present but too old.
## Return 3 for unexpected error (eg failed to parse version).
check_version ()
{
have_version=`get_version $1`
[ x"$have_version" = x ] && return 1
have_maj=`major_version $have_version`
need_maj=`major_version $2`
[ x"$have_maj" != x ] && [ x"$need_maj" != x ] || return 3
[ $have_maj -gt $need_maj ] && return 0
[ $have_maj -lt $need_maj ] && return 2
have_min=`minor_version $have_version`
need_min=`minor_version $2`
[ x"$have_min" != x ] && [ x"$need_min" != x ] || return 3
[ $have_min -ge $need_min ] && return 0
return 2
}
cat <<EOF
Checking whether you have the necessary tools...
(Read INSTALL.BZR for more details on building Emacs)
EOF
missing=
for prog in $progs; do
eval min=\$${prog}_min
echo "Checking for $prog (need at least version $min)..."
check_version $prog $min
retval=$?
case $retval in
0) stat="ok" ;;
1) stat="missing" ;;
2) stat="too old" ;;
*) stat="unable to check" ;;
esac
echo $stat
if [ $retval -ne 0 ]; then
missing="$missing $prog"
eval ${prog}_why=\""$stat"\"
fi
done
if [ x"$missing" != x ]; then
cat <<EOF
Building Emacs from Bzr requires the following specialized programs:
EOF
for prog in $progs; do
eval min=\$${prog}_min
echo "$prog (minimum version $min)"
done
cat <<EOF
Your system seems to be missing the following tool(s):
EOF
for prog in $missing; do
eval why=\$${prog}_why
echo "$prog ($why)"
done
cat <<EOF
If you think you have the required tools, please add them to your PATH
and re-run this script.
Otherwise, please try installing them.
On systems using rpm and yum, try: "yum install PACKAGE"
On systems using dpkg and apt, try: "apt-get install PACKAGE"
Then re-run this script.
If you do not have permission to do this, or if the version provided
by your system is too old, it is normally straightforward to build
these packages from source. You can find the sources at:
ftp://ftp.gnu.org/gnu/PACKAGE/
Download the package (make sure you get at least the minimum version
listed above), extract it using tar, then run configure, make,
make install. Add the installation directory to your PATH and re-run
this script.
If you know that the required versions are in your PATH, but this
script has made an error, then you can simply run
autoreconf -I m4
instead of this script.
If all else fails, you can try using the pre-built versions of the
generated files by doing:
cd autogen && ./copy_autogen
This is not recommended - see the comments in \`copy_autogen'.
Please report any problems with this script to bug-gnu-emacs@gnu.org .
EOF
exit 1
fi
echo "Your system has the required tools, running autoreconf..."
## Let autoreconf figure out what, if anything, needs doing.
autoreconf -I m4 || exit $?
echo "You can now run \`./configure'."
exit 0
### autogen.sh ends here

View file

@ -24,7 +24,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value lstat mktime readlink strftime symlink sys_stat
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink strftime symlink sys_stat
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@

14
autogen/README Normal file
View file

@ -0,0 +1,14 @@
This directory contains some pre-built generated files.
Most people do not need to use these files - instead you should
generate them yourself using eg `autogen.sh'.
File: Destination: Created by:
configure ../ autoconf
config.in ../src autoheader * also used by MSDOS bzr build
aclocal.m4 ../ aclocal
Makefile.in ../lib automake
There are also some scripts:
copy_autogen - copy pre-built generated files into place
update_autogen - regenerate generated files (for maintainers)

View file

@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
[m4_warning([this file was generated for autoconf 2.67.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
[m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])

View file

@ -285,6 +285,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `grantpt' function. */
#undef HAVE_GRANTPT
/* Define to 1 if using GTK 3 or later. */
#undef HAVE_GTK3
/* Define to 1 if you have the `gtk_adjustment_get_page_size' function. */
#undef HAVE_GTK_ADJUSTMENT_GET_PAGE_SIZE

File diff suppressed because it is too large Load diff

20
autogen/copy_autogen Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh
## Helper script for those building Emacs from bzr without autoconf etc.
## This installs some pre-generated versions of the automatically
## generated files. It is highly recommended to install the necessary
## tools instead of using this. Note that if eg configure.in
## is updated, the next time you run make it will attempt to
## regenerate configure and will fail if you do not have the required
## tools. You will have to run this script again.
if test ! -e config.in; then
echo "You must run this script from the autogen/ directory."
exit 1
fi
cp configure aclocal.m4 ../
cp config.in ../src/
cp Makefile.in ../lib/
echo "You can now run configure"

183
autogen/update_autogen Executable file
View file

@ -0,0 +1,183 @@
#!/bin/bash
### update_autogen - update the generated files in Emacs autogen/ directory
## Copyright (C) 2011 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## This file is part of GNU Emacs.
## GNU Emacs is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
## GNU Emacs is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
### Commentary:
## This is a helper script to update the pre-built generated files in
## the autogen/ directory. This is suitable for running from cron.
## Only Emacs maintainers need use this, so it uses bash features.
### Code:
function die () # write error to stderr and exit
{
[ $# -gt 0 ] && echo "$PN: $@" >&2
exit 1
}
PN=${0##*/} # basename of script
PD=${0%/*}
[ "$PD" = "$0" ] && PD=. # if PATH includes PWD
## This should be the autogen directory.
cd $PD
cd ../
[ -d autogen ] || die "Could not locate autogen directory"
function usage ()
{
cat 1>&2 <<EOF
Usage: ${PN} [-f] [-c] [-q]
Update the generated files in the Emacs autogen/ directory.
Options:
-f: force an update even if the source files are locally modified.
-c: if the update succeeds and the generated files are modified,
commit them (caution).
-q: be quiet; only give error messages, not status messages.
EOF
exit 1
}
## Defaults.
force=
commit=
quiet=
## Parameters.
sources="configure.in lib/Makefile.am"
genfiles="configure aclocal.m4 src/config.in lib/Makefile.in"
for g in $genfiles; do
basegen="$basegen ${g##*/}"
done
[ "$basegen" ] || die "internal error"
tempfile=/tmp/$PN.$$
trap "rm -f $tempfile 2> /dev/null" EXIT
while getopts ":hcfq" option ; do
case $option in
(h) usage ;;
(c) commit=1 ;;
(f) force=1 ;;
(q) quiet=1 ;;
(\?) die "Bad option -$OPTARG" ;;
(:) die "Option -$OPTARG requires an argument" ;;
(*) die "getopts error" ;;
esac
done
shift $(( --OPTIND ))
OPTIND=1
[ $# -eq 0 ] || die "Wrong number of arguments"
function msg ()
{
[ "$quiet" ] && return 0
echo "$@"
} # function msg
msg "Running bzr status..."
bzr status -S $sources >| $tempfile || die "bzr status error for sources"
while read stat file; do
case $stat in
M)
msg "Locally modified: $file"
[ "$force" ] || die "There are local modifications"
;;
*) die "Unexpected status ($stat) for $file" ;;
esac
done < $tempfile
msg "Running autoreconf..."
autoreconf -I m4 || die "autoreconf error"
cp $genfiles autogen/
cd autogen
bzr status -S $basegen >| $tempfile || \
die "bzr status error for generated files"
modified=
while read stat file; do
[ "$stat" != "M" ] && die "Unexpected status ($stat) for generated $file"
modified="$modified $file"
done < $tempfile
[ "$modified" ] || {
msg "No files were modified"
exit 0
}
msg "Modified file(s): $modified"
[ "$commit" ] || exit 0
msg "Committing..."
## bzr status output is annoyingly always relative to top-level, not PWD.
cd ../
opt=
[ "$quiet" ] || opt=-q
bzr commit $opt -m "Auto-commit of generated files." $modified || \
die "bzr commit error"
msg "Committed files: $modified"
exit
### update_autogen ends here

View file

@ -229,7 +229,7 @@ AC_ARG_ENABLE(maintainer-mode,
[enable make rules and dependencies not useful (and sometimes
confusing) to the casual installer])],
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
USE_MAINTAINER_MODE=yes)
if test $USE_MAINTAINER_MODE = yes; then
MAINT=
else
@ -1826,8 +1826,8 @@ fi
HAVE_GTK=no
if test "${with_gtk3}" = "yes"; then
GLIB_REQUIRED=2.6
GTK_REQUIRED=2.90
GLIB_REQUIRED=2.28
GTK_REQUIRED=3.0
GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
dnl Checks for libraries.
@ -1835,6 +1835,7 @@ if test "${with_gtk3}" = "yes"; then
if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
AC_MSG_ERROR($GTK_PKG_ERRORS)
fi
AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.])
fi
if test "$pkg_check_gtk" != "yes"; then
@ -2256,7 +2257,7 @@ if test "${HAVE_X11}" = "yes"; then
dnl if -lfreetype is not specified.
dnl The following is needed to set FREETYPE_LIBS.
PKG_CHECK_MODULES(FREETYPE, freetype2, HAVE_FREETYPE=yes,
HAVE_FREETYPE=no)
HAVE_FREETYPE=no)
test "$HAVE_FREETYPE" = "no" && AC_MSG_ERROR(libxft requires libfreetype)
fi

View file

@ -1,3 +1,40 @@
2011-03-12 Eli Zaretskii <eliz@gnu.org>
* msdog.texi (Windows HOME): Fix the wording to clarify how Emacs sets
HOME on Windows and where it looks for init files. (Bug#8221)
2011-03-10 Eli Zaretskii <eliz@gnu.org>
* search.texi (Regexp Example):
* mule.texi (International Chars):
* building.texi (External Lisp): Don't use characters outside
ISO-8859-1.
2011-03-09 Eli Zaretskii <eliz@gnu.org>
* ack.texi (Acknowledgments): Convert to ISO-8859-1 encoding. Use
Texinfo @-commands for non Latin-1 characters.
* makefile.w32-in (MAKEINFO_OPTS): Add --enable-encoding.
* custom.texi (Init File): Add index entries for ".emacs".
(Bug#8210)
2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
* xresources.texi (GTK resources): ~/.emacs.d/gtkrc does not work
for Gtk+ 3.
2011-03-08 Glenn Morris <rgm@gnu.org>
* Makefile.in (MAKEINFO_OPTS): Add --enable-encoding.
* emacs.texi (Acknowledgments):
* ack.texi (Acknowledgments): Names to UTF-8.
* emacs.texi: Set documentencoding.
* display.texi (Optional Mode Line): Don't mention exactly where
display-time appears. (Bug#8193)
2011-03-06 Chong Yidong <cyd@stupidchicken.com>
* search.texi (Isearch Yank): C-y now bound to isearch-yank-kill.

View file

@ -38,7 +38,7 @@ texinfodir = $(srcdir)/../misc
# The makeinfo program is part of the Texinfo distribution.
# Use --force so that it generates output even if there are errors.
MAKEINFO = @MAKEINFO@
MAKEINFO_OPTS = --force -I $(srcdir)
MAKEINFO_OPTS = --force --enable-encoding -I $(srcdir)
TEXI2DVI = texi2dvi
TEXI2PDF = texi2pdf

View file

@ -1,3 +1,4 @@
@c -*- coding: iso-latin-1 -*-
@c This is part of the Emacs manual.
@c Copyright (C) 1994-1997, 1999-2011 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@ -51,7 +52,7 @@ files.
Michael Albinus wrote @file{dbus.el}, a package that implements the
D-Bus message bus protocol; @file{zeroconf.el}, a mode for browsing
Avahi services; and @file{xesam.el}, a Xesam-based search engine
interface. He and Kai Gro@ss{}johann wrote the Tramp package, which
interface. He and Kai Großjohann wrote the Tramp package, which
provides transparent remote file editing using rcp, ssh, ftp, and
other network protocols. He and Daniel Pittman wrote
@file{tramp-cache.el}.
@ -190,7 +191,7 @@ prior to Emacs 23 for Mac OS.
@item
Chong Yidong was the Emacs co-maintainer for Emacs 23. He made many
improvements to the Emacs display engine; and, together with Kai
Gro@ss{}johann and Alex Schroeder, wrote @file{longlines.el}, a minor
Großjohann and Alex Schroeder, wrote @file{longlines.el}, a minor
mode for wrapping long lines.
@item
@ -248,7 +249,7 @@ text replace the current selection.
Eric Ding wrote @file{goto-addr.el},
@item
Jan Dj@"{a}rv added support for the GTK+ toolkit and X drag-and-drop.
Jan Djärv added support for the GTK+ toolkit and X drag-and-drop.
@item
Carsten Dominik wrote Ref@TeX{}, a package for setting up labels and
@ -283,7 +284,7 @@ folders have mail waiting in them; and @file{iswitchb.el}, a feature
for incremental reading and completion of buffer names.
@item
Torbj@"orn Einarsson wrote @file{f90.el}, a mode for Fortran 90 files.
Torbjörn Einarsson wrote @file{f90.el}, a mode for Fortran 90 files.
@item
Tsugutomo Enami co-wrote the support for international character sets.
@ -349,7 +350,7 @@ Kevin Gallo added multiple-frame support for Windows NT and wrote
@file{w32-win.el}, support functions for the MS-Windows window system.
@item
Juan Le@'{o}n Lahoz Garc@'{i}a wrote @file{wdired.el}, a package for
Juan León Lahoz García wrote @file{wdired.el}, a package for
performing file operations by directly editing Dired buffers.
@item
@ -483,8 +484,8 @@ Emacs: @file{dns.el} for Domain Name Service lookups;
@file{netrc.el} for parsing of @file{.netrc} files; and
@file{time-date.el} for general date and time handling. Components of
Gnus have also been written by: Nagy Andras, David Blacka, Scott Byer,
Kevin Greiner, Kai Gro@ss{}johann, Joe Hildebrand, Paul Jarc, Sascha
L@"{u}decke, David Moore, Jim Radford, Benjamin Rutt, Raymond Scholz,
Kevin Greiner, Kai Großjohann, Joe Hildebrand, Paul Jarc, Sascha
Lüdecke, David Moore, Jim Radford, Benjamin Rutt, Raymond Scholz,
Thomas Steffen, Reiner Steib, Didier Verna, Ilja Weis, Katsumi Yamaoka,
Teodor Zlatanov, and others (@pxref{Contributors,,,gnus, the Gnus Manual}).
@ -524,7 +525,7 @@ S/MIME and Sieve components; and @file{tls.el} and @file{starttls.el}
for the Transport Layer Security protocol.
@item
Arne J@o{}rgensen wrote @file{latexenc.el}, a package to
Arne Jørgensen wrote @file{latexenc.el}, a package to
automatically guess the correct coding system in LaTeX files.
@item
@ -576,7 +577,7 @@ files and running a PostScript interpreter interactively from within
Emacs.
@item
Karel Kl@'{@dotless{i}}@v{c} contributed SELinux support, for preserving the
Karel Klí@v{c} contributed SELinux support, for preserving the
Security-Enchanced Linux context of files on backup and copy.
@item
@ -667,9 +668,8 @@ directory-local variables; and the @code{info-finder} feature that
creates a virtual Info manual of package keywords.
@item
K@'{a}roly L@H{o}rentey wrote the ``multi-terminal'' code, which
allows Emacs to run on graphical and text-only terminals
simultaneously.
Károly L@H{o}rentey wrote the ``multi-terminal'' code, which allows Emacs to
run on graphical and text-only terminals simultaneously.
@item
Martin Lorentzon wrote @file{vc-annotate.el}, support for version
@ -933,7 +933,7 @@ Fred Pierresteguy and Paul Reilly made Emacs work with X Toolkit
widgets.
@item
Fran@,{c}ois Pinard, Greg McGary, and Bruno Haible wrote @file{po.el},
François Pinard, Greg McGary, and Bruno Haible wrote @file{po.el},
support for PO translation files.
@item

View file

@ -1056,7 +1056,7 @@ Show file information or library names in threads buffer.
Show addresses for thread frames in threads buffer.
@end table
Its possible to observe information for several threads
It's possible to observe information for several threads
simultaneously (in addition to buffers which show information for
currently selected thread) using the following keys from the threads
buffer.

View file

@ -2114,6 +2114,8 @@ Reference Manual}.
@node Init File
@section The Init File, @file{~/.emacs}
@cindex init file
@cindex .emacs file
@cindex ~/.emacs file
@cindex Emacs initialization file
@cindex key rebinding, permanent
@cindex rebinding keys, permanently

View file

@ -999,8 +999,7 @@ value is 200 characters.
Emacs can optionally display the time and system load in all mode
lines. To enable this feature, type @kbd{M-x display-time} or customize
the option @code{display-time-mode}. The information added to the mode
line usually appears after the buffer name, before the mode names and
their parentheses. It looks like this:
line looks like this:
@example
@var{hh}:@var{mm}pm @var{l.ll}

View file

@ -1,4 +1,4 @@
\input texinfo
\input texinfo @c -*- coding: iso-latin-1 -*-
@setfilename ../../info/emacs
@settitle GNU Emacs Manual
@ -29,6 +29,8 @@ developing GNU and promoting software freedom.''
@end quotation
@end copying
@documentencoding ISO-8859-1
@dircategory Emacs
@direntry
* Emacs: (emacs). The extensible self-documenting text editor.
@ -1350,7 +1352,7 @@ Abrahamsson, Jay K.@: Adams, Michael Albinus, Nagy Andras, Ralf Angeli,
Joe Arceneaux, Miles Bader, David Bakhash, Juanma Barranquero, Eli
Barzilay, Thomas Baumann, Steven L.@: Baur, Jay Belanger, Alexander L.@:
Belikoff, Boaz Ben-Zvi, Karl Berry, Anna M.@: Bigatti, Ray Blaak, Jim
Blandy, Johan Bockg@aa{}rd, Jan Böcker, Lennart Borgman, Per Bothner,
Blandy, Johan Bockgård, Jan Böcker, Lennart Borgman, Per Bothner,
Terrence Brannon, Frank Bresz, Peter Breton, Emmanuel Briot, Kevin
Broadey, Vincent Broman, David M.@: Brown, Georges Brun-Cottan, Joe
Buehler, W@l{}odek Bzyl, Bill Carpenter, Per Cederqvist, Hans Chalupsky,
@ -1358,16 +1360,16 @@ Chong Yidong, Chris Chase, Bob Chassell, Andrew Choi, Sacha Chua, James
Clark, Mike Clarkson, Glynn Clements, Daniel Colascione, Andrew Csillag,
Baoqiu Cui, Doug Cutting, Mathias Dahl, Julien Danjou, Satyaki Das,
Vivek Dasmohapatra, Michael DeCorte, Gary Delp, Matthieu Devin, Eri
Ding, Jan Dj@"{a}rv, Carsten Dominik, Scott Draves, Benjamin Drieu,
Ding, Jan Djärv, Carsten Dominik, Scott Draves, Benjamin Drieu,
Viktor Dukhovni, Dmitry Dzhus, John Eaton, Rolf Ebert, Paul Eggert,
Stephen Eglen, Torbj@"orn Einarsson, Tsugutomo Enami, Hans Henrik
Stephen Eglen, Torbjörn Einarsson, Tsugutomo Enami, Hans Henrik
Eriksen, Michael Ernst, Ata Etemadi, Frederick Farnbach, Oscar
Figueiredo, Fred Fish, Karl Fogel, Gary Foster, Romain Francoise, Noah
Friedman, Andreas Fuchs, Hallvard Furuseth, Keith Gabryelski, Peter S.@:
Galbraith, Kevin Gallagher, Kevin Gallo, Juan Le@'{o}n Lahoz
Garc@'{@dotless{i}}a, Howard Gayle, Daniel German, Stephen Gildea,
Galbraith, Kevin Gallagher, Kevin Gallo, Juan León Lahoz
García, Howard Gayle, Daniel German, Stephen Gildea,
Julien Gilles, David Gillespie, Bob Glickstein, Deepak Goel, Boris
Goldowsky, Michelangelo Grigni, Odd Gripenstam, Kai Gro@ss{}johann,
Goldowsky, Michelangelo Grigni, Odd Gripenstam, Kai Großjohann,
Michael Gschwind, Bastien Guerry, Henry Guillaume, Doug Gwyn, Ken'ichi
Handa, Lars Hansen, Chris Hanson, K. Shane Hartman, John Heidemann, Jon
K.@: Hellan, Jesper Harder, Magnus Henoch, Markus Heritsch, Karl Heuer,
@ -1375,17 +1377,17 @@ Manabu Higashida, Anders Holst, Jeffrey C.@: Honig, Tassilo Horn, Kurt
Hornik, Tom Houlder, Joakim Hove, Denis Howe, Lars Ingebrigtsen, Andrew
Innes, Seiichiro Inoue, Philip Jackson, Pavel Janik, Paul Jarc, Ulf
Jasper, Michael K. Johnson, Kyle Jones, Terry Jones, Simon Josefsson,
Arne J@o{}rgensen, Tomoji Kagatani, Brewster Kahle, Tokuya Kameshima,
Arne Jørgensen, Tomoji Kagatani, Brewster Kahle, Tokuya Kameshima,
Lute Kamstra, David Kastrup, David Kaufman, Henry Kautz, Taichi
Kawabata, Howard Kaye, Michael Kifer, Richard King, Peter Kleiweg, Karel
Kl@'{@dotless{i}}@v{c}, Shuhei Kobayashi, Pavel Kobiakov, Larry K.@:
Klí@v{c}, Shuhei Kobayashi, Pavel Kobiakov, Larry K.@:
Kolodney, David M.@: Koppelman, Koseki Yoshinori, Robert Krawitz,
Sebastian Kremer, Ryszard Kubiak, David K@aa{}gedal, Daniel LaLiberte,
Sebastian Kremer, Ryszard Kubiak, David Kågedal, Daniel LaLiberte,
Karl Landstrom, Mario Lang, Aaron Larson, James R.@: Larus, Vinicius
Jose Latorre, Werner Lemberg, Frederic Lepied, Peter Liljenberg, Lars
Lindberg, Chris Lindblad, Anders Lindgren, Thomas Link, Juri Linkov,
Francis Litterio, Emilio C. Lopes, K@'{a}roly L@H{o}rentey, Dave Love,
Sascha L@"{u}decke, Eric Ludlam, Alan Mackenzie, Christopher J.@:
Francis Litterio, Emilio C. Lopes, Károly L@H{o}rentey, Dave Love,
Sascha Lüdecke, Eric Ludlam, Alan Mackenzie, Christopher J.@:
Madsen, Neil M.@: Mager, Ken Manheimer, Bill Mann, Brian Marick, Simon
Marshall, Bengt Martensson, Charlie Martin, Thomas May, Roland McGrath,
Will Mengarini, David Megginson, Ben A. Mesander, Wayne Mesard, Brad

View file

@ -28,7 +28,7 @@ infodir = $(srcdir)/../../info
# The makeinfo program is part of the Texinfo distribution.
MAKEINFO = makeinfo
MAKEINFO_OPTS = --force -I$(srcdir)
MAKEINFO_OPTS = --force --enable-encoding -I$(srcdir)
MULTI_INSTALL_INFO = $(srcdir)\..\..\nt\multi-install-info.bat
INFO_TARGETS = $(infodir)/emacs
DVI_TARGETS = emacs.dvi

View file

@ -404,36 +404,45 @@ names, which might cause misalignment of columns in Dired display.
@dfn{user-specific application data directory}. The actual location
depends on your Windows version and system configuration; typical values
are @file{C:\Documents and Settings\@var{username}\Application Data} on
Windows 2K/XP and later, and either @file{C:\WINDOWS\Application Data}
Windows 2K/XP/2K3, @file{C:\Users\@var{username}\AppData\Roaming} on
Windows Vista/7/2K8, and either @file{C:\WINDOWS\Application Data}
or @file{C:\WINDOWS\Profiles\@var{username}\Application Data} on the
older Windows 9X/ME systems.
older Windows 9X/ME systems. If this directory does not exist or
cannot be accessed, Emacs falls back to @file{C:\} as the default
value of @code{HOME}.
@code{HOME} can also be set in the system registry, for details see
You can override this default value of @code{HOME} by explicitly
setting the environment variable @env{HOME} to point to any directory
on your system. @env{HOME} can be set either from the command shell
prompt or from the @samp{My Computer}s @samp{Properties} dialog.
@code{HOME} can also be set in the system registry, for details see
@ref{MS-Windows Registry}.
@cindex init file @file{.emacs} on MS-Windows
The home directory is where your init file @file{.emacs} is stored.
When Emacs starts, it first checks whether the environment variable
@env{HOME} is set. If it is, it looks for the init file in the
directory pointed by @env{HOME}. If @env{HOME} is not defined, Emacs
checks for an existing @file{.emacs} file in @file{C:\}, the root
directory of drive @file{C:}@footnote{
The check in @file{C:\} is for compatibility with older versions of Emacs,
which didn't check the application data directory.
}. If there's no such file in @file{C:\}, Emacs next uses the Windows
system calls to find out the exact location of your application data
directory. If that system call fails, Emacs falls back to @file{C:\}.
For compatibility with older versions of Emacs@footnote{
Older versions of Emacs didn't check the application data directory.
}, if there is a file named @file{.emacs} in @file{C:\}, the root
directory of drive @file{C:}, and @env{HOME} is set neither in the
environment nor in the Registry, Emacs will treat @file{C:\} as the
default @code{HOME} location, and will not look in the application
data directory, even if it exists. Note that only @file{.emacs} is
looked for in @file{C:\}; the older name @file{_emacs} (see below) is
not. This use of @file{C:\.emacs} to define @code{HOME} is
deprecated.
Whatever the final place is, Emacs sets the value of the @env{HOME}
environment variable to point to it, and it will use that location for
other files and directories it normally creates in the user's home
directory.
Whatever the final place is, Emacs sets the internal value of the
@env{HOME} environment variable to point to it, and it will use that
location for other files and directories it normally looks for or
creates in the user's home directory.
You can always find out where Emacs thinks is your home directory's
location by typing @kbd{C-x d ~/ @key{RET}}. This should present the
list of files in the home directory, and show its full name on the
first line. Likewise, to visit your init file, type @kbd{C-x C-f
~/.emacs @key{RET}}.
~/.emacs @key{RET}} (assuming the file's name is @file{.emacs}).
@cindex init file @file{.emacs} on MS-Windows
The home directory is where your init file is stored. It can have
any name mentioned in @ref{Init File}.
@cindex @file{_emacs} init file, MS-Windows
Because MS-DOS does not allow file names with leading dots, and

View file

@ -237,7 +237,7 @@ preferred charset: unicode (Unicode (ISO10646))
Character code properties: customize what to show
name: LATIN CAPITAL LETTER A WITH GRAVE
general-category: Lu (Letter, Uppercase)
decomposition: (65 768) ('A' '̀')
decomposition: (65 768) ('A' '`')
old-name: LATIN CAPITAL LETTER A GRAVE
There are text properties here:

View file

@ -917,13 +917,13 @@ setting of the syntax table (@pxref{Syntax}).
@node Regexp Example
@section Regular Expression Example
Here is an example of a regexp---the regexp that Emacs uses, by
default, to recognize the end of a sentence, not including the
following space (i.e., the variable @code{sentence-end-base}):
Here is an example of a regexp---similar to the regexp that Emacs
uses, by default, to recognize the end of a sentence, not including
the following space (i.e., the variable @code{sentence-end-base}):
@example
@verbatim
[.?!][]\"'””)}]*
[.?!][]\"')}]*
@end verbatim
@end example

View file

@ -660,8 +660,11 @@ The color for the border shadow, on the top and the left.
@iftex
The most common way to customize the GTK widgets Emacs uses (menus, dialogs
tool bars and scroll bars) is by choosing an appropriate theme, for example
with the GNOME theme selector. You can also do Emacs specific customization
by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc}. Some GTK
with the GNOME theme selector.
You can also do Emacs specific customization
by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc},
but only if you have a Gtk+ version earlier than 3 (i.e. 2). Some GTK
themes ignore customizations in @file{~/.emacs.d/gtkrc} so not everything
works with all themes. To customize Emacs font, background, faces, etc., use
the normal X resources (@pxref{Resources}). We will present some examples of

View file

@ -1,3 +1,37 @@
2011-03-19 Stefan Monnier <monnier@iro.umontreal.ca>
* strings.texi (String Conversion): Don't mention
string-make-(uni|multi)byte (bug#8262).
* nonascii.texi (Converting Representations): Fix up range.
* keymaps.texi (Key Binding Commands): Update code point, avoid
"unibyte character" and remove mention of unibyte bindings.
2011-03-10 Eli Zaretskii <eliz@gnu.org>
* modes.texi (Operator Precedence Grammars): Don't use characters
outside ISO-8859-1.
2011-03-09 Eli Zaretskii <eliz@gnu.org>
* intro.texi (Acknowledgements): Convert to ISO-8859-1 encoding.
* makefile.w32-in (MAKEINFO_OPTS): Add --enable-encoding.
2011-03-08 Glenn Morris <rgm@gnu.org>
* Makefile.in (MAKEINFO_OPTS): Add --enable-encoding.
* intro.texi (Acknowledgements): Names to UTF-8.
* elisp.texi: Set documentencoding.
2011-03-06 Chong Yidong <cyd@stupidchicken.com>
* package.texi: Update index keywords.
(Package Archives): New node contents. Document package-x.el.
2011-03-06 Juanma Barranquero <lekktu@gmail.com>
* makefile.w32-in (srcs): Add package.texi.
2011-03-06 Chong Yidong <cyd@stupidchicken.com>
* package.texi (Packaging, Packaging Basics, Simple Packages)

View file

@ -31,7 +31,7 @@ texinfodir = $(srcdir)/../misc
emacsdir = $(srcdir)/../emacs
MAKEINFO = @MAKEINFO@
MAKEINFO_OPTS = --force -I $(emacsdir) -I $(srcdir)
MAKEINFO_OPTS = --force --enable-encoding -I $(emacsdir) -I $(srcdir)
TEXI2DVI = texi2dvi
TEXI2PDF = texi2pdf
DVIPS = dvips

View file

@ -62,6 +62,8 @@ developing GNU and promoting software freedom.''
@end quotation
@end copying
@documentencoding ISO-8859-1
@dircategory GNU Emacs Lisp
@direntry
* Elisp: (elisp). The Emacs Lisp Reference Manual.

View file

@ -1,4 +1,4 @@
@c -*-texinfo-*-
@c -*-coding: iso-latin-1-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
@c Copyright (C) 1990-1994, 2001-2011 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@ -542,6 +542,6 @@ Kirman, Bob Knighten, Frederick M. Korz, Joe Lammens, Glenn M. Lewis,
K. Richard Magill, Brian Marick, Roland McGrath, Stefan Monnier, Skip
Montanaro, John Gardiner Myers, Thomas A. Peterson, Francesco Potorti,
Friedrich Pukelsheim, Arnold D. Robbins, Raul Rockwell, Jason Rumney,
Per Starb@"ack, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill
Per Starbäck, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill
Trost, Rickard Westman, Jean White, Eduard Wiebe, Matthew Wilding,
Carl Witty, Dale Worley, Rusty Wright, and David D. Zuhn.

View file

@ -1705,15 +1705,11 @@ or
@noindent
and your language environment is multibyte Latin-1, these commands
actually bind the multibyte character with code 2294, not the unibyte
Latin-1 character with code 246 (@kbd{M-v}). In order to use this
binding, you need to enter the multibyte Latin-1 character as keyboard
input. One way to do this is by using an appropriate input method
(@pxref{Input Methods, , Input Methods, emacs, The GNU Emacs Manual}).
If you want to use a unibyte character in the key binding, you can
construct the key sequence string using @code{multibyte-char-to-unibyte}
or @code{string-make-unibyte} (@pxref{Converting Representations}).
actually bind the multibyte character with code 246, not the byte
code 246 (@kbd{M-v}) sent by a Latin-1 terminal. In order to use this
binding, you need to teach Emacs how to decode the keyboard by using an
appropriate input method (@pxref{Input Methods, , Input Methods, emacs, The GNU
Emacs Manual}).
@deffn Command global-set-key key binding
This function sets the binding of @var{key} in the current global map

View file

@ -33,7 +33,7 @@ texinfodir = $(srcdir)/../misc
TEX=tex
INSTALL_INFO = install-info
MAKEINFO = makeinfo
MAKEINFO_OPTS = --force -I$(srcdir) -I$(emacsdir)
MAKEINFO_OPTS = --force --enable-encoding -I$(srcdir) -I$(emacsdir)
# The environment variable and its value to add $(srcdir) to the path
# searched for TeX input files.
@ -87,6 +87,7 @@ srcs = \
$(srcdir)/numbers.texi \
$(srcdir)/objects.texi \
$(srcdir)/os.texi \
$(srcdir)/package.texi \
$(srcdir)/positions.texi \
$(srcdir)/processes.texi \
$(srcdir)/searching.texi \

View file

@ -3403,7 +3403,7 @@ Such pairs of precedences are sufficient to express left-associativity
or right-associativity of infix operators, nesting of tokens like
parentheses and many other cases.
@c ¡Let's leave this undocumented to leave it more open for change!
@c Let's leave this undocumented to leave it more open for change!
@c @defvar smie-grammar
@c The value of this variable is an alist specifying the left and right
@c precedence of each token. It is meant to be initialized by using one of

View file

@ -167,7 +167,7 @@ acceptable because the buffer's representation is a choice made by the
user that cannot be overridden automatically.
Converting unibyte text to multibyte text leaves @acronym{ASCII}
characters unchanged, and converts bytes with codes 128 through 159 to
characters unchanged, and converts bytes with codes 128 through 255 to
the multibyte representation of raw eight-bit bytes.
Converting multibyte text to unibyte converts all @acronym{ASCII}

View file

@ -5,7 +5,8 @@
@setfilename ../../info/package
@node Packaging, Antinews, System Interface, Top
@chapter Preparing Lisp code for distribution
@cindex packaging
@cindex package
@cindex Lisp package
Emacs provides a standard way to distribute Emacs Lisp code to
users. A @dfn{package} is a collection of one or more files,
@ -24,8 +25,11 @@ put it in a @dfn{package archive} for others to download.
@node Packaging Basics
@section Packaging Basics
@cindex packaging basics
@cindex package attributes
@cindex package name
@cindex package version
@cindex dependencies
@cindex package dependencies
A package is either a @dfn{simple package} or a @dfn{multi-file
package}. A simple package is stored in a package archive as a single
@ -69,6 +73,7 @@ installing this package also automatically installs its dependencies;
if any dependency cannot be found, the package cannot be installed.
@end table
@cindex content directory, package
Installing a package, either via the Package Menu, or via the
command @code{package-install-file}, creates a subdirectory of
@code{package-user-dir} named @file{@var{name}-@var{version}}, where
@ -78,6 +83,7 @@ package's @dfn{content directory}. It is where Emacs puts the
package's contents (the single Lisp file for a simple package, or the
files extracted from a multi-file package).
@cindex package autoloads
Emacs then searches every Lisp file in the content directory for
autoload magic comments (@pxref{Autoload}). These autoload
definitions are saved to a file named @file{@var{name}-autoloads.el}
@ -98,7 +104,8 @@ typically called to begin using the package.
@node Simple Packages
@section Simple Packages
@cindex single file packages
@cindex single file package
@cindex simple package
A simple package consists of a single Emacs Lisp source file. The
file must conform to the Emacs Lisp library header conventions
@ -160,7 +167,7 @@ single-file package to a package archive.
@node Multi-file Packages
@section Multi-file Packages
@cindex multi-file packages
@cindex multi-file package
A multi-file package is less convenient to create than a single-file
package, but it offers more features: it can include multiple Emacs
@ -206,10 +213,10 @@ file is used as the long description.
If the content directory contains a file named @file{dir}, this is
assumed to be an Info directory file made with @command{install-info}.
@xref{Invoking install-info, Invoking install-info, Invoking
install-info, texinfo, Texinfo}. The Info files listed in this
directory file should also be present in the content directory. In
this case, Emacs will automatically add the content directory to
@code{Info-directory-list} when the package is activated.
install-info, texinfo, Texinfo}. The relevant Info files should also
be present in the content directory. In this case, Emacs will
automatically add the content directory to @code{Info-directory-list}
when the package is activated.
Do not include any @file{.elc} files in the package. Those are
created when the package is installed. Note that there is no way to
@ -234,5 +241,79 @@ variable @code{load-file-name} (@pxref{Loading}). Here is an example:
@node Package Archives
@section Creating and Maintaining Package Archives
@cindex package archive
To be done.
Via the Package Menu, users may download packages from @dfn{package
archives}. Such archives are specified by the variable
@code{package-archives}, whose default value contains a single entry:
the archive hosted by the GNU project at @url{elpa.gnu.org}. This
section describes how to set up and maintain a package archive.
@cindex base location, package archive
@defopt package-archives
The value of this variable is an alist of package archives recognized
by the Emacs package manager.
Each alist element corresponds to one archive, and should have the
form @code{(@var{id} . @var{location})}, where @var{id} is the name of
the archive (a string) and @var{location} is its @dfn{base location}
(a string).
If the base location starts with @samp{http:}, it is treated as a HTTP
URL, and packages are downloaded from this archive via HTTP (as is the
case for the default GNU archive).
Otherwise, the base location should be a directory name. In this
case, Emacs retrieves packages from this archive via ordinary file
access. Such ``local'' archives are mainly useful for testing.
@end defopt
A package archive is simply a directory in which the package files,
and associated files, are stored. If you want the archive to be
reachable via HTTP, this directory must be accessible to a web server.
How to accomplish this is beyond the scope of this manual.
A convenient way to set up and update a package archive is via the
@code{package-x} library. This is included with Emacs, but not loaded
by default; type @kbd{M-x load-library @kbd{RET} package-x @kbd{RET}}
to load it, or add @code{(require 'package-x)} to your init file.
@xref{Lisp Libraries,, Lisp Libraries, emacs, The GNU Emacs Manual}.
Once loaded, you can make use of the following:
@defopt package-archive-upload-base
The value of this variable is the base location of a package archive,
as a directory name. The commands in the @code{package-x} library
will use this base location.
The directory name should be absolute. You may specify a remote name,
such as @file{/ssh:foo@@example.com:/var/www/packages/}, if the
package archive is on a different machine. @xref{Remote Files,,
Remote Files, emacs, The GNU Emacs Manual}.
@end defopt
@deffn Command package-upload-file filename
This command prompts for @var{filename}, a file name, and uploads that
file to @code{package-archive-upload-base}. The file must be either a
simple package (a @file{.el} file) or a multi-file package (a
@file{.tar} file); otherwise, an error is raised. The package
attributes are automatically extracted, and the archive's contents
list is updated with this information.
If @code{package-archive-upload-base} does not specify a valid
directory, the function prompts interactively for one. If the
directory does not exist, it is created. The directory need not have
any initial contents (i.e., you can use this command to populate an
initially empty archive).
@end deffn
@deffn Command package-upload-buffer
This command is similar to @code{package-upload-file}, but instead of
prompting for a package file, it uploads the contents of the current
buffer. The current buffer must be visiting a simple package (a
@file{.el} file) or a multi-file package (a @file{.tar} file);
otherwise, an error is raised.
@end deffn
@noindent
After you create an archive, remember that it is not accessible in the
Package Menu interface unless it is in @code{package-archives}.

View file

@ -554,8 +554,8 @@ strings and integers. @code{format} (@pxref{Formatting Strings}) and
@code{prin1-to-string} (@pxref{Output Functions}) can also convert
Lisp objects into strings. @code{read-from-string} (@pxref{Input
Functions}) can ``convert'' a string representation of a Lisp object
into an object. The functions @code{string-make-multibyte} and
@code{string-make-unibyte} convert the text representation of a string
into an object. The functions @code{string-to-multibyte} and
@code{string-to-unibyte} convert the text representation of a string
(@pxref{Converting Representations}).
@xref{Documentation}, for functions that produce textual descriptions

View file

@ -1,3 +1,54 @@
2011-03-17 Jay Belanger <jay.p.belanger@gmail.com>
* calc.texi (Logarithmic Units): Update the function names.
2011-03-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
* message.texi (Various Commands): Document format specs in the
ellipsis.
2011-03-15 Antoine Levitt <antoine.levitt@gmail.com>
* message.texi (Insertion Variables): Document message-cite-style.
2011-03-14 Michael Albinus <michael.albinus@gmx.de>
* tramp.texi (Remote processes): New subsection "Running shell on
a remote host".
2011-03-12 Teodor Zlatanov <tzz@lifelogs.com>
* auth.texi (Help for developers): Update docs to explain that the
:save-function will only run the first time.
2011-03-12 Glenn Morris <rgm@gnu.org>
* Makefile.in (emacs-faq.html): Fix some more cross-refs.
(emacs-faq.text): New target.
(clean): Add emacs-faq.
2011-03-12 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.2.1.
* trampver.texi: Update release number.
2011-03-11 Glenn Morris <rgm@gnu.org>
* Makefile.in (HTML_TARGETS): New.
(clean): Delete $HTML_TARGETS.
(emacs-faq.html): New, for use with the gnu.org Emacs webpage.
2011-03-08 Teodor Zlatanov <tzz@lifelogs.com>
* auth.texi (Help for developers): Show example of using
`auth-source-search' with prompts and :save-function.
2011-03-07 Antoine Levitt <antoine.levitt@gmail.com>
* message.texi (Message Buffers): Update default value of
message-generate-new-buffers.
2011-03-06 Jay Belanger <jay.p.belanger@gmail.com>
* calc.texi (Logarithmic Units): Rename calc-logunits-dblevel

View file

@ -197,6 +197,8 @@ PDF_TARGETS = \
widget.pdf \
woman.pdf
HTML_TARGETS = emacs-faq.html
TEXI2DVI = texi2dvi
TEXI2PDF = texi2pdf
@ -401,6 +403,15 @@ faq.dvi: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2DVI) $<
faq.pdf: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2PDF) $<
## This is the name used on the Emacs web-page.
## sed fixes up links to point to split version of the manual.
emacs-faq.html: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
$(MAKEINFO) $(MAKEINFO_OPTS) --no-split \
--css-ref='/layout.css' --html -o $@ $<
sed -i -e 's|a href="\([a-z]*\)\.html#\([^"]*\)"|a href="manual/html_node/\1/\2.html"|g' \
-e 's|/Top\.html|/|g' $@
emacs-faq.text: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
$(MAKEINFO) $(MAKEINFO_OPTS) --plaintext -o $@ $<
flymake : $(infodir)/flymake
$(infodir)/flymake: flymake.texi
@ -684,7 +695,7 @@ mostlyclean:
rm -f gnustmp.*
clean: mostlyclean
rm -f $(DVI_TARGETS) $(PDF_TARGETS)
rm -f $(DVI_TARGETS) $(PDF_TARGETS) $(HTML_TARGETS) emacs-faq.text
distclean: clean
# rm -f Makefile

View file

@ -131,11 +131,11 @@ library encourages this confusion by accepting both, as you'll see
later.
If you have problems with the search, set @code{auth-source-debug} to
@code{t} and see what host, port, and user the library is checking in
the @code{*Messages*} buffer. Ditto for any other problems, your
first step is always to see what's being checked. The second step, of
course, is to write a blog entry about it and wait for the answer in
the comments.
@code{'trivia} and see what host, port, and user the library is
checking in the @code{*Messages*} buffer. Ditto for any other
problems, your first step is always to see what's being checked. The
second step, of course, is to write a blog entry about it and wait for
the answer in the comments.
You can customize the variable @code{auth-sources}. The following may
be needed if you are using an older version of Emacs or if the
@ -232,6 +232,14 @@ TODO: how does it work generally, how does secrets.el work, some examples.
@node Help for developers
@chapter Help for developers
The auth-source library lets you control logging output easily.
@defvar auth-source-debug
Set this variable to 'trivia to see lots of output in *Messages*, or
set it to a function that behaves like @code{message} to do your own
logging.
@end defvar
The auth-source library only has a few functions for external use.
@defun auth-source-search SPEC
@ -240,6 +248,62 @@ TODO: how to include docstring?
@end defun
Let's take a look at an example of using @code{auth-source-search}
from Gnus' @code{nnimap.el}.
@example
(defun nnimap-credentials (address ports)
(let* ((auth-source-creation-prompts
'((user . "IMAP user at %h: ")
(secret . "IMAP password for %u@@%h: ")))
(found (nth 0 (auth-source-search :max 1
:host address
:port ports
:require '(:user :secret)
:create t))))
(if found
(list (plist-get found :user)
(let ((secret (plist-get found :secret)))
(if (functionp secret)
(funcall secret)
secret))
(plist-get found :save-function))
nil)))
@end example
This call requires the user and password (secret) to be in the
results. It also requests that an entry be created if it doesn't
exist already. While the created entry is being assembled, the shown
prompts will be used to interact with the user. The caller can also
pass data in @code{auth-source-creation-defaults} to supply defaults
for any of the prompts.
Note that the password needs to be evaluated if it's a function. It's
wrapped in a function to provide some security.
Later, after a successful login, @code{nnimal.el} calls the
@code{:save-function} like so:
@example
(when (functionp (nth 2 credentials))
(funcall (nth 2 credentials)))
@end example
This will work whether the @code{:save-function} was provided or not.
@code{:save-function} will be provided only when a new entry was
created, so this effectively says ``after a successful login, save the
authentication information we just used, if it was newly created.''
After the first time it's called, the @code{:save-function} will not
run again (but it will log something if you have set
@code{auth-source-debug} to @code{'trivia}). This is so it won't ask
the same question again, which is annoying. This is so it won't ask
the same question again, which is annoying. This is so it won't ask
the same question again, which is annoying.
So the responsibility of the API user that specified @code{:create t}
is to call the @code{:save-function} if it's provided.
@defun auth-source-delete SPEC
TODO: how to include docstring?

View file

@ -28126,47 +28126,15 @@ tell Calc to use a different file for the Calc init file.)
@section Logarithmic Units
The units @code{dB} (decibels) and @code{Np} (nepers) are logarithmic
units which are typically manipulated differently than standard units.
Calc provides commands to work with these logarithmic units.
units which are manipulated differently than standard units. Calc
provides commands to work with these logarithmic units.
Decibels and nepers are used to measure power quantities as well as
field quantities (quantities whose squares are proportional to power).
The decibel and neper values of a quantity are relative to
a reference quantity; for example, the decibel value of a sound
pressure level of
@infoline @math{60 uPa}
@texline @math{60 \mu{\rm Pa}}
relative to
@infoline @math{20 uPa}
@texline @math{20 \mu{\rm Pa}}
(the threshhold of human hearing) is
@infoline @math{20 log10(60 uPa/ 20 uPa) dB = 20 log10(3) dB},
@texline @math{20 \log_{10}(60 \mu{\rm Pa}/20 \mu{\rm Pa}) {\rm dB} = 20 \log_{10}(3) {\rm dB}},
which is about
@infoline @math{9.54 dB}.
@texline @math{9.54 {\rm dB}}.
Note that in taking the ratio, the original units cancel and so these
logarithmic units are dimensionless.
@vindex calc-logunits-power-reference
@vindex calc-logunits-field-reference
The Calc commands for the logarithmic units assume that power quantities
are being used unless the @kbd{H} prefix is used, in which case they assume that
field quantities are being used. For power quantities, Calc uses
@infoline @math{1 mW}
@texline @math{1 {\rm mW}}
as the default reference quantity; this default can be changed by changing
the value of the customizable variable
@code{calc-logunits-power-reference} (@pxref{Customizing Calc}).
For field quantities, Calc uses
@infoline @math{20 uPa}
@texline @math{20 \mu{\rm Pa}}
as the default reference quantity; this is the value used in acoustics
which is where decibels are commonly encountered. This default can be
changed by changing the value of the customizable variable
@code{calc-logunits-field-reference} (@pxref{Customizing Calc}). A
non-default reference quantity will be read from the stack if the
capital @kbd{O} prefix is used.
field quantities (quantities whose squares are proportional to power);
these two types of quantities are handled slightly different from each
other. By default the Calc commands work as if power quantities are
being used; with the @kbd{H} prefix the Calc commands work as if field
quantities are being used.
The decibel level of a power
@infoline @math{P1},
@ -28214,6 +28182,20 @@ relative to a reference
is defined as
@infoline @math{20 log10(F1/F0) dB}.
@texline @math{20 \log_{10}(F_{1}/F_{0}) {\rm dB}}.
For example, the decibel value of a sound pressure level of
@infoline @math{60 uPa}
@texline @math{60 \mu{\rm Pa}}
relative to
@infoline @math{20 uPa}
@texline @math{20 \mu{\rm Pa}}
(the threshhold of human hearing) is
@infoline @math{20 log10(60 uPa/ 20 uPa) dB = 20 log10(3) dB},
@texline @math{20 \log_{10}(60 \mu{\rm Pa}/20 \mu{\rm Pa}) {\rm dB} = 20 \log_{10}(3) {\rm dB}},
which is about
@infoline @math{9.54 dB}.
@texline @math{9.54 {\rm dB}}.
Note that in taking the ratio, the original units cancel and so these
logarithmic units are dimensionless.
Nepers (named after John Napier, who is credited with inventing the
logarithm) are similar to bels except they use natural logarithms instead
@ -28236,55 +28218,72 @@ is
@infoline @math{ln(F1/F0) Np}.
@texline @math{\ln(F_1/F_0) {\rm Np}}.
@vindex calc-lu-power-reference
@vindex calc-lu-field-reference
For power quantities, Calc uses
@infoline @math{1 mW}
@texline @math{1 {\rm mW}}
as the default reference quantity; this default can be changed by changing
the value of the customizable variable
@code{calc-lu-power-reference} (@pxref{Customizing Calc}).
For field quantities, Calc uses
@infoline @math{20 uPa}
@texline @math{20 \mu{\rm Pa}}
as the default reference quantity; this is the value used in acoustics
which is where decibels are commonly encountered. This default can be
changed by changing the value of the customizable variable
@code{calc-lu-field-reference} (@pxref{Customizing Calc}). A
non-default reference quantity will be read from the stack if the
capital @kbd{O} prefix is used.
@kindex l q
@pindex calc-logunits-quantity
@tindex powerquant
@tindex fieldquant
The @kbd{l q} (@code{calc-logunits-quantity}) [@code{powerquant}]
@pindex calc-lu-quant
@tindex lupquant
@tindex lufquant
The @kbd{l q} (@code{calc-lu-quant}) [@code{lupquant}]
command computes the power quantity corresponding to a given number of
logarithmic units. With the capital @kbd{O} prefix, @kbd{O l q}, the
reference level will be read from the top of the stack. (In an
algebraic formula, @code{powerquant} can be given an optional second
algebraic formula, @code{lupquant} can be given an optional second
argument which will be used for the reference level.) For example,
@code{20 dB @key{RET} l q} will return @code{100 mW};
@code{20 dB @key{RET} 4 W @key{RET} O l q} will return @code{400 W}.
The @kbd{H l q} [@code{fieldquant}] command behaves like @kbd{l q} but
The @kbd{H l q} [@code{lufquant}] command behaves like @kbd{l q} but
computes field quantities instead of power quantities.
@kindex l d
@pindex calc-dblevel
@tindex dbpowerlevel
@tindex dbfieldlevel
@pindex calc-db
@tindex dbpower
@tindex dbfield
@kindex l n
@pindex calc-nplevel
@tindex nppowerlevel
@tindex npfieldlevel
The @kbd{l d} (@code{calc-dblevel}) [@code{dbpowerlevel}]
command will compute the decibel level of a power quantity using the
default reference level; @kbd{H l d} [@code{dbfieldlevel}] will
compute the decibel level of a field quantity. The commands @kbd{l n}
(@code{calc-nplevel}) [@code{nppowerlevel}] and @kbd{H l n}
[@code{npfieldlevel}] will similarly compute neper levels. With the
capital @kbd{O} prefix these commands will read a reference level
from the stack; in an algebraic formula the reference level can be
given as an optional second argument.
@pindex calc-np
@tindex nppower
@tindex npfield
The @kbd{l d} (@code{calc-db}) [@code{dbpower}] command will compute
the decibel level of a power quantity using the default reference
level; @kbd{H l d} [@code{dbfield}] will compute the decibel level of
a field quantity. The commands @kbd{l n} (@code{calc-np})
[@code{nppower}] and @kbd{H l n} [@code{npfield}] will similarly
compute neper levels. With the capital @kbd{O} prefix these commands
will read a reference level from the stack; in an algebraic formula
the reference level can be given as an optional second argument.
@kindex l +
@pindex calc-logunits-add
@tindex lupoweradd
@tindex lufieldadd
@pindex calc-lu-plus
@tindex lupadd
@tindex lufadd
@kindex l -
@pindex calc-logunits-sub
@tindex lupowersub
@tindex lufieldsub
@pindex calc-lu-minus
@tindex lupsub
@tindex lufsub
@kindex l *
@pindex calc-logunits-mul
@tindex lupowermul
@tindex lufieldmul
@pindex calc-lu-times
@tindex lupmul
@tindex lufmul
@kindex l /
@pindex calc-logunits-div
@tindex lupowerdiv
@tindex lufielddiv
@pindex calc-lu-divide
@tindex lupdiv
@tindex lufdiv
The sum of two power or field quantities doesn't correspond to the sum
of the corresponding decibel or neper levels. If the powers
corresponding to decibel levels
@ -28305,13 +28304,13 @@ $$ 10 \log_{10}(10^{D_1/10} + 10^{D_2/10}) {\rm dB}.$$
@end tex
@noindent
When field quantities are combined, it often means the
corresponding powers are added and so the above formula might be used.
In acoustics, for example, the decibel sound pressure level is defined
using the field formula but the sound pressure levels are combined
as the sound power levels, and so the above formula should be used. If
two field quantities themselves are added, the new decibel level will be
When field quantities are combined, it often means the corresponding
powers are added and so the above formula might be used. In
acoustics, for example, the sound pressure level is a field quantity
and so the decibels are often defined using the field formula, but the
sound pressure levels are combined as the sound power levels, and so
the above formula should be used. If two field quantities themselves
are added, the new decibel level will be
@ifnottex
@example
@ -28349,20 +28348,18 @@ $$ D + 20 \log_{10}(N) {\rm dB}.$$
@end tex
@noindent
There are similar formulas for combining nepers.
The @kbd{l +} (@code{calc-logunits-add}) [@code{lupoweradd}] command
will ``add'' two logarithmic unit power levels this way; with the
@kbd{H} prefix, @kbd{H l +} [@code{lufieldadd}] will add logarithmic
unit field levels. Similarly, logarithmic units can be
``subtracted'' with @kbd{l -} (@code{calc-logunits-sub})
[@code{lupowersub}] or @kbd{H l -} [@code{lufieldsub}].
The @kbd{l *} (@code{calc-logunits-mul}) [@code{lupowermul}]
and @kbd{H l *} [@code{lufieldmul}] commands will ``multiply''
a logarithmic unit by a number; the @kbd{l /}
(@code{calc-logunits-divide}) [@code{lupowerdiv}] and
@kbd{H l /} [@code{lufielddiv}] commands will ``divide'' a
logarithmic unit by a number. Note that the reference quantities don't
play a role in this arithmetic.
There are similar formulas for combining nepers. The @kbd{l +}
(@code{calc-lu-plus}) [@code{lupadd}] command will ``add'' two
logarithmic unit power levels this way; with the @kbd{H} prefix,
@kbd{H l +} [@code{lufadd}] will add logarithmic unit field levels.
Similarly, logarithmic units can be ``subtracted'' with @kbd{l -}
(@code{calc-lu-minus}) [@code{lupsub}] or @kbd{H l -} [@code{lufsub}].
The @kbd{l *} (@code{calc-lu-times}) [@code{lupmul}] and @kbd{H l *}
[@code{lufmul}] commands will ``multiply'' a logarithmic unit by a
number; the @kbd{l /} (@code{calc-lu-divide}) [@code{lupdiv}] and
@kbd{H l /} [@code{lufdiv}] commands will ``divide'' a logarithmic
unit by a number. Note that the reference quantities don't play a role
in this arithmetic.
@node Musical Notes, , Logarithmic Units, Units
@section Musical Notes
@ -35539,16 +35536,16 @@ should also be added to @code{calc-embedded-announce-formula-alist}
and @code{calc-embedded-open-close-plain-alist}.
@end defvar
@defvar calc-logunits-power-reference
@defvarx calc-logunits-field-reference
@defvar calc-lu-power-reference
@defvarx calc-lu-field-reference
See @ref{Logarithmic Units}.@*
The variables @code{calc-logunits-power-reference} and
@code{calc-logunits-field-reference} are unit expressions (written as
The variables @code{calc-lu-power-reference} and
@code{calc-lu-field-reference} are unit expressions (written as
strings) which Calc will use as reference quantities for logarithmic
units.
The default value of @code{calc-logunits-power-reference} is @code{"mW"}
and the default value of @code{calc-logunits-field-reference} is
The default value of @code{calc-lu-power-reference} is @code{"mW"}
and the default value of @code{calc-lu-field-reference} is
@code{"20 uPa"}.
@end defvar
@ -36209,26 +36206,26 @@ keystrokes are not listed in this summary.
@r{ v x@: I k T @: @: @:ltpt@:(x,v)}
@c
@r{ a b@: l + @: @: @:lupoweradd@:(a,b)}
@r{ a b@: H l + @: @: @:lufieldadd@:(a,b)}
@r{ a b@: l - @: @: @:lupowersub@:(a,b)}
@r{ a b@: H l - @: @: @:lufieldsub@:(a,b)}
@r{ a b@: l * @: @: @:lupowermul@:(a,b)}
@r{ a b@: H l * @: @: @:lufieldmul@:(a,b)}
@r{ a b@: l / @: @: @:lupowerdiv@:(a,b)}
@r{ a b@: H l / @: @: @:lufielddiv@:(a,b)}
@r{ a@: l d @: @: @:dbpowerlevel@:(a)}
@r{ a b@: O l d @: @: @:dbpowerlevel@:(a,b)}
@r{ a@: H l d @: @: @:dbfieldlevel@:(a)}
@r{ a b@: O H l d @: @: @:dbfieldlevel@:(a,b)}
@r{ a@: l n @: @: @:nppowerlevel@:(a)}
@r{ a b@: O l n @: @: @:nppowerlevel@:(a,b)}
@r{ a@: H l n @: @: @:npfieldlevel@:(a)}
@r{ a b@: O H l n @: @: @:npfieldlevel@:(a,b)}
@r{ a@: l q @: @: @:powerquant@:(a)}
@r{ a b@: O l q @: @: @:powerquant@:(a,b)}
@r{ a@: H l q @: @: @:fieldquant@:(a)}
@r{ a b@: O H l q @: @: @:fieldquant@:(a,b)}
@r{ a b@: l + @: @: @:lupadd@:(a,b)}
@r{ a b@: H l + @: @: @:lufadd@:(a,b)}
@r{ a b@: l - @: @: @:lupsub@:(a,b)}
@r{ a b@: H l - @: @: @:lufsub@:(a,b)}
@r{ a b@: l * @: @: @:lupmul@:(a,b)}
@r{ a b@: H l * @: @: @:lufmul@:(a,b)}
@r{ a b@: l / @: @: @:lupdiv@:(a,b)}
@r{ a b@: H l / @: @: @:lufdiv@:(a,b)}
@r{ a@: l d @: @: @:dbpower@:(a)}
@r{ a b@: O l d @: @: @:dbpower@:(a,b)}
@r{ a@: H l d @: @: @:dbfield@:(a)}
@r{ a b@: O H l d @: @: @:dbfield@:(a,b)}
@r{ a@: l n @: @: @:nppower@:(a)}
@r{ a b@: O l n @: @: @:nppower@:(a,b)}
@r{ a@: H l n @: @: @:npfield@:(a)}
@r{ a b@: O H l n @: @: @:npfield@:(a,b)}
@r{ a@: l q @: @: @:lupquant@:(a)}
@r{ a b@: O l q @: @: @:lupquant@:(a,b)}
@r{ a@: H l q @: @: @:lufquant@:(a)}
@r{ a b@: O H l q @: @: @:lufquant@:(a,b)}
@r{ a@: l s @: @: @:spn@:(a)}
@r{ a@: l m @: @: @:midi@:(a)}
@r{ a@: l f @: @: @:freq@:(a)}

View file

@ -1202,6 +1202,10 @@ The text is killed and replaced with the contents of the variable
@code{message-elide-ellipsis}. The default value is to use an ellipsis
(@samp{[...]}).
This is a format-spec string, and you can use @samp{%l} to say how
many lines were removed, and @samp{%c} to say how many characters were
removed.
@item C-c M-k
@kindex C-c M-k
@findex message-kill-address
@ -1930,6 +1934,25 @@ posting a prepared news message.
@section Insertion Variables
@table @code
@item message-cite-style
@vindex message-cite-style
The overall style to be used when replying to messages. This controls
things like where the reply should be put relative to the original,
how the citation is formatted, where the signature goes, etc.
Value is either @code{nil} (no variable overrides) or a let-style list
of pairs @code{(VARIABLE VALUE)} to override default values.
See @code{gnus-posting-styles} to set this variable for specific
groups. Presets to impersonate popular mail agents are available in the
@code{message-cite-style-*} variables.
@item message-cite-reply-position
@vindex message-cite-reply-position
Where the reply should be positioned. Available styles are
@code{traditional} to reply inline, @code{above} for top-posting, and
@code{below} for bottom-posting
@item message-ignored-cited-headers
@vindex message-ignored-cited-headers
All headers that match this regexp will be removed from yanked
@ -2298,8 +2321,7 @@ created.
@item unique
@item t
Create the new buffer with the name generated in the Message way. This
is the default.
Create the new buffer with the name generated in the Message way.
@item unsent
Similar to @code{unique} but the buffer name begins with "*unsent ".
@ -2315,7 +2337,7 @@ type, the To address and the group name (any of these may be
@code{nil}). The function should return the new buffer name.
@end table
The default value is @code{unique}.
The default value is @code{unsent}.
@item message-max-buffers
@vindex message-max-buffers

View file

@ -2540,7 +2540,28 @@ Another trick might be that you put @code{ForwardX11 yes} or
that host.
@subsection Running shell-command on a remote host
@subsection Running @code{shell} on a remote host
@cindex shell
Calling @code{M-x shell} in a buffer related to a remote host runs the
local shell as defined in @option{shell-file-name}. This might be
also a valid path name for a shell to be applied on the remote host,
but it will fail at least when your local and remote hosts belong to
different system types, like @samp{windows-nt} and @samp{gnu/linux}.
You must set the variable @option{explicit-shell-file-name} to the
shell path name on the remote host, in order to start that shell on
the remote host.
@ifset emacs
Starting with Emacs 24 this won't be necessary, if you call
@code{shell} interactively. You will be asked for the remote shell
path, if you are on a remote buffer, and if
@option{explicit-shell-file-name} is equal to @code{nil}.
@end ifset
@subsection Running @code{shell-command} on a remote host
@cindex shell-command
@code{shell-command} allows to execute commands in a shell, either
@ -2556,13 +2577,13 @@ You will see the buffer @file{*Async Shell Command*}, containing the
continuous output of the @command{tail} command.
@subsection Running eshell on a remote host
@subsection Running @code{eshell} on a remote host
@cindex eshell
@value{tramp} is integrated into @file{eshell.el}. That is, you can
open an interactive shell on your remote host, and run commands there.
After you have started @code{eshell}, you could perform commands like
this:
After you have started @code{M-x eshell}, you could perform commands
like this:
@example
@b{~ $} cd @trampfn{sudo, , , /etc} @key{RET}

View file

@ -8,7 +8,7 @@
@c In the Tramp CVS, the version number is auto-frobbed from
@c configure.ac, so you should edit that file and run
@c "autoconf && ./configure" to change the version number.
@set trampver 2.2.1-pre
@set trampver 2.2.1
@c Other flags from configuration
@set instprefix /usr/local

View file

@ -1,3 +1,17 @@
2011-03-16 Juanma Barranquero <lekktu@gmail.com>
* NEWS: Document warning about _emacs.
2011-03-14 Michael Albinus <michael.albinus@gmx.de>
* NEWS: `shell' prompts for the shell path name, when the default
directory is a remote file name and neither environment variable
$ESHELL nor variable `explicit-shell-file-name' is set.
2011-03-08 Kristoffer Grönlund <krig@koru.se>
* themes/wombat-theme.el: New file.
2011-03-06 Juanma Barranquero <lekktu@gmail.com>
* srecode/el.srt: Fix typo.
@ -10,15 +24,15 @@
2011-02-17 Ken Manheimer <ken.manheimer@gmail.com>
* etc/images/icons/allout-widgets/dark-bg,
etc/images/icons/allout-widgets/light-bg,
encrypted-locked.{xpm,png}, unlocked-encrypted.{xpm,png}:
* etc/images/icons/allout-widgets/light-bg,
* encrypted-locked.{xpm,png}, unlocked-encrypted.{xpm,png}:
Reorganize icon directories and files to reconcile against windows
short-filename clashes.
2011-02-16 Ken Manheimer <ken.manheimer@gmail.com>
* etc/images/icons/allout-widgets-dark-bg,
etc/images/icons/allout-widgets-light-bg: Icons for new
* etc/images/icons/allout-widgets-light-bg: Icons for new
allout-widgets.el.
* etc/images/icons/README: Include coypright and GPL 3 license for

View file

@ -62,6 +62,8 @@ longer have any effect. (They were declared obsolete in Emacs 23.)
** New command line option `--no-site-lisp' removes site-lisp directories
from load-path. -Q now implies this.
** On Windows, Emacs now warns when the obsolete _emacs init file is used.
* Changes in Emacs 24.1
@ -79,6 +81,9 @@ error, its exit status is 1.
** Completion can cycle, depending on completion-cycle-threshold.
** `completing-read' can be customized using the new variable
`completing-read-function'
** auto-mode-case-fold is now enabled by default.
+++
@ -183,8 +188,8 @@ If you have code that adds something to kill-emacs-hook, you should
consider if it is still appropriate to add it in the noninteractive case.
** New scrolling commands `scroll-up-command' and `scroll-down-command'
(bound to C-v/[next] and M-v/[prior]) does not signal errors at top/bottom
of buffer at first key-press (instead moves to top/bottom of buffer)
(bound to C-v/[next] and M-v/[prior]) do not signal errors at top/bottom
of buffer at first key-press (instead move to top/bottom of buffer)
when a new variable `scroll-error-top-bottom' is non-nil.
** New scrolling commands `scroll-up-line' and `scroll-down-line'
@ -335,6 +340,10 @@ between applications.
the lines in the current rectangle. With an prefix argument, this
prompts for a number to count from and for a format string.
** The command shell prompts for the shell path name, when the default
directory is a remote file name and neither environment variable
$ESHELL nor variable `explicit-shell-file-name' is set.
* Changes in Specialized Modes and Packages in Emacs 24.1
@ -359,7 +368,7 @@ Just set shell-dir-cookie-re to an appropriate regexp.
** Archive Mode has basic support to browse 7z archives.
** browse-url has gotten a new variable that is used for mailto: URLs,
`browse-url-mailto-function', which defaults to `browse-url-mail'.
`browse-url-mailto-function', which defaults to `browse-url-mail'.
** Directory local variables can apply to file-less buffers, in certain modes
(eg dired, vc-dir, log-edit). For example, adding
@ -645,6 +654,8 @@ binding `log-view-expanded-log-entry-function' to a suitable function.
---
*** `copyright-fix-years' can optionally convert consecutive years to ranges.
*** New command `nato-region' converts text to NATO phonetic alphabet.
* New Modes and Packages in Emacs 24.1
@ -694,15 +705,14 @@ FIXME: This only says what was changed, but not what are the
programmer-visible consequences.
** Passing a nil argument to a minor mode function now turns the mode
ON unconditionally.
ON unconditionally.
** During startup, Emacs no longer adds entries for `menu-bar-lines'
and `tool-bar-lines' to `default-frame-alist' and
`initial-frame-alist'. With these alist entries omitted, `make-frame'
checks the value of the variable `menu-bar-mode'/`tool-bar-mode' to
determine whether to create a menu-bar or tool-bar, respectively.
If the alist entries are added, they override the value of
`menu-bar-mode'/`tool-bar-mode'.
and `tool-bar-lines' to `default-frame-alist' and `initial-frame-alist'.
With these alist entries omitted, `make-frame' checks the value of the
variable `menu-bar-mode'/`tool-bar-mode' to determine whether to create
a menu-bar or tool-bar, respectively. If the alist entries are added,
they override the value of `menu-bar-mode'/`tool-bar-mode'.
** Regions created by mouse dragging are now normal active regions,
similar to the ones created by shift-selection. In previous Emacs
@ -822,13 +832,13 @@ displayed with a "spinning bar".
* Changes in Emacs 24.1 on non-free operating systems
** New configure.bat option --enable-checking builds emacs with extra
** New configure.bat option --enable-checking builds Emacs with extra
runtime checks.
** New configure.bat option --distfiles to specify files to be
included in binary distribution
included in binary distribution.
** New make target `dist' to create binary distribution for MS Windows
** New make target `dist' to create binary distribution for MS Windows.
----------------------------------------------------------------------

View file

@ -58,3 +58,9 @@
'(window-number-face ((t (:foreground "red" :weight bold)))))
(provide-theme 'tsdh-dark)
;; Local Variables:
;; no-byte-compile: t
;; End:
;;; tsdh-dark-theme.el ends here

View file

@ -57,3 +57,10 @@
'(window-number-face ((t (:foreground "red" :weight bold)))))
(provide-theme 'tsdh-light)
;; Local Variables:
;; no-byte-compile: t
;; End:
;;; tsdh-light-theme.el ends here

108
etc/themes/wombat-theme.el Normal file
View file

@ -0,0 +1,108 @@
;;; wombat-theme.el --- Custom face theme for Emacs
;; Copyright (C) 2011 Free Software Foundation, Inc.
;; Author: Kristoffer Grönlund <krig@koru.se>
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Code:
(deftheme wombat
"Theme for faces, using easy-on-the eyes colors on a dark gray background.
Adapted, with permission, from a Vim color scheme by Lars H. Nielsen.
Basic, Font Lock, Isearch, Gnus, Message, and Ansi-Color faces
are included.")
(let ((class '((class color) (min-colors 89))))
(custom-theme-set-faces
'wombat
`(default ((,class (:background "#242424" :foreground "#f6f3e8"))))
`(cursor ((,class (:background "#656565" :foreground "#f6f3e8"))))
;; Highlighting faces
`(fringe ((,class (:background "#303030"))))
`(highlight ((,class (:background "#454545" :foreground "#ffffff"
:underline t))))
`(region ((,class (:background "#444444" :foreground "#f6f3e8"))))
`(secondary-selection ((,class (:background "#333366" :foreground "#f6f3e8"))))
`(isearch ((,class (:background "#343434" :foreground "#857b6f"))))
`(lazy-highlight ((,class (:background "#384048" :foreground "#a0a8b0"))))
;; Mode line faces
`(mode-line ((,class (:background "#444444" :foreground "#f6f3e8"))))
`(mode-line-inactive ((,class (:background "#444444" :foreground "#857b6f"))))
;; Escape and prompt faces
`(minibuffer-prompt ((,class (:foreground "#e5786d"))))
`(escape-glyph ((,class (:foreground "#ddaa6f" :weight bold))))
;; Font lock faces
`(font-lock-builtin-face ((,class (:foreground "#e5786d"))))
`(font-lock-comment-face ((,class (:foreground "#99968b"))))
`(font-lock-constant-face ((,class (:foreground "#e5786d"))))
`(font-lock-function-name-face ((,class (:foreground "#cae682"))))
`(font-lock-keyword-face ((,class (:foreground "#8ac6f2" :weight bold))))
`(font-lock-string-face ((,class (:foreground "#95e454"))))
`(font-lock-type-face ((,class (:foreground "#92a65e" :weight bold))))
`(font-lock-variable-name-face ((,class (:foreground "#cae682"))))
`(font-lock-warning-face ((,class (:foreground "#ccaa8f"))))
;; Button and link faces
`(link ((,class (:foreground "#8ac6f2" :underline t))))
`(link-visited ((,class (:foreground "#e5786d" :underline t))))
`(button ((,class (:background "#333333" :foreground "#f6f3e8"))))
`(header-line ((,class (:background "#303030" :foreground "#e7f6da"))))
;; Gnus faces
`(gnus-group-news-1 ((,class (:weight bold :foreground "#95e454"))))
`(gnus-group-news-1-low ((,class (:foreground "#95e454"))))
`(gnus-group-news-2 ((,class (:weight bold :foreground "#cae682"))))
`(gnus-group-news-2-low ((,class (:foreground "#cae682"))))
`(gnus-group-news-3 ((,class (:weight bold :foreground "#ccaa8f"))))
`(gnus-group-news-3-low ((,class (:foreground "#ccaa8f"))))
`(gnus-group-news-4 ((,class (:weight bold :foreground "#99968b"))))
`(gnus-group-news-4-low ((,class (:foreground "#99968b"))))
`(gnus-group-news-5 ((,class (:weight bold :foreground "#cae682"))))
`(gnus-group-news-5-low ((,class (:foreground "#cae682"))))
`(gnus-group-news-low ((,class (:foreground "#99968b"))))
`(gnus-group-mail-1 ((,class (:weight bold :foreground "#95e454"))))
`(gnus-group-mail-1-low ((,class (:foreground "#95e454"))))
`(gnus-group-mail-2 ((,class (:weight bold :foreground "#cae682"))))
`(gnus-group-mail-2-low ((,class (:foreground "#cae682"))))
`(gnus-group-mail-3 ((,class (:weight bold :foreground "#ccaa8f"))))
`(gnus-group-mail-3-low ((,class (:foreground "#ccaa8f"))))
`(gnus-group-mail-low ((,class (:foreground "#99968b"))))
`(gnus-header-content ((,class (:foreground "#8ac6f2"))))
`(gnus-header-from ((,class (:weight bold :foreground "#95e454"))))
`(gnus-header-subject ((,class (:foreground "#cae682"))))
`(gnus-header-name ((,class (:foreground "#8ac6f2"))))
`(gnus-header-newsgroups ((,class (:foreground "#cae682"))))
;; Message faces
`(message-header-name ((,class (:foreground "#8ac6f2" :weight bold))))
`(message-header-cc ((,class (:foreground "#95e454"))))
`(message-header-other ((,class (:foreground "#95e454"))))
`(message-header-subject ((,class (:foreground "#cae682"))))
`(message-header-to ((,class (:foreground "#cae682"))))
`(message-cited-text ((,class (:foreground "#99968b"))))
`(message-separator ((,class (:foreground "#e5786d" :weight bold))))))
(custom-theme-set-variables
'wombat
'(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682"
"#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"]))
(provide-theme 'wombat)
;; Local Variables:
;; no-byte-compile: t
;; End:
;;; wombat-theme.el ends here

View file

@ -119,7 +119,7 @@
($(BLD)/etags.$(O), $(BLD)/movemail.$(O), $(BLD)/ntlib.$(O)):
Depend on $(EMACS_ROOT)/nt/inc/sys/stat.h.
2011-02-21 Ben Key <bkey76@gmail.com> (tiny change)
2011-02-21 Ben Key <bkey76@gmail.com>
* make-docfile.c (scan_c_file): Adapt DEFVAR_PER_BUFFER case to
the new BVAR macro.

View file

@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value lstat mktime readlink strftime symlink sys_stat
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink strftime symlink sys_stat
MOSTLYCLEANFILES += core *.stackdump

View file

@ -355,7 +355,11 @@ _GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
#if @GNULIB_FUTIMENS@
# if @REPLACE_FUTIMENS@
/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens
implementation relies on futimesat, which on Solaris 10 makes an invocation
to futimens that is meant to invoke the libc's futimens(), not gnulib's
futimens(). */
# if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef futimens
# define futimens rpl_futimens
@ -368,7 +372,9 @@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
# endif
_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
# endif
# if @HAVE_FUTIMENS@
_GL_CXXALIASWARN (futimens);
# endif
#elif defined GNULIB_POSIXCHECK
# undef futimens
# if HAVE_RAW_DECL_FUTIMENS
@ -612,7 +618,11 @@ _GL_WARN_ON_USE (stat, "stat is unportable - "
#if @GNULIB_UTIMENSAT@
# if @REPLACE_UTIMENSAT@
/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat
implementation relies on futimesat, which on Solaris 10 makes an invocation
to utimensat that is meant to invoke the libc's utimensat(), not gnulib's
utimensat(). */
# if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef utimensat
# define utimensat rpl_utimensat
@ -631,7 +641,9 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
struct timespec const times[2], int flag));
# endif
# if @HAVE_UTIMENSAT@
_GL_CXXALIASWARN (utimensat);
# endif
#elif defined GNULIB_POSIXCHECK
# undef utimensat
# if HAVE_RAW_DECL_UTIMENSAT

View file

@ -1,3 +1,410 @@
2011-03-21 Glenn Morris <rgm@gnu.org>
* eshell/esh-opt.el (eshell-eval-using-options, eshell-process-args):
Doc fixes.
2011-03-21 Chong Yidong <cyd@stupidchicken.com>
* cus-theme.el: Add missing provide statement.
(customize-create-theme): Extract theme value correctly.
(custom-theme-visit-theme): Autoload.
(customize-create-theme): Prompt before inserting default faces.
2011-03-20 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-menu.el (calc-units-menu): Add entries for logarithmic
units and musical notes.
2011-03-20 Leo <sdl.web@gmail.com>
* ido.el (ido-read-internal): Use completing-read-default.
(ido-completing-read): Fix compatibility with completing-read.
2011-03-20 Christian Ohler <ohler@gnu.org>
* emacs-lisp/ert.el (ert-run-tests-batch): Remove unused variable.
(ert-delete-all-tests): Use `called-interactively-p' rather than
`interactive-p'.
(ert--make-xrefs-region): Respect END.
2011-03-19 Chong Yidong <cyd@stupidchicken.com>
* dired-aux.el (dired-create-directory): Signal an error if the
directory already exists (Bug#8246).
* facemenu.el (list-colors-display): Call list-faces-display
inside with-help-window.
(list-colors-print): Use display property to align the final
column, instead of checking window-width.
2011-03-19 Eli Zaretskii <eliz@gnu.org>
* emerge.el (emerge-metachars): Separate value for ms-dos and
windows-nt systems.
(emerge-protect-metachars): Quote correctly for ms-dos and
windows-nt systems.
2011-03-19 Ralph Schleicher <rs@ralph-schleicher.de>
* info.el (info-initialize): Replace all uses of `:' with
path-separator for compatibility with non-Unix systems.
Cache quoting of path-separator. (Bug#8258)
2011-03-19 Juanma Barranquero <lekktu@gmail.com>
* avoid.el (mouse-avoidance-mode, mouse-avoidance-nudge-dist)
(mouse-avoidance-threshold, mouse-avoidance-banish-destination)
(mouse-avoidance-mode): Fix typos in docstrings.
2011-03-19 Chong Yidong <cyd@stupidchicken.com>
* startup.el (package-subdirectory-regexp): Move from package.el.
Omit \\` and \\', and let callers add them.
* emacs-lisp/package.el (package-strip-version)
(package-load-all-descriptors): Add \\` and \\' to
package-subdirectory-regexp before using it.
(package-untar-buffer): New arg DIR; ensure that file untars only
into this expected directory. Remove superfluous delete-region.
(package-unpack): Caller changed.
(package-tar-file-info): Use package-subdirectory-regexp.
2011-03-18 Stefan Monnier <monnier@iro.umontreal.ca>
* vc/diff-mode.el (diff-mode-map): Shadow problematic bindings from
diff-mode-shared-map (bug#8284).
(diff-mode-shared-map): Re-introduce some bindings that were problematic.
2011-03-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
* calendar/time-date.el (format-seconds): Use assoc instead of
assoc-string, since assoc-string doesn't exist in XEmacs.
2011-03-17 Juanma Barranquero <lekktu@gmail.com>
* custom.el (custom-known-themes): Reflow docstring.
(custom-theme-load-path): Fix typo in docstring.
(load-theme): Fix typo in error message.
(custom-available-themes, custom-variable-theme-value):
Use `let', not `let*'.
2011-03-17 Jay Belanger <jay.p.belanger@gmail.com>
* calc/README: Mention inclusion of musical notes.
* calc/calc-units.el (calc-lu-quant): Rename from
`calc-logunits-quantity'.
(calcFunc-lupquant): Rename from `calcFunc-powerquant'.
(calcFunc-lufquant): Rename from `calcFunc-fieldquant'.
(calc-db): Rename from `calc-dblevel'.
(calcFunc-dbpower): Rename from `calcFunc-dbpowerlevel'.
(calcFunc-dbfield): Rename from `calcFunc-dbfieldlevel'.
(calc-np): Rename from `calc-nplevel'.
(calcFunc-nppower): Rename from `calcFunc-nppowerlevel'.
(calcFunc-npfield): Rename from `calcFunc-npfieldlevel'.
(calc-lu-plus): Rename from `calc-logunits-add'.
(calcFunc-lupadd): Rename from `calcFunc-lupoweradd'.
(calcFunc-lufadd): Rename from `calcFunc-lufieldadd'.
(calc-lu-minus): Rename from `calc-logunits-sub'.
(calcFunc-lupsub): Rename from `calcFunc-lupowersub'.
(calcFunc-lufsub): Rename from `calcFunc-lufieldsub'.
(calc-lu-times): Rename from `calc-logunits-mul'.
(calcFunc-lupmul): Rename from `calcFunc-lupowermul'.
(calcFunc-lufmul): Rename from `calcFunc-lufieldmul'.
(calc-lu-divide): Rename from `calc-logunits-div'.
(calcFunc-lupdiv): Rename from `calcFunc-lupowerdiv'.
(calcFunc-lufdiv): Rename from `calcFunc-lufielddiv'.
* calc/calc-ext.el (calc-init-extensions): Update the names of the
functions being autoloaded.
* calc/calc.el (calc-lu-power-reference): Rename from
`calc-logunits-power-reference'.
(calc-lu-field-reference): Rename from
`calc-logunits-field-reference'.
* calc/calc-help (calc-l-prefix-help): Mention musical note functions.
2011-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el (completion-all-sorted-completions):
Use :completion-cycle-penalty text property if present.
2011-03-16 Ken Manheimer <ken.manheimer@gmail.com>
* allout.el (allout-yank-processing): Adjust for new rebulleting
regime so bullet being yanked is used without prompting the user
for a choice.
2011-03-16 Juanma Barranquero <lekktu@gmail.com>
* startup.el (command-line): Warn the user that _emacs is deprecated.
2011-03-16 Juanma Barranquero <lekktu@gmail.com>
* progmodes/delphi.el (delphi-search-path, delphi-indent-level)
(delphi-verbose, delphi-comment-face, delphi-string-face)
(delphi-keyword-face, delphi-ignore-changes, delphi-indent-line)
(delphi-mode-abbrev-table, delphi-debug-buffer, delphi-tab)
(delphi-find-unit, delphi-find-current-xdef, delphi-fill-comment)
(delphi-new-comment-line, delphi-font-lock-defaults)
(delphi-debug-mode-map, delphi-mode-syntax-table, delphi-mode):
Fix typos in docstrings.
2011-03-15 Ken Manheimer <ken.manheimer@gmail.com>
* allout.el (allout-make-topic-prefix, allout-rebullet-heading):
Invert the roles of character and string values for INSTEAD, so a
string is used for the more common case of a defaulting prompt.
2011-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/ruby-mode.el (ruby-backward-sexp):
* progmodes/ebrowse.el (ebrowse-draw-file-member-info):
* play/gamegrid.el (gamegrid-make-face):
* play/bubbles.el (bubbles--grid-width, bubbles--grid-height)
(bubbles--colors, bubbles--shift-mode, bubbles--initialize-images):
* notifications.el (notifications-notify):
* net/xesam.el (xesam-search-engines):
* net/quickurl.el (quickurl-list-insert):
* vc/vc-hg.el (vc-hg-dir-printer): Fix use of case.
2011-03-15 Chong Yidong <cyd@stupidchicken.com>
* startup.el (command-line): Update package subdirectory regexp.
2011-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
* allout.el (allout-abbreviate-flattened-numbering)
(allout-mode-deactivate-hook): Fix up obsolescence "date".
* subr.el (read-char-choice): Only show the cursor after the prompt,
not after the answer.
2011-03-15 Kevin Ryde <user42@zip.com.au>
* help-fns.el (variable-at-point): Skip leading quotes, if any
(bug#8253).
2011-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/bytecomp.el (byte-compile-save-excursion): Change the
warning message.
2011-03-14 Michael Albinus <michael.albinus@gmx.de>
* shell.el (shell): When called interactively, offer to change the
shell file name on remote hosts.
2011-03-13 Teodor Zlatanov <tzz@lifelogs.com>
* net/ldap.el (ldap-search-internal): Add `auth-source-search'
integration for LDAP parameters. The host, base, user or binddn,
and secret tokens can be specified in a netrc file, for instance.
This is optional because an `auth-source' parameter must be
specified in the search attributes.
2011-03-13 Juanma Barranquero <lekktu@gmail.com>
* help.el (describe-mode): Link to the mode's definition (bug#8185).
2011-03-12 Stefan Monnier <monnier@iro.umontreal.ca>
* ebuff-menu.el (electric-buffer-menu-mode-map): Move initialization
into declaration. Remove redundant and harmful binding.
2011-03-12 Eli Zaretskii <eliz@gnu.org>
* files.el (file-ownership-preserved-p): Pass `integer' as an
explicit 2nd argument to `file-attributes'. If the file's owner
is the Administrators group on Windows, and the current user is
Administrator, consider that a match.
* server.el (server-ensure-safe-dir): Consider server directory
safe on MS-Windows if its owner is the Administrators group while
the current Emacs user is Administrator. Use `=' to compare
numerical UIDs, since they could be integers or floats.
2011-03-12 Juanma Barranquero <lekktu@gmail.com>
* vc/vc-bzr.el (vc-bzr-state): Handle bzr 2.3.0 (follow-up to bug#8170).
2011-03-12 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.2.1.
* net/tramp-sh.el (tramp-methods): Exchange "%k" marker with options.
* net/trampver.el: Update release number.
2011-03-12 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/compile.el (compilation--previous-directory): Fix up
various nil/dead-marker mismatches (bug#8014).
(compilation-directory-properties, compilation-error-properties):
Don't call it at a position past the one we're about to change.
* emacs-lisp/bytecomp.el (byte-compile-make-obsolete-variable):
Disable obsolescence warnings in the file that declares it.
2011-03-11 Ken Manheimer <ken.manheimer@gmail.com>
* allout-widgets.el (allout-widgets-tally): Initialize
allout-widgets-tally as a hash table rather than nil to prevent
mode-line redisplay warnings.
Also, clarify the module description and fix a comment typo.
2011-03-11 Juanma Barranquero <lekktu@gmail.com>
* help-fns.el (describe-variable): Don't complete keywords.
Suggested by Teodor Zlatanov <tzz@lifelogs.com>.
2011-03-10 Chong Yidong <cyd@stupidchicken.com>
* emacs-lisp/package.el (package-version-join): Impose a standard
string representation for pre/alpha/beta version lists.
(package-unpack-single): Standardize the directory name by passing
it through package-version-join.
(package-strip-rcs-id): Accept any version string that does not
signal an error in version-to-list.
2011-03-10 Michael Albinus <michael.albinus@gmx.de>
* simple.el (delete-trailing-whitespace): Return nil for the
benefit of `write-file-functions'.
2011-03-10 Glenn Morris <rgm@gnu.org>
* vc/vc-hg.el (vc-hg-pull, vc-hg-merge-branch): Use vc-hg-program.
* vc/vc-git.el (vc-git-program): New option.
(vc-git-branches, vc-git-pull, vc-git-merge-branch, vc-git-command)
(vc-git--call): Use it.
* eshell/esh-util.el (eshell-condition-case): Doc fix.
* cus-edit.el (Custom-newline): If no button at point, look
for a subgroup button at start-of-line. (Bug#2298)
* mail/rmail.el (rmail-msgend, rmail-msgbeg): Doc fixes.
2011-03-10 Julien Danjou <julien@danjou.info>
* avoid.el (mouse-avoidance-ignore-p): Do not move the cursor if
`cursor-type' is nil.
2011-03-09 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc.el (calc-mode-map): Don't bind "C-_" to `calc-missing-key'.
2011-03-09 Ken Manheimer <ken.manheimer@gmail.com>
* allout.el Summary: Change so yank of distinctive-bullet items
preserves the existing header prefix, rebulleting it if necessary,
rather than replacing it. This is necessary for proper operation
of cooperative addons like allout-widgets.
(allout-make-topic-prefix, allout-rebullet-heading): Change
SOLICIT arg to INSTEAD, and interpret additionally a string value
as alternate bullet to be used, instead of prompting the user for
a bullet character.
2011-03-09 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do
not use `tramp-file-name-port', because this returns also
`tramp-default-port'.
2011-03-09 Deniz Dogan <deniz.a.m.dogan@gmail.com>
* net/rcirc.el (rcirc-handler-001): Remove useless
with-rcirc-process-buffer.
(rcirc-check-auth-status): Swap arguments to string-match.
2011-03-09 Glenn Morris <rgm@gnu.org>
* shell.el (shell-mode):
Set comint-input-ring-size from HISTSIZE. (Bug#7889)
* progmodes/gdb-mi.el (gdb): Improve 2010-12-08 change.
Check for GDBHISTFILE, HISTSIZE, etc. (Bug#7889)
2011-03-08 Chong Yidong <cyd@stupidchicken.com>
* emacs-lisp/package.el (package-refresh-contents)
(package-menu-execute): Use condition-case-no-debug.
2011-03-08 Michael Albinus <michael.albinus@gmx.de>
* simple.el (shell-command-to-string): Use `process-file'.
* emacs-lisp/package.el (package-tar-file-info): Handle also
remote files.
* emacs-lisp/package-x.el (package-upload-buffer-internal): Use
`equal' for upload base check.
2011-03-08 Arni Magnusson <arnima@hafro.is> (tiny change)
* textmodes/texinfo.el (texinfo-environments):
Add deftypecv, deftypeivar, deftypemethod, deftypeop, html. (Bug#2783)
2011-03-08 Glenn Morris <rgm@gnu.org>
* cus-start.el (cursor-in-non-selected-windows):
Fix :set quoting oddness. (Bug#8192)
* font-lock.el (lisp-font-lock-keywords-1): Don't highlight `)'
in some setf expressions. (Bug#2159)
2011-03-08 Chong Yidong <cyd@stupidchicken.com>
* custom.el (custom-available-themes): Return themes in
alphabetical order.
2011-03-07 Chong Yidong <cyd@stupidchicken.com>
* progmodes/cc-cmds.el (c-beginning-of-statement): Fix incorrect
application of patch from Alan Mackenzie (Bug#7595).
2011-03-07 Deniz Dogan <deniz.a.m.dogan@gmail.com>
* net/rcirc.el (rcirc-connect): Fix PASS bug.
2011-03-07 Glenn Morris <rgm@gnu.org>
* vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt.
Give an explicit error if failed to make writable. (Bug#6146)
2011-03-07 Ed Reingold <reingold@emr.cs.iit.edu>
* calendar/cal-hebrew.el (diary-hebrew-yahrzeit):
Add optional `after-sunset' argument. (Bug#8190)
2011-03-07 Aaron S. Hawley <aaron.s.hawley@gmail.com>
* play/morse.el (nato-alphabet, nato-region, denato-region):
New variable and functions. (Bug#2288)
(morse-region, unmorse-region): Barf if read-only.
2011-03-06 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/gud.el (gdb-script-syntax-propertize-function):
Don't change the syntax of a \n that closes a comment (bug#8169).
2011-03-06 Chong Yidong <cyd@stupidchicken.com>
* emacs-lisp/package-x.el (package-archive-upload-base): Make it a
defcustom.
(package--update-file): Doc fix. Accept relative file names.
(package--archive-contents-from-file): Remove the argument, since
it's necessarily always "archive-contents".
(package-maint-add-news-item): Pass relative file name args to
package--update-file.
(package-upload-buffer-internal): Prompt for a destination if
package-archive-upload-base is invalid. Create the directory if
it does not exist.
(package-upload-buffer, package-upload-file): Doc fix.
2011-03-06 Chong Yidong <cyd@stupidchicken.com>
* isearch.el (isearch-mode-map): Bind C-y to isearch-yank-kill,
@ -11,8 +418,8 @@
2011-03-06 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-ext.el (calc-init-extensions): Rename
calc-logunits-dblevel and calc-logunits-nplevel to calc-dblevel
* calc/calc-ext.el (calc-init-extensions):
Rename calc-logunits-dblevel and calc-logunits-nplevel to calc-dblevel
and calc-nplevel, respectively. Add keybindings for calc-spn,
calc-midi and calc-freq. Add autoloads for calcFunc-spn,
calcFunc-midi, calcFunc-freq, calc-spn, calc-midi and calc-freq.
@ -732,7 +1139,7 @@
2011-02-17 Ken Manheimer <ken.manheimer@gmail.com>
* lisp/allout-widgets.el (allout-widgets-icons-light-subdir)
(allout-widgets-icons-dark-subdir): Track relocations of icons
(allout-widgets-icons-dark-subdir): Track relocations of icons.
* lisp/allout.el: Remove commentary about remove encryption
passphrase mnemonic support and verification.
(allout-encrypt-string): Recognize epg failure to decrypt gpg2
@ -1109,10 +1516,9 @@
(allout-auto-activation-helper, allout-setup): New autoloads
implement new custom set procedure for allout-auto-activation.
Also, explicitly invoke
(allout-setup) after allout-auto-activation is custom-defined, to
effect the settings in emacs sessions besides the few where
allout-auto-activation customization is donea.
Also, explicitly invoke (allout-setup) after allout-auto-activation
is custom-defined, to affect the settings in emacs sessions besides
the few where allout-auto-activation customization is done.
(allout-auto-activation): Use allout-auto-activation-helper to
:set. Revise the docstring.
(allout-init): Reduce functionality to just customizing

View file

@ -1,4 +1,4 @@
;; allout-widgets.el --- Show allout outline structure with graphical widgets.
;; allout-widgets.el --- Visually highlight allout outline structure.
;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Ken Manheimer
@ -238,7 +238,7 @@ buffer, and tracking increases as new widgets are added and
decreases as obsolete widgets are garbage collected."
:type 'boolean
:group 'allout-widgets-developer)
(defvar allout-widgets-tally nil
(defvar allout-widgets-tally (make-hash-table :test 'eq :weakness 'key)
"Hash-table of existing allout widgets, for debugging.
Table is maintained iff `allout-widgets-maintain-tally' is non-nil.

View file

@ -310,6 +310,7 @@ Auto-layout is not.
With value nil, inhibit any automatic allout-mode activation."
:set 'allout-auto-activation-helper
;; FIXME: Using strings here is unusual and less efficient than symbols.
:type '(choice (const :tag "On" t)
(const :tag "Ask about layout" "ask")
(const :tag "Mode only" "activate")
@ -752,7 +753,7 @@ Set this var to the bullet you want to use for file cross-references."
;;;_ = allout-flattened-numbering-abbreviation
(define-obsolete-variable-alias 'allout-abbreviate-flattened-numbering
'allout-flattened-numbering-abbreviation "24.0")
'allout-flattened-numbering-abbreviation "24.1")
(defcustom allout-flattened-numbering-abbreviation nil
"If non-nil, `allout-flatten-exposed-to-buffer' abbreviates topic
numbers to minimal amount with some context. Otherwise, entire
@ -1402,7 +1403,7 @@ their settings before allout-mode was started."
(defvar allout-mode-deactivate-hook nil
"*Hook that's run when allout mode ends.")
(define-obsolete-variable-alias 'allout-mode-deactivate-hook
'allout-mode-off-hook "future")
'allout-mode-off-hook "24.1")
;;;_ = allout-exposure-category
(defvar allout-exposure-category nil
"Symbol for use as allout invisible-text overlay category.")
@ -3465,13 +3466,13 @@ Offer one suitable for current depth DEPTH as default."
(defun allout-make-topic-prefix (&optional prior-bullet
new
depth
solicit
instead
number-control
index)
;; Depth null means use current depth, non-null means we're either
;; opening a new topic after current topic, lower or higher, or we're
;; changing level of current topic.
;; Solicit dominates specified bullet-char.
;; Instead dominates specified bullet-char.
;;;_ . Doc string:
"Generate a topic prefix suitable for optional arg DEPTH, or current depth.
@ -3492,15 +3493,18 @@ bullet or previous sibling.
Third arg DEPTH forces the topic prefix to that depth, regardless of
the current topics' depth.
If SOLICIT is non-nil, then the choice of bullet is solicited from
user. If it's a character, then that character is offered as the
default, otherwise the one suited to the context (according to
distinction or depth) is offered. (This overrides other options,
including, eg, a distinctive PRIOR-BULLET.) If non-nil, then the
context-specific bullet is used.
If INSTEAD is:
- nil, then the bullet char for the context is used, per distinction or depth
- a \(numeric) character, then character's string representation is used
- a string, then the user is asked for bullet with the first char as default
- anything else, the user is solicited with bullet char per context as default
\(INSTEAD overrides other options, including, eg, a distinctive
PRIOR-BULLET.)
Fifth arg, NUMBER-CONTROL, matters only if `allout-numbered-bullet'
is non-nil *and* soliciting was not explicitly invoked. Then
is non-nil *and* no specific INSTEAD was specified. Then
NUMBER-CONTROL non-nil forces prefix to either numbered or
denumbered format, depending on the value of the sixth arg, INDEX.
@ -3549,8 +3553,13 @@ index for each successive sibling)."
;; Solicitation overrides numbering and other cases:
((progn (setq body (make-string (- depth 2) ?\ ))
;; The actual condition:
solicit)
(let* ((got (allout-solicit-alternate-bullet depth solicit)))
instead)
(let ((got (cond ((stringp instead)
(if (> (length instead) 0)
(allout-solicit-alternate-bullet
depth (substring instead 0 1))))
((characterp instead) (char-to-string instead))
(t (allout-solicit-alternate-bullet depth)))))
;; Gotta check whether we're numbering and got a numbered bullet:
(setq numbering (and allout-numbered-bullet
(not (and number-control (not index)))
@ -3913,7 +3922,7 @@ Note that refill of indented paragraphs is not done."
(allout-end-of-prefix)
(setq from allout-recent-prefix-beginning
to allout-recent-prefix-end)
(allout-rebullet-heading t ;;; solicit
(allout-rebullet-heading t ;;; instead
nil ;;; depth
nil ;;; number-control
nil ;;; index
@ -3931,8 +3940,8 @@ Note that refill of indented paragraphs is not done."
(message "Done.")
(cond (on-bullet (goto-char (allout-current-bullet-pos)))
(initial-col (move-to-column initial-col)))))
;;;_ > allout-rebullet-heading (&optional solicit ...)
(defun allout-rebullet-heading (&optional solicit
;;;_ > allout-rebullet-heading (&optional instead ...)
(defun allout-rebullet-heading (&optional instead
new-depth
number-control
index
@ -3942,11 +3951,11 @@ Note that refill of indented paragraphs is not done."
All args are optional.
If SOLICIT is non-nil, then the choice of bullet is solicited from
user. If it's a character, then that character is offered as the
default, otherwise the one suited to the context (according to
distinction or depth) is offered. If non-nil, then the
context-specific bullet is just used.
If INSTEAD is:
- nil, then the bullet char for the context is used, per distinction or depth
- a \(numeric) character, then character's string representation is used
- a string, then the user is asked for bullet with the first char as default
- anything else, the user is solicited with bullet char per context as default
Second arg DEPTH forces the topic prefix to that depth, regardless
of the topic's current depth.
@ -3981,7 +3990,7 @@ this function."
(new-prefix (allout-make-topic-prefix current-bullet
nil
new-depth
solicit
instead
number-control
index)))
@ -4028,7 +4037,7 @@ this function."
(cond ((numberp index) (1+ index))
((not number-control) (allout-sibling-index))))
(if (allout-numbered-type-prefix)
(allout-rebullet-heading nil ;;; solicit
(allout-rebullet-heading nil ;;; instead
new-depth ;;; new-depth
number-control;;; number-control
index ;;; index
@ -4145,7 +4154,7 @@ a topic and its immediate offspring is greater than one.)"
(when (< relative-depth 0)
(save-excursion
(goto-char local-point)
(allout-rebullet-heading nil ;;; solicit
(allout-rebullet-heading nil ;;; instead
(+ starting-depth relative-depth)
nil ;;; number
starting-index
@ -4203,7 +4212,7 @@ Returns final depth."
; Prime ascender for ascension:
(setq ascender (1- allout-recent-depth))
(if (>= allout-recent-depth depth)
(allout-rebullet-heading nil ;;; solicit
(allout-rebullet-heading nil ;;; instead
nil ;;; depth
nil ;;; number-control
nil ;;; index
@ -4230,7 +4239,7 @@ rebulleting each topic at this level."
(use-bullet (equal '(16) denumber))
(more t))
(while more
(allout-rebullet-heading use-bullet ;;; solicit
(allout-rebullet-heading use-bullet ;;; instead
depth ;;; depth
t ;;; number-control
index ;;; index
@ -4577,32 +4586,20 @@ however, are left exactly like normal, non-allout-specific yanks."
(progn (widen)
(forward-char -1)
(narrow-to-region subj-beg (point))))))
;; Preserve new bullet if it's a distinctive one, otherwise
;; use old one:
(if (string-match (regexp-quote prefix-bullet)
allout-distinctive-bullets-string)
; Delete from bullet of old to
; before bullet of new:
(progn
(beginning-of-line)
(allout-unprotected
(delete-region (point) subj-beg))
(set-marker (allout-mark-marker t) subj-end)
(goto-char subj-beg)
(allout-end-of-prefix))
; Delete base subj prefix,
; leaving old one:
(allout-unprotected
(progn
(delete-region (point) (+ (point)
prefix-len
(- adjust-to-depth
subj-depth)))
;; Remove new heading prefix:
(allout-unprotected
(progn
(delete-region (point) (+ (point)
prefix-len
(- adjust-to-depth
subj-depth)))
; and delete residual subj
; prefix digits and space:
(while (looking-at "[0-9]") (delete-char 1))
(if (looking-at " ")
(delete-char 1))))))
(while (looking-at "[0-9]") (delete-char 1))
(if (looking-at " ")
(delete-char 1))))
;; Assert new topic's bullet - minimal effort if unchanged:
(allout-rebullet-heading (string-to-char prefix-bullet)))
(exchange-point-and-mark))))
(if rectify-numbering
(progn
@ -4613,7 +4610,7 @@ however, are left exactly like normal, non-allout-specific yanks."
(goto-char subj-beg)
(if (allout-goto-prefix-doublechecked)
(allout-unprotected
(allout-rebullet-heading nil ;;; solicit
(allout-rebullet-heading nil ;;; instead
(allout-depth) ;;; depth
nil ;;; number-control
nil ;;; index

View file

@ -76,7 +76,7 @@
;;;###autoload
(defcustom mouse-avoidance-mode nil
"Activate mouse avoidance mode.
"Activate Mouse Avoidance mode.
See function `mouse-avoidance-mode' for possible values.
Setting this variable directly does not take effect;
use either \\[customize] or the function `mouse-avoidance-mode'."
@ -85,8 +85,7 @@ use either \\[customize] or the function `mouse-avoidance-mode'."
(mouse-avoidance-mode (or value 'none)))
:initialize 'custom-initialize-default
:type '(choice (const :tag "none" nil) (const banish) (const jump)
(const animate) (const exile) (const proteus)
)
(const animate) (const exile) (const proteus))
:group 'avoid
:require 'avoid
:version "20.3")
@ -94,7 +93,7 @@ use either \\[customize] or the function `mouse-avoidance-mode'."
(defcustom mouse-avoidance-nudge-dist 15
"Average distance that mouse will be moved when approached by cursor.
Only applies in Mouse-Avoidance mode `jump' and its derivatives.
Only applies in Mouse Avoidance mode `jump' and its derivatives.
For best results make this larger than `mouse-avoidance-threshold'."
:type 'integer
:group 'avoid)
@ -112,7 +111,7 @@ For best results make this larger than `mouse-avoidance-threshold'."
(defcustom mouse-avoidance-threshold 5
"Mouse-pointer's flight distance.
If the cursor gets closer than this, the mouse pointer will move away.
Only applies in mouse-avoidance-modes `animate' and `jump'."
Only applies in Mouse Avoidance modes `animate' and `jump'."
:type 'integer
:group 'avoid)
@ -183,7 +182,7 @@ Acceptable distance is defined by `mouse-avoidance-threshold'."
mouse-avoidance-threshold))))))
(defun mouse-avoidance-banish-destination ()
"The position to which Mouse-Avoidance mode `banish' moves the mouse.
"The position to which Mouse Avoidance mode `banish' moves the mouse.
You can redefine this if you want the mouse banished to a different corner."
(let* ((pos (window-edges)))
(cons (- (nth 2 pos) 2)
@ -278,6 +277,7 @@ redefine this function to suit your own tastes."
(defun mouse-avoidance-ignore-p ()
(let ((mp (mouse-position)))
(or (not (frame-pointer-visible-p)) ; The pointer is hidden
(not cursor-type) ; There's no cursor
executing-kbd-macro ; don't check inside macro
(null (cadr mp)) ; don't move unless in an Emacs frame
(not (eq (car mp) (selected-frame)))
@ -332,7 +332,7 @@ redefine this function to suit your own tastes."
;;;###autoload
(defun mouse-avoidance-mode (&optional mode)
"Set cursor avoidance mode to MODE.
"Set Mouse Avoidance mode to MODE.
MODE should be one of the symbols `banish', `exile', `jump', `animate',
`cat-and-mouse', `proteus', or `none'.
@ -352,7 +352,7 @@ Effects of the different modes:
Whenever the mouse is moved, the frame is also raised.
\(see `mouse-avoidance-threshold' for definition of \"too close\",
\(See `mouse-avoidance-threshold' for definition of \"too close\",
and `mouse-avoidance-nudge-dist' and `mouse-avoidance-nudge-var' for
definition of \"random distance\".)"
(interactive

View file

@ -72,6 +72,8 @@ Summary of changes to "Calc"
Emacs 24.1
* Support for musical notes added.
* Support for logarithmic units added.
* Calc no longer uses the tex prefix for TeX specific unit

View file

@ -422,13 +422,13 @@
(define-key calc-mode-map "kT" 'calc-utpt)
(define-key calc-mode-map "l" nil)
(define-key calc-mode-map "lq" 'calc-logunits-quantity)
(define-key calc-mode-map "ld" 'calc-dblevel)
(define-key calc-mode-map "ln" 'calc-nplevel)
(define-key calc-mode-map "l+" 'calc-logunits-add)
(define-key calc-mode-map "l-" 'calc-logunits-sub)
(define-key calc-mode-map "l*" 'calc-logunits-mul)
(define-key calc-mode-map "l/" 'calc-logunits-divide)
(define-key calc-mode-map "lq" 'calc-lu-quant)
(define-key calc-mode-map "ld" 'calc-db)
(define-key calc-mode-map "ln" 'calc-np)
(define-key calc-mode-map "l+" 'calc-lu-plus)
(define-key calc-mode-map "l-" 'calc-lu-minus)
(define-key calc-mode-map "l*" 'calc-lu-times)
(define-key calc-mode-map "l/" 'calc-lu-divide)
(define-key calc-mode-map "ls" 'calc-spn)
(define-key calc-mode-map "lm" 'calc-midi)
(define-key calc-mode-map "lf" 'calc-freq)
@ -943,12 +943,11 @@ calc-store-value calc-var-name)
("calc-stuff" calc-explain-why calcFunc-clean
calcFunc-pclean calcFunc-pfloat calcFunc-pfrac)
("calc-units" calcFunc-usimplify calcFunc-lufieldadd
calcFunc-lupoweradd calcFunc-lufieldsub calcFunc-lupowersub
calcFunc-lufieldmul calcFunc-lupowermul calcFunc-lufielddiv
calcFunc-lupowerdiv calcFunc-fieldquant calcFunc-powerquant
calcFunc-dbfieldlevel calcFunc-dbpowerlevel calcFunc-npfieldlevel
calcFunc-nppowerlevel calcFunc-spn calcFunc-midi calcFunc-freq
("calc-units" calcFunc-usimplify calcFunc-lufadd calcFunc-lupadd
calcFunc-lufsub calcFunc-lupsub calcFunc-lufmul calcFunc-lupmul
calcFunc-lufdiv calcFunc-lupdiv calcFunc-lufquant calcFunc-lupquant
calcFunc-dbfield calcFunc-dbpower calcFunc-npfield
calcFunc-nppower calcFunc-spn calcFunc-midi calcFunc-freq
math-build-units-table math-build-units-table-buffer
math-check-unit-name math-convert-temperature math-convert-units
math-extract-units math-remove-units math-simplify-units
@ -1180,9 +1179,9 @@ calc-convert-temperature calc-convert-units calc-define-unit
calc-enter-units-table calc-explain-units calc-extract-units
calc-get-unit-definition calc-permanent-units calc-quick-units
calc-remove-units calc-simplify-units calc-undefine-unit
calc-view-units-table calc-logunits-quantity calc-dblevel
calc-nplevel calc-logunits-add calc-logunits-sub
calc-logunits-mul calc-logunits-divide calc-spn calc-midi
calc-view-units-table calc-lu-quant calc-db
calc-np calc-lu-plus calc-lu-minus
calc-lu-times calc-lu-divide calc-spn calc-midi
calc-freq)
("calc-vec" calc-arrange-vector calc-build-vector calc-cnorm

View file

@ -673,7 +673,9 @@ C-w Describe how there is no warranty for Calc."
(interactive)
(calc-do-prefix-help
'("Quantity, DB level, Np level"
"+, -, *, /")
"+, -, *, /"
"Scientific pitch notation, Midi number, Frequency"
)
"log units" ?l))
(defun calc-v-prefix-help ()

View file

@ -960,6 +960,111 @@
(require 'calc-units)
(call-interactively 'calc-view-units-table))
:keys "u V"]
(list "Logarithmic Units"
["Convert (1:) to dB (power)"
(progn
(require 'calc-units)
(call-interactively 'calc-db))
:keys "l d"
:active (>= (calc-stack-size) 1)]
["Convert (2:) to dB (power) with reference level (1:)"
(progn
(require 'calc-units)
(let ((calc-option-flag t))
(call-interactively 'calc-db)))
:keys "O l d"
:active (>= (calc-stack-size) 2)]
["Convert (1:) to Np (power)"
(progn
(require 'calc-units)
(call-interactively 'calc-np))
:keys "l n"
:active (>= (calc-stack-size) 1)]
["Convert (2:) to Np (power) with reference level (1:)"
(progn
(require 'calc-units)
(let ((calc-option-flag t))
(call-interactively 'calc-np)))
:keys "O l n"
:active (>= (calc-stack-size) 2)]
["Convert (1:) to power quantity"
(progn
(require 'calc-units)
(call-interactively 'calc-lu-quant))
:keys "l q"
:active (>= (calc-stack-size) 1)]
["Convert (2:) to power quantity with reference level (1:)"
(progn
(require 'calc-units)
(let ((calc-option-flag t))
(call-interactively 'calc-lu-quant)))
:keys "O l q"
:active (>= (calc-stack-size) 2)]
"----"
["Convert (1:) to dB (field)"
(progn
(require 'calc-units)
(let ((calc-hyperbolic-flag t))
(call-interactively 'calc-db)))
:keys "H l d"
:active (>= (calc-stack-size) 1)]
["Convert (2:) to dB (field) with reference level (1:)"
(progn
(require 'calc-units)
(let ((calc-option-flag t)
(calc-hyperbolic-flag t))
(call-interactively 'calc-db)))
:keys "O H l d"
:active (>= (calc-stack-size) 2)]
["Convert (1:) to Np (field)"
(progn
(require 'calc-units)
(let ((calc-hyperbolic-flag t))
(call-interactively 'calc-np)))
:keys "H l n"
:active (>= (calc-stack-size) 1)]
["Convert (2:) to Np (field) with reference level (1:)"
(progn
(require 'calc-units)
(let ((calc-option-flag t)
(calc-hyperbolic-flag t))
(call-interactively 'calc-np)))
:keys "O H l d"
:active (>= (calc-stack-size) 2)]
["Convert (1:) to field quantity"
(progn
(require 'calc-units)
(let ((calc-hyperbolic-flag t))
(call-interactively 'calc-lu-quant)))
:keys "H l q"
:active (>= (calc-stack-size) 1)]
["Convert (2:) to field quantity with reference level (1:)"
(progn
(require 'calc-units)
(let ((calc-option-flag t)
(calc-hyperbolic-flag))
(call-interactively 'calc-lu-quant)))
:keys "O H l q"
:active (>= (calc-stack-size) 2)])
(list "Musical Notes"
["Convert (1:) to scientific pitch notation"
(progn
(require 'calc-units)
(call-interactively 'calc-spn))
:keys "l s"
:active (>= (calc-stack-size) 1)]
["Convert (1:) to midi number"
(progn
(require 'calc-units)
(call-interactively 'calc-midi))
:keys "l m"
:active (>= (calc-stack-size) 1)]
["Convert (1:) to frequency"
(progn
(require 'calc-units)
(call-interactively 'calc-freq))
:keys "l f"
:active (>= (calc-stack-size) 1)])
"----"
["Help on Units"
(calc-info-goto-node "Units")])

View file

@ -1623,39 +1623,39 @@ In symbolic mode, return the list (^ a b)."
coef)))
units)))))))
(defun calcFunc-lufieldplus (a b)
(defun calcFunc-lufadd (a b)
(math-logunits-add a b nil nil))
(defun calcFunc-lupowerplus (a b)
(defun calcFunc-lupadd (a b)
(math-logunits-add a b nil t))
(defun calcFunc-lufieldminus (a b)
(defun calcFunc-lufsub (a b)
(math-logunits-add a b t nil))
(defun calcFunc-lupowerminus (a b)
(defun calcFunc-lupsub (a b)
(math-logunits-add a b t t))
(defun calc-logunits-add (arg)
(defun calc-lu-plus (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-inverse)
(if (calc-is-hyperbolic)
(calc-binary-op "lu-" 'calcFunc-lufieldminus arg)
(calc-binary-op "lu-" 'calcFunc-lupowerminus arg))
(calc-binary-op "lu-" 'calcFunc-lufsub arg)
(calc-binary-op "lu-" 'calcFunc-lupsub arg))
(if (calc-is-hyperbolic)
(calc-binary-op "lu+" 'calcFunc-lufieldplus arg)
(calc-binary-op "lu+" 'calcFunc-lupowerplus arg)))))
(calc-binary-op "lu+" 'calcFunc-lufadd arg)
(calc-binary-op "lu+" 'calcFunc-lupadd arg)))))
(defun calc-logunits-sub (arg)
(defun calc-lu-minus (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-inverse)
(if (calc-is-hyperbolic)
(calc-binary-op "lu+" 'calcFunc-lufieldplus arg)
(calc-binary-op "lu+" 'calcFunc-lupowerplus arg))
(calc-binary-op "lu+" 'calcFunc-lufadd arg)
(calc-binary-op "lu+" 'calcFunc-lupadd arg))
(if (calc-is-hyperbolic)
(calc-binary-op "lu-" 'calcFunc-lufieldminus arg)
(calc-binary-op "lu-" 'calcFunc-lupowerminus arg)))))
(calc-binary-op "lu-" 'calcFunc-lufsub arg)
(calc-binary-op "lu-" 'calcFunc-lupsub arg)))))
(defun math-logunits-mul (a b power)
(let (logunit coef units number)
@ -1719,39 +1719,39 @@ In symbolic mode, return the list (^ a b)."
(math-div (math-conditional-apply 'calcFunc-ln b) (if power 2 1)))
units)))))))))
(defun calcFunc-lufieldtimes (a b)
(defun calcFunc-lufmul (a b)
(math-logunits-mul a b nil))
(defun calcFunc-lupowertimes (a b)
(defun calcFunc-lupmul (a b)
(math-logunits-mul a b t))
(defun calc-logunits-mul (arg)
(defun calc-lu-times (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-inverse)
(if (calc-is-hyperbolic)
(calc-binary-op "lu/" 'calcFunc-lufielddiv arg)
(calc-binary-op "lu/" 'calcFunc-lupowerdiv arg))
(calc-binary-op "lu/" 'calcFunc-lufdiv arg)
(calc-binary-op "lu/" 'calcFunc-lupdiv arg))
(if (calc-is-hyperbolic)
(calc-binary-op "lu*" 'calcFunc-lufieldtimes arg)
(calc-binary-op "lu*" 'calcFunc-lupowertimes arg)))))
(calc-binary-op "lu*" 'calcFunc-lufmul arg)
(calc-binary-op "lu*" 'calcFunc-lupmul arg)))))
(defun calcFunc-lufielddiv (a b)
(defun calcFunc-lufdiv (a b)
(math-logunits-divide a b nil))
(defun calcFunc-lupowerdiv (a b)
(defun calcFunc-lupdiv (a b)
(math-logunits-divide a b t))
(defun calc-logunits-divide (arg)
(defun calc-lu-divide (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-inverse)
(if (calc-is-hyperbolic)
(calc-binary-op "lu*" 'calcFunc-lufieldtimes arg)
(calc-binary-op "lu*" 'calcFunc-lupowertimes arg))
(calc-binary-op "lu*" 'calcFunc-lufmul arg)
(calc-binary-op "lu*" 'calcFunc-lupmul arg))
(if (calc-is-hyperbolic)
(calc-binary-op "lu/" 'calcFunc-lufielddiv arg)
(calc-binary-op "lu/" 'calcFunc-lupowerdiv arg)))))
(calc-binary-op "lu/" 'calcFunc-lufdiv arg)
(calc-binary-op "lu/" 'calcFunc-lupdiv arg)))))
(defun math-logunits-quant (val ref power)
(let* ((units (math-simplify (math-extract-units val)))
@ -1777,29 +1777,29 @@ In symbolic mode, return the list (^ a b)."
coeff))))
runits)))))
(defvar calc-logunits-field-reference)
(defvar calc-logunits-power-reference)
(defvar calc-lu-field-reference)
(defvar calc-lu-power-reference)
(defun calcFunc-fieldquant (val &optional ref)
(defun calcFunc-lufquant (val &optional ref)
(unless ref
(setq ref (math-read-expr calc-logunits-field-reference)))
(setq ref (math-read-expr calc-lu-field-reference)))
(math-logunits-quant val ref nil))
(defun calcFunc-powerquant (val &optional ref)
(defun calcFunc-lupquant (val &optional ref)
(unless ref
(setq ref (math-read-expr calc-logunits-power-reference)))
(setq ref (math-read-expr calc-lu-power-reference)))
(math-logunits-quant val ref t))
(defun calc-logunits-quantity (arg)
(defun calc-lu-quant (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-hyperbolic)
(if (calc-is-option)
(calc-binary-op "lupq" 'calcFunc-fieldquant arg)
(calc-unary-op "lupq" 'calcFunc-fieldquant arg))
(calc-binary-op "lupq" 'calcFunc-lufquant arg)
(calc-unary-op "lupq" 'calcFunc-lufquant arg))
(if (calc-is-option)
(calc-binary-op "lufq" 'calcFunc-powerquant arg)
(calc-unary-op "lufq" 'calcFunc-powerquant arg)))))
(calc-binary-op "lufq" 'calcFunc-lupquant arg)
(calc-unary-op "lufq" 'calcFunc-lupquant arg)))))
(defun math-logunits-level (val ref db power)
"Compute the value of VAL in decibels or nepers."
@ -1817,47 +1817,47 @@ In symbolic mode, return the list (^ a b)."
'(var Np var-Np)))
units)))
(defun calcFunc-dbfieldlevel (val &optional ref)
(defun calcFunc-dbfield (val &optional ref)
(unless ref
(setq ref (math-read-expr calc-logunits-field-reference)))
(setq ref (math-read-expr calc-lu-field-reference)))
(math-logunits-level val ref t nil))
(defun calcFunc-dbpowerlevel (val &optional ref)
(defun calcFunc-dbpower (val &optional ref)
(unless ref
(setq ref (math-read-expr calc-logunits-power-reference)))
(setq ref (math-read-expr calc-lu-power-reference)))
(math-logunits-level val ref t t))
(defun calcFunc-npfieldlevel (val &optional ref)
(defun calcFunc-npfield (val &optional ref)
(unless ref
(setq ref (math-read-expr calc-logunits-field-reference)))
(setq ref (math-read-expr calc-lu-field-reference)))
(math-logunits-level val ref nil nil))
(defun calcFunc-nppowerlevel (val &optional ref)
(defun calcFunc-nppower (val &optional ref)
(unless ref
(setq ref (math-read-expr calc-logunits-power-reference)))
(setq ref (math-read-expr calc-lu-power-reference)))
(math-logunits-level val ref nil t))
(defun calc-dblevel (arg)
(defun calc-db (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-hyperbolic)
(if (calc-is-option)
(calc-binary-op "ludb" 'calcFunc-dbfieldlevel arg)
(calc-unary-op "ludb" 'calcFunc-dbfieldlevel arg))
(calc-binary-op "ludb" 'calcFunc-dbfield arg)
(calc-unary-op "ludb" 'calcFunc-dbfield arg))
(if (calc-is-option)
(calc-binary-op "ludb" 'calcFunc-dbpowerlevel arg)
(calc-unary-op "ludb" 'calcFunc-dbpowerlevel arg)))))
(calc-binary-op "ludb" 'calcFunc-dbpower arg)
(calc-unary-op "ludb" 'calcFunc-dbpower arg)))))
(defun calc-nplevel (arg)
(defun calc-np (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-hyperbolic)
(if (calc-is-option)
(calc-binary-op "lunp" 'calcFunc-npfieldlevel arg)
(calc-unary-op "lunp" 'calcFunc-npfieldlevel arg))
(calc-binary-op "lunp" 'calcFunc-npfield arg)
(calc-unary-op "lunp" 'calcFunc-npfield arg))
(if (calc-is-option)
(calc-binary-op "lunp" 'calcFunc-nppowerlevel arg)
(calc-unary-op "lunp" 'calcFunc-nppowerlevel arg)))))
(calc-binary-op "lunp" 'calcFunc-nppower arg)
(calc-unary-op "lunp" 'calcFunc-nppower arg)))))
;;; Musical notes

View file

@ -434,13 +434,13 @@ by displaying the sub-formula in `calc-selected-face'."
:group 'calc
:type 'boolean)
(defcustom calc-logunits-field-reference
(defcustom calc-lu-field-reference
"20 uPa"
"The default reference level for logarithmic units (field)."
:group 'calc
:type '(string))
(defcustom calc-logunits-power-reference
(defcustom calc-lu-power-reference
"mW"
"The default reference level for logarithmic units (power)."
:group 'calc
@ -1084,7 +1084,7 @@ Used by `calc-user-invocation'.")
"lOW")
(mapc (lambda (x) (define-key map (char-to-string x) 'calc-missing-key))
(concat "ABCDEFGHIJKLMNOPQRSTUVXZabcdfghjkmoprstuvwxyz"
":\\|!()[]<>{},;=~`\C-k\C-w\C-_"))
":\\|!()[]<>{},;=~`\C-k\C-w"))
(define-key map "\M-w" 'calc-missing-key)
(define-key map "\M-k" 'calc-missing-key)
(define-key map "\M-\C-w" 'calc-missing-key)

View file

@ -879,21 +879,27 @@ use when highlighting the day in the calendar."
(declare-function diary-ordinal-suffix "diary-lib" (n))
;;;###diary-autoload
(defun diary-hebrew-yahrzeit (death-month death-day death-year &optional mark)
(defun diary-hebrew-yahrzeit (death-month death-day death-year
&optional mark after-sunset)
"Yahrzeit diary entry--entry applies if date is Yahrzeit or the day before.
Parameters are DEATH-MONTH, DEATH-DAY, DEATH-YEAR; the diary
entry is assumed to be the name of the person. Although the date
of death is specified by the civil calendar, the proper Hebrew
calendar Yahrzeit is determined.
If the death occurred after local sunset on the given civil date,
the following civil date corresponds to the Hebrew date of
death--set the optional parameter AFTER-SUNSET non-nil in this case.
The order of the input parameters changes according to `calendar-date-style'
\(e.g. to DEATH-DAY, DEATH-MONTH, DEATH-YEAR in the European style).
An optional parameter MARK specifies a face or single-character string to
use when highlighting the day in the calendar."
(let* ((h-date (calendar-hebrew-from-absolute
(calendar-absolute-from-gregorian
(diary-make-date death-month death-day death-year))))
(+ (calendar-absolute-from-gregorian
(diary-make-date death-month death-day death-year))
(if after-sunset 1 0))))
(h-month (calendar-extract-month h-date))
(h-day (calendar-extract-day h-date))
(h-year (calendar-extract-year h-date))

View file

@ -308,13 +308,9 @@ This function does not work for SECONDS greater than `most-positive-fixnum'."
(setq start (match-end 0)
spec (match-string 1 string))
(unless (string-equal spec "%")
;; `assoc-string' is not available in XEmacs. So when compiling
;; Gnus (`time-date.el' is part of Gnus) with XEmacs, we get
;; a warning here. But `format-seconds' is not used anywhere in
;; Gnus so it's not a real problem. --rsteib
(or (setq match (assoc-string spec units t))
(or (setq match (assoc (downcase spec) units))
(error "Bad format specifier: `%s'" spec))
(if (assoc-string spec usedunits t)
(if (assoc (downcase spec) usedunits)
(error "Multiple instances of specifier: `%s'" spec))
(if (string-equal (car match) "z")
(setq zeroflag t)

View file

@ -4756,6 +4756,12 @@ The format is suitable for use with `easy-menu-define'."
"Invoke button at POS, or refuse to allow editing of Custom buffer."
(interactive "@d")
(let ((button (get-char-property pos 'button)))
;; If there is no button at point, then use the one at the start
;; of the line, if it is a custom-group-link (bug#2298).
(or button
(if (setq button (get-char-property (line-beginning-position) 'button))
(or (eq (widget-type button) 'custom-group-link)
(setq button nil))))
(if button
(widget-apply-action button event)
(error "You can't edit this part of the Custom buffer"))))

View file

@ -111,9 +111,9 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(cursor-in-non-selected-windows
cursor boolean nil
:tag "Cursor In Non-selected Windows"
:set #'(lambda (symbol value)
(set-default symbol value)
(force-mode-line-update t)))
:set (lambda (symbol value)
(set-default symbol value)
(force-mode-line-update t)))
(transient-mark-mode editing-basics boolean nil
:standard (not noninteractive)
:initialize custom-initialize-delay

View file

@ -100,6 +100,9 @@ named *Custom Theme*."
(make-local-variable 'custom-theme-insert-face-marker)
(make-local-variable 'custom-theme-insert-variable-marker)
(make-local-variable 'custom-theme--listed-faces)
(when (called-interactively-p 'interactive)
(unless (y-or-n-p "Include basic face customizations in this theme? ")
(setq custom-theme--listed-faces nil)))
(if (eq theme 'user)
(widget-insert "This buffer contains all the Custom settings you have made.
@ -188,7 +191,7 @@ remove them from your saved Custom file.\n\n"))
(while vars
(if (eq (car vars) 'custom-enabled-themes)
(progn (pop vars) (pop values))
(custom-theme-add-var-1 (pop vars) (pop values)))))
(custom-theme-add-var-1 (pop vars) (eval (pop values))))))
(setq custom-theme-insert-variable-marker (point-marker))
(widget-insert " ")
(widget-create 'push-button
@ -297,8 +300,9 @@ SPEC, if non-nil, should be a face spec to which to set the widget."
;;; Reading and writing
;;;###autoload
(defun custom-theme-visit-theme (theme)
"Load the custom theme THEME's settings into the current buffer."
"Set up a Custom buffer to edit custom theme THEME."
(interactive
(list
(intern (completing-read "Find custom theme: "
@ -663,4 +667,6 @@ Theme files are named *-theme.el in `"))
(widget-toggle-action widget event)
(setq custom-theme-allow-multiple-selections (widget-value widget)))
(provide 'cus-theme)
;;; cus-theme.el ends here

View file

@ -792,10 +792,10 @@ E.g. dumped variables whose default depends on run-time information."
(defvar custom-known-themes '(user changed)
"Themes that have been defined with `deftheme'.
The default value is the list (user changed). The theme `changed'
contains the settings before custom themes are applied. The
theme `user' contains all the settings the user customized and saved.
Additional themes declared with the `deftheme' macro will be added to
the front of this list.")
contains the settings before custom themes are applied. The theme
`user' contains all the settings the user customized and saved.
Additional themes declared with the `deftheme' macro will be added
to the front of this list.")
(defsubst custom-theme-p (theme)
"Non-nil when THEME has been defined."
@ -1074,7 +1074,7 @@ order. Each element in the list should be one of the following:
named \"themes\" in `data-directory').
- a directory name (a string).
Each theme file is named NAME-theme.el, where THEME is the theme
Each theme file is named THEME-theme.el, where THEME is the theme
name."
:type '(repeat (choice (const :tag "custom-theme-directory"
custom-theme-directory)
@ -1146,7 +1146,7 @@ Return t if THEME was successfully loaded, nil otherwise."
'("" "c")))
hash)
(unless fn
(error "Unable to find theme file for `%s'." theme))
(error "Unable to find theme file for `%s'" theme))
(with-temp-buffer
(insert-file-contents fn)
(setq hash (sha1 (current-buffer)))
@ -1212,7 +1212,7 @@ NAME should be a symbol."
(defun custom-available-themes ()
"Return a list of available Custom themes (symbols)."
(let* (sym themes)
(let (sym themes)
(dolist (dir (custom-theme--load-path))
(when (file-directory-p dir)
(dolist (file (file-expand-wildcards
@ -1222,7 +1222,7 @@ NAME should be a symbol."
(setq sym (intern (match-string 1 file)))
(custom-theme-name-valid-p sym)
(push sym themes)))))
(delete-dups themes)))
(nreverse (delete-dups themes))))
(defun custom-theme--load-path ()
(let (lpath)
@ -1338,7 +1338,7 @@ That is to say, it specifies what the value should be according to
currently enabled custom themes.
This function returns nil if no custom theme specifies a value for VARIABLE."
(let* ((theme-value (get variable 'theme-value)))
(let ((theme-value (get variable 'theme-value)))
(if theme-value
(cdr (car theme-value)))))

View file

@ -1638,11 +1638,14 @@ Optional arg HOW-TO determiness how to treat the target.
;;;###autoload
(defun dired-create-directory (directory)
"Create a directory called DIRECTORY."
"Create a directory called DIRECTORY.
If DIRECTORY already exists, signal an error."
(interactive
(list (read-file-name "Create directory: " (dired-current-directory))))
(let* ((expanded (directory-file-name (expand-file-name directory)))
(try expanded) new)
(if (file-exists-p expanded)
(error "Cannot create directory %s: file exists" expanded))
;; Find the topmost nonexistent parent dir (variable `new')
(while (and try (not (file-exists-p try)) (not (equal new try)))
(setq new try

View file

@ -3629,7 +3629,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
;;;;;; dired-diff) "dired-aux" "dired-aux.el" "154cdfbf451aedec60c5012b625ff329")
;;;;;; dired-diff) "dired-aux" "dired-aux.el" "2d805d6766bd7970cd446413b4ed4ce0")
;;; Generated autoloads from dired-aux.el
(autoload 'dired-diff "dired-aux" "\
@ -3860,6 +3860,7 @@ Not documented
(autoload 'dired-create-directory "dired-aux" "\
Create a directory called DIRECTORY.
If DIRECTORY already exists, signal an error.
\(fn DIRECTORY)" t nil)

View file

@ -34,7 +34,56 @@
;; this depends on the format of list-buffers (from src/buffer.c) and
;; on stuff in lisp/buff-menu.el
(defvar electric-buffer-menu-mode-map nil)
(defvar electric-buffer-menu-mode-map
(let ((map (make-keymap)))
(fillarray (car (cdr map)) 'Electric-buffer-menu-undefined)
(define-key map "\e" nil)
(define-key map "\C-z" 'suspend-frame)
(define-key map "v" 'Electric-buffer-menu-mode-view-buffer)
(define-key map (char-to-string help-char) 'Helper-help)
(define-key map "?" 'Helper-describe-bindings)
(define-key map "\C-c" nil)
(define-key map "\C-c\C-c" 'Electric-buffer-menu-quit)
(define-key map "\C-]" 'Electric-buffer-menu-quit)
(define-key map "q" 'Electric-buffer-menu-quit)
(define-key map " " 'Electric-buffer-menu-select)
(define-key map "\C-m" 'Electric-buffer-menu-select)
(define-key map "\C-l" 'recenter)
(define-key map "s" 'Buffer-menu-save)
(define-key map "d" 'Buffer-menu-delete)
(define-key map "k" 'Buffer-menu-delete)
(define-key map "\C-d" 'Buffer-menu-delete-backwards)
;; (define-key map "\C-k" 'Buffer-menu-delete)
(define-key map "\177" 'Buffer-menu-backup-unmark)
(define-key map "~" 'Buffer-menu-not-modified)
(define-key map "u" 'Buffer-menu-unmark)
(let ((i ?0))
(while (<= i ?9)
(define-key map (char-to-string i) 'digit-argument)
(define-key map (concat "\e" (char-to-string i)) 'digit-argument)
(setq i (1+ i))))
(define-key map "-" 'negative-argument)
(define-key map "\e-" 'negative-argument)
(define-key map "m" 'Buffer-menu-mark)
(define-key map "\C-u" 'universal-argument)
(define-key map "\C-p" 'previous-line)
(define-key map "\C-n" 'next-line)
(define-key map "p" 'previous-line)
(define-key map "n" 'next-line)
(define-key map "\C-v" 'scroll-up)
(define-key map "\ev" 'scroll-down)
(define-key map ">" 'scroll-right)
(define-key map "<" 'scroll-left)
(define-key map "\e\C-v" 'scroll-other-window)
(define-key map "\e>" 'end-of-buffer)
(define-key map "\e<" 'beginning-of-buffer)
(define-key map "\e\e" nil)
(define-key map "\e\e\e" 'Electric-buffer-menu-quit)
;; This binding prevents the "escape => ESC" function-key-map mapping from
;; kicking in!
;; (define-key map [escape escape escape] 'Electric-buffer-menu-quit)
(define-key map [mouse-2] 'Electric-buffer-menu-mouse-select)
map))
(defvar electric-buffer-menu-mode-hook nil
"Normal hook run by `electric-buffer-list'.")
@ -167,55 +216,7 @@ Entry to this mode via command `electric-buffer-list' calls the value of
;; generally the same as Buffer-menu-mode-map
;; (except we don't indirect to global-map)
(put 'Electric-buffer-menu-undefined 'suppress-keymap t)
(if electric-buffer-menu-mode-map
nil
(let ((map (make-keymap)))
(fillarray (car (cdr map)) 'Electric-buffer-menu-undefined)
(define-key map "\e" nil)
(define-key map "\C-z" 'suspend-frame)
(define-key map "v" 'Electric-buffer-menu-mode-view-buffer)
(define-key map (char-to-string help-char) 'Helper-help)
(define-key map "?" 'Helper-describe-bindings)
(define-key map "\C-c" nil)
(define-key map "\C-c\C-c" 'Electric-buffer-menu-quit)
(define-key map "\C-]" 'Electric-buffer-menu-quit)
(define-key map "q" 'Electric-buffer-menu-quit)
(define-key map " " 'Electric-buffer-menu-select)
(define-key map "\C-m" 'Electric-buffer-menu-select)
(define-key map "\C-l" 'recenter)
(define-key map "s" 'Buffer-menu-save)
(define-key map "d" 'Buffer-menu-delete)
(define-key map "k" 'Buffer-menu-delete)
(define-key map "\C-d" 'Buffer-menu-delete-backwards)
;(define-key map "\C-k" 'Buffer-menu-delete)
(define-key map "\177" 'Buffer-menu-backup-unmark)
(define-key map "~" 'Buffer-menu-not-modified)
(define-key map "u" 'Buffer-menu-unmark)
(let ((i ?0))
(while (<= i ?9)
(define-key map (char-to-string i) 'digit-argument)
(define-key map (concat "\e" (char-to-string i)) 'digit-argument)
(setq i (1+ i))))
(define-key map "-" 'negative-argument)
(define-key map "\e-" 'negative-argument)
(define-key map "m" 'Buffer-menu-mark)
(define-key map "\C-u" 'universal-argument)
(define-key map "\C-p" 'previous-line)
(define-key map "\C-n" 'next-line)
(define-key map "p" 'previous-line)
(define-key map "n" 'next-line)
(define-key map "\C-v" 'scroll-up)
(define-key map "\ev" 'scroll-down)
(define-key map ">" 'scroll-right)
(define-key map "<" 'scroll-left)
(define-key map "\e\C-v" 'scroll-other-window)
(define-key map "\e>" 'end-of-buffer)
(define-key map "\e<" 'beginning-of-buffer)
(define-key map "\e\e" nil)
(define-key map "\e\e\e" 'Electric-buffer-menu-quit)
(define-key map [escape escape escape] 'Electric-buffer-menu-quit)
(define-key map [mouse-2] 'Electric-buffer-menu-mouse-select)
(setq electric-buffer-menu-mode-map map)))
(defun Electric-buffer-menu-exit ()
(interactive)

View file

@ -4071,7 +4071,8 @@ binding slots have been popped."
(defun byte-compile-save-excursion (form)
(if (and (eq 'set-buffer (car-safe (car-safe (cdr form))))
(byte-compile-warning-enabled-p 'suspicious))
(byte-compile-warn "`save-excursion' defeated by `set-buffer'"))
(byte-compile-warn
"Use `with-current-buffer' rather than save-excursion+set-buffer"))
(byte-compile-out 'byte-save-excursion 0)
(byte-compile-body-do-effect (cdr form))
(byte-compile-out 'byte-unbind 1))
@ -4120,6 +4121,17 @@ binding slots have been popped."
,@decls
',(nth 1 form)))))
;; If foo.el declares `toto' as obsolete, it is likely that foo.el will
;; actually use `toto' in order for this obsolete variable to still work
;; correctly, so paradoxically, while byte-compiling foo.el, the presence
;; of a make-obsolete-variable call for `toto' is an indication that `toto'
;; should not trigger obsolete-warnings in foo.el.
(byte-defop-compiler-1 make-obsolete-variable)
(defun byte-compile-make-obsolete-variable (form)
(when (eq 'quote (car-safe (nth 1 form)))
(push (nth 1 (nth 1 form)) byte-compile-not-obsolete-vars))
(byte-compile-normal-call form))
(defun byte-compile-defvar (form)
;; This is not used for file-level defvar/consts with doc strings.
(when (and (symbolp (nth 1 form))

View file

@ -282,7 +282,7 @@ Not documented
;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist
;;;;;; do* do loop return-from return block etypecase typecase ecase
;;;;;; case load-time-value eval-when destructuring-bind function*
;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "80cb83265399ce021c8c0c7d1a8562f2")
;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "c4734fbda33043d967624d39d80c3304")
;;; Generated autoloads from cl-macs.el
(autoload 'gensym "cl-macs" "\
@ -500,16 +500,16 @@ Like `let', but lexically scoped.
The main visible difference is that lambdas inside BODY will create
lexical closures as in Common Lisp.
\(fn VARLIST BODY)" nil (quote macro))
\(fn BINDINGS BODY)" nil (quote macro))
(autoload 'lexical-let* "cl-macs" "\
Like `let*', but lexically scoped.
The main visible difference is that lambdas inside BODY, and in
successive bindings within VARLIST, will create lexical closures
successive bindings within BINDINGS, will create lexical closures
as in Common Lisp. This is similar to the behavior of `let*' in
Common Lisp.
\(fn VARLIST BODY)" nil (quote macro))
\(fn BINDINGS BODY)" nil (quote macro))
(autoload 'multiple-value-bind "cl-macs" "\
Collect multiple return values.

View file

@ -1482,9 +1482,8 @@ Returns the stats object."
(let ((print-escape-newlines t)
(print-level 5)
(print-length 10))
(let ((begin (point)))
(ert--pp-with-indentation-and-newline
(ert-test-result-with-condition-condition result))))
(ert--pp-with-indentation-and-newline
(ert-test-result-with-condition-condition result)))
(goto-char (1- (point-max)))
(assert (looking-at "\n"))
(delete-char 1)
@ -1603,7 +1602,7 @@ Nothing more than an interactive interface to `ert-make-test-unbound'."
(defun ert-delete-all-tests ()
"Make all symbols in `obarray' name no test."
(interactive)
(when (interactive-p)
(when (called-interactively-p 'any)
(unless (y-or-n-p "Delete all tests? ")
(error "Aborted")))
;; We can't use `ert-select-tests' here since that gives us only
@ -1793,7 +1792,7 @@ EWOC and STATS are arguments for `ert--results-update-stats-display'."
BEGIN and END specify a region in the current buffer."
(save-excursion
(save-restriction
(narrow-to-region begin (point))
(narrow-to-region begin end)
;; Inhibit optimization in `debugger-make-xrefs' that would
;; sometimes insert unrelated backtrace info into our buffer.
(let ((debugger-previous-backtrace nil))

View file

@ -27,21 +27,41 @@
;;; Commentary:
;; This file currently contains parts of the package system most
;; people won't need, such as package uploading.
;; This file currently contains parts of the package system that many
;; won't need, such as package uploading.
;; To upload to an archive, first set `package-archive-upload-base' to
;; some desired directory. For testing purposes, you can specify any
;; directory you want, but if you want the archive to be accessible to
;; others via http, this is typically a directory in the /var/www tree
;; (possibly one on a remote machine, accessed via Tramp).
;; Then call M-x package-upload-file, which prompts for a file to
;; upload. Alternatively, M-x package-upload-buffer uploads the
;; current buffer, if it's visiting a package file.
;; Once a package is uploaded, users can access it via the Package
;; Menu, by adding the archive to `package-archives'.
;;; Code:
(require 'package)
(defvar gnus-article-buffer)
;; Note that this only works if you have the password, which you
;; probably don't :-).
(defvar package-archive-upload-base nil
"Base location for uploading to package archive.")
(defcustom package-archive-upload-base "/path/to/archive"
"The base location of the archive to which packages are uploaded.
This should be an absolute directory name. If the archive is on
another machine, you may specify a remote name in the usual way,
e.g. \"/ssh:foo@example.com:/var/www/packages/\".
See Info node `(emacs)Remote Files'.
Unlike `package-archives', you can't specify a HTTP URL."
:type 'directory
:group 'package
:version "24.1")
(defvar package-update-news-on-upload nil
"Whether package upload should also update NEWS and RSS feeds.")
"Whether uploading a package should also update NEWS and RSS feeds.")
(defun package--encode (string)
"Encode a string by replacing some characters with XML entities."
@ -75,13 +95,18 @@
title " - " (package--encode text)
" </li>\n"))
(defun package--update-file (file location text)
(defun package--update-file (file tag text)
"Update the package archive file named FILE.
FILE should be relative to `package-archive-upload-base'.
TAG is a string that can be found within the file; TEXT is
inserted after its first occurrence in the file."
(setq file (expand-file-name file package-archive-upload-base))
(save-excursion
(let ((old-buffer (find-buffer-visiting file)))
(with-current-buffer (let ((find-file-visit-truename t))
(or old-buffer (find-file-noselect file)))
(goto-char (point-min))
(search-forward location)
(search-forward tag)
(forward-line)
(insert text)
(let ((file-precious-flag t))
@ -105,30 +130,31 @@ Return the file contents, as a string, or nil if unsuccessful."
(buffer-substring-no-properties (point-min) (point-max)))
(kill-buffer buffer))))))
(defun package--archive-contents-from-file (file)
"Parse the given archive-contents file."
(if (not (file-exists-p file))
;; no existing archive-contents, possibly a new ELPA repo.
(list package-archive-version)
(let ((dont-kill (find-buffer-visiting file)))
(with-current-buffer (let ((find-file-visit-truename t))
(find-file-noselect file))
(prog1
(package-read-from-string
(buffer-substring-no-properties (point-min) (point-max)))
(unless dont-kill
(kill-buffer (current-buffer))))))))
(defun package--archive-contents-from-file ()
"Parse the archive-contents at `package-archive-upload-base'"
(let ((file (expand-file-name "archive-contents"
package-archive-upload-base)))
(if (not (file-exists-p file))
;; No existing archive-contents means a new archive.
(list package-archive-version)
(let ((dont-kill (find-buffer-visiting file)))
(with-current-buffer (let ((find-file-visit-truename t))
(find-file-noselect file))
(prog1
(package-read-from-string
(buffer-substring-no-properties (point-min) (point-max)))
(unless dont-kill
(kill-buffer (current-buffer)))))))))
(defun package-maint-add-news-item (title description archive-url)
"Add a news item to the ELPA web pages.
"Add a news item to the webpages associated with the package archive.
TITLE is the title of the news item.
DESCRIPTION is the text of the news item.
You need administrative access to ELPA to use this."
DESCRIPTION is the text of the news item."
(interactive "sTitle: \nsText: ")
(package--update-file (concat package-archive-upload-base "elpa.rss")
(package--update-file "elpa.rss"
"<description>"
(package--make-rss-entry title description archive-url))
(package--update-file (concat package-archive-upload-base "news.html")
(package--update-file "news.html"
"New entries go here"
(package--make-html-entry title description)))
@ -144,8 +170,8 @@ PKG-INFO is the package info, see `package-buffer-info'.
EXTENSION is the file extension, a string. It can be either
\"el\" or \"tar\".
The variable `package-archive-upload-base' specifies the upload
destination. If this is nil, signal an error.
The upload destination is given by `package-archive-upload-base'.
If its value is invalid, prompt for a directory.
Optional arg ARCHIVE-URL is the URL of the destination archive.
If it is non-nil, compute the new \"archive-contents\" file
@ -156,85 +182,97 @@ addition, if `package-update-news-on-upload' is non-nil, call
If ARCHIVE-URL is nil, compute the new \"archive-contents\" file
from the \"archive-contents\" at `package-archive-upload-base',
if it exists."
(unless package-archive-upload-base
(error "No destination specified in `package-archive-upload-base'"))
(save-excursion
(save-restriction
(let* ((file-type (cond
((equal extension "el") 'single)
((equal extension "tar") 'tar)
(t (error "Unknown extension `%s'" extension))))
(file-name (aref pkg-info 0))
(pkg-name (intern file-name))
(requires (aref pkg-info 1))
(desc (if (string= (aref pkg-info 2) "")
(read-string "Description of package: ")
(aref pkg-info 2)))
(pkg-version (aref pkg-info 3))
(commentary (aref pkg-info 4))
(split-version (version-to-list pkg-version))
(pkg-buffer (current-buffer)))
(let ((package-archive-upload-base package-archive-upload-base))
;; Check if `package-archive-upload-base' is valid.
(when (or (not (stringp package-archive-upload-base))
(equal package-archive-upload-base
(car-safe
(get 'package-archive-upload-base 'standard-value))))
(setq package-archive-upload-base
(read-directory-name
"Base directory for package archive: ")))
(unless (file-directory-p package-archive-upload-base)
(if (y-or-n-p (format "%s does not exist; create it? "
package-archive-upload-base))
(make-directory package-archive-upload-base t)
(error "Aborted")))
(save-excursion
(save-restriction
(let* ((file-type (cond
((equal extension "el") 'single)
((equal extension "tar") 'tar)
(t (error "Unknown extension `%s'" extension))))
(file-name (aref pkg-info 0))
(pkg-name (intern file-name))
(requires (aref pkg-info 1))
(desc (if (string= (aref pkg-info 2) "")
(read-string "Description of package: ")
(aref pkg-info 2)))
(pkg-version (aref pkg-info 3))
(commentary (aref pkg-info 4))
(split-version (version-to-list pkg-version))
(pkg-buffer (current-buffer)))
;; Get archive-contents from ARCHIVE-URL if it's non-nil, or
;; from `package-archive-upload-base' otherwise.
(let ((contents (or (package--archive-contents-from-url archive-url)
(package--archive-contents-from-file
(concat package-archive-upload-base
"archive-contents"))))
(new-desc (vector split-version requires desc file-type)))
(if (> (car contents) package-archive-version)
(error "Unrecognized archive version %d" (car contents)))
(let ((elt (assq pkg-name (cdr contents))))
(if elt
(if (version-list-<= split-version
(package-desc-vers (cdr elt)))
(error "New package has smaller version: %s" pkg-version)
(setcdr elt new-desc))
(setq contents (cons (car contents)
(cons (cons pkg-name new-desc)
(cdr contents))))))
;; Get archive-contents from ARCHIVE-URL if it's non-nil, or
;; from `package-archive-upload-base' otherwise.
(let ((contents (or (package--archive-contents-from-url archive-url)
(package--archive-contents-from-file)))
(new-desc (vector split-version requires desc file-type)))
(if (> (car contents) package-archive-version)
(error "Unrecognized archive version %d" (car contents)))
(let ((elt (assq pkg-name (cdr contents))))
(if elt
(if (version-list-<= split-version
(package-desc-vers (cdr elt)))
(error "New package has smaller version: %s" pkg-version)
(setcdr elt new-desc))
(setq contents (cons (car contents)
(cons (cons pkg-name new-desc)
(cdr contents))))))
;; Now CONTENTS is the updated archive contents. Upload
;; this and the package itself. For now we assume ELPA is
;; writable via file primitives.
(let ((print-level nil)
(print-length nil))
(write-region (concat (pp-to-string contents) "\n")
nil
(concat package-archive-upload-base
"archive-contents")))
;; Now CONTENTS is the updated archive contents. Upload
;; this and the package itself. For now we assume ELPA is
;; writable via file primitives.
(let ((print-level nil)
(print-length nil))
(write-region (concat (pp-to-string contents) "\n")
nil
(expand-file-name "archive-contents"
package-archive-upload-base)))
;; If there is a commentary section, write it.
(when commentary
(write-region commentary nil
(concat package-archive-upload-base
(symbol-name pkg-name) "-readme.txt")))
;; If there is a commentary section, write it.
(when commentary
(write-region commentary nil
(expand-file-name
(concat (symbol-name pkg-name) "-readme.txt")
package-archive-upload-base)))
(set-buffer pkg-buffer)
(write-region (point-min) (point-max)
(concat package-archive-upload-base
file-name "-" pkg-version
"." extension)
nil nil nil 'excl)
(set-buffer pkg-buffer)
(write-region (point-min) (point-max)
(expand-file-name
(concat file-name "-" pkg-version "." extension)
package-archive-upload-base)
nil nil nil 'excl)
;; Write a news entry.
(and package-update-news-on-upload
archive-url
(package--update-news (concat file-name "." extension)
pkg-version desc archive-url))
;; Write a news entry.
(and package-update-news-on-upload
archive-url
(package--update-news (concat file-name "." extension)
pkg-version desc archive-url))
;; special-case "package": write a second copy so that the
;; installer can easily find the latest version.
(if (string= file-name "package")
(write-region (point-min) (point-max)
(concat package-archive-upload-base
file-name "." extension)
nil nil nil 'ask)))))))
;; special-case "package": write a second copy so that the
;; installer can easily find the latest version.
(if (string= file-name "package")
(write-region (point-min) (point-max)
(expand-file-name
(concat file-name "." extension)
package-archive-upload-base)
nil nil nil 'ask))))))))
(defun package-upload-buffer ()
"Upload the current buffer as a single-file Emacs Lisp package.
The variable `package-archive-upload-base' specifies the upload
destination."
If `package-archive-upload-base' does not specify a valid upload
destination, prompt for one."
(interactive)
(save-excursion
(save-restriction
@ -247,9 +285,8 @@ destination."
Interactively, prompt for FILE. The package is considered a
single-file package if FILE ends in \".el\", and a multi-file
package if FILE ends in \".tar\".
The variable `package-archive-upload-base' specifies the upload
destination."
If `package-archive-upload-base' does not specify a valid upload
destination, prompt for one."
(interactive "fPackage file name: ")
(with-temp-buffer
(insert-file-contents-literally file)
@ -269,4 +306,4 @@ This should be invoked from the gnus *Summary* buffer."
(provide 'package-x)
;;; package.el ends here
;;; package-x.el ends here

View file

@ -319,20 +319,39 @@ Like `package-alist', but maps package name to a second alist.
The inner alist is keyed by version.")
(put 'package-obsolete-alist 'risky-local-variable t)
(defconst package-subdirectory-regexp
"^\\([^.].*\\)-\\([0-9]+\\(?:[.][0-9]+\\)*\\)$"
"Regular expression matching the name of a package subdirectory.
The first subexpression is the package name.
The second subexpression is the version string.")
(defun package-version-join (l)
"Turn a list of version numbers into a version string."
(mapconcat 'int-to-string l "."))
(defun package-version-join (vlist)
"Return the version string corresponding to the list VLIST.
This is, approximately, the inverse of `version-to-list'.
\(Actually, it returns only one of the possible inverses, since
`version-to-list' is a many-to-one operation.)"
(if (null vlist)
""
(let ((str-list (list "." (int-to-string (car vlist)))))
(dolist (num (cdr vlist))
(cond
((>= num 0)
(push (int-to-string num) str-list)
(push "." str-list))
((< num -3)
(error "Invalid version list `%s'" vlist))
(t
;; pre, or beta, or alpha
(cond ((equal "." (car str-list))
(pop str-list))
((not (string-match "[0-9]+" (car str-list)))
(error "Invalid version list `%s'" vlist)))
(push (cond ((= num -1) "pre")
((= num -2) "beta")
((= num -3) "alpha"))
str-list))))
(if (equal "." (car str-list))
(pop str-list))
(apply 'concat (nreverse str-list)))))
(defun package-strip-version (dirname)
"Strip the version from a combined package name and version.
E.g., if given \"quux-23.0\", will return \"quux\""
(if (string-match package-subdirectory-regexp dirname)
(if (string-match (concat "\\`" package-subdirectory-regexp "\\'") dirname)
(match-string 1 dirname)))
(defun package-load-descriptor (dir package)
@ -357,12 +376,13 @@ In each valid package subdirectory, this function loads the
description file containing a call to `define-package', which
updates `package-alist' and `package-obsolete-alist'."
(let ((all (memq 'all package-load-list))
(regexp (concat "\\`" package-subdirectory-regexp "\\'"))
name version force)
(dolist (dir (cons package-user-dir package-directory-list))
(when (file-directory-p dir)
(dolist (subdir (directory-files dir))
(when (and (file-directory-p (expand-file-name subdir dir))
(string-match package-subdirectory-regexp subdir))
(string-match regexp subdir))
(setq name (intern (match-string 1 subdir))
version (match-string 2 subdir)
force (assq name package-load-list))
@ -554,30 +574,29 @@ EXTRA-PROPERTIES is currently unused."
(package-autoload-ensure-default-file generated-autoload-file))
(update-directory-autoloads pkg-dir)))
(defun package-untar-buffer ()
(defvar tar-parse-info)
(declare-function tar-untar-buffer "tar-mode" ())
(defun package-untar-buffer (dir)
"Untar the current buffer.
This uses `tar-untar-buffer' if it is available.
Otherwise it uses an external `tar' program.
`default-directory' should be set by the caller."
This uses `tar-untar-buffer' from Tar mode. All files should
untar into a directory named DIR; otherwise, signal an error."
(require 'tar-mode)
(if (fboundp 'tar-untar-buffer)
(progn
;; tar-mode messes with narrowing, so we just let it have the
;; whole buffer to play with.
(delete-region (point-min) (point))
(tar-mode)
(tar-untar-buffer))
;; FIXME: check the result.
(call-process-region (point) (point-max) "tar" nil '(nil nil) nil
"xf" "-")))
(tar-mode)
;; Make sure everything extracts into DIR.
(let ((regexp (concat "\\`" (regexp-quote dir) "/")))
(dolist (tar-data tar-parse-info)
(unless (string-match regexp (aref tar-data 2))
(error "Package does not untar cleanly into directory %s/" dir))))
(tar-untar-buffer))
(defun package-unpack (name version)
(let ((pkg-dir (expand-file-name (concat (symbol-name name) "-" version)
package-user-dir)))
(let* ((dirname (concat (symbol-name name) "-" version))
(pkg-dir (expand-file-name dirname package-user-dir)))
(make-directory package-user-dir t)
;; FIXME: should we delete PKG-DIR if it exists?
(let* ((default-directory (file-name-as-directory package-user-dir)))
(package-untar-buffer)
(package-untar-buffer dirname)
(package-generate-autoloads (symbol-name name) pkg-dir)
(let ((load-path (cons pkg-dir load-path)))
(byte-recompile-directory pkg-dir 0 t)))))
@ -592,7 +611,9 @@ Otherwise it uses an external `tar' program.
(if (string= file-name "package")
(package--write-file-no-coding
(expand-file-name (concat file-name ".el") package-user-dir))
(let* ((pkg-dir (expand-file-name (concat file-name "-" version)
(let* ((pkg-dir (expand-file-name (concat file-name "-"
(package-version-join
(version-to-list version)))
package-user-dir))
(el-file (expand-file-name (concat file-name ".el") pkg-dir))
(pkg-file (expand-file-name (concat file-name "-pkg.el") pkg-dir)))
@ -848,15 +869,17 @@ The package is found on one of the archives in `package-archives'."
;; Try to activate it.
(package-initialize))
(defun package-strip-rcs-id (v-str)
"Strip RCS version ID from the version string.
(defun package-strip-rcs-id (str)
"Strip RCS version ID from the version string STR.
If the result looks like a dotted numeric version, return it.
Otherwise return nil."
(if v-str
(if (string-match "^[ \t]*[$]Revision:[ \t]\([0-9.]+\)[ \t]*[$]$" v-str)
(match-string 1 v-str)
(if (string-match "^[0-9.]*$" v-str)
v-str))))
(when str
(when (string-match "\\`[ \t]*[$]Revision:[ \t]+" str)
(setq str (substring str (match-end 0))))
(condition-case nil
(if (version-to-list str)
str)
(error nil))))
(defun package-buffer-info ()
"Return a vector describing the package in the current buffer.
@ -911,43 +934,47 @@ boundaries."
"Find package information for a tar file.
FILE is the name of the tar file to examine.
The return result is a vector like `package-buffer-info'."
(unless (string-match "^\\(.+\\)-\\([0-9.]+\\)\\.tar$" file)
(error "Invalid package name `%s'" file))
(let* ((pkg-name (file-name-nondirectory (match-string-no-properties 1 file)))
(pkg-version (match-string-no-properties 2 file))
;; Extract the package descriptor.
(pkg-def-contents (shell-command-to-string
;; Requires GNU tar.
(concat "tar -xOf " file " "
pkg-name "-" pkg-version "/"
pkg-name "-pkg.el")))
(pkg-def-parsed (package-read-from-string pkg-def-contents)))
(unless (eq (car pkg-def-parsed) 'define-package)
(error "No `define-package' sexp is present in `%s-pkg.el'" pkg-name))
(let ((name-str (nth 1 pkg-def-parsed))
(version-string (nth 2 pkg-def-parsed))
(docstring (nth 3 pkg-def-parsed))
(requires (nth 4 pkg-def-parsed))
(readme (shell-command-to-string
;; Requires GNU tar.
(concat "tar -xOf " file " "
pkg-name "-" pkg-version "/README"))))
(unless (equal pkg-version version-string)
(error "Package has inconsistent versions"))
(unless (equal pkg-name name-str)
(error "Package has inconsistent names"))
;; Kind of a hack.
(if (string-match ": Not found in archive" readme)
(setq readme nil))
;; Turn string version numbers into list form.
(if (eq (car requires) 'quote)
(setq requires (car (cdr requires))))
(setq requires
(mapcar (lambda (elt)
(list (car elt)
(version-to-list (cadr elt))))
requires))
(vector pkg-name requires docstring version-string readme))))
(let ((default-directory (file-name-directory file))
(file (file-name-nondirectory file)))
(unless (string-match (concat "\\`" package-subdirectory-regexp "\\.tar\\'")
file)
(error "Invalid package name `%s'" file))
(let* ((pkg-name (match-string-no-properties 1 file))
(pkg-version (match-string-no-properties 2 file))
;; Extract the package descriptor.
(pkg-def-contents (shell-command-to-string
;; Requires GNU tar.
(concat "tar -xOf " file " "
pkg-name "-" pkg-version "/"
pkg-name "-pkg.el")))
(pkg-def-parsed (package-read-from-string pkg-def-contents)))
(unless (eq (car pkg-def-parsed) 'define-package)
(error "No `define-package' sexp is present in `%s-pkg.el'" pkg-name))
(let ((name-str (nth 1 pkg-def-parsed))
(version-string (nth 2 pkg-def-parsed))
(docstring (nth 3 pkg-def-parsed))
(requires (nth 4 pkg-def-parsed))
(readme (shell-command-to-string
;; Requires GNU tar.
(concat "tar -xOf " file " "
pkg-name "-" pkg-version "/README"))))
(unless (equal pkg-version version-string)
(error "Package has inconsistent versions"))
(unless (equal pkg-name name-str)
(error "Package has inconsistent names"))
;; Kind of a hack.
(if (string-match ": Not found in archive" readme)
(setq readme nil))
;; Turn string version numbers into list form.
(if (eq (car requires) 'quote)
(setq requires (car (cdr requires))))
(setq requires
(mapcar (lambda (elt)
(list (car elt)
(version-to-list (cadr elt))))
requires))
(vector pkg-name requires docstring version-string readme)))))
;;;###autoload
(defun package-install-from-buffer (pkg-info type)
@ -1037,7 +1064,7 @@ makes them available for download."
(unless (file-exists-p package-user-dir)
(make-directory package-user-dir t))
(dolist (archive package-archives)
(condition-case nil
(condition-case-no-debug nil
(package--download-one-archive archive "archive-contents")
(error (message "Failed to download `%s' archive."
(car archive)))))
@ -1465,7 +1492,7 @@ packages marked for deletion are removed."
delete-list
", "))))
(dolist (elt delete-list)
(condition-case err
(condition-case-no-debug err
(package-delete (car elt) (cdr elt))
(error (message (cadr err)))))
(error "Aborted")))

View file

@ -35,13 +35,51 @@ Eshell commands implemented in Lisp."
;;; User Functions:
(defmacro eshell-eval-using-options (name macro-args
options &rest body-forms)
(defmacro eshell-eval-using-options (name macro-args options &rest body-forms)
"Process NAME's MACRO-ARGS using a set of command line OPTIONS.
After doing so, settings will be stored in local symbols as declared
by OPTIONS; FORMS will then be evaluated -- assuming all was OK.
After doing so, stores settings in local symbols as declared by OPTIONS;
then evaluates BODY-FORMS -- assuming all was OK.
The syntax of OPTIONS is:
OPTIONS is a list, beginning with one or more elements of the form:
\(SHORT LONG VALUE SYMBOL HELP-STRING)
Each of these elements represents a particular command-line switch.
SHORT is either nil, or a character that can be used as a switch -SHORT.
LONG is either nil, or a string that can be used as a switch --LONG.
At least one of SHORT and LONG must be non-nil.
VALUE is the value associated with the option. It can be either:
t - the option needs a value to be specified after the switch;
nil - the option is given the value t;
anything else - specifies the actual value for the option.
SYMBOL is either nil, or the name of the Lisp symbol that will be bound
to VALUE. A nil SYMBOL calls `eshell-show-usage', and so is appropriate
for a \"--help\" type option.
HELP-STRING is a documentation string for the option.
Any remaining elements of OPTIONS are :KEYWORD arguments. Some take
arguments, some do not. The recognized :KEYWORDS are:
:external STRING
STRING is an external command to run if there are unknown switches.
:usage STRING
STRING is the initial part of the command's documentation string.
It appears before the options are listed.
:post-usage STRING
STRING is an optional trailing part of the command's documentation string.
It appears after the options, but before the final part of the
documentation about the associated external command (if there is one).
:show-usage
If present, then show the usage message if the command is called with no
arguments.
:preserve-args
If present, do not pass MACRO-ARGS through `eshell-flatten-list'
and `eshell-stringify-list'.
For example, OPTIONS might look like:
'((?C nil nil multi-column \"multi-column display\")
(nil \"help\" nil nil \"show this usage display\")
@ -52,8 +90,9 @@ The syntax of OPTIONS is:
Sort entries alphabetically across.\")
`eshell-eval-using-options' returns the value of the last form in
BODY-FORMS. If instead an external command is run, the tag
`eshell-external' will be thrown with the new process for its value.
BODY-FORMS. If instead an external command is run (because of
an unknown option), the tag `eshell-external' will be thrown with
the new process for its value.
Lastly, any remaining arguments will be available in a locally
interned variable `args' (created using a `let' form)."
@ -200,7 +239,7 @@ switch is unrecognized."
(defun eshell-process-args (name args options)
"Process the given ARGS using OPTIONS.
This assumes that symbols have been intern'd by `eshell-with-options'."
This assumes that symbols have been intern'd by `eshell-eval-using-options'."
(let ((ai 0) arg)
(while (< ai (length args))
(setq arg (nth ai args))

View file

@ -138,7 +138,8 @@ function `string-to-number'."
(memq system-type '(ms-dos windows-nt)))
(defmacro eshell-condition-case (tag form &rest handlers)
"Like `condition-case', but only if `eshell-pass-through-errors' is nil."
"If `eshell-handle-errors' is non-nil, this is `condition-case'.
Otherwise, evaluates FORM with no error handling."
(if eshell-handle-errors
`(condition-case ,tag
,form

View file

@ -567,18 +567,12 @@ You can change the color sort order by customizing `list-colors-sort'."
(with-help-window buffer-name
(with-current-buffer standard-output
(erase-buffer)
(list-colors-print list callback)
(set-buffer-modified-p nil)
(setq truncate-lines t)))
(let ((buf (get-buffer buffer-name))
(inhibit-read-only t))
;; Display buffer before generating content, to allow
;; `list-colors-print' to get the right window-width.
(with-selected-window (or (get-buffer-window buf t) (selected-window))
(with-current-buffer buf
(list-colors-print list callback)
(set-buffer-modified-p nil)))
(when callback
(pop-to-buffer buf)
(message "Click on a color to select it."))))
(when callback
(pop-to-buffer buffer-name)
(message "Click on a color to select it.")))
(defun list-colors-print (list &optional callback)
(let ((callback-fn
@ -595,30 +589,19 @@ You can change the color sort order by customizing `list-colors-sort'."
(let* ((opoint (point))
(color-values (color-values (car color)))
(light-p (>= (apply 'max color-values)
(* (car (color-values "white")) .5)))
(max-len (max (- (window-width) 33) 20)))
(* (car (color-values "white")) .5))))
(insert (car color))
(indent-to 22)
(put-text-property opoint (point) 'face `(:background ,(car color)))
(put-text-property
(prog1 (point)
(insert " ")
(if (cdr color)
;; Insert as many color names as possible, fitting max-len.
(let ((names (list (car color)))
(others (cdr color))
(len (length (car color)))
newlen)
(while (and others
(< (setq newlen (+ len 2 (length (car others))))
max-len))
(setq len newlen)
(push (pop others) names))
(insert (mapconcat 'identity (nreverse names) ", ")))
(insert (car color))))
;; Insert all color names.
(insert (mapconcat 'identity color ",")))
(point)
'face (list :foreground (car color)))
(indent-to (max (- (window-width) 8) 44))
(insert (propertize " " 'display '(space :align-to (- right 9))))
(insert " ")
(insert (propertize
(apply 'format "#%02x%02x%02x"
(mapcar (lambda (c) (lsh c -8))

View file

@ -3896,11 +3896,17 @@ See also `file-name-version-regexp'."
(let ((handler (find-file-name-handler file 'file-ownership-preserved-p)))
(if handler
(funcall handler 'file-ownership-preserved-p file)
(let ((attributes (file-attributes file)))
(let ((attributes (file-attributes file 'integer)))
;; Return t if the file doesn't exist, since it's true that no
;; information would be lost by an (attempted) delete and create.
(or (null attributes)
(= (nth 2 attributes) (user-uid)))))))
(= (nth 2 attributes) (user-uid))
;; Files created on Windows by Administrator (RID=500)
;; have the Administrators group (RID=544) recorded as
;; their owner. Rewriting them will still preserve the
;; owner.
(and (eq system-type 'windows-nt)
(= (user-uid) 500) (= (nth 2 attributes) 544)))))))
(defun file-name-sans-extension (filename)
"Return FILENAME sans final \"extension\".

View file

@ -2242,7 +2242,7 @@ in which C preprocessor directives are used. e.g. `asm-mode' and
"\\)\\)\\>"
;; Any whitespace and defined object.
"[ \t'\(]*"
"\\(setf[ \t]+\\sw+)\\|\\sw+\\)?")
"\\(setf[ \t]+\\sw+\\|\\sw+\\)?")
(1 font-lock-keyword-face)
(9 (cond ((match-beginning 3) font-lock-function-name-face)
((match-beginning 6) font-lock-variable-name-face)

View file

@ -1,3 +1,182 @@
2011-03-18 Julien Danjou <julien@danjou.info>
* gnus-util.el (gnus-buffer-live-p): Simplify gnus-buffer-live-p.
(gnus-buffer-live-p): Check that buffer is not nil.
2011-03-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-art.el: Require mouse, which the build bot seems to say is
needed.
* gravatar.el (gravatar-retrieve-synchronously): Use `url-retrieve' on
XEmacs, since it doesn't have url-retrieve-synchronously.
2011-03-17 Antoine Levitt <antoine.levitt@gmail.com>
* gnus-group.el (gnus-group-list-ticked): New function.
(gnus-group-make-menu-bar): Provide a menu entry for it.
(gnus-group-list-map): Provide a binding for it.
2011-03-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
* shr.el (shr-visit-file): New command.
* nnimap.el (nnimap-fetch-inbox): Rewrite slightly last patch.
2011-03-17 Bjørn Mork <bjorn@mork.no>
* nnimap.el (nnimap-fetch-inbox): Don't download bodies on ver4-capable
servers.
2011-03-16 Julien Danjou <julien@danjou.info>
* mm-uu.el (mm-uu-dissect-text-parts): Only dissect handle that are
inline.
* gnus-art.el (article-hide-list-identifiers): Use
gnus-group-get-list-identifiers.
* gnus-sum.el (gnus-group-get-list-identifiers): New function.
(gnus-summary-remove-list-identifiers): Use
gnus-group-get-list-identifiers to get regexp.
(gnus-select-newsgroup, gnus-summary-insert-subject)
(gnus-summary-insert-articles): Call
gnus-summary-remove-list-identifiers unconditionally.
2011-03-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-sum.el (gnus-articles-to-read): Revert back to old behaviour if
we're selecting a group with unread articles.
* nnimap.el (nnimap-open-connection-1): Allow `network-only', too.
* gssapi.el: New file separated out from imap.el to provide a general
Kerberos 5 connection facility for Emacs.
* message.el (message-elide-ellipsis): Document the format spec
ellipsis.
2011-03-15 Reiner Steib <Reiner.Steib@gmx.de>
* message.el (message-elide-region): Allow the ellipsis to say how many
lines were removed.
2011-03-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-win.el (gnus-configure-frame): Protect against trying to restore
window configurations containing buffers that are now dead.
* nnimap.el (nnimap-parse-flags): Remove all MODSEQ entries before
parsing to avoid integer overflows.
(nnimap-parse-flags): Simplify the last change.
(nnimap-parse-flags): Store HIGHESTMODSEQ as a string, since it may be
too large for 32-bit Emacsen.
2011-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
* auth-source.el (auth-source-netrc-create):
* message.el (message-yank-original): Fix use of `case'.
2011-03-15 Nelson Ferreira <nelson.ferreira@ieee.org> (tiny change)
* gnus-art.el (gnus-article-treat-body-boundary): Fix boundary width on
XEmacs, which was one character too wide.
2011-03-09 Antoine Levitt <antoine.levitt@gmail.com>
* gnus-sum.el (gnus-articles-to-read): Use gnus-large-newsgroup as
default number of articles to display.
(gnus-articles-to-read): Use pretty names for prompt.
2011-03-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-int.el (gnus-open-server): Ditto.
* gnus-start.el (gnus-activate-group): Give a backtrace if
debug-on-quit is set and the user hits `C-g'.
(gnus-read-active-file): Ditto.
* gnus-group.el (gnus-group-read-ephemeral-group): Ditto.
2011-03-15 Teodor Zlatanov <tzz@lifelogs.com>
* message.el (message-yank-original): Use cond instead of CL case.
2011-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
* auth-source.el (auth-source-netrc-create): Use usual format for the
default in prompts.
2011-03-13 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el (auth-source-netrc-create): Show the default in the
prompt when prompting for token creation.
2011-03-12 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el (auth-source-format-prompt): Always convert the value
to a string to avoid evaluating non-string arguments.
(auth-source-netrc-create): Offer default properly, not as initial
content in `read-string'.
(auth-source-netrc-saver): Use a cache keyed by file name and MD5 hash
of line to determine if we've been run before. If so, don't run again,
but print a trivial message to indicate the cache was hit instead.
2011-03-11 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-sync.el (gnus-sync-install-hooks, gnus-sync-unload-hook):
Don't install `gnus-sync-read' to any hooks by default. It's buggy.
The user will have to run `gnus-sync-read' manually and wait for Cloudy
Gnus.
2011-03-11 Julien Danjou <julien@danjou.info>
* mm-uu.el (mm-uu-type-alist): Add support for diff starting with "===
modified file".
2011-03-09 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el (auth-source-read-char-choice): New function to read a
character choice using `dropdown-list', `read-char-choice', or
`read-char'. It appends "[a/b/c] " to the prompt if the choices were
'(?a ?b ?c). The `dropdown-list' support is disabled for now. Use
`eval-when-compile' to load `dropdown-list'. Remove `dropdown-list'.
(auth-source-netrc-saver): Use it.
(auth-source-pick-first-password): New convenience function.
2011-03-08 Teodor Zlatanov <tzz@lifelogs.com>
* nnimap.el (nnimap-credentials): Keep the :save-function as the third
parameter in the credentials.
(nnimap-open-connection-1): Use it after a successful login.
(nnimap-credentials): Add IMAP-specific user and password prompt.
* auth-source.el (auth-source-search): Add :require parameter, taking a
list. Document it and the :save-function return token. Pass :require
down. Change the CREATED message from a warning to a debug statement.
(auth-source-search-backends): Pass :require down.
(auth-source-netrc-search): Pass :require down.
(auth-source-netrc-parse): Use :require, if it's given, as a filter.
Change save prompt to indicate all modifications saved here are
deletions.
(auth-source-netrc-create): Take user login name as default in user
prompt. Move all the save functionality to a lexically bound function
under the :save-function token in the returned list. Set up clearer
default prompts for user, host, port, and secret.
(auth-source-netrc-saver): New function, intended to be wrapped for
:save-function.
2011-03-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
* shr.el (shr-table-horizontal-line): Change the defaults for the table
lines to be spaces instead.
2011-03-07 Julien Danjou <julien@danjou.info>
* sieve-manage.el (sieve-sasl-auth): Create auth-info if not found.
(sieve-sasl-auth): Check that auth-source-search did return something,
or just return an empty string.
2011-03-05 Antoine Levitt <antoine.levitt@gmail.com>
* gnus.el (gnus-interactive): Use read-directory-name.
@ -12,6 +191,13 @@
2011-03-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-start.el (gnus-group-change-level): Allow putting foreign groups
onto the list of killed groups, too. This makes killed nnimap groups,
for instance, more reliably not reappear.
* nnimap.el (nnimap-request-thread): Don't bug out when we can't find
the parent.
* gnus-sum.el (gnus-update-read-articles): Fix typo.
* gnus.el (gnus-valid-select-methods): Mark nnimap as a backend that
@ -24,8 +210,8 @@
2011-03-05 Antoine Levitt <antoine.levitt@gmail.com>
* message.el (message-cite-reply-position, message-cite-style): New
variables.
* message.el (message-cite-reply-position, message-cite-style):
New variables.
(message-yank-original): Use the new citation styles.
2011-03-04 Daiki Ueno <ueno@unixuser.org>
@ -139,14 +325,14 @@
2011-02-23 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-start.el (gnus-dribble-read-file): Set
buffer-save-without-query, since we always want to save the dribble
* gnus-start.el (gnus-dribble-read-file):
Set buffer-save-without-query, since we always want to save the dribble
file, probably.
* nnmail.el (nnmail-article-group): Allow a final "" split to work on
nnimap.
* gnus-sum.el (gnus-user-date-format-alist): Renamed back again from
* gnus-sum.el (gnus-user-date-format-alist): Rename back again from
-summary- since it's a user-visible variable.
* nnimap.el (nnimap-retrieve-group-data-early): Don't do QRESYNC the
@ -392,8 +578,8 @@
2011-02-14 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el (auth-source-backend-parse-parameters): Don't rely on
`plist-get' to accept non-list parameters (XEmacs issue). Fix
docstring.
`plist-get' to accept non-list parameters (XEmacs issue).
Fix docstring.
(auth-source-secrets-search): Use `delete-dups', `append mapcar', and
`butlast' instead of `remove-duplicates', `mapcan', and `subseq'.
(auth-sources, auth-source-backend-parse, auth-source-secrets-search):
@ -433,8 +619,8 @@
2011-02-13 Tassilo Horn <tassilo@member.fsf.org> (tiny change)
* nnimap.el (nnimap-request-accept-article, nnimap-process-quirk): Fix
Gcc processing on imap.
* nnimap.el (nnimap-request-accept-article, nnimap-process-quirk):
Fix Gcc processing on imap.
2011-02-10 Stefan Monnier <monnier@iro.umontreal.ca>
@ -522,8 +708,8 @@
2011-02-06 Michael Albinus <michael.albinus@gmx.de>
* auth-source.el (top): Require 'eieio unconditionally. Autoload
`secrets-get-attributes' instead of `secrets-get-attribute'.
* auth-source.el (top): Require 'eieio unconditionally.
Autoload `secrets-get-attributes' instead of `secrets-get-attribute'.
(auth-source-secrets-search): Limit search when `max' is greater than
number of results.
@ -559,7 +745,7 @@
(auth-source-protocol-defaults, auth-source-user-or-password-imap)
(auth-source-user-or-password-pop3, auth-source-user-or-password-ssh)
(auth-source-user-or-password-sftp)
(auth-source-user-or-password-smtp): Removed.
(auth-source-user-or-password-smtp): Remove.
(auth-source-user-or-password): Deprecated and modified to be a wrapper
around `auth-source-search'. Not tested thoroughly.
@ -725,16 +911,16 @@
* gnus-group.el (gnus-group-jump-to-group): Allow jumping to groups
that Gnus doesn't know exists again.
* gnus-art.el (gnus-article-date-lapsed-new-header): Removed.
* gnus-art.el (gnus-article-date-lapsed-new-header): Remove.
(gnus-treat-date-ut): Ditto.
(gnus-article-update-date-header): Renamed.
(gnus-treat-date-local): Removed.
(gnus-treat-date-english): Removed.
(gnus-treat-date-lapsed): Removed.
(gnus-treat-date-combined-lapsed): Removed.
(gnus-treat-date-original): Removed.
(gnus-treat-date-iso8601): Removed.
(gnus-treat-date-user-defined): Removed.
(gnus-article-update-date-header): Rename.
(gnus-treat-date-local): Remove.
(gnus-treat-date-english): Remove.
(gnus-treat-date-lapsed): Remove.
(gnus-treat-date-combined-lapsed): Remove.
(gnus-treat-date-original): Remove.
(gnus-treat-date-iso8601): Remove.
(gnus-treat-date-user-defined): Remove.
(gnus-article-date-headers): New variable to control all the date
header options.
(article-date-ut): Rewrite to allow using the new way to format date

View file

@ -54,6 +54,8 @@
(autoload 'secrets-list-collections "secrets")
(autoload 'secrets-search-items "secrets")
(autoload 'rfc2104-hash "rfc2104")
(defvar secrets-enabled)
(defgroup auth-source nil
@ -286,6 +288,28 @@ If the value is not a list, symmetric encryption will be used."
msg))
;;; (auth-source-read-char-choice "enter choice? " '(?a ?b ?q))
(defun auth-source-read-char-choice (prompt choices)
"Read one of CHOICES by `read-char-choice', or `read-char'.
`dropdown-list' support is disabled because it doesn't work reliably.
Only one of CHOICES will be returned. The PROMPT is augmented
with \"[a/b/c] \" if CHOICES is '\(?a ?b ?c\)."
(when choices
(let* ((prompt-choices
(apply 'concat (loop for c in choices
collect (format "%c/" c))))
(prompt-choices (concat "[" (substring prompt-choices 0 -1) "] "))
(full-prompt (concat prompt prompt-choices))
k)
(while (not (memq k choices))
(setq k (cond
((fboundp 'read-char-choice)
(read-char-choice full-prompt choices))
(t (message "%s" full-prompt)
(setq k (read-char))))))
k)))
;; (auth-source-pick nil :host "any" :port 'imap :user "joe")
;; (auth-source-pick t :host "any" :port 'imap :user "joe")
;; (setq auth-sources '((:source (:secrets default) :host t :port t :user "joe")
@ -393,7 +417,7 @@ parameters."
(defun* auth-source-search (&rest spec
&key type max host user port secret
create delete
require create delete
&allow-other-keys)
"Search or modify authentication backends according to SPEC.
@ -487,6 +511,11 @@ should `catch' the backend-specific error as usual. Some
backends (netrc, at least) will prompt the user rather than throw
an error.
:require (A B C) means that only results that contain those
tokens will be returned. Thus for instance requiring :secret
will ensure that any results will actually have a :secret
property.
:delete t means to delete any found entries. nil by default.
Use `auth-source-delete' in ELisp code instead of calling
`auth-source-search' directly with this parameter.
@ -516,11 +545,17 @@ is a plist with keys :backend :host :port :user, plus any other
keys provided by the backend (notably :secret). But note the
exception for :max 0, which see above.
The token can hold a :save-function key. If you call that, the
user will be prompted to save the data to the backend. You can't
request that this should happen right after creation, because
`auth-source-search' has no way of knowing if the token is
actually useful. So the caller must arrange to call this function.
The token's :secret key can hold a function. In that case you
must call it to obtain the actual value."
(let* ((backends (mapcar 'auth-source-backend-parse auth-sources))
(max (or max 1))
(ignored-keys '(:create :delete :max))
(ignored-keys '(:require :create :delete :max))
(keys (loop for i below (length spec) by 2
unless (memq (nth i spec) ignored-keys)
collect (nth i spec)))
@ -539,6 +574,10 @@ must call it to obtain the actual value."
(or (eq t create) (listp create)) t
"Invalid auth-source :create parameter (must be t or a list): %s %s")
(assert
(listp require) t
"Invalid auth-source :require parameter (must be a list): %s")
(setq filtered-backends (copy-sequence backends))
(dolist (backend backends)
(dolist (key keys)
@ -562,8 +601,9 @@ must call it to obtain the actual value."
spec
;; to exit early
max
;; create and delete
nil delete))
;; create is always nil here
nil delete
require))
(auth-source-do-debug
"auth-source-search: found %d results (max %d) matching %S"
@ -577,9 +617,9 @@ must call it to obtain the actual value."
spec
;; to exit early
max
;; create and delete
create delete))
(auth-source-do-warn
create delete
require))
(auth-source-do-debug
"auth-source-search: CREATED %d results (max %d) matching %S"
(length found) max spec))
@ -589,18 +629,19 @@ must call it to obtain the actual value."
found))
(defun auth-source-search-backends (backends spec max create delete)
(defun auth-source-search-backends (backends spec max create delete require)
(let (matches)
(dolist (backend backends)
(when (> max (length matches)) ; when we need more matches...
(let ((bmatches (apply
(slot-value backend 'search-function)
:backend backend
;; note we're overriding whatever the spec
;; has for :create and :delete
:create create
:delete delete
spec)))
(let* ((bmatches (apply
(slot-value backend 'search-function)
:backend backend
;; note we're overriding whatever the spec
;; has for :require, :create, and :delete
:require require
:create create
:delete delete
spec)))
(when bmatches
(auth-source-do-trivia
"auth-source-search-backend: got %d (max %d) in %s:%s matching %S"
@ -713,7 +754,28 @@ while \(:host t) would find all host entries."
(return 'no)))
'no))))
;;; Backend specific parsing: netrc/authinfo backend
;;; (auth-source-pick-first-password :host "z.lifelogs.com")
;;; (auth-source-pick-first-password :port "imap")
(defun auth-source-pick-first-password (&rest spec)
"Pick the first secret found from applying SPEC to `auth-source-search'."
(let* ((result (nth 0 (apply 'auth-source-search (plist-put spec :max 1))))
(secret (plist-get result :secret)))
(if (functionp secret)
(funcall secret)
secret)))
;; (auth-source-format-prompt "test %u %h %p" '((?u "user") (?h "host")))
(defun auth-source-format-prompt (prompt alist)
"Format PROMPT using %x (for any character x) specifiers in ALIST."
(dolist (cell alist)
(let ((c (nth 0 cell))
(v (nth 1 cell)))
(when (and c v)
(setq prompt (replace-regexp-in-string (format "%%%c" c)
(format "%s" v)
prompt)))))
prompt)
(defun auth-source-ensure-strings (values)
(unless (listp values)
@ -724,12 +786,14 @@ while \(:host t) would find all host entries."
value))
values))
;;; Backend specific parsing: netrc/authinfo backend
(defvar auth-source-netrc-cache nil)
;;; (auth-source-netrc-parse "~/.authinfo.gpg")
(defun* auth-source-netrc-parse (&rest
spec
&key file max host user port delete
&key file max host user port delete require
&allow-other-keys)
"Parse FILE and return a list of all entries in the file.
Note that the MAX parameter is used so we can exit the parse early."
@ -828,7 +892,15 @@ Note that the MAX parameter is used so we can exit the parse early."
(or
(aget alist "port")
(aget alist "protocol")
t)))
t))
(or
;; the required list of keys is nil, or
(null require)
;; every element of require is in the normalized list
(let ((normalized (nth 0 (auth-source-netrc-normalize
(list alist)))))
(loop for req in require
always (plist-get normalized req)))))
(decf max)
(push (nreverse alist) result)
;; to delete a line, we just comment it out
@ -853,7 +925,7 @@ Note that the MAX parameter is used so we can exit the parse early."
(setq epa-file-encrypt-to auth-source-gpg-encrypt-to)))
;; ask AFTER we've successfully opened the file
(when (y-or-n-p (format "Save file %s? (%d modifications)"
(when (y-or-n-p (format "Save file %s? (%d deletions)"
file modified))
(write-region (point-min) (point-max) file nil 'silent)
(auth-source-do-debug
@ -893,7 +965,7 @@ Note that the MAX parameter is used so we can exit the parse early."
(defun* auth-source-netrc-search (&rest
spec
&key backend create delete
&key backend require create delete
type max host user port
&allow-other-keys)
"Given a property list SPEC, return search matches from the :backend.
@ -905,6 +977,7 @@ See `auth-source-search' for details on SPEC."
(let ((results (auth-source-netrc-normalize
(auth-source-netrc-parse
:max max
:require require
:delete delete
:file (oref backend source)
:host (or host t)
@ -933,17 +1006,6 @@ See `auth-source-search' for details on SPEC."
(nth 0 v)
v))
;; (auth-source-format-prompt "test %u %h %p" '((?u "user") (?h "host")))
(defun auth-source-format-prompt (prompt alist)
"Format PROMPT using %x (for any character x) specifiers in ALIST."
(dolist (cell alist)
(let ((c (nth 0 cell))
(v (nth 1 cell)))
(when (and c v)
(setq prompt (replace-regexp-in-string (format "%%%c" c) v prompt)))))
prompt)
;;; (auth-source-search :host "nonesuch" :type 'netrc :max 1 :create t)
;;; (auth-source-search :host "nonesuch" :type 'netrc :max 1 :create t :create-extra-keys '((A "default A") (B)))
@ -992,12 +1054,12 @@ See `auth-source-search' for details on SPEC."
(data (auth-source-netrc-element-or-first data))
;; this is the default to be offered
(given-default (aget auth-source-creation-defaults r))
;; the default supplementals are simple: for the user,
;; try (user-login-name), otherwise take given-default
;; the default supplementals are simple:
;; for the user, try `given-default' and then (user-login-name);
;; otherwise take `given-default'
(default (cond
;; don't default the user name
;; ((and (not given-default) (eq r 'user))
;; (user-login-name))
((and (not given-default) (eq r 'user))
(user-login-name))
(t given-default)))
(printable-defaults (list
(cons 'user
@ -1020,10 +1082,10 @@ See `auth-source-search' for details on SPEC."
"[any port]"))))
(prompt (or (aget auth-source-creation-prompts r)
(case r
('secret "%p password for user %u, host %h: ")
('user "%p user name: ")
('host "%p host name for user %u: ")
('port "%p port for user %u and host %h: "))
(secret "%p password for %u@%h: ")
(user "%p user name for %h: ")
(host "%p host name for user %u: ")
(port "%p port for %u@%h: "))
(format "Enter %s (%%u@%%h:%%p): " r)))
(prompt (auth-source-format-prompt
prompt
@ -1031,14 +1093,20 @@ See `auth-source-search' for details on SPEC."
(?h ,(aget printable-defaults 'host))
(?p ,(aget printable-defaults 'port))))))
;; store the data, prompting for the password if needed
;; Store the data, prompting for the password if needed.
(setq data
(cond
((and (null data) (eq r 'secret))
;; special case prompt for passwords
;; Special case prompt for passwords.
(read-passwd prompt))
((null data)
(read-string prompt default))
(when default
(setq prompt
(if (string-match ": *\\'" prompt)
(concat (substring prompt 0 (match-beginning 0))
" (default " default "): ")
(concat prompt "(default " default ") "))))
(read-string prompt nil nil default))
(t (or data default))))
(when data
@ -1049,7 +1117,7 @@ See `auth-source-search' for details on SPEC."
(lambda () data))
data))))
;; when r is not an empty string...
;; When r is not an empty string...
(when (and (stringp data)
(< 0 (length data)))
;; this function is not strictly necessary but I think it
@ -1062,79 +1130,99 @@ See `auth-source-search' for details on SPEC."
(if (zerop (length add)) "" " ")
;; remap auth-source tokens to netrc
(case r
('user "login")
('host "machine")
('secret "password")
('port "port") ; redundant but clearer
(user "login")
(host "machine")
(secret "password")
(port "port") ; redundant but clearer
(t (symbol-name r)))
;; the value will be printed in %S format
data))))
(setq add (concat add (funcall printer)))))))
(with-temp-buffer
(when (file-exists-p file)
(insert-file-contents file))
(when auth-source-gpg-encrypt-to
;; (see bug#7487) making `epa-file-encrypt-to' local to
;; this buffer lets epa-file skip the key selection query
;; (see the `local-variable-p' check in
;; `epa-file-write-region').
(unless (local-variable-p 'epa-file-encrypt-to (current-buffer))
(make-local-variable 'epa-file-encrypt-to))
(if (listp auth-source-gpg-encrypt-to)
(setq epa-file-encrypt-to auth-source-gpg-encrypt-to)))
(goto-char (point-max))
(plist-put
artificial
:save-function
(lexical-let ((file file)
(add add))
(lambda () (auth-source-netrc-saver file add))))
;; ask AFTER we've successfully opened the file
(let ((prompt (format "Save auth info to file %s? %s: "
file
"y/n/N/e/?"))
(done (not (eq auth-source-save-behavior 'ask)))
(bufname "*auth-source Help*")
k)
(while (not done)
(message "%s" prompt)
(setq k (read-char))
(case k
(?y (setq done t))
(?? (save-excursion
(with-output-to-temp-buffer bufname
(princ
(concat "(y)es, save\n"
"(n)o but use the info\n"
"(N)o and don't ask to save again\n"
"(e)dit the line\n"
"(?) for help as you can see.\n"))
(set-buffer standard-output)
(help-mode))))
(?n (setq add ""
done t))
(?N (setq add ""
done t
auth-source-save-behavior nil))
(?e (setq add (read-string "Line to add: " add)))
(t nil)))
(list artificial)))
(when (get-buffer-window bufname)
(delete-window (get-buffer-window bufname)))
;;(funcall (plist-get (nth 0 (auth-source-search :host '("nonesuch2") :user "tzz" :port "imap" :create t :max 1)) :save-function))
(defun auth-source-netrc-saver (file add)
"Save a line ADD in FILE, prompting along the way.
Respects `auth-source-save-behavior'. Uses
`auth-source-netrc-cache' to avoid prompting more than once."
(let* ((key (format "%s %s" file (rfc2104-hash 'md5 64 16 file add)))
(cached (assoc key auth-source-netrc-cache)))
;; make sure the info is not saved
(when (null auth-source-save-behavior)
(setq add ""))
(if cached
(auth-source-do-trivia
"auth-source-netrc-saver: found previous run for key %s, returning"
key)
(with-temp-buffer
(when (file-exists-p file)
(insert-file-contents file))
(when auth-source-gpg-encrypt-to
;; (see bug#7487) making `epa-file-encrypt-to' local to
;; this buffer lets epa-file skip the key selection query
;; (see the `local-variable-p' check in
;; `epa-file-write-region').
(unless (local-variable-p 'epa-file-encrypt-to (current-buffer))
(make-local-variable 'epa-file-encrypt-to))
(if (listp auth-source-gpg-encrypt-to)
(setq epa-file-encrypt-to auth-source-gpg-encrypt-to)))
;; we want the new data to be found first, so insert at beginning
(goto-char (point-min))
(when (< 0 (length add))
(progn
(unless (bolp)
(insert "\n"))
(insert add "\n")
(write-region (point-min) (point-max) file nil 'silent)
(auth-source-do-warn
"auth-source-netrc-create: wrote 1 new line to %s"
file)
nil))
;; Ask AFTER we've successfully opened the file.
(let ((prompt (format "Save auth info to file %s? " file))
(done (not (eq auth-source-save-behavior 'ask)))
(bufname "*auth-source Help*")
k)
(while (not done)
(setq k (auth-source-read-char-choice prompt '(?y ?n ?N ?e ??)))
(case k
(?y (setq done t))
(?? (save-excursion
(with-output-to-temp-buffer bufname
(princ
(concat "(y)es, save\n"
"(n)o but use the info\n"
"(N)o and don't ask to save again\n"
"(e)dit the line\n"
"(?) for help as you can see.\n"))
;; Why? Doesn't with-output-to-temp-buffer already do
;; the exact same thing anyway? --Stef
(set-buffer standard-output)
(help-mode))))
(?n (setq add ""
done t))
(?N (setq add ""
done t
auth-source-save-behavior nil))
(?e (setq add (read-string "Line to add: " add)))
(t nil)))
(when (eq done t)
(list artificial))))))
(when (get-buffer-window bufname)
(delete-window (get-buffer-window bufname)))
;; Make sure the info is not saved.
(when (null auth-source-save-behavior)
(setq add ""))
(when (< 0 (length add))
(progn
(unless (bolp)
(insert "\n"))
(insert add "\n")
(write-region (point-min) (point-max) file nil 'silent)
(auth-source-do-debug
"auth-source-netrc-create: wrote 1 new line to %s"
file)
(message "Saved new authentication information to %s" file)
nil))))
(aput 'auth-source-netrc-cache key "ran"))))
;;; Backend specific parsing: Secrets API backend

View file

@ -44,6 +44,7 @@
(require 'wid-edit)
(require 'mm-uu)
(require 'message)
(require 'mouse)
(autoload 'gnus-msg-mail "gnus-msg" nil t)
(autoload 'gnus-button-mailto "gnus-msg")
@ -2337,10 +2338,12 @@ long lines if and only if arg is positive."
(let ((start (point)))
(insert "X-Boundary: ")
(gnus-add-text-properties start (point) '(invisible t intangible t))
(insert (let (str)
(while (>= (window-width) (length str))
(insert (let (str (max (window-width)))
(if (featurep 'xemacs)
(setq max (1- max)))
(while (>= max (length str))
(setq str (concat str gnus-body-boundary-delimiter)))
(substring str 0 (window-width)))
(substring str 0 max))
"\n")
(gnus-put-text-property start (point) 'gnus-decoration 'header)))))
@ -3074,10 +3077,7 @@ images if any to the browser, and deletes them when exiting the group
The `gnus-list-identifiers' variable specifies what to do."
(interactive)
(let ((inhibit-point-motion-hooks t)
(regexp (or (gnus-parameter-list-identifier gnus-newsgroup-name)
(if (consp gnus-list-identifiers)
(mapconcat 'identity gnus-list-identifiers " *\\|")
gnus-list-identifiers)))
(regexp (gnus-group-get-list-identifiers gnus-newsgroup-name))
(inhibit-read-only t))
(when regexp
(save-excursion

View file

@ -697,7 +697,8 @@ simple manner.")
"M" gnus-group-list-all-matching
"l" gnus-group-list-level
"c" gnus-group-list-cached
"?" gnus-group-list-dormant)
"?" gnus-group-list-dormant
"!" gnus-group-list-ticked)
(gnus-define-keys (gnus-group-list-limit-map "/" gnus-group-list-map)
"k" gnus-group-list-limit
@ -849,7 +850,8 @@ simple manner.")
["List all groups matching..." gnus-group-list-all-matching t]
["List active file" gnus-group-list-active t]
["List groups with cached" gnus-group-list-cached t]
["List groups with dormant" gnus-group-list-dormant t])
["List groups with dormant" gnus-group-list-dormant t]
["List groups with ticked" gnus-group-list-ticked t])
("Sort"
["Default sort" gnus-group-sort-groups t]
["Sort by method" gnus-group-sort-groups-by-method t]
@ -2313,9 +2315,10 @@ Return the name of the group if selection was successful."
gnus-fetch-old-ephemeral-headers))
(gnus-group-read-group (or number t) t group select-articles))
group)
;;(error nil)
(quit
(message "Quit reading the ephemeral group")
(if debug-on-quit
(debug "Quit")
(message "Quit reading the ephemeral group"))
nil)))))
(defcustom gnus-gmane-group-download-format
@ -4535,6 +4538,28 @@ This command may read the active file."
(goto-char (point-min))
(gnus-group-position-point))
(defun gnus-group-list-ticked (level &optional lowest)
"List all groups with ticked articles.
If the prefix LEVEL is non-nil, it should be a number that says which
level to cut off listing groups.
If LOWEST, don't list groups with level lower than LOWEST.
This command may read the active file."
(interactive "P")
(when level
(setq level (prefix-numeric-value level)))
(when (or (not level) (>= level gnus-level-zombie))
(gnus-cache-open))
(funcall gnus-group-prepare-function
(or level gnus-level-subscribed)
#'(lambda (info)
(let ((marks (gnus-info-marks info)))
(assq 'tick marks)))
lowest
'ignore)
(goto-char (point-min))
(gnus-group-position-point))
(defun gnus-group-listed-groups ()
"Return a list of listed groups."
(let (point groups)

View file

@ -270,7 +270,9 @@ If it is down, start it up (again)."
server (error-message-string err))
nil)
(quit
(gnus-message 1 "Quit trying to open server %s" server)
(if debug-on-quit
(debug "Quit")
(gnus-message 1 "Quit trying to open server %s" server))
nil)))
open-offline)
;; If this hasn't been opened before, we add it to the list.

View file

@ -1306,16 +1306,13 @@ for new groups, and subscribe the new groups as zombies."
((>= level gnus-level-zombie)
;; Remove from the hash table.
(gnus-sethash group nil gnus-newsrc-hashtb)
;; We do not enter foreign groups into the list of dead
;; groups.
(unless (gnus-group-foreign-p group)
(if (= level gnus-level-zombie)
(push group gnus-zombie-list)
(if (= oldlevel gnus-level-killed)
;; Remove from active hashtb.
(unintern group gnus-active-hashtb)
;; Don't add it into killed-list if it was killed.
(push group gnus-killed-list)))))
(if (= level gnus-level-zombie)
(push group gnus-zombie-list)
(if (= oldlevel gnus-level-killed)
;; Remove from active hashtb.
(unintern group gnus-active-hashtb)
;; Don't add it into killed-list if it was killed.
(push group gnus-killed-list))))
(t
;; If the list is to be entered into the newsrc assoc, and
;; it was killed, we have to create an entry in the newsrc
@ -1465,9 +1462,10 @@ If SCAN, request a scan of that group as well."
(inline (gnus-request-group group (or dont-sub-check dont-check)
method
(gnus-get-info group)))
;;(error nil)
(quit
(message "Quit activating %s" group)
(if debug-on-quit
(debug "Quit")
(message "Quit activating %s" group))
nil)))
(unless dont-check
(setq active (gnus-parse-active))
@ -2007,7 +2005,9 @@ If SCAN, request a scan of that group as well."
;; We catch C-g so that we can continue past servers
;; that do not respond.
(quit
(message "Quit reading the active file")
(if debug-on-quit
(debug "Quit")
(message "Quit reading the active file"))
nil))))))))
(defun gnus-read-active-file-1 (method force)

View file

@ -5510,12 +5510,17 @@ or a straight list of headers."
(cdr (assq number gnus-newsgroup-scored))
(memq number gnus-newsgroup-processable))))))
(defun gnus-group-get-list-identifiers (group)
"Get list identifier regexp for GROUP."
(or (gnus-parameter-list-identifier group)
(if (consp gnus-list-identifiers)
(mapconcat 'identity gnus-list-identifiers " *\\|")
gnus-list-identifiers)))
(defun gnus-summary-remove-list-identifiers ()
"Remove list identifiers in `gnus-list-identifiers' from articles in the current group."
(let ((regexp (if (consp gnus-list-identifiers)
(mapconcat 'identity gnus-list-identifiers " *\\|")
gnus-list-identifiers))
changed subject)
(let ((regexp (gnus-group-get-list-identifiers gnus-newsgroup-name))
changed subject)
(when regexp
(setq regexp (concat "^\\(?:R[Ee]: +\\)*\\(" regexp " *\\)"))
(dolist (header gnus-newsgroup-headers)
@ -5707,8 +5712,7 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(when gnus-agent
(gnus-agent-get-undownloaded-list))
;; Remove list identifiers from subject
(when gnus-list-identifiers
(gnus-summary-remove-list-identifiers))
(gnus-summary-remove-list-identifiers)
;; Check whether auto-expire is to be done in this group.
(setq gnus-newsgroup-auto-expire
(gnus-group-auto-expirable-p group))
@ -5798,7 +5802,8 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(defun gnus-articles-to-read (group &optional read-all)
"Find out what articles the user wants to read."
(let* ((articles
(let* ((only-read-p t)
(articles
;; Select all articles if `read-all' is non-nil, or if there
;; are no unread articles.
(if (or read-all
@ -5822,6 +5827,7 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(gnus-uncompress-range (gnus-active group)))
(gnus-cache-articles-in-group group))
;; Select only the "normal" subset of articles.
(setq only-read-p nil)
(gnus-sorted-nunion
(gnus-sorted-union gnus-newsgroup-dormant gnus-newsgroup-marked)
gnus-newsgroup-unreads)))
@ -5845,16 +5851,25 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(let* ((cursor-in-echo-area nil)
(initial (gnus-parameter-large-newsgroup-initial
gnus-newsgroup-name))
(default (if only-read-p
(or initial gnus-large-newsgroup)
number))
(input
(read-string
(format
"How many articles from %s (%s %d): "
(gnus-group-decoded-name gnus-newsgroup-name)
(if initial "max" "default")
number)
(if initial
(cons (number-to-string initial)
0)))))
(if only-read-p
(format
"How many articles from %s (available %d, default %d): "
(gnus-group-decoded-name
(gnus-group-real-name gnus-newsgroup-name))
number default)
(format
"How many articles from %s (%d available): "
(gnus-group-decoded-name
(gnus-group-real-name gnus-newsgroup-name))
default))
nil
nil
(number-to-string default))))
(if (string-match "^[ \t]*$" input) number input)))
((and (> scored marked) (< scored number)
(> (- scored number) 20))
@ -5862,7 +5877,8 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(read-string
(format "%s %s (%d scored, %d total): "
"How many articles from"
(gnus-group-decoded-name group)
(gnus-group-decoded-name
(gnus-group-real-name gnus-newsgroup-name))
scored number))))
(if (string-match "^[ \t]*$" input)
number input)))
@ -6564,9 +6580,8 @@ the subject line on."
(1+ (point-at-eol))
(gnus-delete-line))))))
;; Remove list identifiers from subject.
(when gnus-list-identifiers
(let ((gnus-newsgroup-headers (list header)))
(gnus-summary-remove-list-identifiers)))
(let ((gnus-newsgroup-headers (list header)))
(gnus-summary-remove-list-identifiers))
(when old-header
(mail-header-set-number header (mail-header-number old-header)))
(setq gnus-newsgroup-sparse
@ -12670,8 +12685,7 @@ returned."
(when gnus-agent
(gnus-agent-get-undownloaded-list))
;; Remove list identifiers from subject
(when gnus-list-identifiers
(gnus-summary-remove-list-identifiers))
(gnus-summary-remove-list-identifiers)
;; First and last article in this newsgroup.
(when gnus-newsgroup-headers
(setq gnus-newsgroup-begin

View file

@ -25,7 +25,8 @@
;; This is the gnus-sync.el package.
;; It's due for a rewrite using gnus-after-set-mark-hook and
;; gnus-before-update-mark-hook. Until then please consider it
;; gnus-before-update-mark-hook, and my plan is to do this once No
;; Gnus development is done. Until then please consider it
;; experimental.
;; Put this in your startup file (~/.gnus.el for instance)
@ -42,7 +43,8 @@
;; TODO:
;; - after gnus-sync-read, the message counts are wrong
;; - after gnus-sync-read, the message counts are wrong. So it's not
;; run automatically, you have to call it with M-x gnus-sync-read
;; - use gnus-after-set-mark-hook and gnus-before-update-mark-hook to
;; catch the mark updates
@ -220,13 +222,13 @@ synchronized, I believe). Also see `gnus-variable-list'."
"Install the sync hooks."
(interactive)
;; (add-hook 'gnus-get-new-news-hook 'gnus-sync-read)
(add-hook 'gnus-save-newsrc-hook 'gnus-sync-save)
(add-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read))
;; (add-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read)
(add-hook 'gnus-save-newsrc-hook 'gnus-sync-save))
(defun gnus-sync-unload-hook ()
"Uninstall the sync hooks."
(interactive)
;; (remove-hook 'gnus-get-new-news-hook 'gnus-sync-read)
(remove-hook 'gnus-get-new-news-hook 'gnus-sync-read)
(remove-hook 'gnus-save-newsrc-hook 'gnus-sync-save)
(remove-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read))

View file

@ -672,11 +672,9 @@ If N, return the Nth ancestor instead."
(when (string-match "\\(<[^<]+>\\)[ \t]*\\'" references)
(match-string 1 references))))))
(defun gnus-buffer-live-p (buffer)
(defsubst gnus-buffer-live-p (buffer)
"Say whether BUFFER is alive or not."
(and buffer
(get-buffer buffer)
(buffer-name (get-buffer buffer))))
(and buffer (buffer-live-p (get-buffer buffer))))
(defun gnus-horizontal-recenter ()
"Recenter the current buffer horizontally."

View file

@ -268,8 +268,10 @@ See the Gnus manual for an explanation of the syntax used.")
(error "Invalid buffer type: %s" type))
(let ((buf (gnus-get-buffer-create
(gnus-window-to-buffer-helper buffer))))
(if (eq buf (window-buffer (selected-window))) (set-buffer buf)
(switch-to-buffer buf)))
(when (buffer-name buf)
(if (eq buf (window-buffer (selected-window)))
(set-buffer buf)
(switch-to-buffer buf))))
(when (memq 'frame-focus split)
(setq gnus-window-frame-focus window))
;; We return the window if it has the `point' spec.

View file

@ -129,8 +129,10 @@ You can provide a list of argument to pass to CB in CBARGS."
"Retrieve MAIL-ADDRESS gravatar and returns it."
(let ((url (gravatar-build-url mail-address)))
(if (gravatar-cache-expired url)
(with-current-buffer (url-retrieve-synchronously url)
(when gravatar-automatic-caching
(with-current-buffer (if (featurep 'xemacs)
(url-retrieve url)
(url-retrieve-synchronously url))
(when gravatar-automatic-caching
(url-store-in-cache (current-buffer)))
(let ((data (gravatar-data->image)))
(kill-buffer (current-buffer))

105
lisp/gnus/gssapi.el Normal file
View file

@ -0,0 +1,105 @@
;;; gssapi.el --- GSSAPI/Kerberos 5 interface for Emacs
;; Copyright (C) 2011 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: network
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Code:
(require 'format-spec)
(defcustom gssapi-program (list
(concat "gsasl %s %p "
"--mechanism GSSAPI "
"--authentication-id %l")
"imtest -m gssapi -u %l -p %p %s")
"List of strings containing commands for GSSAPI (krb5) authentication.
%s is replaced with server hostname, %p with port to connect to, and
%l with the value of `imap-default-user'. The program should accept
IMAP commands on stdin and return responses to stdout. Each entry in
the list is tried until a successful connection is made."
:group 'network
:type '(repeat string))
(defun open-gssapi-stream (name buffer server port)
(let ((cmds gssapi-program)
cmd done)
(with-current-buffer buffer
(while (and (not done)
(setq cmd (pop cmds)))
(message "Opening GSSAPI connection with `%s'..." cmd)
(erase-buffer)
(let* ((coding-system-for-read 'binary)
(coding-system-for-write 'binary)
(process (start-process
name buffer shell-file-name shell-command-switch
(format-spec
cmd
(format-spec-make
?s server
?p (number-to-string port)
?l imap-default-user))))
response)
(when process
(while (and (memq (process-status process) '(open run))
(goto-char (point-min))
;; Athena IMTEST can output SSL verify errors
(or (while (looking-at "^verify error:num=")
(forward-line))
t)
(or (while (looking-at "^TLS connection established")
(forward-line))
t)
;; cyrus 1.6.x (13? < x <= 22) queries capabilities
(or (while (looking-at "^C:")
(forward-line))
t)
;; cyrus 1.6 imtest print "S: " before server greeting
(or (not (looking-at "S: "))
(forward-char 3)
t)
;; GNU SASL may print 'Trying ...' first.
(or (not (looking-at "Trying "))
(forward-line)
t)
(not (and (looking-at "\\* \\(OK\\|PREAUTH\\|BYE\\) ")
;; success in imtest 1.6:
(re-search-forward
(concat "^\\(\\(Authenticat.*\\)\\|\\("
"Client authentication "
"finished.*\\)\\)")
nil t)
(setq response (match-string 1)))))
(accept-process-output process 1)
(sit-for 1))
(erase-buffer)
(message "GSSAPI IMAP connection: %s" (or response "failed"))
(if (and response (let ((case-fold-search nil))
(not (string-match "failed" response))))
(setq done process)
(delete-process process)
nil))))
done)))
(provide 'gssapi)
;;; gssapi.el ends here

View file

@ -49,6 +49,7 @@
(require 'mail-parse)
(require 'mml)
(require 'rfc822)
(require 'format-spec)
(autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/
@ -438,7 +439,10 @@ whitespace)."
:group 'message-various)
(defcustom message-elide-ellipsis "\n[...]\n\n"
"*The string which is inserted for elided text."
"*The string which is inserted for elided text.
This is a format-spec string, and you can use %l to say how many
lines were removed, and %c to say how many characters were
removed."
:type 'string
:link '(custom-manual "(message)Various Commands")
:group 'message-various)
@ -3535,8 +3539,12 @@ Note that this should not be used in newsgroups."
An ellipsis (from `message-elide-ellipsis') will be inserted where the
text was killed."
(interactive "r")
(kill-region b e)
(insert message-elide-ellipsis))
(let ((lines (count-lines b e))
(chars (- e b)))
(kill-region b e)
(insert (format-spec message-elide-ellipsis
`((?l . ,lines)
(?c . ,chars))))))
(defvar message-caesar-translation-table nil)
@ -3749,12 +3757,12 @@ prefix, and don't delete any headers."
(insert-before-markers ?\n)
(goto-char pt))))
(case message-cite-reply-position
('above
(above
(message-goto-body)
(insert body-text)
(insert (if (bolp) "\n" "\n\n"))
(message-goto-body))
('below
(below
(message-goto-signature)))
;; Add a `message-setup-very-last-hook' here?
;; Add `gnus-article-highlight-citation' here?

View file

@ -158,6 +158,12 @@ This can be either \"inline\" or \"attachment\".")
mm-uu-diff-extract
nil
mm-uu-diff-test)
(diff
"^=== modified file "
nil
mm-uu-diff-extract
nil
mm-uu-diff-test)
(git-format-patch
"^diff --git "
"^-- "
@ -699,6 +705,8 @@ Assume text has been decoded if DECODED is non-nil."
;; Mutt still uses application/pgp even though
;; it has already been withdrawn.
(string-match "\\`text/\\|\\`application/pgp\\'" type)
(equal (car (mm-handle-disposition handle))
"inline")
(setq
children
(with-current-buffer buffer

View file

@ -279,16 +279,21 @@ textual parts.")
(current-buffer)))
(defun nnimap-credentials (address ports)
(let ((found (nth 0 (auth-source-search :max 1
:host address
:port ports
:create t))))
(let* ((auth-source-creation-prompts
'((user . "IMAP user at %h: ")
(secret . "IMAP password for %u@%h: ")))
(found (nth 0 (auth-source-search :max 1
:host address
:port ports
:require '(:user :secret)
:create t))))
(if found
(list (plist-get found :user)
(let ((secret (plist-get found :secret)))
(if (functionp secret)
(funcall secret)
secret)))
secret))
(plist-get found :save-function))
nil)))
(defun nnimap-keepalive ()
@ -335,6 +340,7 @@ textual parts.")
(ports
(cond
((or (eq nnimap-stream 'network)
(eq nnimap-stream 'network-only)
(eq nnimap-stream 'starttls))
(nnheader-message 7 "Opening connection to %s..."
nnimap-address)
@ -396,7 +402,12 @@ textual parts.")
(let ((nnimap-inhibit-logging t))
(setq login-result
(nnimap-login (car credentials) (cadr credentials))))
(unless (car login-result)
(if (car login-result)
;; save the credentials if a save function exists
;; (such a function will only be passed if a new
;; token was created)
(when (functionp (nth 2 credentials))
(funcall (nth 2 credentials)))
;; If the login failed, then forget the credentials
;; that are now possibly cached.
(dolist (host (list (nnoo-current-server 'nnimap)
@ -1442,6 +1453,11 @@ textual parts.")
;; Change \Delete etc to %Delete, so that the reader can read it.
(subst-char-in-region (point-min) (point-max)
?\\ ?% t)
;; Remove any MODSEQ entries in the buffer, because they may contain
;; numbers that are too large for 32-bit Emacsen.
(while (re-search-forward " MODSEQ ([0-9]+)" nil t)
(replace-match "" t t))
(goto-char (point-min))
(let (start end articles groups uidnext elems permanent-flags
uidvalidity vanished highestmodseq)
(dolist (elem sequences)
@ -1481,9 +1497,9 @@ textual parts.")
(match-string 1)))
(goto-char start)
(setq highestmodseq
(and (search-forward "HIGHESTMODSEQ "
(and (re-search-forward "HIGHESTMODSEQ \\([0-9]+\\)"
(or end (point-min)) t)
(read (current-buffer))))
(match-string 1)))
(goto-char end)
(forward-line -1))
;; The UID FETCH FLAGS was successful.
@ -1497,18 +1513,7 @@ textual parts.")
(goto-char end))
(while (re-search-forward "^\\* [0-9]+ FETCH " start t)
(let ((p (point)))
;; FIXME: For FETCH lines like "* 2971 FETCH (FLAGS (%Recent) UID
;; 12509 MODSEQ (13419098521433281274))" we get an
;; overflow-error. The handler simply deletes that large number
;; and reads again. But maybe there's a better fix...
(setq elems (condition-case nil (read (current-buffer))
(overflow-error
;; After an overflow-error, point is just after
;; the too large number. So delete it and try
;; again.
(delete-region (point) (progn (backward-word) (point)))
(goto-char p)
(read (current-buffer)))))
(setq elems (read (current-buffer)))
(push (cons (cadr (memq 'UID elems))
(cadr (memq 'FLAGS elems)))
articles)))
@ -1545,10 +1550,11 @@ textual parts.")
refid refid value)))))
(result (with-current-buffer (nnimap-buffer)
(nnimap-command "UID SEARCH %s" cmd))))
(gnus-fetch-headers
(and (car result) (delete 0 (mapcar #'string-to-number
(cdr (assoc "SEARCH" (cdr result))))))
nil t)))
(when result
(gnus-fetch-headers
(and (car result) (delete 0 (mapcar #'string-to-number
(cdr (assoc "SEARCH" (cdr result))))))
nil t))))
(defun nnimap-possibly-change-group (group server)
(let ((open-result t))
@ -1663,6 +1669,8 @@ textual parts.")
(goto-char (point-max)))
openp)
(quit
(when debug-on-quit
(debug "Quit"))
;; The user hit C-g while we were waiting: kill the process, in case
;; it's a gnutls-cli process that's stuck (tends to happen a lot behind
;; NAT routers).
@ -1754,11 +1762,15 @@ textual parts.")
(format "(UID %s%s)"
(format
(if (nnimap-ver4-p)
"BODY.PEEK[HEADER] BODY.PEEK"
"BODY.PEEK"
"RFC822.PEEK"))
(if nnimap-split-download-body-default
"[]"
"[1]")))
(cond
(nnimap-split-download-body-default
"[]")
((nnimap-ver4-p)
"[HEADER]")
(t
"[1]"))))
t))
(defun nnimap-split-incoming-mail ()

View file

@ -53,17 +53,17 @@ fit these criteria."
:group 'shr
:type 'regexp)
(defcustom shr-table-horizontal-line ?-
(defcustom shr-table-horizontal-line ?
"Character used to draw horizontal table lines."
:group 'shr
:type 'character)
(defcustom shr-table-vertical-line ?|
(defcustom shr-table-vertical-line ?
"Character used to draw vertical table lines."
:group 'shr
:type 'character)
(defcustom shr-table-corner ?+
(defcustom shr-table-corner ?
"Character used to draw table corners."
:group 'shr
:type 'character)
@ -113,6 +113,15 @@ cid: URL as the argument.")
;; Public functions and commands.
(defun shr-visit-file (file)
(interactive "fHTML file name: ")
(pop-to-buffer "*html*")
(erase-buffer)
(shr-insert-document
(with-temp-buffer
(insert-file-contents file)
(libxml-parse-html-region (point-min) (point-max)))))
;;;###autoload
(defun shr-insert-document (dom)
(setq shr-content-cache nil)

View file

@ -275,9 +275,10 @@ Valid states are `closed', `initial', `nonauth', and `auth'.")
(with-current-buffer buffer
(let* ((auth-info (auth-source-search :host sieve-manage-server
:port "sieve"
:max 1))
(user-name (plist-get (nth 0 auth-info) :user))
(user-password (plist-get (nth 0 auth-info) :secret))
:max 1
:create t))
(user-name (or (plist-get (nth 0 auth-info) :user) ""))
(user-password (or (plist-get (nth 0 auth-info) :secret) ""))
(user-password (if (functionp user-password)
(funcall user-password)
user-password))

View file

@ -575,6 +575,7 @@ If ANY-SYMBOL is non-nil, don't insist the symbol be bound."
(with-syntax-table emacs-lisp-mode-syntax-table
(or (condition-case ()
(save-excursion
(skip-chars-forward "'")
(or (not (zerop (skip-syntax-backward "_w")))
(eq (char-syntax (following-char)) ?w)
(eq (char-syntax (following-char)) ?_)

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