From: Richard Stallman Date: Sun, 5 Apr 2015 12:36:56 +0000 (-0400) Subject: * mail/rmail.el (rmail-show-message-1): When displaying a mime message, X-Git-Tag: emacs-25.0.90~2564 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/4e23cd0ccde4ad1e14fe2870ccf140487af649b2?hp=dca743f0941909a80e3f28c023977120b6203e20 * mail/rmail.el (rmail-show-message-1): When displaying a mime message, indicate start and finish in the echo area. * mail/rmail.el (rmail-epa-decrypt): Disregard
 before armor.
       Ignore more kinds of whitespace in mime headers.
       Modify the decrypted mime part's mime type so it will be displayed
       by default when visiting this message again.

       * net/browse-url.el (browse-url-firefox-program): Prefer IceCat, doc.
       (browse-url-firefox-arguments)
       (browse-url-firefox-startup-arguments): Doc fix.
---

diff --git a/.gitattributes b/.gitattributes
index c568ba293d..c3bbf664ce 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -27,6 +27,9 @@ leim/MISC-DIC/pinyin.map -whitespace
 lib-src/update-game-score.exe.manifest -whitespace
 nt/nmake.defs -whitespace
 
+# The upstream maintainer does not want to remove trailing whitespace.
+doc/misc/texinfo.tex -whitespace=blank-at-eol
+
 # Some files should not be treated as text when diffing or merging.
 *.gpg binary
 *.gz binary
diff --git a/CONTRIBUTE b/CONTRIBUTE
index 5cf015fe11..005ca17a4e 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -37,16 +37,17 @@ specify the actual author; the committer defaults to you.
 When using git, commit messages should use ChangeLog format, with the
 following modifications:
 
-- Add a single short line explaining the change, then an empty line,
-  then unindented ChangeLog entries.
+- Start with a single unindented summary line explaining the change,
+  then an empty line, then unindented ChangeLog entries.
 
   You can use various Emacs functions to ease this process; see (info
   "(emacs)Change Log Commands") or
   http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html.
 
-- The summary line is limited to 72 characters (enforced by a commit
-  hook). If you have trouble making that a good summary, add a
-  paragraph below it, before the individual file descriptions.
+- Limit lines in commit messages to 78 characters, unless they consist
+  of a single word of at most 140 characters.  If you have trouble
+  fitting the summary into 78 characters, add a summarizing paragraph
+  below the empty line and before the individual file descriptions.
 
 - If only a single file is changed, the summary line can be the normal
   file first line (starting with the asterisk).  Then there is no
@@ -57,6 +58,11 @@ following modifications:
   the rationale for a change; that can be done in the commit message
   between the summary line and the file entries.
 
+- Commit messages should contain only printable UTF-8 characters.
+
+- Commit messages should not contain the "Signed-off-by:" lines that
+  are used in some other projects.
+
 ** ChangeLog notes
 
 - Emacs generally follows the GNU coding standards when it comes to
@@ -187,6 +193,26 @@ know it does not, mark the NEWS entry with "---".  If you know
 that *all* the necessary documentation updates have been made, mark
 the entry with "+++". Otherwise do not mark it.
 
+Please see (info "(elisp)Documentation Tips") or
+https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html
+for more specific tips on Emacs's doc style.  Use `checkdoc' to check
+for documentation errors before submitting a patch.
+
+** Test your changes.
+
+Please test your changes before committing them or sending them to the
+list.
+
+Emacs uses ERT, Emacs Lisp Regression Testing, for testing.  See (info
+"(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/
+for more information on writing and running tests.
+
+To run tests on the entire Emacs tree, run "make check" from the
+top-level directory.  Most tests are in the directory
+"test/automated".  From the "test/automated" directory, run "make
+" to run the tests for .el(c).  See
+"test/automated/Makefile" for more information.
+
 ** Understanding Emacs Internals.
 
 The best way to understand Emacs Internals is to read the code,
diff --git a/ChangeLog b/ChangeLog
index 7c2e53eb49..7746605c4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,125 @@
-2015-02-01  Joakim Verona  
-	Support for the new Xwidget feature.
-	* configure.ac:
+2015-04-03  Paul Eggert  
+
+	Port 'configure' to clang 3.5
+	* configure.ac: Add -Wno-unknown-attributes if clang; otherwise
+	clang 3.5.0 (Fedora 21 x86-64) complains
+	"/usr/include/glib-2.0/glib/gmem.h: ... warning: unknown attribute
+	'__alloc_size__' ignored".  Use -Werror when checking for -nopie;
+	otherwise clang warns about -nopie instead of failing, and then
+	later it warns everytime the build uses -nopie.
+
+2015-04-03  Ulrich Müller  
+
+	* configure.ac (LD_SWITCH_SYSTEM_TEMACS): Add -nopie option if it
+	is supported, in order to avoid segfaults in temacs.  (Bug#18784)
+
+2015-03-27  Pete Williamson    (tiny change)
+
+	Add NaCl target
+	* configure.ac: Add a target for Chromium Native Client (NaCl).
+
+2015-03-29  Eli Zaretskii  
+
+	* build-aux/dir_top (File): Fix the description of selecting a
+	menu item by its number.  (Bug#20213)
+
+2015-03-29  Paul Eggert  
+
+	Fix 'commit-msg' to cite 'CONTRIBUTE'
+	As suggested in:
+	http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00947.html
+	Also, have the two files match better.
+	* CONTRIBUTE: Match what's in build-aux/git-hooks/commit-msg.
+	* build-aux/git-hooks/commit-msg: Mention 'CONTRIBUTE'.
+
+2015-03-23  Andreas Schwab  
+
+	* configure.ac: Fix jpeg version check to work with gcc >= 5.
+
+2015-03-21  Samer Masterson  
+
+	* CONTRIBUTE (Test your changes.): New section.
+	(Document your changes.): Add doc tips.
+
+2015-03-19  Paul Eggert  
+
+	Better port of pthread usage to FreeBSD
+	* configure.ac (ac_func_list): Omit pthread_sigmask, since
+	we check for that ourselves rather than relying on gnulib.
+	(HAVE_PTHREAD, LIB_PTHREAD): Port better to FreeBSD,
+	by also checking for pthread_create, pthread_self, pthread_sigmask.
+	Tighten the test for pthread_atfork while we're at it.
+	Fixes: bug#20136
+
+	Merge from gnulib
+	This incorporates:
+	2015-03-19 fdopendir: port better to MinGW
+	2015-03-18 fdopendir: fix typo in comment
+	2015-02-24 glob, etc.: port to MSVC v18 on MS-Windows 8.1
+	* lib/dirent.in.h, lib/fdopendir.c: Update from gnulib.
+	* lib/dirfd.c, m4/dirfd.m4: New files from gnulib.
+	* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
+
+2015-03-02  Robert Pluim    (tiny change)
+
+	* configure.ac: Error out if with-file-notification=w32 is
+	specified on Cygwin.  (Bug#19909)
+
+2015-02-27  Paul Eggert  
+
+	Don't require GNU putenv
+	* configure.ac: Use system putenv even if it lacks GNU features, as
+	we don't need them.  This works around a bug in FreeBSD 10.1 getenv.
+	Fixes: bug#19874
+
+2015-02-25  Paul Eggert  
+
+	Merge from gnulib
+	* lib/getdtablesize.c, m4/dup2.m4, m4/fcntl.m4:
+	Update from gnulib, incorporating:
+	2015-02-23 dup2: doc and test for Android bug
+	2015-02-23 Replace dup2() on Android
+	2015-02-22 Android doesn't define RLIM_SAVED_*
+
+2015-02-21  Paul Eggert  
+
+	Merge from gnulib
+	* lib/getdtablesize.c, lib/getopt.c, lib/signal.in.h, lib/tempname.c:
+	* lib/tempname.h, m4/dup2.m4, m4/fcntl.m4, m4/getdtablesize.m4:
+	Update from gnulib, incorporating:
+	2015-02-20 getdtablesize: port better for Android
+	2015-02-19 fcntl: Fix cross compiling
+	2015-02-18 dup2, fcntl: cross-compile better for Android
+	2015-02-18 getopt: don't crash on memory exhaustion
+	2015-02-17 tempname: allow compilation with C++ (trivial)
+	2015-02-17 dup2, fcntl: port to AIX
+	2015-02-16 getdtablesize, dup2, fcntl: port to Android
+	2015-02-11 getdtablesize, signal_h: Fix Android build
+	2015-02-11 maint: various whitespace cleanups in tempname
+
+2015-02-13  Jan Djärv  
+
+	* configure.ac: Set locallisppath to empty for NS self contained,
+	unless --enable-loadllisppath was given (Bug#19850).
+
+2015-02-09  Paul Eggert  
+
+	* configure.ac (HAVE_LIBXML2): Add missing comma.
+
+2015-02-08  Paul Eggert  
+
+	Port to platforms lacking test -a and -o
+	* configure.ac (HAVE_LIBXML2):
+	Prefer '&&' and '||' to 'test -a' and 'test -o'.
+
+2015-02-08  Ulrich Müller  
+
+	* configure.ac (--with-gameuser): Default to 'games' group instead
+	of 'games' user.
+
+2015-02-04  Paul Eggert  
+
+	* .gitattributes: Ignore blanks at EOL in texinfo.tex.
 
 2015-01-28  Paul Eggert  
 
@@ -337,7 +456,7 @@
 
 2014-11-25  Glenn Morris  
 
-	* configure.ac: Fix yesterday's use of uninitialised $version.
+	* configure.ac: Fix yesterday's use of uninitialized $version.
 
 2014-11-25  Oscar Fuentes  
 
diff --git a/README.xwidget b/README.xwidget
deleted file mode 100644
index cfde411082..0000000000
--- a/README.xwidget
+++ /dev/null
@@ -1,2 +0,0 @@
--*-org-*-
-Please see https://github.com/jave/xwidget-aux for documentation.
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES
index 18423c2342..796b57db3d 100644
--- a/admin/CPP-DEFINES
+++ b/admin/CPP-DEFINES
@@ -85,7 +85,6 @@ AMPERSAND_FULL_NAME
 BROKEN_DATAGRAM_SOCKETS
 BROKEN_FIONREAD
 BROKEN_GET_CURRENT_DIR_NAME
-BROKEN_NON_BLOCKING_CONNECT
 BROKEN_PTY_READ_AFTER_EAGAIN
 DEFAULT_SOUND_DEVICE
 DEVICE_SEP
diff --git a/admin/ChangeLog b/admin/ChangeLog
index ec50056986..d3fabd4c81 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,16 @@
+2015-03-31  Glenn Morris  
+
+	* update_autogen (commit): Switch prefix from "# " to "; ".
+
+2015-03-03  Kelvin White  
+
+	* MAINTAINERS: Add myself to section 2.
+
+2015-03-03  Glenn Morris  
+
+	* admin.el (manual-meta-string): Use bug-gnu-emacs@gnu email address
+	rather than webmasters@gnu.
+
 2015-01-28  Glenn Morris  
 
 	* update_autogen (commit): Prepend "# " to commit message.
diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index 57f199b27c..61c70c1e82 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -78,6 +78,11 @@ Bastien Guerry
 2.
 ==============================================================================
 
+Kelvin White
+       ERC
+           lisp/erc/*
+           doc/misc/erc.texi
+
 Eli Zaretskii
     	doc/*
 	lispref/*
diff --git a/admin/admin.el b/admin/admin.el
index 18ea4a40cc..9bf503ef14 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -248,7 +248,7 @@ Optional argument TYPE is type of output (nil means all)."
 
 (defconst manual-meta-string
   "
-
+
 
 
 \n\n")
diff --git a/admin/authors.el b/admin/authors.el
index afab6f0e1e..1e4af9bbac 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -86,6 +86,7 @@ files.")
     ("Jens-Ulrik Holger Petersen" "Jens-Ulrik Petersen")
     ("Jeremy Bertram Maitin-Shepard" "Jeremy Maitin-Shepard")
     ("Johan Bockgård" "Johan Bockgard")
+    ("John F. Carr" "John F Carr")
     ("John J Foerch" "John Foerch")
     ("John W. Eaton" "John Eaton")
     ("Jonathan I. Kamens" "Jonathan Kamens")
@@ -243,6 +244,7 @@ If REALNAME is nil, ignore that author.")
   '(".*loaddefs.el$"			; not obsolete, but auto-generated
     "\\.\\(bzr\\|cvs\\|git\\)ignore$"		; obsolete or uninteresting
     "\\.arch-inventory$"
+    "ChangeLog\\(\\.[0-9]+\\)?\\'"
     "automated/data/"		   ; not interesting
     ;; TODO lib/? Matches other things?
     "build-aux/" "m4/" "Emacs.xcodeproj" "mapfiles" "\\.map\\'"
@@ -357,6 +359,7 @@ Changes to files matching one of the regexps in this list are not listed.")
     "All" "Version" "Everywhere" "Many" "Various" "files"
     ;; Directories.
     "vms" "mac" "url" "tree-widget"
+    "info/dir"
     )
   "List of files and directories to ignore.
 Changes to files in this list are not listed.")
@@ -796,6 +799,7 @@ in the repository.")
     ("play/bruce.el" . "bruce.el")
     ("play/yow.el" . "yow.el")
     ("patcomp.el" . "patcomp.el")
+    ("emulation/ws-mode.el" . "ws-mode.el")
     ;; From lisp to etc/forms.
     ("forms-d2.el" . "forms-d2.el")
     ("forms-pass.el" . "forms-pass.el")
diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt
index 8f8b031ba2..e902b023f8 100644
--- a/admin/make-tarball.txt
+++ b/admin/make-tarball.txt
@@ -52,9 +52,11 @@ General steps (for each step, check for possible errors):
     number to that of the actual release.  Pick a date about a week
     from now when you intend to make the release.  Use M-x add-release-logs
     to add the ChangeLog entries for that date to the tar file (but
-    not yet to the repository).  Name the tar file as
-    emacs-XX.Y-rc1.tar.  If all goes well in the following week, you
-    can simply rename the file and use it for the actual release.
+    do not commit the entries to the repository until the actual release).
+    Name the tar file as emacs-XX.Y-rc1.tar.  If all goes well in the
+    following week, you can simply rename the file and use it for the
+    actual release.  If you need another release candidate, remember
+    to adjust the ChangeLog entries.
 
 4.   autoreconf -i -I m4 --force
      make bootstrap
diff --git a/admin/notes/repo b/admin/notes/repo
index 2d4cc2a55c..4f9dc59eb0 100644
--- a/admin/notes/repo
+++ b/admin/notes/repo
@@ -7,6 +7,27 @@ package archive (elpa.gnu.org).  See admin/notes/elpa for further
 explanation, and the README file in the branch for usage
 instructions.
 
+* Install changes only on one branch, let them get merged elsewhere if needed.
+
+In particular, install bug-fixes only on the release branch (if there
+is one) and let them get synced to the trunk; do not install them by
+hand on the trunk as well.  E.g. if there is an active "emacs-24" branch
+and you have a bug-fix appropriate for the next emacs-24.x release,
+install it only on the emacs-24 branch, not on the trunk as well.
+
+Installing things manually into more than one branch makes merges more
+difficult.
+
+http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01124.html
+
+The exception is, if you know that the change will be difficult to
+merge to the trunk (eg because the trunk code has changed a lot).
+In that case, it's helpful if you can apply the change to both trunk
+and branch yourself (when committing the branch change, indicate
+in the commit log that it should not be merged to the trunk, by
+including the phrase "Not to be merged to master", or any other phrase
+that matches "merge").
+
 * Installing changes from your personal branches.
 
 If your branch has only a single commit, or many different real
diff --git a/admin/update_autogen b/admin/update_autogen
index 73e8aebe3d..1bd82967c2 100755
--- a/admin/update_autogen
+++ b/admin/update_autogen
@@ -228,7 +228,7 @@ commit ()
 
     echo "Committing..."
 
-    $vcs commit -m "# Auto-commit of $type files." "$@" || return $?
+    $vcs commit -m "; Auto-commit of $type files." "$@" || return $?
 
     [ "$vcs" = "git" ] && {
         $vcs push || return $?
diff --git a/build-aux/dir_top b/build-aux/dir_top
index 321a39dc35..928da0415e 100644
--- a/build-aux/dir_top
+++ b/build-aux/dir_top
@@ -15,6 +15,7 @@ The Info Directory
   In Emacs Info, you can click mouse button 2 on a menu item
   or cross reference to follow it to its target.
   Each menu line that starts with a * is a topic you can select with "m".
+  You can also select a topic by typing its ordinal number.
   Every third topic has a red * to help pick the right number to type.
 
 * Menu:
diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg
index 31df5ce034..13a05351de 100755
--- a/build-aux/git-hooks/commit-msg
+++ b/build-aux/git-hooks/commit-msg
@@ -63,7 +63,7 @@ exec $awk '
   /^#/ { next }
 
   !/^.*$/ {
-    print "Invalid character (not UTF-8) in commit message"
+    print "Invalid character (not UTF-8) in commit message; see 'CONTRIBUTE'"
     status = 1
   }
 
@@ -77,13 +77,13 @@ exec $awk '
       sub(/^squash! /, "")
 
     if ($0 ~ "^" space) {
-      print "White space at start of commit message'\''s first line"
+      print "White space at start of commit message'\''s first line; see 'CONTRIBUTE'"
       status = 1
     }
   }
 
   nlines == 2 && $0 ~ non_space {
-    print "Nonempty second line in commit message"
+    print "Nonempty second line in commit message; see 'CONTRIBUTE'"
     status = 1
   }
 
@@ -97,28 +97,28 @@ exec $awk '
   }
 
   78 < length && $0 ~ space {
-    print "Line longer than 78 characters in commit message"
+    print "Line longer than 78 characters in commit message; see 'CONTRIBUTE'"
     status = 1
   }
 
   140 < length {
-    print "Word longer than 140 characters in commit message"
+    print "Word longer than 140 characters in commit message; see 'CONTRIBUTE'"
     status = 1
   }
 
   /^Signed-off-by: / {
-    print "'\''Signed-off-by:'\'' in commit message"
+    print "'\''Signed-off-by:'\'' in commit message; see 'CONTRIBUTE'"
     status = 1
   }
 
   $0 ~ non_print {
-    print "Unprintable character in commit message"
+    print "Unprintable character in commit message; see 'CONTRIBUTE'"
     status = 1
   }
 
   END {
     if (nlines == 0) {
-      print "Empty commit message"
+      print "Empty commit message; see 'CONTRIBUTE'"
       status = 1
     }
     exit status
diff --git a/configure.ac b/configure.ac
index a679bd0a24..d6925309d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -374,8 +374,6 @@ otherwise for the first of `gfile' or `inotify' that is usable.])
  ],
  [with_file_notification=$with_features])
 
-OPTION_DEFAULT_OFF([xwidgets],[enable use of some gtk widgets in Emacs buffers])
-
 ## For the times when you want to build Emacs but don't have
 ## a suitable makeinfo, and can live without the manuals.
 dnl http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01844.html
@@ -399,17 +397,12 @@ AC_ARG_WITH(gameuser,dnl
 		An argument prefixed by ':' specifies a group instead.])])
 gameuser=
 gamegroup=
+# We don't test if we can actually chown/chgrp here, because configure
+# may run without root privileges.  lib-src/Makefile.in will handle
+# any errors due to missing user/group gracefully.
 case ${with_gameuser} in
   no) ;;
-  "" | yes)
-    AC_MSG_CHECKING([whether a 'games' user exists])
-    if id -u games >/dev/null 2>&1; then
-      AC_MSG_RESULT([yes])
-      gameuser=games
-    else
-      AC_MSG_RESULT([no])
-    fi
-    ;;
+  "" | yes) gamegroup=games ;;
   :*) gamegroup=`echo "${with_gameuser}" | sed -e "s/://"` ;;
   *) gameuser=${with_gameuser} ;;
 esac
@@ -430,6 +423,7 @@ AC_ARG_ENABLE(ns-self-contained,
    EN_NS_SELF_CONTAINED=$enableval,
    EN_NS_SELF_CONTAINED=yes)
 
+locallisppathset=no
 AC_ARG_ENABLE(locallisppath,
 [AS_HELP_STRING([--enable-locallisppath=PATH],
                 [directories Emacs should search for lisp files specific
@@ -437,7 +431,7 @@ AC_ARG_ENABLE(locallisppath,
 if test "${enableval}" = "no"; then
   locallisppath=
 elif test "${enableval}" != "yes"; then
-  locallisppath=${enableval}
+  locallisppath=${enableval} locallisppathset=yes
 fi)
 
 AC_ARG_ENABLE(checking,
@@ -618,6 +612,11 @@ case "${canonical}" in
 ##    fi
   ;;
 
+  ## Chromium Native Client
+  *-nacl )
+    opsys=nacl
+  ;;
+
   ## Cygwin ports
   *-*-cygwin )
     opsys=cygwin
@@ -786,6 +785,17 @@ AC_DEFUN([gl_CRYPTO_CHECK])
 # Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
 # as we don't use them.
 AC_DEFUN([gl_FCNTL_O_FLAGS])
+# Avoid gnulib's test for pthread_sigmask.
+funcs=
+for func in $ac_func_list; do
+  test $func = pthread_sigmask || AS_VAR_APPEND([funcs], [" $func"])
+done
+ac_func_list=$funcs
+# Use the system putenv even if it lacks GNU features, as we don't need them,
+# and the gnulib replacement runs afoul of a FreeBSD 10.1 bug; see Bug#19874.
+AC_CHECK_FUNCS_ONCE([putenv])
+AC_DEFUN([gl_FUNC_PUTENV],
+  [test "$ac_cv_func_putenv" = yes || REPLACE_PUTENV=1])
 
 # Initialize gnulib right after choosing the compiler.
 dnl Amongst other things, this sets AR and ARFLAGS.
@@ -873,6 +883,7 @@ if test "$gl_gcc_warnings" != yes; then
      gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare])
      gl_WARN_ADD([-Wno-pointer-sign])
      gl_WARN_ADD([-Wno-string-plus-int])
+     gl_WARN_ADD([-Wno-unknown-attributes])
   fi
 else
   isystem='-isystem '
@@ -1258,7 +1269,7 @@ dnl The function dump-emacs will not be defined and temacs will do
 dnl (load "loadup") automatically unless told otherwise.
 test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
 case "$opsys" in
-  your-opsys-here) CANNOT_DUMP=yes ;;
+  nacl) CANNOT_DUMP=yes ;;
 esac
 
 if test "$CANNOT_DUMP" = "yes"; then
@@ -1878,6 +1889,7 @@ if test "${HAVE_NS}" = yes; then
      infodir="\${ns_appresdir}/info"
      mandir="\${ns_appresdir}/man"
      lispdir="\${ns_appresdir}/lisp"
+     test "$locallisppathset" = no && locallisppath=""
      INSTALL_ARCH_INDEP_EXTRA=
   fi
 
@@ -2098,7 +2110,7 @@ hybrid_malloc=
 
 case "$opsys" in
   ## darwin ld insists on the use of malloc routines in the System framework.
-  darwin|mingw32|sol2-10) system_malloc=yes ;;
+  darwin | mingw32 | nacl | sol2-10) system_malloc=yes ;;
   cygwin) hybrid_malloc=yes;;
 esac
 
@@ -2179,39 +2191,62 @@ AC_CHECK_LIB(Xbsd, main, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
 
 dnl Check for the POSIX thread library.
 LIB_PTHREAD=
-if test "$opsys" != "mingw32"; then
 AC_CHECK_HEADERS_ONCE(pthread.h)
-if test "$ac_cv_header_pthread_h"; then
-  dnl gmalloc.c uses pthread_atfork, which is not available on older-style
-  dnl hosts such as MirBSD 10, so test for pthread_atfork instead of merely
-  dnl testing for pthread_kill if Emacs uses gmalloc.c.
-  if test "$GMALLOC_OBJ" = gmalloc.o; then
-    emacs_pthread_function=pthread_atfork
-  else
-    emacs_pthread_function=pthread_kill
-  fi
-  OLD_LIBS=$LIBS
-  AC_SEARCH_LIBS([$emacs_pthread_function], [pthread],
-    [AC_DEFINE([HAVE_PTHREAD], [1],
-       [Define to 1 if you have pthread (-lpthread).])
-     # Some systems optimize for single-threaded programs by default, and
-     # need special flags to disable these optimizations. For example, the
-     # definition of 'errno' in .
-     case $opsys in
-       sol*)
-         AC_DEFINE([_REENTRANT], 1,
-   	[Define to 1 if your system requires this in multithreaded code.]);;
-       aix4-2)
-         AC_DEFINE([_THREAD_SAFE], 1,
-   	[Define to 1 if your system requires this in multithreaded code.]);;
-     esac])
- if test "X$LIBS" != "X$OLD_LIBS"; then
-    eval LIB_PTHREAD=\$ac_cv_search_$emacs_pthread_function
+if test "$ac_cv_header_pthread_h" && test "$opsys" != "mingw32"; then
+  AC_CACHE_CHECK([for pthread library],
+    [emacs_cv_pthread_lib],
+    [emacs_cv_pthread_lib=no
+     OLD_CPPFLAGS=$CPPFLAGS
+     OLD_LIBS=$LIBS
+     for emacs_pthread_lib in 'none needed' -lpthread; do
+       case $emacs_pthread_lib in
+	 -*) LIBS="$OLD_LIBS $emacs_pthread_lib";;
+       esac
+       AC_LINK_IFELSE(
+	 [AC_LANG_PROGRAM(
+	    [[#include 
+	      #include 
+	      sigset_t old_mask, new_mask;
+	      void noop (void) {}]],
+	    [[pthread_t th = pthread_self ();
+	      int status = 0;
+	      status += pthread_create (&th, 0, 0, 0);
+	      status += pthread_sigmask (SIG_BLOCK, &new_mask, &old_mask);
+	      status += pthread_kill (th, 0);
+	      #if ! (defined SYSTEM_MALLOC || defined HYBRID_MALLOC \
+		     || defined DOUG_LEA_MALLOC)
+	      /* Test for pthread_atfork only if gmalloc uses it,
+		 as older-style hosts like MirBSD 10 lack it.  */
+	      status += pthread_atfork (noop, noop, noop);
+	      #endif
+	      return status;]])],
+	 [emacs_cv_pthread_lib=$emacs_pthread_lib])
+       LIBS=$OLD_LIBS
+       if test "$emacs_cv_pthread_lib" != no; then
+	 break
+       fi
+     done
+     CPPFLAGS=$OLD_CPPFLAGS])
+  if test "$emacs_cv_pthread_lib" != no; then
+    AC_DEFINE([HAVE_PTHREAD], 1, [Define to 1 if you have POSIX threads.])
+    case $emacs_cv_pthread_lib in
+      -*) LIB_PTHREAD=$emacs_cv_pthread_lib;;
+    esac
+    ac_cv_func_pthread_sigmask=yes
+    # Some systems optimize for single-threaded programs by default, and
+    # need special flags to disable these optimizations. For example, the
+    # definition of 'errno' in .
+    case $opsys in
+      hpux* | sol*)
+	AC_DEFINE([_REENTRANT], 1,
+	  [Define to 1 if your system requires this in multithreaded code.]);;
+      aix4-2)
+	AC_DEFINE([_THREAD_SAFE], 1,
+	  [Define to 1 if your system requires this in multithreaded code.]);;
+    esac
   fi
-  LIBS=$OLD_LIBS
 fi
 AC_SUBST([LIB_PTHREAD])
-fi
 
 dnl Check for need for bigtoc support on IBM AIX
 
@@ -2529,41 +2564,6 @@ if test "${HAVE_GTK}" = "yes"; then
  term_header=gtkutil.h
 fi
 
-
-HAVE_XWIDGETS=no
-HAVE_WEBKIT=no
-HAVE_GIR=no
-
-if test "${with_xwidgets}" != "no" && test "${USE_GTK_TOOLKIT}" = "GTK3"  && test "$window_system" != "none" ; then
-   echo "xwidgets enabled, checking webkit, and others"
-   HAVE_XWIDGETS=yes
-   AC_DEFINE(HAVE_XWIDGETS, 1, [Define to 1 if you have xwidgets support.])
-dnl xwidgets
-dnl - enable only if GTK3 is enabled, and we have a window system
-dnl - check for webkit and gobject introspection
-
-
-#webkit version for gtk3.
-  WEBKIT_REQUIRED=1.4.0
-  WEBKIT_MODULES="webkitgtk-3.0 >= $WEBKIT_REQUIRED"
-
-  if test "${with_gtk3}" = "yes"; then
-    PKG_CHECK_MODULES(WEBKIT, $WEBKIT_MODULES, HAVE_WEBKIT=yes, HAVE_WEBKIT=no)
-    if test $HAVE_WEBKIT = yes; then
-        AC_DEFINE(HAVE_WEBKIT_OSR, 1, [Define to 1 if you have webkit_osr support.])
-    fi
-  fi
-
-  GIR_REQUIRED=1.32.1
-  GIR_MODULES="gobject-introspection-1.0 >= $GIR_REQUIRED"
-  PKG_CHECK_MODULES(GIR, $GIR_MODULES, HAVE_GIR=yes, HAVE_GIR=no)
-  if test $HAVE_GIR = yes; then
-     AC_DEFINE(HAVE_GIR, 1, [Define to 1 if you have GIR support.])
-  fi
-
-
-fi
-
 CFLAGS=$OLD_CFLAGS
 LIBS=$OLD_LIBS
 
@@ -2699,6 +2699,11 @@ fi
 
 dnl MS Windows native file monitor is available for mingw32 only.
 case $with_file_notification,$opsys in
+  w32,cygwin)
+    AC_MSG_ERROR([`--with-file-notification=w32' was specified, but
+    this is only supported on MS-Windows native and MinGW32 builds.
+    Consider using gfile instead.])
+    ;;
   w32,* | yes,mingw32)
     AC_CHECK_HEADER(windows.h)
     if test "$ac_cv_header_windows_h" = yes ; then
@@ -3198,10 +3203,12 @@ if test "${opsys}" = "mingw32"; then
   AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
   if test "${HAVE_JPEG}" = "yes"; then
     AC_DEFINE(HAVE_JPEG)
-    AC_EGREP_CPP([version= *(6[2-9]|[7-9][0-9])],
-        [#include 
-	 version=JPEG_LIB_VERSION
-],
+    AC_EGREP_CPP([version 6b or later],
+	[#include 
+	 #if JPEG_LIB_VERSION >= 62
+	 version 6b or later
+	 #endif
+	],
         [AC_DEFINE(HAVE_JPEG)],
         [AC_MSG_WARN([libjpeg found, but not version 6b or later])
         HAVE_JPEG=no])
@@ -3217,10 +3224,12 @@ elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
   AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
   if test "${HAVE_JPEG}" = "yes"; then
     AC_DEFINE(HAVE_JPEG)
-    AC_EGREP_CPP([version= *(6[2-9]|[7-9][0-9])],
+    AC_EGREP_CPP([version 6b or later],
 	[#include 
-	 version=JPEG_LIB_VERSION
-],
+	 #if JPEG_LIB_VERSION >= 62
+	 version 6b or later
+	 #endif
+	],
 	[AC_DEFINE(HAVE_JPEG)],
 	[AC_MSG_WARN([libjpeg found, but not version 6b or later])
 	HAVE_JPEG=no])
@@ -3533,7 +3542,7 @@ if test "${with_xml2}" != "no"; then
   ### I'm not sure what the version number should be, so I just guessed.
   EMACS_CHECK_MODULES([LIBXML2], [libxml-2.0 > 2.6.17])
   # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
-  if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
+  if test "${HAVE_LIBXML2}" != "yes" && test "$opsys" = "darwin"; then
     SAVE_CPPFLAGS="$CPPFLAGS"
     CPPFLAGS="$CPPFLAGS -I$xcsdkdir/usr/include/libxml2"
     AC_CHECK_HEADER(libxml/HTMLparser.h,
@@ -3547,7 +3556,7 @@ if test "${with_xml2}" != "no"; then
   fi
   if test "${HAVE_LIBXML2}" = "yes"; then
     if test "${opsys}" != "mingw32"; then
-      AC_CHECK_LIB(xml2, htmlReadMemory, HAVE_LIBXML2=yes, HAVE_LIBXML2=no
+      AC_CHECK_LIB(xml2, htmlReadMemory, HAVE_LIBXML2=yes, HAVE_LIBXML2=no,
         [$LIBXML2_LIBS])
     else
       LIBXML2_LIBS=""
@@ -4183,7 +4192,7 @@ emacs_broken_SIGIO=no
 case $opsys in
   dnl SIGIO exists, but the feature doesn't work in the way Emacs needs.
   dnl See eg .
-  hpux* | irix6-5 | openbsd | sol2* | unixware )
+  hpux* | irix6-5 | nacl | openbsd | sol2* | unixware )
     emacs_broken_SIGIO=yes
     ;;
 
@@ -4345,7 +4354,7 @@ case $opsys in
     AC_DEFINE(FIRST_PTY_LETTER, ['p'])
     ;;
 
-  gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
+  gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd | nacl )
     dnl if HAVE_GRANTPT
     if test "x$ac_cv_func_grantpt" = xyes; then
       AC_DEFINE(UNIX98_PTYS, 1, [Define if the system has Unix98 PTYs.])
@@ -4550,10 +4559,10 @@ if test $emacs_cv_func_sigsetjmp = yes; then
 fi
 
 # We need all of these features to handle C stack overflows.
-if test "$ac_cv_header_sys_resource_h" = "yes" -a \
-	"$ac_cv_func_getrlimit" = "yes" -a \
-	"$emacs_cv_func_sigsetjmp" = "yes" -a \
-	"$emacs_cv_alternate_stack" = yes; then
+if test "$ac_cv_header_sys_resource_h" = "yes" &&
+   test "$ac_cv_func_getrlimit" = "yes" &&
+   test "$emacs_cv_func_sigsetjmp" = "yes" &&
+   test "$emacs_cv_alternate_stack" = yes; then
   AC_DEFINE([HAVE_STACK_OVERFLOW_HANDLING], 1,
     [Define to 1 if C stack overflow can be handled in some cases.])
 fi
@@ -4644,7 +4653,7 @@ esac
 
 AC_CACHE_CHECK([for usable FIONREAD], [emacs_cv_usable_FIONREAD],
   [case $opsys in
-     aix4-2)
+     aix4-2 | nacl)
        dnl BUILD 9008 - FIONREAD problem still exists in X-Windows.
        emacs_cv_usable_FIONREAD=no
        ;;
@@ -4843,7 +4852,7 @@ TOOLKIT_LIBW=
 case "$USE_X_TOOLKIT" in
   MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
   LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
-  none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS -lXcomposite" ;;
+  none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
 esac
 AC_SUBST(TOOLKIT_LIBW)
 
@@ -5019,11 +5028,29 @@ case "$opsys" in
    esac
    ;;
 
-  openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
-
   *) LD_SWITCH_SYSTEM_TEMACS= ;;
 esac
 
+# -nopie fixes a temacs segfault on Gentoo, OpenBSD, and other systems
+# with "hardened" GCC configurations for some reason (Bug#18784).
+# We don't know why -nopie works, but not segfaulting is better than
+# segfaulting.  Use -Werror when trying -nopie, otherwise clang keeps
+# warning that it does not understand -nopie.
+AC_CACHE_CHECK([whether $CC accepts -nopie],
+  [emacs_cv_prog_cc_nopie],
+  [emacs_save_CFLAGS=$CFLAGS
+   emacs_save_LDFLAGS=$LDFLAGS
+   CFLAGS="$CFLAGS -Werror"
+   LDFLAGS="$LDFLAGS -nopie"
+   AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+     [emacs_cv_prog_cc_nopie=yes],
+     [emacs_cv_prog_cc_nopie=no])
+   CFLAGS=$emacs_save_CFLAGS
+   LDFLAGS=$emacs_save_LDFLAGS])
+if test "$emacs_cv_prog_cc_nopie" = yes; then
+  LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -nopie"
+fi
+
 if test x$ac_enable_profiling != x ; then
   case $opsys in
     *freebsd | gnu-linux) ;;
@@ -5164,10 +5191,6 @@ echo "  Does Emacs use -lxft?                                   ${HAVE_XFT}"
 echo "  Does Emacs directly use zlib?                           ${HAVE_ZLIB}"
 
 echo "  Does Emacs use toolkit scroll bars?                     ${USE_TOOLKIT_SCROLL_BARS}"
-
-echo "  Does Emacs support Xwidgets?                            ${HAVE_XWIDGETS}"
-echo "       Does xwidgets support webkit(requires gtk3)?       ${HAVE_WEBKIT}"
-echo "       Does xwidgets support gobject introspection?       ${HAVE_GIR}"
 echo
 
 if test -n "${EMACSDATA}"; then
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 1287733b12..469fdc39ce 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,43 @@
+2015-03-29  Dani Moncayo  
+
+	* files.texi (Diff Mode): Doc fix.
+
+2015-03-18  Eli Zaretskii  
+
+	* misc.texi (Term Mode):
+	* programs.texi (Basic Indent, Custom C Indent):
+	* mini.texi (Minibuffer History):
+	* text.texi (Org Mode):
+	* display.texi (View Mode): Use @kbd where @key was mistakenly
+	used.  (Bug#20135)
+
+2015-03-18  Eli Zaretskii  
+
+	* basic.texi (Moving Point): Improve indexing for HOME and END.
+
+	* cmdargs.texi (General Variables): Improve indexing for
+	environment variables.
+
+	* msdog.texi (Windows HOME):
+	* msdog-xtra.texi (MS-DOS File Names): Remove markup from HOME in
+	the index entries.  (Bug#20105)
+
+2015-02-26  Eli Zaretskii  
+
+	* msdog.texi (Windows Files): Document characters invalid in
+	Windows file names.  (Bug#19463)
+
+	* custom.texi (Customization Groups): Update the looks of the
+	Customize Group buffer.
+
+	* programs.texi (Hungry Delete): Fix a typo: "C-d" instead of
+	"C-c C-d" in hungry-delete mode.
+
+2015-02-26  Eli Zaretskii  
+
+	* mule.texi (Language Environments): Work around refill bug in
+	makeinfo 4.x.  (Bug#19697)
+
 2015-01-28  Eli Zaretskii  
 
 	* cmdargs.texi (Action Arguments): Clarify into which buffer
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi
index f97964b6a6..151c3f1b84 100644
--- a/doc/emacs/ack.texi
+++ b/doc/emacs/ack.texi
@@ -204,7 +204,7 @@ for Korean Hanja.
 
 @item
 Andrew Choi and Yamamoto Mitsuharu wrote the Carbon support, used
-prior to Emacs 23 for Mac OS.  Yamamoto Mitsuharu continued to
+prior to Emacs 23 for Mac OS@.  Yamamoto Mitsuharu continued to
 contribute to Mac OS support in the newer Nextstep port; and also
 improved support for multi-monitor displays.
 
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 2594608e94..be45856a6d 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -206,14 +206,14 @@ preserves position within the line, like @kbd{C-n}.
 @item C-a
 @itemx @key{Home}
 @kindex C-a
-@kindex HOME
+@kindex HOME key
 @findex move-beginning-of-line
 Move to the beginning of the line (@code{move-beginning-of-line}).
 
 @item C-e
 @itemx @key{End}
 @kindex C-e
-@kindex END
+@kindex END key
 @findex move-end-of-line
 Move to the end of the line (@code{move-end-of-line}).
 
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index 88a122c828..25b13d660a 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -642,7 +642,7 @@ the directory names in reverse order, so that @file{/top/middle/file}
 becomes @samp{file\middle\top}, while @code{post-forward} puts them in
 forward order after the file name, as in @samp{file|top/middle}.  If
 @code{uniquify-buffer-name-style} is set to @code{nil}, the buffer
-names simply get @samp{<2>}, @samp{<3>}, etc. appended.
+names simply get @samp{<2>}, @samp{<3>}, etc.@: appended.
 
   Which rule to follow for putting the directory names in the buffer
 name is not very important if you are going to @emph{look} at the
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 42c8e33d5c..071cd68f90 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -442,22 +442,31 @@ special meanings in Emacs.  Most of these variables are also used by
 some other programs.  Emacs does not require any of these environment
 variables to be set, but it uses their values if they are set.
 
-@vtable @env
+@c This used to be @vtable, but that enters the variables alone into
+@c the Variable Index, which in some cases, like ``HOME'', might be
+@c confused with keys by that name, and other cases, like ``NAME'',
+@c might be confused with general-purpose phrases.
+@table @env
 @item CDPATH
+@vindex CDPATH, environment variable
 Used by the @code{cd} command to search for the directory you specify,
 when you specify a relative directory name.
 @item DBUS_SESSION_BUS_ADDRESS
+@vindex DBUS_SESSION_BUS_ADDRESS, environment variable
 Used by D-Bus when Emacs is compiled with it.  Usually, there is no
 need to change it.  Setting it to a dummy address, like
 @samp{unix:path=/dev/null}, suppresses connections to the D-Bus session
 bus as well as autolaunching the D-Bus session bus if not running yet.
 @item EMACSDATA
+@vindex EMACSDATA, environment variable
 Directory for the architecture-independent files that come with Emacs.
 This is used to initialize the variable @code{data-directory}.
 @item EMACSDOC
+#vindex EMACSDOC, environment variable
 Directory for the documentation string file, which is used to
 initialize the Lisp variable @code{doc-directory}.
 @item EMACSLOADPATH
+#vindex EMACSLOADPATH, environment variable
 A colon-separated list of directories@footnote{Here and below,
 whenever we say ``colon-separated list of directories'', it pertains
 to Unix and GNU/Linux systems.  On MS-DOS and MS-Windows, the
@@ -471,23 +480,28 @@ the default @code{load-path}.  To specify an empty element in the
 middle of the list, use 2 colons in a row, as in
 @samp{EMACSLOADPATH="/tmp::/foo"}.
 @item EMACSPATH
+@vindex EMACSPATH, environment variable
 A colon-separated list of directories to search for executable files.
 If set, Emacs uses this in addition to @env{PATH} (see below) when
 initializing the variable @code{exec-path} (@pxref{Shell}).
 @item EMAIL
+@vindex EMAIL, environment variable
 @vindex user-mail-address@r{, initialization}
 Your email address; used to initialize the Lisp variable
 @code{user-mail-address}, which the Emacs mail interface puts into the
 @samp{From} header of outgoing messages (@pxref{Mail Headers}).
 @item ESHELL
+@vindex ESHELL, environment variable
 Used for shell-mode to override the @env{SHELL} environment variable
 (@pxref{Interactive Shell}).
 @item HISTFILE
+@vindex HISTFILE, environment variable
 The name of the file that shell commands are saved in between logins.
 This variable defaults to @file{~/.bash_history} if you use Bash, to
 @file{~/.sh_history} if you use ksh, and to @file{~/.history}
 otherwise.
 @item HOME
+@vindex HOME, environment variable
 The location of your files in the directory tree; used for
 expansion of file names starting with a tilde (@file{~}).  On MS-DOS,
 it defaults to the directory from which Emacs was started, with
@@ -499,6 +513,7 @@ where @var{username} is your user name), though for backwards
 compatibility @file{C:/} will be used instead if a @file{.emacs} file
 is found there.
 @item HOSTNAME
+@vindex HOSTNAME, environment variable
 The name of the machine that Emacs is running on.
 @c complete.el is obsolete since 24.1.
 @ignore
@@ -507,15 +522,24 @@ A colon-separated list of directories.  Used by the @code{complete} package
 to search for files.
 @end ignore
 @item INFOPATH
+@vindex INFOPATH, environment variable
 A colon-separated list of directories in which to search for Info files.
 @item LC_ALL
+@vindex LC_ALL, environment variable
 @itemx LC_COLLATE
+@vindex LC_COLLATE, environment variable
 @itemx LC_CTYPE
+@vindex LC_CTYPE, environment variable
 @itemx LC_MESSAGES
+@vindex LC_MESSAGES, environment variable
 @itemx LC_MONETARY
+@vindex LC_MONETARY, environment variable
 @itemx LC_NUMERIC
+@vindex LC_NUMERIC, environment variable
 @itemx LC_TIME
+@vindex LC_TIME, environment variable
 @itemx LANG
+@vindex LANG, environment variable
 The user's preferred locale.  The locale has six categories, specified
 by the environment variables @env{LC_COLLATE} for sorting,
 @env{LC_CTYPE} for character encoding, @env{LC_MESSAGES} for system
@@ -537,73 +561,92 @@ matched against entries in @code{locale-language-names},
 @code{locale-preferred-coding-systems}, to select a default language
 environment and coding system.  @xref{Language Environments}.
 @item LOGNAME
+@vindex LOGNAME, environment variable
 The user's login name.  See also @env{USER}.
 @item MAIL
+@vindex MAIL, environment variable
 The name of your system mail inbox.
 @ifnottex
 @item MH
+@vindex MH, environment variable
 Name of setup file for the mh system.  @xref{Top,,MH-E,mh-e, The Emacs
 Interface to MH}.
 @end ifnottex
 @item NAME
+@vindex NAME, environment variable
 Your real-world name.  This is used to initialize the variable
 @code{user-full-name} (@pxref{Mail Headers}).
 @item NNTPSERVER
+@vindex NNTPSERVER, environment variable
 The name of the news server.  Used by the mh and Gnus packages.
 @item ORGANIZATION
+@vindex ORGANIZATION, environment variable
 The name of the organization to which you belong.  Used for setting the
 `Organization:' header in your posts from the Gnus package.
 @item PATH
+@vindex PATH, environment variable
 A colon-separated list of directories containing executable files.
 This is used to initialize the variable @code{exec-path}
 (@pxref{Shell}).
 @item PWD
+@vindex PWD, environment variable
 If set, this should be the default directory when Emacs was started.
 @item REPLYTO
+@vindex REPLYTO, environment variable
 If set, this specifies an initial value for the variable
 @code{mail-default-reply-to} (@pxref{Mail Headers}).
 @item SAVEDIR
+@vindex SAVEDIR, environment variable
 The name of a directory in which news articles are saved by default.
 Used by the Gnus package.
 @item SHELL
+@vindex SHELL, environment variable
 The name of an interpreter used to parse and execute programs run from
 inside Emacs.
 @item SMTPSERVER
+@vindex SMTPSERVER, environment variable
 The name of the outgoing mail server.  This is used to initialize the
 variable @code{smtpmail-smtp-server} (@pxref{Mail Sending}).
 @cindex background mode, on @command{xterm}
 @item TERM
+@vindex TERM, environment variable
 The type of the terminal that Emacs is using.  This variable must be
 set unless Emacs is run in batch mode.  On MS-DOS, it defaults to
 @samp{internal}, which specifies a built-in terminal emulation that
 handles the machine's own display.
 @item TERMCAP
+@vindex TERMCAP, environment variable
 The name of the termcap library file describing how to program the
 terminal specified by @env{TERM}.  This defaults to
 @file{/etc/termcap}.
 @item TMPDIR
+@vindex TMPDIR, environment variable
 @itemx TMP
+@vindex TMP, environment variable
 @itemx TEMP
+@vindex TEMP, environment variable
 These environment variables are used to initialize the variable
 @code{temporary-file-directory}, which specifies a directory in which
 to put temporary files (@pxref{Backup}).  Emacs tries to use
 @env{TMPDIR} first.  If that is unset, Emacs normally falls back on
 @file{/tmp}, but on MS-Windows and MS-DOS it instead falls back on
 @env{TMP}, then @env{TEMP}, and finally @file{c:/temp}.
-
 @item TZ
+@vindex TZ, environment variable
 This specifies the current time zone and possibly also daylight
 saving time information.  On MS-DOS, if @env{TZ} is not set in the
 environment when Emacs starts, Emacs defines a default value as
 appropriate for the country code returned by DOS@.  On MS-Windows, Emacs
 does not use @env{TZ} at all.
 @item USER
+@vindex USER, environment variable
 The user's login name.  See also @env{LOGNAME}.  On MS-DOS, this
 defaults to @samp{root}.
 @item VERSION_CONTROL
+@vindex VERSION_CONTROL, environment variable
 Used to initialize the @code{version-control} variable (@pxref{Backup
 Names}).
-@end vtable
+@end table
 
 @node Misc Variables
 @appendixsubsec Miscellaneous Variables
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 095e49be90..9fd823bbae 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -82,14 +82,12 @@ top-level @code{Emacs} group.  It looks like this, in part:
 @c @page
 @smallexample
 @group
-To apply changes, use the Save or Set buttons.
-For details, see [Saving Customizations] in the [Emacs manual].
+For help, see [Easy Customization] in the [Emacs manual].
 
 ________________________________________ [ Search ]
 
  Operate on all settings in this buffer:
- [ Set for current session ] [ Save for future sessions ]
- [ Undo edits ] [ Reset to saved ] [ Erase customizations ] [ Exit ]
+ [ Revert... ] [ Apply ] [ Apply and Save ]
 
 
 Emacs group: Customization of the One True Editor.
@@ -97,7 +95,6 @@ Emacs group: Customization of the One True Editor.
       See also [Manual].
 
 [Editing] : Basic text editing facilities.
-
 [Convenience] : Convenience features for faster editing.
 
 @var{more second-level groups}
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index ae723b8d68..53bea5218e 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -138,7 +138,7 @@ instructs the scrolling commands not to fontify (@pxref{Font Lock})
 any unfontified text they scroll over, instead to assume it has the
 default face.  This can cause Emacs to scroll to somewhat wrong buffer
 positions when the faces in use are not all the same size, even with
-single (i.e. without auto-repeat) scrolling operations.
+single (i.e., without auto-repeat) scrolling operations.
 
 @vindex scroll-up
 @vindex scroll-down
@@ -441,7 +441,7 @@ it.  @xref{Disabling}.
 screenfuls.  It provides commands for scrolling through the buffer
 conveniently but not for changing it.  Apart from the usual Emacs
 cursor motion commands, you can type @key{SPC} to scroll forward one
-windowful, @key{S-@key{SPC}} or @key{DEL} to scroll backward, and @kbd{s} to
+windowful, @kbd{S-@key{SPC}} or @key{DEL} to scroll backward, and @kbd{s} to
 start an incremental search.
 
 @kindex q @r{(View mode)}
@@ -1201,7 +1201,7 @@ Highlight space and non-breaking space characters.
 
 @item lines
 @vindex whitespace-line-column
-Highlight lines longer than 80 lines.  To change the column limit,
+Highlight lines longer than 80 columns.  To change the column limit,
 customize the variable @code{whitespace-line-column}.
 
 @item newline
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index b12b28f9c1..21957d03ae 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1368,7 +1368,7 @@ remains ``correct''.  To disable automatic line number correction,
 change the variable @code{diff-update-on-the-fly} to @code{nil}.
 
   Diff mode treats each hunk as an ``error message'', similar to
-Compilation mode.  Thus, you can use commands such as @kbd{C-x '} to
+Compilation mode.  Thus, you can use commands such as @kbd{C-x `} to
 visit the corresponding source locations.  @xref{Compilation Mode}.
 
   In addition, Diff mode provides the following commands to navigate,
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index b5b9dbd7da..f401c8f645 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -955,7 +955,7 @@ bar width, change the @code{scroll-bar-width} frame parameter
 @cindex overscrolling
 If you're using Emacs on X (with GTK+ or Motif), you can customize the
 variable @code{scroll-bar-adjust-thumb-portion} to control
-@dfn{overscrolling} of the scroll bar, i.e. dragging the thumb down even
+@dfn{overscrolling} of the scroll bar, i.e., dragging the thumb down even
 when the end of the buffer is visible.  If its value is
 non-@code{nil}, the scroll bar can be dragged downwards even if the
 end of the buffer is shown; if @code{nil}, the thumb will be at the
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index 3092d34b56..4b90bf468d 100644
--- a/doc/emacs/killing.texi
+++ b/doc/emacs/killing.texi
@@ -848,7 +848,7 @@ shifting the original text to the right.
   The command @kbd{C-x @key{SPC}} (@code{rectangle-mark-mode}) toggles
 whether the region-rectangle or the standard region is highlighted
 (first activating the region if necessary).  When this mode is enabled,
-commands that resize the region (@kbd{C-f}, @kbd{C-n} etc.) do
+commands that resize the region (@kbd{C-f}, @kbd{C-n} etc.)@: do
 so in a rectangular fashion, and killing and yanking operate on the
 rectangle.  @xref{Killing}.  The mode persists only as long as the
 region is active.
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index 2a86af3ec2..f0bedf8854 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -622,7 +622,7 @@ typed @kbd{M-p}), Emacs tries fetching from a list of default
 arguments: values that you are likely to enter.  You can think of this
 as moving through the ``future history'' list.
 
-  If you edit the text inserted by the @kbd{M-p} or @key{M-n}
+  If you edit the text inserted by the @kbd{M-p} or @kbd{M-n}
 minibuffer history commands, this does not change its entry in the
 history list.  However, the edited argument does go at the end of the
 history list when you submit it.
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index e12fca7ebd..46585ed52d 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -1426,7 +1426,7 @@ char mode.
 
 @table @kbd
 @item C-c C-c
-Send a literal @key{C-c} to the sub-shell.
+Send a literal @kbd{C-c} to the sub-shell.
 
 @item C-c @var{char}
 This is equivalent to @kbd{C-x @var{char}} in normal Emacs.  For
diff --git a/doc/emacs/msdos-xtra.texi b/doc/emacs/msdos-xtra.texi
index b0fa3e919d..9996158f16 100644
--- a/doc/emacs/msdos-xtra.texi
+++ b/doc/emacs/msdos-xtra.texi
@@ -351,7 +351,7 @@ long file name support, set the environment variable @env{LFN} to
 DOS programs to access long file names, so Emacs built for MS-DOS will
 only see their short 8+3 aliases.
 
-@cindex @env{HOME} directory under MS-DOS
+@cindex HOME directory under MS-DOS
   MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends
 that the directory where it is installed is the value of the @env{HOME}
 environment variable.  That is, if your Emacs binary,
diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi
index b5a66503ca..f1cdb26a0e 100644
--- a/doc/emacs/msdos.texi
+++ b/doc/emacs/msdos.texi
@@ -249,7 +249,42 @@ removable and remote volumes, where this could potentially slow down
 Dired and other related features.  The value of @code{nil} means never
 issue those system calls.  Non-@code{nil} values are more useful on
 NTFS volumes, which support hard links and file security, than on FAT,
-FAT32, and XFAT volumes.
+FAT32, and exFAT volumes.
+
+@cindex file names, invalid characters on MS-Windows
+  Unlike Unix, MS-Windows file systems restrict the set of characters
+that can be used in a file name.  The following characters are not
+allowed:
+
+@itemize @bullet
+@item
+Shell redirection symbols @samp{<}, @samp{>}, and @samp{|}.
+
+@item
+Colon @samp{:} (except after the drive letter).
+
+@item
+Forward slash @samp{/} and backslash @samp{\} (except as directory
+separators).
+
+@item
+Wildcard characters @samp{*} and @samp{?}.
+
+@item
+Control characters whose codepoints are 1 through 31 decimal.  In
+particular, newlines in file names are not allowed.
+
+@item
+The null character, whose codepoint is zero (this limitation exists on
+Unix filesystems as well).
+@end itemize
+
+@noindent
+In addition, referencing any file whose name matches a DOS character
+device, such as @file{NUL} or @file{LPT1} or @file{PRN} or @file{CON},
+with or without any file-name extension, will always resolve to those
+character devices, in any directory.  Therefore, only use such file
+names when you want to use the corresponding character device.
 
 @node ls in Lisp
 @section Emulation of @code{ls} on MS-Windows
@@ -390,7 +425,7 @@ names, which might cause misalignment of columns in Dired display.
 
 @node Windows HOME
 @section HOME and Startup Directories on MS-Windows
-@cindex @code{HOME} directory on MS-Windows
+@cindex HOME directory on MS-Windows
 
   The Windows equivalent of @code{HOME} is the @dfn{user-specific
 application data directory}.  The actual location depends on the
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index bea06f5ff5..a80f942f61 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -265,123 +265,101 @@ the list of supported language environments, and use the command
 for more information about the language environment @var{lang-env}.
 Supported language environments include:
 
+@c @cindex entries below are split between portions of the list to
+@c make them more accurate, i.e., land on the line that mentions the
+@c language.  However, makeinfo 4.x doesn't fill inside @quotation
+@c lines that follow a @cindex entry and whose text has no whitespace.
+@c To work around, we group the language environments together, so
+@c that the blank that separates them triggers refill.
 @quotation
 @cindex ASCII
-ASCII,
 @cindex Arabic
-Arabic,
+ASCII, Arabic,
 @cindex Belarusian
-Belarusian,
 @cindex Bengali
-Bengali,
+Belarusian, Bengali,
 @cindex Brazilian Portuguese
-Brazilian Portuguese,
 @cindex Bulgarian
-Bulgarian,
+Brazilian Portuguese, Bulgarian,
 @cindex Burmese
-Burmese,
 @cindex Cham
-Cham,
+Burmese, Cham,
 @cindex Chinese
 Chinese-BIG5, Chinese-CNS, Chinese-EUC-TW, Chinese-GB,
 Chinese-GB18030, Chinese-GBK,
 @cindex Croatian
-Croatian,
 @cindex Cyrillic
-Cyrillic-ALT, Cyrillic-ISO, Cyrillic-KOI8,
+Croatian, Cyrillic-ALT, Cyrillic-ISO, Cyrillic-KOI8,
 @cindex Czech
-Czech,
 @cindex Devanagari
-Devanagari,
+Czech, Devanagari,
 @cindex Dutch
-Dutch,
 @cindex English
-English,
+Dutch, English,
 @cindex Esperanto
-Esperanto,
 @cindex Ethiopic
-Ethiopic,
+Esperanto, Ethiopic,
 @cindex French
-French,
 @cindex Georgian
-Georgian,
+French, Georgian,
 @cindex German
-German,
 @cindex Greek
-Greek,
 @cindex Gujarati
-Gujarati,
+German, Greek, Gujarati,
 @cindex Hebrew
-Hebrew,
 @cindex IPA
-IPA,
+Hebrew, IPA,
 @cindex Italian
 Italian,
 @cindex Japanese
-Japanese,
 @cindex Kannada
-Kannada,
+Japanese, Kannada,
 @cindex Khmer
-Khmer,
 @cindex Korean
-Korean,
 @cindex Lao
-Lao,
+Khmer, Korean, Lao,
 @cindex Latin
 Latin-1, Latin-2, Latin-3, Latin-4, Latin-5, Latin-6, Latin-7,
 Latin-8, Latin-9,
 @cindex Latvian
-Latvian,
 @cindex Lithuanian
-Lithuanian,
+Latvian, Lithuanian,
 @cindex Malayalam
-Malayalam,
 @cindex Oriya
-Oriya,
+Malayalam, Oriya,
 @cindex Persian
-Persian,
 @cindex Polish
-Polish,
+Persian, Polish,
 @cindex Punjabi
-Punjabi,
 @cindex Romanian
-Romanian,
+Punjabi, Romanian,
 @cindex Russian
-Russian,
 @cindex Sinhala
-Sinhala,
+Russian, Sinhala,
 @cindex Slovak
-Slovak,
 @cindex Slovenian
-Slovenian,
 @cindex Spanish
-Spanish,
+Slovak, Slovenian, Spanish,
 @cindex Swedish
-Swedish,
 @cindex TaiViet
-TaiViet,
+Swedish, TaiViet,
 @cindex Tajik
-Tajik,
 @cindex Tamil
-Tamil,
+Tajik, Tamil,
 @cindex Telugu
-Telugu,
 @cindex Thai
-Thai,
+Telugu, Thai,
 @cindex Tibetan
-Tibetan,
 @cindex Turkish
-Turkish,
+Tibetan, Turkish,
 @cindex UTF-8
-UTF-8,
 @cindex Ukrainian
-Ukrainian,
+UTF-8, Ukrainian,
 @cindex Vietnamese
-Vietnamese,
 @cindex Welsh
-Welsh, and
+Vietnamese, Welsh,
 @cindex Windows-1255
-Windows-1255.
+and Windows-1255.
 @end quotation
 
   To display the script(s) used by your language environment on a
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 609392f6bb..1fffa233e5 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -383,7 +383,7 @@ the preceding lines; if the region is active, @key{TAB} indents each
 line within the region, not just the current line.
 
   The command @key{RET} (@code{newline}), which was documented in
-@ref{Inserting Text}, does the same as @key{C-j} followed by
+@ref{Inserting Text}, does the same as @kbd{C-j} followed by
 @key{TAB}: it inserts a new line, then adjusts the line's indentation.
 
   When indenting a line that starts within a parenthetical grouping,
@@ -559,7 +559,7 @@ predefined styles, including @code{gnu}, @code{k&r}, @code{bsd},
 styles are primarily intended for one language, but any of them can be
 used with any of the languages supported by these modes.  To find out
 what a style looks like, select it and reindent some code, e.g., by
-typing @key{C-M-q} at the start of a function definition.
+typing @kbd{C-M-q} at the start of a function definition.
 
 @kindex C-c . @r{(C mode)}
 @findex c-set-style
@@ -870,7 +870,9 @@ mode to skip whitespace forward before deciding whether to skip over
 the closing delimiter.
 @end itemize
 
-To toggle Electric Pair mode, type @kbd{M-x electric-pair-mode}.
+To toggle Electric Pair mode, type @kbd{M-x electric-pair-mode}.  To
+toggle the mode in a single buffer, use @kbd{M-x
+electric-pair-local-mode}.
 
 @node Comments
 @section Manipulating Comments
@@ -1666,7 +1668,7 @@ Delete the entire block of whitespace after point (@code{c-hungry-delete-forward
   As an alternative to the above commands, you can enable @dfn{hungry
 delete mode}.  When this feature is enabled (indicated by @samp{/h} in
 the mode line after the mode name), a single @key{DEL} deletes all
-preceding whitespace, not just one space, and a single @kbd{C-c C-d}
+preceding whitespace, not just one space, and a single @kbd{C-d}
 (but @emph{not} plain @key{Delete}) deletes all following whitespace.
 
 @table @kbd
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index 11b916ab04..9bc5ade81a 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -1293,7 +1293,7 @@ executed.
 
 @kindex S-TAB @r{(Org Mode)}
 @findex org-shifttab
-  Typing @key{S-TAB} (@code{org-shifttab}) anywhere in an Org mode
+  Typing @kbd{S-@key{TAB}} (@code{org-shifttab}) anywhere in an Org mode
 buffer cycles the visibility of the entire outline structure, between
 (i) showing only top-level heading lines, (ii) showing all heading
 lines but no body lines, and (iii) showing everything.
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index 2faa5d91cc..22ec215d5e 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -342,7 +342,7 @@ Here, @var{backtrace} is the name of a text file containing a copy of
 the backtrace, @var{bindir} is the name of the directory that
 contains the Emacs executable, and @var{emacs-binary} is the name of
 the Emacs executable file, normally @file{emacs} on GNU and Unix
-systems and @file{emacs.exe} on MS-Windows and MS-DOS.  Omit the
+systems and @file{emacs.exe} on MS-Windows and MS-DOS@.  Omit the
 @option{-p} option if your version of @command{addr2line} is too old
 to have it.
 
@@ -1142,7 +1142,7 @@ making diffs of C code.  This shows the name of the function that each
 change occurs in.
 
 If you are using the Emacs repository, make sure your copy is
-up-to-date (e.g. with @code{git pull}).  You can commit your changes
+up-to-date (e.g., with @code{git pull}).  You can commit your changes
 to a private branch and generate a patch from the master version by
 using @code{git format-patch master}. Or you can leave your changes
 uncommitted and use @code{git diff}.
@@ -1173,7 +1173,7 @@ explanation in comments in the code.  It will be more useful there.
 Please look at the change log entries of recent commits to see what
 sorts of information to put in, and to learn the style that we use. Note that,
 unlike some other projects, we do require change logs for
-documentation, i.e. Texinfo files.
+documentation, i.e., Texinfo files.
 @xref{Change Log},
 @ifset WWW_GNU_ORG
 see
@@ -1389,7 +1389,7 @@ user freedom and to defend the rights of all free software users.
 For general information, see the website @url{http://www.fsf.org/}.
 
 Generally speaking, for non-trivial contributions to GNU Emacs we
-require that the copyright be assigned to the FSF.  For the reasons
+require that the copyright be assigned to the FSF@.  For the reasons
 behind this, see @url{http://www.gnu.org/licenses/why-assign.html}.
 
 Copyright assignment is a simple process.  Residents of some countries
@@ -1408,7 +1408,7 @@ is not enough).  Also, a disclaimer cannot be applied to future work, it
 has to be repeated each time you want to send something new.
 
 We can accept small changes (roughly, fewer than 15 lines) without
-an assignment.  This is a cumulative limit (e.g. three separate 5 line
+an assignment.  This is a cumulative limit (e.g., three separate 5 line
 patches) over all your contributions.
 
 @node Service
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog
index 57ab03b115..c54c165d22 100644
--- a/doc/lispintro/ChangeLog
+++ b/doc/lispintro/ChangeLog
@@ -1,3 +1,7 @@
+2015-03-25  Stefan Monnier  
+
+	* emacs-lisp-intro.texi: `save-excursion' doesn't save&restore the mark.
+
 2014-12-31  Paul Eggert  
 
 	Less 'make' chatter for Emacs doc
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index b6eff2de0d..ed125bb374 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -352,7 +352,7 @@ How To Write Function Definitions
 * if::                           What if?
 * else::                         If--then--else expressions.
 * Truth & Falsehood::            What Lisp considers false and true.
-* save-excursion::               Keeping track of point, mark, and buffer.
+* save-excursion::               Keeping track of point and buffer.
 * Review::
 * defun Exercises::
 
@@ -387,7 +387,7 @@ Truth and Falsehood in Emacs Lisp
 * Point and mark::              A review of various locations.
 * Template for save-excursion::
 
-A Few Buffer--Related Functions
+A Few Buffer-Related Functions
 
 * Finding More::                How to find more information.
 * simplified-beginning-of-buffer::  Shows @code{goto-char},
@@ -2966,7 +2966,7 @@ symbol refers to it.)
 * if::                           What if?
 * else::                         If--then--else expressions.
 * Truth & Falsehood::            What Lisp considers false and true.
-* save-excursion::               Keeping track of point, mark, and buffer.
+* save-excursion::               Keeping track of point and buffer.
 * Review::
 * defun Exercises::
 @end menu
@@ -4159,11 +4159,11 @@ The @code{save-excursion} function is the third and final special form
 that we will discuss in this chapter.
 
 In Emacs Lisp programs used for editing, the @code{save-excursion}
-function is very common.  It saves the location of point and mark,
-executes the body of the function, and then restores point and mark to
-their previous positions if their locations were changed.  Its primary
+function is very common.  It saves the location of point,
+executes the body of the function, and then restores point to
+its previous position if its location was changed.  Its primary
 purpose is to keep the user from being surprised and disturbed by
-unexpected movement of point or mark.
+unexpected movement of point.
 
 @menu
 * Point and mark::              A review of various locations.
@@ -4201,7 +4201,7 @@ region}.  Numerous commands work on the region, including
 @code{print-region}.
 
 The @code{save-excursion} special form saves the locations of point and
-mark and restores those positions after the code within the body of the
+restores this position after the code within the body of the
 special form is evaluated by the Lisp interpreter.  Thus, if point were
 in the beginning of a piece of text and some code moved point to the end
 of the buffer, the @code{save-excursion} would put point back to where
@@ -4212,16 +4212,16 @@ In Emacs, a function frequently moves point as part of its internal
 workings even though a user would not expect this.  For example,
 @code{count-lines-region} moves point.  To prevent the user from being
 bothered by jumps that are both unexpected and (from the user's point of
-view) unnecessary, @code{save-excursion} is often used to keep point and
-mark in the location expected by the user.  The use of
+view) unnecessary, @code{save-excursion} is often used to keep point in
+the location expected by the user.  The use of
 @code{save-excursion} is good housekeeping.
 
 To make sure the house stays clean, @code{save-excursion} restores the
-values of point and mark even if something goes wrong in the code inside
+value of point even if something goes wrong in the code inside
 of it (or, to be more precise and to use the proper jargon, ``in case of
 abnormal exit'').  This feature is very helpful.
 
-In addition to recording the values of point and mark,
+In addition to recording the value of point,
 @code{save-excursion} keeps track of the current buffer, and restores
 it, too.  This means you can write code that will change the buffer and
 have @code{save-excursion} switch you back to the original buffer.
@@ -4386,9 +4386,9 @@ For example,
 @end smallexample
 
 @item save-excursion
-Record the values of point and mark and the current buffer before
-evaluating the body of this special form.  Restore the values of point
-and mark and buffer afterward.
+Record the values of point and the current buffer before
+evaluating the body of this special form.  Restore the value of point and
+buffer afterward.
 
 @need 1250
 For example,
@@ -4547,7 +4547,7 @@ and if so, prints an appropriate message.
 @end itemize
 
 @node Buffer Walk Through
-@chapter A Few Buffer--Related Functions
+@chapter A Few Buffer-Related Functions
 
 In this chapter we study in detail several of the functions used in GNU
 Emacs.  This is called a ``walk-through''.  These functions are used as
@@ -5201,8 +5201,8 @@ of the two-element list, @code{(oldbuf (current-buffer))}.
 The body of the @code{let} expression in @code{append-to-buffer}
 consists of a @code{save-excursion} expression.
 
-The @code{save-excursion} function saves the locations of point and
-mark, and restores them to those positions after the expressions in the
+The @code{save-excursion} function saves the location of point, and restores it
+to that position after the expressions in the
 body of the @code{save-excursion} complete execution.  In addition,
 @code{save-excursion} keeps track of the original buffer, and
 restores it.  This is how @code{save-excursion} is used in
@@ -5390,7 +5390,7 @@ Conventionally bound to @kbd{M-.} (that's a period following the
 @key{META} key).
 
 @item save-excursion
-Save the location of point and mark and restore their values after the
+Save the location of point and restore its value after the
 arguments to @code{save-excursion} have been evaluated.  Also, remember
 the current buffer and return to it.
 
@@ -5896,7 +5896,7 @@ the value of point, which will be at the end of the inserted text, is
 recorded in the variable @code{newmark}.
 
 After the body of the outer @code{save-excursion} is evaluated, point
-and mark are relocated to their original places.
+is relocated to its original place.
 
 However, it is convenient to locate a mark at the end of the newly
 inserted text and locate point at its beginning.  The @code{newmark}
@@ -6685,8 +6685,8 @@ restored just before the completion of the function by the
 @code{save-restriction} special form.
 
 The call to @code{widen} is followed by @code{save-excursion}, which
-saves the location of the cursor (i.e., of point) and of the mark, and
-restores them after the code in the body of the @code{save-excursion}
+saves the location of the cursor (i.e., of point), and
+restores it after the code in the body of the @code{save-excursion}
 uses the @code{beginning-of-line} function to move point.
 
 (Note that the @code{(widen)} expression comes between the
@@ -6757,8 +6757,8 @@ it, and @code{count-lines} counts only the lines @emph{before} the
 current line.
 
 After @code{count-lines} has done its job, and the message has been
-printed in the echo area, the @code{save-excursion} restores point and
-mark to their original positions; and @code{save-restriction} restores
+printed in the echo area, the @code{save-excursion} restores point to
+its original position; and @code{save-restriction} restores
 the original narrowing, if any.
 
 @node narrow Exercise
@@ -12114,7 +12114,7 @@ Internet, see
 @uref{http://www.gnu.org/software/texinfo/manual/texinfo/}
 @end ifhtml
 @iftex
-``Indicating Definitions, Commands, etc.'' in @cite{Texinfo, The GNU
+``Indicating Definitions, Commands, etc.''@: in @cite{Texinfo, The GNU
 Documentation Format}.
 @end iftex
 @end itemize
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 2cde2fb6f4..c24bb646fa 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,99 @@
+2015-03-29  Glenn Morris  
+
+	* objects.texi (Equality Predicates): Fix typo in example.
+
+2015-03-25  Stefan Monnier  
+
+	* positions.texi (Excursions, Narrowing): `save-excursion' does not
+	save&restore the mark any more.
+
+2015-03-24  Paul Eggert  
+
+	* numbers.texi (Float Basics): Improve ldexp documentation.
+
+2015-03-23  Eli Zaretskii  
+
+	* commands.texi (Event Input Misc): Fix incorrect usage of @code.
+	(Bug#20174)
+	(Accessing Mouse): Expand documentation of 'posn-actual-col-row'.
+	(Bug#20169)
+	More accurate description of 'posn-object-x-y'.  (Bug#20168)
+
+2015-03-23  Daiki Ueno  
+
+	* processes.texi (Asynchronous Processes): Mention `make-process'.
+
+2015-03-18  Eli Zaretskii  
+
+	* minibuf.texi (Basic Completion): Fix a typo.  (Bug#20108)
+
+2015-03-09  Nicolas Petton 
+
+	* sequences.texi (seq-into): Add documentation for the new
+	seq-into function.
+
+2015-03-03  Eli Zaretskii  
+
+	* processes.texi (Synchronous Processes): Update documentation of
+	call-process-shell-command and process-file-shell-command.
+
+2015-03-03  Daniel Colascione  
+
+	* control.texi (Generators): Correct missing word.  Clarify which
+	forms are legal in which parts of `unwind-protect'.  Fix orphaned
+	close parenthesis.
+
+	* objects.texi (Finalizer Type): New section for finalizer objects.
+	(Type Predicates): Mention finalizers in `type-of' documentation.
+	* elisp.texi (Top): Link to finalizer type.
+
+2015-03-02  Daniel Colascione  
+
+	* control.texi (Generators): New section
+	* elisp.text: Reference new section.
+
+2015-02-28  Eli Zaretskii  
+
+	* searching.texi (Char Classes): Update the documentation of
+	[:alpha:] and [:alnum:].  (Bug#19878)
+
+2015-02-27  Eli Zaretskii  
+
+	* os.texi (Startup Summary):
+	* display.texi (Window Systems): Mention peculiarities of daemon
+	mode on MS-Windows.
+
+2015-02-11  Martin Rudalics  
+
+	* frames.texi (Size Parameters): Update description of
+	fullscreen frame parameter.  Describe `fullscreen-restore'
+	parameter.
+
+2015-02-09 Nicolas Petton 
+
+	* sequences.texi (Sequence Functions): Update documentation
+	examples for seq-group-by.
+
+2015-02-09  Eli Zaretskii  
+
+	* positions.texi (Screen Lines): Update the documentation of
+	vertical-motion to document the new additional argument.
+
+2015-02-06  Nicolas Petton 
+
+	* sequences.texi (Sequence Functions): Add documentation for
+	seq-mapcat, seq-partition and seq-group-by.
+
+2015-02-05  Martin Rudalics  
+
+	* display.texi (Size of Displayed Text): Remove description of
+	optional argument BUFFER of `window-text-pixel-size'.
+
+2015-02-01  Martin Rudalics  
+
+	* display.texi (Size of Displayed Text): Describe optional
+	argument BUFFER of `window-text-pixel-size'.
+
 2015-01-28  Eli Zaretskii  
 
 	* searching.texi (Regexp Search): Add a cross-reference to "Syntax
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index 6fdc8e2ec7..5e986debd8 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -132,7 +132,7 @@ byte compiler to warn if the command is called from Lisp.  The output
 of @code{describe-function} will include similar information.
 The value of the property can be: a string, which the byte-compiler
 will use directly in its warning (it should end with a period, and not
-start with a capital, e.g. ``use @dots{} instead.''); @code{t}; any
+start with a capital, e.g., ``use @dots{} instead.''); @code{t}; any
 other symbol, which should be an alternative function to use in Lisp
 code.
 
@@ -1043,8 +1043,8 @@ the current Emacs session.  If a symbol has not yet been so used,
 @end defun
 
 @menu
-* Keyboard Events::             Ordinary characters--keys with symbols on them.
-* Function Keys::               Function keys--keys with names, not symbols.
+* Keyboard Events::             Ordinary characters -- keys with symbols on them.
+* Function Keys::               Function keys -- keys with names, not symbols.
 * Mouse Events::                Overview of mouse events.
 * Click Events::                Pushing and releasing a mouse button.
 * Drag Events::                 Moving the mouse before releasing the button.
@@ -2085,7 +2085,13 @@ Return the actual row and column in @var{position}, as a cons cell
 @code{(@var{col} . @var{row})}.  The values are the actual row and
 column numbers in the window given by @var{position}.  @xref{Click
 Events}, for details.  The function returns @code{nil} if
-@var{position} does not include actual position values.
+@var{position} does not include actual position values; in that case
+@code{posn-col-row} can be used to get approximate values.
+
+Note that this function doesn't account for the visual width of
+characters on display, like the number of visual columns taken by a
+tab character or an image.  If you need the coordinates in canonical
+character units, use @code{posn-col-row} instead.
 @end defun
 
 @defun posn-string position
@@ -2107,8 +2113,9 @@ Return the image or string object in @var{position}, either
 @defun posn-object-x-y position
 Return the pixel-based x and y coordinates relative to the upper left
 corner of the object in @var{position} as a cons cell @code{(@var{dx}
-. @var{dy})}.  If the @var{position} is a buffer position, return the
-relative position in the character at that position.
+. @var{dy})}.  If the @var{position} is on buffer text, return the
+relative position of the buffer-text character closest to that
+position.
 @end defun
 
 @defun posn-object-width-height position
@@ -2811,7 +2818,7 @@ most recently unread will be reread first.
 Events read from this list are not normally added to the current
 command's key sequence (as returned by, e.g., @code{this-command-keys}),
 as the events will already have been added once as they were read for
-the first time.  An element of the form @code{(@code{t} . @var{event})}
+the first time.  An element of the form @w{@code{(t . @var{event})}}
 forces @var{event} to be added to the current command's key sequence.
 @end defvar
 
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index d21292348a..f512ad990b 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -39,6 +39,7 @@ structure constructs (@pxref{Macros}).
 * Conditionals::           @code{if}, @code{cond}, @code{when}, @code{unless}.
 * Combining Conditions::   @code{and}, @code{or}, @code{not}.
 * Iteration::              @code{while} loops.
+* Generators::             Generic sequences and coroutines.
 * Nonlocal Exits::         Jumping out of a sequence.
 @end menu
 
@@ -620,6 +621,123 @@ Here is an example of using @code{dotimes} to do something 100 times:
 @end example
 @end defmac
 
+@node Generators
+@section Generators
+@cindex generators
+
+  A @dfn{generator} is a function that produces a potentially-infinite
+stream of values.  Each time the function produces a value, it
+suspends itself and waits for a caller to request the next value.
+
+@defmac iter-defun name args [doc] [declare] [interactive] body@dots{}
+@code{iter-defun} defines a generator function.  A generator function
+has the same signature as a normal function, but works differently.
+Instead of executing @var{body} when called, a generator function
+returns an iterator object.  That iterator runs @var{body} to generate
+values, emitting a value and pausing where @code{iter-yield} or
+@code{iter-yield-from} appears.  When @var{body} returns normally,
+@code{iter-next} signals @code{iter-end-of-sequence} with @var{body}'s
+result as its condition data.
+
+Any kind of Lisp code is valid inside @var{body}, but
+@code{iter-yield} and @code{iter-yield-from} cannot appear inside
+@code{unwind-protect} forms.
+
+@end defmac
+
+@defmac iter-lambda args [doc] [interactive] body@dots{}
+@code{iter-lambda} produces an unnamed generator function that works
+just like a generator function produced with @code{iter-defun}.
+@end defmac
+
+@defmac iter-yield value
+When it appears inside a generator function, @code{iter-yield}
+indicates that the current iterator should pause and return
+@var{value} from @code{iter-next}.  @code{iter-yield} evaluates to the
+@code{value} parameter of next call to @code{iter-next}.
+@end defmac
+
+@defmac iter-yield-from iterator
+@code{iter-yield-from} yields all the values that @var{iterator}
+produces and evaluates to the value that @var{iterator}'s generator
+function returns normally.  While it has control, @var{iterator}
+receives values sent to the iterator using @code{iter-next}.
+@end defmac
+
+  To use a generator function, first call it normally, producing a
+@dfn{iterator} object.  An iterator is a specific instance of a
+generator.  Then use @code{iter-next} to retrieve values from this
+iterator.  When there are no more values to pull from an iterator,
+@code{iter-next} raises an @code{iter-end-of-sequence} condition with
+the iterator's final value.
+
+It's important to note that generator function bodies only execute
+inside calls to @code{iter-next}.  A call to a function defined with
+@code{iter-defun} produces an iterator; you must ``drive'' this
+iterator with @code{iter-next} for anything interesting to happen.
+Each call to a generator function produces a @emph{different}
+iterator, each with its own state.
+
+@defun iter-next iterator value
+Retrieve the next value from @var{iterator}.  If there are no more
+values to be generated (because @var{iterator}'s generator function
+returned), @code{iter-next} signals the @code{iter-end-of-sequence}
+condition; the data value associated with this condition is the value
+with which @var{iterator}'s generator function returned.
+
+@var{value} is sent into the iterator and becomes the value to which
+@code{iter-yield} evaluates.  @var{value} is ignored for the first
+@code{iter-next} call to a given iterator, since at the start of
+@var{iterator}'s generator function, the generator function is not
+evaluating any @code{iter-yield} form.
+@end defun
+
+@defun iter-close iterator
+If @var{iterator} is suspended inside an @code{unwind-protect}'s
+@code{bodyform} and becomes unreachable, Emacs will eventually run
+unwind handlers after a garbage collection pass.  (Note that
+@code{iter-yield} is illegal inside an @code{unwind-protect}'s
+@code{unwindforms}.)  To ensure that these handlers are run before
+then, use @code{iter-close}.
+@end defun
+
+Some convenience functions are provided to make working with
+iterators easier:
+
+@defmac iter-do (var iterator) body @dots{}
+Run @var{body} with @var{var} bound to each value that
+@var{iterator} produces.
+@end defmac
+
+The Common Lisp loop facility also contains features for working with
+iterators.  See @xref{Loop Facility,,,cl,Common Lisp Extensions}.
+
+The following piece of code demonstrates some important principles of
+working with iterators.
+
+@example
+(iter-defun my-iter (x)
+  (iter-yield (1+ (iter-yield (1+ x))))
+   ;; Return normally
+  -1)
+
+(let* ((iter (my-iter 5))
+       (iter2 (my-iter 0)))
+  ;; Prints 6
+  (print (iter-next iter))
+  ;; Prints 9
+  (print (iter-next iter 8))
+  ;; Prints 1; iter and iter2 have distinct states
+  (print (iter-next iter2 nil))
+
+  ;; We expect the iter sequence to end now
+  (condition-case x
+      (iter-next iter)
+    (iter-end-of-sequence
+      ;; Prints -1, which my-iter returned normally
+      (print (cdr x)))))
+@end example
+
 @node Nonlocal Exits
 @section Nonlocal Exits
 @cindex nonlocal exits
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index b09b82a672..b73e70d107 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2154,7 +2154,7 @@ stipple patterns.
 Alternative foreground color, a string.  This is like @code{:foreground}
 but the color is only used as a foreground when the background color is
 near to the foreground that would have been used.  This is useful for
-example when marking text (i.e. the region face).  If the text has a foreground
+example when marking text (i.e., the region face).  If the text has a foreground
 that is visible with the region face, that foreground is used.
 If the foreground is near the region face background,
 @code{:distant-foreground} is used instead so the text is readable.
@@ -6728,8 +6728,9 @@ Emacs is displaying the frame on a character-based terminal.
 This variable holds the value of @code{window-system} used for the
 first frame created by Emacs during startup.  (When Emacs is invoked
 with the @option{--daemon} option, it does not create any initial
-frames, so @code{initial-window-system} is @code{nil}.  @xref{Initial
-Options, daemon,, emacs, The GNU Emacs Manual}.)
+frames, so @code{initial-window-system} is @code{nil}, except on
+MS-Windows, where it is still @code{w32}.  @xref{Initial Options,
+daemon,, emacs, The GNU Emacs Manual}.)
 @end defvar
 
 @defun window-system &optional frame
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index cdc443f07d..fc8ba7b411 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -316,6 +316,7 @@ Programming Types
 * Byte-Code Type::      A function written in Lisp, then compiled.
 * Autoload Type::       A type used for automatically loading seldom-used
                           functions.
+* Finalizer Type::      Runs code when no longer reachable.
 
 Character Type
 
@@ -464,6 +465,7 @@ Control Structures
 * Conditionals::            @code{if}, @code{cond}, @code{when}, @code{unless}.
 * Combining Conditions::    @code{and}, @code{or}, @code{not}.
 * Iteration::               @code{while} loops.
+* Generators::              Generic sequences and coroutines.
 * Nonlocal Exits::          Jumping out of a sequence.
 
 Nonlocal Exits
@@ -751,8 +753,8 @@ Defining Commands
 
 Input Events
 
-* Keyboard Events::         Ordinary characters--keys with symbols on them.
-* Function Keys::           Function keys--keys with names, not symbols.
+* Keyboard Events::         Ordinary characters -- keys with symbols on them.
+* Function Keys::           Function keys -- keys with names, not symbols.
 * Mouse Events::            Overview of mouse events.
 * Click Events::            Pushing and releasing a mouse button.
 * Drag Events::             Moving the mouse before releasing the button.
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index a6f4081532..85695c614c 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -360,7 +360,7 @@ coordinates might be negative.
 Position of the top-left corner and size of the work area (``usable''
 space) in pixels as @samp{(@var{x} @var{y} @var{width} @var{height})}.
 This may be different from @samp{geometry} in that space occupied by
-various window manager features (docks, taskbars, etc.) may be
+various window manager features (docks, taskbars, etc.)@: may be
 excluded from the work area.  Whether or not such features actually
 subtract from the work area depends on the platform and environment.
 Again, if the monitor is not the primary monitor, some of the
@@ -701,6 +701,7 @@ parameters represent the user's stated preference; otherwise, use
 @code{nil}.
 @end table
 
+
 @node Size Parameters
 @subsubsection Size Parameters
 @cindex window size on display
@@ -731,22 +732,52 @@ user-position}) does for the position parameters @code{top} and
 @vindex fullscreen, a frame parameter
 @item fullscreen
 Specify that width, height or both shall be maximized.  The value
-@code{fullwidth} specifies that width shall be as wide as possible.
-The value @code{fullheight} specifies that height shall be as tall as
+@code{fullwidth} specifies that width shall be as wide as possible.  The
+value @code{fullheight} specifies that height shall be as tall as
 possible.  The value @code{fullboth} specifies that both the width and
 the height shall be set to the size of the screen.  The value
-@code{maximized} specifies that the frame shall be maximized.  The
-difference between @code{maximized} and @code{fullboth} is that the
-former can still be resized by dragging window manager decorations
-with the mouse, while the latter really covers the whole screen and
-does not allow resizing by mouse dragging.
+@code{maximized} specifies that the frame shall be maximized.
+
+The difference between @code{maximized} and @code{fullboth} is that a
+maximized frame usually keeps its title bar and the buttons for resizing
+and closing the frame.  Also, maximized frames typically avoid hiding
+any task bar or panels displayed on the desktop.  ``Fullboth'' frames,
+on the other hand, usually omit the title bar and occupy the entire
+available screen space.
+
+``Fullheight'' and ``fullwidth'' frames are more similar to maximized
+frames in this regard.  However, these typically display an external
+border which might be absent with maximized frames.  Hence the heights
+of maximized and fullheight frames and the widths of maximized and
+fullwidth frames often differ by a few pixels.
 
 With some window managers you may have to customize the variable
-@code{frame-resize-pixelwise} (@pxref{Size and Position}) to a
-non-@code{nil} value in order to make a frame appear ``maximized'' or
-``fullscreen''.
+@code{frame-resize-pixelwise} (@pxref{Size and Position}) in order to
+make a frame truly appear ``maximized'' or ``fullscreen''.  Moreover,
+some window managers might not support smooth transition between the
+various fullscreen or maximization states.  Customizing the variable
+@code{x-frame-normalize-before-maximize} can help to overcome that.
+
+@vindex fullscreen-restore, a frame parameter
+@item fullscreen-restore
+This parameter specifies the desired ``fullscreen'' state of the frame
+after invoking the @code{toggle-frame-fullscreen} command (@pxref{Frame
+Commands,,, emacs, The GNU Emacs Manual}) in the ``fullboth'' state.
+Normally this parameter is installed automatically by that command when
+toggling the state to fullboth.  If, however, you start Emacs in the
+fullboth state, you have to specify the desired behavior in your initial
+file as, for example
+
+@example
+(setq default-frame-alist
+    '((fullscreen . fullboth) (fullscreen-restore . fullheight)))
+@end example
+
+This will give a new frame full height after typing in it @key{F11} for
+the first time.
 @end table
 
+
 @node Layout Parameters
 @subsubsection Layout Parameters
 @cindex layout parameters of frames
@@ -1187,7 +1218,7 @@ These functions return the canonical height and width of a character in
 @var{frame}, measured in pixels.  Together, these values establish the
 size of the default font on @var{frame}.  The values depend on the
 choice of font for @var{frame}, see @ref{Font and Color Parameters}.
-@end defun                                                                      
+@end defun
 
 The default font can be also set directly with the following function:
 
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 40b8322c73..a853d2fbab 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1222,7 +1222,7 @@ This macro is the handy way to add the advice @var{function} to the function
 stored in @var{place} (@pxref{Generalized Variables}).
 
 @var{where} determines how @var{function} is composed with the
-existing function, e.g. whether @var{function} should be called before, or
+existing function, e.g., whether @var{function} should be called before, or
 after the original function.  @xref{Advice combinators}, for the list of
 available ways to compose the two functions.
 
@@ -1310,7 +1310,7 @@ and its properties.
 @defun advice-eval-interactive-spec spec
 Evaluate the interactive @var{spec} just like an interactive call to a function
 with such a spec would, and then return the corresponding list of arguments
-that was built.  E.g. @code{(advice-eval-interactive-spec "r\nP")} will
+that was built.  E.g., @code{(advice-eval-interactive-spec "r\nP")} will
 return a list of three elements, containing the boundaries of the region and
 the current prefix argument.
 @end defun
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index 2627ab7462..a5fff724ea 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -1624,7 +1624,7 @@ similar advice may apply to the unsigned counterparts (e.g.,
 of @code{intptr_t}).
 
 @item
-Prefer @code{int} for Emacs character codes, in the range 0 ..@: 0x3FFFFF.
+Prefer @code{int} for Emacs character codes, in the range 0 ..@: 0x3FFFFF@.
 More generally, prefer @code{int} for integers known to be in
 @code{int} range, e.g., screen column counts.
 
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index cf2f0007ca..0ae8fbd068 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -95,7 +95,7 @@ suffix), unless it contains an explicit directory name.
 
 If the option @code{load-prefer-newer} is non-@code{nil}, then when
 searching suffixes, @code{load} selects whichever version of a file
-(@samp{.elc}, @samp{.el}, etc.) has been modified most recently.
+(@samp{.elc}, @samp{.el}, etc.)@: has been modified most recently.
 
 If @var{filename} is a relative file name, such as @file{foo} or
 @file{baz/foo.bar}, @code{load} searches for the file using the variable
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 82039ba450..24c7559c7d 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -102,7 +102,7 @@ the minibuffer is in a separate frame.  @xref{Minibuffers and Frames}.
   When Emacs is running in batch mode, any request to read from the
 minibuffer actually reads a line from the standard input descriptor that
 was supplied when Emacs was started.  This supports only basic input:
-none of the special minibuffer features (history, completion, etc.)
+none of the special minibuffer features (history, completion, etc.)@:
 are available in batch mode.
 
 @node Text from Minibuffer
@@ -723,7 +723,7 @@ just one matching completion, and the match is exact, it returns
 @code{t}.  Otherwise, it returns the longest initial sequence common
 to all possible matching completions.
 
-If @var{collection} is an list, the permissible completions are
+If @var{collection} is a list, the permissible completions are
 specified by the elements of the list, each of which should be either
 a string, or a cons cell whose @sc{car} is either a string or a symbol
 (a symbol is converted to a string using @code{symbol-name}).  If the
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi
index 1ee70504a7..7b4a0a6d40 100644
--- a/doc/lispref/numbers.texi
+++ b/doc/lispref/numbers.texi
@@ -261,13 +261,19 @@ If @var{x} is finite, then @var{s} is a floating-point number between 0.5
 @math{x = s 2^e}.
 @end tex
 If @var{x} is zero or infinity, then @var{s} is the same as @var{x}.
-If @var{x} is a NaN, then @var{s} is also a NaN.
+If @var{x} is a NaN, then @var{s} is also a NaN@.
 If @var{x} is zero, then @var{e} is 0.
 @end defun
 
-@defun ldexp sig &optional exp
-This function returns a floating-point number corresponding to the
-significand @var{sig} and exponent @var{exp}.
+@defun ldexp s e
+Given a numeric significand @var{s} and an integer exponent @var{e},
+this function returns the floating point number
+@ifnottex
+@var{s} * 2**@var{e}.
+@end ifnottex
+@tex
+@math{s 2^e}.
+@end tex
 @end defun
 
 @defun copysign x1 x2
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index ba28b63f0d..f4beca822c 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -156,6 +156,8 @@ latter are unique to Emacs Lisp.
 * Byte-Code Type::      A function written in Lisp, then compiled.
 * Autoload Type::       A type used for automatically loading seldom-used
                         functions.
+* Finalizer Type::      Runs code when no longer reachable.
+
 @end menu
 
 @node Integer Type
@@ -1361,6 +1363,31 @@ in the loaded file.
 @code{autoload}, which stores the object in the function cell of a
 symbol.  @xref{Autoload}, for more details.
 
+@node Finalizer Type
+@subsection Finalizer Type
+
+  A @dfn{finalizer object} helps Lisp code clean up after objects that
+are no longer needed.  A finalizer holds a Lisp function object.
+When a finalizer object becomes unreachable after a garbage collection
+pass, Emacs calls the finalizer's associated function object.
+When deciding whether a finalizer is reachable, Emacs does not count
+references from finalizer objects themselves, allowing you to use
+finalizers without having to worry about accidentally capturing
+references to finalized objects themselves.
+
+Errors in finalizers are printed to @code{*Messages*}.  Emacs runs
+a given finalizer object's associated function exactly once, even
+if that function fails.
+
+@defun make-finalizer function
+Make a finalizer that will run @var{function}.  @var{function} will be
+called after garbage collection when the returned finalizer object
+becomes unreachable.  If the finalizer object is reachable only
+through references from finalizer objects, it does not count as
+reachable for the purpose of deciding whether to run @var{function}.
+@var{function} will be run once per finalizer object.
+@end defun
+
 @node Editing Types
 @section Editing Types
 @cindex editing types
@@ -1907,11 +1934,11 @@ types.  In most cases, it is more convenient to use type predicates than
 This function returns a symbol naming the primitive type of
 @var{object}.  The value is one of the symbols @code{bool-vector},
 @code{buffer}, @code{char-table}, @code{compiled-function},
-@code{cons}, @code{float}, @code{font-entity}, @code{font-object},
-@code{font-spec}, @code{frame}, @code{hash-table}, @code{integer},
-@code{marker}, @code{overlay}, @code{process}, @code{string},
-@code{subr}, @code{symbol}, @code{vector}, @code{window}, or
-@code{window-configuration}.
+@code{cons}, @code{finalizer}, @code{float}, @code{font-entity},
+@code{font-object}, @code{font-spec}, @code{frame}, @code{hash-table},
+@code{integer}, @code{marker}, @code{overlay}, @code{process},
+@code{string}, @code{subr}, @code{symbol}, @code{vector},
+@code{window}, or @code{window-configuration}.
 
 @example
 (type-of 1)
@@ -2108,12 +2135,12 @@ that for two strings to be equal, they have the same text properties.
 
 @example
 @group
-(equal "asdf" (propertize "asdf" '(asdf t)))
+(equal "asdf" (propertize "asdf" 'asdf t))
      @result{} t
 @end group
 @group
 (equal-including-properties "asdf"
-                            (propertize "asdf" '(asdf t)))
+                            (propertize "asdf" 'asdf t))
      @result{} nil
 @end group
 @end example
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 46df0e7892..4df4a597ea 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -244,8 +244,9 @@ options were specified.
 
 @item
 If the option @code{--daemon} was specified, it calls
-@code{server-start} and detaches from the controlling terminal.
-@xref{Emacs Server,,, emacs, The GNU Emacs Manual}.
+@code{server-start}, and on Posix systems also detaches from the
+controlling terminal.  @xref{Emacs Server,,, emacs, The GNU Emacs
+Manual}.
 
 @item
 If started by the X session manager, it calls
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index 317b9d64a5..103161c7ae 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -493,7 +493,7 @@ If you intend to use them heavily, Emacs provides caches which may
 improve the performance of your code.  @xref{Truncation, cache-long-scans}.
 @end ignore
 
-@defun vertical-motion count &optional window
+@defun vertical-motion count &optional window cur-col
 This function moves point to the start of the screen line @var{count}
 screen lines down from the screen line containing point.  If @var{count}
 is negative, it moves up instead.
@@ -515,6 +515,14 @@ The window @var{window} is used for obtaining parameters such as the
 width, the horizontal scrolling, and the display table.  But
 @code{vertical-motion} always operates on the current buffer, even if
 @var{window} currently displays some other buffer.
+
+The optional argument @var{cur-col} specifies the current column when
+the function is called.  This is the window-relative horizontal
+coordinate of point, measured in units of font width of the frame's
+default face.  Providing it speeds up the function, especially in very
+long lines, because it doesn't have to go back in the buffer in order
+to determine the current column.  Note that @var{cur-col} is also
+counted from the visual start of the line.
 @end defun
 
 @defun count-screen-lines &optional beg end count-final-newline window
@@ -817,8 +825,8 @@ is zero or less.
   It is often useful to move point ``temporarily'' within a localized
 portion of the program.  This is called an @dfn{excursion}, and it is
 done with the @code{save-excursion} special form.  This construct
-remembers the initial identity of the current buffer, and its values
-of point and the mark, and restores them after the excursion
+remembers the initial identity of the current buffer, and its value
+of point, and restores them after the excursion
 completes.  It is the standard way to move point within one part of a
 program and avoid affecting the rest of the program, and is used
 thousands of times in the Lisp sources of Emacs.
@@ -833,18 +841,18 @@ Configurations} and in @ref{Frame Configurations}. @c frameset?
 @cindex mark excursion
 @cindex point excursion
 This special form saves the identity of the current buffer and the
-values of point and the mark in it, evaluates @var{body}, and finally
-restores the buffer and its saved values of point and the mark.  All
-three saved values are restored even in case of an abnormal exit via
+value of point in it, evaluates @var{body}, and finally
+restores the buffer and its saved value of point.  both saved values are
+restored even in case of an abnormal exit via
 @code{throw} or error (@pxref{Nonlocal Exits}).
 
 The value returned by @code{save-excursion} is the result of the last
 form in @var{body}, or @code{nil} if no body forms were given.
 @end defspec
 
-  Because @code{save-excursion} only saves point and mark for the
+  Because @code{save-excursion} only saves point for the
 buffer that was current at the start of the excursion, any changes
-made to point and/or mark in other buffers, during the excursion, will
+made to point in other buffers, during the excursion, will
 remain in effect afterward.  This frequently leads to unintended
 consequences, so the byte compiler warns if you call @code{set-buffer}
 during an excursion:
@@ -880,11 +888,6 @@ type @code{nil}.  @xref{Marker Insertion Types}.  Therefore, when the
 saved point value is restored, it normally comes before the inserted
 text.
 
-  Although @code{save-excursion} saves the location of the mark, it does
-not prevent functions which modify the buffer from setting
-@code{deactivate-mark}, and thus causing the deactivation of the mark
-after the command finishes.  @xref{The Mark}.
-
 @node Narrowing
 @section Narrowing
 @cindex narrowing
@@ -972,7 +975,7 @@ restores the restrictions on the original buffer (the buffer whose
 restrictions it saved from), but it does not restore the identity of the
 current buffer.
 
-@code{save-restriction} does @emph{not} restore point and the mark; use
+@code{save-restriction} does @emph{not} restore point; use
 @code{save-excursion} for that.  If you use both @code{save-restriction}
 and @code{save-excursion} together, @code{save-excursion} should come
 first (on the outside).  Otherwise, the old point value would be
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 99411af3d4..3e9cc50de5 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -503,17 +503,21 @@ inputinput@point{}
 @c It actually uses shell-command-switch, but no need to mention that here.
 @end defun
 
-@defun call-process-shell-command command &optional infile destination display &rest args
+@defun call-process-shell-command command &optional infile destination display
 This function executes the shell command @var{command} synchronously.
-The final arguments @var{args} are additional arguments to add at the
-end of @var{command}.  The other arguments are handled as in
-@code{call-process}.
+The arguments are handled as in @code{call-process}.  An old calling
+convention allowed to pass any number of additional arguments after
+@var{display}, which were concatenated to @var{command}; this is still
+supported, but strongly discouraged.
 @end defun
 
-@defun process-file-shell-command command &optional infile destination display &rest args
+@defun process-file-shell-command command &optional infile destination display
 This function is like @code{call-process-shell-command}, but uses
 @code{process-file} internally.  Depending on @code{default-directory},
-@var{command} can be executed also on remote hosts.
+@var{command} can be executed also on remote hosts.  An old calling
+convention allowed to pass any number of additional arguments after
+@var{display}, which were concatenated to @var{command}; this is still
+supported, but strongly discouraged.
 @end defun
 
 @defun shell-command-to-string command
@@ -688,6 +692,61 @@ use the function @code{process-tty-name} (@pxref{Process
 Information}).
 @end defvar
 
+@defun make-process &rest args
+This function is like @code{start-process}, but takes keyword arguments.
+
+The arguments @var{args} are a list of keyword/argument pairs.
+Omitting a keyword is always equivalent to specifying it with value
+@code{nil}.  Here are the meaningful keywords:
+
+@table @asis
+@item :name @var{name}
+Use the string @var{name} as the process name.  It is modified if
+necessary to make it unique.
+
+@item :buffer @var{buffer}
+Use @var{buffer} as the process buffer.
+
+@item :command @var{command}
+Use @var{command} as the command line of the process.  @var{command}
+is a list starting with the program's executable file name, followed
+by strings to give to program as arguments.
+
+@item :coding @var{coding}
+If @var{coding} is a symbol, it specifies the coding system to be
+used for both reading and writing of data from and to the
+connection.  If @var{coding} is a cons cell
+@w{@code{(@var{decoding} . @var{encoding})}}, then @var{decoding}
+will be used for reading and @var{encoding} for writing.
+
+If @var{coding} is @code{nil}, the default rules for finding the
+coding system will apply.  @xref{Default Coding Systems}.
+
+@item :connection-type @var{TYPE}
+Initialize the type of device used to communicate with the subprocess.
+Possible values are @code{pty} to use a pty, @code{pipe} to use a
+pipe, or @code{nil} to use the default derived from the value of
+the @code{process-connection-type} variable.
+
+@item :noquery @var{query-flag}
+Initialize the process query flag to @var{query-flag}.
+@xref{Query Before Exit}.
+
+@item :stop @var{stopped}
+If @var{stopped} is non-@code{nil}, start the process in the
+``stopped'' state.
+
+@item :filter @var{filter}
+Initialize the process filter to @var{filter}.
+
+@item :sentinel @var{sentinel}
+Initialize the process sentinel to @var{sentinel}.
+@end table
+
+The original argument list, modified with the actual connection
+information, is available via the @code{process-contact} function.
+@end defun
+
 @node Deleting Processes
 @section Deleting Processes
 @cindex deleting processes
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index 61fac78e4a..87513e8f9c 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -541,11 +541,15 @@ and what they mean:
 @item [:ascii:]
 This matches any @acronym{ASCII} character (codes 0--127).
 @item [:alnum:]
-This matches any letter or digit.  (At present, for multibyte
-characters, it matches anything that has word syntax.)
+This matches any letter or digit.  For multibyte characters, it
+matches characters whose Unicode @samp{general-category} property
+(@pxref{Character Properties}) indicates they are alphabetic or
+decimal number characters.
 @item [:alpha:]
-This matches any letter.  (At present, for multibyte characters, it
-matches anything that has word syntax.)
+This matches any letter.  For multibyte characters, it matches
+characters whose Unicode @samp{general-category} property
+(@pxref{Character Properties}) indicates they are alphabetic
+characters.
 @item [:blank:]
 This matches space and tab only.
 @item [:cntrl:]
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index f82c496275..1af353590c 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -695,9 +695,76 @@ concatenation of @var{sequences}.  @var{type} may be: @code{vector},
 @end example
 @end defun
 
+@defun seq-mapcat function sequence &optional type
+  This function returns the result of applying @code{seq-concatenate}
+to the result of applying @var{function} to each element of
+@var{sequence}.  The result is a sequence of type @var{type}, or a
+list if @var{type} is @code{nil}.
+
+@example
+@group
+(seq-mapcat #'seq-reverse '((3 2 1) (6 5 4)))
+@result{} (1 2 3 4 5 6)
+@end group
+@end example
+@end defun
+
+@defun seq-partition sequence n
+  This function returns a list of the elements of @var{sequence}
+grouped into sub-sequences of length @var{n}.  The last sequence may
+contain less elements than @var{n}.  @var{n} must be an integer.  If
+@var{n} is a negative integer or 0, nil is returned.
+
+@example
+@group
+(seq-partition '(0 1 2 3 4 5 6 7) 3)
+@result{} ((0 1 2) (3 4 5) (6 7))
+@end group
+@end example
+@end defun
+
+@defun seq-group-by function sequence
+  This function separates the elements of @var{sequence} into an alist
+whose keys are the result of applying @var{function} to each element
+of @var{sequence}.  Keys are compared using @code{equal}.
+
+@example
+@group
+(seq-group-by #'integerp '(1 2.1 3 2 3.2))
+@result{} ((t 1 3 2) (nil 2.1 3.2))
+@end group
+@group
+(seq-group-by #'car '((a 1) (b 2) (a 3) (c 4)))
+@result{} ((b (b 2)) (a (a 1) (a 3)) (c (c 4)))
+@end group
+@end example
+@end defun
+
+@defun seq-into sequence type
+  This function converts the sequence @var{sequence} into a sequence
+of type @var{type}.  @var{type} can be one of the following symbols:
+@code{vector}, @code{string} or @code{list}.
+
+@example
+@group
+(seq-into [1 2 3] 'list)
+@result{} (1 2 3)
+@end group
+@group
+(seq-into nil 'vector)
+@result{} []
+@end group
+@group
+(seq-into "hello" 'vector)
+@result{} [104 101 108 108 111]
+@end group
+@end example
+@end defun
+
+
 @defmac seq-doseq (var sequence [result]) body@dots{}
 @cindex sequence iteration
-This macro is like @code{dolist}, except that @var{sequence} can be a list,
+  This macro is like @code{dolist}, except that @var{sequence} can be a list,
 vector or string (@pxref{Iteration} for more information about the
 @code{dolist} macro).  This is primarily useful for side-effects.
 @end defmac
diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi
index e52a543110..dfad2d83d5 100644
--- a/doc/lispref/streams.texi
+++ b/doc/lispref/streams.texi
@@ -344,7 +344,7 @@ When reading or writing from the standard input/output streams of the
 Emacs process in batch mode, it is sometimes required to make sure any
 arbitrary binary data will be read/written verbatim, and/or that no
 translation of newlines to or from CR-LF pairs are performed.  This
-issue does not exist on Posix hosts, only on MS-Windows and MS-DOS.
+issue does not exist on Posix hosts, only on MS-Windows and MS-DOS@.
 The following function allows to control the I/O mode of any standard
 stream of the Emacs process.
 
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index a7cfb22e88..da67ec2b54 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -811,7 +811,7 @@ Delete trailing whitespace in the region defined by @var{start} and
 This command deletes whitespace characters after the last
 non-whitespace character in each line in the region.
 
-If this command acts on the entire buffer (i.e. if called
+If this command acts on the entire buffer (i.e., if called
 interactively with the mark inactive, or called from Lisp with
 @var{end} @code{nil}), it also deletes all trailing lines at the end of the
 buffer if the variable @code{delete-trailing-lines} is non-@code{nil}.
@@ -2720,7 +2720,7 @@ text properties are considered, since strings never have overlays.
 @defun get-pos-property position prop &optional object
 This function is like @code{get-char-property}, except that it pays
 attention to properties' stickiness and overlays' advancement settings
-instead of the property of the character at (i.e. right after)
+instead of the property of the character at (i.e., right after)
 @var{position}.
 @end defun
 
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index e75589f92e..2fd0d2c3eb 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,76 @@
+2015-03-25  Glenn Morris  
+
+	* newsticker.texi (Supported Formats): Remove dead url.
+
+	* remember.texi (Function Reference): Copyedit.
+
+	* idlwave.texi (HTML Help Browser Tips): Remove obsolete info.
+
+2015-03-18  Eli Zaretskii  
+
+	* efaq-w32.texi: Remove outdated information and update.
+
+2015-03-18  Martin Rudalics  
+
+	* efaq.texi (Fullscreen mode on MS-Windows):
+	Fix description (Bug#20110).
+
+2015-03-04  Michael Albinus  
+
+	* tramp.texi (External methods) : Explain, when Tramp
+	connects to devices.  Mention port numbers.
+	(GVFS based methods, File name completion): Add index.
+	(Multi-hops, Remote Programs, File name completion, Ad-hoc multi-hops):
+	Improve wording.
+
+	* trampver.texi: Update release number.
+
+2015-03-03  Kelvin White  
+
+	* erc.texi (Advanced Usage, Options): Add descriptions and examples
+	for erc-format-nick-function and erc-rename-buffers options.
+	(Connecting): Fix typo
+
+2015-03-02  Daniel Colascione  
+
+	* cl.texi (Iteration Clauses): Mention iterator support.
+
+2015-02-25  Tassilo Horn  
+
+	* reftex.texi (Multifile Documents): Document
+	reftex-include-file-commands.
+	(Options): Mention that non-customize changes might require
+	calling reftex-compile-variables.
+
+2015-02-21  Paul Eggert  
+
+	* texinfo.tex: Update from gnulib.
+
+2015-02-10  Lars Ingebrigtsen  
+
+	* eww.texi (Basics): Mention eww-toggle-fonts.
+
+2015-02-05  Glenn Morris  
+
+	* auth.texi (Multiple GMail accounts with Gnus): Markup fix.
+
+2015-02-05  Teodor Zlatanov  
+
+	* auth.texi (Multiple GMail accounts with Gnus): Add FAQ.
+
+2015-02-05  Lars Ingebrigtsen  
+
+	* gnus.texi (Using IMAP): Fix menu node name.
+
+2015-02-05  Trevor Murphy  
+
+	* gnus.texi (Support for IMAP Extensions): Document the Gmail label
+	extension.
+
+2015-02-04  Paul Eggert  
+
+	* texinfo.tex: Update from gnulib.
+
 2015-01-23  Thomas Fitzsimmons  
 
 	* eudc.texi (LDAP Configuration): Rename from LDAP Requirements
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi
index 44fcad8d49..7a2fd9b2e3 100644
--- a/doc/misc/auth.texi
+++ b/doc/misc/auth.texi
@@ -59,6 +59,7 @@ It is a way for multiple applications to share a single configuration
 @menu
 * Overview::                    Overview of the auth-source library.
 * Help for users::
+* Multiple GMail accounts with Gnus::
 * Secret Service API::
 * Help for developers::
 * GnuPG and EasyPG Assistant Configuration::
@@ -110,9 +111,9 @@ You can use spaces inside a password or other token by surrounding the
 token with either single or double quotes.
 
 You can use single quotes inside a password or other token by
-surrounding it with double quotes, e.g. @code{"he'llo"}. Similarly you
+surrounding it with double quotes, e.g., @code{"he'llo"}. Similarly you
 can use double quotes inside a password or other token by surrounding
-it with single quotes, e.g. @code{'he"llo'}. You can't mix both (so a
+it with single quotes, e.g., @code{'he"llo'}. You can't mix both (so a
 password or other token can't have both single and double quotes).
 
 All this is optional. You could just say (but we don't recommend it,
@@ -229,6 +230,27 @@ don't use a port entry, you match any Tramp method, as explained
 earlier.  Since Tramp has about 88 connection methods, this may be
 necessary if you have an unusual (see earlier comment on those) setup.
 
+@node Multiple GMail accounts with Gnus
+@chapter Multiple GMail accounts with Gnus
+
+For multiple GMail accounts with Gnus, you have to make two nnimap
+entries in your @code{gnus-secondary-select-methods} with distinct
+names:
+
+@example
+(setq gnus-secondary-select-methods '((nnimap "gmail"
+                                         (nnimap-address "imap.gmail.com"))
+                                      (nnimap "gmail2"
+                                         (nnimap-address "imap.gmail.com"))))
+@end example
+
+Your netrc entries will then be:
+
+@example
+machine gmail login account@@gmail.com password "account password" port imap
+machine gmail2 login account2@@gmail.com password "account2 password" port imap
+@end example
+
 @node Secret Service API
 @chapter Secret Service API
 
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 30e39c4311..62a81b81ec 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -36800,7 +36800,7 @@ desired function, or with @kbd{x} or @kbd{z} followed by a function name,
 or with @kbd{$} to take a formula from the top of the stack, or with
 @kbd{'} and a typed formula.  In the last two cases, the formula may
 be a nameless function like @samp{<#1+#2>} or @samp{}, or it
-may include @kbd{$}, @kbd{$$}, etc. (where @kbd{$} will correspond to the
+may include @kbd{$}, @kbd{$$}, etc.@: (where @kbd{$} will correspond to the
 last argument of the created function), or otherwise you will be
 prompted for an argument list.  The number of vectors popped from the
 stack by @kbd{V M} depends on the number of arguments of the function.
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index 1b79640d77..068706a915 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -1038,7 +1038,7 @@ Movement}.  They might be removed from a future release of @ccmode{}.
 Since there's a lot of normal text in comments and string literals,
 @ccmode{} provides features to edit these like in text mode.  The goal
 is to do it seamlessly, i.e., you can use auto fill mode, sentence and
-paragraph movement, paragraph filling, adaptive filling etc. wherever
+paragraph movement, paragraph filling, adaptive filling etc.@: wherever
 there's a piece of normal text without having to think much about it.
 @ccmode{} keeps the indentation, fixes suitable comment line prefixes,
 and so on.
@@ -7140,7 +7140,7 @@ of XEmacs since 19.16.
 Due to release schedule skew, it is likely that all of these Emacsen
 have old versions of @ccmode{} and so should be upgraded.  Access to the
 @ccmode{} source code, as well as more detailed information on Emacsen
-compatibility, etc. are all available on the web site:
+compatibility, etc.@: are all available on the web site:
 
 @quotation
 @uref{http://cc-mode.sourceforge.net/}
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index 6677602935..c6076babac 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -296,6 +296,13 @@ list.  Also, the function body is enclosed in an implicit block
 called @var{name}; @pxref{Blocks and Exits}.
 @end defmac
 
+@defmac cl-iter-defun name arglist body@dots{}
+This form is identical to the regular @code{iter-defun} form, except
+that @var{arglist} is allowed to be a full Common Lisp argument
+list.  Also, the function body is enclosed in an implicit block
+called @var{name}; @pxref{Blocks and Exits}.
+@end defmac
+
 @defmac cl-defsubst name arglist body@dots{}
 This is just like @code{cl-defun}, except that the function that
 is defined is automatically proclaimed @code{inline}, i.e.,
@@ -2237,6 +2244,11 @@ This clause is like @code{always}, except that the loop returns
 This clause stops the loop when the specified form is non-@code{nil};
 in this case, it returns that non-@code{nil} value.  If all the
 values were @code{nil}, the loop returns @code{nil}.
+
+@item iter-by @var{iterator}
+This clause iterates over the values from the specified form, an
+iterator object.  See (@pxref{Generators,,,elisp,GNU Emacs Lisp
+Reference Manual}).
 @end table
 
 @node Accumulation Clauses
diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi
index 9691a73112..ab5eb06691 100644
--- a/doc/misc/efaq-w32.texi
+++ b/doc/misc/efaq-w32.texi
@@ -128,10 +128,12 @@ systems.
 @cindex supported versions of Windows
 
 Emacs @value{EMACSVER} is known to run on all versions of Windows from
-@c FIXME does it really still support Windows 98?  Does it matter?
-Windows 98 and Windows NT 4.0 through to Windows 7.  The Windows port is
-built using the Win32 API and supports most features of the X version,
-including variable width fonts, images and tooltips.
+Windows 98 and Windows NT 4.0 through to Windows 8.1.  The Windows
+port is built using the Win32 API and supports most features of the X
+version, including variable width fonts, images and tooltips.
+
+Emacs on Windows can be compiled as either a 32-bit or a 64-bit
+executable, using the MinGW GCC compiler and development tools.
 
 @node Other versions of Emacs
 @section What other versions of Emacs run on Windows?
@@ -163,10 +165,12 @@ instructions (requires DJGPP).
 @cindex where to get Emacs binaries
 Pre-compiled versions are distributed from
 @uref{http://ftpmirror.gnu.org/emacs/windows/, ftp.gnu.org mirrors}.
-Emacs binaries are distributed as zip files, digitally
-signed by the developer who built them.  Generally most users will
-want the file @file{emacs-@value{EMACSVER}-bin-i386.zip}, which
-contains everything you need to get started.
+Emacs binaries are distributed as zip files, digitally signed by the
+developer who built them.  Generally most users will want the file
+@file{emacs-@value{EMACSVER}-bin-i686-pc-mingw.zip} for the 32-bit
+build, and @file{emacs-@value{EMACSVER}-bin-x86_64-w64-mingw32.zip}
+for the 64-bit build.  The zip archive contains everything you need to
+get started.
 
 @cindex where to get sources
 @cindex Emacs source code
@@ -187,17 +191,18 @@ development site.
 @section How can I compile Emacs myself?
 @cindex compiling Emacs
 
-To compile Emacs on Windows, you will need the MingW or Cygwin port of
-GCC with MingW make, or a Microsoft C compiler with nmake and the
-single threaded C runtime library.  Recent versions of Microsoft
-Visual Studio no longer come with the single threaded C runtime
-library, which is required for certain POSIX compatibility, so MingW
-is usually the best choice.  Image support requires external
-libraries, the headers and import libraries for which will need to be
-installed where your compiler can find them.  You will also need ports
-of GNU @command{rm} and @command{cp}, as the Windows native
-equivalents are not consistent between versions.  GNU texinfo will be
-required to build the manuals.  @xref{Other useful ports}.
+To compile Emacs on Windows, you will need the MinGW port of GCC and
+Binutils, the MinGW runtime and development environment, and the MSYS
+suite of tools.  For the details, see the file @file{nt/INSTALL} in
+the Emacs source distribution.
+
+Support for displaying images, as well as XML/HTML rendering and TLS
+networking requires external libraries, the headers and import
+libraries for which will need to be installed where your compiler can
+find them.  Again, the details, including URLs of sites where you can
+download these libraries are in @file{nt/INSTALL}.  @xref{Other useful
+ports}, for auxiliary tools you may wish to install and use in
+conjunction with Emacs.
 
 After unpacking the source, or checking out of the repository, be sure
 to read the instructions in @file{nt/README} and @file{nt/INSTALL}.
@@ -211,39 +216,25 @@ to read the instructions in @file{nt/README} and @file{nt/INSTALL}.
 By default, Emacs is compiled with debugging on, and optimizations enabled.
 The optimizations may interfere with some types of debugging; the debugger
 may not show clearly where it is, or may not be able to inspect certain
-variables.  If this is the case, reconfigure with @option{--no-opt}.
+variables.  If this is the case, reconfigure with @kbd{CFLAGS='-O0 -g3'}
 
 The file @file{etc/DEBUG} contains general debugging hints, as well as
-specific notes about debugging Emacs with both gdb and Microsoft debuggers.
-
-@menu
-* GDB::
-* Microsoft Developer Studio::
-@end menu
+specific notes about debugging Emacs.
 
-@node GDB
-@subsection GDB
-@cindex GDB, debugging Emacs with
 @cindex debugging Emacs with GDB
-
 GDB is the GNU debugger, which can be used to debug Emacs when it has
-been compiled with GCC.  The best results will be obtained if you
-start gdb from the @file{src} directory as @samp{gdb oo/i386/emacs.exe}.
-This will load the init file @file{.gdbinit} in that directory, to
-define some extra commands for working with lisp while debugging, and
-set up breakpoints to catch abnormal aborts.
-
-@node Microsoft Developer Studio
-@subsection Microsoft Developer Studio
-@cindex MSVC++, debugging Emacs with
-@cindex DevStudio, debugging Emacs with
-@cindex debugging Emacs with MS DevStudio
-
-MS DevStudio can be used to debug Emacs when it has been compiled with
-a Microsoft compiler.  To view lisp variables, you can call the
-function @code{debug_print} from the Quickwatch window.  Some
-@uref{http://www.gnu.org/software/emacs/windows/ntemacs/discuss/debug.txt,
-old tips} are probably still valid.
+been compiled with MinGW GCC.  The best results will be obtained if
+you start gdb from the @file{src} directory as @kbd{gdb ./emacs.exe}.
+This will load the init file @file{.gdbinit}@footnote{
+Latest versions of GDB might refuse to load the init file for security
+reasons, unless you customize GDB; alternatively, use an explicit
+@kbd{source ./gdbinit} command after entering GDB.
+} in that directory, to define some extra commands for working with
+lisp while debugging, and set up breakpoints to catch abnormal
+aborts.
+
+A Windows port of GDB can be found on MinGW download sites and on some
+others.
 
 @c ------------------------------------------------------------
 @node Installing Emacs
@@ -251,7 +242,7 @@ old tips} are probably still valid.
 
 @menu
 * Unpacking::
-* Installing::
+* Installing binaries::
 * Image support::
 * Init file::
 * Location of init file::
@@ -279,24 +270,27 @@ old tips} are probably still valid.
 The binary distributions are distributed as zip files, which are handled
 natively by Windows XP and later.  For earlier versions, there are many
 tools that can handle the zip format, from InfoZip's command line unzip
-tool, to 7zip's multi-format graphical archive explorer.  Although
+tool, to 7zip's multi-format graphical archive explorer.  (Although
 popular, WinZip has caused problems with line-ends in the past, and is not
-Free software, so we do not recommend it.
+Free software, so we do not recommend it.)
 
-Source distributions are distributed as gzipped tar files.  7zip and
-similar multi-format graphical tools can handle these, or you can get
-Windows ports of the command line gzip and tar tools from multiple sources.
+Source distributions are distributed as @file{.tar.gz} or
+@file{.tar.xz} files.  7zip and similar multi-format graphical tools
+can handle these, or you can get Windows ports of the command line
+gzip and tar tools from multiple sources, or use @command{bsdtar}.
 @xref{Other useful ports}.
 
 The command to unpack a source distribution from the command line is:
+
 @example
 tar xzf emacs-@value{EMACSVER}.tar.gz
 @end example
 
 If this does not work with the versions of tar and gzip that you have,
 you may need to try a two step process:
+
 @example
-gzip -dc emacs-@value{EMACSVER}.tar.gz | tar xvf -
+gzip -dc emacs-@value{EMACSVER}.tar.gz | tar xf -
 @end example
 
 You may see many messages from tar complaining about being unable to change
@@ -304,8 +298,21 @@ the modification time on directories, and from gzip complaining about a
 broken pipe.  These messages are usually harmless, caused by incomplete ports
 that are not fully aware of the limitations of Windows.
 
-@node Installing
-@section How do I install Emacs after unpacking?
+And here's an example of using @command{bsdtar} (from the
+@samp{libarchive} package) to unpack a @file{.tar.xz} archive:
+
+@example
+bsdtar -xf emacs-@value{EMACSVER}.tar.xz
+@end example
+
+Expect @command{bsdtar} to unpack the whole distribution without any
+complaints.
+
+Once you unpack the source distribution, look in @file{nt/INSTALL}
+file for build instructions.
+
+@node Installing binaries
+@section How do I install Emacs after unpacking the binary zip?
 @cindex installing Emacs
 @pindex addpm
 @cindex Start Menu, creating icons for Emacs
@@ -313,7 +320,8 @@ that are not fully aware of the limitations of Windows.
 You can run Emacs without any extra steps, but if you want icons in your
 Start Menu, or for Emacs to detect the image libraries that are already
 installed on your system as part of GTK, then you should run the program
-@file{emacs-@value{EMACSVER}\bin\addpm.exe}.
+@file{addpm.exe}, which is usually installed into the same @file{bin}
+directory with @file{emacs.exe}.
 
 @node Image support
 @section How do I get image support?
@@ -323,6 +331,7 @@ installed on your system as part of GTK, then you should run the program
 @cindex gif, installing image support in Emacs
 @cindex tiff, installing image support in Emacs
 @cindex xpm, installing image support in Emacs
+@cindex rsvg, installing image support in Emacs
 @cindex toolbar, installing color icons in
 @cindex color images, installing support for images in Emacs
 @cindex monochrome images, getting color images in Emacs
@@ -330,12 +339,12 @@ installed on your system as part of GTK, then you should run the program
 
 Emacs has built in support for XBM and PBM/PGM/PPM images.  This is
 sufficient to see the monochrome splash screen and tool-bar icons.
-Since 22.2, the official precompiled binaries for Windows have bundled
+Since v22.2, the official precompiled binaries for Windows have bundled
 libXpm, which is required to display the color versions of those images.
 
-Emacs is compiled to recognize JPEG, PNG, GIF and TIFF images also,
-but displaying these image types require external DLLs which are not
-bundled with Emacs.  @xref{Other useful ports}.
+Emacs is compiled to recognize JPEG, PNG, GIF, TIFF, and RSVG images
+also, but displaying these image types require external DLLs which are
+not bundled with Emacs.  @xref{Other useful ports}.
 
 @node Init file
 @section What is my init file?
@@ -344,11 +353,11 @@ bundled with Emacs.  @xref{Other useful ports}.
 
 When Emacs starts up, it attempts to load and execute the contents of
 a file commonly called @file{.emacs} (though it may have other names,
-@pxref{Installing Emacs,,Where do I put my init file?}) which contains any
-customizations you have made.  You can manually add lisp code to your
-.emacs, or you can use the Customization interface accessible from the
-@emph{Options} menu.  If the file does not exist, Emacs will start
-with the default settings.
+@pxref{Location of init file,,Where do I put my init file?}) which
+contains any customizations you have made.  You can manually add lisp
+code to your .emacs, or you can use the Customization interface
+accessible from the @emph{Options} menu.  If the file does not exist,
+Emacs will start with the default settings.
 
 @node Location of init file
 @section Where do I put my init file?
@@ -358,15 +367,15 @@ with the default settings.
 @cindex init.el
 @cindex registry, setting the HOME directory in
 
-On Windows, the .emacs file may be called _emacs for backward
-compatibility with DOS and FAT filesystems where filenames could not
-start with a dot.  Some users prefer to continue using such a name,
-because Explorer cannot create a file with a name starting with a dot,
-even though the filesystem and most other programs can handle it.
-In Emacs 22 and later, the init file may also be called
-@file{.emacs.d/init.el}.  Many of the other files that are created
-by lisp packages are now stored in the @file{.emacs.d} directory too,
-so this keeps all your Emacs related files in one place.
+On Windows, the @file{.emacs} file may be called @file{_emacs} for
+backward compatibility with DOS and FAT filesystems where filenames
+could not start with a dot.  Some users prefer to continue using such
+a name due to historical problems various Windows tools had in the
+past with file names that begin with a dot.  In Emacs 22 and later,
+the init file may also be called @file{.emacs.d/init.el}.  Many of the
+other files that are created by lisp packages are now stored in the
+@file{.emacs.d} directory too, so this keeps all your Emacs related
+files in one place.
 
 All the files mentioned above should go in your @env{HOME} directory.
 The @env{HOME} directory is determined by following the steps below:
@@ -387,14 +396,14 @@ backward compatibility, as previous versions defaulted to @file{C:/}
 if @env{HOME} was not set.
 @item
 Use the user's AppData directory, usually a directory called
-@file{Application Data} under the user's profile directory, the location
+@file{AppData} under the user's profile directory, the location
 of which varies according to Windows version and whether the computer is
 part of a domain.
 @end enumerate
 
 Within Emacs, @key{~} at the beginning of a file name is expanded to your
-@env{HOME} directory, so you can always find your .emacs file with
-@kbd{C-x C-f ~/.emacs}.
+@env{HOME} directory, so you can always find your @file{.emacs} file
+by typing the command @kbd{C-x C-f ~/.emacs}.
 
 @node Troubleshooting init file
 @section Troubleshooting init file problems
@@ -409,15 +418,16 @@ to.  You can do this by evaluating the following expression in the
 @file{*scratch*} buffer using @kbd{C-x C-e}:
 
 @example
-(insert (getenv "HOME"))
+(getenv "HOME")
 @end example
 
-Look carefully at what is printed and make sure the value is
-valid.  For example, if the value has trailing whitespace, Emacs won't
-be able to find the directory.  Also, be sure that the value isn't a
-relative drive letter (e.g., @file{d:} without a backslash); if it is,
-then @env{HOME} is going to be whatever the current directory on that
-drive is, which is likely not what you want to happen.
+Look carefully at what is printed in the echo area, and make sure the
+value is valid.  For example, if the value has trailing whitespace,
+Emacs won't be able to find the directory.  Also, be sure that the
+value isn't a relative drive letter (e.g., @file{d:} without a
+backslash or a forward slash after the colon); if it is, then
+@env{HOME} is going to be whatever the current directory on that drive
+is, which is likely not what you want to happen.
 
 @node Associate files with Emacs
 @section How do I associate files with Emacs?
@@ -488,9 +498,9 @@ Thanks to Jason Rumney and Sigbjorn Finne for these tips.
 
 The location of the Desktop varies between different versions of
 Windows, and in a corporate environment can be moved around by the
-network administrator.  On NT derivatives, you can use the value of
-the @env{USERPROFILE} environment variable to find where the desktop
-might be:
+network administrator.  On latest Windows versions, you can use the
+value of the @env{USERPROFILE} environment variable to find where the
+desktop might be:
 
 @example
 @kbd{C-x C-f $USERPROFILE/Desktop}
@@ -512,7 +522,7 @@ menu by default).  Once you have a file from the Desktop inside Emacs,
 @end menu
 
 @node Focus follows mouse
-@subsection How do it make the active window follow the mouse?
+@subsection How do I make the active window follow the mouse?
 @vindex focus-follows-mouse
 @cindex point to focus
 @cindex mouse over to focus
@@ -524,6 +534,11 @@ even though Windows has a click to focus policy by default (there is
 software available to change that though).  The latter can be used to
 make Emacs use a focus-follow-mouse policy within its own frames.
 
+You can also change the Windows click-to-focus policy by changing
+settings in the Registry.  The details vary according to your Windows
+version; look on the Internet for instructions to enable ``active
+window tracking'' for your version of Windows.
+
 @node Swap CapsLock and Control
 @subsection How do I swap CapsLock and Control?
 @cindex scan codes, modifying
@@ -576,7 +591,7 @@ Date: 04 Dec 1996 14:36:21 -0600
 Message-ID: 
 Subject: Re: Re[2]: problem with caps/ctrl swap on NT 4.0
 @end ignore
-@example
+@smallexample
 It's a binary value that lets you map keystrokes in the low-level keyboard
 drivers in NT.  As a result you don't have to worry about applications
 bypassing mappings that you've done at a higher level (i.e. it just works).
@@ -600,7 +615,7 @@ lock key will behave as caps-lock.  To swap, you also need to map 0x3a to
 
 This registry value is system wide, and can't be made user-specific.  It
 also only takes affect on reboot.
-@end example
+@end smallexample
 @item
 Ulfar Erlingsson has provided a registry file that sets the CapsLock key
 to be a Control key and the Windows key to be an Alt key:
@@ -663,7 +678,8 @@ buffers etc. will instead act on the region.  An inactive mark needs
 to be reactivated to operate on it, unless @code{mark-even-if-inactive}
 is set.  Secondly, @code{transient-mark-mode} also highlights the
 region when it is active, providing the same visual clue that you get
-in other programs.
+in other programs.  This mode is turned on by default in latest
+versions of Emacs.
 
 In addition to seeing the highlighting, new Emacs users often expect
 editing commands to replace the region when it is active.  This behavior
@@ -717,14 +733,16 @@ message as documented in Microsoft's API documentation.
 @cindex delete Emacs directory
 
 Emacs does not come with an uninstall program.  No files are installed
-outside of the Emacs base directory, so deleting that directory is
-sufficient to clean away the files.  If you ran @command{addpm},
-you'll need to delete the Start Menu group too.  The registry entries
-inserted by @command{addpm} will not cause any problems if you leave
-them there, but for the sake of completeness, you can use @command{regedit}
-to remove the keys under @code{HKEY_LOCAL_MACHINE} orx
-@code{HKEY_CURRENT_USER}: @code{SOFTWARE\GNU\Emacs}, and the key
-@code{HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\emacs.exe} if it exists.
+outside of the directories you find in the binary zip archive, so
+deleting those directories is sufficient to clean away the files.  If
+you ran @command{addpm}, you'll need to delete the Start Menu group
+too.  The registry entries inserted by @command{addpm} will not cause
+any problems if you leave them there, but for the sake of
+completeness, you can use @command{regedit} to remove the keys under
+@code{HKEY_LOCAL_MACHINE} or @code{HKEY_CURRENT_USER}:
+@code{SOFTWARE\GNU\Emacs}, and the key
+@code{HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
+Paths\emacs.exe} if it exists.
 
 @node Does not run
 @section When I run Emacs nothing happens
@@ -751,9 +769,10 @@ been truncated to CONTRIBU or CONTRI~1, your distribution has been
 corrupted while unpacking and Emacs will not start.
 @end enumerate
 
-If it is still not working, send mail to the list, describing what
-you've done, and what you are seeing. (The more information you send
-the more likely it is that you'll receive a helpful response..
+If it is still not working, send mail to the
+@email{help-gnu-emacs@@gnu.org} mailing list, describing what you've
+done, and what you are seeing. (The more information you send the more
+likely it is that you'll receive a helpful response.)
 
 @node Virus
 @section Does Emacs contain a virus?
@@ -880,7 +899,6 @@ The doc string contains a list of the system sounds you can use.
 * Font names::
 * Bold and italic::
 * Multilingual fonts::
-* BDF fonts::
 * Font menu::
 * Line ends::
 @end menu
@@ -910,9 +928,9 @@ an indication of whether the font is outline (.TTF, .ATM) or raster (.FON)
 based when fonts are listed, which may let you differentiate between two
 fonts with the same name and different technologies.
 
-From Emacs 23, the preferred font name format will be moving to the simpler
-and more flexible fontconfig format.  XLFD names will continue to be
-supported for backward compatibility.
+Starting with Emacs 23, the preferred font name format will be moving
+to the simpler and more flexible fontconfig format.  XLFD names will
+continue to be supported for backward compatibility.
 
 @example
 XLFD: -*-Courier New-normal-r-*-*-13-*-*-*-c-*-iso8859-1
@@ -959,6 +977,9 @@ and manually set the font for italic, bold and bold-italic as follows:
 (set-face-font 'bold-italic "-*-Courier New-bold-i-*-*-11-*-*-*-c-*-iso8859-1")
 @end example
 
+The @code{w32-enable-synthesized-fonts} variable is obsolete starting
+from Emacs 24.4, as Emacs no longer has this limitation.
+
 @node Multilingual fonts
 @section Multilingual font support
 @cindex multilingual display, fonts
@@ -985,11 +1006,8 @@ require the BDF fonts from the GNU intlfonts package.
 
 For many languages, native truetype fonts are sufficient, and in Emacs
 23 the need for BDF fonts will disappear for almost all languages.  At
-the time of writing, some Arabic characters in the HELLO file still do
-not display with native fonts, because they are pre-composed characters
-from MULE character sets rather than standard Unicode Arabic, but all
-other characters are able to be displayed with appropriate truetype or
-opentype fonts.
+the time of writing, all supported characters are able to be displayed
+with appropriate truetype or opentype fonts.
 
 @node Non-latin display
 @subsection How do I get Emacs to display non-latin characters?
@@ -1025,6 +1043,12 @@ new fontset with @code{create-fontset-from-ascii-font} or
  chinese-big5-2:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5-*" t)
 @end example
 
+Alternatively, you can augment the default fontset with information of
+which fonts to use for certain ranges of characters or for specific
+scripts/character sets.  @xref{Modifying Fontsets,, Modifying
+Fontsets, emacs, The GNU Emacs Manual}, for details and some useful
+examples.
+
 @node International fonts
 @subsection Where can I find fonts for other languages?
 @cindex language support, finding fonts
@@ -1037,10 +1061,10 @@ new fontset with @code{create-fontset-from-ascii-font} or
 In addition to the wide range of fonts that come with the language
 support packages of various components of Windows itself, GNU/Linux
 distributions these days come with a number of Free truetype fonts
-that cover a wide range of languages.  The GNU intlfonts source
-distribution contains BDF fonts covering all of the languages that can
-be displayed by Emacs 22, and can be downloaded from
-@uref{http://ftpmirror.gnu.org/intlfonts, ftp.gnu.org mirrors}.
+that cover a wide range of languages.  The GNU Unifont project
+contains glyphs for most of the Unicode codespace, and can be
+downloaded from @uref{http://ftpmirror.gnu.org/unifont, ftp.gnu.org
+mirrors}.
 
 @node Third-party multibyte
 @subsection How do I use third party programs to display multibyte characters?
@@ -1058,12 +1082,6 @@ for that language, but the third party software is intercepting it
 and using a different font behind the scenes).
 @xref{Non-latin display}.
 
-In addition to defining a fontset with the expected font, you may also need
-to disable unicode output with:
-@example
-(setq w32-enable-unicode-output nil)
-@end example
-
 @node Localized fonts
 @subsection Can I use a font with a name in my language?
 @cindex fonts, localized font names
@@ -1073,87 +1091,7 @@ Normally Emacs should initialize @code{locale-coding-system} appropriately
 based on your locale, which will let Emacs use font names in your local
 language successfully.
 
-@node BDF fonts
-@section How do I use bdf fonts with Emacs?
-@cindex BDF fonts, using
-@cindex GNU intlfonts, using
-@cindex intlfonts, using
-@vindex w32-bdf-filename-alist
-@vindex bdf-directory-alist
-@vindex font-encoding-alist
-@findex w32-find-bdf-fonts
-@findex set-frame-font
-
-To use bdf fonts with Emacs, you need to tell Emacs where the fonts
-are located, create fontsets for them, and then use them.  We'll use
-the 16 dot international fonts from @uref{http://ftpmirror.gnu.org/intlfonts,
-ftp.gnu.org/gnu/intlfonts} as an
-example put together by Jason Rumney.
-
-Download @file{16dots.tar.gz} and unpack it; I'll assume that they are in
-@file{c:\intlfonts}.  Then set @code{w32-bdf-filename-alist} to the list of
-fonts returned by using @code{w32-find-bdf-fonts} to enumerate all of
-the font files.  It is a good idea to set the variable
-@code{bdf-directory-list} at the same time so @code{ps-print} knows where
-to find the fonts:
-@example
-(setq bdf-directory-list
-      '("c:/intlfonts/Asian" "c:/intlfonts/Chinese"
-        "c:/intlfonts/Chinese-X" "c:/intlfonts/Ethiopic"
-	"c:/intlfonts/European" "c:/intlfonts/Japanese"
-        "c:/intlfonts/Japanese-X" "c:/intlfonts/Korean-X"
-	"c:/intlfonts/Misc/"))
-
-(setq w32-bdf-filename-alist (w32-find-bdf-fonts bdf-directory-list))
-@end example
-
-Then create fontsets for the BDF fonts:
-
-@example
-(create-fontset-from-fontset-spec
- "-*-fixed-medium-r-normal-*-16-*-*-*-c-*-fontset-bdf,
-japanese-jisx0208:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1983-*,
-katakana-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*,
-latin-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*,
-japanese-jisx0208-1978:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1978-*,
-thai-tis620:-misc-fixed-medium-r-normal--16-160-72-72-m-80-tis620.2529-1,
-lao:-misc-fixed-medium-r-normal--16-160-72-72-m-80-MuleLao-1,
-tibetan-1-column:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-80-MuleTibetan-1,
-ethiopic:-Admas-Ethiomx16f-Medium-R-Normal--16-150-100-100-M-160-Ethiopic-Unicode,
-tibetan:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-160-MuleTibetan-0")
-@end example
-
-Many of the international bdf fonts from gnu.org are type 0, and therefore
-need to be added to font-encoding-alist:
-
-@example
-;; Need to add some fonts to font-encoding-alist since the bdf fonts
-;; are type 0 not the default type 1.
-(setq font-encoding-alist
-      (append '(("MuleTibetan-0" (tibetan . 0))
-                ("GB2312"        (chinese-gb2312 . 0))
-                ("JISX0208"      (japanese-jisx0208 . 0))
-                ("JISX0212"      (japanese-jisx0212 . 0))
-                ("VISCII"        (vietnamese-viscii-lower . 0))
-                ("KSC5601"       (korean-ksc5601 . 0))
-                ("MuleArabic-0"  (arabic-digit . 0))
-                ("MuleArabic-1"  (arabic-1-column . 0))
-                ("MuleArabic-2"  (arabic-2-column . 0))) font-encoding-alist))
-@end example
-
-You can now use the Emacs font menu (@pxref{Fonts and text
-translation,,How can I have Emacs use a font menu like on X?}) to
-select the @emph{bdf: 16-dot medium} fontset, or you can select it by
-setting the default font:
-
-@example
-    (set-frame-font "fontset-bdf")
-@end example
-
-Try loading the file @file{etc/HELLO}, and you should be able to see the
-various international fonts displayed (except for Hindi, which is not
-included in the 16-dot font distribution).
-
+@c This feature disappeared in Emacs 23, and was resurrected in 25.1.
 @node Font menu
 @section How can I have Emacs use a font menu like on X?
 @cindex fonts, displaying a menu
@@ -1171,6 +1109,8 @@ Place the following in your init file:
 * Add fonts to menu::
 @end menu
 
+@c This variable had no effect between v23 and v25.1, where
+@c w32-use-w32-font-dialog support was resurrected, see above.
 @node Add fonts to menu
 @subsection How can I add my font to the font menu?
 @cindex font menu, adding fonts
@@ -1204,7 +1144,6 @@ this collection of email messages} on the topic.
 
 @menu
 * Automatic line ends::
-* Line ends by filename::
 * Line ends by file system::
 @end menu
 
@@ -1220,19 +1159,6 @@ file in Unix (LF) mode with the Ctrl-M characters displayed as @samp{^M}.
 It does this to be safe, as no data loss will occur if the file is really
 binary and the Ctrl-M characters are significant.
 
-@node Line ends by filename
-@subsection CR/LF translation by file extension
-@cindex line ends, determining by filename
-@cindex binary files, determining by file name
-@vindex file-name-buffer-file-type-alist
-
-The variable @code{file-name-buffer-file-type-alist} holds a list of
-filename patterns and their associated type; binary or text.  Files marked
-as binary will not have line-end detection performed on them, and instead
-will always be displayed as is.  With auto-detection in recent versions of
-Emacs, this is seldom useful for existing files, but can still be used
-to influence the choice of line ends for newly created files.
-
 @node Line ends by file system
 @subsection CR/LF translation by file system
 @cindex line ends, determining by filesystem
@@ -1260,8 +1186,9 @@ MS Windows, but this has still been insufficient to keep up with
 changes in printing technology from text and postscript based printers
 connected via ports that can be accessed directly, to graphical
 printers that are only accessible via USB.  For details, see
-@uref{http://www.emacswiki.org/cgi-bin/wiki/PrintingFromEmacs, Emacs
-Wiki}.
+@uref{http://www.emacswiki.org/emacs/PrintingFromEmacs, Emacs
+Wiki}, @uref{http://www.emacswiki.org/emacs/PrintWithWebBrowser}, and
+@uref{http://www.emacswiki.org/emacs/PrintFromWindowsExplorer}.
 
 @c ------------------------------------------------------------
 @node Sub-processes
@@ -1293,9 +1220,7 @@ Wiki}.
 The quoting rules for native Windows shells and Cygwin shells have
 some subtle differences.  When Emacs spawns subprocesses, it tries to
 determine whether the process is a Cygwin program and changes its
-quoting mechanism appropriately.  See this
-@uref{http://www.gnu.org/software/emacs/windows/ntemacs/discuss/shell-quoting,
-previous discussion} for details.
+quoting mechanism appropriately.
 
 @node Subprocess hang
 @section Programs reading input hang
@@ -1357,9 +1282,11 @@ you can use @code{setbuf} and @code{setvbuf} to manipulate
 the buffering semantics.
 
 Some programs handle this by having an explicit flag to control their
-buffering behavior, typically @option{-i} for interactive.  Other
-programs manage to detect that they are running under Emacs, by
-using @samp{getenv("emacs")} internally.
+buffering behavior, typically @option{-i} for interactive, or by a
+special environment variable.  Other programs manage to detect that
+they are running under Emacs, by using @samp{getenv("emacs")}
+internally.  Look in the program's documentation for the way around
+this issue.
 
 @menu
 * Perl script buffering::
@@ -1428,6 +1355,7 @@ this discussion} for more details.
 @vindex explicit-shell-file-name
 
 You can start an interactive shell in Emacs by typing @kbd{M-x shell}.
+By default, this will start the standard Windows shell @file{cmd.exe}.
 Emacs uses the @env{SHELL} environment variable to determine which
 program to use as the shell.  To instruct Emacs to use a non-default
 shell, you can either set this environment variable, or customize
@@ -1467,11 +1395,6 @@ default shell in Emacs, you can place the following in your init file:
 (add-hook 'shell-mode-hook 'my-shell-setup)
 @end example
 
-If you find that you are having trouble with Emacs tracking drive
-changes with bash, see Mike Fabian's
-@uref{http://www.gnu.org/software/emacs/windows/ntemacs/discuss/drive-tracking,
-note}.
-
 WARNING: Some versions of bash set and use the environment variable
 PID.  For some as yet unknown reason, if @env{PID} is set and Emacs
 passes it on to bash subshells, bash dies (Emacs can inherit the
@@ -1489,7 +1412,7 @@ continue to use bash as your subshell:
 @cindex cygwin mount points, using within Emacs
 
 The package
-@uref{http://www.emacswiki.org/cgi-bin/wiki/cygwin-mount.el,
+@uref{http://www.emacswiki.org/emacs/cygwin-mount.el,
 cygwin-mount.el} teaches Emacs about Cygwin mount points.
 
 @node Dired ls
@@ -1849,11 +1772,15 @@ your type (@code{flyspell}).  Both packages depend on a copy of
 @command{ispell} 3.2 or a compatible spell-checking program.
 GNU Aspell is a popular choice these days, Windows installers are
 available from the @uref{http://aspell.net/win32/, official site}.
+Another possibility is Hunspell, which is available from
+@uref{https://sourceforge.net/projects/ezwinports/files/?source=navbar,
+the ezwinports site}.
 
 Once installed, you will need to configure @code{ispell-program-name}
-to tell ispell and flyspell to use @command{aspell} as a replacement for
-ispell.  You can include the full path to the @file{aspell} binary, which
-means you do not need to add its installation directory to the @env{PATH}.
+to tell ispell and flyspell to use @command{aspell} or
+@command{hunspell} as a replacement for ispell.  You can include the
+full path to the @file{aspell}/@file{hunspell} binary, which means you
+do not need to add its installation directory to the @env{PATH}.
 
 @node Encryption
 @section Emacs and encryption
@@ -1942,6 +1869,13 @@ of grep is to use @samp{findstr /n /r}.
 @node Developing with Emacs
 @chapter Developing with Emacs
 
+We recommend using the GNU Compiler Collection for developing C/C++
+code from Emacs.  The MinGW development toolchain provides Windows
+ports of GCC and other compilers.
+
+The rest of this chapter describes other alternatives which you may
+need to use.
+
 @menu
 * MSVC::
 * Borland C++ Builder::
@@ -1971,7 +1905,7 @@ tools to build your project.
 
 Christopher Payne wrote a Visual Studio add-in that makes Emacs the
 default text editor, this has now been taken over by Jeff Paquette.
-See the following two URLS for details:
+See the following two URLs for details:
 @itemize
 @item @uref{http://sourceforge.net/projects/visemacs/} for the latest version.
 @item @uref{http://www.smathers.net/VisEmacs.htm} for notes on usage.
@@ -2178,6 +2112,7 @@ suggestions} for improving the interaction of perldb and Emacs.
 @menu
 * Cygwin::
 * MinGW::
+* EZWinPorts::
 * UWIN::
 * GnuWin32::
 * GTK::
@@ -2230,6 +2165,17 @@ filesystem mapping to appear more POSIX like to the scripts that it
 runs.  This is intended to complement the MinGW tools to make it easier
 to port software to Windows.
 
+@node EZWinPorts
+@section EZWinPorts
+@cindex ezwinports
+
+The @uref{https://sourceforge.net/projects/ezwinports/, EZWinPorts
+project} provides many useful ports of recent versions of GNU and Unix
+software.  This includes all the optional libraries used by Emacs
+(image libraries, libxml2, GnuTLS), RCS, Texinfo, a clone of
+@command{man} command, Grep, xz, bzip2, bsdtar, ID Utils, Findutils,
+Hunspell, Gawk, GNU Make, Groff, GDB.
+
 @node UWIN
 @section UWIN
 @cindex uwin environment
@@ -2251,8 +2197,8 @@ is @command{ksh}, the Korn shell.
 @uref{http://gnuwin32.sourceforge.net/}
 
 GnuWin32 provides precompiled native Windows ports of a wide selection
-of Free software and libraries.  Tools available here that are useful
-for Emacs include:
+of Free software and libraries.  Unfortunately, the ports are
+outdated.  Tools available here that are useful for Emacs include:
 
 @itemize
 @item Arc - used by @code{archive-mode} to edit .arc files.
@@ -2302,7 +2248,8 @@ Man pages for Emacs and other ported programs that you have can be
 read using Emacs' built-in manual reader @code{woman}.  This
 requires no external programs, but if you do have a port of
 @command{man}, there is also an Emacs wrapper @code{man} that
-which may be slightly faster.
+which may be slightly faster.  A Windows version of @command{man} is
+available from the EZWinPorts site (@pxref{EZWinPorts}).
 
 @c ------------------------------------------------------------
 @node Further information
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index 84178277aa..cdf944041b 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -2674,8 +2674,16 @@ variable in the environment.
 @cindex Maximize frame
 @cindex Fullscreen mode
 
-Use the function @code{w32-send-sys-command}.  For example, you can
-put the following in your @file{.emacs} file:
+Beginning with Emacs 24.4 either run Emacs with the @samp{--maximized}
+command-line option or put the following form in your @file{.emacs}
+file:
+
+@lisp
+(add-hook 'emacs-startup-hook 'toggle-frame-maximized)
+@end lisp
+
+With older versions use the function @code{w32-send-sys-command}.  For
+example, you can put the following in your @file{.emacs} file:
 
 @lisp
 (add-hook 'emacs-startup-hook
diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi
index 3f42862f07..f17fd31a7f 100644
--- a/doc/misc/eieio.texi
+++ b/doc/misc/eieio.texi
@@ -178,7 +178,7 @@ error.  @ref{Signals}.
 
 First off, please note that this manual cannot serve as a complete
 introduction to object oriented programming and generic functions in
-LISP.  Although EIEIO is not a complete implementation of the Common
+LISP@.  Although EIEIO is not a complete implementation of the Common
 Lisp Object System (CLOS) and also differs from it in several aspects,
 it follows the same basic concepts.  Therefore, it is highly
 recommended to learn those from a textbook or tutorial first,
diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi
index aaa88ce803..3a86e1ba1a 100644
--- a/doc/misc/erc.texi
+++ b/doc/misc/erc.texi
@@ -667,14 +667,6 @@ your Emacs configuration file.  Everything after the @code{(require
 @lisp
 ;;; Sample ERC configuration
 
-;; Add the ERC directory to load path -- you don't need this if you are
-;; using the version of ERC that comes with Emacs
-(add-to-list 'load-path "~/elisp/erc")
-
-;; Load ERC -- again, you don't need this if you are using the version
-;; of ERC that comes with Emacs
-(require 'erc)
-
 ;; Load authentication info from an external source.  Put sensitive
 ;; passwords and the like in here.
 (load "~/.emacs.d/.erc-auth")
@@ -724,8 +716,8 @@ stuff, to the current ERC buffer."
 (setq erc-autojoin-channels-alist '(("freenode.net" "#emacs" "#erc")))
 
 ;; Rename server buffers to reflect the current network name instead
-;; of IP:PORT. (e.g. "freenode" instead of "84.240.3.129:6667"). This
-;; is useful when using a bouncer like ZNC where you have multiple
+;; of SERVER:PORT (e.g., "freenode" instead of "irc.freenode.net:6667").
+;; This is useful when using a bouncer like ZNC where you have multiple
 ;; connections to the same server.
 (setq erc-rename-buffers t)
 
@@ -788,7 +780,7 @@ or if you have bugs to report, there are several places you can go.
 
 @item
 @uref{http://www.emacswiki.org/cgi-bin/wiki/ERC} is the
-emacswiki.org page for ERC@.  Anyone may add tips, hints, etc. to it.
+emacswiki.org page for ERC@.  Anyone may add tips, hints, etc.@: to it.
 
 @item
 You can ask questions about using ERC on the Emacs mailing list,
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index ca90573f30..6d57a78d17 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -649,7 +649,7 @@ Programs that need a terminal to display output properly are referred
 to in this manual as ``visual commands,'' because they are not simply
 line-oriented.  You must tell Eshell which commands are visual, by
 adding them to @code{eshell-visual-commands}; for commands that are
-visual for only certain @emph{sub}-commands -- e.g. @samp{git log} but
+visual for only certain @emph{sub}-commands -- e.g., @samp{git log} but
 not @samp{git status} -- use @code{eshell-visual-subcommands}; and for
 commands that are visual only when passed certain options, use
 @code{eshell-visual-options}.
diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi
index fd9f6f543e..c7f84b5d4f 100644
--- a/doc/misc/eww.texi
+++ b/doc/misc/eww.texi
@@ -103,6 +103,12 @@ web page hit @kbd{g} (@code{eww-reload}).  Pressing @kbd{w}
 which part of the document contains the ``readable'' text, and will
 only display this part.  This usually gets rid of menus and the like.
 
+@findex eww-toggle-fonts
+@findex shr-use-fonts
+@kindex F
+  The @kbd{F} command (@code{eww-toggle-fonts}) toggles whether to use
+variable-pitch fonts or not.  This sets the @code{shr-use-fonts} variable.
+
 @findex eww-download
 @vindex eww-download-directory
 @kindex d
@@ -120,7 +126,7 @@ specified in @code{eww-download-directory} (Default: @file{~/Downloads/}).
 @cindex History
   EWW remembers the URLs you have visited to allow you to go back and
 forth between them.  By pressing @kbd{l} (@code{eww-back-url}) you go
-to the previous URL.  You can go forward again with @kbd{r}
+to the previous URL@.  You can go forward again with @kbd{r}
 (@code{eww-forward-url}).  If you want an overview of your browsing
 history press @kbd{H} (@code{eww-list-histories}) to open the history
 buffer @file{*eww history*}.  The history is lost when EWW is quit.
@@ -241,7 +247,7 @@ Sessions, , emacs, The GNU Emacs Manual}.
 
 @vindex eww-desktop-remove-duplicates
   EWW history may sensibly contain multiple entries for the same page
-URI.  At run-time, these entries may still have different associated
+URI@.  At run-time, these entries may still have different associated
 point positions or the actual Web page contents.
 The latter, however, tend to be overly large to preserve in the
 desktop file, so they get omitted, thus rendering the respective
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index cb808743ec..ed4d1a58f7 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -11482,7 +11482,7 @@ who wrote the article, the date it was written and the subject of the
 article.  That's well and nice, but there's also lots of information
 most people do not want to see---what systems the article has passed
 through before reaching you, the @code{Message-ID}, the
-@code{References}, etc. ad nauseam---and you'll probably want to get rid
+@code{References}, etc.@: ad nauseam---and you'll probably want to get rid
 of some of those lines.  If you want to keep all those lines in the
 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
 
@@ -14182,6 +14182,7 @@ from different locations, or with different user agents.
 * Connecting to an IMAP Server::     Getting started with @acronym{IMAP}.
 * Customizing the IMAP Connection::  Variables for @acronym{IMAP} connection.
 * Client-Side IMAP Splitting::       Put mail in the correct mail box.
+* Support for IMAP Extensions::      Getting extensions and labels from servers.
 @end menu
 
 
@@ -14328,6 +14329,29 @@ Here's a complete example @code{nnimap} backend with a client-side
 @end example
 
 
+@node Support for IMAP Extensions
+@subsection Support for IMAP Extensions
+
+@cindex Gmail
+@cindex X-GM-LABELS
+@cindex IMAP labels
+
+If you're using Google's Gmail, you may want to see your Gmail labels
+when reading your mail.  Gnus can give you this information if you ask
+for @samp{X-GM-LABELS} in the variable @code{gnus-extra-headers}. For
+example:
+
+@example
+(setq gnus-extra-headers
+      '(To Newsgroups X-GM-LABELS))
+@end example
+
+This will result in Gnus storing your labels in message header
+structures for later use.  The content is always a parenthesized
+(possible empty) list.
+
+
+
 @node Getting Mail
 @section Getting Mail
 @cindex reading mail
@@ -25881,7 +25905,7 @@ Store custom flags and keywords
 The registry can store custom flags and keywords for a message.  For
 instance, you can mark a message ``To-Do'' this way and the flag will
 persist whether the message is in the nnimap, nnml, nnmaildir,
-etc. backends.
+etc.@: backends.
 
 @item
 Store arbitrary data
@@ -25964,7 +25988,7 @@ registry will be pruned back to less than
 @code{gnus-registry-max-entries}.  This option controls exactly how
 much less: the target is calculated as the maximum number of entries
 minus the maximum number times this factor.  The default is 0.1:
-i.e. if your registry is limited to 50000 entries, pruning will try to
+i.e., if your registry is limited to 50000 entries, pruning will try to
 cut back to 45000 entries.  Entries with keys marked as precious will
 not be pruned.
 @end defvar
diff --git a/doc/misc/htmlfontify.texi b/doc/misc/htmlfontify.texi
index 630b5f798a..6579cd6c7d 100644
--- a/doc/misc/htmlfontify.texi
+++ b/doc/misc/htmlfontify.texi
@@ -839,7 +839,7 @@ See @ref{hfy-display-class} for details of valid values for @var{class}.
 (hfy-face-at P)
 @end lisp
 
-Find face in effect at point P.  If overlays are to be considered
+Find face in effect at point P@.  If overlays are to be considered
 (see @ref{hfy-optimisations}) then this may return a @code{defface} style
 list of face properties instead of a face symbol.
 
@@ -1418,7 +1418,7 @@ Add @samp{
} tags around the fontified body. a page with different colors than the fontified code.) @item keep-overlays -Preserve overlay highlighting (c.f. @code{ediff} or @code{goo-font-lock}) +Preserve overlay highlighting (cf.@: @code{ediff} or @code{goo-font-lock}) as well as basic faces. Can result in extremely verbose highlighting if there are many overlays (as is the case with @code{goo-font-lock}). diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi index 1858a51dd8..496674cd64 100644 --- a/doc/misc/idlwave.texi +++ b/doc/misc/idlwave.texi @@ -1010,7 +1010,7 @@ Non-@code{nil} means use last match on line for @cindex Highlighting of syntax @cindex Font lock -Highlighting of keywords, comments, strings etc. can be accomplished +Highlighting of keywords, comments, strings etc.@: can be accomplished with @code{font-lock}. If you are using @code{global-font-lock-mode} (in Emacs), or have @code{font-lock} turned on in any other buffer in XEmacs, it should also automatically work in IDLWAVE buffers. If you'd @@ -3111,7 +3111,7 @@ window, but is useful for immediate stepping, etc. @kindex C-c C-d C-p Do you find yourself repeatedly typing, e.g., @code{print,n_elements(x)}, and similar statements to remind yourself of the -type/size/structure/value/etc. of variables and expressions in your code +type/size/structure/value/etc.@: of variables and expressions in your code or at the command line? IDLWAVE has a suite of special commands to automate these types of variable or expression examinations. They work by sending statements to the shell formatted to include the indicated @@ -3800,31 +3800,25 @@ available, it is the preferred choice, and the default. The variable whether this help browser is used. If you use the IDL Assistant, the tips here are not relevant. -Since IDLWAVE runs on a many different system types, a single browser -configuration is not possible, but choices abound. On many systems, -the default browser configured in @code{browse-url-browser-function}, -and hence inherited by default by -@code{idlwave-help-browser-function}, is Netscape. Unfortunately, the -HTML manuals decompiled from the original source contain formatting -structures which Netscape 4.x does not handle well, though they are -still readable. A much better choice is Mozilla, or one of the -Mozilla-derived browsers such as -@uref{http://galeon.sourceforge.net/,Galeon} (GNU/Linux), -@uref{http://www.mozilla.org/projects/camino/,Camino} (MacOSX), or -@uref{http://www.mozilla.org/projects/firebird/,Firebird} (all -platforms). Newer versions of Emacs provide a browser-function choice -@code{browse-url-gnome-moz} which uses the Gnome-configured browser. +Since IDLWAVE runs on many different system types, a single browser +configuration is not possible, but choices abound. The default +@code{idlwave-help-browser-function} inherits the browser configured +in @code{browse-url-browser-function}. Note that the HTML files decompiled from the help sources contain specific references to the @samp{Symbol} font, which by default is not permitted in normal encodings (it's invalid, technically). Though it only impacts a few symbols, you can trick Mozilla-based browsers into recognizing @samp{Symbol} by following the directions +@c This page is 11 years old. Is it still relevant? @uref{http://hutchinson.belmont.ma.us/tth/Xfonts.html, here}. With this fix in place, HTML help pages look almost identical to their PDF equivalents (yet can be bookmarked, browsed as history, searched, etc.). +@c Not updated in over a decade. +@c Maybe you want to recommend eww these days. +@ignore @noindent Individual platform recommendations: @itemize @bullet @@ -3861,6 +3855,7 @@ following, to get consistent behavior with the @kbd{q} key: Note that you can open the file in an external browser from within @code{w3m} using @kbd{M}. @end itemize +@end ignore @node Configuration Examples @appendix Configuration Examples diff --git a/doc/misc/ido.texi b/doc/misc/ido.texi index 25380c08be..a80620f681 100644 --- a/doc/misc/ido.texi +++ b/doc/misc/ido.texi @@ -305,7 +305,7 @@ the files in that directory, simply move the directory to the head of the list and hit @key{RET}. To go up to the parent directory, delete any partial file name already -specified (e.g. using @key{DEL}) and hit @key{DEL}. +specified (e.g., using @key{DEL}) and hit @key{DEL}. @c @deffn Command ido-delete-backward-updir diff --git a/doc/misc/newsticker.texi b/doc/misc/newsticker.texi index a9ebc203e3..0520a4eec4 100644 --- a/doc/misc/newsticker.texi +++ b/doc/misc/newsticker.texi @@ -123,7 +123,7 @@ You may select any number of feeds from this list of (sample) news feeds. @vindex newsticker-url-list @item newsticker-url-list All your personal news feeds are defined here. Each feed is -identified by its name and an URL. You may set the start-time and the +identified by its name and an URL@. You may set the start-time and the retrieval interval for each feed as well as the retrieval command arguments in case that the default values do not fit a certain feed. @@ -590,8 +590,7 @@ Newsticker works with the standard RSS and Atom formats listed below @subheading RSS formats @itemize -@item RSS 0.91 (see @uref{http://backend.userland.com/rss091} or -@uref{http://my.netscape.com/publish/formats/rss-spec-0.91.html}) +@item RSS 0.91 (see @uref{http://backend.userland.com/rss091}) @item RSS 0.92 (see @uref{http://backend.userland.com/rss092}) @item RSS 1.0 (see @uref{http://purl.org/rss/1.0/spec}) @item RSS 2.0 (see @uref{http://blogs.law.harvard.edu/tech/rss}) diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 2cb80abb0d..d2721f6e35 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -891,7 +891,7 @@ Recent Emacs distributions include a packaging system which lets you install Elisp libraries. You can install Org with @kbd{M-x package-install RET org}. @noindent @b{Important}: you need to do this in a session where no @code{.org} file has -been visited, i.e. where no Org built-in function have been loaded. +been visited, i.e., where no Org built-in function have been loaded. Otherwise autoload Org functions will mess up the installation. Then, to make sure your Org configuration is taken into account, initialize @@ -10444,7 +10444,7 @@ You can change the default state of this option by setting @item C-v Toggle visible-only export. Only export the text that is currently -visible, i.e. not hidden by outline visibility in the buffer. +visible, i.e., not hidden by outline visibility in the buffer. @end table @@ -12103,7 +12103,7 @@ Internet-style links for all other links. A link with no description and destined to a regular (un-itemized) outline heading is replaced with a cross-reference and section number of the heading. -A @samp{\ref@{label@}}-style reference to an image, table etc. is replaced +A @samp{\ref@{label@}}-style reference to an image, table etc.@: is replaced with a cross-reference and sequence number of the labeled entity. @xref{Labels and captions in ODT export}. @@ -13410,7 +13410,7 @@ from it (e.g., @code{beamer}). This is obviously the most powerful customization, since the changes happen at the parser level. Indeed, some export back-ends are built as extensions -of other ones (e.g. Markdown back-end an extension of HTML back-end). +of other ones (e.g., Markdown back-end an extension of HTML back-end). Extending a back-end means that if an element type is not transcoded by the new back-end, it will be handled by the original one. Hence you can extend diff --git a/doc/misc/pgg.texi b/doc/misc/pgg.texi index 4518de4141..a46c0fb8b4 100644 --- a/doc/misc/pgg.texi +++ b/doc/misc/pgg.texi @@ -82,7 +82,7 @@ communication. Even though Mailcrypt has similar feature, it does not deal with detached PGP messages, normally used in PGP/MIME infrastructure. This was the main reason why I wrote the new library. -Note that the PGG library is now obsolete, replaced by EasyPG. +Note that the PGG library is now obsolete, replaced by EasyPG@. @xref{Top,, EasyPG, epa, EasyPG Assistant User's Manual}. PGP/MIME is an application of MIME Object Security Services (RFC1848). diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi index 567063f2c3..1497b1f5f1 100644 --- a/doc/misc/reftex.texi +++ b/doc/misc/reftex.texi @@ -608,7 +608,7 @@ Show calling point in another window. This is the point from where @item < Promote the current section. This will convert @code{\section} to -@code{\chapter}, @code{\subsection} to @code{\section} etc. If there is +@code{\chapter}, @code{\subsection} to @code{\section} etc. If there is an active region, all sections in the region will be promoted, including the one at point. To avoid mistakes, @RefTeX{} requires a fresh document scan before executing this command; if necessary, it will @@ -1567,7 +1567,7 @@ Here is the setup: @cindex @code{linguex}, LaTeX package @cindex LaTeX packages, @code{linguex} A more complex example is the @file{linguex.sty} package which defines -list macros @samp{\ex.}, @samp{\a.}, @samp{\b.} etc. for lists which are +list macros @samp{\ex.}, @samp{\a.}, @samp{\b.} etc.@: for lists which are terminated by @samp{\z.} or by an empty line. @example @@ -2961,6 +2961,12 @@ label itself in order to be processed correctly by @RefTeX{}. The only exception is that section labels referring to a section statement outside the current file can still use that section title as context. + +@item +@vindex reftex-include-file-commands +@RefTeX{} knows about the @code{\include} and @code{\input} macros. +In case you use different commands to include files in a multifile +document, customize the variable @code{reftex-include-file-commands}. @end itemize @node Language Support @@ -3893,6 +3899,10 @@ Lisp (and even if you are) you might find it more comfortable to use @code{customize} to look at and change these variables. @kbd{M-x reftex-customize} will get you there. +In case you don't use the @code{customize} interface, here's a caveat: +Changing (mostly parsing-related) options might require a call to +@code{reftex-compile-variables} in order to become effective. + @menu * Options - Table of Contents:: * Options - Defining Label Environments:: @@ -5896,7 +5906,7 @@ When no BibTeX database files are specified, citations can also use @noindent @b{Version 3.11} @itemize @bullet @item -Fixed bug which led to naked label in (e.g.@:) footnotes. +Fixed bug which led to naked label in (e.g.)@: footnotes. @item Added scroll-other-window functions to RefTeX-Select. @end itemize diff --git a/doc/misc/remember.texi b/doc/misc/remember.texi index ff481b746c..c0d2ba3c77 100644 --- a/doc/misc/remember.texi +++ b/doc/misc/remember.texi @@ -270,7 +270,7 @@ that region, will be remembered. @defun remember-clipboard Remember the contents of the current clipboard. This is most useful -for remembering things from Netscape or other X Windows applications. +for remembering things from a web browser or other X Windows applications. @end defun @defun remember-finalize diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 370d450508..8236d7d2f8 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,11 +3,12 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2014-12-03.16} +\def\texinfoversion{2015-02-05.16} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 +% Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -4488,7 +4489,6 @@ end % Called from \indexdummies and \atdummies. % \def\commondummies{% - % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control words, % not control letters, because the \space would be incorrect for @@ -4565,6 +4565,7 @@ end \definedummyword\guilsinglright \definedummyword\lbracechar \definedummyword\leq + \definedummyword\mathopsup \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds @@ -4578,6 +4579,8 @@ end \definedummyword\quotesinglbase \definedummyword\rbracechar \definedummyword\result + \definedummyword\sub + \definedummyword\sup \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. @@ -4652,6 +4655,7 @@ end \definedummyword\samp \definedummyword\strong \definedummyword\tie + \definedummyword\U \definedummyword\uref \definedummyword\url \definedummyword\var @@ -8334,14 +8338,7 @@ end \catcode`\\=\other % % Make the characters 128-255 be printing characters. - {% - \count1=128 - \def\loop{% - \catcode\count1=\other - \advance\count1 by 1 - \ifnum \count1<256 \loop \fi - }% - }% + {\setnonasciicharscatcodenonglobal\other}% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 @@ -8952,6 +8949,7 @@ directory should work if nowhere else does.} \catcode\count255=#1\relax \advance\count255 by 1 \repeat + } % @documentencoding sets the definition of non-ASCII characters @@ -8986,10 +8984,12 @@ directory should work if nowhere else does.} % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active - \utfeightchardefs + % since we already invoked \utfeightchardefs at the top level + % (below), do not re-invoke it, then our check for duplicated + % definitions triggers. Making non-ascii chars active is enough. % \else - \message{Unknown document encoding #1, ignoring.}% + \message{Ignoring unknown document encoding: #1.}% % \fi % utfeight \fi % latnine @@ -8998,10 +8998,11 @@ directory should work if nowhere else does.} \fi % ascii } +% emacs-page % A message to be logged when using a character that isn't available % the default font encoding (OT1). % -\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} +\def\missingcharmsg#1{\message{Character missing, sorry: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} @@ -9037,12 +9038,10 @@ directory should work if nowhere else does.} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} - % - \gdef^^b7{$^.$} + \gdef^^b7{\ifmmode\cdot\else $\cdot$\fi} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} - % \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} @@ -9331,6 +9330,11 @@ directory should work if nowhere else does.} \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% + % + \expandafter\ifx\csname uni:#1\endcsname \relax \else + \errmessage{Internal error, already defined: #1}% + \fi + % % define an additional control sequence for this code point. \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp \endgroup} @@ -9370,23 +9374,49 @@ directory should work if nowhere else does.} \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup +% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M +% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block) +% U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block) +% U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A +% U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B +% +% Many of our renditions are less than wonderful, and all the missing +% characters are available somewhere. Loading the necessary fonts +% awaits user request. We can't truly support Unicode without +% reimplementing everything that's been done in LaTeX for many years, +% plus probably using luatex or xetex, and who knows what else. +% We won't be doing that here in this simple file. But we can try to at +% least make most of the characters not bomb out. +% \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} + \DeclareUnicodeCharacter{00A7}{\S} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} + \DeclareUnicodeCharacter{00AC}{\ifmmode\lnot\else $\lnot$\fi} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} + \DeclareUnicodeCharacter{00B1}{\ifmmode\pm\else $\pm$\fi} + \DeclareUnicodeCharacter{00B2}{$^2$} + \DeclareUnicodeCharacter{00B3}{$^3$} \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B5}{$\mu$} + \DeclareUnicodeCharacter{00B6}{\P} + \DeclareUnicodeCharacter{00B7}{\ifmmode\cdot\else $\cdot$\fi} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00B9}{$^1$} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} + \DeclareUnicodeCharacter{00BC}{$1\over4$} + \DeclareUnicodeCharacter{00BD}{$1\over2$} + \DeclareUnicodeCharacter{00BE}{$3\over4$} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} @@ -9413,6 +9443,7 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} + \DeclareUnicodeCharacter{00D7}{\ifmmode\times\else $\times$\fi} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} @@ -9446,6 +9477,7 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} + \DeclareUnicodeCharacter{00F7}{\ifmmode\div\else $\div$\fi} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} @@ -9465,20 +9497,23 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} - \DeclareUnicodeCharacter{0118}{\ogonek{E}} - \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} + \DeclareUnicodeCharacter{010F}{d'} + \DeclareUnicodeCharacter{0110}{\DH} + \DeclareUnicodeCharacter{0111}{\dh} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} + \DeclareUnicodeCharacter{0118}{\ogonek{E}} + \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} @@ -9488,14 +9523,20 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} + \DeclareUnicodeCharacter{0122}{\cedilla{G}} + \DeclareUnicodeCharacter{0123}{\cedilla{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} + \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}} + \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} + \DeclareUnicodeCharacter{012E}{\ogonek{I}} + \DeclareUnicodeCharacter{012F}{\ogonek{i}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} @@ -9503,15 +9544,29 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} + \DeclareUnicodeCharacter{0136}{\cedilla{K}} + \DeclareUnicodeCharacter{0137}{\cedilla{k}} + \DeclareUnicodeCharacter{0138}{\ifmmode\kappa\else $\kappa$\fi} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} + \DeclareUnicodeCharacter{013B}{\cedilla{L}} + \DeclareUnicodeCharacter{013C}{\cedilla{l}} + \DeclareUnicodeCharacter{013D}{L'}% should kern + \DeclareUnicodeCharacter{013E}{l'}% should kern + \DeclareUnicodeCharacter{013F}{L\U{00B7}} + \DeclareUnicodeCharacter{0140}{l\U{00B7}} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} + \DeclareUnicodeCharacter{0145}{\cedilla{N}} + \DeclareUnicodeCharacter{0146}{\cedilla{n}} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} + \DeclareUnicodeCharacter{0149}{'n} + \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}} + \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} @@ -9523,6 +9578,8 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} + \DeclareUnicodeCharacter{0156}{\cedilla{R}} + \DeclareUnicodeCharacter{0157}{\cedilla{r}} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} @@ -9534,10 +9591,12 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} - \DeclareUnicodeCharacter{0162}{\cedilla{t}} - \DeclareUnicodeCharacter{0163}{\cedilla{T}} + \DeclareUnicodeCharacter{0162}{\cedilla{T}} + \DeclareUnicodeCharacter{0163}{\cedilla{t}} \DeclareUnicodeCharacter{0164}{\v{T}} - + \DeclareUnicodeCharacter{0165}{\v{t}} + \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}} + \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} @@ -9549,6 +9608,8 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} + \DeclareUnicodeCharacter{0172}{\ogonek{U}} + \DeclareUnicodeCharacter{0173}{\ogonek{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} @@ -9560,6 +9621,7 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} + \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} @@ -9765,12 +9827,51 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs - % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } +% Latin1 (ISO-8859-1) character definitions. +\def\nonasciistringdefs{% + \setnonasciicharscatcode\active + \def\defstringchar##1{\def##1{\string##1}}% + \defstringchar^^a0\defstringchar^^a1\defstringchar^^a2\defstringchar^^a3% + \defstringchar^^a4\defstringchar^^a5\defstringchar^^a6\defstringchar^^a7% + \defstringchar^^a8\defstringchar^^a9\defstringchar^^aa\defstringchar^^ab% + \defstringchar^^ac\defstringchar^^ad\defstringchar^^ae\defstringchar^^af% + % + \defstringchar^^b0\defstringchar^^b1\defstringchar^^b2\defstringchar^^b3% + \defstringchar^^b4\defstringchar^^b5\defstringchar^^b6\defstringchar^^b7% + \defstringchar^^b8\defstringchar^^b9\defstringchar^^ba\defstringchar^^bb% + \defstringchar^^bc\defstringchar^^bd\defstringchar^^be\defstringchar^^bf% + % + \defstringchar^^c0\defstringchar^^c1\defstringchar^^c2\defstringchar^^c3% + \defstringchar^^c4\defstringchar^^c5\defstringchar^^c6\defstringchar^^c7% + \defstringchar^^c8\defstringchar^^c9\defstringchar^^ca\defstringchar^^cb% + \defstringchar^^cc\defstringchar^^cd\defstringchar^^ce\defstringchar^^cf% + % + \defstringchar^^d0\defstringchar^^d1\defstringchar^^d2\defstringchar^^d3% + \defstringchar^^d4\defstringchar^^d5\defstringchar^^d6\defstringchar^^d7% + \defstringchar^^d8\defstringchar^^d9\defstringchar^^da\defstringchar^^db% + \defstringchar^^dc\defstringchar^^dd\defstringchar^^de\defstringchar^^df% + % + \defstringchar^^e0\defstringchar^^e1\defstringchar^^e2\defstringchar^^e3% + \defstringchar^^e4\defstringchar^^e5\defstringchar^^e6\defstringchar^^e7% + \defstringchar^^e8\defstringchar^^e9\defstringchar^^ea\defstringchar^^eb% + \defstringchar^^ec\defstringchar^^ed\defstringchar^^ee\defstringchar^^ef% + % + \defstringchar^^f0\defstringchar^^f1\defstringchar^^f2\defstringchar^^f3% + \defstringchar^^f4\defstringchar^^f5\defstringchar^^f6\defstringchar^^f7% + \defstringchar^^f8\defstringchar^^f9\defstringchar^^fa\defstringchar^^fb% + \defstringchar^^fc\defstringchar^^fd\defstringchar^^fe\defstringchar^^ff% +} + + +% define all the unicode characters we know about, for the sake of @U. +\utfeightchardefs + + % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. @@ -10124,6 +10225,7 @@ directory should work if nowhere else does.} % {@catcode`- = @active @gdef@normalturnoffactive{% + @nonasciistringdefs @let-=@normaldash @let"=@normaldoublequote @let$=@normaldollar %$ font-lock fix @@ -10192,7 +10294,7 @@ directory should work if nowhere else does.} @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) -@c page-delimiter: "^\\\\message" +@c page-delimiter: "^\\\\message\\|emacs-page" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" diff --git a/doc/misc/todo-mode.texi b/doc/misc/todo-mode.texi index 6f684dea5d..f58965cada 100644 --- a/doc/misc/todo-mode.texi +++ b/doc/misc/todo-mode.texi @@ -1421,7 +1421,7 @@ Advance point to the next button. Put point on the previous button. @end table -These commands are cyclic, e.g. when point is on the last button, +These commands are cyclic, e.g., when point is on the last button, pressing @kbd{n} moves it to the first button. Typing @kbd{q} exits Todo Categories mode, killing the buffer and returning @@ -1787,7 +1787,7 @@ current file: @item F h @itemx h Hide the item headers if visible, or show them if they are hidden. -With done items, only the done header (i.e. the done tag and date-time +With done items, only the done header (i.e., the done tag and date-time string inserted when the item was marked done) is hidden, the original date-time string is not. With filtered items, the category (or category-file) tag is not hidden. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index bc7f933187..d9cb933cb6 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -1001,16 +1001,17 @@ name. This special method uses the Android Debug Bridge for accessing Android devices. The Android Debug Bridge must be installed locally. Some GNU/Linux distributions offer it for installation, otherwise it -can be installed as part of the Android SDK. If the @command{adb} +can be installed as part of the Android SDK@. If the @command{adb} program is not found via the @env{PATH} environment variable, the variable @var{tramp-adb-program} must point to its absolute path. -Tramp does not connect Android devices to @command{adb}. This must be -performed outside @value{emacsname}. If there is exactly one Android -device connected to @command{adb}, a host name is not needed in the -remote file name. The default @value{tramp} name to be used is -@file{@trampfn{adb, , ,}} therefore. Otherwise, one could find -potential host names with the command @command{adb devices}. +@value{tramp} does not connect Android devices to @command{adb}, +unless the customer option @option{tramp-adb-connect-if-not-connected} +is non-@code{nil}. If there is exactly one Android device connected +to @command{adb}, a host name is not needed in the remote file name. +The default @value{tramp} name to be used is @file{@trampfn{adb, , ,}}, +therefore. Otherwise, one could find potential host names with the +command @command{adb devices}. Usually, the @command{adb} method does not need any user name. It runs under the permissions of the @command{adbd} process on the @@ -1019,6 +1020,11 @@ Android device. If a user name is specified, @value{tramp} applies an devices, especially with unrooted ones. In that case, an error message is displayed. +If a device shall be connected via TCP/IP, it is possible to declare +the port number to be used like @file{device#42}. Without a port +number, the default value as declared in @command{adb} will be used. +Port numbers are not applicable to Android devices connected via USB. + @end table @@ -1081,6 +1087,7 @@ FUSE, it also needs the SYNCE-GVFS plugin. @end table +@vindex tramp-gvfs-methods @defopt tramp-gvfs-methods This customer option, a list, defines the external methods which shall be used with GVFS@. Per default, these are @option{dav}, @@ -1355,8 +1362,8 @@ bastion host. @vindex tramp-default-proxies-alist @defopt tramp-default-proxies-alist In order to specify multiple hops, it is possible to define a proxy -host to pass through, via the variable -@code{tramp-default-proxies-alist}. This variable keeps a list of +host to pass through, via the customer option +@option{tramp-default-proxies-alist}. This variable keeps a list of triples (@var{host} @var{user} @var{proxy}). The first matching item specifies the proxy host to be passed for a @@ -1470,9 +1477,9 @@ Sometimes they offer limited features only, like running @command{rbash} @vindex tramp-restricted-shell-hosts-alist @defopt tramp-restricted-shell-hosts-alist -This variable keeps a list of regular expressions, which denote hosts -running a registered shell like "rbash". Those hosts can be used as -proxies only. +This customer option keeps a list of regular expressions, which denote +hosts running a registered shell like @command{rbash}. Those hosts +can be used as proxies only. If the bastion host from the example above runs a restricted shell, you shall apply @@ -1788,8 +1795,9 @@ remote file access. @vindex tramp-own-remote-path @defopt tramp-remote-path When @value{tramp} connects to the remote host, it searches for the -programs that it can use. The variable @code{tramp-remote-path} -controls the directories searched on the remote host. +programs that it can use. The customer option +@option{tramp-remote-path} controls the directories searched on the +remote host. By default, this is set to a reasonable set of defaults for most hosts. The symbol @code{tramp-default-remote-path} is a place @@ -1798,7 +1806,7 @@ command @command{getconf PATH} on your remote host. For example, on Debian GNU/Linux this is @file{/bin:/usr/bin}, whereas on Solaris this is @file{/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin}. It is recommended to apply this symbol on top of -@code{tramp-remote-path}. +@option{tramp-remote-path}. It is possible, however, that your local (or remote ;) system administrator has put the tools you want in some obscure local @@ -2088,6 +2096,7 @@ parameter, you could overwrite the syntax with the following form: @noindent with @samp{192.168.0.1} being the IP address of your remote host (@pxref{Predefined connection information}). + @end table @@ -2591,11 +2600,12 @@ files by other processes. Therefore, during file name completion, the remote directory contents are reread regularly in order to detect such changes, which would be invisible otherwise (@pxref{Connection caching}). +@vindex tramp-completion-reread-directory-timeout @defopt tramp-completion-reread-directory-timeout -This variable defines the number of seconds since last remote command -before rereading a directory contents. A value of 0 would require an -immediate reread during file name completion, @code{nil} means to use -always cached values for the directory contents. +This customer option defines the number of seconds since last remote +command before rereading a directory contents. A value of 0 would +require an immediate reread during file name completion, @code{nil} +means to use always cached values for the directory contents. @end defopt @@ -2634,8 +2644,9 @@ remotehost, /path}} would be sufficient from now on. @vindex tramp-save-ad-hoc-proxies @defopt tramp-save-ad-hoc-proxies This customer option controls whether ad-hoc definitions are kept -persistently in @code{tramp-default-proxies-alist}. That means, those -definitions are available also for future @value{emacsname} sessions. +persistently in @option{tramp-default-proxies-alist}. That means, +those definitions are available also for future @value{emacsname} +sessions. @end defopt diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index a9e7f3733e..119adbd245 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -8,7 +8,7 @@ @c In the Tramp GIT, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.2.11 +@set trampver 2.2.12-pre @c Other flags from configuration @set instprefix /usr/local diff --git a/doc/misc/vhdl-mode.texi b/doc/misc/vhdl-mode.texi index 524a534c38..777bb10777 100644 --- a/doc/misc/vhdl-mode.texi +++ b/doc/misc/vhdl-mode.texi @@ -159,7 +159,7 @@ the construct on that line. A @dfn{syntactic component} consists of a pair of information (in lisp parlance, a @emph{cons cell}), where the first part is a @dfn{syntactic symbol}, and the second part is a @dfn{relative buffer position}. Syntactic symbols describe elements of -VHDL code, e.g. @code{statement}, @code{comment}, @code{block-open}, +VHDL code, e.g., @code{statement}, @code{comment}, @code{block-open}, @code{block-close}, etc. @xref{Syntactic Symbols}, for a complete list of currently recognized syntactic symbols and their semantics. Also, the variable @code{vhdl-offsets-alist} contains the list of currently @@ -633,8 +633,8 @@ similar to what is allowed in @code{vhdl-offsets-alist}. When the file is visited, VHDL Mode will automatically institute these offsets using @code{vhdl-set-offset}. @xref{Customizing Indentation}. -Note that file style settings (i.e. @code{vhdl-file-style}) are applied -before file offset settings (i.e. @code{vhdl-file-offsets}). +Note that file style settings (i.e., @code{vhdl-file-style}) are applied +before file offset settings (i.e., @code{vhdl-file-offsets}). @node Advanced Customizations diff --git a/doc/misc/vip.texi b/doc/misc/vip.texi index 9a5255d43a..ebb14944e2 100644 --- a/doc/misc/vip.texi +++ b/doc/misc/vip.texi @@ -436,7 +436,7 @@ Jump to mark (and pop mark off the mark ring). @cindex region -Vi operators like @kbd{d}, @kbd{c} etc. are usually used in combination +Vi operators like @kbd{d}, @kbd{c} etc.@: are usually used in combination with motion commands. It is now possible to use current region as the argument to these operators. (A @dfn{region} is a part of buffer delimited by point and mark.) The key @kbd{r} is used for this purpose. diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi index bea7f47edb..0ccc6ac91d 100644 --- a/doc/misc/viper.texi +++ b/doc/misc/viper.texi @@ -1224,7 +1224,7 @@ Facilities like this make Vi's @kbd{:ab} command obsolete. @cindex Ex style motion @cindex line editor motion -Viper can be set free from the line--limited movements in Vi, such as @kbd{l} +Viper can be set free from the line-limited movements in Vi, such as @kbd{l} refusing to move beyond the line, @key{ESC} moving one character back, etc. These derive from Ex, which is a line editor. If your Viper customization file contains diff --git a/doc/misc/woman.texi b/doc/misc/woman.texi index d199afcf99..a25924919a 100644 --- a/doc/misc/woman.texi +++ b/doc/misc/woman.texi @@ -1141,7 +1141,7 @@ headings. Default is @code{t}. [Heading emboldening is @emph{not} standard @code{man} behavior.] @item woman-ignore -A boolean value. If non-@code{nil} then unrecognized requests etc. are +A boolean value. If non-@code{nil} then unrecognized requests etc.@: are ignored. Default is @code{t}. This gives the standard @code{roff} behavior. If @code{nil} then they are left in the buffer, which may aid debugging. diff --git a/etc/AUTHORS b/etc/AUTHORS index 2b93bb25da..cf08cf8a64 100644 --- a/etc/AUTHORS +++ b/etc/AUTHORS @@ -3,33 +3,44 @@ Foundation's distribution of GNU Emacs. To show our appreciation for their public spirit, we list here in alphabetical order a condensed list of their contributions. -Aaron Ecay: changed nsterm.m +Aaron Ecay: changed ob-R.el ob-core.el org-src.el ox-latex.el nsterm.m + ob-awk.el ob-exp.el ob-python.el ob-tangle.el org-bibtex.el org-id.el + org.el org.texi paren.el Aaron Larson: co-wrote bibtex.el -Aaron S. Hawley: changed files.texi morse.el tar-mode.el add-log.el - autoinsert.el building.texi custom.texi files.el glossary.texi - isearch.el jka-cmpr-hook.el misc.texi re-builder.el sgml-mode.el - texinfo.el thingatpt.el tutorial.el +Aaron S. Hawley: wrote undo-tests.el +and changed simple.el files.texi isearch.el morse.el sgml-mode.el + tar-mode.el thingatpt.el add-log.el autoinsert.el building.texi calc.el + cc-fonts.el comint.el compare-w.el custom.texi diff.el edebug.el + etags.el ffap.el files.el flyspell.el and 28 other files -Abraham Nahum: changed configure.in dgux4.h sysdep.c +Abdó Roig-Maranges: changed org.el org-agenda.el ox-html.el ox-odt.el + +Abraham Nahum: changed configure.ac dgux4.h sysdep.c Abramo Bagnara: changed term.c -Achim Gratz: changed org-clock.el org.el org.texi ob-ref.el ob.el - org-macs.el +Achim Gratz: changed org.el org-compat.el org.texi org-clock.el + ob-core.el ob-exp.el ob.el ob-perl.el ob-tangle.el org-agenda.el + org-macs.el org-table.el ob-C.el ob-R.el ob-eval.el ob-fortran.el + ob-python.el ob-ref.el ob-sh.el org-element.el org-exp-blocks.el + and 22 other files -Adam Gołębiowski: changed Makefile.in +Adam Gołębiowski: changed lib-src/Makefile.in Adam Hupp: changed emacs.py emacs2.py emacs3.py gud.el progmodes/python.el -Adam Sjøgren: changed spam.el blink.xpm braindamaged.xpm cry.xpm dead.xpm - evil.xpm forced.xpm frown.xpm grin.xpm indifferent.xpm - reverse-smile.xpm sad.xpm smile.xpm wry.xpm xterm.c gnus-html.el - gnus-start.el gnus-sum.el gnus.el gtkutil.c shr.el xterm.h +Adam Sjøgren: changed mml2015.el spam.el shr.el xterm.c blink.xpm + braindamaged.xpm cry.xpm dead.xpm evil.xpm forced.xpm frown.xpm + grin.xpm gtkutil.c indifferent.xpm message.el reverse-smile.xpm sad.xpm + smile.xpm wry.xpm gnus-html.el gnus-spec.el and 5 other files + +Adam Sokolnicki: changed ruby-mode.el -Adam Spiers: changed calendar.el +Adam Spiers: changed org.texi calendar.el cus-edit.el org-clock.el + ox-html.el Adam W: changed mail-source.el @@ -44,15 +55,20 @@ Adrian Colley: changed aix3-2.h Adrian Lanz: changed mail-source.el spam.el Adrian Robert: co-wrote ns-win.el -and changed nsterm.m nsfns.m nsfont.m nsterm.h Makefile.in nsmenu.m - configure.in README config.in emacs.c font.c keyboard.c nsgui.h - nsimage.m xdisp.c image.c lisp.h macos.texi menu.c Info-gnustep.plist - darwin.h and 82 other files +and changed nsterm.m nsfns.m nsfont.m nsterm.h nsmenu.m configure.ac + src/Makefile.in macos.texi README emacs.c font.c keyboard.c nsgui.h + nsimage.m xdisp.c image.c lib-src/Makefile.in lisp.h menu.c Makefile.in + darwin.h and 78 other files Ævar Arnfjörð Bjarmason: changed rcirc.el Agustín Martín: changed ispell.el flyspell.el fixit.texi +Aidan Gauland: wrote em-tramp.el +and changed eshell.texi em-term.el em-unix.el erc-match.el + automated/eshell.el em-cmpl.el em-dirs.el em-ls.el em-script.el + esh-proc.el + Aidan Kehoe: changed ipa.el lread.c mm-util.el erc-log.el erc.el gnus-sum.el gnus-util.el latin-ltx.el nnfolder.el ob-tangle.el objects.texi @@ -60,20 +76,22 @@ Aidan Kehoe: changed ipa.el lread.c mm-util.el erc-log.el erc.el Ake Stenhoff: co-wrote imenu.el and changed cc-mode.el perl-mode.el +Akinori Musha: changed ruby-mode.el Makefile.in sieve-mode.el + Aki Vehtari: changed bibtex.el gnus-art.el gnus-score.el gnus-sum.el nnmail.el tar-mode.el -Akinori Musha: changed ruby-mode.el - Alakazam Petrofsky: changed hanoi.el Alan Mackenzie: wrote cc-awk.el and co-wrote cc-align.el cc-cmds.el cc-defs.el cc-engine.el cc-fonts.el cc-langs.el cc-mode.el cc-styles.el cc-vars.el -and changed cc-mode.texi lread.c programs.texi font-lock.el font-core.el - isearch.el lisp.el modes.texi cc-subword.el display.texi os.texi - search.texi startup.el subr.el text.texi INSTALL.REPO add-log.el - buffers.texi bytecomp.el callint.c cc-fix.el and 22 other files +and changed cc-mode.texi lread.c programs.texi font-lock.el isearch.el + display.texi font-core.el lisp.el modes.texi search.texi cc-menus.el + cc-subword.el easy-mmode.el os.texi startup.el subr.el syntax.c + text.texi INSTALL.REPO add-log.el buffers.texi and 32 other files + +Alan Schmitt: changed gnus-sum.el nnimap.el ob-ocaml.el org-faces.el Alan Shutko: changed diary-lib.el calendar.el bindings.el cal-hebrew.el easy-mmode.el gnus-sum.el ibuf-ext.el ibuffer.el lunar.el macros.el @@ -81,30 +99,17 @@ Alan Shutko: changed diary-lib.el calendar.el bindings.el cal-hebrew.el Alastair Burt: changed gnus-art.el smiley.el +Albert Krewinkel: co-wrote sieve-manage.el +and changed sieve.el gnus-msg.el gnus.texi message.el sieve.texi + Albert L. Ting: changed gnus-group.el mail-hist.el Aleksei Gusev: changed progmodes/compile.el -Alex Coventry: changed files.el - -Alex Ott: changed TUTORIAL.ru ru-refcard.tex ispell.el ru-refcard.ps - -Alex Rezinsky: wrote which-func.el - -Alex Schroeder: wrote ansi-color.el cus-theme.el erc-compat.el - erc-hecomplete.el erc-join.el erc-lang.el erc-ring.el master.el - spam-stat.el sql.el -and co-wrote longlines.el mail/rmailmm.el -and changed erc.el erc-track.el erc-button.el erc-stamp.el erc-match.el - erc-autoaway.el erc-nickserv.el rcirc.texi erc-autojoin.el erc-fill.el - erc-pcomplete.el erc-complete.el erc-ibuffer.el erc-members.el rmail.el - comint.el custom.el erc-bbdb.el erc-chess.el erc-ezbounce.el - erc-imenu.el and 32 other files - -Alex Shinn: changed files.el - Alexander Becher: changed vc-annotate.el +Alexander Haeckel: changed getset.el + Alexander Klimov: changed files.el calc-graph.el files.texi man.el rx.el sendmail.el @@ -117,6 +122,8 @@ and changed rmailsum.el man.el rmail.el sendmail.el Alexander Shopov: changed code-pages.el +Alexander Vorobiev: changed org-compat.el + Alexander Zhuckov: changed ebrowse.c Alexandre Julliard: wrote vc-git.el @@ -130,6 +137,30 @@ Alexandre Veyrenc: changed fr-refcard.tex Alexandru Harsanyi: wrote soap-client.el soap-inspect.el and changed emacs3.py vc-hooks.el vc.el xml.el +Alex Coventry: changed files.el + +Alex Kosorukoff: changed org-capture.el + +Alex Ott: changed TUTORIAL.ru ede/files.el ru-refcard.tex base.el + cedet-files.el cpp-root.el ede.el ede/generic.el idle.el ispell.el + semantic/format.el + +Alex Reed: changed verilog-mode.el + +Alex Rezinsky: wrote which-func.el + +Alex Schroeder: wrote ansi-color.el cus-theme.el erc-compat.el + erc-hecomplete.el erc-join.el erc-lang.el erc-ring.el master.el + spam-stat.el sql.el +and co-wrote longlines.el mail/rmailmm.el +and changed erc.el erc-track.el erc-button.el erc-stamp.el erc-match.el + erc-autoaway.el erc-nickserv.el rcirc.texi Makefile erc-autojoin.el + erc-fill.el erc-pcomplete.el erc-complete.el erc-ibuffer.el + erc-members.el rmail.el comint.el custom.el erc-bbdb.el erc-chess.el + erc-ezbounce.el and 35 other files + +Alex Shinn: changed files.el + Alfred Correira: changed generic-x.el Alfred M. Szmidt: changed html2text.el openbsd.h progmodes/compile.el @@ -137,7 +168,7 @@ Alfred M. Szmidt: changed html2text.el openbsd.h progmodes/compile.el Alfredo Finelli: changed TUTORIAL.it -Ali Bahrami: changed configure configure.in sol2-10.h +Ali Bahrami: changed configure configure.ac sol2-10.h Alin C. Soare: changed lisp-mode.el hexl.el @@ -145,8 +176,12 @@ Allen S. Rout: changed org-capture.el Alon Albert: wrote rcompile.el -Alp Aker: changed nsfont.m nsterm.h nsterm.m buff-menu.el configure.in - nsfns.m nsmenu.m +Alp Aker: changed nsfont.m nsterm.m buff-menu.el nsfns.m nsmenu.m + nsterm.h configure.ac macfont.m mule-cmds.el nsselect.m window.el + +Álvar Ibeas: changed TUTORIAL.es + +Álvar Jesús Ibeas Martín: changed emacs-lisp-intro.texi Ami Fischman: changed bindings.el calendar.el diary-lib.el print.c savehist.el vc-git.el @@ -155,19 +190,18 @@ Anand Mitra: changed gnus-sum.el Anders Holst: wrote hippie-exp.el -Anders Lindgren: wrote autorevert.el cwarn.el follow.el -and changed font-lock.el etags.c compile.el nsfont.m nsterm.m +Anders Lindgern: changed nsterm.m -Andre Spiegel: changed vc.el vc-hooks.el vc-cvs.el vc-rcs.el vc-sccs.el - files.el dired.el files.texi cperl-mode.el ediff-util.el log-view.el - parse-time.el startup.el tramp-vc.el vc-arch.el vc-mcvs.el vc-svn.el - vcdiff viper-util.el +Anders Lindgren: wrote autorevert.el cwarn.el follow.el +and changed font-lock.el nsterm.m etags.c compile.el ert.el nsfont.m + nsterm.h -Andre Srinivasan: changed gnus-group.el gnus-sum.el gnus.texi message.el - mm-decode.el mml.el nnmail.el +Andrea Rossetti: changed ruler-mode.el Andrea Russo: changed erc-dcc.el info-look.el +Andreas Amann: changed emacsclient.c + Andreas Burtzlaff: changed org.el Andreas Büsching: changed emacsclient.c @@ -184,64 +218,88 @@ and changed erc.el erc-bbdb.el erc-button.el erc-log.el erc-stamp.el Andreas Jaeger: changed gnus-msg.el gnus-start.el gnus-xmas.el nnfolder.el nnml.el -Andreas Leha: changed ob.el +Andreas Leha: changed ob-latex.el ob.el Andreas Leue: changed artist.el Andreas Luik: changed xfns.c xterm.c -Andreas Politz: changed editfns.c elp.el ido.el outline.el term.el +Andreas Politz: changed editfns.c elp.el frame.c ibuffer.el ido.el + imenu.el modes.texi outline.el sql.el subr.el term.el Andreas Rottmann: changed emacsclient.1 emacsclient.c misc.texi server.el -Andreas Schwab: changed Makefile.in configure.in lisp.h xdisp.c alloc.c - process.c coding.c files.el keyboard.c xterm.c editfns.c emacs.c fns.c - print.c eval.c fileio.c lread.c sysdep.c dired.el xfns.c buffer.c - and 577 other files +Andreas Schwab: changed configure.ac lisp.h process.c xdisp.c alloc.c + coding.c Makefile.in files.el keyboard.c fileio.c xterm.c editfns.c + emacs.c src/Makefile.in fns.c lread.c print.c eval.c font.c xfns.c + sysdep.c and 633 other files Andreas Seltenreich: changed nnweb.el gnus.texi message.el gnus-sum.el - gnus.el nnslashdot.el gnus-srvr.el gnus-util.el mm-url.el mm-uu.el - url-http.el xterm.c battery.el comint.el easy-mmode.el gmm-utils.el - gnus-art.el gnus-cite.el gnus-draft.el gnus-group.el gnus-ml.el - and 7 other files + gnus.el gnus-srvr.el gnus-util.el mm-url.el mm-uu.el url-http.el + xterm.c battery.el comint.el easy-mmode.el gmm-utils.el gnus-art.el + gnus-cite.el gnus-draft.el gnus-group.el gnus-ml.el gnus-msg.el + and 6 other files Andreas Vögele: changed pgg-def.el +Andrei Chițu: changed icalendar.el + +Andre Spiegel: changed vc.el vc-hooks.el vc-cvs.el vc-rcs.el vc-sccs.el + files.el dired.el files.texi cperl-mode.el ediff-util.el log-view.el + parse-time.el startup.el tramp-vc.el vc-arch.el vc-mcvs.el vc-svn.el + vcdiff viper-util.el + +Andre Srinivasan: changed gnus-group.el gnus-sum.el gnus.texi message.el + mm-decode.el mml.el nnmail.el + +Andrew Beals: changed spook.lines + Andrew Choi: changed macterm.c darwin.h mac-win.el sysdep.c emacs.c mac.c macfns.c fontset.c frame.c keyboard.c xfaces.c dispextern.h macmenu.c - unexmacosx.c Makefile.in configure.in frame.h macterm.h titdic-cnv.el - xdisp.c alloc.c and 26 other files + unexmacosx.c configure.ac frame.h macterm.h titdic-cnv.el xdisp.c + alloc.c callproc.c and 26 other files Andrew Cohen: wrote spam-wash.el -and changed nnir.el gnus-sum.el nnimap.el gnus.texi gnus-group.el - gnus-int.el dns.el gnus-art.el gnus-registry.el gnus-srvr.el gnus.el - nnheader.el nnspool.el +and changed nnir.el gnus-sum.el nnimap.el gnus-msg.el gnus.texi + gnus-group.el gnus-int.el dns.el gnus-art.el gnus-registry.el + gnus-srvr.el gnus.el nnheader.el nnspool.el Andrew Csillag: wrote m4-mode.el Andrew Hall: changed paren.el -Andrew Innes: changed makefile.w32-in makefile.nt w32fns.c w32term.c - w32.c w32proc.c fileio.c gmake.defs w32-fns.el dos-w32.el ms-w32.h - nmake.defs w32term.h makefile.def unexw32.c w32menu.c w32xfns.c addpm.c - cmdproxy.c emacs.c w32-win.el and 137 other files +Andrew Hyatt: changed org-archive.el org.el org.texi + +Andrew Innes: changed makefile.nt w32fns.c w32term.c w32.c w32proc.c + makefile.w32-in fileio.c gmake.defs leim/makefile.w32-in + lib-src/makefile.w32-in w32-fns.el dos-w32.el inc/ms-w32.h nmake.defs + nt/makefile.w32-in src/makefile.w32-in w32term.h makefile.def unexw32.c + w32menu.c w32xfns.c and 139 other files -Andrew Oram: changed calendar.texi (and other files in man/) +Andrew Oram: changed calendar.texi (and other doc files) Andrew Schein: changed sql.el +Andrew W. Nosenko: changed tramp.el + Andrew Zhilin: changed emacs22.png emacs22.ico +Andrey Kotlarski: changed eww.el eww.texi + Andrey Slusar: changed gnus-async.el gnus.el Andrey Zhdanov: changed gud.el -Andy Moreton: changed makefile.w32-in +Andrzej Lichnerowicz: wrote ob-io.el ob-scala.el + +Andy Moreton: changed emacs/makefile.w32-in gnutls.c Andy Norman: wrote ange-ftp.el Andy Petrusenco: changed w32term.c +Andy Sawyer: changed saveplace.el + Andy Seaborne: changed keyboard.c Andy Stewart: wrote org-w3m.el @@ -255,11 +313,12 @@ Anna M. Bigatti: wrote cal-html.el Antoine Levitt: changed gnus-group.el gnus-sum.el message.texi ada-prj.el ange-ftp.el cus-edit.el dired-x.el ebnf2ps.el emerge.el erc-button.el - erc-goodies.el erc-track.el files.el find-file.el gnus-art.el - gnus-uu.el gnus.el gnus.texi message.el mh-funcs.el mh-mime.el - and 7 other files + erc-goodies.el erc-stamp.el erc-track.el files.el find-file.el + gnus-art.el gnus-uu.el gnus.el gnus.texi message.el mh-funcs.el + and 8 other files -Ari Roponen: changed atimer.c doc.c mule.texi startup.el time-date.el +Ari Roponen: changed atimer.c doc.c hash.texi mule.texi package.el + startup.el time-date.el Arisawa Akihiro: changed characters.el coding.c epa-file.el japan-util.el language/tibetan.el message.el mm-decode.el mm-view.el ps-print.el @@ -270,23 +329,36 @@ Arnaud Giersch: changed gnus-sum.el Arne Georg Gleditsch: changed gnus-sum.el Arne Jørgensen: wrote latexenc.el -and changed smime.el mml-smime.el smime-ldap.el gnus-art.el gnus-sieve.el - ldap.el message.el mm-decode.el mml-sec.el mml.el mule-conf.el - nnimap.el nnrss.el wid-edit.el +and changed smime.el mml-smime.el smime-ldap.el flymake.el gnus-art.el + gnus-sieve.el ldap.el message.el mm-decode.el mml-sec.el mml.el + mule-conf.el nnimap.el nnrss.el wid-edit.el -Arni Magnusson: changed ada-mode.texi frames.texi texinfo.el +Arni Magnusson: wrote bat-mode.el +and changed ada-mode.texi frames.texi generic-x.el texinfo.el Artem Chuprina: changed message.el +Artur Malabarba: wrote let-alist.el +and changed package.el bindings.el newcomment.el package-test.el + desktop.el doc-view.el ido.el image-mode.el isearch.el package-x.el + simple.el + +Arun Persaud: changed org-agenda.el org-src.el + Ashwin Ram: wrote refer.el +Atsuo Ohki: changed lread.c + Aubrey Jaffer: changed info.el unexelf.c +Aurélien Aptel: changed cus-face.el dispextern.h display.texi faces.el + nsterm.m ox-html.el url.texi w32term.c xfaces.c xterm.c + Axel Boldt: changed ehelp.el electric.el B. Anyos: changed w32term.c -Baoqiu Cui: wrote org-docbook.el +Baoqiu Cui: changed org-docbook.el Barry A. Warsaw: wrote assoc.el elp.el man.el regi.el reporter.el supercite.el @@ -294,47 +366,53 @@ and co-wrote cc-align.el cc-cmds.el cc-compat.el cc-defs.el cc-engine.el cc-guess.el cc-langs.el cc-menus.el cc-mode.el cc-styles.el cc-vars.el and changed c++-mode.el cplus-md1.el syntax.c syntax.h -Barry Fishman: changed gnu-linux.h +Barry Fishman: changed configure.ac gnu-linux.h image.c + +Barry O'Reilly: changed simple.el lisp.h undo-tests.el keyboard.c + markers.texi alloc.c bytecode.c casetab.c data.c eval.c fileio.c fw.el + idle.el insdel.c lread.c pulse.el search.c subr.el text.texi + timer-tests.el undo.c -Bastien Guerry: wrote gnus-bookmark.el org-latex.el +Bastien Guerry: wrote gnus-bookmark.el and co-wrote org-bibtex.el org-list.el org-protocol.el org-src.el -and changed org.el org-agenda.el org-html.el org-clock.el org-exp.el - org.texi org-table.el org-capture.el org-publish.el org-timer.el - org-export-latex.el org-archive.el org-ascii.el org-colview.el - org-exp-blocks.el org-mobile.el ob.el org-eshell.el bookmark.el info.el - org-attach.el and 36 other files +and changed org.el org-agenda.el org.texi ox-html.el org-clock.el + org-capture.el org-table.el ox-latex.el ox.el ox-odt.el org-compat.el + ox-publish.el ob.el org-mobile.el org-colview.el org-macs.el + org-pcomplete.el org-timer.el org-faces.el ox-ascii.el org-archive.el + and 116 other files Ben A. Mesander: co-wrote erc-dcc.el -Ben Harris: changed configure.in - -Ben Key: changed w32.c w32fns.c w32menu.c configure.bat makefile.w32-in - INSTALL gmake.defs nmake.defs w32.h w32term.c configure.in emacs.c - keyboard.c make-docfile.c ms-w32.h nsfont.m nsterm.m sound.c xfaces.c - -Ben Menasha: changed nnmh.el - -Ben North: changed outline.el buffer.c fill.el isearch.el lisp-mode.el - paren.el w32term.c xfaces.c - Bengt Martensson: co-wrote bibtex.el +Ben Harris: changed configure.ac + Benjamin Andresen: wrote ob-screen.el Benjamin Drieu: wrote pong.el -and changed org-clock.el +and changed org-clock.el org.el -Benjamin Riefenstahl: changed w32select.c emacs.c lisp.h mac-win.el - macterm.c ms-w32.h mule-cmds.el runemacs.c tcl.el w32.c w32.h +Benjamin Riefenstahl: changed w32select.c emacs.c inc/ms-w32.h lisp.h + mac-win.el macterm.c mule-cmds.el runemacs.c tcl.el w32.c w32.h Benjamin Rutt: co-wrote gnus-dired.el and changed vc.el gnus-msg.el message.el diff-mode.el ffap.el nnimap.el nnmbox.el simple.el vc-cvs.el +Ben Key: changed w32.c w32fns.c w32menu.c configure.bat INSTALL + gmake.defs nmake.defs src/makefile.w32-in w32.h w32term.c configure.ac + emacs.c inc/ms-w32.h keyboard.c lib-src/makefile.w32-in make-docfile.c + nsfont.m nsterm.m sound.c xfaces.c + +Ben Menasha: changed nnmh.el + +Ben North: changed outline.el buffer.c fill.el isearch.el lisp-mode.el + paren.el w32term.c xfaces.c + Bernhard Herzog: changed vc-hg.el menu.c xsmfns.c Bernt Hansen: changed org-agenda.el org-clock.el org.el org-capture.el - org-html.el org-indent.el org.texi + org-indent.el org-macs.el org.texi ox-html.el Bill Atkins: changed wdired.el @@ -343,12 +421,13 @@ Bill Burton: changed ptx.h sequent-ptx.h Bill Carpenter: wrote feedmail.el (public domain) Bill Mann: wrote perl-mode.el -and changed configure.in unexaix.c ibmrs6000.h usg5-4-3.h +and changed configure.ac unexaix.c ibmrs6000.h usg5-4-3.h Bill Pringlemeir: changed messcompat.el Bill Richter: changed fill.el quail.el ccl.el encoded-kb.el fontset.el - kinsoku.el kkc.el mule-cmds.el mule-conf.el mule-util.el mule.el + international/mule-util.el kinsoku.el kkc.el mule-cmds.el mule-conf.el + mule.el Bill Rozas: wrote scheme.el and changed xscheme.el @@ -359,23 +438,23 @@ Bill Wohler: wrote mh-buffers.el mh-comp.el mh-compat.el mh-e.el mh-folder.el mh-funcs.el mh-letter.el mh-mime.el mh-scan.el mh-seq.el mh-show.el mh-utils.el mh-xface.el and co-wrote mh-junk.el -and changed mh-customize.el mh-search.el mh-alias.el mh-identity.el - mh-e.texi mh-speed.el mh-init.el mh-acros.el mh-gnus.el mh-unit.el - mh-inc.el mh-xemacs-compat.el mh-print.el Makefile.in image.el - mh-tool-bar.el mh-xemacs.el README display.texi makefile.w32-in - mh-pick.el and 86 other files - -Bjorn Solberg: changed nnimap.el +and changed mh-customize.el mh-search.el mh-alias.el Makefile mh-e.texi + mh-identity.el README mh-speed.el mh-init.el mh-acros.el mh-gnus.el + mh-unit.el mh-inc.el mh-xemacs-compat.el mh-print.el lisp/Makefile.in + image.el mh-tool-bar.el mh-xemacs.el display.texi makefile.w32-in + and 86 other files Björn Lindström: changed rcirc.texi +Bjørn Mork: changed nnimap.el gnus-agent.el message.el mml2015.el + +Bjorn Solberg: changed nnimap.el + Björn Torkelsson: changed gnus-art.el gnus-group.el gnus-srvr.el gnus-sum.el gnus-mlspl.el gnus-msg.el message.el gnus-agent.el gnus-cus.el gnus-gl.el gnus-nocem.el gnus-score.el gnus-topic.el gnus.el mail-source.el nnmail.el -Bjørn Mork: changed nnimap.el gnus-agent.el message.el mml2015.el - Bob Glickstein: wrote sregex.el and changed isearch.el sendmail.el @@ -396,13 +475,15 @@ Bojan Petrovic: changed pop3.el Boris Goldowsky: wrote avoid.el descr-text.el enriched.el facemenu.el format.el shadowfile.el and changed fill.el simple.el indent.el paragraphs.el cmds.c intervals.c - intervals.h add-log.el cc-mode.el enriched.doc fileio.c make-mode.el + intervals.h add-log.el cc-mode.el enriched.txt fileio.c make-mode.el text-mode.el textprop.c ada.el allout.el awk-mode.el bibtex.el buffer.c buffer.h c-mode.el and 38 other files -Boris Samorodov: changed imap.el +Boyd Lynn Gerber: changed configure.ac -Boyd Lynn Gerber: changed configure.in +Bozhidar Batsov: changed ruby-mode.el subr-x.el subr.el bytecomp.el + comint.el lisp-mode.el package.el progmodes/python.el prolog.el + ruby-mode-tests.el scheme.el Brad Howes: changed gnus-demon.el @@ -412,19 +493,20 @@ Brendan Kehoe: changed hpux9.h Brent Goodrick: changed abbrev.el -Brian Cully: changed ns-emacs.texi +Brian Cully: changed macos.texi Brian D. Carlstrom: changed gud.el smtpmail.el -Brian Fox: changed Makefile.in Makefile configure.in minibuf.c dired.el - files.el rmail.el search.c simple.el sysdep.c compile.el forms.texi - frame.c info.texi keyboard.c make-dist subr.el systty.h texindex.c - xterm.c ymakefile and 46 other files +Brian Fox: changed Makefile.in Makefile configure.ac minibuf.c dired.el + files.el lib-src/Makefile.in oldXMenu/Makefile.in rmail.el search.c + simple.el sysdep.c compile.el forms.texi frame.c keyboard.c make-dist + subr.el systty.h texindex.c xterm.c and 47 other files + +Brian Jenkins: changed frame.c frames.texi hooks.texi Brian Marick: co-wrote hideif.el -Brian P Templeton: changed erc.el erc-compat.el erc-fill.el - erc-nickserv.el erc-pcomplete.el erc-stamp.el erc-track.el +Brian Mckenna: changed eww.el Brian Palmer: changed erc.el erc-list.el @@ -433,17 +515,30 @@ Brian Preble: changed abbrev.el apropos.el asm-mode.el awk-mode.el compare-w.el compile.el dabbrev.el debug.el diary.el diff.el dired.el doctex.el doctor.el ebuff-menu.el echistory.el and 129 other files +Brian P Templeton: changed erc.el erc-compat.el erc-fill.el + erc-nickserv.el erc-pcomplete.el erc-stamp.el erc-track.el lread.c + nsfont.m + Brian Sniffen: changed gnus-draft.el imap.el mm-decode.el +Brian van den Broek: changed org.texi + +Bruno Félix Rezende Ribeiro: changed functions.texi + Bruno Haible: co-wrote po.el and changed INSTALL emacs.1 epaths.in info.el paths.el -Bryan Henderson: changed term.el +Bryan Henderson: changed Makefile term.el Bryan O'Sullivan: changed ange-ftp.el +Caio Tiago Oliveira: changed ob-scala.el + Caleb Deupree: changed w32-fns.el +Cameron Desautels: changed cus-edit.el custom.texi help.el regexp-opt.el + ruby-mode.el + Carl D. Roth: changed gnus-nocem.el Carl Edman: co-wrote ns-win.el @@ -453,28 +548,26 @@ Carl Henrik Lunde: changed format-spec.el Carsten Bormann: changed ibmrs6000.h latin-post.el Carsten Dominik: wrote idlw-complete-structtag.el idlw-toolbar.el - org-agenda.el org-archive.el org-ascii.el org-beamer.el org-capture.el - org-clock.el org-colview.el org-compat.el org-datetree.el org-exp.el - org-faces.el org-feed.el org-footnote.el org-html.el org-icalendar.el - org-id.el org-indent.el org-info.el org-inlinetask.el org-install.el - org-jsinfo.el org-macs.el org-mks.el org-mobile.el org-remember.el - org-rmail.el org-table.el org-timer.el org-vm.el org-xoxo.el org.el + org-agenda.el org-archive.el org-capture.el org-clock.el org-colview.el + org-compat.el org-datetree.el org-faces.el org-feed.el org-footnote.el + org-id.el org-indent.el org-info.el org-inlinetask.el org-macs.el + org-mobile.el org-rmail.el org-table.el org-timer.el org.el reftex-auc.el reftex-cite.el reftex-dcr.el reftex-global.el reftex-index.el reftex-parse.el reftex-ref.el reftex-sel.el reftex-toc.el reftex-vars.el reftex.el and co-wrote idlw-help.el idlw-shell.el idlwave.el org-bbdb.el org-bibtex.el org-entities.el org-gnus.el org-list.el org-pcomplete.el - org-src.el -and changed org-latex.el org.texi org-publish.el orgcard.tex - org-export-latex.el org-colview-xemacs.el org-docbook.el org-attach.el - org-mouse.el org-protocol.el org-mac-message.el org-wl.el org-crypt.el + org-src.el ox-beamer.el ox-html.el ox-icalendar.el +and changed ox.el ox-latex.el org.texi org-remember.el orgcard.tex + ox-publish.el org-docbook.el ox-ascii.el org-attach.el org-protocol.el + org-mouse.el org-mac-message.el org-wl.el ox-jsinfo.el org-crypt.el org-freemind.el idlw-rinfo.el org-exp-blocks.el org-habit.el org-mhe.el - org-plot.el org-special-blocks.el reftex.texi and 24 other files + org-plot.el and 35 other files -Caveh Jalali: changed configure.in intel386.h sol2-4.h +Caveh Jalali: changed configure.ac intel386.h sol2-4.h -Chad Brown: changed aix4-2.h bsd-common.h config.in configure.in cygwin.h - dired.c gnu-linux.h mh-comp.el msdos.h sed2v2.inp sysdep.c usg5-4.h +Chad Brown: changed aix4-2.h bsd-common.h configure.ac cygwin.h dired.c + gnu-linux.h mh-comp.el msdos.h sed2v2.inp sysdep.c usg5-4.h Changwoo Ryu: changed files.el @@ -483,6 +576,8 @@ Chao-Hong Liu: changed TUTORIAL.cn TUTORIAL.zh Charles Hannum: changed aix3-1.h aix3-2.h configure ibmrs6000.h keyboard.c netbsd.h pop.c sysdep.c systime.h systty.h xrdb.c +Charles Rendleman: changed eww.el + Charles Sebold: changed org-plot.el Charlie Martin: wrote autoinsert.el @@ -496,25 +591,25 @@ Chip Coldwell: changed font.c Chong Yidong: wrote compile-tests.el dichromacy-theme.el font-parse-tests.el redisplay-testsuite.el tabulated-list.el + xml-parse-tests.el and co-wrote longlines.el tango-dark-theme.el tango-theme.el -and changed xdisp.c simple.el display.texi files.el frames.texi - files.texi cus-edit.el keyboard.c custom.el text.texi package.el - startup.el faces.el xterm.c emacs.texi misc.texi subr.el image.c - mouse.el custom.texi xfns.c and 845 other files +and changed simple.el display.texi xdisp.c files.el frames.texi + cus-edit.el files.texi custom.el subr.el text.texi faces.el keyboard.c + startup.el package.el misc.texi emacs.texi modes.texi mouse.el + custom.texi image.c window.el and 923 other files Chris Chase: co-wrote idlw-shell.el idlwave.el Chris Foote: changed progmodes/python.el -Chris Gray: wrote org-special-blocks.el -and changed mm-decode.el +Chris Gray: changed mm-decode.el ox-html.el Chris Hall: changed callproc.c frame.c Chris Hanson: changed xscheme.el scheme.el xterm.c hpux.h x11term.c - hp9000s300.h keyboard.c process.c texinfmt.el emacsclient.c sort.el - syntax.c texnfo-upd.el x11fns.c xfns.c dired.el fileio.c hp9000s800.h - indent.c info.el man.el and 17 other files + hp9000s300.h keyboard.c process.c texinfmt.el sort.el syntax.c + texnfo-upd.el x11fns.c xfns.c dired.el emacsclient.c fileio.c + hp9000s800.h indent.c info.el man.el and 17 other files Chris Hecker: changed calc-aent.el @@ -532,26 +627,27 @@ Chris Prince: changed w32term.c Chris Smith: wrote icon.el and changed icon-mode.el -Christian Egli: wrote org-taskjuggler.el -and changed org.texi +Christian Egli: changed org-taskjuggler.el org.texi -Christian Faulhammer: changed Makefile.in configure configure.in +Christian Faulhammer: changed configure configure.ac src/Makefile.in vc-bzr.el Christian Limpach: co-wrote ns-win.el -and changed configure.in +and changed configure.ac Christian Lynbech: changed appt.el emacsserver.c tramp.el Christian Millour: changed shell.el -Christian Moe: changed org-bbdb.el org-html.el org-special-blocks.el +Christian Moe: changed org-bbdb.el org-special-blocks.el ox-html.el + ox-odt.el Christian Neukirchen: changed mm-util.el -Christian Ohler: wrote ert-tests.el ert-x.el ert.el -and changed Makefile.in automated configure.in ert-x-tests.el ert.texi - makefile.w32-in +Christian Ohler: wrote ert-tests.el ert.el +and co-wrote ert-x.el +and changed Makefile.in automated automated/Makefile.in configure.ac + ert-x-tests.el ert.texi misc/Makefile.in misc/makefile.w32-in Christian Plate: changed nnmaildir.el sgml-mode.el @@ -559,28 +655,28 @@ Christian Plaunt: wrote soundex.el Christian von Roques: changed mml2015.el epg.el gnus-start.el -Christoph Bauer: changed configure.in - -Christoph Conrad: changed gnus-agent.el gnus-score.el makefile.w32-in - qp.el +Christian Wittern: changed image-mode.el -Christoph Scholtes: changed makefile.w32-in README.W32 - progmodes/python.el stdint.h INSTALL maintaining.texi zipdist.bat - admin.el bookmark.el config.nt configure.bat control.texi cua-base.el - gmake.defs help-mode.el help.el ido.el make-dist makedist.bat menu.c - minibuf.c and 6 other files +Christoph Bauer: changed configure.ac -Christoph Wedler: wrote antlr-mode.el -and changed format.el gnus-art.el gnus-picon.el message.el register.el - smiley.el texinfmt.el +Christoph Conrad: changed gnus-agent.el gnus-score.el + lib-src/makefile.w32-in qp.el -Christophe Rhodes: changed org-exp.el +Christoph Dittmann: changed ox-beamer.el Christophe de Dinechin: co-wrote ns-win.el +Christophe Deleuze: changed icalendar.el + +Christoph Egger: changed configure.ac + +Christophe Junke: changed org-agenda.el org.el + Christopher Allan Webber: changed gamegrid.el org-agenda.el tetris.el -Christopher Genovese: changed assoc.el +Christopher Genovese: changed assoc.el help-fns.el + +Christophe Rhodes: changed ox-latex.el ox.el Christopher J. Madsen: wrote decipher.el and changed replace.el files.el ispell.el time.el @@ -589,17 +685,31 @@ Christopher J. White: changed url-http.el Christopher Oliver: changed mouse.el -Christopher Schmidt: changed ibuffer.el +Christopher Schmidt: changed ibuffer.el org.el tips.texi calc-aent.el + calc.el calc.texi calendar.el cl-macs.el comint.el dired-x.el dired.el + files.el files.texi find-dired.el gnus-int.el gnus-msg.el gnus.texi + help-fns.el info.el locate.el lread.c and 14 other files + +Christoph Scholtes: changed README.W32 lib/makefile.w32-in + nt/makefile.w32-in progmodes/python.el stdint.h INSTALL + maintaining.texi src/makefile.w32-in zipdist.bat INSTALL.REPO admin.el + bookmark.el config.nt configure.bat control.texi cua-base.el gmake.defs + help-mode.el help.el ibuffer.el ido.el and 13 other files -Christopher Suckling: co-wrote org-mac-message.el +Christoph Wedler: wrote antlr-mode.el +and changed format.el gnus-art.el gnus-picon.el message.el register.el + smiley.el texinfmt.el + +Chris Zheng: changed gnutls.c Chuck Blake: changed term.c Chunyu Wang: changed gnus-art.el pcl-cvs.texi -Claudio Bley: changed makefile.w32-in process.c +Claudio Bley: changed image.c image.el process.c src/makefile.w32-in + stat.h w32-win.el w32.c -Claudio Fontana: changed Makefile.in +Claudio Fontana: changed Makefile.in leim/Makefile.in lib-src/Makefile.in Colin Marquardt: changed gnus.el message.el @@ -607,29 +717,31 @@ Colin Rafferty: changed message.el Colin Walters: wrote ibuf-ext.el ibuf-macs.el ibuffer.el and changed calc.el replace.el update-game-score.c calc-ext.el - calc-misc.el Makefile.in calc-macs.el calc-mode.el calc-graph.el - gamegrid.el calc-aent.el calc-bin.el calc-embed.el calc-keypd.el - calc-math.el calc-prog.el calc-units.el calcalg2.el font-core.el - info.el calc-alg.el and 78 other files + calc-misc.el calc-macs.el calc-mode.el calc-graph.el gamegrid.el + calc-aent.el calc-bin.el calc-embed.el calc-keypd.el calc-math.el + calc-prog.el calc-units.el calcalg2.el font-core.el info.el calc-alg.el + calc-arith.el and 80 other files Colin Williams: changed calc.texi +Constantin Kulikov: changed server.el startup.el + Courtney Bane: changed term.c Craig Markwardt: changed icalendar.el Craig McDaniel: changed sheap.c -D. E. Evans: changed basic.texi +Craig Tanis: changed ox-latex.el Daiki Ueno: wrote epa-dired.el epa-file.el epa-hook.el epa-mail.el epa.el epg-config.el epg.el pgg-def.el pgg-gpg.el pgg-parse.el pgg-pgp.el pgg-pgp5.el pgg.el plstore.el sasl.el starttls.el and co-wrote sasl-cram.el sasl-digest.el -and changed mml2015.el mml1991.el epa.texi auth-source.el gnus.texi - mm-uu.el mml-smime.el Makefile.in auth.texi gnus-sum.el mm-decode.el - mm-view.el mml-sec.el mml.el dired.el dired.texi epa-file-hook.el - epa-setup.el epg-package-info.el faces.el files.el and 17 other files +and changed mml2015.el mml1991.el epa.texi auth-source.el mml-smime.el + mml.el package.el gnus.texi mm-decode.el mm-uu.el auth.texi gnus-sum.el + mm-view.el mml-sec.el archive-contents archive-contents.sig dbus.el + dired.el dired.texi epa-file-hook.el epa-setup.el and 32 other files Dale Gulledge: changed TUTORIAL.eo @@ -638,9 +750,13 @@ Dale Hagglund: changed unexelf.c Dale R. Worley: wrote emerge.el (public domain) and changed mail-extr.el +Dale Sedivec: changed sgml-mode.el wisent/python.el + +Damien Cassou: changed info.el + Damien Elmes: changed erc.el erc-dcc.el erc-track.el erc-log.el - erc-pcomplete.el erc-button.el erc-nets.el erc-ring.el erc-fill.el - erc-match.el erc-members.el erc-nickserv.el + erc-pcomplete.el README erc-button.el erc-nets.el erc-ring.el Makefile + erc-fill.el erc-match.el erc-members.el erc-nickserv.el Damon Anton Permezel: wrote hanoi.el (public domain) @@ -651,48 +767,50 @@ Dan Christensen: changed gnus-sum.el nndoc.el nnfolder.el gnus-art.el spam.el time-date.el Dan Davison: wrote ob-matlab.el ob-octave.el -and co-wrote ob-R.el ob-exp.el ob-lob.el ob-perl.el ob-python.el - ob-ref.el ob.el org-src.el -and changed ob-sh.el org-exp.el org.el org-latex.el ob-tangle.el ob-C.el +and co-wrote ob-R.el ob-core.el ob-exp.el ob-lob.el ob-perl.el + ob-python.el ob-ref.el org-src.el +and changed ob.el ob-sh.el org.el ox.el ox-latex.el ob-tangle.el ob-C.el ob-asymptote.el ob-clojure.el ob-haskell.el ob-ruby.el ob-scheme.el ob-table.el ob-ditaa.el ob-dot.el ob-gnuplot.el ob-js.el ob-mscgen.el - ob-ocaml.el ob-org.el ob-plantuml.el ob-sass.el and 13 other files + ob-ocaml.el ob-org.el ob-plantuml.el and 14 other files -Dan Nicolaescu: wrote iris-ansi.el romanian.el vc-dir.el -and co-wrote hideshow.el -and changed vc.el Makefile.in configure.in vc-hg.el vc-git.el vc-bzr.el - sysdep.c emacs.c process.c vc-cvs.el lisp.h term.c vc-hooks.el xterm.c - keyboard.c vc-svn.el xterm.el callproc.c darwin.h term.el gnu-linux.h - and 918 other files - -Dan Rosenberg: changed movemail.c - -Dani Moncayo: changed buffers.texi lists.texi custom.texi dired.texi - makefile.w32-in text.texi +Daniel Bergey: changed indian.el Daniel Brockman: changed cus-start.el format-spec.el ibuffer.el rcirc.el -Daniel Clemente: changed generic-x.el org-html.el +Daniel Clemente: changed generic-x.el ox-html.el -Daniel Colascione: co-wrote js.el -and changed cmdproxy.c subr.el syntax.el DEBUG cc-engine.el cus-start.el - eval.c fns.c frames.texi imenu.el keyboard.c lisp.h nxml-mode.el - nxml-rap.el nxml-util.el sh-script.el which-func.el +Daniel Colascione: wrote finalizer-tests.el generator-tests.el + generator.el syntax-tests.el +and co-wrote js.el +and changed w32fns.c alloc.c emacs.c cl-macs.el image.c keyboard.c lisp.h + sh-script.el configure.ac cygw32.c process.c src/Makefile.in w32term.h + automated/cl-lib-tests.el cygw32.h dbusbind.c fns.c unexcw.c unexw32.c + w32.c w32term.c and 144 other files -Daniel Dehennin: changed mml2015.el gnus-msg.el mm-decode.el +Daniel Dehennin: changed mml2015.el gnus-mlspl.el gnus-msg.el + mm-decode.el ox.el Daniel E. Doherty: changed calc.texi -Daniel Elliott: changed octave-mod.el +Daniel Elliott: changed octave.el Daniel Engeler: changed sysdep.c elisp.texi emacs.texi internals.texi misc.texi process.c process.h processes.texi term.el w32.c w32.h -Daniel Hackney: changed emacsclient.c package.el process.c +Daniel Hackney: wrote package-test.el +and co-wrote package.el +and changed package-x.el ange-ftp.el automated/Makefile.in + automated/package-test.el browse-url.el dbus.el dired-x.el + ediff-diff.el ediff-init.el ediff-merg.el ediff-mult.el ediff-util.el + ediff-wind.el ediff.el emacsclient.c emerge.el eudc.el eudcb-ldap.el + eww.el finder.el imap.el and 7 other files Daniel Jensen: changed apropos.el -Daniel Laliberte: wrote cl-specs.el cust-print.el edebug.el isearch.el +Daniel Koning: changed artist.el commands.texi subr.el + +Daniel LaLiberte: wrote cust-print.el edebug.el isearch.el and co-wrote hideif.el and changed mlconvert.el eval-region.el @@ -720,39 +838,61 @@ Daniel Quinlan: changed dired.el info.el Daniel Schoepe: changed gnus-sum.el +Dani Moncayo: changed Makefile.in msys-to-w32 configure.ac buffers.texi + lists.texi mini.texi nt/makefile.w32-in INSTALL README.W32 basic.texi + custom.texi dired.texi display.texi emacs-lisp-intro.texi killing.texi + make-dist mark.texi msysconfig.sh simple.el text.texi version.el + zipdist.bat + +Dan Nicolaescu: wrote iris-ansi.el romanian.el vc-dir.el +and co-wrote hideshow.el +and changed vc.el configure.ac vc-hg.el vc-git.el src/Makefile.in + vc-bzr.el sysdep.c emacs.c process.c vc-cvs.el lisp.h term.c + vc-hooks.el xterm.c keyboard.c vc-svn.el xterm.el callproc.c darwin.h + term.el gnu-linux.h and 920 other files + Danny Roozendaal: wrote handwrite.el Danny Siu: changed gnus-sum.el gnus-picon.el nndoc.el nnimap.el smiley.el -Darren Hoo: changed db.el gnus-art.el +Dan Rosenberg: changed movemail.c + +Darren Hoo: changed db-find.el db.el gnus-art.el isearch.el man.el + nsmenu.m startup.el Darren Stalder: changed gnus-util.el Darrin B. Jewell: changed etags.c lisp.h +Dato Simó: changed network-stream.el + Dave Detlefs: co-wrote cc-align.el cc-cmds.el cc-defs.el cc-engine.el cc-langs.el cc-menus.el cc-mode.el cc-styles.el cc-vars.el +Dave Goldberg: changed message.el + Dave Lambert: changed sol2-5.h xfns.c xterm.c xterm.h -Dave Love: wrote autoarg.el autoconf.el benchmark.el cap-words.el - cfengine.el elide-head.el hl-line.el language/georgian.el - latin1-disp.el progmodes/python.el quail/georgian.el refill.el - rfc1345.el sgml-input.el smiley.el sym-comp.el tool-bar.el uni-input.el - utf-7.el utf-8-lang.el vc/vc-bzr.el welsh.el +Dave Love: wrote autoarg.el autoconf.el benchmark.el cfengine.el + elide-head.el hl-line.el language/georgian.el latin1-disp.el + quail/georgian.el refill.el rfc1345.el sgml-input.el smiley.el + sym-comp.el tool-bar.el uni-input.el utf-7.el utf-8-lang.el + vc/vc-bzr.el welsh.el and co-wrote latin-ltx.el socks.el -and changed Makefile.in configure.in help.el mule-cmds.el fortran.el - mule-conf.el xterm.c browse-url.el mule.el coding.c european.el fns.c - mule-diag.el simple.el wid-edit.el cus-edit.el cus-start.el files.el - keyboard.c byte-opt.el info.el and 770 other files +and changed configure.ac help.el mule-cmds.el fortran.el mule-conf.el + xterm.c browse-url.el mule.el coding.c src/Makefile.in european.el + fns.c mule-diag.el simple.el wid-edit.el cus-edit.el cus-start.el + files.el keyboard.c byte-opt.el info.el and 770 other files Dave Pearson: wrote 5x5.el quickurl.el -David A. Capello: changed etags.c +David Abrahams: changed gnus-int.el gnus-sum.el nnimap.el + gnus-registry.el org-agenda.el auth-source.el coding.c cus-start.el + ediff-init.el ediff-util.el filelock.c gnus-range.el gnus-salt.el + gnus.texi mairix.el nnir.el nnmairix.el nnregistry.el org-clock.el + org.el -David Abrahams: changed gnus-sum.el org-agenda.el coding.c ediff-init.el - gnus-registry.el gnus.texi mairix.el nnimap.el nnir.el nnmairix.el - nnregistry.el org-clock.el +David A. Capello: changed etags.c David Bakhash: wrote strokes.el @@ -762,20 +902,25 @@ David Burger: changed macros.el David Byers: changed minibuf.c +David Cadé: changed mpc.el + +David Caldwell: changed unexmacosx.c + David Casperson: changed font-core.el menu-bar.el tex-mode.el David De La Harpe Golden: changed files.el mouse.el simple.el fileio.c cus-start.el nsselect.m select.el w32-fns.el x-win.el xterm.c -David Edmondson: changed message.el gnus-cite.el imap.el mm-uu.el - mm-view.el mml2015.el nnfolder.el nnimap.el nnml.el +David Edmondson: changed message.el mml2015.el gnus-cite.el mm-uu.el + mm-view.el nnfolder.el nnimap.el nnml.el shr.el David Engster: wrote mairix.el nnmairix.el -and changed gnus.texi insert.el registry.el db-find.el gnus-msg.el - analyze/complete.el base.el bovine-grammar.el cedet/srecode.el - cpp-root.el db-typecache.el db.el dictionary.el display.texi - document.el ede-grammar.el ede/custom.el ede/generic.el files.el - filters.el gnus-registry.el and 23 other files +and co-wrote gitmerge.el +and changed cedet/semantic.el db.el insert.el semantic/complete.el c.by + c.el db-el.el db-find.el ede-grammar.el eieio-opt.el eieio.el + eieio.texi gnus.texi registry.el srecode/compile.el wisent/python.el + analyze.el bovine/el.el bovine/grammar.el db-file.el decorate/mode.el + and 85 other files David Gillespie: wrote calc-aent.el calc-alg.el calc-arith.el calc-bin.el calc-comb.el calc-cplx.el calc-embed.el calc-ext.el calc-fin.el @@ -785,9 +930,9 @@ David Gillespie: wrote calc-aent.el calc-alg.el calc-arith.el calc-bin.el calc-prog.el calc-rewr.el calc-rules.el calc-sel.el calc-stat.el calc-store.el calc-stuff.el calc-trail.el calc-undo.el calc-units.el calc-vec.el calc-yank.el calc.el calcalg2.el calcalg3.el calccomp.el - calcsel2.el cl-compat.el cl-extra.el cl-macs.el cl-seq.el cl.el cl.texi - edmacro.el obsolete/complete.el -and changed info.el bytecomp.el complete.el + calcsel2.el cl-compat.el cl-extra.el cl-macs.el cl-seq.el cl.texi + edmacro.el emacs-lisp/cl-lib.el obsolete/complete.el +and changed info.el bytecomp.el cl.el complete.el David Glasser: changed tar-mode.el @@ -800,44 +945,37 @@ David Hedbor: changed nnmail.el David Hull: changed vc-hg.el -David Hunter: changed config.nt flymake.el ms-w32.h process.c - -David J. Biesack: changed antlr-mode.el +David Hunter: changed config.nt flymake.el inc/ms-w32.h process.c -David J. MacKenzie: changed configure.in etags.c Makefile.in fakemail.c - movemail.c wakeup.c cvtmail.c qsort.c termcap.c yow.c Makefile avoid.el - b2m.c config.in digest-doc.c emacsclient.c emacsserver.c emacstool.c - etags-vmslib.c fortran.el hexl.c and 14 other files +David J. Biesack: changed antlr-mode.el quickurl.el -David Kastrup: changed quail/greek.el replace.el faq.texi search.c - ange-ftp.el calc.el help.el keymaps.texi mouse.el subr.el woman.el - Makefile.in desktop.el gnus-art.el keymap.c keymap.h lisp-mnt.el - meta-mode.el mpuz.el process.c search.texi and 79 other files +David J. MacKenzie: changed configure.ac Makefile.in etags.c fakemail.c + cvtmail.c movemail.c termcap.c wakeup.c yow.c Makefile avoid.el b2m.c + config.in digest-doc.c emacsclient.c emacsserver.c emacstool.c + etags-vmslib.c fortran.el hexl.c isearch.el and 14 other files David Kågedal: wrote tempo.el and changed sendmail.el xmenu.c +David Kastrup: changed greek.el replace.el efaq.texi search.c subr.el + ange-ftp.el calc.el help.el keymaps.texi mouse.el woman.el desktop.el + gnus-art.el keymap.c keymap.h lisp-mnt.el meta-mode.el mpuz.el + process.c search.texi startup.el and 81 other files + David Lawrence: changed comint.el simple.el files.el c++-mode.el - compile.el getdate.y inf-lisp.el shell.el emerge.el tex-mode.el - c-mode.el cl.el dired.el emacs.1 emacsserver.c gnus.el history.el - lisp-mode.el lisp.el mh-e.el rnews.el and 79 other files + compile.el inf-lisp.el shell.el emerge.el tex-mode.el c-mode.el cl.el + dired.el getdate.y gnus.el history.el lisp-mode.el lisp.el mh-e.el + rnews.el subr.el Makefile and 79 other files David Lord: changed timeclock.el -David M. Brown: wrote array.el - -David M. Koppelman: wrote hi-lock.el -and changed display.texi - -David M. Smith: wrote ielm.el -and changed imenu.el pgg-def.el xterm.c +David Maus: changed org.el org-agenda.el ox.el org-feed.el org-wl.el + org-macs.el ox-html.el org-capture.el org.texi org-gnus.el org-bbdb.el + org-clock.el org-protocol.el ox-publish.el ob-haskell.el ob.el + org-bibtex.el org-compat.el org-footnote.el org-id.el org-list.el + and 20 other files -David Maus: co-wrote org-wl.el -and changed org.el org-agenda.el org-feed.el org-exp.el org-html.el - org-macs.el org-capture.el org.texi org-gnus.el org-bbdb.el - org-clock.el org-protocol.el org-publish.el ob-haskell.el ob.el - org-bibtex.el org-compat.el org-footnote.el org-id.el org-latex.el - org-list.el and 20 other files +David M. Brown: wrote array.el David McCabe: changed lisp-mode.el @@ -846,44 +984,57 @@ and changed mode-clone.el David Michael: changed files.el +David M. Koppelman: wrote hi-lock.el +and changed display.texi + David Moore: co-wrote nnvirtual.el and changed gnus-xmas.el -David Mosberger-Tang: changed alpha.h unexelf.c cm.h config.in - configure.in cvtmail.c data.c dispnew.c emacsserver.c etags.c - fakemail.c keyboard.c mem-limits.h process.c profile.c sorted-doc.c - sysdep.c terminfo.c unexelf1.c yow.c +David Mosberger-Tang: changed alpha.h unexelf.c cm.h configure.ac + cvtmail.c data.c dispnew.c emacsserver.c etags.c fakemail.c keyboard.c + mem-limits.h process.c profile.c sorted-doc.c sysdep.c terminfo.c + unexelf1.c yow.c + +David M. Smith: wrote ielm.el +and changed imenu.el pgg-def.el xterm.c -David O'Toole: wrote org-publish.el +David O'Toole: wrote ox-publish.el and co-wrote ob-lisp.el -David Ponce: wrote bovine-grammar.el cedet.el comp.el grammar-wy.el - grammar.el java-tags.el mode-local.el recentf.el ruler-mode.el +David Ponce: wrote bovine/grammar.el cedet.el comp.el java-tags.el + mode-local.el recentf.el ruler-mode.el semantic/grammar.el semantic/java.el semantic/wisent.el senator.el tree-widget.el - wisent-grammar.el wisent/wisent.el + wisent/grammar.el wisent/wisent.el and co-wrote util-modes.el and changed w32menu.c w32term.c close.png close.xpm empty.png empty.xpm end-guide.png end-guide.xpm files.el guide.png guide.xpm handle.png handle.xpm keyboard.c leaf.png leaf.xpm no-guide.png no-guide.xpm - no-handle.png no-handle.xpm open.png and 20 other files + no-handle.png no-handle.xpm open.png and 22 other files + +David Raynes: changed ns-win.el David Reitter: wrote mailclient.el -and changed nsterm.m nsfns.m ns-win.el nsfont.m Makefile.in cus-start.el - macos.texi menu-bar.el nsmenu.m simple.el commands.h cus-edit.el +and changed nsterm.m nsfns.m ns-win.el nsfont.m cus-start.el macos.texi + menu-bar.el nsmenu.m simple.el Makefile.in commands.h cus-edit.el easy-mmode.el emacsbug.el emacsclient.c faces.el flyspell.el info.el - keyboard.c keymap.c macterm.c and 12 other files + keyboard.c keymap.c lib-src/Makefile.in and 15 other files -David Robinow: changed makefile.w32-in w32inevt.c +David Robinow: changed w32inevt.c lib-src/makefile.w32-in + lispintro/makefile.w32-in David Robinson: changed menu-bar.el x-win.el +David Röthlisberger: changed ido.el + David S. Goldberg: changed gnus-art.el message.el David Vazquez: changed m4-mode.el David Z. Maze: changed nnml.el nnrss.el -Deanna Phillips: changed configure.in +Davor Cubranic: changed nsterm.m + +Deanna Phillips: changed configure.ac Debarshi Ray: changed erc-backend.el erc.el @@ -894,6 +1045,8 @@ Deepak Goel: changed idlw-shell.el ada-xref.el feedmail.el files.el org.el simple.el vc.el vhdl-mode.el wdired.el README ada-mode.el allout.el appt.el apropos.el artist.el and 85 other files +D. E. Evans: changed basic.texi + Denis B. Roegel: co-wrote solar.el Denis Bueno: changed autorevert.el @@ -903,15 +1056,16 @@ and changed complete.el Denis Stünkel: changed ibuf-ext.el -Deniz Dogan: changed rcirc.el simple.el css-mode.el commands.texi - image.el iswitchb.el lisp-mode.el process.c progmodes/python.el - quickurl.el rcirc.texi vc/vc-bzr.el wdired.el window.el +Deniz Dogan: changed rcirc.el simple.el css-mode.el TUTORIAL.sv + commands.texi erc-log.el erc.el image.el iswitchb.el lisp-mode.el + process.c progmodes/python.el quickurl.el rcirc.texi vc/vc-bzr.el + wdired.el window.el Dennis Gilmore: changed sparc.h Denys Duchier: changed pop3.el -Derek Atkins: changed imap.el pgg-pgp.el +Derek Atkins: changed pgg-pgp.el Derek L. Davies: changed gud.el @@ -920,17 +1074,18 @@ Derek Peschel: changed etags.c Derek Upham: changed nxml-mode.el Detlev Zundel: wrote re-builder.el +and changed buffer.c Devon Sean McCullough: changed comint.el url-http.el -Dhruva Krishnamurthy: changed makefile.w32-in emacsclient.c fontset.c - sound.c w32proc.c +Dhruva Krishnamurthy: changed emacsclient.c fontset.c makefile.w32-in + misc/makefile.w32-in nt/makefile.w32-in sound.c w32proc.c Diane Murray: changed erc.el erc-backend.el erc-menu.el erc-button.el erc-track.el erc-match.el erc-nets.el erc-list.el erc-autoaway.el erc-capab.el erc-nickserv.el erc-stamp.el erc-compat.el erc-fill.el erc-goodies.el erc-ibuffer.el erc-log.el erc-nicklist.el url-http.el - erc-dcc.el erc-networks.el and 35 other files + Makefile erc-dcc.el and 37 other files Didier Verna: wrote gnus-diary.el nndiary.el and co-wrote nnml.el @@ -938,30 +1093,38 @@ and changed nntp.el message.el gnus-group.el gnus-sum.el gnus-msg.el gnus.texi gnus-art.el gnus-srvr.el gnus-start.el gnus-topic.el gnus-xmas.el gnus-picon.el gnus-salt.el cus-edit.el gnus-int.el gnus-util.el message.texi nnmail.el rect.el cl-indent.el gmm-utils.el - and 8 other files + and 10 other files Dieter Schuster: changed etags.c -Dima Kogan: changed hideshow.el +Dima Kogan: changed hideshow.el autorevert.el erc-backend.el font.c + subword.el gud.el simple.el xfaces.c xgselect.c Dirk Herrmann: co-wrote bibtex.el -Dirk Ullrich: changed ispell.el - Dirk-Jan C. Binnema: changed org-agenda.el +Dirk Ullrich: changed ispell.el + Dmitri Paduchikh: changed advice.el -Dmitry Antipov: changed alloc.c keyboard.c buffer.c ccl.c editfns.c - emacs.c fontset.c keymap.c lisp.h lread.c lwlib-Xaw.c lwlib-Xm.c - lwlib-utils.c lwlib.c macmenu.c w32menu.c xdisp.c xlwmenu.c xmenu.c +Dmitry Antipov: changed lisp.h alloc.c xdisp.c xterm.c buffer.c frame.c + window.c xfns.c font.c w32term.c frame.h keyboard.c nsterm.m w32fns.c + editfns.c xfaces.c xterm.h dispnew.c fileio.c dispextern.h fns.c + and 273 other files Dmitry Bolshakov: changed hideshow.el Dmitry Dzhus: changed gdb-mi.el gud.el fadr.el all.xpm building.texi emacs.texi process.c thread.xpm -Dmitry Gutov: changed lisp.el ruby-mode.el +Dmitry Gorbik: changed org.el + +Dmitry Gutov: changed ruby-mode.el ruby-mode-tests.el xref.el ruby.rb + package.el vc-git.el log-edit.el package-test.el elisp-mode.el js.el + lisp.el menu-bar.el etags.el newcomment.el vc-svn.el vc.el + archive-contents automated/package-test.el find-func.el minibuffer.el + simple.el and 40 other files Dmitry Kurochkin: changed isearch.el @@ -975,30 +1138,31 @@ Don Woods: changed replace.el Doug Cutting: co-wrote disass.el +Douglas Lewan: changed TUTORIAL.pt_BR + Doug Maxey: changed mouse.el Drake Wilson: changed emacsclient.c files.el misc.texi Drew Adams: wrote light-blue-theme.el and co-wrote color.el -and changed cus-edit.el dired.el faces.el files.el info.el isearch.el - menu-bar.el mouse.el ange-ftp.el bindings.el bookmark.el custom.el - descr-text.el dired.texi etags.el finder.el frame.el help-fns.el - help.el image-dired.el modes.texi and 7 other files - -E. Jay Berkenbilt: changed b2m.c flyspell.el ispell.el unrmail.el - whitespace.el window.h +and changed cus-edit.el dired.el faces.el files.el help-mode.el imenu.el + info.el isearch.el menu-bar.el mouse.el ange-ftp.el bindings.el + bookmark.el custom.el descr-text.el dired.texi etags.el finder.el + frame.el help-fns.el help.el and 10 other files -Ed L. Cashin: changed gnus-sum.el imap.el +Ed L. Cashin: changed gnus-sum.el Ed Swarthout: changed hexl.el textmodes/table.el -Eduard Wiebe: changed dired.el browse-url.el flymake.texi footnote.el - javascript.el jit-lock.el korean.el locate.el mule-conf.el - nxml-mode.texi objects.texi ps-print.el vc-rcs.el - Eduardo Muñoz: changed dired.el ls-lisp.el +Eduard Wiebe: wrote flymake-tests.el +and changed dired.el flymake.texi Makefile browse-url.el flymake.el + footnote.el javascript.el jit-lock.el korean.el locate.el mule-conf.el + nxml-mode.texi objects.texi ps-print.el sysdep.c test.c test.pl + vc-rcs.el + Edward M. Reingold: wrote cal-china.el cal-coptic.el cal-french.el cal-islam.el cal-iso.el cal-julian.el cal-move.el cal-persia.el calendar.el diary-lib.el holidays.el lunar.el @@ -1018,28 +1182,32 @@ Edward Trumbo: changed Makefile.in Edwin Steiner: changed gnus-nocem.el -Ehud Karni: changed rmail.el aviion-intel.h complete.el configure.in +Ehud Karni: changed rmail.el aviion-intel.h complete.el configure.ac frame.el progmodes/compile.el rmailsum.el sort.el xdisp.c Eirik Fuller: changed ralloc.c xterm.c -Eli Barzilay: wrote calculator.el +E. Jay Berkenbilt: changed b2m.c flyspell.el ispell.el unrmail.el + whitespace.el window.h -Eli Tziperman: wrote rmail-spam-filter.el +Elias Oltmanns: changed tls.el gnus-agent.el gnus-cite.el gnus-int.el + gnus-srvr.el gnus.el nnimap.el -Eli Zaretskii: wrote [bidirectional display in xdisp.c] bidi.c rxvt.el - tty-colors.el -and changed makefile.w32-in xdisp.c msdos.c Makefile.in files.el - config.bat fileio.c simple.el msdos.h info.el mainmake.v2 rmail.el - sed1v2.inp display.texi w32.c pc-win.el process.c dispnew.c startup.el - dispextern.h dired.c and 702 other files +Elias Pipping: changed doc-view.el XDelAssoc.c XMakeAssoc.c files.el + shr.el -Elias Oltmanns: changed tls.el gnus-agent.el gnus-int.el gnus-srvr.el - gnus.el +Eli Barzilay: wrote calculator.el -Elias Pipping: changed XDelAssoc.c XMakeAssoc.c shr.el +Eli Tziperman: wrote rmail-spam-filter.el + +Eli Zaretskii: wrote [bidirectional display in xdisp.c] + [tty menus in term.c] bidi.c biditest.el rxvt.el tty-colors.el +and changed xdisp.c msdos.c w32.c w32fns.c fileio.c files.el simple.el + w32proc.c display.texi dispnew.c dispextern.h config.bat emacs.c + sed1v2.inp src/makefile.w32-in term.c w32term.c msdos.h src/Makefile.in + keyboard.c process.c and 797 other files -Emanuele Giaquinta: changed configure.in rxvt.el charset.c etags.c +Emanuele Giaquinta: changed configure.ac rxvt.el charset.c etags.c fontset.c frame.el gnus-faq.texi loadup.el lread.c sh-script.el text.texi @@ -1049,44 +1217,55 @@ Emilio C. Lopes: changed woman.el cmuscheme.el help.el vc.el advice.el animate.el apropos.el artist.el bookmark.el cal-menu.el calc-prog.el calc-store.el calcalg3.el calendar.el calendar.texi checkdoc.el code-pages.el codepage.el completion.el cus-edit.el diff.el - and 53 other files + and 56 other files Emmanuel Briot: wrote ada-prj.el xml.el and co-wrote ada-mode.el ada-xref.el and changed ada-stmt.el -Era Eriksson: changed bibtex.el dired.el shell.el tramp.el tramp.texi +Era Eriksson: changed bibtex.el dired.el json.el ses.el ses.texi shell.el + tramp.el tramp.texi + +Eric Abrahamsen: changed nnir.el eieio.el gnus-bcklg.el gnus-registry.el + gnus-sum.el gnus.texi nnimap.el nnmairix.el org.el org.texi ox-html.el + ox-latex.el registry.el Eric Bélanger: changed image.c -Eric Decker: changed hp800.h hpux10-20.h sysdep.c +Eric Brown: changed eww.el + +Eric Decker: changed sysdep.c (and other files for HP-UX support) Eric Ding: wrote goto-addr.el and changed mh-utils.el mh-e.el mh-comp.el mh-mime.el Eric Eide: changed gnus-xmas.el -Eric Hanchrow: changed vc-git.el TUTORIAL.es abbrev.el autorevert.el - cperl-mode.el delphi.el dired.el emacsclient.c env.el erc.el - frames.texi ibuf-ext.el ispell.el ldap.el make-dist tramp.texi - window.el +Eric Hanchrow: changed erc.el vc-git.el TUTORIAL.es abbrev.el + autorevert.el cperl-mode.el dired.el emacsclient.c env.el frames.texi + ibuf-ext.el ispell.el ldap.el make-dist opascal.el progmodes/python.el + tramp.texi window.el Éric Jacoboni: changed fr-refcard.tex Eric Knauel: changed gnus.el spam-report.el spam.el +Eric Marsden: changed gnus-cache.el url-util.el + Eric M. Ludlam: wrote analyze.el analyze/complete.el analyze/debug.el args.el auto.el autoconf-edit.el base.el bovine.el bovine/debug.el bovine/el.el bovine/make.el c.el cedet-cscope.el cedet-files.el cedet-global.el cedet-idutils.el cedet-utests.el cedet/semantic.el - cedet/srecode.el checkdoc.el cpp-root.el cscope.el data-debug.el - db-debug.el db-el.el db-file.el db-find.el db-global.el db-mode.el - db-ref.el db-typecache.el db.el decorate.el decorate/mode.el dep.el - dframe.el dictionary.el doc.el document.el ede-grammar.el ede-tests.el - ede.el ede/custom.el ede/dired.el ede/files.el ede/generic.el - ede/linux.el ede/locate.el ede/make.el ede/shell.el ede/simple.el - ede/speedbar.el ede/srecode.el ede/util.el edit.el eieio-base.el - eieio-custom.el eieio-datadebug.el eieio-opt.el eieio-speedbar.el + cedet/srecode.el checkdoc.el config.el cpp-root.el cscope.el + data-debug.el db-debug.el db-el.el db-file.el db-find.el db-global.el + db-mode.el db-ref.el db-typecache.el db.el decorate.el decorate/mode.el + dep.el detect.el dframe.el dictionary.el doc.el document.el + ede-grammar.el ede-tests.el ede.el ede/custom.el ede/dired.el + ede/files.el ede/generic.el ede/linux.el ede/locate.el ede/make.el + ede/shell.el ede/simple.el ede/speedbar.el ede/srecode.el ede/util.el + edit.el eieio-base.el eieio-compat.el eieio-core.el eieio-custom.el + eieio-datadebug.el eieio-opt.el eieio-speedbar.el + eieio-test-methodinvoke.el eieio-test-persist.el eieio-tests.el eieio.el emacs-lisp/chart.el emacs.el expandproto.el extract.el ezimage.el fcn.el fields.el filter.el filters.el fw.el gcc.el getset.el global.el html.el ia-sb.el ia.el idle.el idutils.el include.el @@ -1105,53 +1284,57 @@ Eric M. Ludlam: wrote analyze.el analyze/complete.el analyze/debug.el srt.el symref.el symref/grep.el system.el tag-file.el tag-ls.el tag-write.el tag.el test.el and co-wrote db-ebrowse.el srecode/cpp.el util-modes.el -and changed info.el rmail.el speedbspec.el gud.el sb-dir-minus.xpm +and changed c.srt ede.texi info.el rmail.el speedbspec.el cedet.el + ede-autoconf.srt ede-make.srt eieio.texi gud.el sb-dir-minus.xpm sb-dir-plus.xpm sb-dir.xpm sb-mail.xpm sb-pg-minus.xpm sb-pg-plus.xpm sb-pg.xpm sb-tag-gt.xpm sb-tag-minus.xpm sb-tag-plus.xpm - sb-tag-type.xpm sb-tag-v.xpm sb-tag.xpm Makefile.in c-by.el cedet.el - comint.el and 18 other files + sb-tag-type.xpm and 31 other files -Eric Marsden: changed gnus-cache.el url-util.el +Eric Schulte: wrote ob-C.el ob-asymptote.el ob-awk.el ob-calc.el + ob-comint.el ob-css.el ob-ditaa.el ob-dot.el ob-emacs-lisp.el + ob-eval.el ob-gnuplot.el ob-haskell.el ob-java.el ob-js.el ob-keys.el + ob-latex.el ob-makefile.el ob-ocaml.el ob-org.el ob-ruby.el ob-sass.el + ob-sh.el ob-shen.el ob-sql.el ob-sqlite.el ob-table.el ob-tangle.el + ob.el org-plot.el +and co-wrote ob-R.el ob-clojure.el ob-core.el ob-exp.el ob-fortran.el + ob-lisp.el ob-lob.el ob-maxima.el ob-perl.el ob-picolisp.el + ob-python.el ob-ref.el ob-scheme.el org-bibtex.el +and changed org.texi org.el org-exp-blocks.el ox.el ox-latex.el + org-src.el ob-plantuml.el ob-screen.el org-macs.el org-table.el + org-agenda.el org-mouse.el orgcard.tex ob-lilypond.el ob-mscgen.el + ob-octave.el org-clock.el org-compat.el org-footnote.el ox-ascii.el + ox-html.el and 12 other files Eric S Fraga: wrote ob-ledger.el and co-wrote ob-maxima.el -and changed org-icalendar.el org-latex.el org.texi +and changed ox-icalendar.el org.texi ox-latex.el Eric S. Raymond: wrote AT386.el asm-mode.el cookie1.el finder.el gud.el keyswap.el lisp-mnt.el loadhist.el and co-wrote make-mode.el -and changed vc.el vc-hooks.el vc-svn.el vc-cvs.el files.texi vc-bzr.el - vc-dispatcher.el vc-git.el vc-hg.el vc-sccs.el vc-rcs.el vc-mcvs.el - Makefile.in files.el comint.el simple.el vc-arch.el vc-mtn.el - add-log.el cust-print.el dired.el and 249 other files - -Eric Schulte: wrote ob-C.el ob-asymptote.el ob-awk.el ob-calc.el - ob-comint.el ob-css.el ob-ditaa.el ob-dot.el ob-emacs-lisp.el - ob-eval.el ob-gnuplot.el ob-haskell.el ob-java.el ob-js.el ob-keys.el - ob-latex.el ob-ocaml.el ob-org.el ob-ruby.el ob-sass.el ob-scheme.el - ob-sh.el ob-shen.el ob-sql.el ob-sqlite.el ob-table.el ob-tangle.el - org-exp-blocks.el org-plot.el -and co-wrote ob-R.el ob-clojure.el ob-exp.el ob-fortran.el ob-lisp.el - ob-lob.el ob-maxima.el ob-perl.el ob-picolisp.el ob-python.el ob-ref.el - ob.el org-bibtex.el -and changed org.texi org.el org-exp.el org-latex.el ob-plantuml.el - org-src.el org-table.el org-agenda.el org-macs.el orgcard.tex - ob-lilypond.el ob-mscgen.el ob-octave.el ob-screen.el org-ascii.el - org-footnote.el org-html.el org-mouse.el gnus-art.el ob-ledger.el - ob-matlab.el and 5 other files +and changed vc.el vc-hooks.el vc-svn.el vc-cvs.el vc-git.el vc-rcs.el + vc-sccs.el vc-hg.el vc-bzr.el vc-dispatcher.el files.texi vc-mcvs.el + vc-mtn.el files.el comint.el emacsbug.el simple.el vc-arch.el vc-src.el + Makefile.in add-log.el and 271 other files Eric Youngdale: changed etags-vmslib.c Eric Yu: changed speedbar.texi +Erik Charlebois: changed syntax.el w32fns.c w32term.c w32term.h + +Erik Hetzner: changed org.el + Erik Naggum: wrote disp-table.el mailheader.el parse-time.el and changed simple.el emacs.c files.el lread.c rmail.el alloc.c editfns.c - keyboard.c apropos.el configure.in dispnew.c filelock.c fns.c keymap.c + keyboard.c apropos.el configure.ac dispnew.c filelock.c fns.c keymap.c lisp.h print.c process.c add-log.el buffer.c casetab.c cl-macs.el and 114 other files Erik Toubro Nielsen: changed gnus-sum.el gnus-topic.el +E Sabof: changed hi-lock.el image-dired.el + Espen Skoglund: wrote pascal.el Espen Wiborg: changed utf-7.el @@ -1159,7 +1342,7 @@ Espen Wiborg: changed utf-7.el Ethan Bradford: changed ispell.el ange-ftp.el gnus.el gnuspost.el lpr.el mailalias.el vt-control.el -Ethan Ligon: changed org-docbook.el org-html.el +Ethan Ligon: changed org-docbook.el ox-html.el Eugene Exarevsky: changed sql.el @@ -1169,21 +1352,29 @@ Evgeni Dobrev: changed man.el Evgeny Roubinchtein: changed mail-source.el pc-select.el -Exal de Jesus Garcia Carrillo: changed erc.texi erc-sound.el +Exal de Jesus Garcia Carrillo: changed erc-sound.el erc.texi -F. Thomas May: wrote blackbox.el +Eyal Lotem: changed ido.el -Fabian Ezequiel Gallina: changed progmodes/python.el +Fabián Ezequiel Gallina: wrote progmodes/python.el subr-x-tests.el +and changed python-tests.el subr-x.el imenu.el Fabrice Bauzac: changed dired-aux.el -Fabrice Popineau: changed config.nt etags.c fileio.c gnus-cache.el - inttypes.h lisp.h ms-w32.h nmake.defs regex.c stdint.h w32.c w32heap.c +Fabrice Niessen: wrote leuven-theme.el +and changed org-agenda.el + +Fabrice Popineau: changed w32.c ms-w32.h w32fns.c w32heap.c configure.ac + lisp.h unexw32.c w32term.c buffer.c emacs.c image.c nmake.defs + w32heap.h w32proc.c INSTALL addsection.c alloc.c config.nt dispextern.h + emacs-x64.manifest emacs-x86.manifest and 23 other files Fan Kai: changed esh-arg.el Faried Nawaz: changed message.el +Felix H. Dahlke: changed js.el + Felix Lee: changed flyspell.el outline.el cl.texi data.c gud.el nntp.el process.c progmodes/compile.el vc.el xdisp.c @@ -1191,30 +1382,39 @@ Felix Mueller: changed nsterm.m Felix S. T. Wu: co-wrote vi.el (public domain) -Feng Li: changed calc-ext.el +Feng Li: changed calc-ext.el pascal.el which-func.el + +Feng Shu: changed org.el org.texi ox.el ox-html.el ox-latex.el ox-odt.el Ferenc Wagner: changed nnweb.el Filipe Cabecinhas: changed nsterm.m +Filipp Gunbin: changed autorevert.el cc-menus.el dired-aux.el info.el + info.texi + Flemming Hoejstrup Hansen: changed forms.el +Florian Adamsky: changed recentf.el + +Florian Beck: changed org.el + Florian Ragwitz: changed gnus-html.el sieve-manage.el Florian Weimer: changed message.el gnus.el coding.c gnus-sum.el gnus.texi mm-decode.el mm-util.el -Fran Litterio: changed erc-backend.el erc.el - -Francesc Rocher: changed MORE.STUFF startup.el cus-start.el gnus.el - gnus.png gnus.svg macterm.c splash.png splash.svg splash8.xpm w32term.c - xdisp.c xterm.c +Francesco Pizzolante: changed org-clock.el org-macs.el org.el ox-html.el Francesco Potortì: wrote cmacexp.el -and changed etags.c man.el delta.h etags.1 undigest.el Makefile.in - comint.el configure.in maintaining.texi uniquify.el latin-post.el - rmail.el etags.el latin-alt.el sgml-mode.el data.c european.el - filelock.c files.el generic-x.el gud.el and 45 other files +and changed etags.c man.el delta.h etags.1 undigest.el comint.el + configure.ac maintaining.texi uniquify.el latin-post.el rmail.el + etags.el latin-alt.el lib-src/Makefile.in sgml-mode.el Makefile.in + data.c european.el filelock.c files.el generic-x.el and 44 other files + +Francesc Rocher: changed MORE.STUFF splash.png splash.svg startup.el + README cus-start.el gnus.el gnus.png gnus.svg macterm.c splash.pbm + splash.xpm splash8.xpm w32term.c xdisp.c xterm.c Francis Devereux: changed nsfont.m @@ -1222,15 +1422,23 @@ Francis J. Wright: wrote woman.el and changed dired.el comint.el cus-edit.el files.el ps-print.el Francis Litterio: changed erc.el erc-list.el erc-dcc.el erc-notify.el - erc-button.el erc-goodies.el erc-nets.el erc-ring.el erc-pcomplete.el - message.el erc-backend.el erc-ibuffer.el erc-match.el erc-nickserv.el - erc-page.el erc-speedbar.el gnus-util.el keymaps.texi os.texi - saveplace.el w32term.c and 3 other files + erc-button.el erc-goodies.el erc-nets.el erc-ring.el Makefile + erc-pcomplete.el message.el erc-backend.el erc-ibuffer.el erc-match.el + erc-nickserv.el erc-page.el erc-speedbar.el gnus-util.el keymaps.texi + os.texi saveplace.el and 4 other files + +François Allisson: changed org.texi + +François-David Collin: changed message.el mm-decode.el Francois Felix Ingrand: changed gnus-salt.el Francois Fleuret: changed tex-mode.el +François Pinard: co-wrote po.el +and changed nndoc.el allout.el bytecomp.el gnus-sum.el gnus-util.el + gnus-uu.el make-mode.el nnmail.el org.el rmailsum.el timezone.el + Frank Bennett: changed nnmail.el Frank Bresz: wrote diff.el @@ -1240,58 +1448,62 @@ Frank Schmitt: changed gnus-sum.el cmdargs.texi gnus-faq.texi Frank Weinberg: changed gnus-art.el -François Pinard: co-wrote po.el -and changed nndoc.el allout.el bytecomp.el gnus-sum.el gnus-util.el - gnus-uu.el make-mode.el nnmail.el org.el rmailsum.el timezone.el - -François-David Collin: changed message.el mm-decode.el - -Fred Fish: changed linux.h unexcoff.c +Fran Litterio: changed erc-backend.el erc.el -Fred Oberhauser: changed nnmail.el +Frédéric Bothamy: changed TUTORIAL.fr Frederic Han: changed iso-cvt.el Frederic Lepied: wrote expand.el and changed gnus.el +Frédéric Perrin: changed vc-dispatcher.el + Frederic Pierresteguy: wrote widget.c and changed xmenu.c xterm.c xfns.c dpx2.h lwlib.c rmailsum.el rmail.el - xlwmenu.c xterm.h lwlib-Xaw.c lwlib-Xlw.c Makefile.in configure.in - lwlib-Xaw.h lwlib-int.h xdisp.c compile.el editfns.c fns.c frame.h - hilit19.el and 9 other files + xlwmenu.c xterm.h lwlib-Xaw.c lwlib-Xlw.c configure.ac lwlib-Xaw.h + lwlib-int.h xdisp.c compile.el editfns.c fns.c frame.h hilit19.el + keyboard.c and 10 other files Frederik Fouvry: changed sendmail.el TUTORIAL.nl emacs.bash faces.el filecache.el mailalias.el rmail.el thumbs.el +Fred Fish: changed linux.h unexcoff.c + +Fred Oberhauser: changed nnmail.el + Fredrik Axelsson: changed cus-start.el window.c Friedrich Delgado Friedrichs: changed org.el Fritz Knabe: changed mh-mime.el -Frédéric Bothamy: changed TUTORIAL.fr +F. Thomas May: wrote blackbox.el -Frédéric Perrin: changed vc-dispatcher.el +Fujii Hironori: changed w32fns.c -G Dinesh Dutt: changed etags.el +Gábor Vida: changed gnus-demon.el auth-source.el ido.el Gareth Jones: changed fns.c gnus-score.el +Gareth Rees: changed NEWS.24 + Garrett Wollman: changed sendmail.el +Gary Delp: wrote mailpost.el (public domain) + Gary D. Foster: wrote crisp.el scroll-all.el and changed gnus-group.el gnus-topic.el -Gary Delp: wrote mailpost.el (public domain) - Gary Howell: changed server.el Gary Oberbrunner: changed gud.el Gary Wong: changed termcap.c tparam.c -Gaute B Strokkenes: changed imap.el gnus-fun.el mail-source.el process.c +Gaute B Strokkenes: changed gnus-fun.el mail-source.el process.c + +G Dinesh Dutt: changed etags.el Geert Kloosterman: changed which-func.el @@ -1299,70 +1511,88 @@ Geoff Gole: changed align.el ibuffer.el whitespace.el Geoff Greene: changed message.el +Geoff Kuenning: changed gnus-art.el gnus.texi + Geoff Voelker: wrote ms-w32.h w32-fns.el w32.c w32.h w32heap.c w32heap.h w32inevt.c w32proc.c w32term.c and changed makefile.nt w32fns.c fileio.c makefile.def callproc.c - s/ms-w32.h unexw32.c w32term.h dos-w32.el emacs.bat loadup.el - w32-win.el emacs.c keyboard.c process.c w32console.c addpm.c cmdproxy.c - comint.el files.el ntterm.c and 104 other files + s/ms-w32.h emacs.bat.in unexw32.c w32term.h dos-w32.el loadup.el + w32-win.el emacs.c keyboard.c ntterm.c process.c w32console.c addpm.c + cmdproxy.c comint.el files.el and 101 other files Georg C. F. Greve: changed pgg-gpg.el -George V. Reilly: changed emacs.ico makefile.nt +George Kettleborough: changed org-clock.el org-timer.el + +George McNinch: changed nnir.el Georges Brun-Cottan: wrote easy-mmode.el +George V. Reilly: changed emacs.ico makefile.nt + Gerd Möllmann: wrote authors.el ebrowse.el jit-lock.el rx.el tooltip.el and changed xdisp.c xterm.c dispnew.c dispextern.h xfns.c xfaces.c - window.c keyboard.c lisp.h Makefile.in faces.el alloc.c buffer.c - startup.el xterm.h fns.c simple.el term.c frame.c xmenu.c emacs.c - and 617 other files + window.c keyboard.c lisp.h faces.el alloc.c buffer.c startup.el xterm.h + fns.c simple.el term.c configure.ac frame.c xmenu.c emacs.c + and 600 other files Gergely Nagy: changed erc.el +Gergely Risko: changed coding.c + Germano Caronni: changed ralloc.c Gernot Heiser: changed refer.el -Giorgos Keramidas: changed configure.in erc-backend.el erc.el alloc.c +Giorgos Keramidas: changed configure.ac erc-backend.el erc.el alloc.c amdx86-64.h apropos.el display.texi erc-services.el filelock.c fringe.c fringe.el lisp.h rcirc.el windows.texi xmenu.c +Giovanni Ridolfi: changed org.texi + Giuliano Procida: changed perl-mode.el -Giuseppe Scrivano: changed browse-url.el buffer.c configure.in sysdep.c +Giuseppe Scrivano: changed browse-url.el buffer.c configure.ac sysdep.c xsmfns.c Glenn Morris: wrote automated/f90.el automated/vc-bzr.el check-declare.el -and changed Makefile.in configure.in calendar.el diary-lib.el rmail.el - progmodes/f90.el files.el cal-menu.el appt.el cal-hebrew.el fortran.el - bytecomp.el holidays.el emacs.texi calendar.texi ack.texi make-dist - simple.el sed1v2.inp cal-islam.el dired-x.el and 1249 other files +and changed configure.ac Makefile.in src/Makefile.in calendar.el + diary-lib.el files.el lisp/Makefile.in rmail.el progmodes/f90.el + make-dist simple.el misc/Makefile.in bytecomp.el emacs.texi + lib-src/Makefile.in ack.texi authors.el cal-menu.el startup.el + display.texi admin.el and 1534 other files Glynn Clements: wrote gamegrid.el snake.el tetris.el +Göran Uddeborg: changed isc4-1.h + Gordon Matzigkeit: changed gnus-uu.el Greg Hill: changed bytecomp.el -Greg Hudson: changed configure.in indent.c +Greg Hudson: changed configure.ac indent.c Greg Klanderman: changed messagexmas.el Greg McGary: co-wrote po.el and changed tar-mode.el -Greg Stark: changed gnus-ems.el timezone.el - -Gregor Schmid: changed intervals.c intervals.h tcl-mode.el textprop.c - dispnew.c indent.c xdisp.c +Grégoire Jadi: changed org.texi rcirc.el latin-post.el ob-core.el + org-id.el org.el reporter.el sendmail.el Gregorio Gervasio, Jr.: changed gnus-sum.el -Gregory Chernov: changed nnslashdot.el +Gregor Kappler: changed ox.el + +Gregor Schmid: changed intervals.c intervals.h tcl-mode.el textprop.c + dispnew.c indent.c xdisp.c Gregory Neil Shapiro: changed mailabbrev.el +Gregor Zattler: changed emacs-lisp-intro.texi + +Greg Stark: changed gnus-ems.el timezone.el + Guanpeng Xu: changed add-log.el TUTORIAL.cn display.texi mouse.el pcomplete.el search.c subr.el type-break.el @@ -1370,11 +1600,15 @@ Gunnar Horrigmo: changed gnus-sum.el Gustav Hållberg: changed descr-text.el progmodes/compile.el rect.el vc.el +Gustav Wikström: changed org-agenda.el org.texi + Guy Geens: changed gnus-score.el Gwern Branwen: changed browse-url.el -Göran Uddeborg: changed isc4-1.h +Håkan Granath: changed dired.el + +Håkon Malmedal: changed calendar.el holidays.el Hallvard B. Furuseth: co-wrote byte-opt.el byte-run.el bytecomp.el and changed gnus-util.el editfns.c gnus-cache.el gnus-sum.el lread.c @@ -1382,30 +1616,42 @@ and changed gnus-util.el editfns.c gnus-cache.el gnus-sum.el lread.c Hamano Kiyoto: changed xml.c -Han Boetes: changed netbsd.h +Hanataka, Shinya: changed coding.c -Han-Wen Nienhuys: changed emacsclient.c server.el +Han Boetes: changed netbsd.h Hans Chalupsky: wrote advice.el trace.el and changed bytecomp.el +Hans de Graaff: changed mml.el + Hans Henrik Eriksen: wrote simula.el -Hans de Graaff: changed mml.el +Hans-Peter Deifel: changed ob.el + +Hans Wennborg: changed emacs.c + +Han-Wen Nienhuys: changed emacsclient.c server.el Harald Maier: changed w32heap.c Harald Meland: changed gnus-art.el gnus-salt.el gnus-score.el gnus-util.el gnus-win.el mail-source.el -Harri Kiiskinen: changed org-publish.el +Harri Kiiskinen: changed org-protocol.el ox-publish.el + +H. Dieter Wilhelm: changed calc-help.el maintaining.texi Heiko Muenkel: changed b2m.c -Helmut Eller: changed cl-macs.el emacs-lisp/debug.el process.c +Helmut Eller: changed emacs-lisp/debug.el cl-indent.el cl-macs.el + elisp-mode.el etags.el eval.c lisp-mode.el process-tests.el process.c + xref.el Helmut Waitzmann: changed gnus-sum.el gnus.texi +Henning Weiss: changed org-mobile.el + Henrik Enberg: changed rmailout.el gnus-art.el gnus-msg.el lread.c mail/rmailmm.el rmail.el rmailedit.el rmailkwd.el rmailmsc.el rmailsort.el rmailsum.el xfaces.c @@ -1422,7 +1668,7 @@ Hewlett-Packard: changed emacsclient.c keyboard.c server.el Hideki Iwamoto: changed etags.c -Hiroshi Fujishima: changed faq.texi gnus-score.el mail-source.el +Hiroshi Fujishima: changed efaq.texi gnus-score.el mail-source.el spam-stat.el Hiroshi Nakano: changed ralloc.c unexelf.c @@ -1453,11 +1699,11 @@ Hubert Chan: changed spam.el Hynek Schlawack: changed gnus-art.el gnus-sum.el -Håkan Granath: changed dired.el +Ian D: changed doc-view.el image-mode.el -Håkon Malmedal: changed calendar.el holidays.el +Ian Eure: changed sql.el url-util.el -Ian Eure: changed sql.el +Ian Kelling: changed ob-core.el Ian Lance Taylor: changed sco4.h @@ -1466,6 +1712,8 @@ and changed ange-ftp.el desktop.el tex-mode.el Igor Kuzmin: wrote cconv.el +Ikumi Keita: changed characters.el minibuf.c + Ilja Weis: co-wrote gnus-topic.el Ilya N. Golubev: changed mm-util.el shell.el @@ -1475,8 +1723,10 @@ Ilya Shlyakhter: changed org.el ob-lilypond.el org-clock.el Ilya Zakharevich: wrote tmm.el and co-wrote cperl-mode.el -and changed syntax.c syntax.h textprop.c dired.c font-lock.el interval.c - intervals.c intervals.h regex.c regex.h search.c +and changed syntax.c intervals.c syntax.h textprop.c dired.c font-lock.el + intervals.h regex.c regex.h search.c + +Ilya Zonov: changed org-mouse.el Indiana University Foundation: changed buffer.c buffer.h indent.c region-cache.c region-cache.h search.c xdisp.c @@ -1487,11 +1737,15 @@ Inge Frick: changed easymenu.el keyboard.c view.el compile.el Inge Wallin: co-wrote avl-tree.el ewoc.el +Ingo Lohmar: changed help-fns.el ls-lisp.el org-agenda.el org.el + Inoue Seiichiro: changed xterm.c xfns.c xterm.h International Business Machines: changed emacs.c fileio.c process.c sysdep.c unexcoff.c +Ippei Furuhashi: changed org.texi org-colview.el org-table.el org.el + Irie Shinsuke: changed subr.el Irie Tetsuya: changed gnus.texi message.texi @@ -1502,12 +1756,20 @@ Istvan Marko: changed gnus-agent.el xfns.c Itai Zukerman: changed mm-decode.el +Ivan Andrus: changed ffap.el find-file.el ibuf-ext.el ibuffer.el + progmodes/python.el + Ivan Boldyrev: changed mml1991.el Ivan Kanis: wrote vc-hg.el -and changed appt.el term.el time.el +and changed eww.el shr.el appt.el dired.el saveplace.el term.el time.el + +Ivan Shmakov: changed eww.el shr.el desktop.el eww.texi files.el + cus-dep.el diff-mode.el enriched.el erc-track.el facemenu.el faces.el + files.texi misearch.el nndoc.el tar-mode.el tcl.el tex-mode.el + url-cookie.el -Ivan Shmakov: changed tcl.el +Ivan Vilata i Balaguer: changed org-clock.el org.texi Ivan Zakharyaschev: changed codepage.el lread.c @@ -1515,13 +1777,12 @@ Ivar Rummelhoff: wrote winner.el Iwamuro Motonori: changed gnus-kill.el -J.D. Smith: co-wrote idlw-help.el idlw-shell.el idlwave.el -and changed idlw-rinfo.el idlw-toolbar.el comint.el idlwave.texi vc.el - bibtex.el files.texi hideshow.el idlw-complete-structtag.el misc.texi - mouse.el - Jaap-Henk Hoepman: changed mm-decode.el +Jacek Chrząszcz: changed ispell.el + +Jack Duthen: changed which-func.el + Jack Repenning: changed unexelfsgi.c Jack Twilley: changed message.el @@ -1530,14 +1791,17 @@ Jacob Morzinski: changed mh-comp.el Jacques Duthen: co-wrote ps-print.el ps-samp.el -Jae-Hyeon Park: changed fontset.el +Jae-hyeon Park: changed fontset.el Jaeyoun Chung: changed hangul3.el hanja3.el gnus-mule.el hangul.el -Jambunathan K: wrote org-lparse.el org-odt.el -and changed org.el org-exp.el org.texi OrgOdtContentTemplate.xml - org-footnote.el org-inlinetask.el OrgOdtStyles.xml htmlfontify.el - org-html.el package-x.el quail/indian.el tar-mode.el +Jambunathan K: wrote ox-odt.el +and co-wrote ox-html.el +and changed org-lparse.el org.el org.texi ox.el icomplete.el + OrgOdtContentTemplate.xml OrgOdtStyles.xml hi-lock.el replace.el + minibuffer.el org-footnote.el org-inlinetask.el register.el doc-view.el + etags.el htmlfontify.el ido.el indian.el iswitchb.el org-bbdb.el + org-compat.el and 6 other files James Clark: wrote nxml-enc.el nxml-glyph.el nxml-maint.el nxml-mode.el nxml-ns.el nxml-outln.el nxml-parse.el nxml-rap.el nxml-uchnm.el @@ -1555,12 +1819,12 @@ James R. Larus: co-wrote mh-e.el James R. Van Zandt: changed sh-script.el James TD Smith: changed org.el org-colview.el org-clock.el - org-remember.el org-colview-xemacs.el org-plot.el org-agenda.el - org-compat.el org-habit.el org.texi + org-remember.el org-plot.el org-agenda.el org-compat.el org-habit.el + org.texi James Troup: changed gnus-sum.el -James Van Artsdalen: changed unexcoff.c usg5-4.h +James Van Artsdalen: changed unexcoff.c James Wright: changed em-unix.el @@ -1568,68 +1832,96 @@ Jamie Zawinski: wrote mailabbrev.el tar-mode.el and co-wrote byte-opt.el byte-run.el bytecomp.el disass.el font-lock.el and changed bytecode.c mail-extr.el subr.el -Jan Böcker: wrote org-docview.el -and changed org.el +Jan Beich: changed configure.ac -Jan Böker: changed org.el +Jan Böcker: wrote org-docview.el +and changed org.el org.texi Jan Djärv: wrote dnd.el dynamic-setting.el x-dnd.el -and changed gtkutil.c xterm.c xfns.c configure.in xmenu.c xterm.h - gtkutil.h nsterm.m x-win.el keyboard.c Makefile.in frames.texi - xsettings.c emacs.c frame.c nsfns.m xselect.c process.c xlwmenu.c - config.in cus-start.el and 303 other files +and changed gtkutil.c xterm.c nsterm.m xfns.c configure.ac nsfns.m + xmenu.c xterm.h nsterm.h nsmenu.m gtkutil.h keyboard.c x-win.el emacs.c + frame.c process.c src/Makefile.in xsettings.c nsfont.m cus-start.el + frames.texi and 301 other files + +Jan-Hein Buhrman: changed ange-ftp.el env.el Jan Moringen: co-wrote srecode/cpp.el tango-dark-theme.el tango-theme.el -and changed dbus.el dbus.texi dbusbind.c eieio.el log-edit.el zeroconf.el +and changed dbus.el dbus.texi dbusbind.c eieio.el idle.el insert.el + log-edit.el srecode/find.el wisent/python.el zeroconf.el -Jan Nieuwenhuizen: changed info.el TUTORIAL.nl add-log.el emacs.c - emacsclient.c gnus-start.el gud.el nnmh.el server.el startup.el +Jan Nieuwenhuizen: changed gud.el info.el TUTORIAL.nl add-log.el + compilation.txt compile-tests.el emacs.c emacsclient.c gnus-start.el + nnmh.el progmodes/compile.el server.el startup.el Jan Rychter: changed gnus-msg.el Jan Schormann: wrote solitaire.el -Jan Seeger: changed org-publish.el parse-time.el +Jan Seeger: changed ox-publish.el parse-time.el -Jan Vroonhof: changed gnus-cite.el gnus-msg.el nntp.el +Jan Tatarik: wrote gnus-icalendar.el +and changed gnus-score.el gnus-logic.el -Jan-Hein Buhrman: changed ange-ftp.el env.el +Jan Vroonhof: changed gnus-cite.el gnus-msg.el nntp.el Jared Finder: changed progmodes/compile.el +Jarek Czekalski: changed keyboard.c callproc.c mini.texi minibuf.c + misc.texi server.el shell.el w32fns.c xgselect.c + Jari Aalto: changed add-log.el filecache.el progmodes/grep.el comint.el gnus-art.el gnus-sum.el gnus.texi ispell.el lisp-mnt.el man.el - nnmail.el apropos.el autorevert.el checkdoc.el cperl-mode.el desktop.el - em-ls.el emacs-lisp/debug.el emacsclient.1 executable.el files.el - and 20 other files + nnmail.el apropos.el autorevert.el checkdoc.el cperl-mode.el + css-mode.el desktop.el em-ls.el emacs-lisp/debug.el emacsclient.1 + executable.el and 23 other files + +Jarmo Hurri: changed org-gnus.el org-table.el org.texi + +Jarosław Rzeszótko: changed url-http.el Jason Baker: changed gnus-art.el -Jason Dunsmore: changed org-html.el org.el +Jason Dunsmore: changed org.el ox-html.el + +Jason L. Wright: changed smtpmail.el -Jason Merrill: changed gnus-sum.el add-log.el gnus-salt.el imap.el - nnfolder.el +Jason Merrill: changed gnus-sum.el add-log.el gnus-salt.el nnfolder.el Jason Riedy: changed org-table.el org.texi Jason Rumney: wrote w32-vars.el -and changed w32fns.c w32term.c w32font.c makefile.w32-in w32menu.c - w32-win.el w32term.h w32.c w32uniscribe.c w32-fns.el makefile.nt - w32console.c w32bdf.c configure.bat keyboard.c w32proc.c w32select.c - font.c image.c w32font.h w32gui.h and 160 other files +and changed w32fns.c w32term.c w32font.c w32menu.c w32-win.el w32term.h + w32.c w32uniscribe.c src/makefile.w32-in w32-fns.el makefile.nt + w32console.c w32bdf.c lib-src/makefile.w32-in configure.bat keyboard.c + w32proc.c w32select.c font.c image.c w32font.h and 165 other files -Jay Belanger: changed calc.texi calc.el calc-ext.el calc-aent.el - calc-units.el calc-embed.el calc-help.el calc-lang.el calc-prog.el - calc-math.el calccomp.el calc-arith.el calc-graph.el calc-forms.el - calc-misc.el calc-store.el calc-yank.el calcalg2.el calc-bin.el - calc-alg.el calc-vec.el and 40 other files +Jason S. Cornez: changed keyboard.c + +Jay Belanger: changed calc.texi calc.el calc-ext.el calc-units.el + calc-aent.el calc-embed.el calc-help.el calc-lang.el calc-prog.el + calc-forms.el calccomp.el calc-math.el calc-arith.el calc-graph.el + calc-misc.el calcalg2.el calc-alg.el calc-store.el calc-yank.el + calc-bin.el calc-mode.el and 39 other files Jay K. Adams: wrote jka-cmpr-hook.el jka-compr.el +Jay McCarthy: changed org-colview.el + Jay Sachs: changed gnus-score.el gnus-win.el +J.D. Smith: co-wrote idlw-help.el idlw-shell.el idlwave.el +and changed idlw-rinfo.el idlw-toolbar.el comint.el idlwave.texi vc.el + bibtex.el files.texi hideshow.el idlw-complete-structtag.el misc.texi + mouse.el + +Jean Haidouk: changed latin-alt.el latin-post.el latin-pre.el + +Jean-Philippe Gravel: changed gdb-mi.el + Jean-Philippe Theberge: wrote thumbs.el +Jed Brown: changed progmodes/compile.el + Jeff Dairiki: changed whitespace.el Jeff Dwork: changed ehelp.el facemenu.el @@ -1642,11 +1934,12 @@ Jeff Morgenthaler: changed flow-ctrl.el vt200.el vt201.el vt220.el Jeff Norden: wrote kermit.el Jeff Peck: wrote sun.el +and changed emacstool.1 emacstool.c Jeffrey C Honig: wrote mh-print.el and changed mh-e.el mh-comp.el mh-utils.el mh-mime.el mh-customize.el - mh-funcs.el mh-alias.el mh-seq.el bsdos4.h mh-folder.el mh-junk.el - mh-show.el + mh-folder.el mh-funcs.el mh-alias.el mh-seq.el mh-show.el Makefile + bsdos4.h mh-junk.el mh-letter.el Jens Krinke: changed smime.el @@ -1660,13 +1953,23 @@ Jens Toivo Berger Thielemann: changed word-help.el Jens-Ulrik Holger Petersen: changed cus-edit.el ffap.el find-func.el gnus.el -Jeramey Crawford: changed amdx86-64.h configure.in +Jeramey Crawford: changed amdx86-64.h configure.ac + +Jérémie Courrèges-Anglas: changed org.texi ox-latex.el Jeremy Bertram Maitin-Shepard: changed erc.el erc-backend.el erc-button.el erc-track.el mml.el +Jérémy Compostella: changed tramp-sh.el battery.el keyboard.c windmove.el + window.el xdisp.c + +Jeremy Moore: changed hideif.el + Jeremy Whitlock: changed progmodes/python.el +Jérôme Marant: changed make-dist Makefile.in bindings.el configure.ac + emacsclient.c leim/Makefile.in misc.texi + Jerry Frain: changed systime.h usg5-4.h Jerry James: changed format.el dns.el gnus-spec.el gnus-util.el @@ -1679,7 +1982,7 @@ and changed gnus-sum.el gnus-art.el message.el gnus-group.el gnus-msg.el gnus.el gnus-util.el rfc2047.el mm-bodies.el mm-util.el mml.el mm-decode.el nnrss.el gnus-srvr.el gnus-topic.el nnmail.el gnus-start.el gnus-uu.el spam-stat.el gnus-score.el gnus.texi - and 201 other files + and 197 other files Jhair Tocancipa Triana: changed gnus-audio.el @@ -1687,18 +1990,22 @@ Jihyun Cho: wrote hangul.el hanja-util.el Jim Blandy: wrote tvi970.el and co-wrote wyse50.el -and changed keyboard.c xterm.c xfns.c Makefile.in window.c process.c - ymakefile dispnew.c xdisp.c sysdep.c configure.in lisp.h keymap.c +and changed keyboard.c xterm.c xfns.c window.c process.c ymakefile + dispnew.c xdisp.c sysdep.c configure.ac lisp.h Makefile.in keymap.c configure make-dist buffer.c frame.c screen.c simple.el alloc.c emacs.c - and 388 other files + and 402 other files + +Jim Diamond: changed server.el -Jim Kingdon: changed emacsclient.c emacs.tex functions.texinfo hp300bsd.h +Jim Kingdon: changed emacs.texi emacsclient.c functions.texi hp300bsd.h rmail.el -Jim Meyering: changed lread.c w32.c copyright.el ebrowse.c emacs.c - make-docfile.c nsfont.m term.c w32font.c xfaces.c xselect.c Makefile.in - alloc.c artist.el autoinsert.el buffer.h character.h charset.c - configure configure.in doprnt.c and 53 other files +Jim Meyering: changed lread.c make-docfile.c w32.c w32font.c copyright.el + ebrowse.c emacs.c nsfont.m pop.c term.c xfaces.c xselect.c xterm.c + alloc.c artist.el autoinsert.el buffer.h callproc.c character.h + charset.c configure and 56 other files + +Jim Paris: changed process.c Jim Radford: changed gnus-start.el @@ -1706,7 +2013,7 @@ Jim Salem: wrote completion.el Jim Thompson: co-wrote ps-print.el ps-samp.el -Jim Wilson: changed Makefile.in alloca.c +Jim Wilson: changed alloca.c oldXMenu/Makefile.in Jindrich Makovicka: changed eval.c fns.c @@ -1716,24 +2023,32 @@ Joachim Nilsson: changed cc-styles.el Joachim Reiter: changed org-footnote.el +Joakim Hårsman: changed w32fns.c + Joakim Hove: wrote html2text.el Joakim Verona: wrote db-javascript.el and co-wrote db-ebrowse.el -and changed Makefile.in configure.in image-mode.el image.c image.el +and changed Makefile.in configure.ac image-mode.el image.c image.el nnrss.el progmodes/compile.el thingatpt.el window.c window.h Joanna Pluta: changed TUTORIAL.pl +João Cachopo: changed spam.el + +João Távora: wrote elec-pair.el electric-tests.el +and changed shr.el tex-mode.el electric.el emacs.texi lisp-mode.el + progmodes/python.el python-tests.el simple.el tls.el vc.el + Jochen Hein: changed gnus-art.el Jochen Küpper: changed gnus.texi calc-units.el -Joe Buehler: changed Makefile.in configure.in cygwin.h browse-url.el - comint.el configure dired-aux.el dired.el dirtrack.el dos-w32.el - fast-lock.el filecache.el fileio.c files.el gmalloc.c gnus-util.el - hippie-exp.el keyboard.c lastfile.c loadup.el mem-limits.h - and 11 other files +Joe Buehler: changed configure.ac cygwin.h src/Makefile.in Makefile.in + browse-url.el comint.el configure dired-aux.el dired.el dirtrack.el + dos-w32.el fast-lock.el filecache.el fileio.c files.el gmalloc.c + gnus-util.el hippie-exp.el keyboard.c lastfile.c lib-src/Makefile.in + and 13 other files Joe Casadonte: changed gnus-srvr.el @@ -1741,57 +2056,71 @@ Joe Corneli: changed subr.el Joe Edmonds: changed lisp-mode.el +Joel Bion: changed pcmpl-gnu.el + +Joel Boehland: co-wrote ob-clojure.el ob-lisp.el + +Joel N. Weber II: changed comint.el make-dist + +Joel Ray Holveck: changed gnus-sum.el info.el + Joe Matarazzo: changed ebrowse.c Joe Ramey: changed filelock.c rmailsum.el Joe Reiss: changed gnus-art.el +Joev Dubach: changed nntp.el + +Joe Vornehm Jr.: changed ido.el + Joe Wells: wrote mail-extr.el resume.el and co-wrote apropos.el and changed arc-mode.el tex-mode.el -Joel Boehland: co-wrote ob-clojure.el ob-lisp.el - -Joel N. Weber II: changed comint.el make-dist - -Joel Ray Holveck: changed gnus-sum.el info.el - -Joev Dubach: changed nntp.el - Johan Bockgård: changed erc.el cl-macs.el erc-backend.el erc-button.el - erc-match.el xdisp.c browse-url.el bytecomp.el custom.el display.texi - erc-compat.el erc-nickserv.el erc-ring.el erc-speak.el erc-track.el - help-fns.el icomplete.el mouse-sel.el simple.el subr.el xterm.el - and 48 other files + erc-match.el icomplete.el xdisp.c browse-url.el bytecomp.el custom.el + display.texi erc-compat.el erc-nickserv.el erc-ring.el erc-speak.el + erc-track.el help-fns.el mouse-sel.el simple.el subr.el xterm.el + and 54 other files + +Johan Claesson: changed filecache.el Johan Euphrosine: changed ibuf-ext.el +Johannes Weiner: changed browse-url.el keyboard.c configure.ac + lisp-mode.el lisp.h pp.el sound.c w32term.c xfaces.c xterm.c + Johan Vromans: wrote forms-d2.el forms.el iso-acc.el and changed complete.el -Johannes Weiner: changed browse-url.el keyboard.c configure.in - lisp-mode.el lisp.h pp.el sound.c w32term.c xfaces.c xterm.c +John Anthony: changed inf-lisp.el ruby-mode.el text-mode.el John Basrai: changed man.el John F. Carr: changed dired.c -John F. Whitehead: changed mule-cmds.el mule-diag.el - John Fremlin: changed gnus-msg.el message.el -John Grabowski: changed xfaces.c xfns.c +John F. Whitehead: changed mule-cmds.el mule-diag.el -John H. Palmieri: changed gnus-fun.el +John Grabowski: changed xfaces.c xfns.c John Heidemann: wrote mouse-copy.el mouse-drag.el +John H. Palmieri: changed gnus-fun.el + John Hughes: changed term.c John J Foerch: changed display.texi erc-stamp.el org.el progmodes/compile.el +John K. Luebs: changed org.el + +John Marino: changed configure.ac + +John Mastro: changed auth-source.el + John Mongan: changed progmodes/f90.el John Paul Wallington: changed ibuffer.el ibuf-ext.el subr.el help-fns.el @@ -1803,39 +2132,41 @@ John Sullivan: changed window.c John Tobey: changed gud.el -John W. Eaton: co-wrote octave-mod.el -and changed octave-inf.el +John W. Eaton: co-wrote octave.el -John Wiegley: wrote align.el cal-bahai.el em-alias.el em-banner.el - em-basic.el em-cmpl.el em-dirs.el em-glob.el em-hist.el em-ls.el - em-pred.el em-prompt.el em-rebind.el em-script.el em-smart.el +John Wiegley: wrote align.el automated/eshell.el cal-bahai.el em-alias.el + em-banner.el em-basic.el em-cmpl.el em-dirs.el em-glob.el em-hist.el + em-ls.el em-pred.el em-prompt.el em-rebind.el em-script.el em-smart.el em-term.el em-unix.el em-xtra.el erc-identd.el esh-arg.el esh-cmd.el esh-ext.el esh-io.el esh-mode.el esh-module.el esh-opt.el esh-proc.el esh-util.el esh-var.el eshell/eshell.el eudcb-mab.el isearchb.el org-attach.el org-crypt.el org-habit.el pcmpl-cvs.el pcomplete.el - remember.el test/eshell.el timeclock.el -and co-wrote org-mac-message.el org-pcomplete.el + remember.el timeclock.el +and co-wrote org-pcomplete.el and changed org-clock.el org-agenda.el erc-chess.el org.el erc.el - iswitchb.el ido.el esh-test.el Makefile.in allout.el cal-menu.el + iswitchb.el ido.el alloc.c allout.el auth-source.el cal-menu.el calendar.el desktop.el diary-lib.el erc-bbdb.el erc-button.el erc-complete.el erc-fill.el erc-ibuffer.el erc-list.el erc-match.el - and 19 other files + and 22 other files John Williams: changed etags.el John Yates: changed hideshow.el -Jon Anders Skorpen: changed org-publish.el +Jon Anders Skorpen: changed ox-publish.el -Jon Ericson: changed gnus.el spam-report.el +Jonas Bernoulli: changed eieio.el button.el ido.el lisp-mnt.el + tabulated-list.el tips.texi -Jon K Hellan: wrote utf7.el +Jonas Hoersch: changed org-inlinetask.el org.el -Jonathan I. Kamens: changed pop.c movemail.c rmail.el Makefile.in - configure.in b2m.pl config.in files.el pop.h terminal.el vc.el +Jonathan I. Kamens: changed pop.c movemail.c rmail.el configure.ac b2m.pl + lib-src/Makefile.in Makefile.in files.el pop.h terminal.el vc.el gnus-sum.el jka-compr.el rmailout.el rnewspost.el sendmail.el simple.el timezone.el vc-hooks.el +Jonathan Leech-Pepin: wrote ox-texinfo.el + Jonathan Marchand: changed cpp-root.el Jonathan Rockway: changed rcirc.el @@ -1846,73 +2177,85 @@ Jonathan Vail: changed vc.el Jonathan Yavner: wrote ses.el tcover-ses.el tcover-unsafep.el testcover.el unsafep.el -and changed ses.texi ses-example.ses Makefile.in edebug.el editfns.c - files.el functions.texi subr.el variables.texi +and changed ses.texi ses-example.ses edebug.el editfns.c files.el + functions.texi misc/Makefile.in subr.el variables.texi + +Jon Ericson: changed gnus.el spam-report.el + +Jon K Hellan: wrote utf7.el + +Joost Diepenmaat: changed org.el -Jorgen Schaefer: wrote erc-autoaway.el erc-goodies.el erc-spelling.el +Joost Kremers: changed reftex-toc.el + +Jorge A. Alfaro-Murillo: changed message.el + +Jorgen Schäfer: wrote erc-autoaway.el erc-goodies.el erc-spelling.el and changed erc.el erc-track.el erc-backend.el erc-match.el erc-stamp.el - erc-button.el erc-fill.el erc-truncate.el erc-compat.el erc-members.el - erc-dcc.el erc-ibuffer.el erc-page.el erc-pcomplete.el erc-sound.el - erc-bbdb.el erc-imenu.el erc-lang.el erc-list.el erc-macs.el - erc-menu.el and 8 other files + erc-button.el erc-fill.el erc-members.el erc-truncate.el erc-compat.el + package-test.el Makefile erc-dcc.el erc-ibuffer.el erc-macs.el + erc-page.el erc-pcomplete.el erc-sound.el minibuffer.el package.el + erc-bbdb.el and 12 other files Jose A. Ortega Ruiz: changed gnus-sum.el Jose E. Marchesi: changed ada-mode.el gomoku.el simple.el smtpmail.el +Jose Marino: changed idlw-shell.el + Joseph Arceneaux: wrote xrdb.c and changed xterm.c xfns.c keyboard.c screen.c dispnew.c xdisp.c window.c x-win.el fileio.c buffer.c xterm.h minibuf.c editfns.c lread.c process.c alloc.c buffer.h files.el screen.el insdel.c emacs.c and 106 other files -Joseph M. Kelsey: changed dir.h fileio.c skeleton.el +Joseph M. Kelsey: changed fileio.c skeleton.el + +Josh Elsasser: changed configure.ac -Josh Elsasser: changed configure.in +Josh Feinstein: changed erc-join.el erc.el Josh Huber: changed mml-sec.el mml.el message.el gnus-msg.el mml2015.el nnmail.el ChangeLog ChangeLog.1 gnus-cite.el gnus-delay.el gnus-spec.el - mml1991.el nnultimate.el nnwfm.el gnus-cus.el gnus-smiley.el - gnus-start.el gnus-topic.el gnus.el nnbabyl.el nndiary.el - and 8 other files + mml1991.el nnwfm.el gnus-cus.el gnus-smiley.el gnus-start.el + gnus-topic.el gnus.el nnbabyl.el nndiary.el nnfolder.el + and 7 other files Joshua Varner: changed intro.texi Jouni K. Seppänen: changed gnus.texi nnimap.el mm-url.el -João Cachopo: changed spam.el - Juan León Lahoz García: wrote wdired.el and changed files.el perl-mode.el +Juanma Barranquero: wrote emacs-lock.el frameset.el +and changed src/makefile.w32-in subr.el desktop.el config.nt w32fns.c + lib-src/makefile.w32-in server.el emacsclient.c faces.el files.el + simple.el bs.el help-fns.el w32term.c org.el xdisp.c keyboard.c w32.c + buffer.c ido.el image.c and 1109 other files + Juan Pechiar: wrote ob-mscgen.el and changed ob-octave.el -Juanma Barranquero: wrote emacs-lock.el -and changed makefile.w32-in subr.el w32fns.c files.el server.el bs.el - emacsclient.c help-fns.el faces.el org.el simple.el buffer.c xdisp.c - keyboard.c desktop.el process.c w32term.c window.c ido.el w32.c - allout.el and 1089 other files - -Juergen Kreileder: changed imap.el nnimap.el +Juergen Kreileder: changed nnimap.el Juergen Nickelsen: wrote ws-mode.el Julian Gehring: changed org.texi orgcard.tex -Julian Scheid: changed tramp.el +Julian Scheid: changed tramp.el color.el Julien Avarre: changed gnus-fun.el Julien Barnier: changed ob-comint.el ob-sh.el org.el -Julien Danjou: wrote gnus-gravatar.el gravatar.el notifications.el - shr-color.el +Julien Danjou: wrote erc-desktop-notifications.el gnus-gravatar.el + gnus-notifications.el gravatar.el notifications.el shr-color.el and co-wrote color.el -and changed shr.el org-agenda.el gnus-art.el gnus-html.el gnus.el - mm-decode.el gnus-group.el gnus-util.el message.el org.el gnus-sum.el - gnus.texi mm-view.el nnimap.el mm-uu.el nnir.el sieve-manage.el - color-lab.el url-cache.el auth-source.el gnus-ems.el and 82 other files +and changed shr.el org-agenda.el gnus-art.el nnimap.el gnus-html.el + gnus.el message.el gnus-group.el gnus-sum.el gnus-util.el mm-decode.el + mm-view.el org.el gnus.texi nnir.el sieve-manage.el mm-uu.el + color-lab.el gnus-demon.el gnus-int.el gnus-msg.el and 96 other files Julien Gilles: wrote gnus-ml.el @@ -1920,62 +2263,56 @@ Junio Hamano: changed window.el Jure Cuhalev: changed ispell.el +Jürgen Hötzel: wrote tramp-adb.el +and changed comint.el em-unix.el esh-util.el tramp.el url-handlers.el + wid-edit.el + Juri Linkov: wrote files-x.el misearch.el occur-tests.el -and changed info.el isearch.el simple.el replace.el progmodes/grep.el - dired-aux.el progmodes/compile.el dired.el startup.el faces.el files.el - display.texi menu-bar.el descr-text.el bindings.el cus-edit.el - image-mode.el ispell.el man.el dired-x.el log-view.el - and 338 other files +and changed isearch.el info.el replace.el simple.el dired-aux.el + progmodes/grep.el dired.el progmodes/compile.el startup.el faces.el + files.el menu-bar.el display.texi bindings.el descr-text.el desktop.el + comint.el image-mode.el man.el cus-edit.el ispell.el + and 353 other files Justin Bogner: changed fortune.el -Justin Sheehy: changed gnus-sum.el nntp.el - -Justus Piater: changed smtpmail.el +Justin Gordon: changed ox-md.el -Jérémy Compostella: changed battery.el windmove.el window.el - -Jérôme Marant: changed Makefile.in make-dist bindings.el configure.in - emacsclient.c misc.texi +Justin Sheehy: changed gnus-sum.el nntp.el -Jürgen Hötzel: changed comint.el url-handlers.el wid-edit.el - -K. Shane Hartman: wrote chistory.el echistory.el electric.el emacsbug.el - helper.el picture.el view.el -and changed rmail.el ebuff-menu.el simple.el dired.el add-log.el - lisp-mode.el mim-mode.el shell.el buff-menu.el buffer.c c-mode.el - mail-utils.el more-mode.el aton.el c++-mode.el cmds.c compile.el - files.el gud.el indent.el info.el and 13 other files +Justus Piater: changed org-agenda.el smtpmail.el Kahlil Hodgson: changed timeclock.el Kai Großjohann: wrote gnus-delay.el nnir.el tramp-uu.el trampver.el and co-wrote longlines.el tramp-sh.el tramp.el and changed message.el gnus-agent.el gnus-sum.el files.el nnmail.el - tramp.texi nntp.el gnus.el simple.el ange-ftp.el Makefile.in dired.el - paragraphs.el bindings.el files.texi gnus-art.el gnus-group.el man.el - INSTALL crisp.el fileio.c and 45 other files + tramp.texi nntp.el gnus.el simple.el ange-ftp.el dired.el paragraphs.el + bindings.el files.texi gnus-art.el gnus-group.el man.el INSTALL + Makefile.in crisp.el fileio.c and 43 other files -Kai Tetzlaff: changed org-publish.el url-http.el +Kailash C. Chowksey: changed HELLO ind-util.el kannada.el knd-util.el + lisp/Makefile.in loadup.el makefile.w32-in -Kailash C. Chowksey: changed HELLO Makefile.in ind-util.el kannada.el - knd-util.el loadup.el makefile.w32-in +Kai Tetzlaff: changed ox-publish.el url-http.el -Kalle Olavi Niemitalo: changed keyboard.c +Kalle Kankare: changed image.c -Kan-Ru Chen: changed nnir.el ecomplete.el gnus-diary.el gnus.texi - nroff-mode.el +Kalle Olavi Niemitalo: changed keyboard.c Kanematsu Daiji: changed nnimap.el -Karel Klíč: changed fileio.c files.el Makefile.in configure.in eval.c - ftfont.c lisp.h text.texi tramp.el +Kan-Ru Chen: changed nnir.el ecomplete.el window.el gnus-diary.el + gnus.texi ibuf-ext.el nnmbox.el nroff-mode.el + +Karel Klíč: changed fileio.c files.el configure.ac eval.c ftfont.c lisp.h + src/Makefile.in text.texi tramp.el -Karl Berry: changed emacs.texi info.texi elisp.texi text.texi anti.texi - display.texi emacs-xtra.texi faq.texi filelock.c gnu.texi macos.texi - minibuf.texi mule.texi processes.texi texinfo.tex ada-mode.texi - autotype.texi building.texi calc.texi cc-mode.texi cl.texi - and 93 other files +Karl Berry: changed info.texi emacs.texi elisp.texi text.texi anti.texi + display.texi efaq.texi ada-mode.texi autotype.texi calc.texi + cc-mode.texi cl.texi dired-x.texi ebrowse.texi ediff.texi + emacs-mime.texi emacs-xtra.texi eshell.texi eudc.texi filelock.c + forms.texi and 94 other files Karl Chen: changed files.el align.el cc-vars.el emacsclient.c gnus-art.el help-mode.el jka-cmpr-hook.el make-mode.el perl-mode.el @@ -1986,14 +2323,14 @@ Karl Eichwalder: changed Makefile.in add-log.el bookmark.el dired-aux.el Karl Fogel: wrote bookmark.el mail-hist.el saveplace.el and changed files.el doc-view.el image-mode.el info.el simple.el INSTALL - autogen.sh isearch.el menu-bar.el thingatpt.el INSTALL.REPO configure - configure.in editfns.c gnus-bookmark.el gnus-msg.el gnus-sum.el man.el - nnmail.el org-agenda.el vc-svn.el and 4 other files + autogen.sh isearch.el menu-bar.el thingatpt.el vc-svn.el INSTALL.REPO + comint.el configure configure.ac editfns.c gnus-bookmark.el gnus-msg.el + gnus-sum.el man.el nnmail.el and 6 other files Karl Heuer: changed keyboard.c lisp.h xdisp.c buffer.c xfns.c xterm.c - alloc.c files.el frame.c window.c configure.in Makefile.in data.c - minibuf.c editfns.c fns.c process.c fileio.c simple.el keymap.c - indent.c and 444 other files + alloc.c files.el frame.c configure.ac window.c data.c minibuf.c + editfns.c fns.c process.c Makefile.in fileio.c simple.el keymap.c + indent.c and 446 other files Karl Kleinpaste: changed gnus-sum.el gnus-art.el gnus-picon.el gnus-score.el gnus-uu.el gnus-xmas.el gnus.el mm-uu.el mml.el nnmail.el @@ -2006,13 +2343,20 @@ Karl M. Hegbloom: changed gnus.el Karl Pflästerer: changed gnus-art.el gnus-score.el mml.el spam-stat.el vc-svn.el +Karol Ostrovsky: changed configure.ac src/Makefile.in + +Károly Lőrentey: changed xfns.c bindings.el keyboard.c menu-bar.el + buffer.c coding.c frame.el print.c rxvt.el simple.el spam.el sysdep.c + x-win.el xdisp.c xt-mouse.el xterm.c xterm.h .gdbinit AT386.el HELLO + README and 100 other files + Katsuhiro Hermit Endo: changed gnus-group.el gnus-spec.el Katsumi Yamaoka: wrote canlock.el -and changed gnus-art.el gnus-sum.el message.el gnus.texi mm-decode.el - mm-util.el mm-view.el gnus-group.el mml.el rfc2047.el gnus-util.el - gnus-start.el gnus-msg.el gnus.el shr.el nntp.el gnus-agent.el nnrss.el - mm-uu.el nnmail.el gnus-html.el and 135 other files +and changed gnus-art.el message.el gnus-sum.el gnus.texi mm-decode.el + mm-util.el mm-view.el gnus-msg.el gnus-util.el mml.el gnus-group.el + rfc2047.el gnus-start.el gnus.el shr.el nntp.el gnus-agent.el nnrss.el + mm-uu.el nnmail.el gmm-utils.el and 146 other files Kaushik Srenevasan: changed gdb-mi.el @@ -2020,7 +2364,8 @@ Kaveh R. Ghazi: changed delta88k.h xterm.c Kayvan Sylvan: changed supercite.el -Kazuhiro Ito: changed coding.c flow-fill.el +Kazuhiro Ito: changed coding.c flow-fill.el font.c keyboard.c + make-mode.el starttls.el xdisp.c Kazushi Marukawa: changed filelock.c hexl.c profile.c unexalpha.c @@ -2034,12 +2379,32 @@ Keith Gabryelski: wrote hexl.c hexl.el Keith Packard: changed font.c -Ken Brown: changed configure.in cygwin.h sheap.c browse-url.el gmalloc.c - vm-limit.c callproc.c dired.c emacs.c fileio.c gdb-mi.el loadup.el - mem-limits.h unexcw.c +Kelly Dean: changed simple.el help-mode.el desktop.el files.el lisp.el + register.el easy-mmode.el fileio.c help-fns.el help-macro.el help.el + keyboard.c package-x.el rect.el windmove.el winner.el + +Kelvin White: changed erc.el erc.texi NEWS.24 erc-backend.el erc-ring.el + erc-stamp.el + +Ken Brown: changed configure.ac gmalloc.c sheap.c cygwin.h emacs.c + browse-url.el conf_post.h emacs.rc.in unexcw.c w32term.c alloc.c + dispextern.h frame.c lisp.h src/Makefile.in vm-limit.c xgselect.c + CPP-DEFINES callproc.c config.nt dired.c and 17 other files Ken Brush: changed emacsclient.c +Kenichi Handa: wrote composite.el decoder-tests.el isearch-x.el + language/cyrillic.el ps-bdf.el py-punct.el pypunct-b5.el thai-word.el +and co-wrote ps-def.el ps-mule.el ps-print.el ps-samp.el quail.el +and changed coding.c mule-cmds.el mule.el fontset.c charset.c xdisp.c + font.c fontset.el xterm.c fileio.c mule-conf.el characters.el fns.c + ftfont.c mule-diag.el coding.h charset.h ccl.c xfaces.c editfns.c + composite.c and 374 other files + +Kenichi Okada: co-wrote sasl-cram.el sasl-digest.el + +Kenjiro Nakayama: changed eww.el mm-url.el + Ken Laprade: changed simple.el Ken Manheimer: wrote allout-widgets.el allout.el icomplete.el @@ -2047,25 +2412,17 @@ and changed pgg-gpg.el pgg.el progmodes/python.el locked-encrypted.png locked-encrypted.xpm pgg-pgp.el pgg-pgp5.el unlocked-encrypted.png unlocked-encrypted.xpm README edebug.el pgg.texi tips.texi -Ken Raeburn: changed lisp.h lread.c Makefile.in alloc.c buffer.c fns.c - keyboard.c minibuf.c coding.c editfns.c fileio.c keymap.c xdisp.c - configure.in emacs.c undo.c xfns.c xterm.c charset.h coding.h fontset.c - and 93 other files - -Ken Stevens: wrote ispell.el +Kenneth Stailey: changed alpha.h configure.ac ns32000.h openbsd.h pmax.h + sparc.h unexalpha.c unexelf.c -Kenichi Handa: wrote composite.el isearch-x.el language/cyrillic.el - ps-bdf.el py-punct.el pypunct-b5.el thai-word.el -and co-wrote ps-def.el ps-mule.el ps-print.el ps-samp.el quail.el -and changed coding.c mule-cmds.el mule.el fontset.c charset.c xdisp.c - fontset.el font.c xterm.c Makefile.in fileio.c mule-conf.el - characters.el fns.c ftfont.c mule-diag.el charset.h ccl.c coding.h - xfaces.c editfns.c and 388 other files +Ken Olum: changed mail/rmailmm.el message.el rmail.el -Kenichi Okada: co-wrote sasl-cram.el sasl-digest.el +Ken Raeburn: changed lisp.h lread.c alloc.c buffer.c fns.c keyboard.c + minibuf.c coding.c editfns.c fileio.c keymap.c xdisp.c configure.ac + emacs.c undo.c xfns.c xterm.c charset.h coding.h fontset.c process.c + and 96 other files -Kenneth Stailey: changed alpha.h configure.in ns32000.h openbsd.h pmax.h - sparc.h unexalpha.c unexelf.c +Ken Stevens: wrote ispell.el Kentaro Ohkouchi: changed emacs.png README emacs.ico emacs.svg emacs16_mac.png emacs24_mac.png emacs256_mac.png emacs32_mac.png @@ -2096,19 +2453,19 @@ and changed gnus-agent.el gnus-sum.el gnus-start.el gnus-int.el nntp.el nnagent.el nnheader.el gnus-async.el gnus-registry.el gnus-salt.el gnus-uu.el and 3 other files -Kevin Layer: changed w32proc.c +Kevin Layer: changed mml.el w32proc.c -Kevin Rodgers: changed compile.el mailabbrev.el dired-x.el files.el - progmodes/compile.el ange-ftp.el byte-opt.el desktop.el diff-mode.el +Kevin Rodgers: changed compile.el mailabbrev.el progmodes/compile.el + dired-x.el files.el ange-ftp.el byte-opt.el desktop.el diff-mode.el dired-x.texi ffap.el files.texi flyspell.el isearch.el killing.texi lisp.el loadhist.el mailalias.el menu-bar.el print.c progmodes/grep.el and 8 other files Kevin Ryde: wrote info-xref.el and changed info-look.el info.el checkdoc.el cl.texi compilation.txt - arc-mode.el ffap.el gnus-art.el gnus-sum.el mule.el os.texi - progmodes/compile.el MORE.STUFF browse-url.el copyright.el dig.el - etags.c flyspell.el keyboard.c mailcap.el man.el and 80 other files + etags.c arc-mode.el ffap.el gnus-art.el gnus-sum.el mule.el os.texi + progmodes/compile.el woman.el MORE.STUFF browse-url.el copyright.el + dig.el files.el flyspell.el keyboard.c and 85 other files Kim F. Storm: wrote bindat.el cua-base.el cua-gmrk.el cua-rect.el ido.el keypad.el kmacro.el @@ -2117,20 +2474,21 @@ and changed xdisp.c dispextern.h process.c simple.el window.c keyboard.c macterm.c alloc.c fns.c xfaces.c keymap.c xfns.c xterm.h .gdbinit and 250 other files +Kimit Yada: changed copyright.el + Kim-Minh Kaplan: changed gnus-picon.el gnus-sum.el gnus-start.el - gnus-win.el gnus-xmas.el gnus.texi imap.el message.el nndraft.el - nnml.el + gnus-win.el gnus-xmas.el gnus.texi message.el nndraft.el nnml.el -Kimit Yada: changed copyright.el +Kirill A. Korinskiy: changed fortune.el -Kirk Kelsey: changed make-mode.el +Kirk Kelsey: changed make-mode.el vc-hg.el Kishore Kumar: changed terminal.el Klaus Straubinger: changed url-http.el url-history.el pcmpl-rpm.el url-cookie.el url.el -Klaus Zeitler: changed configure.in files.el sh-script.el vcursor.el +Klaus Zeitler: changed configure.ac files.el sh-script.el vcursor.el Knut Anders Hatlen: changed nnimap.el imap.el @@ -2140,18 +2498,28 @@ and changed hanja.el hangul.el hangul3.el hanja-jis.el symbol-ksc.el Kobayashi Yasuhiro: changed w32fns.c configure.bat indent.c info.el w32term.c w32term.h window.c xfns.c +Kodi Arfer: changed org.texi ox-html.el + Konrad Hinsen: wrote org-eshell.el and changed ob-python.el +Konstantin Kliakhandler: changed org-agenda.el + Konstantin Novitsky: changed progmodes/python.el Kristoffer Grönlund: wrote wombat-theme.el +K. Shane Hartman: wrote chistory.el echistory.el electric.el emacsbug.el + helper.el picture.el view.el +and changed rmail.el ebuff-menu.el simple.el dired.el add-log.el + lisp-mode.el mim-mode.el shell.el buff-menu.el buffer.c c-mode.el + mail-utils.el more-mode.el aton.el c++-mode.el cmds.c compile.el + files.el gud.el indent.el info.el and 13 other files + Kurt B. Kaiser: changed message.el -Kurt Hornik: wrote octave-inf.el -and co-wrote octave-mod.el -and changed battery.el ielm.el octave-hlp.el term.el +Kurt Hornik: co-wrote octave.el +and changed battery.el ielm.el octave-hlp.el octave-mode.texi term.el Kurt Swanson: changed gnus-art.el gnus-salt.el gnus-sum.el gnus-ems.el gnus-group.el gnus-msg.el gnus-score.el gnus-util.el nnmail.el window.c @@ -2159,19 +2527,18 @@ Kurt Swanson: changed gnus-art.el gnus-salt.el gnus-sum.el gnus-ems.el Kyle Jones: wrote life.el and changed saveconf.el buffer.c mail-utils.el sendmail.el +Kyle Meyer: changed ox.el + Kyotaro Horiguchi: changed coding.c indent.c -Károly Lőrentey: changed xfns.c bindings.el keyboard.c menu-bar.el - buffer.c coding.c frame.el print.c rxvt.el simple.el spam.el sysdep.c - x-win.el xdisp.c xt-mouse.el xterm.c xterm.h .gdbinit AT386.el HELLO - Makefile.in and 101 other files +Laimonas Vėbra: changed european.el Lara Rios: co-wrote cal-menu.el Lars Balker Rasmussen: changed gnus-art.el gnus-agent.el message.el -Lars Brinkhoff: changed building.texi config.in configure.in editfns.c - fns.c os.texi +Lars Brinkhoff: changed building.texi configure.ac editfns.c fns.c + os.texi Lars Hansen: changed desktop.el tramp.el info.el mh-e.el dired-x.el dired-x.texi dired.el ls-lisp.el rmail.el dired.c files.texi @@ -2181,28 +2548,29 @@ Lars Hansen: changed desktop.el tramp.el info.el mh-e.el dired-x.el Lars Lindberg: wrote msb.el and co-wrote dabbrev.el imenu.el -Lars Ljung: changed esh-ext.el - -Lars Magne Ingebrigtsen: wrote compface.el dns.el ecomplete.el - format-spec.el gnus-agent.el gnus-art.el gnus-async.el gnus-bcklg.el - gnus-cache.el gnus-demon.el gnus-draft.el gnus-dup.el gnus-eform.el - gnus-ems.el gnus-fun.el gnus-group.el gnus-html.el gnus-int.el - gnus-logic.el gnus-picon.el gnus-range.el gnus-salt.el gnus-spec.el - gnus-srvr.el gnus-start.el gnus-sum.el gnus-undo.el gnus-util.el - gnus-uu.el gnus-win.el ietf-drums.el mail-parse.el mail-prsvr.el - mail-source.el message.el messcompat.el mm-view.el mml.el netrc.el - network-stream.el nnagent.el nndir.el nndraft.el nngateway.el nnmail.el - nnoo.el nntp.el nnweb.el qp.el rfc2045.el rfc2231.el rtree.el - score-mode.el shr.el spam.el url-queue.el +Lars Ljung: changed esh-ext.el isearch.el + +Lars Magne Ingebrigtsen: wrote compface.el dns.el dom.el ecomplete.el + eww.el format-spec.el gnus-agent.el gnus-art.el gnus-async.el + gnus-bcklg.el gnus-cache.el gnus-cloud.el gnus-demon.el gnus-draft.el + gnus-dup.el gnus-eform.el gnus-ems.el gnus-fun.el gnus-group.el + gnus-html.el gnus-int.el gnus-logic.el gnus-picon.el gnus-range.el + gnus-salt.el gnus-spec.el gnus-srvr.el gnus-start.el gnus-sum.el + gnus-undo.el gnus-util.el gnus-uu.el gnus-win.el ietf-drums.el + mail-parse.el mail-prsvr.el mail-source.el message.el messcompat.el + mm-archive.el mm-view.el mml.el netrc.el network-stream.el nnagent.el + nndir.el nndraft.el nngateway.el nnmail.el nnoo.el nntp.el nnweb.el + nsm.el qp.el rfc2045.el rfc2231.el rtree.el score-mode.el shr.el + spam.el url-domsuf.el url-queue.el zlib-tests.el and co-wrote gnus-kill.el gnus-mh.el gnus-msg.el gnus-score.el gnus-topic.el gnus.el gssapi.el mailcap.el mm-bodies.el mm-decode.el mm-encode.el mm-util.el nnbabyl.el nndoc.el nneething.el nnfolder.el nnheader.el nnimap.el nnmbox.el nnmh.el nnml.el nnspool.el nnvirtual.el rfc2047.el time-date.el -and changed gnus.texi gnus-cite.el pop3.el smtpmail.el gnus-xmas.el - auth-source.el proto-stream.el url-http.el gnutls.c subr.el xml.c - dired.el editfns.c nnultimate.el gnus-nocem.el imap.el nnkiboze.el - nnrss.el nnslashdot.el simple.el spam-report.el and 210 other files +and changed gnus.texi gnus-cite.el smtpmail.el pop3.el gnus-xmas.el + gnutls.c auth-source.el url-http.el files.el proto-stream.el subr.el + dired.el simple.el image.c nnrss.el text.texi xml.c editfns.c + gnus-nocem.el gnus-registry.el message.texi and 240 other files Lars Rasmusson: changed ebrowse.c @@ -2211,11 +2579,10 @@ Lasse Rasinen: changed gnus-start.el Laurent Martelli: changed mm-decode.el Lawrence Mitchell: wrote erc-backend.el erc-log.el -and changed erc.el org-latex.el org.el erc-match.el erc-nets.el - erc-nickserv.el org-exp.el browse-url.el erc-button.el erc-compat.el - erc-dcc.el erc-fill.el erc-list.el erc-track.el ielm.el ob.el - org-html.el cl-macs.el erc-autoaway.el erc-autojoin.el erc-bbdb.el - and 23 other files +and changed erc.el ox-latex.el org.el ox.el erc-match.el erc-nets.el + erc-nickserv.el ox-html.el browse-url.el erc-button.el erc-compat.el + erc-dcc.el erc-fill.el erc-list.el erc-track.el ielm.el ob.el Makefile + cl-macs.el erc-autoaway.el erc-autojoin.el and 25 other files Lawrence R. Dodd: co-wrote dired-x.el and changed fortran.el ispell.el sendmail.el cmuscheme.el comint.el @@ -2223,41 +2590,50 @@ and changed fortran.el ispell.el sendmail.el cmuscheme.el comint.el lisp.el man.el minibuf.c rcs2log rmail.el simple.el terminal.el text-mode.el tpu-edt.el and 3 other files +Lee Duhem: changed eval.c + Leigh Stoller: changed emacsclient.c server.el -Lennart Borgman: wrote ert-x.el org-freemind.el +Lennart Borgman: co-wrote ert-x.el and changed nxml-mode.el tutorial.el window.el ada-xref.el buff-menu.el emacs-lisp/debug.el emacsclient.c filesets.el flymake.el help-fns.el - isearch.el linum.el lisp-mode.el mouse.el recentf.el remember.el - replace.el ruby-mode.el shell.el texinfmt.el w32term.c w32term.h + isearch.el linum.el lisp-mode.el lisp.el mouse.el recentf.el + remember.el replace.el ruby-mode.el shell.el texinfmt.el + and 3 other files Lennart Staflin: changed dired.el diary-ins.el diary-lib.el tq.el xdisp.c -Leo Liu: changed rcirc.el ido.el abbrev.el makefile.w32-in subr.el - Makefile.in deps.mk diff-mode.el dnd.el em-hist.el erc.el files.el - fns.c font-lock.el footnote.el gl-comp.m4 gnulib.mk help-mode.el - iswitchb.el minibuf.c minibuffer.el and 62 other files +Leo Liu: wrote calc-tests.el pcmpl-x.el +and changed octave.el ido.el rcirc.el files.el subr.el eldoc.el simple.el + flymake.el smie.el abbrev.el lisp-mode.el progmodes/python.el + cl-extra.el cl-macs.el emacs-lisp/cl-lib.el progmodes/compile.el + register.el rng-valid.el window.el bindings.el cfengine.el + and 157 other files Leonard H. Tower Jr.: changed rnews.el rnewspost.el emacsbug.el rmailout.el sendmail.el -Levin Du: changed parse-time.el +Leonardo Nobrega: changed progmodes/python.el + +Leonard Randall: changed org-bibtex.el reftex-parse.el + +Leo P. White: changed eieio-custom.el + +Levin Du: changed org-clock.el parse-time.el -Lewis Perin: changed emacs.manifest +Le Wang: changed org-src.el comint.el hilit-chg.el misc.el + +Lewis Perin: changed emacs-x86.manifest Liam Healy: changed outline.el -Liang Wang: changed etags.el +Liam Stitt: changed url-file.el url-vars.el -Litvinov Sergey: changed ob-maxima.el ob-octave.el +Liang Wang: changed etags.el Lloyd Zusman: changed mml.el pgg-gpg.el -Luc Teirlinck: wrote help-at-pt.el -and changed files.el autorevert.el cus-edit.el subr.el simple.el - frames.texi startup.el display.texi files.texi Makefile.in dired.el - comint.el custom.texi emacs.texi fns.c frame.el ielm.el minibuf.texi - modes.texi variables.texi buffers.texi and 212 other files +Lluís Vilanova: changed ede/linux.el Luca Capello: changed mm-encode.el @@ -2265,68 +2641,84 @@ Lucid, Inc.: changed byte-opt.el byte-run.el bytecode.c bytecomp.el delsel.el disass.el faces.el font-lock.el lmenu.el mailabbrev.el select.el xfaces.c xselect.c -Ludovic Courtes: changed nnregistry.el +Luc Teirlinck: wrote help-at-pt.el +and changed files.el autorevert.el cus-edit.el subr.el simple.el + frames.texi startup.el display.texi files.texi dired.el comint.el + modes.texi custom.texi emacs.texi fns.c frame.el ielm.el minibuf.texi + variables.texi buffers.texi commands.texi and 214 other files Ludovic Courtès: wrote nnregistry.el -and changed gnus.texi +and changed configure.ac gnus.texi + +Luis Felipe López Acevedo: changed TUTORIAL.es + +Luis R Anaya: co-wrote ox-man.el Lukas Huonker: changed tetris.el Łukasz Demianiuk: changed erc.el -Łukasz Stelmach: changed cookie1.el message.el org-agenda.el org-bbdb.el - org-exp.el org-html.el org.el +Łukasz Stelmach: changed cookie1.el gtkutil.c message.el org-agenda.el + org-bbdb.el org.el ox-html.el ox.el + +Luke Lee: changed hideif.el Lute Kamstra: changed modes.texi emacs-lisp/debug.el generic-x.el - generic.el font-lock.el simple.el subr.el Makefile.in battery.el - debugging.texi easy-mmode.el elisp.texi emacs-lisp/generic.el - hl-line.el info.el basic.texi bindings.el calc.el cmdargs.texi - diff-mode.el doclicense.texi and 291 other files + generic.el font-lock.el simple.el subr.el battery.el debugging.texi + easy-mmode.el elisp.texi emacs-lisp/generic.el hl-line.el info.el + octave.el basic.texi bindings.el calc.el cmdargs.texi diff-mode.el + doclicense.texi and 291 other files Lynn Slater: wrote help-macro.el Maciek Pasternacki: changed nnrss.el -Magnus Henoch: changed url-http.el ispell.el url.el dbusbind.c dns.el - url-gw.el url-parse.el url-proxy.el autoinsert.el cl.texi configure.in - dbus.el gnus.texi hashcash.el log-edit.el message.el org-clock.el - org-latex.el org-table.el process.c quail/cyrillic.el - and 10 other files +Madan Ramakrishnan: changed org-agenda.el + +Magnus Henoch: wrote sasl-scram-rfc-tests.el sasl-scram-rfc.el +and changed url-http.el ispell.el url.el dbusbind.c dns.el configure.ac + nnmaildir.el sasl.el url-gw.el url-parse.el url-proxy.el autoinsert.el + cl.texi cyrillic.el dbus.el gnus.texi hashcash.el image.c log-edit.el + message.el org-clock.el and 14 other files Malcolm Purvis: changed spam-stat.el Manoj Srivastava: wrote manoj-dark-theme.el -Manuel Giraud: changed org-html.el org-publish.el org.texi +Manuel Giraud: changed ox-html.el ox-publish.el org.texi Manuel Gómez: changed speedbar.el Manuel Serrano: wrote flyspell.el +Marcelo Toledo: changed TUTORIAL.pt_BR TUTORIAL.cn TUTORIAL.cs + TUTORIAL.de TUTORIAL.es TUTORIAL.fr TUTORIAL.it TUTORIAL.ja TUTORIAL.ko + TUTORIAL.pl TUTORIAL.ro TUTORIAL.ru TUTORIAL.sk TUTORIAL.sl TUTORIAL.th + TUTORIAL.zh add-log.el european.el + Marc Fleischeuers: changed files.el Marc Girod: changed informat.el rmail.el rmailsum.el sendmail.el Marc Lefranc: changed gnus-art.el -Marc Shapiro: co-wrote bibtex.el - -Marcelo Toledo: changed TUTORIAL.pt_BR TUTORIAL.cn TUTORIAL.cs - TUTORIAL.de TUTORIAL.es TUTORIAL.fr TUTORIAL.it TUTORIAL.ja TUTORIAL.ko - TUTORIAL.pl TUTORIAL.ro TUTORIAL.ru TUTORIAL.sk TUTORIAL.sl TUTORIAL.th - TUTORIAL.zh add-log.el european.el - Marco Melgazzi: changed term.el +Marco Wahl: changed org-agenda.el + Marco Walther: changed mips-siemens.h unexelfsni.c unexsni.c -Marcus G. Daniels: changed xterm.c configure.in lwlib-Xm.c lwlib.c - xdisp.c xfns.c Makefile.in dispnew.c xmenu.c alloc.c config.in - editfns.c emacs.c frame.c frame.h irix5-0.h keyboard.c linux.h - lwlib-Xm.h lwlib.h ntterm.c and 11 other files +Marc Shapiro: co-wrote bibtex.el + +Marcus G. Daniels: changed xterm.c configure.ac lwlib-Xm.c lwlib.c + xdisp.c xfns.c dispnew.c src/Makefile.in xmenu.c alloc.c editfns.c + emacs.c frame.c frame.h irix5-0.h keyboard.c linux.h lwlib-Xm.h lwlib.h + ntterm.c ptx4.h and 10 other files Marcus Harnisch: changed gnus-art.el +Marcus Karlsson: changed image.c + Marek Martin: changed nnfolder.el Marien Zwart: changed progmodes/python.el @@ -2335,60 +2727,64 @@ Mario Lang: wrote erc-button.el erc-ibuffer.el erc-imenu.el erc-menu.el erc-netsplit.el erc-networks.el erc-notify.el erc-speedbar.el erc-stamp.el erc-track.el erc-xdcc.el and co-wrote erc-fill.el -and changed erc.el erc-dcc.el erc-speak.el erc-bbdb.el erc-complete.el - erc-pcomplete.el erc-chess.el erc-list.el battery.el erc-match.el - erc-autojoin.el erc-nets.el erc-nickserv.el erc-ring.el artist.el - cpp-root.el db-el.el db-global.el db-javascript.el db.el diff.el - and 24 other files +and changed erc.el erc-dcc.el erc-speak.el Makefile erc-bbdb.el + erc-complete.el erc-pcomplete.el erc-chess.el erc-list.el battery.el + erc-match.el erc-autojoin.el erc-nets.el erc-nickserv.el erc-ring.el + org.texi artist.el cpp-root.el db-el.el db-global.el db-javascript.el + and 34 other files Mark A. Hershberger: changed xml.el nnrss.el mm-url.el cperl-mode.el - isearch.el vc-bzr.el Makefile.in NXML-NEWS cc-mode.texi - compilation.txt ede.texi eieio.texi esh-mode.el flymake.el - gnus-group.el makefile.w32-in nxml-mode.texi progmodes/compile.el + isearch.el vc-bzr.el NXML-NEWS cc-mode.texi compilation.txt ede.texi + eieio.texi esh-mode.el flymake.el gnus-group.el misc/Makefile.in + misc/makefile.w32-in nxml-mode.texi progmodes/compile.el progmodes/python.el programs.texi and 7 other files +Mark Davies: changed amdx86-64.h configure configure.ac hp800.h + lib-src/Makefile.in netbsd.h ralloc.c sh3el.h sort.el + Mark D. Baushke: changed mh-e.el mh-utils.el mh-mime.el mh-comp.el - mh-search.el mh-customize.el mh-identity.el mh-seq.el mh-speed.el - mh-funcs.el mh-alias.el etags.c mh-junk.el mh-tool-bar.el + mh-search.el mh-customize.el Makefile mh-identity.el mh-seq.el + mh-speed.el mh-funcs.el mh-alias.el etags.c mh-junk.el mh-tool-bar.el mh-xemacs-compat.el pgg-gpg.el -Mark Davies: changed Makefile.in amdx86-64.h configure configure.in - hp800.h netbsd.h ralloc.c sh3el.h sort.el - Mark Diekhans: changed files.el progmodes/compile.el subr.el -Mark H. Weaver: changed comint.el +Mark E. Shoulson: changed org.el org-entities.el Mark Hood: changed gnus-uu.el +Mark H. Weaver: changed comint.el + Mark Lambert: changed process.c process.h -Mark Lillibridge: changed rmail.el mail-utils.el unrmail.el +Mark Laws: changed dispnew.c emacs.c emacsclient.c frame.el frameset.el + keyboard.c lisp.h minibuf.c ms-w32.h server.el + +Mark Lillibridge: changed rmail.el mail-utils.el mail/rmailmm.el + unrmail.el Mark Mitchell: changed font-lock.el Mark Neale: changed fortran.el +Marko Kohtala: changed info.el + Mark Osbourne: changed hexl-mode.el -Mark Plaksin: changed nnrss.el term.el +Mark Oteiza: changed eww.el files.el -Mark Shoulson: changed org.el +Mark Plaksin: changed nnrss.el term.el Mark Thomas: changed flow-fill.el gnus-sum.el gnus-util.el nnmail.el Mark Triggs: changed nnir.el -Mark W Maimone: changed mpuz.el - -Mark W. Eichin: changed keyboard.c xterm.c - -Marko Kohtala: changed info.el - Markus Armbruster: changed avoid.el Markus Gritsch: changed ebrowse.el +Markus Hauck: changed org-agenda.el + Markus Heiser: changed gud.el Markus Heritsch: co-wrote ada-mode.el ada-stmt.el ada-xref.el @@ -2396,11 +2792,11 @@ Markus Heritsch: co-wrote ada-mode.el ada-stmt.el ada-xref.el Markus Holmberg: changed thingatpt.el Markus Rost: wrote cus-test.el -and changed cus-edit.el Makefile.in files.el progmodes/compile.el - rmail.el tex-mode.el find-func.el rmailsum.el simple.el cus-dep.el - dired.el mule-cmds.el rmailout.el checkdoc.el configure.in custom.el - emacsbug.el gnus.el help-fns.el ls-lisp.el mwheel.el - and 122 other files +and changed cus-edit.el files.el progmodes/compile.el rmail.el + tex-mode.el find-func.el rmailsum.el simple.el cus-dep.el dired.el + mule-cmds.el rmailout.el checkdoc.el configure.ac custom.el emacsbug.el + gnus.el help-fns.el ls-lisp.el mwheel.el sendmail.el + and 126 other files Markus Sauermann: changed lisp-mode.el @@ -2410,9 +2806,14 @@ and changed bytecomp.el byte-opt.el doctor.el image-mode.el flyspell.el handwrite.el internals.texi proced.el ps-mode.el speedbar.el subr.el tumme.el widget.texi xterm.c +Mark W. Eichin: changed keyboard.c xterm.c + +Mark W Maimone: changed mpuz.el + Marshall T. Vandegrift: changed gnus-fun.el Martin Blais: co-wrote rst.el +and changed progmodes/compile.el Martin Boyer: changed bibtex.el menu-bar.el @@ -2425,24 +2826,24 @@ Martin Kretzschmar: changed gnus-spec.el gnus-sum.el Martin Larose: changed message.el Martin Lorentzon: wrote vc-annotate.el -and changed vc.el vc-cvs.el vc-hooks.el vc-rcs.el vc-sccs.el +and changed vc.el vc-cvs.el vc-rcs.el vc-sccs.el vc-hooks.el Martin Neitzel: changed supercite.el Martin Pohlack: changed iimage.el pc-select.el -Martin Rudalics: changed window.el window.c windows.texi frame.c buffer.c - help.el window.h cus-start.el frame.el cus-edit.el files.el - buffers.texi dired.el subr.el add-log.el xdisp.c font-lock.el - help-fns.el lisp.h mouse.el wid-edit.el and 137 other files +Martin Rudalics: changed window.el window.c windows.texi frame.c xdisp.c + w32term.c xterm.c w32fns.c help.el frame.el xfns.c buffer.c frames.texi + cus-start.el window.h dired.el display.texi dispnew.c keyboard.c + mouse.el files.el and 173 other files Martin Stjernholm: wrote cc-bytecomp.el and co-wrote cc-align.el cc-cmds.el cc-compat.el cc-defs.el cc-engine.el cc-fonts.el cc-langs.el cc-menus.el cc-mode.el cc-styles.el cc-vars.el -and changed cc-fix.el cc-mode.texi Makefile.in cc-guess.el cc-mode-19.el - nnimap.el ack.texi awk-mode.el cc-awk.el cc-lobotomy.el cc-make.el - cc-style.el cc-subword.el files.el generic-x.el gnus-agent.el - gnus-art.el mm-decode.el simple.el +and changed cc-fix.el nnimap.el cc-guess.el cc-mode-19.el cc-mode.texi + lisp/Makefile.in ack.texi awk-mode.el cc-awk.el cc-lobotomy.el + cc-make.el cc-subword.el files.el generic-x.el gnus-agent.el + gnus-art.el gnus-demon.el mm-decode.el simple.el Martin Svenson: changed progmodes/python.el @@ -2459,12 +2860,15 @@ and co-wrote gnus-kill.el gnus-mh.el gnus-msg.el gnus.el nnbabyl.el nnspool.el nnvirtual.el time-date.el and changed gnuspost.el -Masatake Yamato: wrote ld-script.el subword.el +Masashi Fujimoto: changed battery.el + +Masatake Yamato: wrote add-log-tests.el imenu-test.el ld-script.el + subword.el and co-wrote cc-guess.el and changed etags.el asm-mode.el hexl.el xdisp.c bindings.el man.el xfaces.c simple.el vc.el wid-edit.el add-log.el etags.c faces.el - pcvs.el progmodes/compile.el register.el ruler-mode.el buffer.c - cc-langs.el cus-face.el dired-x.el and 73 other files + pcvs.el progmodes/compile.el register.el ruler-mode.el sh-script.el + buffer.c cc-langs.el cus-face.el and 79 other files Masayuki Ataka: changed texinfmt.el texinfo.el characters.el cmuscheme.el make-mode.el @@ -2474,27 +2878,21 @@ Masayuki Fujii: changed dnd.el w32-win.el Mathias Dahl: wrote image-dired.el and changed tumme.el dired.el dired.texi -Mathias Megyei: changed Makefile.in +Mathias Megyei: changed lisp/Makefile.in -Mats Lidell: changed TUTORIAL.sv european.el gnus-art.el +Mats Lidell: changed TUTORIAL.sv european.el gnus-art.el org-element.el -Matt Hodges: changed textmodes/table.el faces.el iswitchb.el simple.el - tmm.el cal-menu.el calendar.el calendar.texi diary-lib.el easymenu.el - edebug.texi eldoc.el em-hist.el em-pred.el fixit.texi icon.el ido.el - locate.el paragraphs.el pcomplete.el repeat.el and 3 other files +Matt Armstrong: changed gnus-topic.el gnus.el message.el -Matt Lundin: changed org-agenda.el org-bibtex.el org-footnote.el org.el - -Matt Pharr: changed message.el - -Matt Simmons: changed message.el +Matt Curtis: changed pulse.el -Matt Swift: changed dired.el editfns.c lisp-mode.el mm-decode.el - outline.el progmodes/compile.el rx.el simple.el startup.el +Matt Fidler: changed package.el Matthew Junker: changed cal-tex.el -Matthew Luckie: changed configure.in +Matthew Leach: changed arc-mode.el font-lock.el + +Matthew Luckie: changed configure.ac Matthew Mundell: changed calendar.texi diary-lib.el files.texi type-break.el debugging.texi display.texi edebug.texi editfns.c eval.c @@ -2502,30 +2900,66 @@ Matthew Mundell: changed calendar.texi diary-lib.el files.texi objects.texi os.texi positions.texi searching.texi subr.el text.texi and 3 other files +Matthias Dahl: changed faces.el + Matthias Förste: changed files.el +Matthias Meulien: changed bookmark.el progmodes/python.el buff-menu.el + prog-mode.el simple.el tabify.el vc-dir.el + Matthias Wiehl: changed gnus.el Matthieu Devin: wrote delsel.el Matthieu Moy: changed gnus-msg.el message.el +Matt Hodges: changed textmodes/table.el faces.el iswitchb.el simple.el + tmm.el cal-menu.el calendar.el calendar.texi diary-lib.el easymenu.el + edebug.texi eldoc.el em-hist.el em-pred.el fixit.texi icon.el ido.el + locate.el paragraphs.el pcomplete.el repeat.el and 3 other files + +Matt Lundin: changed org-agenda.el org.el org-bibtex.el org-footnote.el + ox-publish.el org-bbdb.el org-datetree.el org-gnus.el + +Matt McClure: changed progmodes/python.el + +Matt Pharr: changed message.el + +Matt Simmons: changed message.el + +Matt Swift: changed dired.el editfns.c lisp-mode.el mm-decode.el + outline.el progmodes/compile.el rx.el simple.el startup.el + Maxime Edouard Robert Froumentin: changed gnus-art.el mml.el -Michael Albinus: wrote dbus.el secrets.el tramp-cmds.el tramp-compat.el - tramp-ftp.el tramp-gvfs.el tramp-gw.el tramp-smb.el xesam.el - zeroconf.el +Max Mikhanosha: changed org-agenda.el org-habit.el org.el + +Memnon Anon: changed org.texi + +Micah Anderson: changed spook.lines + +Michael Albinus: wrote dbus-tests.el dbus.el file-notify-tests.el + filenotify.el secrets.el tramp-cmds.el tramp-compat.el tramp-ftp.el + tramp-gvfs.el tramp-gw.el tramp-smb.el tramp-tests.el url-tramp.el + vc-tests.el xesam.el zeroconf.el and co-wrote tramp-cache.el tramp-sh.el tramp.el -and changed tramp.texi dbusbind.c trampver.texi dbus.texi trampver.el - ange-ftp.el tramp-fish.el files.el files.texi tramp-imap.el Makefile.in - tramp-vc.el tramp-util.el tramp-uu.el notifications.el simple.el - auth-source.el dired-aux.el configure.in em-unix.el fileio.c - and 66 other files +and changed tramp.texi dbusbind.c trampver.texi trampver.el tramp-adb.el + ange-ftp.el dbus.texi files.el tramp-fish.el autorevert.el files.texi + tramp-imap.el notifications.el configure.ac tramp-vc.el lisp.h + lisp/Makefile.in simple.el tramp-uu.el em-unix.el keyboard.c + and 116 other files -Michael Ben-Gershon: changed acorn.h configure.in riscix1-1.h riscix1-2.h +Michael Ben-Gershon: changed acorn.h configure.ac riscix1-1.h riscix1-2.h unexec.c -Michael Brand: changed org.el org-agenda.el org.texi org-table.el +Michael Brand: changed org.texi org-table.el org.el org-agenda.el + org-capture.el ob-tangle.el org-feed.el org-id.el org-list.el + +Michaël Cadilhac: changed browse-url.el fr-dired-ref.tex gnus-sum.el + gnus.texi ido.el Makefile emacsbug.el files.el fill.el flyspell.el + fr-refcard.tex ispell.el meta-mode.el nnrss.el anti.texi battery.el + blackbox.el bs.el calccard.tex callint.c cmuscheme.el + and 58 other files Michael D. Ernst: wrote reposition.el and changed dired-x.el uniquify.el ispell.el bibtex.el rmail.el dired.el @@ -2533,52 +2967,58 @@ and changed dired-x.el uniquify.el ispell.el bibtex.el rmail.el dired.el complete.el fill.el shadow.el texnfo-upd.el vc.el allout.el comint.el cust-print.el edebug.el and 28 other files +Michael Downes: changed gnus-sum.el + Michael D. Prange: wrote fortran.el and changed tex-mode.el -Michael Downes: changed gnus-sum.el +Michael Gauland: co-wrote ob-scheme.el +and changed ebnf2ps.el org-src.el Michael Gschwind: wrote iso-cvt.el Michael Harnois: changed nnimap.el +Michael Heerdegen: changed dired.el easy-mmode.el eldoc.el wdired.el + +Michael Hoffman: changed term.el + Michael Hotchin: changed progmodes/compile.el Michael I. Bushnell: changed rmail.el simple.el callproc.c gnu.h gnus.el lread.c process.c screen.el search.c sendmail.el startup.el timer.c -Michael K. Johnson: changed configure.in emacs.c intel386.h linux.h - mem-limits.h process.c sysdep.c syssignal.h systty.h template.h - unexcoff.c - Michael Kifer: wrote ediff-diff.el ediff-help.el ediff-hook.el ediff-init.el ediff-merg.el ediff-mult.el ediff-ptch.el ediff-util.el ediff-vers.el ediff-wind.el ediff.el viper-cmd.el viper-ex.el viper-init.el viper-keym.el viper-macs.el viper-mous.el viper-util.el viper.el and co-wrote cal-x.el -and changed viper*.el ediff*.el viper.texi ediff.texi ediff-hooks.el - ediff-merge.el menu-bar.el appt.el desktop.el ediff-meta.el - viper-mouse.el +and changed viper*.el ediff*.el viper.texi ediff.texi ediff-merge.el + menu-bar.el appt.el desktop.el ediff-meta.el viper-mouse.el -Michael Markert: changed ob.el org-agenda.el org-ascii.el - org-contacts-wl.el org-docbook.el org-html.el org-latex.el org-table.el - org.el +Michael K. Johnson: changed configure.ac emacs.c process.c sysdep.c + syssignal.h systty.h unexcoff.c + +Michael Marchionna: changed nsterm.m + +Michael Markert: changed ob.el org-agenda.el org-docbook.el org-table.el + org.el ox-ascii.el ox-html.el ox-latex.el Michael McNamara: co-wrote verilog-mode.el -Michael Olson: changed erc.el erc-backend.el erc.texi erc-track.el +Michael Olson: changed erc.el erc-backend.el Makefile erc-track.el erc-log.el erc-stamp.el erc-autoaway.el erc-dcc.el erc-goodies.el - erc-list.el erc-compat.el erc-identd.el ERC-NEWS erc-bbdb.el + erc-list.el erc-compat.el erc-identd.el erc.texi ERC-NEWS erc-bbdb.el erc-match.el erc-notify.el erc-ibuffer.el erc-services.el remember.el - erc-button.el erc-nicklist.el and 60 other files + erc-button.el and 62 other files Michael Piotrowski: changed gnus-art.el gnus-sum.el ps-print.el Michael R. Cook: changed gnus-sum.el gnus-topic.el gnus-art.el -Michael R. Mauger: changed sql.el emacsclient.c cua-base.el custom.el - facemenu.el recentf.el replace.el tramp.el w32fns.c +Michael R. Mauger: changed sql.el emacsclient.c comint.el cua-base.el + custom.el facemenu.el recentf.el replace.el tramp.el w32fns.c Michael R. Wolf: changed ange-ftp.el @@ -2593,22 +3033,27 @@ Michael Sperber: changed aix3-1.h aix4-2.h gnus.texi mail-source.el Michael Staats: wrote pc-select.el -Michael Welsh Duggan: changed lisp.h nnimap.el sh-script.el w32term.c +Michael Vehrs: changed woman.el + +Michael Welsh Duggan: changed nnimap.el lisp.h sh-script.el w32term.c buffer.c gnus-spec.el keyboard.c nnir.el nnmail.el print.c sieve-manage.el termhooks.h url-http.el w32-win.el w32fns.c w32menu.c w32term.h woman.el xdisp.c xterm.c -Michal Jankowski: changed insdel.c keyboard.c +Michael Weylandt: changed ox-latex.el + +Michael Witten: changed TUTORIAL fixit.texi intro.texi -Michal Nazarewicz: changed frame.c frame.h ispell.el w32term.c xterm.c +Michal Jankowski: changed insdel.c keyboard.c -Michal Sojka: changed org-icalendar.el +Michal Nazarewicz: wrote descr-text-test.el tildify-tests.el +and co-wrote tildify.el +and changed simple.el remember.el bindings.el buffer.c cfengine.el cmds.c + descr-text.el eldoc.el files.el fill.el flyspell.el frame.c frame.h + hexl.el ielm.el ispell.el lisp/files.el mpc.el nxml-mode.el octave.el + paragraphs.el and 9 other files -Michaël Cadilhac: changed browse-url.el gnus-sum.el gnus.texi ido.el - emacsbug.el files.el fill.el flyspell.el fr-drdref.tex fr-refcard.ps - fr-refcard.tex ispell.el meta-mode.el nnrss.el - refcards/fr-dired-ref.pdf Makefile anti.texi battery.el blackbox.el - bs.el calccard.pdf and 93 other files +Michal Sojka: changed ox-icalendar.el Michelangelo Grigni: wrote ffap.el and changed gnus-score.el @@ -2618,6 +3063,10 @@ Microelectronics and Computer Technology Corporation: changed rmailkwd.el rmailmsc.el rmailout.el rmailsum.el scribe.el server.el sysdep.c unexcoff.c xmenu.c +Miguel Ruiz: changed ob-gnuplot.el + +Mihir Rege: changed js.el + Mikael Djurfeldt: changed xdisp.c Mikael Fornius: changed org.el org-habit.el @@ -2626,7 +3075,7 @@ Mike Haertel: changed 7300.h Mike Kazantsev: changed erc-dcc.el -Mike Kupfer: changed mh-e.el mh-utils.el +Mike Kupfer: changed mh-comp.el mh-e.el mh-utils.el Mike Lamb: changed em-unix.el esh-util.el pcmpl-unix.el @@ -2634,11 +3083,15 @@ Mike Long: changed b2m.c make-dist make-mode.el netbsd.h view.el vms.h Mike McEwan: changed gnus-agent.el gnus-sum.el gnus-score.el +Mike McLean: changed org-agenda.el + Mike Newton: co-wrote bibtex.el Mike Rowan: changed process.c alloc.c dispnew.c keyboard.c process.h sysdep.c xdisp.c +Mike Sperber: changed org.el org-footnote.el + Mike Williams: wrote mouse-sel.el thingatpt.el and changed sgml-mode.el xml-lite.el @@ -2647,30 +3100,34 @@ Mike Woolley: changed gnus-sum.el Mikio Nakajima: changed ring.el viper-util.el Milan Zamazal: wrote glasses.el language/czech.el quail/czech.el - tildify.el -and co-wrote language/slovak.el prolog.el quail/slovak.el -and changed abbrev.el filecache.el files.el mm-view.el org.el - progmodes/compile.el +and co-wrote language/slovak.el prolog.el quail/slovak.el tildify.el +and changed czech.el abbrev.el filecache.el files.el mm-view.el org.el + progmodes/compile.el slovak.el Miles Bader: wrote button.el face-remap.el image-file.el macroexp.el mb-depth.el minibuf-eldef.el rfn-eshadow.el and changed comint.el faces.el simple.el editfns.c xfaces.c xdisp.c - info.el minibuf.c display.texi wid-edit.el xterm.c Makefile.in - dispextern.h quick-install-emacs subr.el window.el cus-edit.el - diff-mode.el xfns.c bytecomp.el help.el and 270 other files + info.el minibuf.c display.texi wid-edit.el xterm.c dispextern.h + quick-install-emacs subr.el window.el cus-edit.el diff-mode.el xfns.c + bytecomp.el help.el lisp.h and 273 other files Milton Wulei: changed gdb-ui.el +Mirek Kaim: changed configure.ac + Mirko Vukovic: changed emacs.texi maintaining.texi +Mitchel Humpherys: changed vc-git.el + Miyashita Hisashi: changed ccl.c coding.c coding.h mule-cmds.el mule-conf.el mule.el pop3.el Miyoshi Masanori: changed mouse.el smtpmail.el xdisp.c Mohsen Banan: wrote persian.el +and changed loadup.el -Mon Key: changed animate.el syntax.el +Mon Key: changed animate.el imap.el syntax.el Morten Welinder: wrote [many MS-DOS files] arc-mode.el desktop.el dosfns.c internal.el msdos.h pc-win.el s-region.el @@ -2683,32 +3140,37 @@ Mosur Mohan: changed etags.c Motorola: changed buff-menu.el +Muchenxuan Tong: changed org-agenda.el org-mobile.el org-timer.el + Murata Shuuichirou: changed coding.c -N. Raghavendra: changed timezone.el +Myles English: changed org-clock.el Nachum Dershowitz: co-wrote cal-hebrew.el Nagy Andras: co-wrote gnus-sieve.el -and changed imap.el gnus.el +and changed gnus.el Nakagawa Makoto: changed ldap.el -Nakaji Hiroyuki: changed mm-util.el amdx86-64.h configure.in smiley.el +Nakaji Hiroyuki: changed mm-util.el amdx86-64.h configure.ac smiley.el Nakamura Toshikazu: changed w32fns.c -Nali Toja: changed configure.in +Nali Toja: changed configure.ac Naohiro Aota: changed fontset.c ftfont.c gnus-art.el mm-view.el tls.el xftfont.c +Nathaniel Flath: changed cc-menus.el cc-engine.el cc-fonts.el cc-langs.el + cc-mode.el cc-vars.el + Nathan J. Williams: changed imap.el -Nathan Weizenbaum: changed js.el +Nathan Trapuzzano: changed cconv.el cl-macs.el cperl-mode.el gnus.texi + linum.el progmodes/python.el python-tests.el -Nathaniel Flath: changed cc-menus.el cc-engine.el cc-fonts.el cc-langs.el - cc-mode.el cc-vars.el +Nathan Weizenbaum: changed js.el progmodes/python.el Neal Ziring: co-wrote vi.el (public domain) @@ -2716,48 +3178,65 @@ Neil Mager: wrote appt.el Neil W. Van Dyke: wrote webjump.el -Nelson H. F. Beebe: changed configure.in +Nelson H. F. Beebe: changed configure.ac -Nelson Jose dos Santos Ferreira: changed nnsoup.el gnus-art.el - gnus-dup.el spam-stat.el +Nelson Jose dos Santos Ferreira: changed nnsoup.el emacs.el gnus-art.el + gnus-dup.el gnus-win.el spam-stat.el Nevin Kapur: changed nnmail.el gnus-sum.el nnimap.el gnus-group.el gnus-registry.el gnus.el nnbabyl.el nnfolder.el nnmbox.el nnmh.el nnml.el +Nguyen Thai Ngoc Duy: co-wrote vnvni.el + Niall Mansfield: changed etags.c -Nic Ferrier: changed tramp.el +Nic Ferrier: changed ert.el tramp.el Nicholas Maniscalco: changed term.el Nick Alcock: changed gnus.el -Nick Dokos: changed org-exp.el mh-search.el org.el url-cache.el +Nick Dokos: changed org-table.el ox.el icalendar.el mh-search.el + org-mobile.el org.el ox-ascii.el url-cache.el Nick Roberts: wrote gdb-mi.el t-mouse.el and changed gdb-ui.el gud.el building.texi tooltip.el speedbar.el bindings.el thumbs.el xt-mouse.el .gdbinit DEBUG cc-mode.el comint.el keyboard.c subr.el frames.texi help-mode.el progmodes/compile.el - xdisp.c Makefile.in display.texi term.c and 154 other files + xdisp.c display.texi term.c vc-svn.el and 144 other files Nico Francois: changed w32fns.c w32inevt.c w32menu.c Nicolas Avrutin: changed url-http.el -Nicolas Goaziou: changed org-list.el org.el org-footnote.el org-exp.el - org-latex.el org-html.el org-inlinetask.el org-indent.el org-docbook.el - org-timer.el ob-asymptote.el org-ascii.el org-capture.el ob.el - org-agenda.el org-archive.el ob-exp.el org-clock.el org-macs.el - org-mouse.el org.texi and 3 other files +Nicolas Calderon Asselin: changed org-clock.el + +Nicolas Goaziou: wrote org-element.el org-macro.el ox-ascii.el + ox-latex.el ox-md.el ox-org.el ox.el +and co-wrote ox-beamer.el ox-icalendar.el ox-man.el +and changed org-list.el org.el ox-html.el org-footnote.el ox-texinfo.el + org.texi ox-publish.el ox-odt.el org-inlinetask.el org-indent.el + org-docbook.el ob-exp.el org-agenda.el org-timer.el ob.el + org-capture.el ob-asymptote.el org-clock.el org-macs.el + org-pcomplete.el org-table.el and 22 other files + +Nicolas Petton: wrote seq-tests.el seq.el +and changed sequences.texi authors.el + +Nicolas Richard: changed org.el simple.el align.el battery.el byte-run.el + eieio-opt.el elisp-mode.el help.el isearch.el ispell.el minibuffer.el + ob.el package.el wid-edit.el Niels Giesen: changed icalendar.el org-agenda.el org-clock.el - org-docbook.el org-icalendar.el + org-docbook.el org-table.el ox-icalendar.el ox-latex.el Niimi Satoshi: changed pp.el search.c Niklas Morberg: changed nnweb.el gnus-art.el nnimap.el spam.el +Nikolai Weibull: changed org.el + Nikolaj Schumacher: changed flymake.el progmodes/compile.el eldoc.el elp.el nsfont.m rx.el @@ -2769,18 +3248,20 @@ Noah Friedman: wrote eldoc.el rlogin.el type-break.el and co-wrote erc-dcc.el and changed rsz-mini.el comint.el emacs-buffer.gdb files.el Makefile mailabbrev.el sendmail.el subr.el timer.el yow.el apropos.el battery.el - bytecomp.el calc.el coding.c complete.el config.in configure.in - copyright.h fns.c gnu-linux.h and 19 other files + bytecomp.el calc.el coding.c complete.el configure.ac copyright.h fns.c + gnu-linux.h hpux7.h and 18 other files Noah Lavine: changed tramp.el +Noam Postavsky: changed cmdproxy.c process-tests.el w32proc.c + Nobuyoshi Nakada: co-wrote ruby-mode.el Nobuyuki Hikichi: changed news-risc.h Noel Cragg: changed mh-junk.el -Noorul Islam: changed org-latex.el org-html.el org.el org.texi +Noorul Islam: changed ox-latex.el org.el org.texi ox-html.el org-capture.el org-gnus.el org-habit.el package.el Norbert Koch: changed gnus-msg.el gnus-score.el @@ -2788,20 +3269,25 @@ Norbert Koch: changed gnus-msg.el gnus-score.el Nozomu Ando: changed unexmacosx.c alloc.c buffer.c mips.h pmax.h smtpmail.el sysselect.h unexelf.c +N. Raghavendra: changed timezone.el + Nuutti Kotivuori: changed gnus-sum.el flow-fill.el gnus-cache.el Odd Gripenstam: wrote dcl-mode.el -Ognyan Kulev: changed TUTORIAL.bg quail/cyrillic.el +Ognyan Kulev: changed TUTORIAL.bg cyrillic.el -Okazaki Tetsurou: changed cc-fonts.el +Okazaki Tetsurou: changed cc-fonts.el vc-svn.el vc.el Olaf Sylvester: wrote bs.el Ole Aamot: changed compile.el -Oleg S. Tihonov: changed ispell.el language/cyrillic.el map-ynp.el - quail/cyrillic.el subr.el +Oleg S. Tihonov: changed cyrillic.el ispell.el language/cyrillic.el + map-ynp.el subr.el + +Oleh Krehel: changed outline.el check-declare.el derived.el easy-mmode.el + gdb-mi.el lisp/custom.el org-capture.el org-clock.el replace.el Oleksandr Gavenko: changed generic-x.el progmodes/grep.el @@ -2814,7 +3300,8 @@ Oliver Scholz: wrote ipa-praat.el and changed gamegrid.el gnus-cite.el nonascii.texi rx.el startup.el update-game-score.c -Oliver Seidel: wrote todo-mode.el +Oliver Seidel: wrote otodo-mode.el +and co-wrote todo-mode.el Olivier Laurens: changed forms.el @@ -2828,35 +3315,40 @@ Olof Ohlsson Sax: changed vc-svn.el Osamu Yamane: changed smtpmail.el -Oscar Figueiredo: wrote eudc-bob.el eudc-export.el eudc-hotlist.el - eudc-vars.el eudc.el eudcb-bbdb.el eudcb-ldap.el eudcb-ph.el ldap.el +Oscar Figueiredo: wrote ldap.el +and co-wrote eudc-bob.el eudc-export.el eudc-hotlist.el eudc-vars.el + eudc.el eudcb-bbdb.el eudcb-ldap.el eudcb-ph.el and changed ph.el -Óscar Fuentes: changed ido.el cmdproxy.c emacsclient.c vc-bzr.el +Oscar Fuentes: changed ms-w32.h CPP-DEFINES addpm.c addsection.c + browse-url.el configure.ac keyboard.c preprep.c vc-cvs.el vc-git.el + vc-hg.el vc-hooks.el vc-mtn.el vc-svn.el vc.el vc/vc-bzr.el w32.c + w32heap.c w32term.c -P. E. Jareth Hein: changed gnus-util.el +Óscar Fuentes: changed ido.el cmdproxy.c diff-mode.el emacsclient.c + vc-bzr.el -Pascal Dupuis: changed octave-inf.el +Pascal Dupuis: changed octave.el Pascal Rigaux: changed image.c rfc2231.el -Pat Thoyts: changed xfns.c +Patrick Mahan: changed macfns.c Patric Mueller: changed gnus-sum.el -Patrick Mahan: changed macfns.c +Pat Thoyts: changed xfns.c Paul Curry: changed cc-subword.el Paul D. Smith: wrote snmp-mode.el and changed imenu.el make-mode.el -Paul Eggert: wrote rcs2log vcdiff +Paul Eggert: wrote rcs2log and co-wrote cal-dst.el -and changed lisp.h Makefile.in editfns.c alloc.c xdisp.c configure.in - fileio.c image.c process.c fns.c xterm.c dispextern.h keyboard.c data.c - lread.c sysdep.c xfns.c eval.c emacs.c buffer.c config.in - and 573 other files +and changed lisp.h configure.ac alloc.c process.c fileio.c sysdep.c + xdisp.c keyboard.c editfns.c image.c emacs.c xterm.c data.c lread.c + callproc.c fns.c Makefile.in dispextern.h dispnew.c eval.c xfns.c + and 1085 other files Paul Fisher: changed fns.c @@ -2869,14 +3361,18 @@ and changed message.el gnus-util.el gnus-int.el gnus.el gnus-agent.el gnus-start.el gnus-sum.el nnmail.el Paul Pogonyshev: changed progmodes/python.el subr.el which-func.el - Makefile.in align.el byte-opt.el configure.in dabbrev.el display.texi + align.el byte-opt.el cc-langs.el configure.ac dabbrev.el display.texi eldoc.el etags.el image-file.el image.c image.el info.el replace.el - search.texi searching.texi ses.el tar-mode.el url-http.el window.el + search.texi searching.texi ses.el src/Makefile.in tar-mode.el + and 3 other files -Paul Reilly: changed dgux.h lwlib-Xm.c lwlib.c xlwmenu.c configure.in - mail-utils.el process.c rmail.el xfns.c Makefile.in dgux5-4R2.h - dgux5-4R3.h files.el keyboard.c lwlib-Xaw.c lwlib-Xm.h lwlib-int.h - lwlib.h mail/rmailmm.el rmailedit.el rmailkwd.el and 10 other files +Paul Rankin: changed outline.el + +Paul Reilly: changed dgux.h lwlib-Xm.c lwlib.c xlwmenu.c configure.ac + mail-utils.el process.c rmail.el xfns.c dgux5-4R2.h dgux5-4R3.h + files.el keyboard.c lwlib-Xaw.c lwlib-Xm.h lwlib-int.h lwlib.h + lwlib/Makefile.in mail/rmailmm.el rmailedit.el rmailkwd.el + and 10 other files Paul Rivier: changed ada-mode.el mixal-mode.el reftex-vars.el reftex.el @@ -2888,15 +3384,19 @@ Paul Stevenson: changed nnvirtual.el Paul Stodghill: changed gnus-agent.el gnus-util.el -Pavel Janík: changed keyboard.c xterm.c COPYING xdisp.c Makefile.in - process.c emacs.c lisp.h menu-bar.el ldap.el make-dist xfns.c buffer.c - coding.c eval.c fileio.c flyspell.el fns.c indent.c callint.c - cus-start.el and 710 other files +Pavel Janík: co-wrote eudc-bob.el eudc-export.el eudc-hotlist.el + eudc-vars.el eudc.el eudcb-bbdb.el eudcb-ldap.el eudcb-ph.el +and changed keyboard.c xterm.c COPYING xdisp.c process.c emacs.c lisp.h + menu-bar.el ldap.el make-dist xfns.c buffer.c coding.c eval.c fileio.c + flyspell.el fns.c indent.c Makefile.in callint.c cus-start.el + and 692 other files Pavel Kobiakov: wrote flymake.el and changed flymake.texi -Peder O. Klingenberg: changed gnus.texi +Peder O. Klingenberg: changed mm-decode.el emacsbug.el gnus.texi + +P. E. Jareth Hein: changed gnus-util.el Per Abrahamsen: wrote cus-dep.el cus-edit.el cus-face.el cus-start.el custom.el double.el gnus-cite.el gnus-cus.el progmodes/cpp.el @@ -2918,14 +3418,14 @@ and changed vc.el vc-hooks.el diff-mode.el etags.c etags.el forms.el Per Persson: wrote gnus-vm.el and co-wrote erc-dcc.el -Per Starbäck: changed ispell.el dired.el gnus-start.el BUGS apropos.el - bytecomp.el characters.el charset.h coding.c doctor.el emacs.c +Per Starbäck: changed ispell.el characters.el dired.el gnus-start.el BUGS + apropos.el bibtex.el bytecomp.el charset.h coding.c doctor.el emacs.c european.el iso-transl.el pcmpl-gnu.el replace.el startup.el trouble.texi vc.el xdisp.c -Pete Kazmier: changed gnus-art.el +Pete Beardmore: changed semantic/complete.el idle.el -Pete Ware: changed message.el +Pete Kazmier: changed gnus-art.el Peter Breton: wrote dirtrack.el emacs-lisp/generic.el filecache.el find-lisp.el generic-x.el locate.el net-utils.el @@ -2939,67 +3439,81 @@ Peter Dyballa: changed calendar.el Peter Heslin: changed flyspell.el outline.el -Peter J. Weisberg: changed help.el picture.el simple.el - Peter Jolly: changed arc-mode.el ftfont.c Peter Jones: changed nsterm.m +Peter J. Weisberg: changed help.el picture.el simple.el + Peter Kleiweg: wrote ps-mode.el Peter Liljenberg: wrote elint.el -Peter Münster: changed gnus.texi org-agenda.el org.el +Peter Münster: changed gnus-delay.el gnus-demon.el gnus-group.el + gnus-start.el gnus.texi org-agenda.el org.el -Peter O'Gorman: changed configure.in frame.h hpux10-20.h termhooks.h +Peter O'Gorman: changed configure.ac frame.h hpux10-20.h termhooks.h -Peter Oliver: changed server.el +Peter Oliver: changed perl-mode.el server.el Peter Povinec: changed term.el -Peter Runestig: changed makefile.w32-in configure.bat dos-w32.el emacs.rc - envadd.bat gmake.defs multi-install-info.bat nmake.defs w32fns.c - zone-mode.el +Peter Rosin: changed configure.ac + +Peter Runestig: changed configure.bat dos-w32.el emacs.rc.in + emacs/makefile.w32-in envadd.bat gmake.defs lispintro/makefile.w32-in + lispref/makefile.w32-in misc/makefile.w32-in multi-install-info.bat + nmake.defs nt/makefile.w32-in src/makefile.w32-in w32fns.c zone-mode.el + +Peter Seibel: changed cl-indent.el lisp-mode.el Peter S. Galbraith: wrote mh-alias.el mh-identity.el mh-inc.el mh-limit.el and changed mh-comp.el mh-e.el mh-utils.el mh-mime.el mh-customize.el - mh-seq.el mh-init.el mh-search.el mh-xemacs-compat.el - mh-xemacs-toolbar.el info-look.el mh-compat.el mh-funcs.el alias.pbm - alias.xpm cabinet.xpm goto-addr.el highlight.xpm mh-junk.el - mh-xemacs-icons.el mh-xemacs.el and 9 other files - -Peter Seibel: changed cl-indent.el lisp-mode.el + mh-seq.el Makefile mh-init.el mh-search.el mh-xemacs-compat.el + mh-xemacs-toolbar.el README info-look.el mh-compat.el mh-funcs.el + alias.pbm alias.xpm cabinet.xpm goto-addr.el highlight.xpm mh-junk.el + and 11 other files Peter Stephenson: wrote vcursor.el Peter Tury: changed org.texi +Peter von der Ahe: changed gnus-ems.el + Peter Whaite: changed data.c -Peter von der Ahe: changed gnus-ems.el +Pete Ware: changed message.el + +Pete Williamson: changed leim/Makefile.in lib-src/Makefile.in + lisp/Makefile.in -Petr Salinger: changed configure.in gnu-kfreebsd.h +Petr Hracek: changed emacs.1 -Petri Kaurinkoski: changed configure.in iris4d.h irix6-0.h irix6-5.h +Petri Kaurinkoski: changed configure.ac iris4d.h irix6-0.h irix6-5.h usg5-4.h +Petr Salinger: changed configure.ac gnu-kfreebsd.h + Phil Hagelberg: wrote ert-x-tests.el and changed package.el pcmpl-unix.el subr.el -Phil Sung: changed follow.el progmodes/python.el wdired.el - Philip Jackson: wrote find-cmd.el org-irc.el -Philipp Haselwarter: changed gnus-agent.el gnus.texi - Philippe Schnoebelen: wrote gomoku.el mpuz.el Philippe Waroquiers: changed etags.el term.c -Pierre Poissinger: changed charset.c +Philipp Haselwarter: changed gnus-agent.el gnus-sum.el gnus-sync.el + gnus.texi newcomment.el -Piet van Oostrum: changed data.c fileio.c flyspell.el smtpmail.el +Philipp Rumpf: changed electric.el + +Phil Sainty: changed lisp.el subword.el + +Phil Sung: changed follow.el progmodes/python.el wdired.el + +Pierre Poissinger: changed charset.c Pieter E.J. Pareit: wrote mixal-mode.el @@ -3007,221 +3521,260 @@ Pieter Praet: changed org-crypt.el Pieter Schoenmakers: changed TUTORIAL.nl +Piet van Oostrum: changed data.c fileio.c flyspell.el smtpmail.el + Pinku Surana: changed sql.el -Piotr Zielinski: wrote org-mouse.el +Piotr Zieliński: wrote org-mouse.el Prestoo Ten: changed screen.el Primoz Peterlin: changed TUTORIAL.sl -Puneeth Chaganti: changed org.texi org-exp.el org-agenda.el - org-capture.el org-html.el - -R. Bernstein: changed gud.el +Puneeth Chaganti: changed org.texi ox.el org-agenda.el org-capture.el + ox-html.el -Rafael Laboissiere: changed org.el org.texi +Rafael Laboissiere: changed org-remember.el org-bibtex.el org.el org.texi Rafael Sepúlveda: changed TUTORIAL.es Raffael Mancini: changed misc.el -Rainer Orth: changed Makefile.in - -Rainer Schoepf: wrote alpha.h unexalpha.c -and changed osf1.h alloc.c buffer.c callint.c data.c dispextern.h doc.c - editfns.c floatfns.c frame.h lisp.h lread.c marker.c mem-limits.h - print.c puresize.h window.h xdisp.c xterm.h +Rainer Orth: changed gtkutil.c lisp/Makefile.in -Raja R. Harinath: changed gnus-salt.el nnml.el +Rainer Schöpf: changed osf1.h unexalpha.c alloc.c alpha.h buffer.c + callint.c data.c dispextern.h doc.c editfns.c floatfns.c frame.h lisp.h + lread.c marker.c mem-limits.h print.c puresize.h window.h xdisp.c + xterm.h Rajappa Iyer: changed gnus-salt.el +Raja R. Harinath: changed gnus-salt.el nnml.el + Rajesh Vaidheeswarran: wrote old-whitespace.el and changed whitespace.el ffap.el Ralf Angeli: wrote scroll-lock.el -and changed w32fns.c gnus-art.el reftex-cite.el reftex-toc.el reftex.el +and changed w32fns.c reftex-cite.el gnus-art.el reftex-toc.el reftex.el + reftex-auc.el reftex-dcr.el reftex-global.el reftex-index.el + reftex-parse.el reftex-ref.el reftex-sel.el reftex-vars.el reftex.texi tex-mode.el comint.el flow-fill.el frame.el killing.texi mm-uu.el - mm-view.el package.el pcl-cvs.texi reftex-auc.el reftex-dcr.el - reftex-global.el reftex-index.el reftex-parse.el reftex-ref.el - reftex-sel.el and 6 other files + mm-view.el and 6 other files Ralf Fassel: changed dabbrev.el files.el fill.el iso-acc.el tar-mode.el +Ralf Mattes: changed el.srt + Ralph Schleicher: wrote battery.el info-look.el and changed libc.el browse-url.el fileio.c info.el mm-decode.el - nnultimate.el perl-mode.el which-func.el + perl-mode.el which-func.el Ramakrishnan M: changed mlm-util.el +Randall Smith: changed dired.el + Randal Schwartz: wrote pp.el -Randall Smith: changed dired.el +Ransom Williams: changed files.el + +Rasmus Pank: changed org.el ox-latex.el ob-C.el org-entities.el + org-src.el ox.el + +Rasmus Pank Roulund: changed ange-ftp.el gnus-fun.el + gnus-notifications.el vc-git.el Raul Acevedo: changed info.el options.el -Ray Blaak: co-wrote delphi.el +Ray Blaak: co-wrote opascal.el Raymond Scholz: co-wrote deuglify.el and changed gnus-art.el gnus-msg.el gnus.texi message.el nnmail.el pgg-gpg.el +R. Bernstein: changed gud.el + Reiner Steib: wrote gmm-utils.el gnus-news.el and changed message.el gnus.texi gnus-art.el gnus-sum.el gnus-group.el gnus.el mml.el gnus-faq.texi mm-util.el gnus-score.el message.texi gnus-msg.el gnus-start.el gnus-util.el spam-report.el mm-uu.el spam.el - mm-decode.el files.el gnus-agent.el nnmail.el and 182 other files + mm-decode.el files.el gnus-agent.el nnmail.el and 173 other files Remek Trzaska: changed gnus-ems.el Remi Letot: changed nnmaildir.el +Rémi Vanicat: changed ox-icalendar.el org-table.el + Renaud Rioboo: changed nnmail.el -René Kyllingstad: changed pcomplete.el +René Kyllingstad: changed editfns.c mule-cmds.el pcomplete.el Reto Zimmermann: wrote vera-mode.el and co-wrote vhdl-mode.el +and changed vhdl-mode.texi -Reuben Thomas: changed files.el flymake.el loading.texi pcvs-defs.el - simple.el +Reuben Thomas: changed remember.el README files.el msdos.c INSTALL + ada-mode.el ada-xref.el alloc.c arc-mode.el authors.el config.bat + copyright dired.el dosfns.c ediff.texi editfns.c emacs-xtra.texi + emacs.texi emacs/Makefile.in emacs/makefile.w32-in flymake.el + and 22 other files Riccardo Murri: changed vc-bzr.el tls.el -Richard Dawe: changed Makefile.in config.in +Richard Copley: changed Makefile.in epaths.in epaths.nt gdb-mi.el + +Richard Dawe: changed src/Makefile.in Richard G. Bielawski: changed modes.texi paren.el Richard Hoskins: changed message.el Richard Kim: wrote wisent/python.el -and changed loading.texi python-wy.el texnfo-upd.el +and changed bovine.texi db-global.el loading.texi texnfo-upd.el + wisent.texi Richard King: wrote filelock.c uniquify.el userlock.el -Richard L. Pieri: wrote pop3.el - -Richard Lawrence: changed org-latex.el +Richard Lawrence: changed org-agenda.el ox-latex.el Richard Levitte: changed vc-mtn.el -Richard M. Heiberger: changed tex-mode.el +Richard L. Pieri: wrote pop3.el -Richard M. Stallman: wrote [The original GNU Emacs and numerous files] - easymenu.el image-mode.el menu-bar.el paren.el -and co-wrote cc-align.el cc-cmds.el cc-defs.el cc-engine.el cc-langs.el - cc-menus.el cc-mode.el cc-styles.el cc-vars.el font-lock.el -and changed files.el keyboard.c simple.el xterm.c xdisp.c rmail.el - Makefile.in fileio.c process.c sysdep.c buffer.c xfns.c window.c - configure.in subr.el startup.el sendmail.el emacs.c editfns.c info.el - dispnew.c and 1350 other files +Richard M. Heiberger: changed tex-mode.el Richard Mlynarik: wrote cl-indent.el ebuff-menu.el ehelp.el rfc822.el terminal.el yow.el -and changed files.el simple.el rmail.el info.el sysdep.c bytecomp.el +and changed files.el rmail.el simple.el info.el sysdep.c bytecomp.el startup.el keyboard.c fileio.c process.c sendmail.el window.c editfns.c unexec.c xfns.c keymap.c lisp-mode.el minibuf.c buffer.c dired.el dispnew.c and 140 other files +Richard M. Stallman: wrote [The original GNU Emacs and numerous files] + easymenu.el image-mode.el menu-bar.el paren.el +and co-wrote cc-align.el cc-cmds.el cc-defs.el cc-engine.el cc-langs.el + cc-menus.el cc-mode.el cc-styles.el cc-vars.el font-lock.el +and changed files.el keyboard.c simple.el xterm.c xdisp.c rmail.el + fileio.c process.c sysdep.c buffer.c xfns.c window.c subr.el + configure.ac startup.el sendmail.el emacs.c Makefile.in editfns.c + info.el dired.el and 1335 other files + Richard Sharman: wrote hilit-chg.el and changed sh-script.el ediff-init.el regexp-opt.el simple.el Rick Farnbach: wrote morse.el +Rick Frankel: changed ox-html.el ob-sql.el org.texi + Rick Sladkey: wrote backquote.el and changed gud.el intervals.c intervals.h simple.el -Rob Browning: changed configure.in +Rob Browning: changed configure.ac Rob Christie: changed nsmenu.m -Rob Giardina: changed org-agenda.el - -Rob Kaut: changed vhdl-mode.el - -Rob Riepel: wrote tpu-edt.el tpu-extras.el tpu-mapper.el vt-control.el -and changed tpu-doc.el - Robert Bihlmeyer: changed gnus-score.el gnus-util.el message.el Robert Brown: changed lisp-mode.el Robert Fenk: changed desktop.el +Robert Jarzmik: changed ede/linux.el inversion.el + Robert J. Chassell: wrote makeinfo.el page-ext.el texinfo.el texnfo-upd.el -and changed texinfmt.el emacs-lisp-intro.texi emacs.tex texinfo.tex - info.el texinfo-update.el INSTALL case-table.el cl.texinfo help-fns.el +and changed texinfmt.el emacs-lisp-intro.texi emacs.texi texinfo.tex + info.el texinfo-update.el INSTALL case-table.el cl.texi help-fns.el help-mode.el history.el informat.el latin-1.el latin-2.el latin-3.el - latin-4.el page.el tex-mode.el texinfo.texinfo vip.texinfo + latin-4.el page.el tex-mode.el texinfo.texi vip.texi Robert Marshall: changed mule-cmds.el -Robert P. Goldman: changed org.texi ob-exp.el org-latex.el org.el +Roberto Huelga Díaz: changed org-clock.el org-timer.el + +Roberto Rodríguez: changed ada-mode.texi glossary.texi widget.texi + +Robert P. Goldman: changed org.texi ob-exp.el org.el ox-latex.el -Robert Pluim: changed gnus-demon.el org-agenda.el +Robert Pluim: changed configure.ac gnus-demon.el org-agenda.el + todo-mode.el Robert Thorpe: changed cus-start.el indent.el -Roberto Huelga: changed org-clock.el +Rob Giardina: changed org-agenda.el -Roberto Rodríguez: changed ada-mode.texi glossary.texi widget.texi +Rob Kaut: changed vhdl-mode.el + +Rob Riepel: wrote tpu-edt.doc tpu-edt.el tpu-extras.el tpu-mapper.el + vt-control.el Roderick Schertler: changed dgux.h dgux4.h gud.el sysdep.c Rodney J. Whitby: co-wrote vhdl-mode.el -Rodrigo Real: changed pt-br-refcard.tex pt-br-refcard.ps +Rodrigo Real: changed pt-br-refcard.tex + +Rod Whitby: changed vhdl-mode.texi Roger Breitenstein: changed smtpmail.el Roland B. Roberts: changed buffer.h callproc.c dired.c files.el gnus-group.el gnus-sum.el process.c sort.el sysdep.c systty.h -Roland Kaufmann: changed org-exp.el +Roland Kaufmann: changed ox.el Roland McGrath: wrote autoload.el etags.el map-ynp.el progmodes/grep.el and co-wrote find-dired.el progmodes/compile.el -and changed compile.el add-log.el configure.in files.el Makefile.in vc.el - simple.el mailabbrev.el comint.el buffer.c upd-copyr.el etags.c - menu-bar.el mem-limits.h ralloc.c fileio.c data.c process.c rlogin.el - rmail.el shell.el and 137 other files +and changed compile.el add-log.el configure.ac files.el vc.el simple.el + mailabbrev.el comint.el Makefile.in buffer.c upd-copyr.el menu-bar.el + etags.c mem-limits.h ralloc.c src/Makefile.in fileio.c data.c process.c + rlogin.el rmail.el and 139 other files Roland Winkler: wrote proced.el -and changed bibtex.el process.c appt.el artist.el conf-mode.el - flyspell.el hideshow.el ibuffer.el ispell.el make-mode.el sgml-mode.el - sh-script.el skeleton.el smtpmail.el +and changed bibtex.el faces.el crm.el process.c appt.el artist.el + conf-mode.el cus-edit.el diary-lib.el flyspell.el hideshow.el + ibuf-ext.el ibuffer.el ispell.el make-mode.el sgml-mode.el sh-script.el + skeleton.el smtpmail.el Rolf Ebert: co-wrote ada-mode.el ada-stmt.el ada-xref.el and changed files.el find-file.el -Romain Francoise: changed faq.texi message.el Makefile.in make-dist - gnus.texi dired-x.el comint.el ibuf-ext.el subr.el gnus-sum.el - gnus-uu.el progmodes/compile.el puresize.h replace.el startup.el - configure.in doclicense.texi emacs.c files.texi gnus-fun.el help-fns.el - and 146 other files +Romain Francoise: changed efaq.texi message.el make-dist gnus.texi + dired-x.el Makefile.in comint.el fileio.c ibuf-ext.el subr.el + configure.ac files.texi gnus-sum.el gnus-uu.el progmodes/compile.el + puresize.h replace.el startup.el doclicense.texi emacs.c gnus-fun.el + and 150 other files Roman Belenov: changed which-func.el -Ron Schnell: wrote dunnet.el - Ronan Waide: changed smtpmail.el +Ron Schnell: wrote dunnet.el + Ross Patterson: co-wrote org-protocol.el +Roy Hashimoto: changed mm-view.el + Roy Liu: changed ns-win.el +Rüdiger Sonderfeld: wrote inotify-test.el reftex-tests.el +and changed eww.el octave.el shr.el bibtex.el configure.ac + misc/Makefile.in reftex-vars.el vc-git.el TUTORIAL.de ada-mode.el + autoinsert.el building.texi calc-lang.el cc-langs.el dired.texi + editfns.c emacs.c emacs.texi epa.el erc.el eww.texi and 35 other files + Rui-Tao Dong: changed nnweb.el Rune Kleveland: changed xfns.c -Rupert Swarbrick: changed gnus-score.el +Rupert Swarbrick: changed autoinsert.el cal-html.el gnus-score.el Russ Allbery: changed message.el Ryan Barrett: changed dirtrack.el +Ryan Crum: changed json.el + Ryan C. Thompson: changed savehist.el Ryan Twitchell: changed ido.el @@ -3230,32 +3783,37 @@ Ryan Yeske: wrote rcirc.el and changed ffap.el ispell.el message.texi rmailsum.el simple.el testcover.el webjump.el +Ryo Takaishi: changed ob-tangle.el org-capture.el org-protocol.el + Ryo Yoshitake: changed xterm.c frame.c frame.h mac.c macfns.c w32fns.c xfns.c Ryszard Kubiak: co-wrote ogonek.el -Rémi Vanicat: changed org-icalendar.el - Sacha Chua: wrote erc-pcomplete.el -and changed erc.el erc-button.el +and changed erc.el org.el erc-button.el org.texi Saito Takuya: changed mule.el progmodes/compile.el Sam Dooley: changed keyboard.c +Samer Masterson: changed em-hist.el em-pred.el pcomplete.el + Sam Falkner: changed nntp.el Sam Kendall: changed etags.c etags.el Sam Steingold: wrote gulp.el midnight.el and changed progmodes/compile.el cl-indent.el vc-cvs.el vc.el mouse.el - simple.el font-lock.el ange-ftp.el vc-hg.el window.el add-log.el - bookmark.el bug-reference.el diary-lib.el dired.el etags.el pcvs.el - tex-mode.el apropos.el bindings.el emacs-lisp/debug.el - and 126 other files + simple.el files.el font-lock.el tex-mode.el vc-hg.el ange-ftp.el + sgml-mode.el window.el add-log.el bindings.el bookmark.el + bug-reference.el calendar.el cperl-mode.el diary-lib.el dired.el + and 149 other files + +Samuel Bronson: changed custom.el emacsclient.c keyboard.c + progmodes/grep.el unexmacosx.c -Samuel Bronson: changed custom.el +Samuel Loury: changed org.el Samuel Tardieu: changed smime.el @@ -3263,20 +3821,22 @@ Samuel Thibault: changed gnu.h sysdep.c term.c Sanghyuk Suh: changed mac-win.el macterm.c +Santiago Payà i Miralta: changed vc-hg.el + Sascha Lüdecke: co-wrote mml1991.el and changed gnus-win.el -Sascha Wilde: changed pgg-gpg.el pgg.texi pgg.el bubbles.el configure.in +Sascha Wilde: changed pgg-gpg.el pgg.texi pgg.el bubbles.el configure.ac ede/srecode.el proj-shared.el vc-hg.el Satyaki Das: wrote mh-acros.el mh-gnus.el mh-search.el mh-speed.el mh-thread.el mh-tool-bar.el and co-wrote mh-junk.el and changed mh-e.el mh-utils.el mh-seq.el mh-comp.el mh-mime.el - mh-customize.el mh-funcs.el mh-alias.el mh-unit.el mh-init.el + mh-customize.el mh-funcs.el Makefile mh-alias.el mh-unit.el mh-init.el mh-identity.el mh-make.el mh-xemacs-toolbar.el mh-xemacs-compat.el - pgg-gpg.el mh-inc.el highlight.xpm mh-func.el mh-logo.xpm mh-print.el - mh-xemacs.el simple.el + pgg-gpg.el mh-inc.el highlight.xpm mh-logo.xpm mh-print.el mh-xemacs.el + simple.el Schlumberger Technology Corporation: changed gud.el @@ -3295,6 +3855,8 @@ Scott Frazer: wrote deeper-blue-theme.el whiteboard-theme.el Scott M. Meyers: changed cmacexp.el +Sean Connor: changed gnus-sum.el + Sean Neakums: changed gnus-msg.el gnus-uu.el supercite.el Sean O'Halpin: changed ob.el @@ -3313,15 +3875,25 @@ and co-wrote dired-x.el find-dired.el and changed add-log.el Sebastian Rose: co-wrote org-protocol.el -and changed org-publish.el ftfont.c org-jsinfo.el +and changed ox-publish.el ftfont.c ox-jsinfo.el Sebastian Tennant: changed desktop.el +Sebastian Wiesner: changed bytecomp.el comint.el files.el replace.el + simple.el + +Sébastien Delafond: changed org.el + +Sébastien Gross: changed hideshow.el + Sebastien Kirche: changed mail-extr.el -Seiji Zenitani: changed nsfns.m frame.c xterm.c Info.plist PkgInfo - document.icns find-func.el frame.h help-fns.el macfns.c nsfont.m - nsterm.m w32fns.c xdisp.c xfns.c +Sébastien Vauban: changed org.el org-agenda.el ox-latex.el ob-core.el + org-clock.el ox-ascii.el ox-html.el + +Seiji Zenitani: changed nsfns.m frame.c xterm.c PkgInfo document.icns + find-func.el frame.h help-fns.el macfns.c nsfont.m nsterm.m w32fns.c + xdisp.c xfns.c Sen Nagata: wrote crm.el rfc2368.el @@ -3332,9 +3904,14 @@ Seppo Sade: changed esh-ext.el Sergei Organov: changed vc.el Sergey Litvinov: co-wrote ob-fortran.el +and changed ob-maxima.el ob-octave.el Sergey Poznyakoff: changed mh-mime.el rmail.el rmail.texi smtpmail.el +Sergio Durigan Junior: changed eudcb-bbdb.el gdb-mi.el + +Sergio Martinez: changed nnimap.el + Sergio Pokrovskij: changed TUTORIAL.eo Seweryn Kokot: changed positions.texi searching.texi @@ -3343,27 +3920,27 @@ Shaun Johnson: changed ob-tangle.el org-exp-blocks.el Shawn Boles: changed url-cookie.el -Shawn M. Carey: wrote freebsd.h +Shawn M. Carey: wrote [some early FreeBSD support] Shenghuo Zhu: wrote binhex.el mm-extern.el mm-partial.el mm-url.el mm-uu.el mml2015.el nnrss.el rfc1843.el uudecode.el and co-wrote gnus-dired.el nnfolder.el and changed gnus-art.el message.el gnus-sum.el gnus-msg.el gnus.el gnus-agent.el mm-decode.el mm-util.el gnus-group.el mml.el - gnus-start.el gnus-util.el mm-view.el nnslashdot.el nnmail.el nntp.el - gnus-topic.el gnus-xmas.el rfc2047.el mail-source.el gnus-win.el - and 97 other files + gnus-start.el gnus-util.el mm-view.el nnmail.el nntp.el gnus-topic.el + gnus-xmas.el rfc2047.el mail-source.el gnus-win.el nnheader.el + and 87 other files Shigeru Fukaya: wrote bytecomp-tests.el -and changed byte-opt.el bytecomp-testsuite.el bytecomp.el elint.el - rx-new.el ses.el texinfmt.el +and changed apropos.el byte-opt.el bytecomp.el elint.el rx-new.el ses.el + texinfmt.el Shinichirou Sugou: changed etags.c -Sho Nakatani: changed doc-view.el - Shoji Nishimura: changed org.el +Sho Nakatani: changed doc-view.el + Shuhei Kobayashi: wrote hex-util.el hmac-def.el hmac-md5.el and changed gnus-group.el message.el nnmail.el @@ -3375,19 +3952,23 @@ Sidney Markowitz: changed doctor.el nsmenu.m Sigbjorn Finne: changed gnus-srvr.el +Simen Heggestøyl: changed css-mode.el scheme.el + Simon Josefsson: wrote dig.el dns-mode.el flow-fill.el fringe.el imap.el - mml-sec.el mml-smime.el password-cache.el rfc2104.el sieve-manage.el - sieve-mode.el sieve.el smime.el starttls.el tls.el url-imap.el + mml-sec.el mml-smime.el password-cache.el rfc2104.el sieve-mode.el + sieve.el smime.el starttls.el tls.el url-imap.el and co-wrote gnus-sieve.el gssapi.el mml1991.el nnfolder.el nnimap.el - nnml.el + nnml.el sieve-manage.el and changed message.el gnus-sum.el gnus-art.el smtpmail.el pgg-gpg.el pgg.el gnus-agent.el mml2015.el mml.el gnus-group.el mm-decode.el gnus-msg.el gnus.texi pgg-pgp5.el browse-url.el gnus-int.el gnus.el - hashcash.el mm-view.el password.el gnus-cache.el and 99 other files + hashcash.el mm-view.el password.el gnus-cache.el and 98 other files + +Simon Law: changed delsel.el electric.el Simon Leinen: changed Makefile.in smtpmail.el Makefile cm.c cm.h hpux9.h - indent.c process.c sc.texinfo sgml-mode.el term.c vc.el xfns.c xmenu.c - xterm.c + indent.c leim/Makefile.in process.c sc.texi sgml-mode.el term.c vc.el + xfns.c xmenu.c xterm.c Simon Marshall: wrote fast-lock.el lazy-lock.el regexp-opt.el and co-wrote comint.el shell.el @@ -3396,7 +3977,11 @@ and changed font-lock.el rmail.el fortran.el sendmail.el subr.el dired.el menu-bar.el perl-mode.el ps-print.el rmailsum.el bytecomp.el cc-fonts.el data.c faces.el lisp-mode.el and 56 other files -Simon South: co-wrote delphi.el +Simon Schubert: changed json.el + +Simon South: co-wrote opascal.el + +Simon Thum: changed ob-maxima.el Skip Collins: changed w32fns.c w32term.c w32term.h @@ -3416,15 +4001,20 @@ Stefan Guath: changed find-dired.el Stefan Merten: co-wrote rst.el -Stefan Monnier: wrote bibtex-style.el bzrmerge.el css-mode.el - cvs-status.el diff-mode.el lexbind-tests.el log-edit.el log-view.el - minibuffer.el mpc.el pcase.el pcvs-defs.el pcvs-info.el pcvs-parse.el - pcvs-util.el reveal.el smerge-mode.el smie.el vc-mtn.el -and co-wrote font-lock.el -and changed vc.el subr.el simple.el lisp.h keyboard.c files.el - bytecomp.el keymap.c Makefile.in progmodes/compile.el xdisp.c pcvs.el - alloc.c newcomment.el vc-hooks.el tex-mode.el buffer.c fileio.c eval.c - sh-script.el fill.el and 1033 other files +Stefan Monnier: wrote bibtex-style.el bzrmerge.el cl-generic-tests.el + cl-generic.el cl-preloaded.el cl.el completion-tests.el + core-elisp-tests.el css-mode.el cvs-status.el diff-mode.el gv.el + inline.el lexbind-tests.el log-edit.el log-view.el minibuffer.el mpc.el + nadvice.el pcase.el pcvs-defs.el pcvs-info.el pcvs-parse.el + pcvs-util.el regexp-tests.el reveal.el smerge-mode.el smie.el + subword-tests.el vc-mtn.el +and co-wrote font-lock.el gitmerge.el +and changed subr.el simple.el keyboard.c lisp.h bytecomp.el files.el + vc.el cl-macs.el xdisp.c alloc.c eval.c progmodes/compile.el keymap.c + sh-script.el pcvs.el newcomment.el buffer.c tex-mode.el window.c + vc-hooks.el lread.c and 1245 other files + +Stefano Facchini: changed gtkutil.c Stefan Reichör: changed gnus-agent.el @@ -3434,9 +4024,9 @@ Stefan Schoef: co-wrote bibtex.el Stefan Waldherr: changed nnweb.el -Stefan Wiens: changed gnus-sum.el +Stefan-W. Hahn: changed org-bibtex.el ps-print.el simple.el -Steinar Bang: changed imap.el +Stefan Wiens: changed gnus-sum.el Štěpán Němec: changed INSTALL calc-ext.el cl.texi comint.el edebug.texi font-lock.el loading.texi maps.texi mark.texi message.texi mini.texi @@ -3448,20 +4038,21 @@ Stephan Stahl: changed which-func.el buff-menu.el buffer.c dired-x.texi Stephen A. Wood: changed fortran.el -Stephen Berman: changed diary-lib.el todo-mode.el allout.el dframe.el - dired-aux.el dired.el files.el find-dired.el frame.c gnus-group.el - gtkutil.c info.el minibuffer.el newcomment.el page.el proced.el - recentf.el rfc822.el subr.el +Stephen Berman: co-wrote todo-mode.el +and changed todo-mode.texi diary-lib.el minibuffer.el info.el + otodo-mode.el allout.el dframe.el dired-aux.el dired.el doc-view.el + elpa files.el find-dired.el frame.c gamegrid.el gnus-group.el gomoku.el + gtkutil.c misc/Makefile.in newcomment.el outline.el and 8 other files -Stephen C. Gilardi: changed configure.in +Stephen C. Gilardi: changed configure.ac Stephen Compall: changed saveplace.el texinfo.el Stephen Eglen: wrote iswitchb.el mspools.el -and changed diary-lib.el locate.el octave-inf.el org-agenda.el replace.el +and changed diary-lib.el octave.el org-agenda.el locate.el replace.el hexl.el info-look.el sendmail.el spell.el uce.el MORE.STUFF add-log.el advice.el allout.el autoinsert.el avoid.el backquote.el battery.el - bib-mode.el bruce.el c-mode.el and 78 other files + bib-mode.el bruce.el c-mode.el and 80 other files Stephen Gildea: wrote refcard.tex and co-wrote mh-funcs.el mh-search.el @@ -3471,8 +4062,9 @@ and changed time-stamp.el mh-e.el mh-comp.el mh-utils.el mh-customize.el Stephen J. Turnbull: changed ediff-init.el strings.texi subr.el -Stephen Leake: changed ada-mode.el ada-xref.el ada-mode.texi ada-prj.el - ada-stmt.el align.el pcvs-parse.el vhdl-mode.el +Stephen Leake: changed ada-mode.el ada-xref.el CONTRIBUTE ada-mode.texi + ada-prj.el ada-stmt.el INSTALL.REPO align.el commits pcvs-parse.el repo + startup.el trouble.texi vhdl-mode.el Stephen Peters: changed icalendar.el @@ -3482,33 +4074,33 @@ Steve Fisk: co-wrote cal-tex.el Steve Grubb: changed vcdiff -Steve Nygard: changed unexnext.c - -Steve Purcell: changed nnimap.el - -Steve Strassmann: wrote spook.el - -Steve Youngs: changed mh-utils.el mh-xemacs-compat.el mh-customize.el - mh-e.el mh-comp.el mh-mime.el dns.el gnus-art.el browse-url.el - gnus-sum.el gnus-xmas.el mh-search.el mh-seq.el password.el - run-at-time.el em-unix.el gmm-utils.el gnus-cite.el gnus-demon.el - gnus-ems.el gnus-msg.el and 16 other files - Steven E. Harris: changed nnheader.el Steven Huwig: changed emacs.py progmodes/python.el -Steven L. Baur: wrote footnote.el gnus-setup.el +Steven L. Baur: wrote footnote.el and changed gnus-xmas.el gnus-msg.el add-log.el edebug.el gnus-ems.el gnus-start.el gnus-topic.el message.el nnbabyl.el nntp.el webjump.el Steven Suhr: changed dispnew.c scroll.c term.c termchar.h -Steven Tamm: changed macterm.c mac.c macfns.c configure.in mac-win.el - unexmacosx.c Makefile.in darwin.h editfns.c lread.c macmenu.c - scroll-bar.el config.h config.in dispnew.c eval.c fileio.c fns.c +Steven Tamm: changed macterm.c mac.c macfns.c configure.ac mac-win.el + unexmacosx.c darwin.h editfns.c lread.c macmenu.c scroll-bar.el + src/Makefile.in Makefile.in config.h dispnew.c eval.c fileio.c fns.c generic-x.el image.c process.c and 3 other files +Steve Nygard: changed unexnext.c + +Steve Purcell: changed nnimap.el nsterm.m package.el + +Steve Strassmann: wrote spook.el + +Steve Youngs: changed mh-utils.el mh-xemacs-compat.el mh-customize.el + mh-e.el mh-comp.el mh-mime.el Makefile dns.el gnus-art.el browse-url.el + gnus-sum.el gnus-xmas.el mh-search.el mh-seq.el password.el + run-at-time.el em-unix.el gmm-utils.el gnus-cite.el gnus-demon.el + gnus-ems.el and 17 other files + Stewart M. Clamen: co-wrote cal-mayan.el cc-align.el cc-cmds.el cc-defs.el cc-engine.el cc-langs.el cc-menus.el cc-mode.el cc-styles.el cc-vars.el @@ -3519,48 +4111,50 @@ Stuart D. Herring: changed desktop.el files.el isearch.el align.el allout.el comint.el edebug.el find-lisp.el keymap.c minibuf.c sregex.el timeclock.el widget.texi +Stuart Hickinbottom: changed org-clock.el + Sudish Joseph: changed mac-win.el +Suhail Shergill: changed ob-core.el ox-html.el + +Sundar Narasimhan: changed rnews.el + Sun Microsystems, Inc: wrote emacs.icon sun.el and changed emacsclient.c server.el Sun Yijiang: changed TUTORIAL.cn -Sundar Narasimhan: changed rnews.el +Suvayu Ali: changed org.texi org-inlinetask.el org-src.el org.el ox.el -Suvayu Ali: changed org.texi org-exp.el org-inlinetask.el org-src.el +Svend Tollak Munkejord: changed deuglify.el Sven Joachim: changed files.el de-refcard.tex dired-aux.el emacs.1 arc-mode.el dired-x.el em-cmpl.el em-hist.el em-ls.el esh-cmd.el esh-ext.el esh-io.el files.texi gnus-news.texi gnus-sum.el gnus.texi help.el make-dist message.el movemail.c mule.texi and 8 other files -Svend Tollak Munkejord: changed deuglify.el +Sylvain Chouleur: changed gnus-icalendar.el icalendar.el Syver Enstad: changed gud.el -Sébastien Delafond: changed org.el - -Sébastien Vauban: changed org.el org-agenda.el org-html.el org-latex.el - -T.V. Raman: changed completion.el files.el json.el mairix.el mspools.el - xml.c - Taichi Kawabata: wrote quail/indian.el ucs-normalize.el -and changed devanagari.el ind-util.el Makefile.in devan-util.el - language/indian.el characters.el fontset.el malayalam.el mlm-util.el - mule-conf.el tamil.el tml-util.el +and changed indian.el devanagari.el ind-util.el devan-util.el + language/indian.el characters.el fontset.el leim/Makefile.in + lisp/Makefile.in malayalam.el mlm-util.el mule-conf.el tamil.el + tml-util.el Takaaki Ota: wrote textmodes/table.el and changed appt.el dired.c etags.c ldap.el makefile.w32-in progmodes/compile.el recentf.el replace.el subr.el w32bdf.c +Takafumi Arakaki: changed url-expand.el url-http.el which-func.el + Takahashi Kaoru: changed texinfmt.el Takahashi Naoto: wrote ethio-util.el language/ethiopic.el latin-post.el quail/cyrillic.el quail/ethiopic.el robin.el and co-wrote latin-ltx.el quail.el -and changed fontset.el mule-conf.el +and changed ethiopic.el fontset.el mule-conf.el Takai Kousuke: changed ccl.el compface.el @@ -3571,27 +4165,31 @@ and changed arc-mode.el Tassilo Horn: wrote doc-view.el and co-wrote org-gnus.el -and changed subword.el image-mode.el Makefile.in cc-cmds.el emacsbug.el - gnus-art.el gnus.texi nnimap.el files.el gnus-sum.el info.el - org-footnote.el org.el reftex-ref.el saveplace.el simple.el - tsdh-dark-theme.el tsdh-light-theme.el ack.texi artist.el bindings.el - and 26 other files +and changed reftex-vars.el gnus.texi gnus-sum.el tsdh-dark-theme.el + misc.texi reftex.el subword.el tsdh-light-theme.el image-mode.el + cc-cmds.el display.texi em-term.el emacsbug.el files.el gnus-art.el + nnimap.el reftex-cite.el reftex-ref.el buffers.texi control.texi + help.texi and 63 other files Tatsuya Ichikawa: changed gnus-agent.el gnus-cache.el Ted Lemon: changed emacs.c lastfile.c puresize.h -Ted Phelps: changed mh-search.el mh-tool-bar.el +Ted Phelps: changed mh-search.el mh-e.el mh-folder.el mh-junk.el + mh-scan.el mh-tool-bar.el shr.el -Teemu Likonen: changed dired.el gnus-agent.el message.el +Ted Wiles: changed org-habit.el + +Teemu Likonen: changed dired.el erc-backend.el gnus-agent.el indent.el + message.el Teodor Zlatanov: wrote auth-source.el gnus-registry.el gnus-sync.el gnus-tests.el gnutls.el registry.el spam-report.el url-future-tests.el - url-future.el -and changed spam.el gnus.el nnimap.el gnus.texi gnus-sum.el gnus-util.el - auth.texi netrc.el gnus-start.el gnutls.c message.el spam-stat.el - encrypt.el nnir.el nnmail.el imap.el mail-source.el nnmairix.el nntp.el - Makefile.in gnus-encrypt.el and 97 other files + url-future.el url-util-tests.el +and changed spam.el gnus.el nnimap.el gnus.texi gnus-sum.el gnutls.c + auth.texi cfengine.el gnus-util.el gnus-start.el netrc.el message.el + spam-stat.el encrypt.el gnutls.h nnir.el nnmail.el imap.el + mail-source.el nnmairix.el nntp.el and 110 other files Terje Rosten: changed xfns.c version.el xterm.c xterm.h @@ -3601,42 +4199,54 @@ Terry Jones: wrote shadow.el Tetsuo Tsukamoto: changed nnrss.el -Tetsurou Okazaki: changed Makefile.in byte-opt.el log-edit.el lread.c - xterm.c +Tetsurou Okazaki: changed Makefile.in byte-opt.el lib-src/Makefile.in + log-edit.el lread.c xterm.c + +T.F. Torrey: changed org-rmail.el ox.el Thamer Mahmoud: changed arabic.el Theodore Jump: changed makefile.nt makefile.def w32-win.el w32faces.c Thien-Thi Nguyen: co-wrote hideshow.el -and changed ewoc.el vc.el info.el zone.el Makefile.in processes.texi - lisp-mode.el text.texi vc-rcs.el display.texi fileio.c files.el - scheme.el vc-git.el MORE.STUFF TUTORIAL.it bindat.el cc-vars.el - configure.in dcl-mode.el diff-mode.el and 158 other files +and changed ewoc.el vc.el info.el zone.el processes.texi lisp-mode.el + scheme.el text.texi vc-rcs.el display.texi fileio.c files.el vc-git.el + MORE.STUFF TUTORIAL.it bindat.el cc-vars.el configure.ac dcl-mode.el + diff-mode.el dired.el and 159 other files + +Thierry Banel: changed calc-arith.el Thierry Emery: changed kinsoku.el timezone.el url-http.el wid-edit.el Thierry Volpiatto: changed bookmark.el files.el dired-aux.el - eshell/eshell.el gnus-sum.el files.texi image-mode.el info.el man.el - woman.el dired.el doc-view.el find-func.el gnus-art.el gnus-msg.el - image-dired.el tramp.el vc-rcs.el + eshell/eshell.el gnus-sum.el net-utils.el package.el tramp.el eldoc.el + files.texi image-mode.el info.el man.el woman.el avoid.el dired.el + doc-view.el find-func.el font-lock.el gnus-art.el gnus-msg.el + and 6 other files + +Thomas Bach: changed wisent/python.el Thomas Baumann: wrote org-mhe.el and co-wrote org-bbdb.el Thomas Bellman: co-wrote avl-tree.el -Thomas Deweese: changed x-win.el +Thomas DeWeese: changed x-win.el Thomas Dorner: changed ange-ftp.el Thomas Dye: changed org.texi org-bibtex.el ob-R.el org.el +Thomas Fitzsimmons: changed ldap.el eudc-vars.el eudc.el eudcb-ldap.el + eudc.texi ntlm.el + Thomas Horsley: changed cxux-crt0.s cxux.h cxux7.h emacs.c nh3000.h nh4000.h simple.el sysdep.c xterm.c Thomas Hühn: changed tutorial.el +Thomas Kappler: changed nsfont.m + Thomas Link: wrote filesets.el Thomas Morgan: changed org-habit.el forms.el select.el @@ -3663,20 +4273,28 @@ Tibor Šimko: co-wrote language/slovak.el quail/slovak.el Tijs van Bakel: changed erc.el +Tim Burt: changed org-datetree.el + Tim Cross: changed keymaps.texi Tim Harper: changed ns-win.el -Tim Landscheidt: changed gnus.texi icalendar.el sort.el ws-mode.el +Tim Howe: changed org-clock.el -Tim Van Holder: changed emacsclient.c Makefile.in configure.in - progmodes/compile.el which-func.el +Tim Landscheidt: changed gnus.texi icalendar.el sort.el ws-mode.el Timo Juhani Lindfors: changed gnus-msg.el +Timo Lilja: changed mail-source.el + +Timo Myyrä: changed battery.el + Timo Savola: changed emacs.c gtkutil.c startup.el x-win.el xfns.c xterm.c xterm.h +Tim Van Holder: changed emacsclient.c Makefile.in configure.ac + progmodes/compile.el which-func.el + Tobias C. Rittweiler: changed font-lock.el searching.texi sendmail.el Tobias Ringström: changed etags.c @@ -3684,32 +4302,24 @@ Tobias Ringström: changed etags.c Toby Allsopp: changed ldap.el eudc.el Toby Cubitt: co-wrote avl-tree.el - -Toby S. Cubitt: changed org.el +and changed org-capture.el org.el org-agenda.el org-clock.el + org-colview.el org.texi Toby Speight: changed generic-x.el window.el -Tokuya Kameshima: wrote org-mew.el -and co-wrote org-wl.el - -Tom Breton: changed autoinsert.el cus-edit.el gnus-agent.el lread.c +Toke Høiland-Jørgensen: changed gnutls.c nnmaildir.el smime.el -Tom Hageman: changed etags.c +Tokuya Kameshima: changed org-mew.el org-agenda.el -Tom Houlder: wrote mantemp.el +Tomas Abrahamsson: wrote artist.el -Tom Perrine: co-wrote modula2.el (public domain) +Tomasz Gajewski: changed cpp-root.el -Tom Rauchenwald: changed spam.el +Tom Breton: changed autoinsert.el cus-edit.el gnus-agent.el lread.c -Tom Tromey: wrote bug-reference.el erc-list.el package-x.el package.el -and co-wrote tcl.el -and changed buffer.c lisp.h makefile.el window.c xfns.c callint.c cmds.c - configure.in frame.c keyboard.c keymap.c xdisp.c buffer.h bytecode.c - callproc.c category.c character.c character.h charset.c coding.c - composite.c and 133 other files +Tom Hageman: changed etags.c -Tomas Abrahamsson: wrote artist.el +Tom Houlder: wrote mantemp.el Tommi Vainikainen: changed gnus-sum.el message.el mml-sec.el @@ -3720,33 +4330,55 @@ and changed rmail.el nnmail.el rmailout.el gnus-sum.el nnfolder.el gnus-ems.el gnus-mule.el message.el nnspool.el nntp.el rmailkwd.el smiley.el +Tomohiro Matsuyama: wrote profiler.el +and changed profiler.c alloc.c emacs.c eval.c lisp.h src/Makefile.in + src/makefile.w32-in xdisp.c + Tomoji Kagatani: wrote smtpmail.el +Tom Perrine: co-wrote modula2.el (public domain) + +Tom Rauchenwald: changed spam.el + +Tom Regner: changed notifications.el + +Tom Seddon: changed w32font.c + +Tom Tromey: wrote bug-reference.el erc-list.el package-x.el +and co-wrote package.el tcl.el +and changed buffer.c lisp.h makefile.el window.c keyboard.c keymap.c + xfns.c buffer.h bytecode.c callint.c callproc.c cmds.c composite.c + configure.ac dispextern.h doc.c editfns.c fileio.c frame.c insdel.c + intervals.h and 137 other files + +Tom Willemse: changed package.el prog-mode.el progmodes/python.el + simple.el + Torbjörn Axelsson: changed options.el Torbjörn Einarsson: wrote progmodes/f90.el and changed f90.el -Torsten Anders: changed org-beamer.el +Torsten Anders: changed ox-beamer.el Torsten Bronger: changed latin-ltx.el Toru Tomabechi: wrote language/tibetan.el quail/tibetan.el tibet-util.el Toru Tsuneyoshi: changed ange-ftp.el buff-menu.el cus-start.el fileio.c - files.el lisp.h tramp.el w32fns.c + files.el fill.el lisp.h tramp.el w32fns.c Toshiaki Nomura: changed uxpds.h -Travis Jeffery: changed Info.plist - Trent W. Buck: changed rcirc.el remember.el rx.el +Trevor Murphy: changed gnus.texi nnimap.el org.el + Trey Jackson: changed spam-stat.el Triet Hoai Lai: changed vntelex.el viet-util.el vietnamese.el -Troels Nielsen: changed process.c +Troels Nielsen: changed process.c buffer.c progmodes/compile.el window.el Trung Tran-Duc: changed nntp.el @@ -3755,65 +4387,72 @@ Tsuchiya Masatoshi: changed gnus-art.el mm-view.el gnus-sum.el gnus-cache.el gnus-msg.el gnus.el nndiary.el nnfolder.el nnimap.el nnmaildir.el pgg.el rfc2047.el -Tsugutomo Enami: changed frame.c keyboard.c configure.in dispnew.c +Tsugutomo Enami: changed frame.c keyboard.c configure.ac dispnew.c fileio.c process.c simple.el sysdep.c xdisp.c add-log.el bytecomp.el - editfns.c emacs.c frame.h gnus-group.el netbsd.h nnheader.el - perl-mode.el regex.c regex.h rmailsum.el and 4 other files + editfns.c emacs.c frame.h gnus-group.el netbsd.h nnheader.el nnimap.el + perl-mode.el regex.c regex.h and 6 other files Tsuyoshi Akiho: changed gnus-sum.el nnrss.el Tudor Hulubei: changed iso-acc.el latin-pre.el +T.V. Raman: changed completion.el files.el json.el mairix.el mspools.el + xml.c + Uday S Reddy: changed etags.el fill.el Ulf Jasper: wrote bubbles.el icalendar-tests.el icalendar.el - newst-backend.el newst-plainview.el newst-reader.el newst-ticker.el - newst-treeview.el newsticker-tests.el newsticker.el -and changed icalendar-testsuite.el calendar.texi newsticker-plainview.el - newsticker-treeview.el newsticker.texi newsticker-backend.el - newsticker-reader.el newsticker-ticker.el Makefile.in README + libxml-tests.el newst-backend.el newst-plainview.el newst-reader.el + newst-ticker.el newst-treeview.el newsticker-tests.el newsticker.el +and changed newsticker.texi calendar.texi image.c newsticker-plainview.el + newsticker-treeview.el README newsticker-backend.el + newsticker-reader.el newsticker-ticker.el xml.c Makefile.in browse-url.xpm get-all.xpm mark-immortal.xpm mark-read.xpm narrow.xpm - newsticker newsticker-testsuite.el next-feed.xpm next-item.xpm - prev-feed.xpm prev-item.xpm and 3 other files + newsticker next-feed.xpm next-item.xpm prev-feed.xpm prev-item.xpm + and 8 other files Ulf Stegemann: co-wrote org-entities.el and changed org-gnus.el smime.el Ulrich Leodolter: changed w32proc.c -Ulrich Mueller: changed configure.in Makefile.in doctor.el files.el - gud.el server.el ChgPane.c ChgSel.c HELLO INSTALL XMakeAssoc.c - authors.el bytecomp.el calc-units.el case-table.el configure em-ls.el - emacs.1 emacs.c emacs.desktop emacsclient.c and 26 other files +Ulrich Müller: changed configure.ac lib-src/Makefile.in src/Makefile.in + version.el doctor.el emacs.1 files.el gamegrid.el gud.el server.el + ChgPane.c ChgSel.c HELLO INSTALL Makefile.in XMakeAssoc.c authors.el + bytecomp.el calc-units.el case-table.el configure and 39 other files Ulrich Neumerkel: changed xterm.c Ulrik Vieth: wrote meta-mode.el and changed files.el +Uwe Brauer: changed mml-smime.el + Vadim Nasardinov: changed allout.el Vagn Johansen: changed gnus-cache.el vc-svn.el Valentin Wüstholz: changed org.el -Valery Alexeev: changed cyril-util.el quail/cyrillic.el +Valery Alexeev: changed cyril-util.el cyrillic.el -Vasily Korytov: changed message.el quail/cyrillic.el cperl-mode.el - gnus-art.el gnus-dired.el gnus-msg.el gnus-util.el mail-source.el - smiley.el +Vasily Korytov: changed cyrillic.el message.el cperl-mode.el gnus-art.el + gnus-dired.el gnus-msg.el gnus-util.el mail-source.el smiley.el -Victor Zandy: wrote zone.el +Vegard Øye: changed viper-init.el -Vida Gábor: changed gnus-demon.el +Victor Zandy: wrote zone.el -Viktor Rosenfeld: changed ob-sql.el +Viktor Rosenfeld: changed ob-sql.el org.el Ville Skyttä: changed mh-comp.el pgg.el tcl.el Vincent Belaïche: changed ses.el 5x5.el calc-alg.el calc-vec.el calc.texi - calc-embed.el calc-help.el calc-misc.el calc.el floatfns.c org.el - recentf.el + ses.texi calc-embed.el calc-help.el calc-misc.el calc.el configure.bat + floatfns.c macroexp.el org.el package.el recentf.el reftex-parse.el + reftex-toc.el reftex.el + +Vincent Bernat: changed gnus-int.el nnimap.el Vincent Del Vecchio: changed info.el mh-utils.el @@ -3824,64 +4463,76 @@ and co-wrote ps-def.el ps-mule.el ps-print.el ps-samp.el and changed ps-prin1.ps ps-bdf.el ps-prin0.ps blank-mode.el ps-prin3.ps ps-prin2.ps lpr.el subr.el diff-mode.el TUTORIAL.pt_BR compilation.txt easymenu.el loading.texi menu-bar.el misc.texi progmodes/compile.el - ps-print-def.el ps-print.ps ps-vars.el + ps-print-def.el ps-vars.el -Vitalie Spinu: changed ob-R.el +Vitalie Spinu: changed comint.el message.el ob-R.el ob-core.el + ob-tangle.el subr.el Vivek Dasmohapatra: wrote hfy-cmap.el htmlfontify.el -and changed erc.el erc-backend.el emacs.c erc-join.el erc-services.el - sh-script.el xterm.c xterm.h +and changed erc.el erc-backend.el erc-services.el hexl.el emacs.c + erc-join.el htmlfontify.texi sh-script.el xterm.c xterm.h Vladimir Alexiev: changed arc-mode.el nnvirtual.el tmm.el +Vladimir Kazanov: changed java.srt + +Vladimir Lomov: changed ox-html.el + Vladimir Volovich: changed smime.el Volker Sobek: changed programs.texi -W. Martin Borgert: changed files.el schemas.xml - Walter C. Pelissero: changed browse-url.el url-methods.el Wang Diancheng: changed gdb-mi.el nnml.el +Wei-Wei Guo: co-wrote rst.el + Werner Benger: changed keyboard.c Werner Lemberg: wrote sisheng.el vntelex.el -and changed Makefile.in TUTORIAL.de calc.texi chinese.el emacs.1 - european.el idlwave.el language/czech.el language/slovak.el +and co-wrote vnvni.el +and changed TUTORIAL.de calc.texi chinese.el emacs.1 european.el + idlwave.el language/czech.el language/slovak.el lispref/Makefile.in reftex-vars.el reftex.el reftex.texi supercite.el advice.el calc-forms.el calc-sel.el calendar.el china-util.el cl-macs.el cl.texi - complete.el and 50 other files + complete.el and 53 other files Werner Meisner: changed lwlib-Xm.c Wes Hardaker: changed gnus-score.el gnus-art.el gnus-sum.el gnus-win.el spam.el +Wesley Dawson: changed icomplete.el + Wilfred Hughes: changed vc-git.el Will Glozer: changed macterm.c -Will Mengarini: wrote repeat.el - William F. Schelter: wrote telnet.el William M. Perry: wrote url-dav.el url-gw.el url-http.el url-util.el url.el vc-dav.el and co-wrote mailcap.el socks.el and changed url-handlers.el url-file.el url-methods.el url-vars.el - url-https.el aclocal.m4 mule-sysdp.el url-imap.el url-news.el - url-nfs.el image.el mwheel.el url-about.el url-auth.el url-cid.el - url-dired.el url-expand.el url-ftp.el url-history.el url-irc.el - url-misc.el and 5 other files + url-https.el url-imap.el url-news.el url-nfs.el image.el mwheel.el + url-about.el url-auth.el url-cid.el url-dired.el url-expand.el + url-ftp.el url-history.el url-irc.el url-misc.el url-parse.el + url-privacy.el and 3 other files + +William Parsons: changed ange-ftp.el William Smith: changed strftime.c William Sommerfeld: wrote emacsclient.c scribe.el server.el William Stevenson: wrote adwaita-theme.el +and changed artist.el -William Xu: changed nsterm.m outline.el webjump.el +William Xu: changed arc-mode.el gcc.el hideif.el nsterm.m outline.el + url.el webjump.el + +Will Mengarini: wrote repeat.el Wilson H. Tien: changed unexelf.c @@ -3891,20 +4542,25 @@ and changed files.el Wim Nieuwenhuizen: changed TUTORIAL.nl Wlodzimierz Bzyl: co-wrote ogonek.el -and changed latin-pre.el pl-refcard.ps pl-refcard.tex refcard-pl.ps - refcard-pl.tex survival.tex +and changed latin-pre.el pl-refcard.tex survival.tex + +W. Martin Borgert: changed files.el schemas.xml Wolfgang Glas: changed unexsgi.c -Wolfgang Jenkner: changed conf-mode.el gnus-agent.el gnus-sum.el lread.c - network-stream.el pcvs.el pop3.el +Wolfgang Jenkner: wrote man-tests.el +and changed gnus-agent.el image-mode.el man.el network-stream.el + ansi-color.el gnus-spec.el gnus-sum.el gnus-util.el + automated/Makefile.in calc-tests.el calc-units.el conf-mode.el + functions.texi gnus-group.el gnus-picon.el gnus-salt.el gnus-start.el + gnus.texi intro.texi lread.c nntp.el and 7 other files Wolfgang Lux: changed nsterm.m keyboard.c Wolfgang Rupprecht: wrote float-sup.el floatfns.c sup-mouse.el -and changed config.in process.c alloc.c callint.c configure.in data.c - ecrt0.c fns.c lisp-mode.el lisp.h loadup.el lread.c net-utils.el - nntp.el print.c sort.el +and changed process.c alloc.c callint.c configure.ac data.c fns.c + lisp-mode.el lisp.h loadup.el lread.c net-utils.el nntp.el print.c + sort.el Wolfgang Scherer: changed vc-cvs.el @@ -3914,66 +4570,91 @@ Wolfram Fenske: changed nnimap.el Wolfram Gloger: changed emacs.c +W. Trevor King: changed xterm.el + Xavier Maillard: changed gnus-faq.texi gnus-score.el mh-utils.el spam.el +Xue Fuqiao: changed display.texi maintaining.texi files.texi + nonascii.texi text.texi windows.texi os.texi vc-cvs.el vc-dir.el + emacs.texi ido.texi vc-git.el vc-hg.el vc-hooks.el vc-svn.el vc.el + vc/vc-bzr.el INSTALL cl.texi emacs-lisp-intro.texi frames.texi + and 91 other files + Yagi Tatsuya: changed gnus-art.el gnus-start.el -Yair F: changed quail/hebrew.el +Yair F: changed hebrew.el -Yamamoto Mitsuharu: changed macterm.c macfns.c mac-win.el mac.c macterm.h - macmenu.c macgui.h image.c xdisp.c macselect.c keyboard.c xterm.c - Makefile.in emacs.c darwin.h dispnew.c unexmacosx.c w32term.c alloc.c - dispextern.h configure.in and 88 other files +Yamamoto Mitsuharu: wrote uvs.el +and changed macterm.c macfns.c mac-win.el mac.c macterm.h macmenu.c + macgui.h image.c xdisp.c xterm.c macselect.c keyboard.c w32term.c + src/Makefile.in unexmacosx.c emacs.c darwin.h dispnew.c configure.ac + dispextern.h alloc.c and 89 other files Yann Dirson: changed imenu.el -Yann Hodique: changed rcirc.el +Yann Hodique: changed ox-publish.el package.el rcirc.el + +Yasushi Shoji: changed org-clock.el org.texi ox-ascii.el + +Yavor Doganov: changed configure.ac Makefile.in emacs.1 etags.1 make-dist + nsfont.m -Yavor Doganov: changed configure.in Info-gnustep.plist Makefile.in - emacs.1 etags.1 make-dist nsfont.m +Ye Qianchuan: changed descr-text.el Yoichi Nakayama: changed browse-url.el finder.el man.el rfc2368.el Yong Lu: changed charset.c coding.c language/greek.el Yoni Rabkin: changed faces.el net-utils.el artist.el bs.el cmacexp.el - ediff.el files.el hilit19.el ps-mode.el simula.el vera-mode.el + ediff.el eww.el files.el hilit19.el ps-mode.el simula.el vera-mode.el verilog-mode.el vhdl-mode.el viper.el whitespace.el Yoshiaki Kasahara: changed buffer.c term.c Yoshiki Hayashi: changed texinfmt.el nnheader.el +Yoshinari Nomura: changed ox-html.el ox.el + Yoshinori Koseki: wrote iimage.el and changed fontset.el message.el nnheader.el nnmail.el -Yu-Ji Hosokawa: changed README.W32 - Yuanle Song: changed rng-xsd.el +Yu-ji Hosokawa: changed README.W32 + Yukihiro Matsumoto: co-wrote ruby-mode.el Yuri Karaban: changed pop3.el Yuri Shtil: changed etags.c -Yutaka Niibe: changed indent.c xdisp.c configure.in Makefile.in dispnew.c - sysdep.c config.in dired.el emacs.c fill.el fns.c gmalloc.c gnu-linux.h - indent.h process.c simple.el term.c window.c +Yuriy Vostrikov: changed vc-git.el + +Yutaka Niibe: changed indent.c xdisp.c configure.ac dispnew.c sysdep.c + Makefile.in dired.el emacs.c fill.el fns.c gmalloc.c gnu-linux.h + indent.h process.c simple.el src/Makefile.in term.c window.c -Zachary Kanfer: changed cus-edit.el keyboard.c +Yuya Nishihara: changed vc-hooks.el + +Yves Baumes: changed package.el + +Zachary Kanfer: changed org.el cus-edit.el keyboard.c Zhang Wei: changed chinese.el characters.el mule-cmds.el xfns.c erc.el - faces.el fontset.el makefile.w32-in mm-util.el mule.el org-publish.el - rfc2047.el x-win.el + faces.el fontset.el lib-src/makefile.w32-in mm-util.el mule.el + org-publish.el rfc2047.el x-win.el Zhang Weize: wrote ob-plantuml.el +Zhongwei Yao: changed tramp-adb.el + Zoltan Kemenczy: changed gud.el Zoran Milojevic: changed avoid.el -Йордан Миладинов: changed quail/cyrillic.el +Дядов Васил Стоянов: changed org-docview.el + +Йордан Миладинов: changed cyrillic.el Local Variables: coding: utf-8 diff --git a/etc/ChangeLog b/etc/ChangeLog index 8bc1afbef5..f0da3a57d3 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,40 @@ +2015-03-25 Stefan Monnier + + * TODO: Remove obsolete entries. + +2015-03-24 Daniel Colascione + + * NEWS: Mention change to `process-running-child-p`. + +2015-03-23 Daiki Ueno + + * NEWS: Mention `make-process'. + +2015-03-21 Titus von der Malsburg + + * NEWS: Mention `default-font-width', `window-font-height', + `window-font-width', and `window-max-chars-per-line'. + +2015-03-03 Kelvin White + + * NEWS.24: Add section to include ERC changes. + +2015-03-02 Daniel Colascione + + * NEWS: Mention finalizers. + +2015-02-09 Gareth Rees (tiny change) + + * NEWS.24: Fix typo (bug#19820) + +2015-02-08 Artur Malabarba + + * NEWS: Document `comment-line'. + +2015-02-03 Artur Malabarba + + * NEWS: Document package.el's improved dependency-handling. + 2015-01-29 Francesc Rocher * images/splash.svg, images/splash.png: diff --git a/etc/GNUS-NEWS b/etc/GNUS-NEWS index 4f311e3d9b..ee3584fdb8 100644 --- a/etc/GNUS-NEWS +++ b/etc/GNUS-NEWS @@ -9,6 +9,8 @@ For older news, see Gnus info node "New Features". * New features +** nnimap can request and use the Gmail "X-GM-LABELS". + ** New package `gnus-notifications.el' can send notifications when you receive new messages. diff --git a/etc/NEWS b/etc/NEWS index 4371a01ec7..6de8f030d9 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -53,7 +53,7 @@ build with 'make V=1'. group instead of a user if its argument is prefixed by ':' (a colon). This will cause the game score files in ${localstatedir}/games/emacs to be owned by that group, and the helper program for updating them to -be installed setgid. +be installed setgid. The option now defaults to the 'games' group. --- ** The `grep-changelog' script (and its manual page) are no longer included. @@ -65,12 +65,8 @@ so if you want to use it, you can always take a copy from an older Emacs. * Changes in Emacs 25.1 -** Xwidgets : A new feature for embedding native widgets -inside Emacs buffers. If you have gtk3 and webkit-devel installed, -you can try the embedded webkit browser with m-x xwidget-webkit-browse-url. -** `package-install-from-buffer' and `package-install-file' work on directories. -This follows the same rules as installing from a .tar file, except the --pkg file is optional. + +** New command `comment-line' bound to `C-x C-;'. ** New function `custom-prompt-customize-unsaved-options' checks for unsaved customizations and prompts user to customize (if found). @@ -177,6 +173,24 @@ possible inaccuracies in the end position. In particular, it now returns the average width of the font's characters, which can be used for geometry-related calculations. +** A new function `default-font-width' returns the average width of a +character in the current buffer's default font. If the default face +is remapped (see `face-remapping-alist'), the value for the remapped +face is returned. This function complements the existing function +`default-font-height'. + +** New functions `window-font-height' and `window-font-width' return +the height and average width of characters in a specified face and +window. If FACE is remapped (see `face-remapping-alist'), the +function returns the information for the remapped face. + +** A new function `window-max-chars-per-line' returns the maximal +number of characters that can be displayed on one line. If a face +and/or window are provided, these values are used for the +calculation. This function is different from `window-body-width' in +that it accounts for (i) continuation glyphs, (ii) the size of the +font, and (iii) the specified window. + * Editing Changes in Emacs 25.1 @@ -201,8 +215,31 @@ Unicode standards. ** You can access `mouse-buffer-menu' (C-down-mouse-1) using C-f10. ++++ +** New buffer-local `electric-pair-local-mode'. + * Changes in Specialized Modes and Packages in Emacs 25.1 +** xterm-mouse-mode now supports mouse-tracking (if your xterm supports it). + +** package.el +*** `package-install-from-buffer' and `package-install-file' work on directories. +This follows the same rules as installing from a .tar file, except the +-pkg file is optional. + +*** Packages which are dependencies of other packages cannot be deleted. +The FORCE argument to `package-delete' overrides this. + +*** New custom variable `package-selected-packages' tracks packages +which were installed by the user (as opposed to installed as +dependencies). This variable can also be manually customized. + +*** New command `package-install-user-selected-packages' installs all +packages from `package-selected-packages' which are currently missing. + +*** New command `package-autoremove' removes all packages which were +installed strictly as dependencies but are no longer needed. + ** Shell When you invoke `shell' interactively, the *shell* buffer will now @@ -221,6 +258,7 @@ If you need your objects to be named, do it by inheriting from `eieio-named'. *** The variables are declared obsolete. *** The variables are declared obsolete. *** defgeneric and defmethod are declared obsolete. +*** `constructor' is now an obsolete alias for `make-instance'. ** ido *** New command `ido-bury-buffer-at-head' bound to C-S-b @@ -261,6 +299,14 @@ useful when, for example, one needs to distinguish various spaces (e.g. ] [, ** eww +--- +*** HTML can now be rendered using variable-width fonts. + ++++ +*** A new command `F' (`eww-toggle-fonts') can be used to toggle +whether to use variable-pitch fonts or not. The user can also +customize the `shr-use-fonts' variable. + +++ *** A new command `R' (`eww-readable') will try do identify the main textual parts of a web page and display only that, leaving menus and @@ -305,7 +351,7 @@ invalid certificates are marked in red. transformed into multipart/related messages before sending. ** pcase -*** New UPatterns `quote' and `app'. +*** New UPatterns `quote', `app', `cl-struct', and `eieio'. *** New UPatterns can be defined with `pcase-defmacro'. +++ *** New vector QPattern. @@ -366,6 +412,8 @@ The remainder were: ** New ERT function `ert-summarize-tests-batch-and-exit'. +** New js.el option `js-indent-first-init'. + --- ** `Info-fontify-maximum-menu-size' can be t for no limit. @@ -444,6 +492,8 @@ allows to customize this. *** Two new faces `compare-windows-removed' and `compare-windows-added' replace the obsolete face `compare-windows'. +** VHDL mode supports VHDL'08. + ** Calculator: decimal display mode uses "," groups, so it's more fitting for use in money calculations; factorial works with non-integer inputs. @@ -529,10 +579,24 @@ to avoid interfering with the kill ring. allow overriding the regular expression that recognizes the ldapsearch command line's password prompt. +** Eshell + +*** The new built-in command `clear' can scroll window contents out of sight. + +** Browse-url + +*** Support for the Conkeror web browser. + +--- +*** Support for several ancient browsers is now officially obsolete. + +++ ** tar-mode: new `tar-new-entry' command, allowing for new members to be added to the archive. +** Autorevert: dired buffers are also auto-reverted via file +notifications, if Emacs is compiled with file notification support. + ** Obsolete packages --- @@ -556,6 +620,10 @@ a typographically-correct documents. * Incompatible Lisp Changes in Emacs 25.1 +** `save-excursion' does not save&restore the mark any more. + +** read-buffer-function can now be called with a 4th argument (`predicate'). + ** completion-table-dynamic stays in the minibuffer. If you want the old behavior of calling the function in the buffer from which the minibuffer was entered, call it with the new argument @@ -570,6 +638,9 @@ active region handling. ** `cl-the' now asserts that its argument is of the given type. +** `process-running-child-p` may now return a numeric process +group ID instead of `t'. + +++ ** Mouse click events on mode line or header line no longer include any reference to a buffer position. The 6th member of the mouse @@ -584,9 +655,31 @@ when signaling a file error. For example, it now reports "Permission denied" instead of "permission denied". The old behavior was problematic in languages like German where downcasing rules depend on grammar. ++++ +** The character classes [:alpha:] and [:alnum:] in regular expressions +now match multibyte characters using Unicode character properties. +If you want the old behavior where they matched any character with +word syntax, use `\sw' instead. + * Lisp Changes in Emacs 25.1 +** New function `make-process' provides an alternative interface to +`start-process'. It allows programs to set process parameters such as +process filter, sentinel, etc., through keyword arguments (similar to +`make-network-process'). + +** `read-buffer' takes a new `predicate' argument. + +** Emacs Lisp now supports generators. + +** New finalizer facility for running code when objects + become unreachable. + +** lexical closures can use (:documentation
) to build their docstring. +It should be placed right where the docstring would be, and is then +evaluated (and should return a string) when the closure is built. + ** define-inline provides a new way to define inlinable functions. ** New function macroexpand-1 to perform a single step of macroexpansion. @@ -724,6 +817,9 @@ Those features have been deprecated in Gtk+ for a long time. or Windows Server 2003. The built binaries still run on all versions of Windows starting with Windows 9X. ++++ +** Emacs running on MS-Windows now supports the daemon mode. + ** OS X 10.5 or older is no longer supported. ** OS X on PowerPC is no longer supported. diff --git a/etc/NEWS.24 b/etc/NEWS.24 index ae0d402a3d..7d9e1f0d83 100644 --- a/etc/NEWS.24 +++ b/etc/NEWS.24 @@ -14,41 +14,45 @@ and NEWS.1-17 for changes in older Emacs versions. You can narrow news to a specific version by calling `view-emacs-news' with a prefix argument or by typing C-u C-h C-n. -Temporary note: -+++ indicates that all necessary documentation updates are complete. - (This means all relevant manuals in doc/ AND lisp doc-strings.) ---- means no change in the manuals is needed. -When you add a new item, use the appropriate mark if you are sure it applies, -otherwise leave it unmarked. - * Changes in Emacs 24.5 ---- +** This is mainly a bug-fix release, but there are some other changes. + ** The default value of `history-length' has increased to 100. -+++ -** `redisplay-dont-pause' is declared as obsolete. +** The variable `redisplay-dont-pause' is obsolete. * Changes in Specialized Modes and Packages in Emacs 24.5 -** `call-process-shell-command' and `process-file-shell-command' -don't take "&rest args" any more. +** `call-process-shell-command' and `process-file-shell-command' no longer +take "&rest args". + +** The option `browse-url-firefox-startup-arguments' no longer has an effect. + +** ERC + +*** New option `erc-rename-buffers'. + +*** New faces `erc-my-nick-prefix-face' and `erc-nick-prefix-face'. + +*** `erc-format-@nick' displays all user modes instead of only op and voice. + +*** The display of irc commands in the current buffer has been disabled. + +*** `erc-version' now follows the Emacs version. ** Obsolete packages *** cc-compat.el ---- -*** crisp.el - moved to elpa.gnu.org. +*** crisp.el (moved to elpa.gnu.org) ---- *** tpu-edt.el, ws-mode.el These emulations of old editors are believed to be no longer relevant - contact emacs-devel@gnu.org if you disagree. ---- *** vi.el, vip.el (try M-x viper instead) @@ -3555,7 +3559,7 @@ frame or window as an Elisp object. *** New variable `completion-extra-properties' used to specify extra properties of the current completion: -- :annotate-function, same as the old completion-annotate-function. +- :annotation-function, same as the old completion-annotate-function. - :exit-function, function to call after completion took place. *** Functions on `completion-at-point-functions' can return any of the diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 2ab85b3f2b..87d3ec8370 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1,7 +1,6 @@ Known Problems with GNU Emacs -Copyright (C) 1987-1989, 1993-1999, 2001-2015 Free Software Foundation, -Inc. +Copyright (C) 1987-1989, 1993-1999, 2001-2015 Free Software Foundation, Inc. See the end of the file for license conditions. @@ -458,6 +457,29 @@ problem by adding this to your .cshrc file: endif endif +*** Emacs startup on GNU/Linux systems (and possibly other systems) is slow. + +This can happen if the system is misconfigured and Emacs can't get the +full qualified domain name, FQDN. You should have your FQDN in the +/etc/hosts file, something like this: + +127.0.0.1 localhost +129.187.137.82 nuc04.t30.physik.tu-muenchen.de nuc04 + +The way to set this up may vary on non-GNU systems. + +*** Visiting files in some auto-mounted directories causes Emacs to print +`Error reading dir-locals: (file-error "Read error" "is a directory" ...' + +This can happen if the auto-mounter mistakenly reports that +.dir-locals.el exists and is a directory. There is nothing Emacs can +do about this, but you can avoid the issue by adding a suitable entry +to the variable `locate-dominating-stop-dir-regexp'. For example, if +the problem relates to "/smb/.dir-locals.el", set that variable +to a new value where you replace "net\\|afs" with "net\\|afs\\|smb". +(The default value already matches common auto-mount prefixes.) +See http://lists.gnu.org/archive/html/help-gnu-emacs/2015-02/msg00461.html . + *** Attempting to visit remote files via ange-ftp fails. If the error message is "ange-ftp-file-modtime: Specified time is not diff --git a/etc/TODO b/etc/TODO index 68a3792993..2235431c60 100644 --- a/etc/TODO +++ b/etc/TODO @@ -102,6 +102,21 @@ make it. "FOO-tab -> ?\FOO-\t", "uppercase -> lowercase", "[fringe KEY...] -> [KEY]", "H-FOO -> M-FOO", "C-x C-y FOO -> H-FOO", ... +* Things related to elpa.gnu.org. + +** Move idlwave to elpa.gnu.org. +Need to sync up the Emacs and external versions. +See + +** Move Org mode to elpa.gnu.org. +See + + +** Move verilog-mode to elpa.gnu.org. +See + +** Move vhdl-mode to elpa.gnu.org. +See * Simple tasks. These don't require much Emacs knowledge, they are suitable for anyone from beginners to experts. @@ -401,9 +416,6 @@ http://lists.gnu.org/archive/html/emacs-devel/2009-04/msg00034.html ** Allow frames(terminals) created by emacsclient to inherit their environment from the emacsclient process. -** Remove the default toggling behavior of minor modes when called from elisp -rather than interactively. This a trivial one-liner in easy-mode.el. - ** Give Tar mode all the features of Archive mode. ** Create a category of errors called `process-error' @@ -412,9 +424,6 @@ rather than interactively. This a trivial one-liner in easy-mode.el. ** Maybe reinterpret `parse-error' as a category of errors and put some other errors under it. -** A function to tell you the argument pattern of functions. - See `function-arity' in http://www.loveshack.ukfsn.org/emacs/fx-misc.el. - ** Make byte-compile warn when a doc string is too wide. ** Make byte-optimization warnings issue accurate line numbers. @@ -480,9 +489,6 @@ rather than interactively. This a trivial one-liner in easy-mode.el. ** Give start-process the ability to direct standard-error output to a different filter. -** Make desktop.el save the "frame configuration" of Emacs (in some - useful sense). - ** Give desktop.el a feature to switch between different named desktops. ** Add a cpio mode, more or less like tar mode. @@ -508,23 +514,10 @@ rather than interactively. This a trivial one-liner in easy-mode.el. Check the assignments file for other packages which might go in and have been missed. -** Make keymaps a first-class Lisp object (this means a rewrite of - keymap.c). What should it do apart from being opaque ? - multiple inheritance ? faster where-is ? no more fix_submap_inheritance ? - what else ? - -** Implement popular parts of the rest of the CL functions as compiler - macros in cl-macs. [Is this still relevant now that cl-lib exists?] - ** Make compiler warnings about functions that might be undefined at run time smarter, so that they know which files are required by the file being compiled and don't warn about functions defined in them. -** Highlight rectangles (`mouse-track-rectangle-p' in XEmacs). Already in CUA, - but it's a valuable feature worth making more general. - [Basic support added 2013/10: - http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00904.html ] - ** Split out parts of lisp.h. ** Update the FAQ. @@ -532,11 +525,6 @@ rather than interactively. This a trivial one-liner in easy-mode.el. ** Allow auto-compression-mode to use zlib calls if zlib is available. [It's required for PNG, so may be linked anyhow.] -** Add a --pristine startup flag which does -q --no-site-file plus - ignoring X resources (Doze equivalents?) and most of the - environment. What should not be ignored needs consideration. - [Do the existing -Q and -D cover this, or is more needed?] - ** Improve the GC (generational, incremental). (We may be able to use the Boehm collector.) [See the Boehm-GC branch in CVS for work on this.] @@ -563,20 +551,9 @@ rather than interactively. This a trivial one-liner in easy-mode.el. (Requires recursing through display properties). Provide some way to simulate mouse-clicks on marginal text without a mouse. -** Implement Lisp functions to determine properly whether a character - is displayable (particularly needed in XFree 4, sigh). Use it to - define useful glyphs that may be displayed as images or unicodes - (with ASCIIfied fallback via latin1-disp). Examples include - box-drawing graphics in Custom buffers, W3 rules and tables, and - tree displays generally, mode-line mail indicator. [See work done - already for Emacs 23 and consult fx.] - ** Extend ps-print to deal with multiple font sizes, images, and extra encodings. -** Make byte-compile avoid binding an expanded defsubst's args - when the body only calls primitives. - ** Use the XIE X extension, if available, for image display. ** Make monochrome images display using the foreground and background diff --git a/leim/ChangeLog b/leim/ChangeLog index 4bda9a6433..a8dbca2952 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,10 @@ +2015-02-23 Pete Williamson (tiny change) + + Use ${EXEEXT} more uniformly in makefiles + When porting Emacs to run on NaCl, we need to make sure that we always + call it with the proper extension (.nexe in this case) during the build. + * Makefile.in (EMACS): Append ${EXEEXT}. + 2015-01-04 Paul Eggert Less 'make' chatter for leim diff --git a/leim/Makefile.in b/leim/Makefile.in index 573acf7678..2ec03db49b 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in @@ -47,7 +47,7 @@ unexport EMACSDATA EMACSDOC EMACSPATH # Which Emacs to use to convert TIT files to Emacs Lisp files, # and generate the file leim-list.el. -EMACS = ../src/emacs +EMACS = ../src/emacs${EXEEXT} # How to run Emacs. # Prevent any setting of EMACSLOADPATH in user environment causing problems. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 8d2c95e671..0bb24c375e 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,76 @@ +2015-03-27 Paul Eggert + + Port etags to -DDEBUG + * etags.c (xnew, xrnew) [DEBUG]: Don't include chkmalloc.h, which + is not part of Emacs and is typically not installed. + Instead, just invoke xmalloc and xrealloc as usual. + Problem reported by Nicolas Richard in: + http://bugs.gnu.org/20191#20 + (xrnew): Avoid no-longer-needed cast to 'char *'. + (xrealloc): First arg is now void *, not char *. + +2015-03-06 Paul Eggert + + Random minor fixes for movemail + * movemail.c: Include and . + (waitpid) [WINDOWSNT]: New macro. + (wait) [WINDOWSNT]: Remove. + (main, popmail, pop_retr, mbx_write, mbx_delimit_begin) + (mbx_delimit_end): Use bool for boolean. + (main): Simplify #if usage a bit. + (main): Don't assume EOF == -1. Prefer 'return' to 'exit'. Don't + possibly unlink lockname twice, as that's a race condition. Set + SIGCHLD to SIG_DFL to work around SysV misfeature. Check for fork + failure. Use waitpid, not wait, to avoid a race condition in the + unlikely case where we start up with a child. + (NOTOK, OK): Remove, in favor of plain boolean. + (popmail, pop_retr): Don't get confused about errno, e.g., ferror + need not set errno. + (popmail): Use fclose (mbf), not close (fileno (mbf)), to also + detect any stream-related errors (e.g., memory exhaustion). + (pop_retr): Report pop errors separately, since caller now does + errno reporting. + (mbx_write, mbx_delimit_begin, mbx_delimit_end): Check < 0, not == + EOF, as it's a bit faster and (in theory) pickier. + +2015-02-27 Mark Laws + + Support daemon mode on MS-Windows (bug#19688) + * emacsclient.c (decode_options) [WINDOWSNT]: Don't reject empty + arguments for --alternate-editor. + (print_help_and_exit) [WINDOWSNT]: Don't refrain from advertising + empty arguments for --alternate-editor. + (start_daemon_and_retry_set_socket) [WINDOWSNT]: MS-Windows + specific code to start Emacs in daemon mode and wait for it to be + ready for client connections. + +2015-02-23 Pete Williamson (tiny change) + + Use ${EXEEXT} more uniformly in makefiles + * Makefile.in (EMACS): Append ${EXEEXT}. + +2015-02-20 Paul Eggert + + Simplify binary I/O configuration + * etags.c: Include rather than . + (process_file_name, analyze_regex): Use FOPEN_BINARY rather than + hard-coded "b". + +2015-02-19 Eli Zaretskii + + * etags.c (process_file_name) [!DOS_NT]: Use "r", not "rb" in the + call to 'popen'. (Bug#19735) + +2015-02-13 Paul Eggert + + Better support for future plugins + See the thread containing: + http://lists.gnu.org/archive/html/emacs-devel/2015-02/msg00720.html + * make-docfile.c (write_globals): Generate code that #defines + Qxxx macros other than Qnil only if DEFINE_NONNIL_Q_SYMBOL_MACROS. + Qnil is safe to define even in plugins, since it must be zero for + other reasons. + 2015-01-24 Paul Eggert Fix a couple of AM_V_GEN bugs diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index d2705e7b5d..6b5d379e38 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -21,7 +21,7 @@ SHELL = @SHELL@ # Following ../lisp/Makefile.in. -EMACS = ../src/emacs +EMACS = ../src/emacs${EXEEXT} EMACSOPT = -batch --no-site-file --no-site-lisp # ==================== Things `configure' will edit ==================== diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index a04dda6408..806275f5b1 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -595,13 +595,6 @@ decode_options (int argc, char **argv) display = NULL; tty = 1; } - - if (alternate_editor && alternate_editor[0] == '\0') - { - message (true, "--alternate-editor argument or ALTERNATE_EDITOR variable cannot be\n\ -an empty string"); - exit (EXIT_FAILURE); - } #endif /* WINDOWSNT */ } @@ -642,10 +635,8 @@ The following OPTIONS are accepted:\n\ Set filename of the TCP authentication file\n\ -a EDITOR, --alternate-editor=EDITOR\n\ Editor to fallback to if the server is not running\n" -#ifndef WINDOWSNT " If EDITOR is the empty string, start Emacs in daemon\n\ mode and try connecting again\n" -#endif /* not WINDOWSNT */ "\n\ Report bugs with M-x report-emacs-bug.\n"); exit (EXIT_SUCCESS); @@ -1511,7 +1502,77 @@ start_daemon_and_retry_set_socket (void) execvp ("emacs", d_argv); message (true, "%s: error starting emacs daemon\n", progname); } -#endif /* WINDOWSNT */ +#else /* WINDOWSNT */ + DWORD wait_result; + HANDLE w32_daemon_event; + STARTUPINFO si; + PROCESS_INFORMATION pi; + + ZeroMemory (&si, sizeof si); + si.cb = sizeof si; + ZeroMemory (&pi, sizeof pi); + + /* We start Emacs in daemon mode, and then wait for it to signal us + it is ready to accept client connections, by asserting an event + whose name is known to the daemon (defined by nt/inc/ms-w32.h). */ + + if (!CreateProcess (NULL, "emacs --daemon", NULL, NULL, FALSE, + CREATE_NO_WINDOW, NULL, NULL, &si, &pi)) + { + char* msg = NULL; + + FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM + | FORMAT_MESSAGE_ALLOCATE_BUFFER + | FORMAT_MESSAGE_ARGUMENT_ARRAY, + NULL, GetLastError (), 0, (LPTSTR)&msg, 0, NULL); + message (true, "%s: error starting emacs daemon (%s)\n", progname, msg); + exit (EXIT_FAILURE); + } + + w32_daemon_event = CreateEvent (NULL, TRUE, FALSE, W32_DAEMON_EVENT); + if (w32_daemon_event == NULL) + { + message (true, "Couldn't create Windows daemon event"); + exit (EXIT_FAILURE); + } + if ((wait_result = WaitForSingleObject (w32_daemon_event, INFINITE)) + != WAIT_OBJECT_0) + { + char *msg = NULL; + + switch (wait_result) + { + case WAIT_ABANDONED: + msg = "The daemon exited unexpectedly"; + break; + case WAIT_TIMEOUT: + /* Can't happen due to INFINITE. */ + default: + case WAIT_FAILED: + FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM + | FORMAT_MESSAGE_ALLOCATE_BUFFER + | FORMAT_MESSAGE_ARGUMENT_ARRAY, + NULL, GetLastError (), 0, (LPTSTR)&msg, 0, NULL); + break; + } + message (true, "Error: Could not start the Emacs daemon: %s\n", msg); + exit (EXIT_FAILURE); + } + CloseHandle (w32_daemon_event); + + /* Try connecting, the daemon should have started by now. */ + /* It's just a progress message, so don't pop a dialog if this is + emacsclientw. */ + if (!w32_window_app ()) + message (true, + "Emacs daemon should have started, trying to connect again\n"); + if ((emacs_socket = set_socket (1)) == INVALID_SOCKET) + { + message (true, + "Error: Cannot connect even after starting the Emacs daemon\n"); + exit (EXIT_FAILURE); + } +#endif /* WINDOWSNT */ } int diff --git a/lib-src/etags.c b/lib-src/etags.c index dc2ced5093..b1361dbe7a 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -122,7 +122,7 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; #include #include #include -#include +#include #include #include #include @@ -176,17 +176,8 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; * SYNOPSIS: Type *xnew (int n, Type); * void xrnew (OldPointer, int n, Type); */ -#if DEBUG -# include "chkmalloc.h" -# define xnew(n,Type) ((Type *) trace_malloc (__FILE__, __LINE__, \ - (n) * sizeof (Type))) -# define xrnew(op,n,Type) ((op) = (Type *) trace_realloc (__FILE__, __LINE__, \ - (char *) (op), (n) * sizeof (Type))) -#else -# define xnew(n,Type) ((Type *) xmalloc ((n) * sizeof (Type))) -# define xrnew(op,n,Type) ((op) = (Type *) xrealloc ( \ - (char *) (op), (n) * sizeof (Type))) -#endif +#define xnew(n, Type) ((Type *) xmalloc ((n) * sizeof (Type))) +#define xrnew(op, n, Type) ((op) = (Type *) xrealloc (op, (n) * sizeof (Type))) typedef void Lang_function (FILE *); @@ -348,7 +339,7 @@ static void canonicalize_filename (char *); static void linebuffer_init (linebuffer *); static void linebuffer_setlen (linebuffer *, int); static void *xmalloc (size_t); -static void *xrealloc (char *, size_t); +static void *xrealloc (void *, size_t); static char searchar = '/'; /* use /.../ searches */ @@ -1532,11 +1523,11 @@ process_file_name (char *file, language *lang) if (real_name == compressed_name) { char *cmd = concat (compr->command, " ", real_name); - inf = popen (cmd, "rb"); + inf = popen (cmd, "r" FOPEN_BINARY); free (cmd); } else - inf = fopen (real_name, "rb"); + inf = fopen (real_name, "r" FOPEN_BINARY); if (inf == NULL) { perror (real_name); @@ -5600,7 +5591,7 @@ analyze_regex (char *regex_arg) char *regexfile = regex_arg + 1; /* regexfile is a file containing regexps, one per line. */ - regexfp = fopen (regexfile, "rb"); + regexfp = fopen (regexfile, "r" FOPEN_BINARY); if (regexfp == NULL) pfatal (regexfile); linebuffer_init (®exbuf); @@ -6533,7 +6524,7 @@ xmalloc (size_t size) } static void * -xrealloc (char *ptr, size_t size) +xrealloc (void *ptr, size_t size) { void *result = realloc (ptr, size); if (result == NULL) diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 79d421a0a8..bada8df9f7 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -707,12 +707,9 @@ write_globals (void) globals[i].name, globals[i].name); } else if (globals[i].type == SYMBOL) - printf (("DEFINE_LISP_SYMBOL_BEGIN (%s)\n" - "#define i%s %d\n" - "#define %s builtin_lisp_symbol (i%s)\n" - "DEFINE_LISP_SYMBOL_END (%s)\n\n"), - globals[i].name, globals[i].name, symnum++, - globals[i].name, globals[i].name, globals[i].name); + printf (("#define i%s %d\n" + "DEFINE_LISP_SYMBOL (%s)\n"), + globals[i].name, symnum++, globals[i].name); else { if (globals[i].flags & DEFUN_noreturn) @@ -740,15 +737,19 @@ write_globals (void) puts ("#ifdef DEFINE_SYMBOLS"); puts ("static char const *const defsym_name[] = {"); for (int i = 0; i < num_globals; i++) - { - if (globals[i].type == SYMBOL) - printf ("\t\"%s\",\n", globals[i].v.svalue); - while (i + 1 < num_globals - && strcmp (globals[i].name, globals[i + 1].name) == 0) - i++; - } + if (globals[i].type == SYMBOL) + printf ("\t\"%s\",\n", globals[i].v.svalue); puts ("};"); puts ("#endif"); + + puts ("#define Qnil builtin_lisp_symbol (0)"); + puts ("#if DEFINE_NON_NIL_Q_SYMBOL_MACROS"); + num_symbols = 0; + for (int i = 0; i < num_globals; i++) + if (globals[i].type == SYMBOL && num_symbols++ != 0) + printf ("# define %s builtin_lisp_symbol (%d)\n", + globals[i].name, num_symbols - 1); + puts ("#endif"); } diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 5008c9b15f..1618a6980e 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -59,6 +59,7 @@ along with GNU Emacs. If not, see . */ #include #include #include +#include #include #include #include @@ -66,6 +67,7 @@ along with GNU Emacs. If not, see . */ #include #include #include +#include #include #include "syswait.h" #ifdef MAIL_USE_POP @@ -81,7 +83,7 @@ along with GNU Emacs. If not, see . */ #undef access #undef unlink #define fork() 0 -#define wait(var) (*(var) = 0) +#define waitpid(child, var, flags) (*(var) = 0) /* Unfortunately, Samba doesn't seem to properly lock Unix files even though the locking call succeeds (and indeed blocks local access from other NT programs). If you have direct file access using an NFS @@ -134,11 +136,11 @@ static void error (const char *s1, const char *s2, const char *s3); static _Noreturn void pfatal_with_name (char *name); static _Noreturn void pfatal_and_delete (char *name); #ifdef MAIL_USE_POP -static int popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse_order); -static int pop_retr (popserver server, int msgno, FILE *arg); -static int mbx_write (char *line, int len, FILE *mbf); -static int mbx_delimit_begin (FILE *mbf); -static int mbx_delimit_end (FILE *mbf); +static int popmail (char *, char *, bool, char *, bool); +static bool pop_retr (popserver, int, FILE *); +static bool mbx_write (char *, int, FILE *); +static bool mbx_delimit_begin (FILE *); +static bool mbx_delimit_end (FILE *); #endif #if (defined MAIL_USE_MAILLOCK \ @@ -166,23 +168,21 @@ main (int argc, char **argv) int indesc, outdesc; ssize_t nread; int wait_status; - int c, preserve_mail = 0; + int c; + bool preserve_mail = false; #ifndef MAIL_USE_SYSTEM_LOCK struct stat st; int tem; - char *lockname; char *tempname; size_t inname_len, inname_dirlen; int desc; #endif /* not MAIL_USE_SYSTEM_LOCK */ -#ifdef MAIL_USE_MAILLOCK - char *spool_name; -#endif + char *spool_name = 0; #ifdef MAIL_USE_POP - int pop_reverse_order = 0; + bool pop_reverse_order = false; # define ARGSTR "pr" #else /* ! MAIL_USE_POP */ # define ARGSTR "p" @@ -193,19 +193,19 @@ main (int argc, char **argv) delete_lockname = 0; - while ((c = getopt (argc, argv, ARGSTR)) != EOF) + while (0 <= (c = getopt (argc, argv, ARGSTR))) { switch (c) { #ifdef MAIL_USE_POP case 'r': - pop_reverse_order = 1; + pop_reverse_order = true; break; #endif case 'p': - preserve_mail++; + preserve_mail = true; break; default: - exit (EXIT_FAILURE); + return EXIT_FAILURE; } } @@ -223,7 +223,7 @@ main (int argc, char **argv) #else fprintf (stderr, "Usage: movemail [-p] inbox destfile%s\n", ""); #endif - exit (EXIT_FAILURE); + return EXIT_FAILURE; } inname = argv[optind]; @@ -244,7 +244,7 @@ main (int argc, char **argv) status = popmail (inname + 3, outname, preserve_mail, (argc - optind == 3) ? argv[optind+2] : NULL, pop_reverse_order); - exit (status); + return status; } if (setuid (getuid ()) < 0) @@ -253,18 +253,15 @@ main (int argc, char **argv) #endif /* MAIL_USE_POP */ #ifndef DISABLE_DIRECT_ACCESS + + char *lockname = 0; + #ifndef MAIL_USE_MMDF #ifndef MAIL_USE_SYSTEM_LOCK #ifdef MAIL_USE_MAILLOCK spool_name = mail_spool_name (inname); - if (spool_name) - { -#ifdef lint - lockname = 0; -#endif - } - else #endif + if (! spool_name) { /* Use a lock file named after our first argument with .lock appended: If it exists, the mail file is locked. */ @@ -292,7 +289,7 @@ main (int argc, char **argv) continue; tempname = xmalloc (inname_dirlen + sizeof "EXXXXXX"); - while (1) + while (true) { /* Create the lock file, but not under the lock file name. */ /* Give up if cannot do that. */ @@ -328,7 +325,10 @@ main (int argc, char **argv) { time_t now = time (0); if (st.st_ctime < now - 300) - unlink (lockname); + { + unlink (lockname); + lockname = 0; + } } } @@ -337,15 +337,20 @@ main (int argc, char **argv) #endif /* not MAIL_USE_SYSTEM_LOCK */ #endif /* not MAIL_USE_MMDF */ - if (fork () == 0) +#ifdef SIGCHLD + signal (SIGCHLD, SIG_DFL); +#endif + + pid_t child = fork (); + if (child < 0) + fatal ("Error in fork; %s", strerror (errno), 0); + + if (child == 0) { int lockcount = 0; int status = 0; #if defined (MAIL_USE_MAILLOCK) && defined (HAVE_TOUCHLOCK) - time_t touched_lock; -# ifdef lint - touched_lock = 0; -# endif + time_t touched_lock IF_LINT (= 0); #endif if (setuid (getuid ()) < 0 || setregid (-1, real_gid) < 0) @@ -382,9 +387,9 @@ main (int argc, char **argv) #ifdef MAIL_USE_MAILLOCK if (spool_name) { - /* The "0 - " is to make it a negative number if maillock returns + /* The "-" is to make it a negative number if maillock returns non-zero. */ - status = 0 - maillock (spool_name, 1); + status = - maillock (spool_name, 1); #ifdef HAVE_TOUCHLOCK touched_lock = time (0); #endif @@ -422,7 +427,7 @@ main (int argc, char **argv) { char buf[1024]; - while (1) + while (true) { nread = read (indesc, buf, sizeof buf); if (nread < 0) @@ -464,7 +469,7 @@ main (int argc, char **argv) #ifdef MAIL_USE_SYSTEM_LOCK if (! preserve_mail) { - if (ftruncate (indesc, 0L) != 0) + if (ftruncate (indesc, 0) != 0) pfatal_with_name (inname); } #endif /* MAIL_USE_SYSTEM_LOCK */ @@ -499,21 +504,18 @@ main (int argc, char **argv) if (spool_name) mailunlock (); #endif - exit (EXIT_SUCCESS); + return EXIT_SUCCESS; } - wait (&wait_status); + if (waitpid (child, &wait_status, 0) < 0) + fatal ("Error in waitpid; %s", strerror (errno), 0); if (!WIFEXITED (wait_status)) - exit (EXIT_FAILURE); + return EXIT_FAILURE; else if (WEXITSTATUS (wait_status) != 0) - exit (WEXITSTATUS (wait_status)); + return WEXITSTATUS (wait_status); -#if !defined (MAIL_USE_MMDF) && !defined (MAIL_USE_SYSTEM_LOCK) -#ifdef MAIL_USE_MAILLOCK - if (! spool_name) -#endif /* MAIL_USE_MAILLOCK */ + if (lockname) unlink (lockname); -#endif /* not MAIL_USE_MMDF and not MAIL_USE_SYSTEM_LOCK */ #endif /* ! DISABLE_DIRECT_ACCESS */ @@ -616,12 +618,6 @@ pfatal_and_delete (char *name) #include #include -#define NOTOK (-1) -#define OK 0 - -static char Errmsg[200]; /* POP errors, at least, can exceed - the original length of 80. */ - /* * The full valid syntax for a POP mailbox specification for movemail * is "po:username:hostname". The ":hostname" is optional; if it is @@ -637,10 +633,11 @@ static char Errmsg[200]; /* POP errors, at least, can exceed */ static int -popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse_order) +popmail (char *mailbox, char *outfile, bool preserve, char *password, + bool reverse_order) { int nmsgs, nbytes; - register int i; + int i; int mbfi; FILE *mbf; popserver server; @@ -690,7 +687,8 @@ popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse } } - if ((mbf = fdopen (mbfi, "wb")) == NULL) + mbf = fdopen (mbfi, "wb"); + if (!mbf) { pop_close (server); error ("Error in fdopen: %s", strerror (errno), 0); @@ -713,35 +711,28 @@ popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse } for (i = start; i * increment <= end * increment; i += increment) - { - if (mbx_delimit_begin (mbf) != OK - || pop_retr (server, i, mbf) != OK) - { - error ("%s", Errmsg, 0); - close (mbfi); - return EXIT_FAILURE; - } - mbx_delimit_end (mbf); - fflush (mbf); - if (ferror (mbf)) - { - error ("Error in fflush: %s", strerror (errno), 0); - pop_close (server); - close (mbfi); - return EXIT_FAILURE; - } - } + if (! (mbx_delimit_begin (mbf) + && pop_retr (server, i, mbf) + && mbx_delimit_end (mbf) + && fflush (mbf) == 0)) + { + if (errno) + error ("Error in POP retrieving: %s", strerror (errno), 0); + pop_close (server); + fclose (mbf); + return EXIT_FAILURE; + } if (fsync (mbfi) != 0 && errno != EINVAL) { error ("Error in fsync: %s", strerror (errno), 0); - close (mbfi); + fclose (mbf); return EXIT_FAILURE; } - if (close (mbfi) != 0) + if (fclose (mbf) != 0) { - error ("Error in close: %s", strerror (errno), 0); + error ("Error in fclose: %s", strerror (errno), 0); return EXIT_FAILURE; } @@ -765,7 +756,7 @@ popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse return EXIT_SUCCESS; } -static int +static bool pop_retr (popserver server, int msgno, FILE *arg) { char *line; @@ -773,8 +764,9 @@ pop_retr (popserver server, int msgno, FILE *arg) if (pop_retrieve_first (server, msgno, &line)) { - snprintf (Errmsg, sizeof Errmsg, "Error from POP server: %s", pop_error); - return (NOTOK); + error ("Error from POP server: %s", pop_error, 0); + errno = 0; + return false; } while ((ret = pop_retrieve_next (server, &line)) >= 0) @@ -782,24 +774,26 @@ pop_retr (popserver server, int msgno, FILE *arg) if (! line) break; - if (mbx_write (line, ret, arg) != OK) + if (! mbx_write (line, ret, arg)) { - strcpy (Errmsg, strerror (errno)); + int write_errno = errno; pop_close (server); - return (NOTOK); + errno = write_errno; + return false; } } if (ret) { - snprintf (Errmsg, sizeof Errmsg, "Error from POP server: %s", pop_error); - return (NOTOK); + error ("Error from POP server: %s", pop_error, 0); + errno = 0; + return false; } - return (OK); + return true; } -static int +static bool mbx_write (char *line, int len, FILE *mbf) { #ifdef MOVEMAIL_QUOTE_POP_FROM_LINES @@ -811,47 +805,42 @@ mbx_write (char *line, int len, FILE *mbf) && (a[4] == ' ')) if (IS_FROM_LINE (line)) { - if (fputc ('>', mbf) == EOF) - return (NOTOK); + if (fputc ('>', mbf) < 0) + return false; } #endif if (line[0] == '\037') { - if (fputs ("^_", mbf) == EOF) - return (NOTOK); + if (fputs ("^_", mbf) < 0) + return false; line++; len--; } - if (fwrite (line, 1, len, mbf) != len) - return (NOTOK); - if (fputc (0x0a, mbf) == EOF) - return (NOTOK); - return (OK); + return fwrite (line, 1, len, mbf) == len && 0 <= fputc ('\n', mbf); } -static int +static bool mbx_delimit_begin (FILE *mbf) { time_t now = time (NULL); struct tm *ltime = localtime (&now); if (!ltime) - return NOTOK; + return false; char fromline[100]; if (! strftime (fromline, sizeof fromline, "From movemail %a %b %e %T %Y\n", ltime)) - return NOTOK; - if (fputs (fromline, mbf) == EOF) - return (NOTOK); - return (OK); + { + errno = EOVERFLOW; + return false; + } + return 0 <= fputs (fromline, mbf); } -static int +static bool mbx_delimit_end (FILE *mbf) { - if (putc ('\n', mbf) == EOF) - return (NOTOK); - return (OK); + return 0 <= putc ('\n', mbf); } #endif /* MAIL_USE_POP */ diff --git a/lib/dirent.in.h b/lib/dirent.in.h index ddd3b84fbb..154d2689e3 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h @@ -77,6 +77,7 @@ typedef struct gl_directory DIR; # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef opendir # define opendir rpl_opendir +# define GNULIB_defined_opendir 1 # endif _GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name)); @@ -128,6 +129,7 @@ _GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef closedir # define closedir rpl_closedir +# define GNULIB_defined_closedir 1 # endif _GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (closedir, int, (DIR *dirp)); diff --git a/lib/dirfd.c b/lib/dirfd.c new file mode 100644 index 0000000000..c91f8e5587 --- /dev/null +++ b/lib/dirfd.c @@ -0,0 +1,32 @@ +/* dirfd.c -- return the file descriptor associated with an open DIR* + + Copyright (C) 2001, 2006, 2008-2015 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#include + +#include +#include + +int +dirfd (DIR *dir_p) +{ + int fd = DIR_TO_FD (dir_p); + if (fd == -1) + errno = ENOTSUP; + return fd; +} diff --git a/lib/fdopendir.c b/lib/fdopendir.c index 9dc1e7b26d..837a8219b3 100644 --- a/lib/fdopendir.c +++ b/lib/fdopendir.c @@ -93,7 +93,7 @@ fdopendir (int fd) That way, barring race conditions, fd_clone_opendir returns a stream whose file descriptor is FD. - If REPLACE_CHDIR or CWD is null, use opendir ("/proc/self/fd/...", + If REPLACE_FCHDIR or CWD is null, use opendir ("/proc/self/fd/...", falling back on fchdir metadata. Otherwise, CWD is a saved version of the working directory; use fchdir/opendir(".")/restore_cwd(CWD). */ static DIR * @@ -156,7 +156,16 @@ fd_clone_opendir (int fd, struct saved_cwd const *cwd) if (! dir && EXPECTED_ERRNO (saved_errno)) { char const *name = _gl_directory_name (fd); - return (name ? opendir (name) : NULL); + DIR *dp = name ? opendir (name) : NULL; + + /* The caller has done an elaborate dance to arrange for opendir to + consume just the right file descriptor. If dirfd returns -1, + though, we're on a system like mingw where opendir does not + consume a file descriptor. Consume it via 'dup' instead. */ + if (dp && dirfd (dp) < 0) + dup (fd); + + return dp; } # endif errno = saved_errno; diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c index 59b97360bc..03eb7ef1bf 100644 --- a/lib/getdtablesize.c +++ b/lib/getdtablesize.c @@ -84,32 +84,38 @@ getdtablesize (void) return dtablesize; } -#elif HAVE_GETDTABLESIZE +#else +# include # include -# undef getdtablesize -int -rpl_getdtablesize(void) -{ - /* To date, this replacement is only compiled for Cygwin 1.7.25, - which auto-increased the RLIMIT_NOFILE soft limit until it - hits the compile-time constant hard limit of 3200. Although - that version of cygwin supported a child process inheriting - a smaller soft limit, the smaller limit is not enforced, so - we might as well just report the hard limit. */ - struct rlimit lim; - if (!getrlimit (RLIMIT_NOFILE, &lim) && lim.rlim_max != RLIM_INFINITY) - return lim.rlim_max; - return getdtablesize (); -} +# ifndef RLIM_SAVED_CUR +# define RLIM_SAVED_CUR RLIM_INFINITY +# endif +# ifndef RLIM_SAVED_MAX +# define RLIM_SAVED_MAX RLIM_INFINITY +# endif -#elif defined _SC_OPEN_MAX +# ifdef __CYGWIN__ + /* Cygwin 1.7.25 auto-increases the RLIMIT_NOFILE soft limit until it + hits the compile-time constant hard limit of 3200. We might as + well just report the hard limit. */ +# define rlim_cur rlim_max +# endif int getdtablesize (void) { - return sysconf (_SC_OPEN_MAX); + struct rlimit lim; + + if (getrlimit (RLIMIT_NOFILE, &lim) == 0 + && 0 <= lim.rlim_cur && lim.rlim_cur <= INT_MAX + && lim.rlim_cur != RLIM_INFINITY + && lim.rlim_cur != RLIM_SAVED_CUR + && lim.rlim_cur != RLIM_SAVED_MAX) + return lim.rlim_cur; + + return INT_MAX; } #endif diff --git a/lib/getopt.c b/lib/getopt.c index 3b9c585a28..212cbf7341 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -487,7 +487,20 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, const struct option *p; struct option_list *next; } *ambig_list = NULL; +#ifdef _LIBC +/* malloc() not used for _LIBC to simplify failure messages. */ +# define free_option_list(l) +#else +# define free_option_list(l) \ + while (l != NULL) \ + { \ + struct option_list *pn = l->next; \ + free (l); \ + l = pn; \ + } +#endif int exact = 0; + int ambig = 0; int indfound = -1; int option_index; @@ -514,22 +527,37 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, pfound = p; indfound = option_index; } + else if (ambig) + ; /* Taking simpler path to handling ambiguities. */ else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) { /* Second or later nonexact match found. */ +#ifdef _LIBC + struct option_list *newp = alloca (sizeof (*newp)); +#else struct option_list *newp = malloc (sizeof (*newp)); - newp->p = p; - newp->next = ambig_list; - ambig_list = newp; + if (newp == NULL) + { + free_option_list (ambig_list); + ambig_list = NULL; + ambig = 1; /* Use simpler fallback message. */ + } + else +#endif + { + newp->p = p; + newp->next = ambig_list; + ambig_list = newp; + } } } - if (ambig_list != NULL && !exact) + if ((ambig || ambig_list) && !exact) { - if (print_errors) + if (print_errors && ambig_list) { struct option_list first; first.p = pfound; @@ -585,18 +613,20 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, fputc ('\n', stderr); #endif } + else if (print_errors && ambig) + { + fprintf (stderr, + _("%s: option '%s' is ambiguous\n"), + argv[0], argv[d->optind]); + } d->__nextchar += strlen (d->__nextchar); d->optind++; d->optopt = 0; + free_option_list (ambig_list); return '?'; } - while (ambig_list != NULL) - { - struct option_list *pn = ambig_list->next; - free (ambig_list); - ambig_list = pn; - } + free_option_list (ambig_list); if (pfound != NULL) { diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 1b671e7f6d..7703cbfe28 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk @@ -237,6 +237,17 @@ EXTRA_DIST += dirent.in.h ## end gnulib module dirent +## begin gnulib module dirfd + +if gl_GNULIB_ENABLED_dirfd + +endif +EXTRA_DIST += dirfd.c + +EXTRA_libgnu_a_SOURCES += dirfd.c + +## end gnulib module dirfd + ## begin gnulib module dosname if gl_GNULIB_ENABLED_dosname diff --git a/lib/signal.in.h b/lib/signal.in.h index 0f2ff5af84..265b72ab0e 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -55,11 +55,13 @@ #ifndef _@GUARD_PREFIX@_SIGNAL_H #define _@GUARD_PREFIX@_SIGNAL_H -/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare - pthread_sigmask in , not in . +/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android + declare pthread_sigmask in , not in . But avoid namespace pollution on glibc systems.*/ #if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \ - && ((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ || defined __sun) \ + && ((defined __APPLE__ && defined __MACH__) \ + || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \ + || defined __sun || defined __ANDROID__) \ && ! defined __GLIBC__ # include #endif diff --git a/lib/tempname.c b/lib/tempname.c index 088b224ab9..8e6d26cc48 100644 --- a/lib/tempname.c +++ b/lib/tempname.c @@ -62,6 +62,7 @@ # define struct_stat64 struct stat64 #else # define struct_stat64 struct stat +# define __try_tempname try_tempname # define __gen_tempname gen_tempname # define __getpid getpid # define __gettimeofday gettimeofday @@ -176,21 +177,9 @@ __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -/* Generate a temporary file name based on TMPL. TMPL must match the - rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). - The name constructed does not exist at the time of the call to - __gen_tempname. TMPL is overwritten with the result. - - KIND may be one of: - __GT_NOCREATE: simply verify that the name does not exist - at the time of the call. - __GT_FILE: create the file using open(O_CREAT|O_EXCL) - and return a read-write fd. The file is mode 0600. - __GT_DIR: create a directory, which will be mode 0700. - - We use a clever algorithm to get hard-to-predict names. */ int -__gen_tempname (char *tmpl, int suffixlen, int flags, int kind) +__try_tempname (char *tmpl, int suffixlen, void *args, + int (*tryfunc) (char *, void *)) { int len; char *XXXXXX; @@ -199,7 +188,6 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) unsigned int count; int fd = -1; int save_errno = errno; - struct_stat64 st; /* A lower bound on the number of temporary files to attempt to generate. The maximum total number of temporary file names that @@ -256,41 +244,7 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) v /= 62; XXXXXX[5] = letters[v % 62]; - switch (kind) - { - case __GT_FILE: - fd = __open (tmpl, - (flags & ~O_ACCMODE) - | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); - break; - - case __GT_DIR: - fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR); - break; - - case __GT_NOCREATE: - /* This case is backward from the other three. __gen_tempname - succeeds if __xstat fails because the name does not exist. - Note the continue to bypass the common logic at the bottom - of the loop. */ - if (__lxstat64 (_STAT_VER, tmpl, &st) < 0) - { - if (errno == ENOENT) - { - __set_errno (save_errno); - return 0; - } - else - /* Give up now. */ - return -1; - } - continue; - - default: - assert (! "invalid KIND in __gen_tempname"); - abort (); - } - + fd = tryfunc (tmpl, args); if (fd >= 0) { __set_errno (save_errno); @@ -304,3 +258,67 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) __set_errno (EEXIST); return -1; } + +static int +try_file (char *tmpl, void *flags) +{ + int *openflags = flags; + return __open (tmpl, + (*openflags & ~O_ACCMODE) + | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); +} + +static int +try_dir (char *tmpl, void *flags) +{ + return __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR); +} + +static int +try_nocreate (char *tmpl, void *flags) +{ + struct_stat64 st; + + if (__lxstat64 (_STAT_VER, tmpl, &st) == 0) + __set_errno (EEXIST); + return errno == ENOENT ? 0 : -1; +} + +/* Generate a temporary file name based on TMPL. TMPL must match the + rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). + The name constructed does not exist at the time of the call to + __gen_tempname. TMPL is overwritten with the result. + + KIND may be one of: + __GT_NOCREATE: simply verify that the name does not exist + at the time of the call. + __GT_FILE: create the file using open(O_CREAT|O_EXCL) + and return a read-write fd. The file is mode 0600. + __GT_DIR: create a directory, which will be mode 0700. + + We use a clever algorithm to get hard-to-predict names. */ +int +__gen_tempname (char *tmpl, int suffixlen, int flags, int kind) +{ + int (*tryfunc) (char *, void *); + + switch (kind) + { + case __GT_FILE: + tryfunc = try_file; + break; + + case __GT_DIR: + tryfunc = try_dir; + break; + + case __GT_NOCREATE: + tryfunc = try_nocreate; + break; + + default: + assert (! "invalid KIND in __gen_tempname"); + abort (); + } + return __try_tempname (tmpl, suffixlen, &flags, tryfunc); +} diff --git a/lib/tempname.h b/lib/tempname.h index b560ee5cb1..e609360746 100644 --- a/lib/tempname.h +++ b/lib/tempname.h @@ -32,6 +32,10 @@ # define GT_NOCREATE 2 # endif +#ifdef __cplusplus +extern "C" { +#endif + /* Generate a temporary file name based on TMPL. TMPL must match the rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). The name constructed does not exist at the time of the call to @@ -47,4 +51,15 @@ We use a clever algorithm to get hard-to-predict names. */ extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind); +/* Similar to gen_tempname, but TRYFUNC is called for each temporary + name to try. If TRYFUNC returns a non-negative number, TRY_GEN_TEMPNAME + returns with this value. Otherwise, if errno is set to EEXIST, another + name is tried, or else TRY_GEN_TEMPNAME returns -1. */ +extern int try_tempname (char *tmpl, int suffixlen, void *args, + int (*tryfunc) (char *, void *)); + +#ifdef __cplusplus +} +#endif + #endif /* GL_TEMPNAME_H */ diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 54d1840097..f6a79c7dea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,4 +1,4 @@ -2015-03-22 Richard Stallman +2015-04-05 Richard Stallman * mail/rmail.el (rmail-show-message-1): When displaying a mime message, indicate start and finish in the echo area. @@ -12,14 +12,2085 @@ (browse-url-firefox-arguments) (browse-url-firefox-startup-arguments): Doc fix. -2015-02-01 Joakim Verona - Support for the new Xwidget feature. - * xwidget.el: +2015-04-05 Pete Williamson (tiny-change) -2015-02-01 Grégoire Jadi - Support for testing xwidgets - * emacs-parallel/parallell-remote.el, emacs-parallel/parallell-xwidget.el: - * emacs-parallel/parallell.el: + Fix .emacs and .emacs.d/init file recursion problem for NaCl + * files.el (file-truename): Add NaCl to the exception list ms-dos uses. + +2015-04-04 Alan Mackenzie + + * progmodes/cc-mode.el (c-font-lock-init): Revert 2015-02-01 change + "Stop Font Lock forcing fontification from BOL." (Bug#20245) + +2015-04-04 Artur Malabarba + + * emacs-lisp/package.el (package--download-and-read-archives): Add + `package-archives' to `package--downloads-in-progress' instead of + overwriting it. + (package--with-work-buffer-async): Protect macro arguments. + +2015-04-04 Michael Albinus + + * net/tramp-cache.el (tramp-flush-directory-property): Quote directory + name when used in regexp. + +2015-04-04 Alan Mackenzie + + Fix debbugs#20240 part two (jit-lock error during `comment-dwim'). + + * jit-lock.el (jit-lock-after-change): Widen the buffer before + putting 'fontified text properties. + +2015-04-03 Michael Albinus + + * net/tramp-cache.el (tramp-flush-file-property) + (tramp-flush-directory-property): Use `directory-file-name' of the + truename. (Bug#20249) + +2015-04-03 Nicolas Richard + + * pcmpl-unix.el (pcmpl-ssh-known-hosts): Use `char-before' instead + of `looking-back' (bug#17284). + +2015-04-03 Dmitry Gutov + + * progmodes/js.el (js-indent-line): Do nothing when bol is inside + a string (https://github.com/mooz/js2-mode/issues/227). + +2015-04-02 Stefan Monnier + + * abbrev.el (define-abbrev-table): Treat a non-string "docstring" as + part of the "props" arguments rather than silently ignoring it. + + * emacs-lisp/lisp-mnt.el (lm-version): Don't burp in a non-file buffer. + +2015-04-01 Alan Mackenzie + + Fix the CC Mode fixes from 2015-03-30. Fixes debbugs#20240. + + * progmodes/cc-mode.el (c-extend-after-change-region): + Widen before applying text properties. + * progmodes/cc-langs.el (c-before-font-lock-functions): Update an + entry to a new function name. + +2015-04-01 Paul Eggert + + * emacs-lisp/package.el: Spelling fixes and use active voice. + +2015-04-01 Artur Malabarba + + * emacs-lisp/package.el: Implement asynchronous refreshing. + (package--with-work-buffer-async) + (package--check-signature-content) + (package--update-downloads-in-progress): New functions. + (package--check-signature, package--download-one-archive) + (package--download-and-read-archives, package-refresh-contents): + Optional arguments for async usage. + (package--post-download-archives-hook): New variable. Hook run + after every refresh. + + * emacs-lisp/package.el: Make package-menu asynchronous. + (package-menu-async): New variable. Controls whether + `list-packages' is asynchronous. + (list-packages): Now asynchronous by default. + (package-menu--new-package-list): Always buffer-local. + (package-menu--post-refresh) + (package-menu--find-and-notify-upgrades) + (package-menu--populate-new-package-list): New functions. + +2015-03-31 Simen Heggestøyl + + * textmodes/css-mode.el (css-mode): Derive from `prog-mode'. + +2015-03-31 Stefan Monnier + + * jit-lock.el (jit-lock--run-functions): Fix min/max copy&paste error. + + Let jit-lock know the result of font-lock-extend-region-functions. + * jit-lock.el (jit-lock--run-functions): New function. + (jit-lock-fontify-now): Use it. Handle fontification bounds more + precisely in case the backend functions fontify more than requested. + Don't round up to whole lines since that shouldn't be needed + any more. + * font-lock.el (font-lock-fontify-region-function): Adjust docstring. + (font-lock-inhibit-thing-lock): Make obsolete. + (font-lock-default-fontify-region): Return the bounds actually used. + + * emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value): + Fix compilation error. + +2015-03-30 Artur Malabarba + + * emacs-lisp/package.el: Reorganize package.el and divide it with + page-breaks and comments. + +2015-03-30 Stefan Monnier + + * emacs-lisp/eieio-base.el (make-instance) : New instance + which stores the old-style object name argument into the + object-name field. + +2015-03-30 Alan Mackenzie + + Correct calculation of CC Mode's font-lock region. + + * progmodes/cc-mode.el (c-fl-decl-start): Rename from + c-set-fl-decl-start. Change signature such that nil is returned + when no declaration is found. + (c-change-expand-fl-region): Rename from + c-change-set-fl-decl-start. This now also handles expanding the + font lock region to whole lines. + (c-context-expand-fl-region): Rename from + c-context-set-fl-decl-start. This now also handles expanding the + font lock region to whole lines. + (c-font-lock-fontify-region): When a change font lock region is + spuriously enlarged to the beginning-of-line by jit-lock, fontify + the extra bit separately from the region calculated by CC Mode. + (c-extend-after-change-region): Explicitly apply 'fontified + properties to the extended bits of the font lock region. + + * progmodes/cc-langs.el (c-before-font-lock-functions) + (c-before-context-fontification-functions): Use new names for + existing functions (see above). + +2015-03-30 Richard Ryniker (tiny change) + + * mail/sendmail.el (sendmail-send-it): Do not attempt to switch + to non-existent buffer (errbuf is not created when customization + variable mail-interactive is nil). (Bug#20211) + +2015-03-29 Stefan Monnier + + * emacs-lisp/smie.el (smie-backward-sexp-command) + (smie-forward-sexp-command): Don't pretend the arg is optional + (bug#20205). + +2015-03-29 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): + Detect regexps after `!'. (Bug#19285) + + * progmodes/ruby-mode.el (ruby-font-lock-keywords): + Use `font-lock-constant-face' for nil, true and false. + Highlight `self' as a keyword. (Bug#17733) + +2015-03-29 Nobuyoshi Nakada + + * progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): + Expect beginning of regexp also after open brace or vertical bar. + (Bug#20026) + +2015-03-28 Jan Djärv + + * emacs-lisp/package.el (package-refresh-contents): Fix spelling + error in previous change. + +2015-03-28 Tom Willemse (tiny change) + + * elec-pair.el (electric-pair-local-mode): New command. + (electric-pair-mode): Mention `electric-pair-local-mode' in the + docstring. + +2015-03-28 Jan Djärv + + * emacs-lisp/package.el (package-refresh-contents): Add a message at + the end so it does not appear to have hanged (Bug#17879). + +2015-03-27 Wolfgang Jenkner + + * font-lock.el (font-lock--remove-face-from-text-property): + New function. Adapted from the previously commented out + remove-single-text-property. + Remove previously unused and commented out auxiliary function + remove-text-property and obsolete comment. + * comint.el (comint-output-filter): Use it to remove + comint-highlight-prompt. + (comint-snapshot-last-prompt, comint-output-filter): + Use font-lock-prepend-text-property for comint-highlight-prompt. + (Bug#20084) + +2015-03-26 Daniel Colascione + * progmodes/python.el + (python-indent-guess-indent-offset-verbose): New defcustom. + (python-indent-guess-indent-offset): Use it. + +2015-03-26 Stefan Monnier + + * emacs-lisp/eieio.el (defclass): Change internal name so as to make + sure only EIEIO files should have "eieio--" prefixes in their .elc. + + * emacs-lisp/cl-macs.el (cl-dolist, cl-dotimes): Silence byte-compiler. + +2015-03-26 Boruch Baum (tiny change) + + * bookmark.el (bookmark-show-all-annotations): Sort them (bug#20177). + +2015-03-25 Dmitry Gutov + + * json.el (json-special-chars): Don't treat `/' specially, there's + no need to. + (json-encode-string): Only escape quotation mark, backslash and + the control characters U+0000 to U+001F. + +2015-03-25 Artur Malabarba + + * emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): + Don't complain about args starting with _. + +2015-03-25 Stefan Monnier + + * international/mule-cmds.el (mule--ucs-names-annotation): New func. + (read-char-by-name): Use it. + + * xt-mouse.el (xterm-mouse--read-number-from-terminal): Fix last commit. + +2015-03-25 Nicolas Petton + + * emacs-lisp/seq.el: Documentation improvements. + +2015-03-25 Glenn Morris + + * net/browse-url.el (browse-url-browser-function) + (browse-url-default-browser): + Remove obsolete items from the explicit listing. + (browse-url-new-window-flag, browse-url-of-file-hook): Doc fixes. + (browse-url-netscape-program, browse-url-netscape-arguments) + (browse-url-netscape-startup-arguments) + (browse-url-galeon-program, browse-url-galeon-arguments) + (browse-url-galeon-startup-arguments) + (browse-url-gnome-moz-program, browse-url-gnome-moz-arguments) + (browse-url-galeon-new-window-is-tab) + (browse-url-netscape-new-window-is-tab) + (browse-url-mosaic-program, browse-url-mosaic-arguments) + (browse-url-mosaic-pidfile, browse-url-CCI-port) + (browse-url-CCI-host, browse-url-netscape-version) + (browse-url-netscape, browse-url-netscape-sentinel) + (browse-url-netscape-reload, browse-url-netscape-send) + (browse-url-galeon, browse-url-galeon-sentinel) + (browse-url-gnome-moz, browse-url-mosaic, browse-url-cci) + (browse-url-w3-gnudoit): Make obsolete. + * ffap.el (ffap-url-fetcher): Simplify default and doc. + +2015-03-25 Olaf Rogalsky + + * xt-mouse.el: Add mouse-tracking support (bug#19416). + (xterm-mouse-translate-1): Handle mouse-movement events. + (xterm-mouse--read-event-sequence-1000) + (xterm-mouse--read-event-sequence-1006): Delete functions. + (xterm-mouse--read-event-sequence): New function that handles both at + the same time. Handle mouse-movements. + (xterm-mouse--read-utf8-char, xterm-mouse--read-number-from-terminal): + New functions. + (xterm-mouse-event): Simplify. + (xterm-mouse-tracking-enable-sequence) + (xterm-mouse-tracking-disable-sequence): Enable mouse tracking. + + * mouse.el (mouse-drag-line): Also ignore `vertical-line' prefix events. + +2015-03-24 Michael Albinus + + * net/tramp-sh.el (tramp-do-file-attributes-with-ls) + (tramp-do-file-attributes-with-stat): Quote file names in output. + (tramp-do-directory-files-and-attributes-with-stat): Use "//" as marker. + +2015-03-24 Daiki Ueno + + * epg.el (epg-start-generate-key): Fix typo in "gpg --gen-key" + invocation; make the PARAMETERS documentation clearer. + +2015-03-24 Stefan Monnier + + Add cl-struct specific optimizations to pcase. + * emacs-lisp/cl-macs.el (cl--struct-all-parents) + (cl--pcase-mutually-exclusive-p): New functions. + (pcase--mutually-exclusive-p): Advise to optimize cl-struct patterns. + + * emacs-lisp/pcase.el (pcase--split-pred): Handle quoted string. + +2015-03-23 Stefan Monnier + + Add new `cl-struct' and `eieio' pcase patterns. + * emacs-lisp/cl-macs.el (cl-struct): New pcase pattern. + * emacs-lisp/eieio.el (eieio-pcase-slot-index-table) + (eieio-pcase-slot-index-from-index-table): New functions. + (eieio): New pcase pattern. + * emacs-lisp/pcase.el (pcase--make-docstring): New function. + (pcase): Use it to build the docstring. + (pcase-defmacro): Make sure the macro is lazy-loaded. + (\`): Move its docstring from `pcase'. + +2015-03-23 Glenn Morris + + * emacs-lisp/authors.el (authors-aliases) + (authors-obsolete-files-regexps): Additions. + +2015-03-23 Jan Djärv + + * simple.el (deactivate-mark): Only modify PRIMARY if we own + PRIMARY (Bug#18939). + +2015-03-23 Martin Rudalics + + * emacs-lisp/debug.el (debug): Don't try using "previous" window + when its not live or on an invisible frame (Bug#17170). + +2015-03-23 Dmitry Gutov + + * json.el (json-decode-char0): Delete this alias as well. + (json-read-escaped-char): Don't call it (bug#20154). + +2015-03-23 Daniel Colascione + + * emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p): New function. + (lisp--el-match-keyword): Use it. + +2015-03-23 Daiki Ueno + + * subr.el (start-process): New function, ported from the C + implementation. + +2015-03-23 Daniel Colascione + + Automatically adjust process window sizes. + + * window.el (window-adjust-process-window-size-function): + New customizable variable. + (window-adjust-process-window-size) + (window-adjust-process-window-size-smallest) + (window-adjust-process-window-size-largest) + (window--process-window-list, window--adjust-process-windows): + New functions. + (window-configuration-change-hook): + Add `window--adjust-process-windows'. + * term.el (term-mode): Observe result of + `window-adjust-process-window-size-function'. + (term-check-size): Delete. + +2015-03-22 Jackson Ray Hamilton + + * textmodes/sgml-mode.el (sgml-attribute-offset): New defcustom. + (sgml-calculate-indent): Use `sgml-attribute-offset' for attribute + indentation (bug#20161). + +2015-03-22 Dmitry Gutov + + * json.el (json-encode-char0): Delete this alias. + (json-encode-string): Rewrite to improve performance (bug#20154). + (json-encode-char): Fold into `json-encode-string'. + +2015-03-22 Artur Malabarba + + * menu-bar.el (menu-bar-update-buffers): Count displayed buffers + for `buffers-menu-max-size', not total buffers. + +2015-03-21 Titus von der Malsburg + + * window.el (window-font-width, window-font-height) + (window-max-chars-per-line): New functions. + + * simple.el (default-font-height): Doc fix. + (default-font-width): New function. + +2015-03-21 Tassilo Horn + + * emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-1): + Also recognize (cl-)defmethod with (setf method) name. + +2015-03-20 Tassilo Horn + + * emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-1): + Fix false positive in function name font-locking. + (lisp-cl-font-lock-keywords-1): Ditto. + +2015-03-20 Stefan Monnier + + * emacs-lisp/cl-macs.el (cl-defsubst): Ignore false-positive + occurrences of args via &cl-defs (bug#20149). + +2015-03-20 Alan Mackenzie + + Fix debbugs#20146 + + * font-lock.el (font-lock-extend-jit-lock-region-after-change): + Return the calculated values, as per spec. + +2015-03-20 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-font-lock-keywords): Move `at_exit' + and `callcc' to the "methods with required arguments" section, + they need a block argument. Remove a `throw' duplicate. + +2015-03-19 Vibhav Pant + + * progmodes/cperl-mode.el (cperl-electric-backspace): + Call delete-backward-space interactively instead of delete-char. + +2015-03-19 Stefan Monnier + + * emacs-lisp/pcase.el (pcase-lambda): Rewrite. + + * emacs-lisp/eieio.el (object-slots): Return slot names as before + (bug#20141). + +2015-03-19 Stefan Monnier + + EIEIO: Change class's representation to unify instance and class slots + * emacs-lisp/eieio-core.el (eieio--class): Change field names and order + to match those of cl--class; use cl--slot for both instance slots and + class slots. + (eieio--object-num-slots): Use cl-struct-slot-info. + (eieio--object-class): Rename from eieio--object-class-object. + (eieio--object-class-name): Remove. + (eieio-defclass-internal): Adjust to new slot representation. + Store doc in class rather than in `variable-documentation'. + (eieio--perform-slot-validation-for-default): Change API to take + a slot object. + (eieio--slot-override): New function. + (eieio--add-new-slot): Rewrite. + (eieio-copy-parents-into-subclass): Rewrite. + (eieio--validate-slot-value, eieio--validate-class-slot-value) + (eieio-oref-default, eieio-oset-default) + (eieio--class-slot-name-index, eieio-set-defaults): Adjust to new + slot representation. + (eieio--c3-merge-lists): Simplify. + (eieio--class/struct-parents): New function. + (eieio--class-precedence-bfs): Use it. + + * emacs-lisp/eieio.el (with-slots): Use macroexp-let2. + (object-class-fast): Change recommend replacement. + (eieio-object-class): Rewrite. + (slot-exists-p): Adjust to new slot representation. + (initialize-instance): Adjust to new slot representation. + (object-write): Adjust to new slot representation. + + * emacs-lisp/eieio-opt.el (eieio--help-print-slot): New function + extracted from eieio-help-class-slots. + (eieio-help-class-slots): Use it. Adjust to new slot representation. + + * emacs-lisp/eieio-datadebug.el (data-debug/eieio-insert-slots): + Declare to silence warnings. + (data-debug-insert-object-button): Avoid `object-slots'. + (data-debug/eieio-insert-slots): Adjust to new slot representation. + + * emacs-lisp/eieio-custom.el (eieio-object-value-create) + (eieio-object-value-get): Adjust to new slot representation. + + * emacs-lisp/eieio-compat.el + (eieio--generic-static-symbol-specializers): + Extract from eieio--generic-static-symbol-generalizer. + (eieio--generic-static-symbol-generalizer): Use it. + + * emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object): + Manually map initargs to slot names. + (eieio-persistent-validate/fix-slot-value): Adjust to new + slot representation. + + * emacs-lisp/cl-preloaded.el (cl--class): Fix type of `parents'. + +2015-03-19 Vibhav Pant + + * leim/quail/hangul.el (hangul-delete-backward-char) + (hangul-to-hanja-conversion): + * progmodes/cperl-mode.el (cperl-electric-keyword) + (cperl-electric-backspace): Use delete-char instead of + delete-backward-char, fixes compilation warnings. + +2015-03-18 Michael Albinus + + * net/tramp-sh.el (tramp-do-directory-files-and-attributes-with-stat): + Mark apostrophs with ?/ instead of \037. (Bug#20117) + +2015-03-18 Stefan Monnier + + Add classes as run-time descriptors of cl-structs. + * emacs-lisp/cl-preloaded.el (cl--struct-get-class): New function. + (cl--make-slot-desc): New constructor. + (cl--plist-remove, cl--struct-register-child): New functions. + (cl-struct-define): Rewrite. + (cl-structure-class, cl-structure-object, cl-slot-descriptor) + (cl--class): New structs. + (cl--struct-default-parent): Initialize it here. + * emacs-lisp/cl-macs.el (cl--find-class): New macro. + (cl-defsubst, cl--defsubst-expand, cl--sublis): Move before first use. + (cl--struct-default-parent): New var. + (cl-defstruct): Adjust to new representation of classes; add + default parent. In accessors, signal `wrong-type-argument' rather than + a generic error. + (cl-struct-sequence-type, cl-struct-slot-info) + (cl-struct-slot-offset): Rewrite. + * emacs-lisp/cl-generic.el (cl--generic-struct-specializers) + (cl-generic-generalizers): Rewrite. + + * emacs-lisp/macroexp.el (macroexp--debug-eager): New var. + (internal-macroexpand-for-load): Use it. + + * emacs-lisp/debug.el (debug--implement-debug-on-entry): + Bind inhibit-debug-on-entry here... + (debug): Instead of here. + +2015-03-18 Dima Kogan + + Have gud-display-line not display source buffer in gud window. + * progmodes/gud.el (gud-display-line): Make display-buffer + not reuse selected window. (Bug#17675, Bug#19901, Bug#20034) + +2015-03-17 Tassilo Horn + + * emacs-lisp/byte-run.el (macro-declarations-alist): + New declaration no-font-lock-keyword. + (defmacro): Flush font-lock in existing elisp buffers. + + * emacs-lisp/lisp-mode.el (lisp--el-update-after-load) + (lisp--el-update-macro-regexp, lisp--el-macro-regexp): + Delete functions and defconst. + (lisp--el-match-keyword): Rename from lisp--el-match-macro. + (lisp--el-font-lock-flush-elisp-buffers): New function. + (lisp-mode-variables): Remove code for updating + lisp--el-macro-regexp, and add + lisp--el-font-lock-flush-elisp-buffers to after-load-functions. + +2015-03-17 Simen Heggestøyl + + * textmodes/css-mode.el (css--font-lock-keywords): + Discriminate between pseudo-classes and pseudo-elements. + (css-pseudo-ids): Remove. + (css-pseudo-class-ids, css-pseudo-element-ids): New variables. + (css--complete-property): New function for completing CSS properties. + (css--complete-pseudo-element-or-class): New function + completing CSS pseudo-elements and pseudo-classes. + (css--complete-at-rule): New function for completing CSS at-rules. + (css-completion-at-point): New function. + (css-mode): Add support for completion. + (css-extract-keyword-list, css-extract-parse-val-grammar) + (css-extract-props-and-vals): Remove function in favor of manual + extraction. + (css-at-ids): Update list of CSS at-rule ids. + (css-property-ids): Update list of CSS properties. + +2015-03-17 Bozhidar Batsov + + * progmodes/ruby-mode.el (ruby-font-lock-keywords): Font-lock + more Kernel methods. + +2015-03-17 Michael Albinus + + * net/tramp-sh.el (tramp-maybe-send-script): Avoid leading tabs in + shell scripts. (Bug#20118) + +2015-03-17 Eli Zaretskii + + * mouse.el (mouse-appearance-menu): If w32-use-w32-font-dialog is + nil, construct a menu of fixed fonts. This resurrects a feature + lost in Emacs 23. + + * w32-vars.el (w32-use-w32-font-dialog): Add a ':set' function to + reset mouse-appearance-menu-map, so the font dialog is recomputed + the next time the menu is requested. + (w32-fixed-font-alist): Fix to use correct names of Courier fonts. + +2015-03-17 Stefan Monnier + + * emacs-lisp/cl-macs.el (cl--transform-lambda): Refine last change + (bug#20125). + +2015-03-17 Michael Albinus + + * net/tramp-sh.el (tramp-ssh-controlmaster-options): Change test + for ControlPath in order to avoid DNS timeouts. (Bug#20015) + +2015-03-16 Alan Mackenzie + + Edebug: Allow "S" to work during trace mode. Fixes debbugs #20074. + Also display the overlay arrow in go and go-nonstop modes. + + * emacs-lisp/edebug.el (edebug--display-1): Move the + `input-pending' test to after trace mode's `sit-for'. + (edebug--recursive-edit): Insert "(sit-for 0)" after + "(edebug-overlay-arrow)". + +2015-03-16 Stefan Monnier + + * emacs-lisp/cl-macs.el (cl--transform-lambda): Rework to avoid + cl--do-arglist in more cases; add comments to explain what's going on. + (cl--do-&aux): New function extracted from cl--do-arglist. + (cl--do-arglist): Use it. + + * emacs-lisp/cl-generic.el: Add Version: header, for ELPA purposes. + + * obsolete/iswitchb.el (iswitchb-read-buffer): Add `predicate' arg. + * isearchb.el (isearchb-iswitchb): Adjust accordingly. + * ido.el (ido-read-buffer): Add `predicate' argument. + * misearch.el (unload-function-defs-list): Declare before use. + +2015-03-16 Vibhav Pant + + * net/browse-url.el (browse-url-browser-function): Add "Conkeror". + (browse-url-conkeror-program, browse-url-conkeror-arguments) + (browse-url-conkeror-new-window-is-buffer): New defcustoms. + (browse-url-default-browser): Check for `browse-url-conkeror' + and call `browse-url-conkeror-program'. + (browse-url-conkeror): New command. + (bug#19863) + +2015-03-16 Vibhav Pant + + * eshell/esh-mode.el (eshell/clear): New function. + +2015-03-16 Alan Mackenzie + + Make Edebug work with Follow Mode. + + * emacs-lisp/edebug.el (edebug--display-1): Remove call to + edebug-adjust-window. + (edebug--recursive-edit): Don't bind pre/post-command-hooks to nil + over the recursive edit. + (edebug-adjust-window): Remove. + +2015-03-15 Michael Albinus + + * net/tramp-adb.el: + * net/tramp-gvfs.el: + * net/tramp-sh.el: + * net/tramp-smb.el: Set tramp-autoload cookie for all defcustoms. + + * net/tramp.el (tramp-ssh-controlmaster-options) + (tramp-use-ssh-controlmaster-options): Move them to tramp-sh.el. + (tramp-default-method): Do not check for + `tramp-ssh-controlmaster-options'. + + * net/tramp-sh.el (tramp-use-ssh-controlmaster-options): + New defcustom, moved from tramp.el. + (tramp-ssh-controlmaster-options): New defvar, moved from tramp.el + but with a nil initial value. + (tramp-ssh-controlmaster-options): New defun. + (tramp-do-copy-or-rename-file-out-of-band) + (tramp-maybe-open-connection): Use it. (Bug#20015) + +2015-03-15 Tassilo Horn + + * emacs-lisp/lisp-mode.el (lisp--el-macro-regexp): New defconst. + (lisp--el-update-macro-regexp, lisp--el-update-after-load) + (lisp--el-match-macro): New functions. + (lisp-mode-variables): Update lisp--el-macro-regexp and add + lisp--el-update-after-load to after-load-functions. + +2015-03-15 Daniel Colascione + + * emacs-lisp/cl-indent.el + (lisp-indent-backquote-substitution-mode): New user option. + (common-lisp-indent-function-1, common-lisp-loop-part-indentation) + (common-lisp-indent-function): Support normally indenting + backquote substitutions. + (extended-loop-p): Rename to `lisp-extended-loop-p'. + +2015-03-14 Michael R. Mauger + + * progmodes/sql.el: Version 3.5 + (sql-starts-with-prompt-re, sql-ends-with-prompt-re): Match password prompts. + (sql-interactive-remove-continuation-prompt): Fix regression. (Bug#6686) + +2015-03-14 Daniel Colascione + + * widget.el (define-widget): Check that documentation is a string + or nil; prevent wailing and gnashing of teeth when users forget to + pass a docstring and wonder why their properties don't work. + + * startup.el (command-line): Process "--no-x-resources". + +2015-03-13 Kevin Ryde + + info-look fixes for Texinfo 5 + * info-look.el (c-mode, bison-mode, makefile-mode) + (makefile-automake-mode, texinfo-mode, autoconf-mode, awk-mode) + (latex-mode, emacs-lisp-mode, sh-mode, cfengine-mode): + Match `foo' and 'foo' and ‘foo’ for @item and similar. + (latex-mode): Match multi-arg \frac{num}{den} or \sqrt[root]{n} in + suffix regexp. + +2015-03-12 Juri Linkov + + * simple.el (next-line-or-history-element) + (previous-line-or-history-element): Remember the goal column of + possibly multi-line input, and restore it afterwards. (Bug#19824) + +2015-03-12 Rasmus Pank Roulund + + * ido.el (ido-add-virtual-buffers-to-list): Include bookmark-alist + files (bug#19335). + +2015-03-12 Eli Zaretskii + + * international/fontset.el (script-representative-chars): Add a + representative character for 'vai'. + +2015-03-11 Stefan Monnier + + * international/quail.el (quail-input-method): + Use with-silent-modifications. + + * simple.el (goto-history-element): Don't burp on t history. + +2015-03-10 Paul Eggert + + Prefer "initialize" to "initialise" + * progmodes/js.el (js-indent-first-init): + Rename from js-indent-first-initialiser, to avoid worrying about + American vs British spelling. All uses changed. + +2015-03-10 Glenn Morris + + * progmodes/js.el (js-indent-first-initialiser): + Fix doc, type, version. + +2015-03-10 Jackson Ray Hamilton + + * progmodes/js.el (js-indent-first-initialiser): New option. + (js--maybe-goto-declaration-keyword-end): New function. + (js--proper-indentation): Use js--maybe-goto-declaration-keyword-end. + +2015-03-10 Thomas Fitzsimmons + + * net/ldap.el (ldap-attribute-syntaxes-alist): Add LDAP attributes + from RFC2798 Section 9.1.1. (Bug#8983) + +2015-03-09 Nicolas Petton + + * emacs-lisp/seq.el (seq-into): New function. + Bump seq.el version to 1.3. + +2015-03-09 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-font-lock-keywords): Don't consider + `=' a part of symbol when followed by `>'. (Bug#18644) + (ruby-syntax-before-regexp-re): Detect regexps after `!'. + (Bug#19285) + +2015-03-09 Eli Zaretskii + + * dired.el (dired-delete-file): Doc fix. (Bug#20021) + +2015-03-06 Sergio Durigan Junior + Thomas Fitzsimmons + + * net/eudcb-bbdb.el (eudc-bbdb-field): New function. + (eudc-bbdb-filter-non-matching-record): Call eudc-bbdb-field. + (eudc-bbdb-format-record-as-result): Likewise. + +2015-03-08 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-font-lock-keywords): + Use `font-lock-constant-face' for nil, true and false. + Highlight `self' as a keyword. (Bug#17733) + +2015-03-08 Nobuyoshi Nakada + + * progmodes/ruby-mode.el (ruby-syntax-before-regexp-re): + Expect beginning of regexp also after open brace or vertical bar. + (Bug#20026) + +2015-03-07 Stefan Monnier + + * battery.el (battery-echo-area-format): Simplify default. + (battery-linux-sysfs): Standardize on energy&power. Accept ADP1 + for AC adapter. + + * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't try to + unfold `closure's since byte-compile-unfold-lambda doesn't know how to + do it. + +2015-03-06 Oscar Fuentes + + * net/browse-url.el (browse-url-firefox): Remove outdated + MS-Windows limitations. + +2015-03-06 Thomas Fitzsimmons + + * net/eudcb-ldap.el (eudc-ldap-cleanup-record-simple): Mark as + obsolete. + (eudc-ldap-cleanup-record-filtering-addresses): Add docstring. + Don't clean up postal addresses if ldap-ignore-attribute-codings + is set. Combine mail addresses into one field. (Bug#17720) + (eudc-ldap-simple-query-internal): + Call eudc-ldap-cleanup-record-filtering-addresses instead of + eudc-ldap-cleanup-record-simple. + (eudc-ldap-get-field-list): Likewise. + +2015-03-05 Ivan Shmakov + + * net/eww.el (eww-html-p): New function (bug#20009). + (eww-render): Use it. + +2015-03-05 Artur Malabarba + + * desktop.el (desktop-buffer-info): Write docstring. + (desktop-buffer-info): Use `pushnew' instead of `add-to-list' and + unquote lamda. + + * emacs-lisp/package.el (package-refresh-contents): Update doc. + +2015-03-05 Dmitry Gutov + + * progmodes/js.el (js-mode-syntax-table): Add an entry for `. + +2015-03-05 Stefan Monnier + + Replace *-function vars with generic functions in cl-generic. + * emacs-lisp/cl-generic.el (cl--generic-generalizer): New struct. + (cl-generic-tagcode-function, cl-generic-tag-types-function): Remove. + (cl--generic-t-generalizer): New const. + (cl--generic-make-method): Rename from `cl--generic-method-make'. + (cl--generic-make): Change calling convention. + (cl--generic): Add `options' field. + (cl-generic-function-options): New function. + (cl-defgeneric): Rewrite handling of options. Add support for :method + options and allow the use of a default body. + (cl-generic-define): Save options in the corresponding new field. + (cl-defmethod): Fix ordering of qualifiers. + (cl-generic-define-method): Use cl-generic-generalizers. + (cl--generic-get-dispatcher): Change calling convention, and change + calling convention of the returned function as well so as to take the + list of methods separately from the generic function object, so that it + can receive the original generic function object. + (cl--generic-make-next-function): New function, extracted from + cl--generic-make-function. + (cl--generic-make-function): Use it. + (cl-generic-method-combination-function): Remove. + (cl--generic-cyclic-definition): New error. + (cl-generic-call-method): Take a generic function object rather than + its name. + (cl-method-qualifiers): New alias. + (cl--generic-build-combined-method): Use cl-generic-combine-methods, + don't segregate by qualifiers here any more. + (cl--generic-standard-method-combination): Segregate by qualifiers + here instead. Add support for the `:extra' qualifier. + (cl--generic-cache-miss): Move earlier, adjust to new calling convention. + (cl-generic-generalizers, cl-generic-combine-methods): + New generic functions. + (cl-no-next-method, cl-no-applicable-method, cl-no-primary-method): + Use the new "default method in defgeneric" functionality, change + calling convention to receive a generic function object. + (cl--generic-head-used): New var. + (cl--generic-head-generalizer, cl--generic-eql-generalizer) + (cl--generic-struct-generalizer, cl--generic-typeof-generalizer): + New consts. + * emacs-lisp/eieio-core.el (eieio--generic-generalizer) + (eieio--generic-subclass-generalizer): New consts. + (cl-generic-generalizers): New methods. + * emacs-lisp/eieio-compat.el (eieio--generic-static-symbol-generalizer) + (eieio--generic-static-object-generalizer): New consts. + (cl-generic-generalizers) <(head eieio--static)>: New method. + * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): + Unfold closures like lambdas. + +2015-03-04 Filipp Gunbin + + * autorevert.el (auto-revert-notify-add-watch): + Fix handler installation. (Bug#20000) + +2015-03-04 Rüdiger Sonderfeld + + * net/eww.el (eww-search-prefix, eww-open-file, eww-search-words) + (eww-same-page-p,eww-set-character-encoding): Fix docstring. + (eww): Do not end error messages with a period. + +2015-03-04 Zhongwei Yao + + * net/tramp-adb.el (tramp-adb-connect-if-not-connected): + New user option. + (tramp-adb-ls-toolbox-regexp): Fix regexp in order to support file + names starting with a space. + (tramp-methods): Add `tramp-default-port' for "adb". + (tramp-adb-parse-device-names): Add traces. Return device names + with port, if present. + (tramp-adb-handle-directory-files-and-attributes): Quote all + remote file names. + (tramp-adb-get-device): New defun. + (tramp-adb-execute-adb-command, tramp-adb-maybe-open-connection): + Use it. + (tramp-adb-maybe-open-connection): Set `tramp-current-*' + variables. Remove checks for listed devices. + +2015-03-04 Michael Albinus + + * net/tramp.el (tramp): Add :link property. + (tramp-login-prompt-regexp): Allow also "user", as required by + Fritz!Box telnet. + (tramp-autoload-file-name-handler): Use "/". + (tramp-handle-unhandled-file-name-directory): Return nil when + required by the spec. + + * net/tramp-cache.el (tramp-dump-connection-properties): + Use `with-temp-file'. + + * net/tramp-sh.el (tramp-perl-file-attributes) + (tramp-perl-directory-files-and-attributes): Escape apostrophes in + file names. + (tramp-do-file-attributes-with-stat): Quote file name. + (tramp-sh-handle-directory-files-and-attributes): Fall back to + `tramp-handle-directory-files-and-attributes' in case of problems. + (tramp-do-directory-files-and-attributes-with-stat) + (tramp-sh-handle-file-name-all-completions) + (tramp-sh-handle-delete-directory) + (tramp-sh-handle-expand-file-name, tramp-sh-handle-process-file): + Normalize use of "cd". + (tramp-do-directory-files-and-attributes-with-stat): Use the + `quoting-style' arg of `ls' if possible. Make it also working for + file names with apostrophes. + (tramp-sh-handle-file-name-all-completions): Use arguments of `ls' + in proper order. + (tramp-do-copy-or-rename-file-via-buffer) + (tramp-sh-handle-file-local-copy): Use `with-temp-file'. + (tramp-get-remote-locale): Accept also \r in output. + (tramp-get-ls-command-with-quoting-style): New defun. + (tramp-get-inline-coding): Set `default-directory' to a local + directory. Sporadically, `call-process-region' does not handle a + remote default directory properly. + + * net/trampver.el: Update release number. + +2015-03-03 Agustín Martín Domingo + + * textmodes/ispell.el (ispell-aspell-find-dictionary): Make sure + .dat files for aspell dicts are also searched for in location + described by `ispell-aspell-dict-dir', matching aspell's dict-dir + variable. + +2015-03-03 Agustín Martín Domingo + + * textmodes/ispell.el (ispell-dicts-name2locale-equivs-alist) + (ispell-hunspell-fill-dictionary-entry) + (ispell-find-hunspell-dictionaries) + (ispell-set-spellchecker-params): New generic name for + `ispell-hunspell-dictionary-equivs-alist'. + (ispell-aspell-add-aliases): Also use + `ispell-dicts-name2locale-equivs-alist' to get aspell aliases for + standard dict names. + +2015-03-03 Glenn Morris + + * net/browse-url.el (browse-url-firefox-startup-arguments): + Make obsolete. + (browse-url-firefox): Doc fix. Remove -remote, which no longer + exists in Firefox 36. (Bug#19921) + (browse-url-firefox-sentinel): Remove function. + +2015-03-03 Eli Zaretskii + + * frame.el (blink-cursor-timer-function): Don't increment + blink-cursor-blinks-done counter when a menu is active on a w32 + frame. (Bug#19925) + +2015-03-03 Juri Linkov + + * comint.el (comint-line-beginning-position): Revert searching for + the prompt when comint-use-prompt-regexp is non-nil because it + doesn't distinguish input from output. Check the field property + `output' for the case when comint-use-prompt-regexp is nil. + (Bug#19710) + +2015-03-03 Jérémy Compostella + + * net/tramp-sh.el (tramp-remote-process-environment): Disable paging + with PAGER=cat. (Bug#19870) + +2015-03-03 Glenn Morris + + * textmodes/flyspell.el (flyspell-duplicate-distance): + Bump :version. + +2015-03-03 Eli Zaretskii + + * textmodes/text-mode.el (text-mode-syntax-table): Make some + punctuation character behave as word-constituent, for more + compatibility with Unicode. + + * simple.el (transient-mark-mode): Doc fix. (Bug#19841) + +2015-03-03 Agustín Martín Domingo + + Improve string search in `flyspell-word-search-*`. (Bug#16800) + * textmodes/flyspell.el (flyspell-duplicate-distance): + Limit default search distance for duplicated words to 40000. + (flyspell-word-search-backward, flyspell-word-search-forward): + Search as full word with defined casechars, not as substring. + +2015-03-03 Juri Linkov + + Better support for the case of typing RET on the prompt in comint. + * comint.el (comint-get-old-input-default): Go to the field end + when comint-use-prompt-regexp is nil. + (comint-line-beginning-position): Check if point is already + on the prompt before searching for the prompt when + comint-use-prompt-regexp is non-nil. (Bug#19710) + +2015-03-03 Eli Zaretskii + + * frame.el (frame-notice-user-settings): Refresh the value of + frame parameters after calling tty-handle-reverse-video. + Call face-set-after-frame-default with the actual parameters, to avoid + resetting colors back to unspecified. + (set-background-color, set-foreground-color): Pass the foreground + and background colors to face-set-after-frame-default. (Bug#19802) + +2015-03-03 Wolfgang Jenkner + + * net/network-stream.el (network-stream-open-tls): Respect the + :end-of-capability setting. + +2015-03-03 Juri Linkov + + Revert the previous change of comint-line-beginning-position callers, + and modify comint-line-beginning-position instead. + + * comint.el (comint-history-isearch-search) + (comint-history-isearch-message, comint-history-isearch-wrap): + Use comint-line-beginning-position instead of field-beginning. + (comint-send-input): Use either end-of-line or field-end + depending on comint-use-prompt-regexp. + (comint-line-beginning-position): Search backward + for comint-prompt-regexp if comint-use-prompt-regexp is non-nil. + Use field-beginning instead of line-beginning-position + if comint-use-prompt-regexp is nil. (Bug#19710) + +2015-03-03 Robert Pluim (tiny change) + + * calendar/todo-mode.el (todo-item-done): When done items are + hidden, restore point to its location prior to invoking this + command. (Bug#19727) + +2015-03-03 Eli Zaretskii + + * textmodes/artist.el (artist-ellipse-compute-fill-info): + Use mapcar, not mapc, to create the other half of fill-info. + (Bug#19763) + +2015-03-03 Nicolas Petton + + * emacs-lisp/authors.el (authors-ignored-files) + (authors-renamed-files-alist): Additions. + +2015-03-03 Michael Albinus + + * net/tramp.el (tramp-ssh-controlmaster-options): Don't use a + tempfile for ControlPath. (Bug#19702) + +2015-03-03 Michael Albinus + + * net/tramp.el (tramp-ssh-controlmaster-options): Use "%C" for + ControlPath if possible. (Bug#19702) + +2015-03-03 Glenn Morris + + * emacs-lisp/authors.el (authors-obsolete-files-regexps) + (authors-valid-file-names, authors-renamed-files-alist): Additions. + +2015-03-03 Alan Mackenzie + + CC Mode: Stop Font Lock forcing fontification from BOL. (Bug#19669) + * progmodes/cc-mode.el (c-font-lock-init): + Set font-lock-extend-region-functions to nil. + +2015-03-03 Daniel Colascione + + * emacs-lisp/generator.el: Make globals conform to elisp + style throughout. Use more efficient font-lock patterns. + (cps-inhibit-atomic-optimization): Rename from + `cps-disable-atomic-optimization'. + (cps--gensym): New macro; replaces `cl-gensym' throughout. + (cps-generate-evaluator): Move the `iter-yield' local macro + definition here + (iter-defun, iter-lambda): from here. + + (iter-defun): Use `macroexp-parse-body'. + +2015-03-03 Daniel Colascione + +2015-03-03 Stefan Monnier + + * progmodes/gud.el: Use lexical-binding (bug#19966). + + * emacs-lisp/gv.el (gv-ref): Warn about likely problematic cases. + +2015-03-03 Daniel Colascione + + * emacs-lisp/generator.el: Make globals conform to elisp + style throughout. Use more efficient font-lock patterns. + (cps-inhibit-atomic-optimization): Rename from + `cps-disable-atomic-optimization'. + (cps--gensym): New macro; replaces `cl-gensym' throughout. + (cps-generate-evaluator): Move the `iter-yield' local macro + definition here... + (iter-defun, iter-lambda): ...from here. + +2015-03-03 Artur Malabarba + + * emacs-lisp/package.el (package-autoremove): Fix if logic. + +2015-03-03 Martin Rudalics + + * window.el (window--dump-frame): For pixel height return total + number of frame's lines. + +2015-03-03 Daniel Colascione + + * emacs-lisp/cl-macs.el (cl-iter-defun): Add cl-iter-defun. + + * emacs-lisp/generator.el (iter-defun): Correctly propagate + docstrings and declarations to underlying function. + +2015-03-02 Daniel Colascione + + * emacs-lisp/generator.el: New file. + + * vc/vc.el (vc-responsible-backend): Add autoload cookie for + `vc-responsible-backend'. + +2015-03-01 Michael Albinus + + * vc/vc-hooks.el (vc-state, vc-working-revision): + Use `vc-responsible-backend' in order to support unregistered files. + + * vc/vc-rcs.el (vc-rcs-unregister): Support unregistered files. + + * vc/vc-rcs.el (vc-rcs-fetch-master-state): + * vc/vc-sccs.el (vc-sccs-working-revision): Handle undefined + master name. + + * vc/vc-src.el (vc-src-working-revision): Do not return an empty string. + +2015-03-01 Lars Magne Ingebrigtsen + + * net/shr.el (shr-insert): Remove soft hyphens. + (shr-insert): Also remove soft hypens from non-folded text. + +2015-02-28 Eli Zaretskii + + * mail/rmailmm.el (rmail-mime-insert-html): Decode HTML payload + when the charset is only given by the HTML , and allow to + specify the encoding with "C-x RET c". + +2015-02-27 Mark Laws + + Support daemon mode on MS-Windows (bug#19688) + * server.el (server-process-filter): Force GUI frames on + MS-Windows in daemon mode, even if a TTY frame was requested. + + * frameset.el (frameset-keep-original-display-p): Don't assume + windows-nt cannot be in daemon mode. + + * frame.el (window-system-for-display): Don't assume windows-nt + cannot be in daemon mode. + +2015-02-26 Ivan Shmakov + + * faces.el (face-list-p): Split from face-at-point. + (face-at-point): Use it. + * facemenu.el (facemenu-add-face): Likewise. (Bug#19912) + +2015-02-26 Oscar Fuentes + + * vc/vc.el (vc-annotate-switches): New defcustom. + * vc/vc-bzr.el (vc-bzr-annotate-switches): New defcustom. + (vc-bzr-annotate-command): Use vc-switches. + * vc/vc-cvs.el (vc-cvs-annotate-switches): New defcustom. + (vc-cvs-annotate-command): Use vc-switches. + * vc/vc-git.el (vc-git-annotate-switches): New defcustom. + (vc-git-annotate-command): Use vc-switches. + * vc/vc-hg.el (vc-hg-annotate-switches): New defcustom. + (vc-hg-annotate-command): Use vc-switches. + * vc/vc-mtn.el (vc-mtn-annotate-switches): New defcustom. + (vc-mtn-annotate-command): Use vc-switches. + * vc/vc-svn.el (vc-svn-annotate-switches): New defcustom. + (vc-svn-annotate-command): Use vc-switches. + +2015-02-26 Alan Mackenzie + + Handle "#" operator properly inside macro. Fix coding bug. + + * progmodes/cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): + On finding a "#" which looks like the start of a macro, check it + isn't already inside a macro. + + * progmodes/cc-engine.el (c-state-safe-place): Don't record a new + "safe" position into the list of them when this is beyond our + current position. + +2015-02-26 Martin Rudalics + + * menu-bar.el (menu-bar-non-minibuffer-window-p): Return nil when + the menu frame is dead. (Bug#19728) + +2015-02-26 Fabián Ezequiel Gallina + + python.el: Handle tabs in python-indent-dedent-line. + * progmodes/python.el (python-indent-dedent-line): Fixes for + indentation with tabs. Thanks to (Bug#19730). + +2015-02-26 Fabián Ezequiel Gallina + + * progmodes/python.el (python-indent-context): Respect user + indentation after comment. + +2015-02-26 Tassilo Horn + + * textmodes/reftex-vars.el (featurep): Conditionalize value of + reftex-label-regexps in order to stay compatible with XEmacs 21.5 + which has no explicitly numbered groups in regexps (bug#19714). + +2015-02-26 Daiki Ueno + + * net/dbus.el (dbus-register-signal): Convert "N" of ":argN" to + integer before comparison. + +2015-02-25 Nicolas Richard + + * progmodes/elisp-mode.el (elisp--eval-last-sexp): Document argument. + +2015-02-25 Oleh Krehel + + * emacs-lisp/check-declare.el (check-declare-warn): + Use compilation-style warnings. + (check-declare-files): Make sure that + `check-declare-warning-buffer' is in `compilation-mode'. + +2015-02-25 Oleh Krehel + + * emacs-lisp/check-declare.el (check-declare-ext-errors): + New defcustom. + (check-declare): New defgroup. + (check-declare-verify): When `check-declare-ext-errors' is + non-nil, warn about an unfound function, instead of saying + "skipping external file". + +2015-02-25 Tassilo Horn + + * textmodes/reftex-vars.el (reftex-include-file-commands): + Call reftex-set-dirty on changes. + +2015-02-25 Stefan Monnier + + * emacs-lisp/edebug.el (edebug--display): Save-excursion (bug#19611). + * emacs-lisp/debug.el (debugger-env-macro): Remove redundant + save-excursion. + +2015-02-24 Glenn Morris + + * mail/rmailsum.el (rmail-summary-previous-all) + (rmail-summary-previous-msg): Simplify. + +2015-02-25 Artur Malabarba + + * simple.el (region-active-p): Fix doc to say non-nil. + +2015-02-24 Samer Masterson + + * eshell/em-hist.el (eshell-hist-parse-word-designator): + Return args joined with " ". + * eshell/em-pred.el (eshell-parse-modifiers): Correct docstring. + (eshell-hist-parse-modifier): Pass mod a list instead of a string + (bug#18960). + +2015-02-24 Karl Fogel (tiny change) + + * comint.el (comint-mode-map): Fix obvious typo. + +2015-02-24 Johan Claesson (tiny change) + + * filecache.el (file-cache-filter-regexps): + Add lock files. (Bug#19516) + +2015-02-24 Glenn Morris + + * mail/rmailsum.el (rmail-summary-next-all) + (rmail-summary-previous-all, rmail-summary-next-msg): + Fix handling of optional argument. (Bug#19916) + + * progmodes/f90.el (f90-beginning-of-subprogram) + (f90-end-of-subprogram, f90-match-end): + Handle continued strings where the continuation does not start + with "&" and happens to match our regexp. (Bug#19809) + +2015-02-24 Bozhidar Batsov + + * comint.el (comint-clear-buffer): New command. + (comint-mode-map): Bind `comint-clear-buffer' to 'C-c M-o'. + +2015-02-23 Pete Williamson (tiny change) + + Use ${EXEEXT} more uniformly in makefiles + * Makefile.in (EMACS): Append ${EXEEXT}. + +2015-02-23 Sam Steingold + + * files.el (recover-session): Handle `auto-save-list-file-prefix' + being a directory (empty non-directory part). + +2015-02-23 Magnus Henoch + + * net/sasl.el (sasl-mechanism-alist): Refer to sasl-scram-rfc + instead of sasl-scram-sha-1, as the former is the name that can be + required. + + * net/sasl-scram-rfc.el (sasl-scram-sha-1-steps) + (sasl-scram-sha-1-client-final-message) + (sasl-scram-sha-1-authenticate-server): Move to end of file. + +2015-02-23 Paul Eggert + + * bindings.el (ctl-x-map): Use [?\C-\;] to get the desired binding. + (Bug#19826) + +2015-02-23 Stefan Monnier + + * emacs-lisp/macroexp.el (macroexp-parse-body): Handle cl-declare + and :documentation. Change return value format accordingly. + * emacs-lisp/cl-generic.el (cl--generic-lambda): + * emacs-lisp/pcase.el (pcase-lambda): Adjust accordingly. + * emacs-lisp/cl-macs.el (cl--transform-lambda): Use macroexp-parse-body. + +2015-02-23 Dmitry Gutov + + Introduce `xref-etags-mode'. + * progmodes/xref.el (xref-etags-mode--saved): New variable. + (xref-etags-mode): New minor mode. (Bug#19466) + +2015-02-22 Lars Magne Ingebrigtsen + + * dom.el (dom-previous-sibling): New function. + +2015-02-21 Paul Eggert + + * bindings.el (ctl-x-map): There is no 'C-;'. + For now, make do with 'M-;'; this allows 'make bootstrap' to work. + Perhaps some other binding should be chosen. (Bug#19826) + +2015-02-21 Artur Malabarba + + * bindings.el (ctl-x-map): Fix `comment-line' binding. (Bug#19826) + +2015-02-21 Michael Albinus + + * autorevert.el (auto-revert-notify-add-watch) + (auto-revert-notify-handler, auto-revert-buffers): Handle also + buffers without an associated file, like dired buffers. (Bug#16112) + +2015-02-21 Dima Kogan + + * autorevert.el (auto-revert-mode, auto-revert-tail-mode) + (global-auto-revert-mode): Remove (let (auto-revert-use-notify) ... ) + wrappers. Call (auto-revert-buffers) consequently in order to + install handlers. + +2015-02-21 Wilson Snyder + + Sync with upstream verilog-mode revision 0d6420b. + * progmodes/verilog-mode.el (verilog-mode-version): Update. + (vector-skip-list): Remove. + (verilog-auto-inst-port, verilog-auto-inst-port-list) + (verilog-auto-inst, verilog-auto-inst-param): + Use arguments rather than vector-skip. + (verilog-auto-inst-port): Fix AUTOINST interfaces to not show + modport if signal attachment is itself a modport. + Reported by Matthew Lovell. + +2015-02-21 Reto Zimmermann + + Sync with upstream vhdl mode v3.37.1. Add VHDL'08 support. + * progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp) + (vhdl-doc-release-notes): Update. + (vhdl-standard): Add VHDL'08 option. + (vhdl-sensitivity-list-all): New option. + (vhdl-directive-keywords): Add psl. + (vhdl-offsets-alist-default, vhdl-mode-abbrev-table-init) + (vhdl-template-construct-alist-init, vhdl-create-mode-menu): + (vhdl-imenu-generic-expression): Add context, directive. + (vhdl-offsets-alist, vhdl-mode, vhdl-doc-keywords): Doc fixes. + (vhdl-template-map-init): Add vhdl-template-context. + (vhdl-mode-syntax-table): Support VHDL'08 block comments. + (vhdl-create-mode-menu): Add some entries. + (vhdl-08-keywords, vhdl-08-types, vhdl-08-attributes) + (vhdl-08-functions, vhdl-08-packages, vhdl-08-directives): + New constants. + (vhdl-directives): New variable. + (vhdl-words-init, vhdl-template-process) + (vhdl-template-replace-header-keywords): Support VHDL'08. + (vhdl-abbrev-list-init): Add vhdl-directives. + (vhdl-in-comment-p, vhdl-in-literal, vhdl-win-il) + (vhdl-forward-syntactic-ws, vhdl-get-syntactic-context) + (vhdl-lineup-comment): Handle block comments and directives. + (vhdl-beginning-of-directive, vhdl-template-context) + (vhdl-template-context-hook): New functions. + (vhdl-libunit-re, vhdl-defun-re, vhdl-begin-p) + (vhdl-corresponding-begin, vhdl-get-library-unit, vhdl-regress-line) + (vhdl-align-declarations, vhdl-beginning-of-block, vhdl-end-of-block) + (vhdl-font-lock-keywords-2, vhdl-get-end-of-unit) + (vhdl-scan-context-clause): Add context. + +2015-02-20 Glenn Morris + + * calendar/solar.el (solar-sunrise-sunset-string): + Shorten message a little. + (sunrise-sunset): Use message rather than a window. (Bug#19859) + + * progmodes/f90.el (f90-keywords-re, f90-procedures-re) + (f90-font-lock-keywords-2): Some F2008 additions. + +2015-02-19 Dima Kogan + + * autorevert.el (auto-revert-buffers-counter) + (auto-revert-buffers-counter-lockedout): New variables. + (auto-revert-buffers): Increase `auto-revert-buffers-counter'. + (auto-revert-notify-handler): Apply `auto-revert-handler' if not + suppressed by lockout. (Bug#18958) + +2015-02-19 Stefan Monnier + + * emacs-lisp/eieio-opt.el (eieio-help-class): `eieio-class-parents' + returns classes, not class names (bug#19891). + + * emacs-lisp/cl-macs.el (cl-struct-slot-value): Handle a nil type. + + * emacs-lisp/smie.el (smie-prec2->grammar): Fix corner case problem. + +2015-02-18 Kelly Dean + + * register.el (jump-to-register): + * emacs-lisp/lisp.el (check-parens): + Push mark before goto-char so user doesn't lose his previous place. + +2015-02-18 Kelly Dean + + * rect.el (rectangle-mark-mode): + Suppress superfluous "Mark set" message from push-mark. + +2015-02-18 Kelly Dean + + * help-mode.el (help-go-back, help-go-forward, help-follow): + * simple.el (yank-pop, pop-to-mark-command, exchange-point-and-mark): + * winner.el (winner-redo): + * windmove.el (windmove-do-window-select): + * register.el (jump-to-register, increment-register, insert-register) + (append-to-register, prepend-to-register): + * files.el (find-alternate-file, abort-if-file-too-large, write-file) + (set-visited-file-name): + * emacs-lisp/lisp.el (kill-backward-up-list): + Use user-error instead of error. (Bug#14480) + +2015-02-18 Stefan Monnier + + * emacs-lisp/checkdoc.el (checkdoc-show-diagnostics): Don't make bogus + assumptions about window ordering. + +2015-02-16 Kelly Dean + + * files.el (insert-file-contents-literally): Fix docstring typo. + +2015-02-16 Kelly Dean + + * emacs-lisp/easy-mmode.el (define-minor-mode): Process macro + arguments correctly. (Bug#19685) + (define-minor-mode): Clarify docstring. + Clarify mode switch messages for minor modes. (Bug#19690) + +2015-02-16 Kelly Dean + + * emacs-lisp/package-x.el (package-upload-buffer-internal): + Create valid tar files. (Bug#19536) + +2015-02-16 Kelly Dean + + * desktop.el (desktop-read): Conditionally re-enable desktop autosave. + (Bug#19059) + +2015-02-16 Kelly Dean + + * help-mode.el (help-do-xref): Prevent duplicated display of Info + buffer, and prevent interference with existing buffer. (Bug#13190) + +2015-02-16 Fabián Ezequiel Gallina + + python.el: Do not deactivate mark on shell fontification. (Bug#19871) + + * progmodes/python.el (python-shell-font-lock-post-command-hook): + Do not deactivate mark on fontification. + +2015-02-16 Ivan Shmakov + + * net/eww.el: Fix desktop support. (Bug#19226) + (eww-mode): Add autoload cookie. + (eww-restore-desktop): Use inhibit-read-only. + + * net/eww.el (eww-suggest-uris): Add autoload cookie, so that + add-hook works correctly even if the file is not yet loaded. + +2015-02-16 Stefan Monnier + + * emacs-lisp/eieio.el (defclass): Use make-instance rather than + eieio-constructor. + (set-slot-value): Mark as obsolete. + (eieio-object-class-name): Improve call to eieio-class-name. + (eieio-slot-descriptor-name, eieio-class-slots): New functions. + (object-slots): Use it. Declare obsolete. + (eieio-constructor): Merge it with `make-instance'. + (initialize-instance): Use `dolist'. + (eieio-override-prin1, eieio-edebug-prin1-to-string): + Use eieio--class-print-name. + + * emacs-lisp/eieio-core.el (eieio--class-print-name): New function. + (eieio-class-name): Make it do what the docstring claims. + (eieio-defclass-internal): Simplify since `prots' isn't used any more. + (eieio--slot-name-index): Simplify accordingly. + (eieio-barf-if-slot-unbound): Pass the class object rather than its + name to `slot-unbound'. + + * emacs-lisp/eieio-base.el (make-instance): Add a method here rather + than on eieio-constructor. + +2015-02-16 Stefan Monnier + + * emacs-lisp/cl-macs.el (cl-defstruct): Keep type=nil by default. + * emacs-lisp/cl-preloaded.el (cl-struct-define): Add sanity checks + about relationship between `type', `named', and `slots'. + * emacs-lisp/cl-generic.el (cl--generic-struct-tagcode): Adjust to new + value of `cl-struct-type' property. + +2015-02-15 Jérémy Compostella + + * net/tramp-sh.el (tramp-remote-process-environment): Disable paging + with PAGER=cat. (Bug#19870) + +2015-02-14 Artur Malabarba + + * emacs-lisp/package.el (package-read-all-archive-contents): + Don't build the compatibility table. + (package-refresh-contents, package-initialize): Do build the + compatibility table. + (package--build-compatibility-table): New function. + (describe-package-1): Describe why a package is incompatible. + +2015-02-14 Stefan Monnier + + * emacs-lisp/cl-preloaded.el (cl-struct-define): Register as children + of the parent. + (cl--assertion-failed): New function. + (cl-assertion-failed): Move in from cl-lib.el. + + * emacs-lisp/cl-macs.el (cl-defstruct): Don't generate code to register + as children of its parents. + (cl--make-type-test, cl--compiler-macro-typep): Remove functions. + (cl-typep): Reimplement using define-inline. + (cl-assert): Use cl--assertion-failed. + (cl-struct-slot-value): Use define-inline. + + * emacs-lisp/cl-lib.el: Move autoloaded code to cl-preload. + + * textmodes/flyspell.el (flyspell-word): Defvar (bug#19844). + (flyspell-generic-check-word-p): Mark as obsolete. + +2015-02-13 Artur Malabarba + + * emacs-lisp/package.el (package--compatibility-table): New var. + (package--add-to-compatibility-table): New function. + (package-read-all-archive-contents): Populate compatibility table. + (package--incompatible-p): Also look in dependencies. + (describe-package-1): Fix "incompat" handling. + +2015-02-13 Lars Ingebrigtsen + + * net/rfc2104.el: Moved here from lisp/gnus. + +2015-02-13 Magnus Henoch + + * net/sasl-scram-rfc.el: New file. + + * net/sasl.el (sasl-mechanisms): Remove SCRAM-MD5. + Add SCRAM-SHA-1 first. + (sasl-mechanism-alist): Remove SCRAM-MD5 entry. Add SCRAM-SHA-1 + entry (bug#17636). + +2015-02-13 Lars Ingebrigtsen + + * net/shr.el (shr-tag-li): Speed up rendering pages with lots of +
    . + +2015-02-12 Oleh Krehel + + * progmodes/gdb-mi.el (gdb-display-io-nopopup): New defcustom. + (gdb-inferior-filter): Don't pop up the buried output buffer when + `gdb-display-io-nopopup' is non-nil. + +2015-02-12 Fabián Ezequiel Gallina + + python.el: Allow killing shell buffer if process is dead. (Bug#19823) + + * progmodes/python.el (python-shell-font-lock-kill-buffer): + Don't require a running process. + (python-shell-font-lock-post-command-hook): Fontify only if the + shell process is running. + +2015-02-11 Stefan Monnier + + * hi-lock.el (hi-lock-unface-buffer): Don't call + font-lock-remove-keywords if not needed (bug#19796). + +2015-02-11 Artur Malabarba + + * emacs-lisp/package.el (package-install): Invert the second + argument, for better backwards compatibility. + (package-install-button-action, package-reinstall) + (package-menu-execute): Account for the change. + +2015-02-11 Nicolas Petton + + * emacs-lisp/seq.el (seq-reverse): Add a backward-compatible + version of seq-reverse that works on sequences in Emacs 24. + Bump seq.el version to 1.2. + +2015-02-11 Artur Malabarba + + * emacs-lisp/package.el (package--incompatible-p): New function. + Return non-nil if PKG has no chance of being installable. + (package--emacs-version-list): New variable. + (describe-package-1, package-desc-status) + (package-menu--print-info, package-menu--status-predicate): + Account for the "incompat" status. + +2015-02-11 Martin Rudalics + + * frame.el (toggle-frame-maximized, toggle-frame-fullscreen): + Rename frame parameter `maximized' to `fullscreen-restore'. + Restore fullwidth/-height after fullboth state. Update doc-strings. + +2015-02-11 Lars Ingebrigtsen + + * net/shr.el (shr-insert): Make sure the space inserted has the + right font (for width). + (shr-fill-line): Preserve background colours when indenting/folding. + (shr-ensure-paragraph): Don't insert a new paragraph as the first + item in a
  • . + +2015-02-10 Lars Ingebrigtsen + + * net/shr.el (shr-use-fonts): New variable. + (shr-fill-text): Rename from "fold". + (shr-pixel-column, shr-pixel-region, shr-string-pixel-width): + New functions. + (shr-insert): Just insert, don't fill the text. Filling is now + done afterwards per display unit. + (shr-fill-lines, shr-fill-line): New functions to fill text on a + per-unit base. + (shr-find-fill-point): Take a "beginning" parameter. + (shr-indent): Indent using the :width display parameter when using + fonts. + (shr-parse-style): Ignore "inherit" values, since we already do that. + (shr-tag-img): Remove the insertion states. + (shr-tag-blockquote): New-style filling. + (shr-tag-dd): Ditto. + (shr-tag-li): Ditto. + (shr-mark-fill): New function to mark lines that need filling. + (shr-tag-h1): Use a larger font. + (shr-tag-table-1): Get the natural and suggested widths in one + rendering. + (shr-tag-table): Create the "fixed" version of the table only once + so that we can cache data in the table. + (shr-insert-table): Get colspan calculations right by having + zero-width columns after colspan ones. + (shr-expand-alignments): New function to make :align-to specs work + right when rendered in one buffer and displayed in another one. + (shr-insert-table-ruler): Use :align-to to get the widths right. + (shr-make-table): Cache more. + (shr-make-table-1): Use the new data layout. + (shr-pixel-buffer-width): New function. + (shr-render-td): Add a caching layer. + (shr-dom-max-natural-width): New function. + (shr-tag-h1): Don't use variable-pitch fonts on fontless rendering. + (shr-tag-tt): New function. + (shr-tag-hr): Compute the right length when using fonts. + (shr-table-widths): Off-by-one error in width computation. + (shr-expand-newlines): Remove dead code. + (shr-insert-table): Extend background colors to the end of the column. + (shr-insert-table): Only copy the background, not underline and + the like. + (shr-face-background): New function. + +2015-02-10 Fabián Ezequiel Gallina + + python.el: Improved shell font lock respecting markers. (Bug#19650) + + * progmodes/python.el + (python-shell-font-lock-get-or-create-buffer): Use special buffer name. + (python-shell-font-lock-with-font-lock-buffer): Enable font lock. + (python-shell-font-lock-post-command-hook): Fontify by copying text + properties from fontified buffer to shell, keeping markers unchanged. + (python-shell-font-lock-turn-off): Fix typo. + (python-util-text-properties-replace-name): Delete function. + +2015-02-09 Nicolas Petton + + * emacs-lisp/seq.el (seq-group-by): Improves seq-group-by to + return sequence elements in correct order. + +2015-02-09 Simen Heggestøyl (tiny change) + + * textmodes/css-mode.el (css-smie-rules): Fix paren indent (bug#19815). + +2015-02-09 Stefan Monnier + + * emacs-lisp/cl-generic.el (cl--generic-lambda): Use macroexp-parse-body. + + * emacs-lisp/eieio-core.el (eieio-oset-default): Catch the unexpected + case where the default value would be re-interpreted as a form! + +2015-02-09 Christopher Genovese (tiny change) + + * help-fns.el (help-fns--signature): Keep doc for keymap. + +2015-02-09 Kelly Dean + + * desktop.el: Save mark-ring less verbosely. + (desktop-var-serdes-funs): New var. + (desktop-buffer-info, desktop-create-buffer): Use it. + (desktop-file-version): Update to 208. + +2015-02-09 Leo Liu + + * emacs-lisp/pcase.el (pcase-lambda): New Macro. (Bug#19814) + + * emacs-lisp/lisp-mode.el (el-kws-re): Include `pcase-lambda'. + + * emacs-lisp/macroexp.el (macroexp-parse-body): New function. + +2015-02-08 Paul Eggert + + Port to platforms lacking test -a and -o + * Makefile.in (compile-clean): + * net/tramp-sh.el (tramp-find-executable): + Prefer '&&' and '||' to 'test -a' and 'test -o'. + +2015-02-08 Artur Malabarba + + * newcomment.el (comment-line): Fix missing paren. + +2015-02-08 Ulrich Müller + + * play/gamegrid.el: Update comment to reflect that the + 'update-game-score' helper program is now setgid by default. + +2015-02-08 David Kastrup + + * subr.el (apply-partially): Use lexical binding here. + +2015-02-08 Artur Malabarba + + * newcomment.el (comment-line): New command. + + * bindings.el (ctl-x-map): Bind to `C-x C-;'. + +2015-02-08 Oleh Krehel + + * outline.el (outline-show-entry): Fix one invisible char for the + file's last outline. (Bug#19493) + +2015-02-08 Stefan Monnier + + * subr.el (indirect-function): Change advertised calling convention. + +2015-02-08 Fabián Ezequiel Gallina + + python.el: Fix completion-at-point. (Bug#19667) + + * progmodes/python.el + (python-shell-completion-native-get-completions): Force process buffer. + (python-shell-completion-at-point): Handle case where call is not + in a shell buffer. + +2015-02-08 Fabián Ezequiel Gallina + + python.el: Fix shell font-lock multiline input. (Bug#19744) + + * progmodes/python.el + (python-shell-font-lock-post-command-hook): Handle multiline input. + +2015-02-08 Fabián Ezequiel Gallina + + python.el: Make shell font-lock respect markers. (Bug#19650) + + * progmodes/python.el (python-shell-font-lock-cleanup-buffer): + Use `erase-buffer`. + (python-shell-font-lock-comint-output-filter-function): + Handle newlines. + (python-shell-font-lock-post-command-hook): Respect markers on + text fontification. + +2015-02-07 Fabián Ezequiel Gallina + + python.el: Keep eldoc visible while typing args. (Bug#19637) + * progmodes/python.el (python-eldoc--get-symbol-at-point): + New function based on Carlos Pita patch. + (python-eldoc--get-doc-at-point, python-eldoc-at-point): Use it. + +2015-02-07 Fabián Ezequiel Gallina + + Fix hideshow integration. (Bug#19761) + * progmodes/python.el + (python-hideshow-forward-sexp-function): New function based on + Carlos Pita patch. + (python-mode): Make `hs-special-modes-alist` use it and initialize + the end regexp with the empty string to avoid skipping parens. + +2015-02-07 Fabián Ezequiel Gallina + + * progmodes/python.el (python-check-custom-command): Do not use + defvar-local for compat with Emacs<24.3. + +2015-02-07 Martin Rudalics + + * frame.el (frame-notice-user-settings): + Update `frame-size-history'. + (make-frame): Update `frame-size-history'. + Call `frame-after-make-frame'. + * faces.el (face-set-after-frame-default): Remove call to + frame-can-run-window-configuration-change-hook. + +2015-02-06 Dmitry Gutov + + * vc/vc-cvs.el (vc-cvs-dir-status-files): Don't pass DIR to + `vc-cvs-command' (bug#19732). + +2015-02-06 Nicolas Petton + + * emacs-lisp/seq.el (seq-mapcat, seq-partition, seq-group-by): + New functions. + * emacs-lisp/seq.el (seq-drop-while, seq-take-while, seq-count) + (seq--drop-list, seq--take-list, seq--take-while-list): + Better docstring. + +2015-02-06 Artur Malabarba + + * doc-view.el (doc-view-kill-proc-and-buffer): Obsolete. Use + `image-kill-buffer' instead. + +2015-02-06 Thomas Fitzsimmons + + * net/ldap.el (ldap-search-internal): Fix docstring. + +2015-02-06 Lars Ingebrigtsen + + * subr.el (define-error): The error conditions may be constant + lists, so use `append' to concatenate them. + +2015-02-06 Wolfgang Jenkner + + * net/network-stream.el (network-stream-open-tls): Respect the + :end-of-capability setting. + +2015-02-05 Artur Malabarba + + * emacs-lisp/package.el (package--sort-by-dependence): + New function. Return PACKAGE-LIST sorted by dependencies. + (package-menu-execute): Use it to delete packages in order. + (package--sort-deps-in-alist): New function. + (package-menu-mark-install): Can mark dependencies. + (package--newest-p): New function. + (package-delete): Don't deselect when deleting an older version of + an upgraded package. + + * emacs-lisp/package.el: Add missing (require 'subr-x) + +2015-02-05 Stefan Monnier + + * textmodes/css-mode.el (scss-smie--not-interpolation-p): Vars can be + hyphenated (bug#19263). + + * textmodes/css-mode.el (css-fill-paragraph): Fix filling in presence + of variable interpolation (bug#19751). + +2015-02-05 Era Eriksson + + * json.el (json-end-of-file): New error (bug#19768). + (json-pop, json-read): Use it. + +2015-02-05 Kelly Dean + + * help-mode.el (help-xref-interned): Pass BUFFER and FRAME to + `describe-variable'. + + * help-fns.el (describe-function-or-variable): New function. + + * help.el (help-map): Bind `describe-function-or-variable' to o. + (help-for-help-internal): Document o key. + +2015-02-05 Stefan Monnier + + * emacs-lisp/eieio-compat.el (eieio--defmethod): Use new + special (:documentation ...) feature. + * emacs-lisp/eieio-core.el (eieio-make-class-predicate) + (eieio-make-child-predicate): Same. + (eieio-copy-parents-into-subclass): Remove unused arg. + (eieio-defclass-internal): Adjust call accordingly and remove redundant + `pname' var. + (eieio--slot-name-index): Remove unused arg `obj' and adjust all + callers accordingly. + + * emacs-lisp/cconv.el (cconv--convert-function): + Add `docstring' argument. + (cconv-convert): Use it to handle the new (:documentation ...) form. + (cconv-analyze-form): Handle the new (:documentation ...) form. + + * emacs-lisp/bytecomp.el: + (byte-compile-initial-macro-environment): Use macroexp-progn. + (byte-compile-cl-warn): Don't silence use of cl-macroexpand-all. + (byte-compile-file-form-defvar-function): Rename from + byte-compile-file-form-define-abbrev-table. + (defvaralias, byte-compile-file-form-custom-declare-variable): Use it. + (byte-compile): Use byte-compile-top-level rather than + byte-compile-lambda so we can compile non-values. + (byte-compile-form): Add warnings for failed uses of lexical vars via + quoted symbols. + (byte-compile-unfold-bcf): Improve message for failed inlining. + (byte-compile-make-closure): Handle new format of internal-make-closure + for dynamically-generated docstrings. + + * delsel.el: Deprecate the `kill' option. Use lexical-binding. + (open-line): Delete like all other commands, instead of killing. + (delete-active-region): Don't define any return any value. + + * progmodes/python.el: Try to preserve compatibility with Emacs-24. + (python-mode): Don't assume eldoc-documentation-function has a non-nil + default. + +2015-02-04 Sam Steingold + + * progmodes/python.el (python-indent-calculate-indentation): + Avoid the error when computing top-level indentation. + +2015-02-04 Stefan Monnier + + * emacs-lisp/cl-generic.el (cl--generic-member-method): Fix paren typo. + + * textmodes/flyspell.el: Use lexical-binding and cl-lib. + (mail-mode-flyspell-verify): Fix last change. + (flyspell-external-point-words, flyspell-large-region): + Avoid add-to-list on local vars. + +2015-02-04 Tassilo Horn + + * emacs-lisp/package.el (package-installed-p): Fix typo causing + void-variable error. + +2015-02-04 Artur Malabarba + + * image-mode.el (image-kill-buffer): New command. + (image-mode-map): Bind it to k. + + * emacs-lisp/package.el (package-delete): Remove package from + `package-selected-packages' even if it can't be deleted. + (package-installed-p): Accept package-desc objects. + (package-install): Can be used to mark dependencies as + selected. When given a package-desc object which is already + installed, the package is not downloaded again, but it is marked + as selected (if it wasn't already). + (package-reinstall): Accept package-desc objects. + +2015-02-03 Artur Malabarba + + * emacs-lisp/package.el (package-delete): Document NOSAVE. + (package--get-deps): delete-dups when ONLY is nil. + (package-autoremove): Warn the user if `package-selected-packages' + is empty. + + (package--user-selected-p): New function. + (package-delete, package-install, package-install-from-buffer): + Use it + (package-selected-packages): Mention it. + + (package-initialize): Don't populate `package-selected-packages'. + (package-install-user-selected-packages, package-autoremove): + Special handling for empty `package-selected-packages'. + (package-install): Fix when PKG is a package-desc. + + (package-desc-status): Add "dependency" status to the Package + Menu. + (package-menu--status-predicate, package-menu--print-info) + (package-menu-mark-delete, package-menu--find-upgrades) + (package-menu--status-predicate, describe-package-1): Use it + + (package--removable-packages): New function. + (package-autoremove): Use it. + (package-menu-execute): Offer to remove unneeded packages. + + (package--read-pkg-desc, package-tar-file-info): Fix reference to + tar-desc. + +2015-02-03 Thierry Volpiatto + + * emacs-lisp/package.el (package-reinstall): Don't change package's selected status. + (package-delete): New NOSAVE argument. + +2015-02-03 Michael Albinus + + * net/tramp-sh.el (tramp-histfile-override): Fix docstring. + (tramp-open-shell, tramp-maybe-open-connection): Set also + HISTFILESIZE and HISTSIZE when needed. (Bug#19731) + +2015-02-02 Artur Malabarba + + * emacs-lisp/package.el (package--find-non-dependencies): + New function. + (package-initialize): Use it to populate `package-selected-packages'. + (package-menu-execute): Clean unnecessary `and'. + (package--get-deps): Fix returning duplicates. + +2015-02-02 Michael Albinus + + * net/tramp-sh.el (tramp-histfile-override): Add another choice t. + Use it as default. + (tramp-open-shell, tramp-maybe-open-connection): Support it. + (Bug#19731) + +2015-02-02 Thierry Volpiatto + + * emacs-lisp/package.el (package-delete): Remove package from + package-selected-packages. + (package-autoremove): Remove unneeded variable. + +2015-02-01 Artur Malabarba + + * emacs-lisp/package.el (package-selected-packages): Fix :type + (package-install): Rename ARG to MARK-SELECTED. + (package--get-deps): Fix for indirect dependencies. + (package-used-elsewhere-p): Rename to + (package--used-elsewhere-p): New function. + (package-reinstall, package-user-selected-packages-install) + (package-autoremove): Use sharp-quote. + (package-user-selected-packages-install): Reindent and rename to + (package-install-user-selected-packages): New function. + +2015-02-01 Thierry Volpiatto + + * emacs-lisp/package.el: Don't allow deleting dependencies. + + (package-used-elsewhere-p): New function. + (package-delete): Use it, return now an error when trying to + delete a package used as dependency by another package. + + Add a reinstall package command. + (package-reinstall): New function. + + Add a package-autoremove command. + (package-selected-packages): New user var. + (package-install): Add an optional arg to notify interactive use. + Fix docstring. Save installed package to + packages-installed-directly. + (package-install-from-buffer): Same. + (package-user-selected-packages-install): Allow installing all + packages in packages-installed-directly at once. + (package--get-deps): New function. + (package-autoremove): New function. + (package-install-button-action): Call package-install with + interactive arg. + (package-menu-execute): Same but only for only for not installed + packages. 2015-01-31 Stefan Monnier @@ -112,7 +2183,7 @@ 2015-01-30 Oleh Krehel - * lisp/custom.el (defface): Set `indent' to 1. + * custom.el (defface): Set `indent' to 1. 2015-01-30 Oleh Krehel @@ -120,21 +2191,21 @@ 2015-01-30 Michal Nazarewicz - * lisp/files.el (save-buffers-kill-emacs): If `confirm-kill-emacs' + * files.el (save-buffers-kill-emacs): If `confirm-kill-emacs' is set, but user has just been asked whether they really want to kill Emacs (for example with a ‘Modified buffers exist; exit anyway?’ prompt), do not ask them for another confirmation. 2015-01-29 Jay Belanger - * lisp/calc/calc-units.el (calc-convert-exact-units): New function. + * calc/calc-units.el (calc-convert-exact-units): New function. (calc-convert-units): Check for missing units. (math-consistent-units-p): Strengthen the test for consistent units. - * lisp/calc/calc-ext.el (calc-init-extensions): Autoload + * calc/calc-ext.el (calc-init-extensions): Autoload `calc-convert-exact-units' and assign it a keybinding. - * lisp/calc/calc-help (calc-u-prefix-help): Add help for the + * calc/calc-help (calc-u-prefix-help): Add help for the "un" keybinding. 2015-01-28 Stefan Monnier @@ -209,8 +2280,8 @@ 2015-01-28 Paul Eggert - Fix dired quoting bug with "Hit`N`Hide". Fixes Bug#19498. - * files.el (shell-quote-wildcard-pattern): Also quote "`". + Fix dired quoting bug with "Hit`N`Hide". + * files.el (shell-quote-wildcard-pattern): Also quote "`". (Bug#19498) 2015-01-28 Stefan Monnier @@ -708,9 +2779,6 @@ 2015-01-17 Ivan Shmakov - * url/url-cookie.el (url-cookie-write-file): Let-bind print-length - and print-level to nil to avoid writing a garbled list. (Bug#16805) - * files.el (find-file-other-window, find-file-other-frame): Use mapc instead of mapcar. (Bug#18175) @@ -844,7 +2912,7 @@ * vc/vc-svn.el (vc-svn-dir-status-files): Pass t as vc-svn-after-dir-status's second argument. (Bug#19429) -2015-01-16 Samer Masterson (tiny change) +2015-01-16 Samer Masterson * pcomplete.el (pcomplete-parse-arguments): Parse arguments regardless of pcomplete-cycle-completions's value. (Bug#18950) @@ -1950,7 +4018,7 @@ * emacs-lisp/package.el (package--list-loaded-files): Don't call file-truename on load-history elements (bug#19390). -2014-12-16 Nicolas Petton +2014-12-16 Nicolas Petton * emacs-lisp/seq.el: New file. @@ -2596,7 +4664,7 @@ Pass correct status to `newsticker--sentinel-work'. (newsticker--sentinel-work): Use "newsticker--download-error" as guid in order to prevent multiple "Could not download..." - messages. Fixes bug#19166. + messages. (Bug#19166) 2014-12-01 Ivan Shmakov @@ -3007,15 +5075,13 @@ 2014-11-22 Alan Mackenzie Fix error with `mark-defun' and "protected:" in C++ Mode. - Fixes: debbugs:19134. - * progmodes/cc-cmds.el (c-where-wrt-brace-construct): Handle a - return code of (label) from c-beginning-of-decl-1. + return code of (label) from c-beginning-of-decl-1. (Bug#19134) 2014-11-22 Ulf Jasper * net/newst-backend.el (newsticker--sentinel-work): - Tell `libxml-parse-xml-region' to discard comments. Fixes bug#18787. + Tell `libxml-parse-xml-region' to discard comments. (Bug#18787) 2014-11-22 Michael Albinus @@ -3224,7 +5290,7 @@ (tildify-foreach-region-function): New variable specifying a function determining portions of buffer that should be tildified. It allows major modes to create a filtering function - more elaborate than a set of regular expressions. Initialised to + more elaborate than a set of regular expressions. Initialized to `tildify--deprecated-ignore-evironments' by default to handle now deprecated `tildify-ignored-environments-alist' variable. (tildify--foreach-region): A new function that takes @@ -3353,7 +5419,7 @@ (python-shell-calculate-process-environment): Use it. (python-shell-calculate-exec-path): Add comment. -2014-11-16 Thierry Banel (tiny change) +2014-11-16 Thierry Banel (tiny change) * calc/calc-arith.el (math-max-list, math-min-list): Fix bug for date handling. @@ -3378,7 +5444,7 @@ * mail/emacsbug.el (report-emacs-bug): Make a better guess at envelope-from when reporting through sendmail (bug#19054). -2014-11-16 Oscar Fuentes +2014-11-16 Oscar Fuentes Add faces for the VC modeline state indicator. * vc/vc-hooks.el: @@ -3605,11 +5671,11 @@ 2014-11-08 Alan Mackenzie - Fix wrong bound to c-font-lock-declarators. Fixes bug #18948. + Fix wrong bound to c-font-lock-declarators. * progmodes/cc-fonts.el (c-font-lock-declarations): Pass "(point-max)" as bound to c-font-lock-declarators, not "limit", as the buffer is sometimes narrowed to less than "limit" (e.g., in - the presence of macros). + the presence of macros). (Bug#18948) 2014-11-08 Michael Albinus @@ -3834,20 +5900,20 @@ correct buffer. (eww-view-source): Use it. -2014-11-02 Ivan Shmakov +2014-11-02 Ivan Shmakov * net/eww.el (eww): Recognize colon-delimited IPv6 addresses. (Bug#18603). -2014-11-02 Brian McKenna (tiny change) +2014-11-02 Brian McKenna (tiny change) * net/eww.el (eww-submit): Encode empty form values as "". (Bug#17785). -2014-11-02 Ivan Shmakov +2014-11-02 Ivan Shmakov * net/eww.el (eww): Allow "file:/file/name" URLs. (Bug#18825). -2014-11-02 Ivan Shmakov +2014-11-02 Ivan Shmakov * net/eww.el (eww-mode-map): Remove mentions of `eww-quit'. (Bug#18834). @@ -4423,9 +6489,8 @@ 2014-10-18 Alan Mackenzie Check that a "macro" found near point-min isn't a ## operator. - Fixes bug #18749. * progmodes/cc-engine.el (c-macro-is-genuine-p): New function. - (c-beginning-of-macro): Use the above new function. + (c-beginning-of-macro): Use the above new function. (Bug#18749) 2014-10-18 Teodor Zlatanov @@ -7689,7 +9754,7 @@ file-format 2 --- ie. no local printers --- and 3 --- i.e. may have local printers. (ses-localvars): Add local variables needed for local printer handling. - (ses-set-localvars): Handle hashmap initialisation. + (ses-set-localvars): Handle hashmap initialization. (ses-paramlines-plist): Add param-line for number of local printers. (ses-paramfmt-plist): New defconst, needed for code factorization between functions `ses-set-parameter' and @@ -10949,7 +13014,7 @@ * progmodes/cc-mode.el (c-initialize-cc-mode): Add CC Mode hooks to electric-indent-{,local-}-mode. (c-basic-common-init): Set electric-indent-inhibit. - Initialise c-electric-flag from electric-indent-mode. + Initialize c-electric-flag from electric-indent-mode. (c-electric-indent-mode-hook, c-electric-indent-local-mode-hook): New hook functions which propagate electric-indent-mode to CC mode. @@ -14228,7 +16293,7 @@ Change default to "# encoding: %s" to differentiate it from the default Ruby encoding comment template. -2013-11-20 era eriksson +2013-11-20 Era Eriksson * ses.el (ses-mode): Doc fix. (Bug#14748) @@ -22886,7 +24951,7 @@ 2013-04-30 Alan Mackenzie - Handle arbitrarily long C++ member initialisation lists. + Handle arbitrarily long C++ member initialization lists. * progmodes/cc-engine.el (c-back-over-member-initializers): new function. (c-guess-basic-syntax): New CASE 5R (extracted from 5B) to handle diff --git a/lisp/ChangeLog.16 b/lisp/ChangeLog.16 index 14ee914179..bf8a97352c 100644 --- a/lisp/ChangeLog.16 +++ b/lisp/ChangeLog.16 @@ -6751,7 +6751,7 @@ 2012-09-09 Alan Mackenzie * progmodes/cc-engine.el (c-state-cache-init): - Initialise c-state-semi-nonlit-pos-cache\(-limit\)? properly. + Initialize c-state-semi-nonlit-pos-cache\(-limit\)? properly. (c-record-parse-state-state): Record c-state-semi-nonlit-pos-cache\(-limit\)?. @@ -15662,7 +15662,7 @@ (c-nonlabel-token-key): Allow string literals for AWK. Refactor for the other modes. - Large brace-block initialisation makes CC Mode slow: Fix. + Large brace-block initialization makes CC Mode slow: Fix. Tidy up and accelerate c-in-literal, etc. by using the c-parse-state routines. Limit backward searching in c-font-lock-enclosing.decl. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 7bf53861e7..22d5ddcf12 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -47,7 +47,7 @@ am__v_GEN_1 = # We never change directory before running Emacs, so a relative file # name is fine, and makes life easier. If we need to change # directory, we can use emacs --chdir. -EMACS = ../src/emacs +EMACS = ../src/emacs${EXEEXT} # Command line flags for Emacs. @@ -324,7 +324,7 @@ compile-clean: @cd $(lisp) && $(setwins); \ elcs=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.elc |g'`; \ for el in `echo $$elcs | sed -e 's/\.elc/\.el/g'`; do \ - if test -f "$$el" -o \! -f "$${el}c"; then :; else \ + if test -f "$$el" || test ! -f "$${el}c"; then :; else \ echo rm "$${el}c"; \ rm "$${el}c"; \ fi \ diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 7aa46e0073..424d9c4f30 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -976,7 +976,8 @@ Properties with special meaning: ;; We used to manually add the docstring, but we also want to record this ;; location as the definition of the variable (in load-history), so we may ;; as well just use `defvar'. - (eval `(defvar ,tablename nil ,@(if (stringp docstring) (list docstring)))) + (eval `(defvar ,tablename nil ,@(if (stringp docstring) (list docstring) + (when props (push docstring props) nil)))) (let ((table (if (boundp tablename) (symbol-value tablename)))) (unless table (setq table (make-abbrev-table)) @@ -987,6 +988,7 @@ Properties with special meaning: ;; if the table was pre-existing as is the case if it was created by ;; loading the user's abbrev file. (while (consp props) + (unless (cdr props) (error "Missing value for property %S" (car props))) (abbrev-table-put table (pop props) (pop props))) (dolist (elt definitions) (apply 'define-abbrev table elt)))) diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 8c8c6174c4..357916c6b4 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -361,9 +361,8 @@ without being changed in the part that is already in the buffer." (delq (current-buffer) auto-revert-buffer-list))) (auto-revert-set-timer) (when auto-revert-mode - (let (auto-revert-use-notify) - (auto-revert-buffers) - (setq auto-revert-tail-mode nil)))) + (auto-revert-buffers) + (setq auto-revert-tail-mode nil))) ;;;###autoload @@ -417,8 +416,7 @@ Use `auto-revert-mode' for changes other than appends!" (y-or-n-p "File changed on disk, content may be missing. \ Perform a full revert? ") ;; Use this (not just revert-buffer) for point-preservation. - (let (auto-revert-use-notify) - (auto-revert-handler))) + (auto-revert-buffers)) ;; else we might reappend our own end when we save (add-hook 'before-save-hook (lambda () (auto-revert-tail-mode 0)) nil t) (or (local-variable-p 'auto-revert-tail-pos) ; don't lose prior position @@ -463,8 +461,7 @@ specifies in the mode line." :global t :group 'auto-revert :lighter global-auto-revert-mode-text (auto-revert-set-timer) (if global-auto-revert-mode - (let (auto-revert-use-notify) - (auto-revert-buffers)) + (auto-revert-buffers) (dolist (buf (buffer-list)) (with-current-buffer buf (when auto-revert-use-notify @@ -506,30 +503,61 @@ will use an up-to-date value of `auto-revert-interval'" "Enable file notification for current buffer's associated file." ;; We can assume that `buffer-file-name' and ;; `auto-revert-use-notify' are non-nil. - (when (or (string-match auto-revert-notify-exclude-dir-regexp - (expand-file-name default-directory)) - (file-symlink-p buffer-file-name)) - ;; Fallback to file checks. - (set (make-local-variable 'auto-revert-use-notify) nil)) - - (when (not auto-revert-notify-watch-descriptor) - (setq auto-revert-notify-watch-descriptor - (ignore-errors - (file-notify-add-watch - (expand-file-name buffer-file-name default-directory) - '(change attribute-change) 'auto-revert-notify-handler))) - (if auto-revert-notify-watch-descriptor - (progn - (puthash - auto-revert-notify-watch-descriptor - (cons (current-buffer) - (gethash auto-revert-notify-watch-descriptor - auto-revert-notify-watch-descriptor-hash-list)) - auto-revert-notify-watch-descriptor-hash-list) - (add-hook (make-local-variable 'kill-buffer-hook) - 'auto-revert-notify-rm-watch)) + (if (or (string-match auto-revert-notify-exclude-dir-regexp + (expand-file-name default-directory)) + (file-symlink-p (or buffer-file-name default-directory))) + ;; Fallback to file checks. - (set (make-local-variable 'auto-revert-use-notify) nil)))) + (set (make-local-variable 'auto-revert-use-notify) nil) + + (when (not auto-revert-notify-watch-descriptor) + (setq auto-revert-notify-watch-descriptor + (ignore-errors + (if buffer-file-name + (file-notify-add-watch + (expand-file-name buffer-file-name default-directory) + '(change attribute-change) + 'auto-revert-notify-handler) + (file-notify-add-watch + (expand-file-name default-directory) + '(change) + 'auto-revert-notify-handler)))) + (if auto-revert-notify-watch-descriptor + (progn + (puthash + auto-revert-notify-watch-descriptor + (cons (current-buffer) + (gethash auto-revert-notify-watch-descriptor + auto-revert-notify-watch-descriptor-hash-list)) + auto-revert-notify-watch-descriptor-hash-list) + (add-hook (make-local-variable 'kill-buffer-hook) + 'auto-revert-notify-rm-watch)) + ;; Fallback to file checks. + (set (make-local-variable 'auto-revert-use-notify) nil))))) + +;; If we have file notifications, we want to update the auto-revert buffers +;; immediately when a notification occurs. Since file updates can happen very +;; often, we want to skip some revert operations so that we don't spend all our +;; time reverting the buffer. +;; +;; We do this by reverting immediately in response to the first in a flurry of +;; notifications. We suppress subsequent notifications until the next time +;; `auto-revert-buffers' is called (this happens on a timer with a period set by +;; `auto-revert-interval'). +(defvar auto-revert-buffers-counter 1 + "Incremented each time `auto-revert-buffers' is called") +(defvar-local auto-revert-buffers-counter-lockedout 0 + "Buffer-local value to indicate whether we should immediately +update the buffer on a notification event or not. If + + (= auto-revert-buffers-counter-lockedout + auto-revert-buffers-counter) + +then the updates are locked out, and we wait until the next call +of `auto-revert-buffers' to revert the buffer. If no lockout is +present, then we revert immediately and set the lockout, so that +no more reverts are possible until the next call of +`auto-revert-buffers'") (defun auto-revert-notify-handler (event) "Handle an EVENT returned from file notification." @@ -542,32 +570,40 @@ will use an up-to-date value of `auto-revert-interval'" auto-revert-notify-watch-descriptor-hash-list))) ;; Check, that event is meant for us. (cl-assert descriptor) - ;; We do not handle `deleted', because nothing has to be refreshed. - (unless (eq action 'deleted) - (cl-assert (memq action '(attribute-changed changed created renamed)) - t) - ;; Since we watch a directory, a file name must be returned. - (cl-assert (stringp file)) - (when (eq action 'renamed) (cl-assert (stringp file1))) - ;; Loop over all buffers, in order to find the intended one. - (cl-dolist (buffer buffers) - (when (buffer-live-p buffer) - (with-current-buffer buffer - (when (and (stringp buffer-file-name) - (or - (and (memq action '(attribute-changed changed - created)) - (string-equal - (file-name-nondirectory file) - (file-name-nondirectory buffer-file-name))) - (and (eq action 'renamed) - (string-equal - (file-name-nondirectory file1) - (file-name-nondirectory buffer-file-name))))) - ;; Mark buffer modified. - (setq auto-revert-notify-modified-p t) - ;; No need to check other buffers. - (cl-return))))))))) + ;; Since we watch a directory, a file name must be returned. + (cl-assert (stringp file)) + (when (eq action 'renamed) (cl-assert (stringp file1))) + ;; Loop over all buffers, in order to find the intended one. + (cl-dolist (buffer buffers) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (when (or + ;; A buffer associated with a file. + (and (stringp buffer-file-name) + (or + (and (memq action '(attribute-changed changed created)) + (string-equal + (file-name-nondirectory file) + (file-name-nondirectory buffer-file-name))) + (and (eq action 'renamed) + (string-equal + (file-name-nondirectory file1) + (file-name-nondirectory buffer-file-name))))) + ;; A buffer w/o a file, like dired. + (and (null buffer-file-name) + (memq action '(created renamed deleted)))) + ;; Mark buffer modified. + (setq auto-revert-notify-modified-p t) + + ;; Revert the buffer now if we're not locked out. + (when (/= auto-revert-buffers-counter-lockedout + auto-revert-buffers-counter) + (auto-revert-handler) + (setq auto-revert-buffers-counter-lockedout + auto-revert-buffers-counter)) + + ;; No need to check other buffers. + (cl-return)))))))) (defun auto-revert-active-p () "Check if auto-revert is active (in current buffer or globally)." @@ -686,6 +722,10 @@ are checked first the next time this function is called. This function is also responsible for removing buffers no longer in Auto-Revert mode from `auto-revert-buffer-list', and for canceling the timer when no buffers need to be checked." + + (setq auto-revert-buffers-counter + (1+ auto-revert-buffers-counter)) + (save-match-data (let ((bufs (if global-auto-revert-mode (buffer-list) @@ -717,7 +757,7 @@ the timer when no buffers need to be checked." (delq buf auto-revert-buffer-list))) (when (auto-revert-active-p) ;; Enable file notification. - (when (and auto-revert-use-notify buffer-file-name + (when (and auto-revert-use-notify (not auto-revert-notify-watch-descriptor)) (auto-revert-notify-add-watch)) (auto-revert-handler))) diff --git a/lisp/battery.el b/lisp/battery.el index 41e5979f1f..b9ce5b4909 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -44,27 +44,27 @@ (defcustom battery-status-function (cond ((and (eq system-type 'gnu/linux) (file-readable-p "/proc/apm")) - 'battery-linux-proc-apm) + #'battery-linux-proc-apm) ((and (eq system-type 'gnu/linux) (file-directory-p "/proc/acpi/battery")) - 'battery-linux-proc-acpi) + #'battery-linux-proc-acpi) ((and (eq system-type 'gnu/linux) (file-directory-p "/sys/class/power_supply/") (directory-files "/sys/class/power_supply/" nil battery--linux-sysfs-regexp)) - 'battery-linux-sysfs) + #'battery-linux-sysfs) ((and (eq system-type 'berkeley-unix) (file-executable-p "/usr/sbin/apm")) - 'battery-bsd-apm) + #'battery-bsd-apm) ((and (eq system-type 'darwin) (condition-case nil (with-temp-buffer (and (eq (call-process "pmset" nil t nil "-g" "ps") 0) (> (buffer-size) 0))) (error nil))) - 'battery-pmset) + #'battery-pmset) ((fboundp 'w32-battery-status) - 'w32-battery-status)) + #'w32-battery-status)) "Function for getting battery status information. The function has to return an alist of conversion definitions. Its cons cells are of the form @@ -77,14 +77,7 @@ introduced by a `%' character in a control string." :group 'battery) (defcustom battery-echo-area-format - (cond ((eq battery-status-function 'battery-linux-proc-acpi) - "Power %L, battery %B at %r (%p%% load, remaining time %t)") - ((eq battery-status-function 'battery-linux-sysfs) - "Power %L, battery %B (%p%% load, remaining time %t)") - ((eq battery-status-function 'battery-pmset) - "%L power, battery %B (%p%% load, remaining time %t)") - (battery-status-function - "Power %L, battery %B (%p%% load, remaining time %t)")) + "Power %L, battery %B (%p%% load, remaining time %t)" "Control string formatting the string to display in the echo area. Ordinary characters in the control string are printed as-is, while conversion specifications introduced by a `%' character in the control @@ -436,11 +429,15 @@ The following %-sequences are provided: %m Remaining time (to charge or discharge) in minutes %h Remaining time (to charge or discharge) in hours %t Remaining time (to charge or discharge) in the form `h:min'" - (let (charging-state rate temperature hours - (charge-full 0.0) - (charge-now 0.0) + (let (charging-state temperature hours + ;; Some batteries report charges and current, other energy and power. + ;; In order to reliably be able to combine those data, we convert them + ;; all to energy/power (since we can't combine different charges if + ;; they're not at the same voltage). (energy-full 0.0) - (energy-now 0.0)) + (energy-now 0.0) + (power-now 0.0) + (voltage-now 10.8)) ;Arbitrary default, in case the info is missing. ;; SysFS provides information about each battery present in the ;; system in a separate subdirectory. We are going to merge the ;; available information together. @@ -452,6 +449,11 @@ The following %-sequences are provided: (erase-buffer) (ignore-errors (insert-file-contents (expand-file-name "uevent" dir))) + (goto-char (point-min)) + (when (re-search-forward + "POWER_SUPPLY_VOLTAGE_NOW=\\([0-9]*\\)$" nil t) + (setq voltage-now (/ (string-to-number (match-string 1)) 1000000.0))) + (goto-char (point-min)) (when (re-search-forward "POWER_SUPPLY_PRESENT=1$" nil t) (goto-char (point-min)) (and (re-search-forward "POWER_SUPPLY_STATUS=\\(.*\\)$" nil t) @@ -461,7 +463,10 @@ The following %-sequences are provided: (when (re-search-forward "POWER_SUPPLY_\\(CURRENT\\|POWER\\)_NOW=\\([0-9]*\\)$" nil t) - (setq rate (float (string-to-number (match-string 2))))) + (cl-incf power-now + (* (float (string-to-number (match-string 2))) + (if (eq (char-after (match-beginning 1)) ?C) + voltage-now 1.0)))) (goto-char (point-min)) (when (re-search-forward "POWER_SUPPLY_TEMP=\\([0-9]*\\)$" nil t) (setq temperature (match-string 1))) @@ -475,10 +480,10 @@ The following %-sequences are provided: (re-search-forward "POWER_SUPPLY_CHARGE_NOW=\\([0-9]*\\)$" nil t) (setq now-string (match-string 1))) - (setq charge-full (+ charge-full - (string-to-number full-string)) - charge-now (+ charge-now - (string-to-number now-string)))) + (cl-incf energy-full (* (string-to-number full-string) + voltage-now)) + (cl-incf energy-now (* (string-to-number now-string) + voltage-now))) ((and (progn (goto-char (point-min)) t) (re-search-forward "POWER_SUPPLY_ENERGY_FULL=\\([0-9]*\\)$" nil t) @@ -486,27 +491,20 @@ The following %-sequences are provided: (re-search-forward "POWER_SUPPLY_ENERGY_NOW=\\([0-9]*\\)$" nil t) (setq now-string (match-string 1))) - (setq energy-full (+ energy-full - (string-to-number full-string)) - energy-now (+ energy-now - (string-to-number now-string)))))) + (cl-incf energy-full (string-to-number full-string)) + (cl-incf energy-now (string-to-number now-string))))) (goto-char (point-min)) - (when (and energy-now rate (not (zerop rate)) - (re-search-forward - "POWER_SUPPLY_VOLTAGE_NOW=\\([0-9]*\\)$" nil t)) + (unless (zerop power-now) (let ((remaining (if (string= charging-state "Discharging") energy-now (- energy-full energy-now)))) - (setq hours (/ (/ (* remaining (string-to-number - (match-string 1))) - rate) - 10000000.0))))))) - (list (cons ?c (cond ((or (> charge-full 0) (> charge-now 0)) - (number-to-string charge-now)) - ((or (> energy-full 0) (> energy-now 0)) - (number-to-string energy-now)) + (setq hours (/ remaining power-now))))))) + (list (cons ?c (cond ((or (> energy-full 0) (> energy-now 0)) + (number-to-string (/ energy-now voltage-now))) (t "N/A"))) - (cons ?r (if rate (format "%.1f" (/ rate 1000000.0)) "N/A")) + (cons ?r (if (> power-now 0.0) + (format "%.1f" (/ power-now 1000000.0)) + "N/A")) (cons ?m (if hours (format "%d" (* hours 60)) "N/A")) (cons ?h (if hours (format "%d" hours) "N/A")) (cons ?t (if hours @@ -514,21 +512,24 @@ The following %-sequences are provided: "N/A")) (cons ?d (or temperature "N/A")) (cons ?B (or charging-state "N/A")) - (cons ?p (cond ((and (> charge-full 0) (> charge-now 0)) - (format "%.1f" - (/ (* 100 charge-now) charge-full))) - ((> energy-full 0) + (cons ?p (cond ((and (> energy-full 0) (> energy-now 0)) (format "%.1f" (/ (* 100 energy-now) energy-full))) (t "N/A"))) - (cons ?L (if (file-readable-p "/sys/class/power_supply/AC/online") - (if (battery-search-for-one-match-in-files - (list "/sys/class/power_supply/AC/online" - "/sys/class/power_supply/ACAD/online") - "1" 0) - "AC" - "BAT") - "N/A"))))) + (cons ?L (cond + ((battery-search-for-one-match-in-files + (list "/sys/class/power_supply/AC/online" + "/sys/class/power_supply/ACAD/online" + "/sys/class/power_supply/ADP1/online") + "1" 0) + "AC") + ((battery-search-for-one-match-in-files + (list "/sys/class/power_supply/AC/online" + "/sys/class/power_supply/ACAD/online" + "/sys/class/power_supply/ADP1/online") + "0" 0) + "BAT") + (t "N/A")))))) ;;; `apm' interface for BSD. diff --git a/lisp/bindings.el b/lisp/bindings.el index 883914ecdc..b658914c45 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -1130,6 +1130,7 @@ if `inhibit-field-text-motion' is non-nil." (define-key esc-map "j" 'indent-new-comment-line) (define-key esc-map "\C-j" 'indent-new-comment-line) (define-key ctl-x-map ";" 'comment-set-column) +(define-key ctl-x-map [?\C-\;] 'comment-line) (define-key ctl-x-map "f" 'set-fill-column) (define-key ctl-x-map "$" 'set-selective-display) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index a49ee7ec8b..dc8057e6e0 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1756,7 +1756,7 @@ if an annotation exists." (save-selected-window (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t) (delete-region (point-min) (point-max)) - (dolist (full-record bookmark-alist) + (dolist (full-record (bookmark-maybe-sort-alist)) (let* ((name (bookmark-name-from-full-record full-record)) (ann (bookmark-get-annotation full-record))) (insert (concat name ":\n")) diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index 46cd8d3eb6..25a24eeffe 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -657,7 +657,7 @@ Corresponding value is nil if there is no sunrise/sunset." Optional NOLOCATION non-nil means do not print the location." (let ((l (solar-sunrise-sunset date))) (format - "%s, %s%s (%s hours daylight)" + "%s, %s%s (%s hrs daylight)" (if (car l) (concat "Sunrise " (apply 'solar-time-string (car l))) "No sunrise") @@ -847,20 +847,12 @@ This function is suitable for execution in an init file." (date (if (< arg 4) (calendar-current-date) (calendar-read-date))) (date-string (calendar-date-string date t)) (time-string (solar-sunrise-sunset-string date)) - (msg (format "%s: %s" date-string time-string)) - (one-window (one-window-p t))) - (if (<= (length msg) (frame-width)) - (message "%s" msg) - (with-output-to-temp-buffer "*temp*" - (princ (concat date-string "\n" time-string))) - (message "%s" - (substitute-command-keys - (if one-window - (if pop-up-windows - "Type \\[delete-other-windows] to remove temp window." - "Type \\[switch-to-buffer] RET to remove temp window.") - "Type \\[switch-to-buffer-other-window] RET to restore old \ -contents of temp window.")))))) + (msg (format "%s%s" + (if (< arg 4) "" ; don't print date if it's today's + (format "%s: " date-string)) + time-string))) + (message "%s" msg) + msg)) ;;;###cal-autoload (defun calendar-sunrise-sunset (&optional event) diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 7ca57a42b7..dcc960fb9b 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -2816,7 +2816,8 @@ visible." (goto-char (point-min)) (re-search-forward todo-done-string-start nil t))) (buffer-read-only nil) - item done-item opoint) + item done-item + (opoint (point))) ;; Don't add empty comment to done item. (setq comment (unless (zerop (length comment)) (concat " [" todo-comment-string ": " comment "]"))) @@ -2854,7 +2855,9 @@ visible." (todo-update-categories-sexp) (let ((todo-show-with-done show-done)) (todo-category-select) - ;; When done items are shown, put cursor on first just done item. + ;; When done items are visible, put point at the top of the + ;; done items section. When done items are hidden, restore + ;; point to its location prior to invoking this command. (when opoint (goto-char opoint))))))) (defun todo-item-undone () diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 5c958350ff..c9ddc382d5 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,31 @@ +2015-02-22 Paul Eggert + + Spelling fixes + * semantic/doc.el (semantic-documentation-comment-preceding-tag): + Rename from semantic-documentation-comment-preceeding-tag. All + uses changed. Leave an obsolete alias behind. + +2015-02-16 Stefan Monnier + + * semantic/db-el.el (semanticdb-elisp-sym->tag): Fix copy&paste error + (semanticdb-project-database => sym). Avoid eieio--class-public-a + when possible. + +2015-02-04 Stefan Monnier + + Use cl-generic instead of EIEIO's defgeneric/defmethod. + * **/*.el: Mechanically replace all calls to defmethod/defgeneric by + calls to cl-defmethod/cl-defgeneric. + * srecode/table.el: + * srecode/fields.el: + * srecode/dictionary.el: + * srecode/compile.el: + * semantic/debug.el: + * semantic/db-ref.el: + * ede/base.el: + * ede/auto.el: + * ede.el: Require `cl-generic'. + 2015-01-07 Stefan Monnier Don't use as a variable and don't assume that -list-p is diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 87cfb85b2c..074fda9786 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el @@ -41,6 +41,7 @@ (require 'cedet) (require 'eieio) +(require 'cl-generic) (require 'eieio-speedbar) (require 'ede/source) (require 'ede/base) @@ -430,7 +431,7 @@ version of the keymap." ;;; Menu building methods for building ;; -(defmethod ede-menu-items-build ((obj ede-project) &optional current) +(cl-defmethod ede-menu-items-build ((obj ede-project) &optional current) "Return a list of menu items for building project OBJ. If optional argument CURRENT is non-nil, return sub-menu code." (if current @@ -440,7 +441,7 @@ If optional argument CURRENT is non-nil, return sub-menu code." (concat "Build Project " (ede-name obj)) `(project-compile-project ,obj)))))) -(defmethod ede-menu-items-build ((obj ede-target) &optional current) +(cl-defmethod ede-menu-items-build ((obj ede-target) &optional current) "Return a list of menu items for building target OBJ. If optional argument CURRENT is non-nil, return sub-menu code." (if current @@ -821,7 +822,7 @@ Optional argument NAME is the name to give this project." ;; Allert the user (message "Project created and saved. You may now create targets.")) -(defmethod ede-add-subproject ((proj-a ede-project) proj-b) +(cl-defmethod ede-add-subproject ((proj-a ede-project) proj-b) "Add into PROJ-A, the subproject PROJ-B." (oset proj-a subproj (cons proj-b (oref proj-a subproj)))) @@ -986,75 +987,75 @@ Optional argument FORCE forces the file to be removed without asking." ;; files should inherit from `ede-project'. Create the appropriate ;; methods based on those below. -(defmethod project-interactive-select-target ((this ede-project-placeholder) prompt) +(cl-defmethod project-interactive-select-target ((this ede-project-placeholder) prompt) ; checkdoc-params: (prompt) "Make sure placeholder THIS is replaced with the real thing, and pass through." (project-interactive-select-target this prompt)) -(defmethod project-interactive-select-target ((this ede-project) prompt) +(cl-defmethod project-interactive-select-target ((this ede-project) prompt) "Interactively query for a target that exists in project THIS. Argument PROMPT is the prompt to use when querying the user for a target." (let ((ob (object-assoc-list 'name (oref this targets)))) (cdr (assoc (completing-read prompt ob nil t) ob)))) -(defmethod project-add-file ((this ede-project-placeholder) file) +(cl-defmethod project-add-file ((this ede-project-placeholder) file) ; checkdoc-params: (file) "Make sure placeholder THIS is replaced with the real thing, and pass through." (project-add-file this file)) -(defmethod project-add-file ((ot ede-target) file) +(cl-defmethod project-add-file ((ot ede-target) file) "Add the current buffer into project project target OT. Argument FILE is the file to add." (error "add-file not supported by %s" (eieio-object-name ot))) -(defmethod project-remove-file ((ot ede-target) fnnd) +(cl-defmethod project-remove-file ((ot ede-target) fnnd) "Remove the current buffer from project target OT. Argument FNND is an argument." (error "remove-file not supported by %s" (eieio-object-name ot))) -(defmethod project-edit-file-target ((ot ede-target)) +(cl-defmethod project-edit-file-target ((ot ede-target)) "Edit the target OT associated with this file." (find-file (oref (ede-current-project) file))) -(defmethod project-new-target ((proj ede-project) &rest args) +(cl-defmethod project-new-target ((proj ede-project) &rest args) "Create a new target. It is up to the project PROJ to get the name." (error "new-target not supported by %s" (eieio-object-name proj))) -(defmethod project-new-target-custom ((proj ede-project)) +(cl-defmethod project-new-target-custom ((proj ede-project)) "Create a new target. It is up to the project PROJ to get the name." (error "New-target-custom not supported by %s" (eieio-object-name proj))) -(defmethod project-delete-target ((ot ede-target)) +(cl-defmethod project-delete-target ((ot ede-target)) "Delete the current target OT from its parent project." (error "add-file not supported by %s" (eieio-object-name ot))) -(defmethod project-compile-project ((obj ede-project) &optional command) +(cl-defmethod project-compile-project ((obj ede-project) &optional command) "Compile the entire current project OBJ. Argument COMMAND is the command to use when compiling." (error "compile-project not supported by %s" (eieio-object-name obj))) -(defmethod project-compile-target ((obj ede-target) &optional command) +(cl-defmethod project-compile-target ((obj ede-target) &optional command) "Compile the current target OBJ. Argument COMMAND is the command to use for compiling the target." (error "compile-target not supported by %s" (eieio-object-name obj))) -(defmethod project-debug-target ((obj ede-target)) +(cl-defmethod project-debug-target ((obj ede-target)) "Run the current project target OBJ in a debugger." (error "debug-target not supported by %s" (eieio-object-name obj))) -(defmethod project-run-target ((obj ede-target)) +(cl-defmethod project-run-target ((obj ede-target)) "Run the current project target OBJ." (error "run-target not supported by %s" (eieio-object-name obj))) -(defmethod project-make-dist ((this ede-project)) +(cl-defmethod project-make-dist ((this ede-project)) "Build a distribution for the project based on THIS project." (error "Make-dist not supported by %s" (eieio-object-name this))) -(defmethod project-dist-files ((this ede-project)) +(cl-defmethod project-dist-files ((this ede-project)) "Return a list of files that constitute a distribution of THIS project." (error "Dist-files is not supported by %s" (eieio-object-name this))) -(defmethod project-rescan ((this ede-project)) +(cl-defmethod project-rescan ((this ede-project)) "Rescan the EDE project THIS." (error "Rescanning a project is not supported by %s" (eieio-object-name this))) @@ -1248,7 +1249,7 @@ that contains the target that becomes buffer's object." ;; Return our findings. ede-object)) -(defmethod ede-target-in-project-p ((proj ede-project) target) +(cl-defmethod ede-target-in-project-p ((proj ede-project) target) "Is PROJ the parent of TARGET? If TARGET belongs to a subproject, return that project file." (if (and (slot-boundp proj 'targets) @@ -1273,7 +1274,7 @@ could become slow in time." projs (cdr projs))) ans))) -(defmethod ede-find-target ((proj ede-project) buffer) +(cl-defmethod ede-find-target ((proj ede-project) buffer) "Fetch the target in PROJ belonging to BUFFER or nil." (with-current-buffer buffer @@ -1295,16 +1296,16 @@ could become slow in time." (setq targets (cdr targets))) f))))) -(defmethod ede-target-buffer-in-sourcelist ((this ede-target) buffer source) +(cl-defmethod ede-target-buffer-in-sourcelist ((this ede-target) buffer source) "Return non-nil if object THIS is in BUFFER to a SOURCE list. Handles complex path issues." (member (ede-convert-path this (buffer-file-name buffer)) source)) -(defmethod ede-buffer-mine ((this ede-project) buffer) +(cl-defmethod ede-buffer-mine ((this ede-project) buffer) "Return non-nil if object THIS lays claim to the file in BUFFER." nil) -(defmethod ede-buffer-mine ((this ede-target) buffer) +(cl-defmethod ede-buffer-mine ((this ede-target) buffer) "Return non-nil if object THIS lays claim to the file in BUFFER." (condition-case nil (ede-target-buffer-in-sourcelist this buffer (oref this source)) @@ -1354,22 +1355,22 @@ This includes buffers controlled by a specific target of PROJECT." "Execute PROC on all buffers controlled by EDE." (mapcar proc (ede-buffers))) -(defmethod ede-map-project-buffers ((this ede-project) proc) +(cl-defmethod ede-map-project-buffers ((this ede-project) proc) "For THIS, execute PROC on all buffers belonging to THIS." (mapcar proc (ede-project-buffers this))) -(defmethod ede-map-target-buffers ((this ede-target) proc) +(cl-defmethod ede-map-target-buffers ((this ede-target) proc) "For THIS, execute PROC on all buffers belonging to THIS." (mapcar proc (ede-target-buffers this))) ;; other types of mapping -(defmethod ede-map-subprojects ((this ede-project) proc) +(cl-defmethod ede-map-subprojects ((this ede-project) proc) "For object THIS, execute PROC on all direct subprojects. This function does not apply PROC to sub-sub projects. See also `ede-map-all-subprojects'." (mapcar proc (oref this subproj))) -(defmethod ede-map-all-subprojects ((this ede-project) allproc) +(cl-defmethod ede-map-all-subprojects ((this ede-project) allproc) "For object THIS, execute PROC on THIS and all subprojects. This function also applies PROC to sub-sub projects. See also `ede-map-subprojects'." @@ -1383,11 +1384,11 @@ See also `ede-map-subprojects'." ;; (ede-map-all-subprojects (ede-load-project-file "../semantic/") (lambda (sp) (oref sp file))) -(defmethod ede-map-targets ((this ede-project) proc) +(cl-defmethod ede-map-targets ((this ede-project) proc) "For object THIS, execute PROC on all targets." (mapcar proc (oref this targets))) -(defmethod ede-map-any-target-p ((this ede-project) proc) +(cl-defmethod ede-map-any-target-p ((this ede-project) proc) "For project THIS, map PROC to all targets and return if any non-nil. Return the first non-nil value returned by PROC." (eval (cons 'or (ede-map-targets this proc)))) @@ -1399,15 +1400,15 @@ Return the first non-nil value returned by PROC." ;; configuring items for Semantic. ;; Generic paths -(defmethod ede-system-include-path ((this ede-project)) +(cl-defmethod ede-system-include-path ((this ede-project)) "Get the system include path used by project THIS." nil) -(defmethod ede-system-include-path ((this ede-target)) +(cl-defmethod ede-system-include-path ((this ede-target)) "Get the system include path used by project THIS." nil) -(defmethod ede-source-paths ((this ede-project) mode) +(cl-defmethod ede-source-paths ((this ede-project) mode) "Get the base to all source trees in the current project for MODE. For example, /src for sources of c/c++, Java, etc, and /doc for doc sources." @@ -1435,20 +1436,20 @@ and /doc for doc sources." (message "Choosing preprocessor syms for project %s" (eieio-object-name (car objs))))))) -(defmethod ede-system-include-path ((this ede-project)) +(cl-defmethod ede-system-include-path ((this ede-project)) "Get the system include path used by project THIS." nil) -(defmethod ede-preprocessor-map ((this ede-project)) +(cl-defmethod ede-preprocessor-map ((this ede-project)) "Get the pre-processor map for project THIS." nil) -(defmethod ede-preprocessor-map ((this ede-target)) +(cl-defmethod ede-preprocessor-map ((this ede-target)) "Get the pre-processor map for project THIS." nil) ;; Java -(defmethod ede-java-classpath ((this ede-project)) +(cl-defmethod ede-java-classpath ((this ede-project)) "Return the classpath for this project." ;; @TODO - Can JDEE add something here? nil) @@ -1504,7 +1505,7 @@ It does not apply the value to buffers." (error "Cannot set project variable until it is added with `ede-make-project-local-variable'")) (setcdr va value))) -(defmethod ede-set-project-variables ((project ede-project) &optional buffer) +(cl-defmethod ede-set-project-variables ((project ede-project) &optional buffer) "Set variables local to PROJECT in BUFFER." (if (not buffer) (setq buffer (current-buffer))) (with-current-buffer buffer @@ -1512,7 +1513,7 @@ It does not apply the value to buffers." (make-local-variable (car v)) (set (car v) (cdr v))))) -(defmethod ede-commit-local-variables ((proj ede-project)) +(cl-defmethod ede-commit-local-variables ((proj ede-project)) "Commit change to local variables in PROJ." nil) diff --git a/lisp/cedet/ede/auto.el b/lisp/cedet/ede/auto.el index 769bea4ce5..7e8df6b89a 100644 --- a/lisp/cedet/ede/auto.el +++ b/lisp/cedet/ede/auto.el @@ -30,6 +30,7 @@ ;;; Code: (require 'eieio) +(require 'cl-generic) (declare-function ede-directory-safe-p "ede") (declare-function ede-add-project-to-global-list "ede") @@ -62,7 +63,7 @@ location is varied dependent on other complex criteria, this class can be used to define that match without loading the specific project into memory.") -(defmethod ede-dirmatch-installed ((dirmatch ede-project-autoload-dirmatch)) +(cl-defmethod ede-dirmatch-installed ((dirmatch ede-project-autoload-dirmatch)) "Return non-nil if the tool DIRMATCH might match is installed on the system." (let ((fc (oref dirmatch fromconfig))) @@ -77,7 +78,7 @@ into memory.") (t (error "Unknown dirmatch type."))))) -(defmethod ede-do-dirmatch ((dirmatch ede-project-autoload-dirmatch) file) +(cl-defmethod ede-do-dirmatch ((dirmatch ede-project-autoload-dirmatch) file) "Does DIRMATCH match the filename FILE." (let ((fc (oref dirmatch fromconfig))) @@ -271,7 +272,7 @@ added. Possible values are: ;; ;; New method using detect.el -(defmethod ede-auto-detect-in-dir ((this ede-project-autoload) dir) +(cl-defmethod ede-auto-detect-in-dir ((this ede-project-autoload) dir) "Return non-nil if THIS project autoload is found in DIR." (let* ((d (file-name-as-directory dir)) (pf (oref this proj-file)) @@ -288,7 +289,7 @@ added. Possible values are: ;(message "Dirmatch %S not installed." dirmatch) ))))))) -(defmethod ede-auto-load-project ((this ede-project-autoload) dir) +(cl-defmethod ede-auto-load-project ((this ede-project-autoload) dir) "Load in the project associated with THIS project autoload description. THIS project description should be valid for DIR, where the project will be loaded. @@ -315,13 +316,13 @@ NOTE: Do not call this - it should only be called from `ede-load-project-file'." ;; See if we can do without them. ;; @FIXME - delete from loaddefs to remove this. -(defmethod ede-project-root ((this ede-project-autoload)) +(cl-defmethod ede-project-root ((this ede-project-autoload)) "If a project knows its root, return it here. Allows for one-project-object-for-a-tree type systems." nil) ;; @FIXME - delete from loaddefs to remove this. -(defmethod ede-project-root-directory ((this ede-project-autoload) &optional file) +(cl-defmethod ede-project-root-directory ((this ede-project-autoload) &optional file) "" nil) (provide 'ede/auto) diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el index ce7857b53a..6d5e242de0 100644 --- a/lisp/cedet/ede/base.el +++ b/lisp/cedet/ede/base.el @@ -27,6 +27,7 @@ ;;; Code: (require 'eieio) +(require 'cl-generic) (require 'eieio-speedbar) (require 'ede/auto) @@ -402,7 +403,7 @@ If set to nil, then the cache is not saved." ;; ;; Mode related methods are in ede.el. These methods are related ;; project specific activities not directly tied to a keybinding. -(defmethod ede-subproject-relative-path ((proj ede-project) &optional parent-in) +(cl-defmethod ede-subproject-relative-path ((proj ede-project) &optional parent-in) "Get a path name for PROJ which is relative to the parent project. If PARENT is specified, then be relative to the PARENT project. Specifying PARENT is useful for sub-sub projects relative to the root project." @@ -412,7 +413,7 @@ Specifying PARENT is useful for sub-sub projects relative to the root project." (file-relative-name dir (file-name-directory (oref parent file))) ""))) -(defmethod ede-subproject-p ((proj ede-project)) +(cl-defmethod ede-subproject-p ((proj ede-project)) "Return non-nil if PROJ is a sub project." ;; @TODO - Use this in more places, and also pay attention to ;; metasubproject in ede/proj.el @@ -425,26 +426,26 @@ Specifying PARENT is useful for sub-sub projects relative to the root project." ;; no need to in most situations because they are either a) simple, or ;; b) cosmetic. -(defmethod ede-name ((this ede-target)) +(cl-defmethod ede-name ((this ede-target)) "Return the name of THIS target." (oref this name)) -(defmethod ede-target-name ((this ede-target)) +(cl-defmethod ede-target-name ((this ede-target)) "Return the name of THIS target, suitable for make or debug style commands." (oref this name)) -(defmethod ede-name ((this ede-project)) +(cl-defmethod ede-name ((this ede-project)) "Return a short-name for THIS project file. Do this by extracting the lowest directory name." (oref this name)) -(defmethod ede-description ((this ede-project)) +(cl-defmethod ede-description ((this ede-project)) "Return a description suitable for the minibuffer about THIS." (format "Project %s: %d subprojects, %d targets." (ede-name this) (length (oref this subproj)) (length (oref this targets)))) -(defmethod ede-description ((this ede-target)) +(cl-defmethod ede-description ((this ede-target)) "Return a description suitable for the minibuffer about THIS." (format "Target %s: with %d source files." (ede-name this) (length (oref this source)))) @@ -463,11 +464,11 @@ Not all buffers need headers, so return nil if no applicable." (ede-buffer-header-file ede-object (current-buffer)) nil)) -(defmethod ede-buffer-header-file ((this ede-project) buffer) +(cl-defmethod ede-buffer-header-file ((this ede-project) buffer) "Return nil, projects don't have header files." nil) -(defmethod ede-buffer-header-file ((this ede-target) buffer) +(cl-defmethod ede-buffer-header-file ((this ede-target) buffer) "There are no default header files in EDE. Do a quick check to see if there is a Header tag in this buffer." (with-current-buffer buffer @@ -489,12 +490,12 @@ Some projects may have multiple documentation files, so return a list." (ede-buffer-documentation-files ede-object (current-buffer)) nil)) -(defmethod ede-buffer-documentation-files ((this ede-project) buffer) +(cl-defmethod ede-buffer-documentation-files ((this ede-project) buffer) "Return all documentation in project THIS based on BUFFER." ;; Find the info node. (ede-documentation this)) -(defmethod ede-buffer-documentation-files ((this ede-target) buffer) +(cl-defmethod ede-buffer-documentation-files ((this ede-target) buffer) "Check for some documentation files for THIS. Also do a quick check to see if there is a Documentation tag in this BUFFER." (with-current-buffer buffer @@ -505,7 +506,7 @@ Also do a quick check to see if there is a Documentation tag in this BUFFER." (let ((cp (ede-toplevel))) (ede-buffer-documentation-files cp (current-buffer)))))) -(defmethod ede-documentation ((this ede-project)) +(cl-defmethod ede-documentation ((this ede-project)) "Return a list of files that provide documentation. Documentation is not for object THIS, but is provided by THIS for other files in the project." @@ -520,7 +521,7 @@ files in the project." proj (cdr proj))) found)) -(defmethod ede-documentation ((this ede-target)) +(cl-defmethod ede-documentation ((this ede-target)) "Return a list of files that provide documentation. Documentation is not for object THIS, but is provided by THIS for other files in the project." @@ -531,7 +532,7 @@ files in the project." (ede-html-documentation (ede-toplevel)) ) -(defmethod ede-html-documentation ((this ede-project)) +(cl-defmethod ede-html-documentation ((this ede-project)) "Return a list of HTML files provided by project THIS." ) @@ -541,7 +542,7 @@ files in the project." ;; These methods are used to determine if a target "wants", or could ;; somehow handle a file, or some source type. ;; -(defmethod ede-want-file-p ((this ede-target) file) +(cl-defmethod ede-want-file-p ((this ede-target) file) "Return non-nil if THIS target wants FILE." ;; By default, all targets reference the source object, and let it decide. (let ((src (ede-target-sourcecode this))) @@ -549,7 +550,7 @@ files in the project." (setq src (cdr src))) src)) -(defmethod ede-want-file-source-p ((this ede-target) file) +(cl-defmethod ede-want-file-source-p ((this ede-target) file) "Return non-nil if THIS target wants FILE." ;; By default, all targets reference the source object, and let it decide. (let ((src (ede-target-sourcecode this))) @@ -557,7 +558,7 @@ files in the project." (setq src (cdr src))) src)) -(defmethod ede-target-sourcecode ((this ede-target)) +(cl-defmethod ede-target-sourcecode ((this ede-target)) "Return the sourcecode objects which THIS permits." (let ((sc (oref this sourcetype)) (rs nil)) diff --git a/lisp/cedet/ede/config.el b/lisp/cedet/ede/config.el index e479af0559..f91a6c1751 100644 --- a/lisp/cedet/ede/config.el +++ b/lisp/cedet/ede/config.el @@ -113,7 +113,7 @@ initialize the :file slot of the persistent baseclass.") ;;; Rescanning -(defmethod project-rescan ((this ede-project-with-config)) +(cl-defmethod project-rescan ((this ede-project-with-config)) "Rescan this generic project from the sources." ;; Force the config to be rescanned. (oset this config nil) @@ -123,7 +123,7 @@ initialize the :file slot of the persistent baseclass.") ;;; Project Methods for configuration -(defmethod ede-config-get-configuration ((proj ede-project-with-config) &optional loadask) +(cl-defmethod ede-config-get-configuration ((proj ede-project-with-config) &optional loadask) "Return the configuration for the project PROJ. If optional LOADASK is non-nil, then if a project file exists, and if the directory isn't on the `safe' list, ask to add it to the safe list." @@ -170,28 +170,28 @@ the directory isn't on the `safe' list, ask to add it to the safe list." (oset config project proj))) config)) -(defmethod ede-config-setup-configuration ((proj ede-project-with-config) config) +(cl-defmethod ede-config-setup-configuration ((proj ede-project-with-config) config) "Default configuration setup method." nil) -(defmethod ede-commit-project ((proj ede-project-with-config)) +(cl-defmethod ede-commit-project ((proj ede-project-with-config)) "Commit any change to PROJ to its file." (let ((config (ede-config-get-configuration proj))) (ede-commit config))) ;;; Customization ;; -(defmethod ede-customize ((proj ede-project-with-config)) +(cl-defmethod ede-customize ((proj ede-project-with-config)) "Customize the EDE project PROJ by actually configuring the config object." (let ((config (ede-config-get-configuration proj t))) (eieio-customize-object config))) -(defmethod ede-customize ((target ede-target-with-config)) +(cl-defmethod ede-customize ((target ede-target-with-config)) "Customize the EDE TARGET by actually configuring the config object." ;; Nothing unique for the targets, use the project. (ede-customize-project)) -(defmethod eieio-done-customizing ((config ede-extra-config)) +(cl-defmethod eieio-done-customizing ((config ede-extra-config)) "Called when EIEIO is done customizing the configuration object. We need to go back through the old buffers, and update them with the new configuration." @@ -206,7 +206,7 @@ the new configuration." (with-current-buffer b (ede-apply-target-options))))))) -(defmethod ede-commit ((config ede-extra-config)) +(cl-defmethod ede-commit ((config ede-extra-config)) "Commit all changes to the configuration to disk." ;; So long as the user is trying to safe this config, make sure they can ;; get at it again later. @@ -253,7 +253,7 @@ the new configuration." This class brings in method overloads for running and debugging programs from a project.") -(defmethod project-debug-target ((target ede-target-with-config-program)) +(cl-defmethod project-debug-target ((target ede-target-with-config-program)) "Run the current project derived from TARGET in a debugger." (let* ((proj (ede-target-parent target)) (config (ede-config-get-configuration proj t)) @@ -268,7 +268,7 @@ programs from a project.") (cmdsym (intern-soft (car cmdsplit)))) (call-interactively cmdsym t))) -(defmethod project-run-target ((target ede-target-with-config-program)) +(cl-defmethod project-run-target ((target ede-target-with-config-program)) "Run the current project derived from TARGET." (let* ((proj (ede-target-parent target)) (config (ede-config-get-configuration proj t)) @@ -299,14 +299,14 @@ This class brings in method overloads for building.") "Class to mix into a project with configuration for builds. This class brings in method overloads for for building.") -(defmethod project-compile-project ((proj ede-project-with-config-build) &optional command) +(cl-defmethod project-compile-project ((proj ede-project-with-config-build) &optional command) "Compile the entire current project PROJ. Argument COMMAND is the command to use when compiling." (let* ((config (ede-config-get-configuration proj t)) (comp (oref config :build-command))) (compile comp))) -(defmethod project-compile-target ((obj ede-target-with-config-build) &optional command) +(cl-defmethod project-compile-target ((obj ede-target-with-config-build) &optional command) "Compile the current target OBJ. Argument COMMAND is the command to use for compiling the target." (project-compile-project (ede-current-project) command)) @@ -358,7 +358,7 @@ parsed again.")) This target brings in methods used by Semantic to query the preprocessor map, and include paths.") -(defmethod ede-preprocessor-map ((this ede-target-with-config-c)) +(cl-defmethod ede-preprocessor-map ((this ede-target-with-config-c)) "Get the pre-processor map for some generic C code." (let* ((proj (ede-target-parent this)) (root (ede-project-root proj)) @@ -380,7 +380,7 @@ the preprocessor map, and include paths.") filemap )) -(defmethod ede-system-include-path ((this ede-target-with-config-c)) +(cl-defmethod ede-system-include-path ((this ede-target-with-config-c)) "Get the system include path used by project THIS." (let* ((proj (ede-target-parent this)) (config (ede-config-get-configuration proj))) @@ -402,7 +402,7 @@ java class path.") () "Class to mix into a project to support java.") -(defmethod ede-java-classpath ((proj ede-project-with-config-java)) +(cl-defmethod ede-java-classpath ((proj ede-project-with-config-java)) "Return the classpath for this project." (oref (ede-config-get-configuration proj) :classpath)) diff --git a/lisp/cedet/ede/cpp-root.el b/lisp/cedet/ede/cpp-root.el index e32066af89..81c6737531 100644 --- a/lisp/cedet/ede/cpp-root.el +++ b/lisp/cedet/ede/cpp-root.el @@ -276,11 +276,11 @@ Each directory needs a project file to control it.") ;; find previous copies of this project, and make sure that one of the ;; objects is deleted. -(defmethod initialize-instance ((this ede-cpp-root-project) +(cl-defmethod initialize-instance ((this ede-cpp-root-project) &rest fields) "Make sure the :file is fully expanded." ;; Add ourselves to the master list - (call-next-method) + (cl-call-next-method) (let ((f (expand-file-name (oref this :file)))) ;; Remove any previous entries from the main list. (let ((old (eieio-instance-tracker-find (file-name-directory f) @@ -311,7 +311,7 @@ Each directory needs a project file to control it.") ;; This is a way to allow a subdirectory to point back to the root ;; project, simplifying authoring new single-point projects. -(defmethod ede-find-subproject-for-directory ((proj ede-cpp-root-project) +(cl-defmethod ede-find-subproject-for-directory ((proj ede-cpp-root-project) dir) "Return PROJ, for handling all subdirs below DIR." proj) @@ -321,7 +321,7 @@ Each directory needs a project file to control it.") ;; Creating new targets on a per directory basis is a good way to keep ;; files organized. See ede-emacs for an example with multiple file ;; types. -(defmethod ede-find-target ((proj ede-cpp-root-project) buffer) +(cl-defmethod ede-find-target ((proj ede-cpp-root-project) buffer) "Find an EDE target in PROJ for BUFFER. If one doesn't exist, create a new one for this directory." (let* ((targets (oref proj targets)) @@ -347,13 +347,13 @@ If one doesn't exist, create a new one for this directory." ;; ;; This tools also uses the ede-locate setup for augmented file name ;; lookup using external tools. -(defmethod ede-expand-filename-impl ((proj ede-cpp-root-project) name) +(cl-defmethod ede-expand-filename-impl ((proj ede-cpp-root-project) name) "Within this project PROJ, find the file NAME. This knows details about or source tree." ;; The slow part of the original is looping over subprojects. ;; This version has no subprojects, so this will handle some ;; basic cases. - (let ((ans (call-next-method))) + (let ((ans (cl-call-next-method))) (unless ans (let* ((lf (oref proj locate-fcn)) (dir (file-name-directory (oref proj file)))) @@ -372,16 +372,16 @@ This knows details about or source tree." (setq ans tmp)) (setq ip (cdr ip)) )) ;; Else, do the usual. - (setq ans (call-next-method))) + (setq ans (cl-call-next-method))) ))) ;; TODO - does this call-next-method happen twice. Is that bad?? Why is it here? - (or ans (call-next-method)))) + (or ans (cl-call-next-method)))) -(defmethod ede-project-root ((this ede-cpp-root-project)) +(cl-defmethod ede-project-root ((this ede-cpp-root-project)) "Return my root." this) -(defmethod ede-project-root-directory ((this ede-cpp-root-project)) +(cl-defmethod ede-project-root-directory ((this ede-cpp-root-project)) "Return my root." (oref this directory)) @@ -390,12 +390,12 @@ This knows details about or source tree." ;; The following code is specific to setting up header files, ;; include lists, and Preprocessor symbol tables. -(defmethod ede-cpp-root-header-file-p ((proj ede-cpp-root-project) name) +(cl-defmethod ede-cpp-root-header-file-p ((proj ede-cpp-root-project) name) "Non nil if in PROJ the filename NAME is a header." (save-match-data (string-match (oref proj header-match-regexp) name))) -(defmethod ede-cpp-root-translate-file ((proj ede-cpp-root-project) filename) +(cl-defmethod ede-cpp-root-translate-file ((proj ede-cpp-root-project) filename) "For PROJ, translate a user specified FILENAME. This is for project include paths and spp source files." ;; Step one: Root of this project. @@ -411,11 +411,11 @@ This is for project include paths and spp source files." filename)) -(defmethod ede-system-include-path ((this ede-cpp-root-project)) +(cl-defmethod ede-system-include-path ((this ede-cpp-root-project)) "Get the system include path used by project THIS." (oref this system-include-path)) -(defmethod ede-preprocessor-map ((this ede-cpp-root-project)) +(cl-defmethod ede-preprocessor-map ((this ede-cpp-root-project)) "Get the pre-processor map for project THIS." (require 'semantic/db) (let ((spp (oref this spp-table)) @@ -445,15 +445,15 @@ This is for project include paths and spp source files." (oref this spp-files)) spp)) -(defmethod ede-system-include-path ((this ede-cpp-root-target)) +(cl-defmethod ede-system-include-path ((this ede-cpp-root-target)) "Get the system include path used by target THIS." (ede-system-include-path (ede-target-parent this))) -(defmethod ede-preprocessor-map ((this ede-cpp-root-target)) +(cl-defmethod ede-preprocessor-map ((this ede-cpp-root-target)) "Get the pre-processor map for project THIS." (ede-preprocessor-map (ede-target-parent this))) -(defmethod project-compile-project ((proj ede-cpp-root-project) &optional command) +(cl-defmethod project-compile-project ((proj ede-cpp-root-project) &optional command) "Compile the entire current project PROJ. Argument COMMAND is the command to use when compiling." ;; we need to be in the proj root dir for this to work @@ -469,14 +469,14 @@ Argument COMMAND is the command to use when compiling." (let ((default-directory (ede-project-root-directory proj))) (compile cmd-str))))) -(defmethod project-compile-target ((obj ede-cpp-root-target) &optional command) +(cl-defmethod project-compile-target ((obj ede-cpp-root-target) &optional command) "Compile the current target OBJ. Argument COMMAND is the command to use for compiling the target." (when (oref obj :project) (project-compile-project (oref obj :project) command))) -(defmethod project-rescan ((this ede-cpp-root-project)) +(cl-defmethod project-rescan ((this ede-cpp-root-project)) "Don't rescan this project from the sources." (message "cpp-root has nothing to rescan.")) diff --git a/lisp/cedet/ede/custom.el b/lisp/cedet/ede/custom.el index a39b488028..5b8783fd27 100644 --- a/lisp/cedet/ede/custom.el +++ b/lisp/cedet/ede/custom.el @@ -76,11 +76,11 @@ OBJ is the target object to customize." (error "No logical target to customize")) (ede-customize obj)) -(defmethod ede-customize ((proj ede-project)) +(cl-defmethod ede-customize ((proj ede-project)) "Customize the EDE project PROJ." (eieio-customize-object proj 'default)) -(defmethod ede-customize ((target ede-target)) +(cl-defmethod ede-customize ((target ede-target)) "Customize the EDE TARGET." (eieio-customize-object target 'default)) @@ -177,7 +177,7 @@ OBJ is the target object to customize." ;;; Customization hooks ;; ;; These hooks are used when finishing up a customization. -(defmethod eieio-done-customizing ((proj ede-project)) +(cl-defmethod eieio-done-customizing ((proj ede-project)) "Call this when a user finishes customizing PROJ." (let ((ov eieio-ede-old-variables) (nv (oref proj local-variables))) @@ -196,11 +196,11 @@ OBJ is the target object to customize." ;; These two methods should be implemented by subclasses of ;; project and targets in order to account for user specified ;; changes. -(defmethod eieio-done-customizing ((target ede-target)) +(cl-defmethod eieio-done-customizing ((target ede-target)) "Call this when a user finishes customizing TARGET." nil) -(defmethod ede-commit-project ((proj ede-project)) +(cl-defmethod ede-commit-project ((proj ede-project)) "Commit any change to PROJ to its file." nil ) diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el index 621e8951dd..ca58810cdd 100644 --- a/lisp/cedet/ede/emacs.el +++ b/lisp/cedet/ede/emacs.el @@ -141,25 +141,25 @@ All directories need at least one target.") "EDE Emacs Project target for Misc files. All directories need at least one target.") -(defmethod initialize-instance ((this ede-emacs-project) +(cl-defmethod initialize-instance ((this ede-emacs-project) &rest fields) "Make sure the targets slot is bound." - (call-next-method) + (cl-call-next-method) (unless (slot-boundp this 'targets) (oset this :targets nil))) ;;; File Stuff ;; -(defmethod ede-project-root-directory ((this ede-emacs-project) +(cl-defmethod ede-project-root-directory ((this ede-emacs-project) &optional file) "Return the root for THIS Emacs project with file." (ede-up-directory (file-name-directory (oref this file)))) -(defmethod ede-project-root ((this ede-emacs-project)) +(cl-defmethod ede-project-root ((this ede-emacs-project)) "Return my root." this) -(defmethod ede-find-subproject-for-directory ((proj ede-emacs-project) +(cl-defmethod ede-find-subproject-for-directory ((proj ede-emacs-project) dir) "Return PROJ, for handling all subdirs below DIR." proj) @@ -176,7 +176,7 @@ All directories need at least one target.") )) match)) -(defmethod ede-find-target ((proj ede-emacs-project) buffer) +(cl-defmethod ede-find-target ((proj ede-emacs-project) buffer) "Find an EDE target in PROJ for BUFFER. If one doesn't exist, create a new one for this directory." (let* ((ext (file-name-extension (buffer-file-name buffer))) @@ -204,7 +204,7 @@ If one doesn't exist, create a new one for this directory." ;;; UTILITIES SUPPORT. ;; -(defmethod ede-preprocessor-map ((this ede-emacs-target-c)) +(cl-defmethod ede-preprocessor-map ((this ede-emacs-target-c)) "Get the pre-processor map for Emacs C code. All files need the macros from lisp.h!" (require 'semantic/db) @@ -253,7 +253,7 @@ All files need the macros from lisp.h!" (setq dirs (cdr dirs)))) ans)) -(defmethod ede-expand-filename-impl ((proj ede-emacs-project) name) +(cl-defmethod ede-expand-filename-impl ((proj ede-emacs-project) name) "Within this project PROJ, find the file NAME. Knows about how the Emacs source tree is organized." (let* ((ext (file-name-extension name)) @@ -269,13 +269,13 @@ Knows about how the Emacs source tree is organized." '("doc")) (t nil))) ) - (if (not dirs) (call-next-method) + (if (not dirs) (cl-call-next-method) (ede-emacs-find-in-directories name dir dirs)) )) ;;; Command Support ;; -(defmethod project-rescan ((this ede-emacs-project)) +(cl-defmethod project-rescan ((this ede-emacs-project)) "Rescan this Emacs project from the sources." (let ((ver (ede-emacs-version (ede-project-root-directory this)))) (oset this name (car ver)) diff --git a/lisp/cedet/ede/files.el b/lisp/cedet/ede/files.el index a3febfa4e5..1922337feb 100644 --- a/lisp/cedet/ede/files.el +++ b/lisp/cedet/ede/files.el @@ -69,12 +69,12 @@ the current EDE project." ;;; Placeholders for ROOT directory scanning on base objects ;; -(defmethod ede-project-root ((this ede-project-placeholder)) +(cl-defmethod ede-project-root ((this ede-project-placeholder)) "If a project knows its root, return it here. Allows for one-project-object-for-a-tree type systems." (oref this rootproject)) -(defmethod ede-project-root-directory ((this ede-project-placeholder) +(cl-defmethod ede-project-root-directory ((this ede-project-placeholder) &optional file) "If a project knows its root, return it here. Allows for one-project-object-for-a-tree type systems. @@ -116,7 +116,7 @@ of the anchor file for the project." (ede--put-inode-dir-hash dir (nth 10 fattr)) ))))) -(defmethod ede--project-inode ((proj ede-project-placeholder)) +(cl-defmethod ede--project-inode ((proj ede-project-placeholder)) "Get the inode of the directory project PROJ is in." (if (slot-boundp proj 'dirinode) (oref proj dirinode) @@ -217,7 +217,7 @@ If optional EXACT is non-nil, only return exact matches for DIR." ;; the short answer we found -> ie - we are in a subproject. (or ans shortans))) -(defmethod ede-find-subproject-for-directory ((proj ede-project-placeholder) +(cl-defmethod ede-find-subproject-for-directory ((proj ede-project-placeholder) dir) "Find a subproject of PROJ that corresponds to DIR." (if ede--disable-inode @@ -374,7 +374,7 @@ If DIR is not part of a project, return nil." ;;; DIRECTORY CONVERSION STUFF ;; -(defmethod ede-convert-path ((this ede-project) path) +(cl-defmethod ede-convert-path ((this ede-project) path) "Convert path in a standard way for a given project. Default to making it project relative. Argument THIS is the project to convert PATH to." @@ -388,7 +388,7 @@ Argument THIS is the project to convert PATH to." (substring fptf (match-end 0)) (error "Cannot convert relativize path %s" fp)))))) -(defmethod ede-convert-path ((this ede-target) path &optional project) +(cl-defmethod ede-convert-path ((this ede-target) path &optional project) "Convert path in a standard way for a given project. Default to making it project relative. Argument THIS is the project to convert PATH to. @@ -419,7 +419,7 @@ Get it from the toplevel project. If it doesn't have one, make one." (oref top locate-obj) ))) -(defmethod ede-expand-filename ((this ede-project) filename &optional force) +(cl-defmethod ede-expand-filename ((this ede-project) filename &optional force) "Return a fully qualified file name based on project THIS. FILENAME should be just a filename which occurs in a directory controlled by this project. @@ -476,7 +476,7 @@ is returned." ans)) -(defmethod ede-expand-filename-impl ((this ede-project) filename &optional force) +(cl-defmethod ede-expand-filename-impl ((this ede-project) filename &optional force) "Return a fully qualified file name based on project THIS. FILENAME should be just a filename which occurs in a directory controlled by this project. @@ -496,7 +496,7 @@ doesn't exist." ;; Return it found)) -(defmethod ede-expand-filename-local ((this ede-project) filename) +(cl-defmethod ede-expand-filename-local ((this ede-project) filename) "Expand filename locally to project THIS with filesystem tests." (let ((path (ede-project-root-directory this))) (cond ((file-exists-p (expand-file-name filename path)) @@ -504,7 +504,7 @@ doesn't exist." ((file-exists-p (expand-file-name (concat "include/" filename) path)) (expand-file-name (concat "include/" filename) path))))) -(defmethod ede-expand-filename-impl-via-subproj ((this ede-project) filename) +(cl-defmethod ede-expand-filename-impl-via-subproj ((this ede-project) filename) "Return a fully qualified file name based on project THIS. FILENAME should be just a filename which occurs in a directory controlled by this project." @@ -520,7 +520,7 @@ by this project." ;; Return it found)) -(defmethod ede-expand-filename ((this ede-target) filename &optional force) +(cl-defmethod ede-expand-filename ((this ede-target) filename &optional force) "Return a fully qualified file name based on target THIS. FILENAME should be a filename which occurs in a directory in which THIS works. Optional argument FORCE forces the default filename to be provided even if it diff --git a/lisp/cedet/ede/generic.el b/lisp/cedet/ede/generic.el index 4d1e0e2070..7e1425f131 100644 --- a/lisp/cedet/ede/generic.el +++ b/lisp/cedet/ede/generic.el @@ -148,19 +148,19 @@ The class allocated value is replace by different sub classes.") "The baseclass for all generic EDE project types." :abstract t) -(defmethod initialize-instance ((this ede-generic-project) +(cl-defmethod initialize-instance ((this ede-generic-project) &rest fields) "Make sure the targets slot is bound." - (call-next-method) + (cl-call-next-method) (unless (slot-boundp this 'targets) (oset this :targets nil)) ) -(defmethod ede-project-root ((this ede-generic-project)) +(cl-defmethod ede-project-root ((this ede-generic-project)) "Return my root." this) -(defmethod ede-find-subproject-for-directory ((proj ede-generic-project) +(cl-defmethod ede-find-subproject-for-directory ((proj ede-generic-project) dir) "Return PROJ, for handling all subdirs below DIR." proj) @@ -216,7 +216,7 @@ All directories need at least one target.") )) match)) -(defmethod ede-find-target ((proj ede-generic-project) buffer) +(cl-defmethod ede-find-target ((proj ede-generic-project) buffer) "Find an EDE target in PROJ for BUFFER. If one doesn't exist, create a new one for this directory." (let* ((ext (file-name-extension (buffer-file-name buffer))) @@ -322,7 +322,7 @@ the class `ede-generic-project' project." ) "Generic Project for makefiles.") -(defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config) +(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config) "Setup a configuration for Make." (oset config build-command "make -k") (oset config debug-command "gdb ") @@ -335,7 +335,7 @@ the class `ede-generic-project' project." ) "Generic Project for scons.") -(defmethod ede-generic-setup-configuration ((proj ede-generic-scons-project) config) +(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-scons-project) config) "Setup a configuration for SCONS." (oset config build-command "scons") (oset config debug-command "gdb ") @@ -348,7 +348,7 @@ the class `ede-generic-project' project." ) "Generic Project for cmake.") -(defmethod ede-generic-setup-configuration ((proj ede-generic-cmake-project) config) +(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-cmake-project) config) "Setup a configuration for CMake." (oset config build-command "cmake") (oset config debug-command "gdb ") @@ -359,7 +359,7 @@ the class `ede-generic-project' project." () "Generic project found via Version Control files.") -(defmethod ede-generic-setup-configuration ((proj ede-generic-vc-project) config) +(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-vc-project) config) "Setup a configuration for projects identified by revision control." ) diff --git a/lisp/cedet/ede/linux.el b/lisp/cedet/ede/linux.el index c962724ce0..6887d38707 100644 --- a/lisp/cedet/ede/linux.el +++ b/lisp/cedet/ede/linux.el @@ -231,25 +231,25 @@ All directories need at least one target.") "EDE Linux Project target for Misc files. All directories need at least one target.") -(defmethod initialize-instance ((this ede-linux-project) +(cl-defmethod initialize-instance ((this ede-linux-project) &rest fields) "Make sure the targets slot is bound." - (call-next-method) + (cl-call-next-method) (unless (slot-boundp this 'targets) (oset this :targets nil))) ;;; File Stuff ;; -(defmethod ede-project-root-directory ((this ede-linux-project) +(cl-defmethod ede-project-root-directory ((this ede-linux-project) &optional file) "Return the root for THIS Linux project with file." (ede-up-directory (file-name-directory (oref this file)))) -(defmethod ede-project-root ((this ede-linux-project)) +(cl-defmethod ede-project-root ((this ede-linux-project)) "Return my root." this) -(defmethod ede-find-subproject-for-directory ((proj ede-linux-project) +(cl-defmethod ede-find-subproject-for-directory ((proj ede-linux-project) dir) "Return PROJ, for handling all subdirs below DIR." proj) @@ -266,7 +266,7 @@ All directories need at least one target.") )) match)) -(defmethod ede-find-target ((proj ede-linux-project) buffer) +(cl-defmethod ede-find-target ((proj ede-linux-project) buffer) "Find an EDE target in PROJ for BUFFER. If one doesn't exist, create a new one for this directory." (let* ((ext (file-name-extension (buffer-file-name buffer))) @@ -292,7 +292,7 @@ If one doesn't exist, create a new one for this directory." ;;; UTILITIES SUPPORT. ;; -(defmethod ede-preprocessor-map ((this ede-linux-target-c)) +(cl-defmethod ede-preprocessor-map ((this ede-linux-target-c)) "Get the pre-processor map for Linux C code. All files need the macros from lisp.h!" (require 'semantic/db) @@ -317,7 +317,7 @@ All files need the macros from lisp.h!" (let ((F (expand-file-name name (expand-file-name subdir root)))) (when (file-exists-p F) F))) -(defmethod ede-expand-filename-impl ((proj ede-linux-project) name) +(cl-defmethod ede-expand-filename-impl ((proj ede-linux-project) name) "Within this project PROJ, find the file NAME. Knows about how the Linux source tree is organized." (let* ((ext (file-name-extension name)) @@ -338,11 +338,11 @@ Knows about how the Linux source tree is organized." ((string-match "txt" ext) (ede-linux-file-exists-name name dir "Documentation")) (t nil)))) - (or F (call-next-method)))) + (or F (cl-call-next-method)))) ;;; Command Support ;; -(defmethod project-compile-project ((proj ede-linux-project) +(cl-defmethod project-compile-project ((proj ede-linux-project) &optional command) "Compile the entire current project. Argument COMMAND is the command to use when compiling." @@ -359,7 +359,7 @@ Argument COMMAND is the command to use when compiling." (compile command))) -(defmethod project-compile-target ((obj ede-linux-target-c) &optional command) +(cl-defmethod project-compile-target ((obj ede-linux-target-c) &optional command) "Compile the current target. Argument COMMAND is the command to use for compiling the target." (let* ((proj (ede-target-parent obj)) @@ -378,7 +378,7 @@ Argument COMMAND is the command to use for compiling the target." (compile command))) -(defmethod project-rescan ((this ede-linux-project)) +(cl-defmethod project-rescan ((this ede-linux-project)) "Rescan this Linux project from the sources." (let* ((dir (ede-project-root-directory this)) (bdir (ede-linux--get-build-directory dir)) diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el index c0c8ae3b38..2ff83418f7 100644 --- a/lisp/cedet/ede/locate.el +++ b/lisp/cedet/ede/locate.el @@ -110,34 +110,34 @@ based on `ede-locate-setup-options'." ) "Baseclass for LOCATE feature in EDE.") -(defmethod initialize-instance ((loc ede-locate-base) &rest fields) +(cl-defmethod initialize-instance ((loc ede-locate-base) &rest fields) "Make sure we have a hash table." ;; Basic setup. - (call-next-method) + (cl-call-next-method) ;; Make sure we have a hash table. (ede-locate-flush-hash loc) ) -(defmethod ede-locate-ok-in-project :static ((loc ede-locate-base) +(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-base)) root) "Is it ok to use this project type under ROOT." t) -(defmethod ede-locate-flush-hash ((loc ede-locate-base)) +(cl-defmethod ede-locate-flush-hash ((loc ede-locate-base)) "For LOC, flush hashtable and start from scratch." (oset loc hash (make-hash-table :test 'equal))) -(defmethod ede-locate-file-in-hash ((loc ede-locate-base) +(cl-defmethod ede-locate-file-in-hash ((loc ede-locate-base) filestring) "For LOC, is the file FILESTRING in our hashtable?" (gethash filestring (oref loc hash))) -(defmethod ede-locate-add-file-to-hash ((loc ede-locate-base) +(cl-defmethod ede-locate-add-file-to-hash ((loc ede-locate-base) filestring fullfilename) "For LOC, add FILESTR to the hash with FULLFILENAME." (puthash filestring fullfilename (oref loc hash))) -(defmethod ede-locate-file-in-project ((loc ede-locate-base) +(cl-defmethod ede-locate-file-in-project ((loc ede-locate-base) filesubstring ) "Locate with LOC occurrences of FILESUBSTRING. @@ -149,7 +149,7 @@ that created this EDE locate object." (oset loc lastanswer ans) ans)) -(defmethod ede-locate-file-in-project-impl ((loc ede-locate-base) +(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-base) filesubstring ) "Locate with LOC occurrences of FILESUBSTRING. @@ -158,8 +158,8 @@ that created this EDE locate object." nil ) -(defmethod ede-locate-create/update-root-database :STATIC - ((loc ede-locate-base) root) +(cl-defmethod ede-locate-create/update-root-database + ((loc (subclass ede-locate-base)) root) "Create or update the database for the current project. You cannot create projects for the baseclass." (error "Cannot create/update a database of type %S" @@ -177,13 +177,13 @@ You cannot create projects for the baseclass." Configure the Emacs `locate-program' variable to also configure the use of EDE locate.") -(defmethod ede-locate-ok-in-project :static ((loc ede-locate-locate) +(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-locate)) root) "Is it ok to use this project type under ROOT." (or (featurep 'locate) (locate-library "locate")) ) -(defmethod ede-locate-file-in-project-impl ((loc ede-locate-locate) +(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-locate) filesubstring) "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. Searches are done under the current root of the EDE project @@ -220,12 +220,12 @@ that created this EDE locate object." Configure EDE's use of GNU Global through the cedet-global.el variable `cedet-global-command'.") -(defmethod initialize-instance ((loc ede-locate-global) +(cl-defmethod initialize-instance ((loc ede-locate-global) &rest slots) "Make sure that we can use GNU Global." (require 'cedet-global) ;; Get ourselves initialized. - (call-next-method) + (cl-call-next-method) ;; Do the checks. (cedet-gnu-global-version-check) (let* ((default-directory (oref loc root)) @@ -235,7 +235,7 @@ variable `cedet-global-command'.") (oref loc root)))) ) -(defmethod ede-locate-ok-in-project :static ((loc ede-locate-global) +(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-global)) root) "Is it ok to use this project type under ROOT." (require 'cedet-global) @@ -244,7 +244,7 @@ variable `cedet-global-command'.") (newroot (cedet-gnu-global-root))) newroot)) -(defmethod ede-locate-file-in-project-impl ((loc ede-locate-global) +(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-global) filesubstring) "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. Searches are done under the current root of the EDE project @@ -253,8 +253,8 @@ that created this EDE locate object." (let ((default-directory (oref loc root))) (cedet-gnu-global-expand-filename filesubstring))) -(defmethod ede-locate-create/update-root-database :STATIC - ((loc ede-locate-global) root) +(cl-defmethod ede-locate-create/update-root-database + ((loc (subclass ede-locate-global)) root) "Create or update the GNU Global database for the current project." (cedet-gnu-global-create/update-database root)) @@ -272,11 +272,11 @@ that created this EDE locate object." Configure EDE's use of IDUtils through the cedet-idutils.el file name searching variable `cedet-idutils-file-command'.") -(defmethod initialize-instance ((loc ede-locate-idutils) +(cl-defmethod initialize-instance ((loc ede-locate-idutils) &rest slots) "Make sure that we can use IDUtils." ;; Get ourselves initialized. - (call-next-method) + (cl-call-next-method) ;; Do the checks. (require 'cedet-idutils) (cedet-idutils-version-check) @@ -285,7 +285,7 @@ file name searching variable `cedet-idutils-file-command'.") (oref loc root))) ) -(defmethod ede-locate-ok-in-project :static ((loc ede-locate-idutils) +(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-idutils)) root) "Is it ok to use this project type under ROOT." (require 'cedet-idutils) @@ -293,7 +293,7 @@ file name searching variable `cedet-idutils-file-command'.") (when (cedet-idutils-support-for-directory root) root)) -(defmethod ede-locate-file-in-project-impl ((loc ede-locate-idutils) +(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-idutils) filesubstring) "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. Searches are done under the current root of the EDE project @@ -302,8 +302,8 @@ that created this EDE locate object." (let ((default-directory (oref loc root))) (cedet-idutils-expand-filename filesubstring))) -(defmethod ede-locate-create/update-root-database :STATIC - ((loc ede-locate-idutils) root) +(cl-defmethod ede-locate-create/update-root-database + ((loc (subclass ede-locate-idutils)) root) "Create or update the GNU Global database for the current project." (cedet-idutils-create/update-database root)) @@ -321,11 +321,11 @@ that created this EDE locate object." Configure EDE's use of Cscope through the cedet-cscope.el file name searching variable `cedet-cscope-file-command'.") -(defmethod initialize-instance ((loc ede-locate-cscope) +(cl-defmethod initialize-instance ((loc ede-locate-cscope) &rest slots) "Make sure that we can use Cscope." ;; Get ourselves initialized. - (call-next-method) + (cl-call-next-method) ;; Do the checks. (require 'cedet-cscope) (cedet-cscope-version-check) @@ -334,7 +334,7 @@ file name searching variable `cedet-cscope-file-command'.") (oref loc root))) ) -(defmethod ede-locate-ok-in-project :static ((loc ede-locate-cscope) +(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-cscope)) root) "Is it ok to use this project type under ROOT." (require 'cedet-cscope) @@ -342,7 +342,7 @@ file name searching variable `cedet-cscope-file-command'.") (when (cedet-cscope-support-for-directory root) root)) -(defmethod ede-locate-file-in-project-impl ((loc ede-locate-cscope) +(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-cscope) filesubstring) "Locate with LOC occurrences of FILESUBSTRING under PROJECTROOT. Searches are done under the current root of the EDE project @@ -351,8 +351,8 @@ that created this EDE locate object." (require 'cedet-cscope) (cedet-cscope-expand-filename filesubstring))) -(defmethod ede-locate-create/update-root-database :STATIC - ((loc ede-locate-cscope) root) +(cl-defmethod ede-locate-create/update-root-database + ((loc (subclass ede-locate-cscope)) root) "Create or update the GNU Global database for the current project." (require 'cedet-cscope) (cedet-cscope-create/update-database root)) diff --git a/lisp/cedet/ede/pconf.el b/lisp/cedet/ede/pconf.el index b22cd87e1e..6545b858ef 100644 --- a/lisp/cedet/ede/pconf.el +++ b/lisp/cedet/ede/pconf.el @@ -36,11 +36,11 @@ a file, such as AUTHORS. A value of 'never means don't ask, and don't do it. A value of nil means to just do it.") ;;; Code: -(defmethod ede-proj-configure-file ((this ede-proj-project)) +(cl-defmethod ede-proj-configure-file ((this ede-proj-project)) "The configure.ac script used by project THIS." (ede-expand-filename (ede-toplevel this) "configure.ac" t)) -(defmethod ede-proj-configure-test-required-file ((this ede-proj-project) file) +(cl-defmethod ede-proj-configure-test-required-file ((this ede-proj-project) file) "For project THIS, test that the file FILE exists, or create it." (let ((f (ede-expand-filename (ede-toplevel this) file t))) (when (not (file-exists-p f)) @@ -60,7 +60,7 @@ don't do it. A value of nil means to just do it.") (error "Quit"))))))) -(defmethod ede-proj-configure-synchronize ((this ede-proj-project)) +(cl-defmethod ede-proj-configure-synchronize ((this ede-proj-project)) "Synchronize what we know about project THIS into configure.ac." (let ((b (find-file-noselect (ede-proj-configure-file this))) ;;(td (file-name-directory (ede-proj-configure-file this))) @@ -149,7 +149,7 @@ don't do it. A value of nil means to just do it.") )))) -(defmethod ede-proj-configure-recreate ((this ede-proj-project)) +(cl-defmethod ede-proj-configure-recreate ((this ede-proj-project)) "Delete project THIS's configure script and start over." (if (not (ede-proj-configure-file this)) (error "Could not determine configure.ac for %S" (eieio-object-name this))) @@ -159,7 +159,7 @@ don't do it. A value of nil means to just do it.") (if b (kill-buffer b))) (ede-proj-configure-synchronize this)) -(defmethod ede-proj-tweak-autoconf ((this ede-proj-target)) +(cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target)) "Tweak the configure file (current buffer) to accommodate THIS." ;; Check the compilers belonging to THIS, and call the autoconf ;; setup for those compilers. @@ -167,7 +167,7 @@ don't do it. A value of nil means to just do it.") (mapc 'ede-proj-tweak-autoconf (ede-proj-linkers this)) ) -(defmethod ede-proj-flush-autoconf ((this ede-proj-target)) +(cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target)) "Flush the configure file (current buffer) to accommodate THIS. By flushing, remove any cruft that may be in the file. Subsequent calls to `ede-proj-tweak-autoconf' can restore items removed by flush." @@ -175,13 +175,13 @@ calls to `ede-proj-tweak-autoconf' can restore items removed by flush." ;; @TODO - No-one calls this ??? -(defmethod ede-proj-configure-add-missing ((this ede-proj-target)) +(cl-defmethod ede-proj-configure-add-missing ((this ede-proj-target)) "Query if any files needed by THIS provided by automake are missing. Results in --add-missing being passed to automake." nil) ;; @TODO - No-one implements this yet. -(defmethod ede-proj-configure-create-missing ((this ede-proj-target)) +(cl-defmethod ede-proj-configure-create-missing ((this ede-proj-target)) "Add any missing files for THIS by creating them." nil) diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el index deefb7bc69..3307202bf7 100644 --- a/lisp/cedet/ede/pmake.el +++ b/lisp/cedet/ede/pmake.el @@ -52,7 +52,7 @@ (declare-function ede-srecode-insert "ede/srecode") ;;; Code: -(defmethod ede-proj-makefile-create ((this ede-proj-project) mfilename) +(cl-defmethod ede-proj-makefile-create ((this ede-proj-project) mfilename) "Create a Makefile for all Makefile targets in THIS. MFILENAME is the makefile to generate." (require 'ede/srecode) @@ -284,26 +284,26 @@ Change . to _ in the variable name." (setq name (replace-match "_" nil t name))) name)) -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target)) "Return the variable name for THIS's sources." (concat (ede-pmake-varname this) "_YOU_FOUND_A_BUG")) ;;; DEPENDENCY FILE GENERATOR LISTS ;; -(defmethod ede-proj-makefile-dependency-files ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-dependency-files ((this ede-proj-target)) "Return a list of source files to convert to dependencies. Argument THIS is the target to get sources from." nil) ;;; GENERIC VARIABLES ;; -(defmethod ede-proj-makefile-configuration-variables ((this ede-proj-project) +(cl-defmethod ede-proj-makefile-configuration-variables ((this ede-proj-project) configuration) "Return a list of configuration variables from THIS. Use CONFIGURATION as the current configuration to query." (cdr (assoc configuration (oref this configuration-variables)))) -(defmethod ede-proj-makefile-insert-variables-new ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-variables-new ((this ede-proj-project)) "Insert variables needed by target THIS. NOTE: Not yet in use! This is part of an SRecode conversion of @@ -358,7 +358,7 @@ NOTE: Not yet in use! This is part of an SRecode conversion of ; )) ) -(defmethod ede-proj-makefile-insert-variables ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-project)) "Insert variables needed by target THIS." (let ((conf-table (ede-proj-makefile-configuration-variables this (oref this configuration-default))) @@ -392,7 +392,7 @@ NOTE: Not yet in use! This is part of an SRecode conversion of (insert "\nede_FILES=" (file-name-nondirectory (oref this file)) " " (file-name-nondirectory (ede-proj-dist-makefile this)) "\n")) -(defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target) +(cl-defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target) &optional moresource) "Insert the source variables needed by THIS. @@ -406,7 +406,7 @@ sources variable." (if moresource (insert " \\\n " (mapconcat (lambda (a) a) moresource " ") ""))))) -(defmethod ede-proj-makefile-insert-variables ((this ede-proj-target) &optional +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target) &optional moresource) "Insert variables needed by target THIS. Optional argument MORESOURCE is a list of additional sources to add to the @@ -414,18 +414,18 @@ sources variable." (ede-proj-makefile-insert-source-variables this moresource) ) -(defmethod ede-proj-makefile-configuration-variables ((this ede-proj-target-makefile) +(cl-defmethod ede-proj-makefile-configuration-variables ((this ede-proj-target-makefile) configuration) "Return a list of configuration variables from THIS. Use CONFIGURATION as the current configuration to query." (cdr (assoc configuration (oref this configuration-variables)))) -(defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile) +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile) &optional moresource) "Insert variables needed by target THIS. Optional argument MORESOURCE is a list of additional sources to add to the sources variable." - (call-next-method) + (cl-call-next-method) (let* ((proj (ede-target-parent this)) (conf-table (ede-proj-makefile-configuration-variables this (oref proj configuration-default))) @@ -449,19 +449,19 @@ sources variable." (ede-linker-only-once linker (ede-proj-makefile-insert-variables linker))))) -(defmethod ede-proj-makefile-insert-automake-pre-variables +(cl-defmethod ede-proj-makefile-insert-automake-pre-variables ((this ede-proj-target)) "Insert variables needed by target THIS in Makefile.am before SOURCES." nil) -(defmethod ede-proj-makefile-insert-automake-post-variables +(cl-defmethod ede-proj-makefile-insert-automake-post-variables ((this ede-proj-target)) "Insert variables needed by target THIS in Makefile.am after SOURCES." nil) ;;; GARBAGE PATTERNS ;; -(defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-project)) "Return a list of patterns that are considered garbage to THIS. These are removed with make clean." (let ((mc (ede-map-targets @@ -476,7 +476,7 @@ These are removed with make clean." (setq mc (cdr mc))) (nreverse uniq))) -(defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-target)) "Return a list of patterns that are considered garbage to THIS. These are removed with make clean." ;; Get the source object from THIS, and use the specified garbage. @@ -490,7 +490,7 @@ These are removed with make clean." ;;; RULES ;; -(defmethod ede-proj-makefile-insert-subproj-rules ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-subproj-rules ((this ede-proj-project)) "Insert a rule for the project THIS which should be a subproject." (insert ".PHONY:" (ede-name this)) (newline) @@ -501,29 +501,29 @@ These are removed with make clean." (newline) ) -(defmethod ede-proj-makefile-insert-rules ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-project)) "Insert rules needed by THIS target." (mapc 'ede-proj-makefile-insert-rules (oref this inference-rules)) ) -(defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-project)) "Insert any symbols that the DIST rule should depend on. Argument THIS is the project that should insert stuff." (mapc 'ede-proj-makefile-insert-dist-dependencies (oref this targets)) ) -(defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target)) "Insert any symbols that the DIST rule should depend on. Argument THIS is the target that should insert stuff." nil) -(defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target)) "Insert any symbols that the DIST rule should depend on. Argument THIS is the target that should insert stuff." (ede-proj-makefile-insert-dist-dependencies this) ) -(defmethod ede-proj-makefile-automake-insert-subdirs ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-automake-insert-subdirs ((this ede-proj-project)) "Insert a SUBDIRS variable for Automake." (proj-comp-insert-variable-once "SUBDIRS" (ede-map-subprojects @@ -531,11 +531,11 @@ Argument THIS is the target that should insert stuff." (insert " " (ede-subproject-relative-path sproj)) )))) -(defmethod ede-proj-makefile-automake-insert-extradist ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-automake-insert-extradist ((this ede-proj-project)) "Insert the EXTRADIST variable entries needed for Automake and EDE." (proj-comp-insert-variable-once "EXTRA_DIST" (insert "Project.ede"))) -(defmethod ede-proj-makefile-insert-dist-rules ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-dist-rules ((this ede-proj-project)) "Insert distribution rules for THIS in a Makefile, such as CLEAN and DIST." (let ((junk (ede-proj-makefile-garbage-patterns this)) tmp) @@ -602,11 +602,11 @@ Argument THIS is the target that should insert stuff." "\t@false\n\n" "\n\n# End of Makefile\n"))) -(defmethod ede-proj-makefile-insert-rules ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-target)) "Insert rules needed by THIS target." nil) -(defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile)) +(cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile)) "Insert rules needed by THIS target." (mapc 'ede-proj-makefile-insert-rules (oref this rules)) (let ((c (ede-proj-compilers this))) @@ -619,7 +619,7 @@ Argument THIS is the target that should insert stuff." (ede-proj-makefile-insert-commands this) ))) -(defmethod ede-proj-makefile-insert-commands ((this ede-proj-target-makefile)) +(cl-defmethod ede-proj-makefile-insert-commands ((this ede-proj-target-makefile)) "Insert the commands needed by target THIS. For targets, insert the commands needed by the chosen compiler." (mapc 'ede-proj-makefile-insert-commands (ede-proj-compilers this)) @@ -627,18 +627,18 @@ For targets, insert the commands needed by the chosen compiler." (mapc 'ede-proj-makefile-insert-commands (ede-proj-linkers this)))) -(defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-project)) +(cl-defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-project)) "Insert user specified rules needed by THIS target. This is different from `ede-proj-makefile-insert-rules' in that this function won't create the building rules which are auto created with automake." (mapc 'ede-proj-makefile-insert-user-rules (oref this inference-rules))) -(defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-target)) "Insert user specified rules needed by THIS target." (mapc 'ede-proj-makefile-insert-rules (oref this rules))) -(defmethod ede-proj-makefile-dependencies ((this ede-proj-target-makefile)) +(cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-makefile)) "Return a string representing the dependencies for THIS. Some compilers only use the first element in the dependencies, others have a list of intermediates (object files), and others don't care. @@ -667,7 +667,7 @@ This allows customization of how these elements appear." out)))) ;; Tags -(defmethod ede-proj-makefile-tags ((this ede-proj-project) targets) +(cl-defmethod ede-proj-makefile-tags ((this ede-proj-project) targets) "Insert into the current location rules to make recursive TAGS files. Argument THIS is the project to create tags for. Argument TARGETS are the targets we should depend on for TAGS." diff --git a/lisp/cedet/ede/proj-archive.el b/lisp/cedet/ede/proj-archive.el index ca729cee29..0c7ffdd156 100644 --- a/lisp/cedet/ede/proj-archive.el +++ b/lisp/cedet/ede/proj-archive.el @@ -43,7 +43,7 @@ :objectextention "") "Linker object for creating an archive.") -(defmethod ede-proj-makefile-insert-source-variables :BEFORE +(cl-defmethod ede-proj-makefile-insert-source-variables :before ((this ede-proj-target-makefile-archive) &optional moresource) "Insert bin_PROGRAMS variables needed by target THIS. We aren't actually inserting SOURCE details, but this is used by the @@ -52,11 +52,11 @@ Makefile.am generator, so use it to add this important bin program." (concat "lib" (ede-name this) "_a_LIBRARIES") (insert (concat "lib" (ede-name this) ".a")))) -(defmethod ede-proj-makefile-garbage-patterns +(cl-defmethod ede-proj-makefile-garbage-patterns ((this ede-proj-target-makefile-archive)) "Add archive name to the garbage patterns. This makes sure that the archive is removed with 'make clean'." - (let ((garb (call-next-method))) + (let ((garb (cl-call-next-method))) (append garb (list (concat "lib" (ede-name this) ".a"))))) (provide 'ede/proj-archive) diff --git a/lisp/cedet/ede/proj-aux.el b/lisp/cedet/ede/proj-aux.el index 266b865ff4..0e76cda198 100644 --- a/lisp/cedet/ede/proj-aux.el +++ b/lisp/cedet/ede/proj-aux.el @@ -39,7 +39,7 @@ :sourcepattern "^[A-Z]+$\\|\\.txt$") "Miscellaneous fields definition.") -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-aux)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-aux)) "Return the variable name for THIS's sources." (concat (ede-pmake-varname this) "_AUX")) diff --git a/lisp/cedet/ede/proj-comp.el b/lisp/cedet/ede/proj-comp.el index abe5866de0..87eae6cb1c 100644 --- a/lisp/cedet/ede/proj-comp.el +++ b/lisp/cedet/ede/proj-comp.el @@ -173,12 +173,12 @@ Adds this rule to a .PHONY list.")) This is used when creating a Makefile to prevent duplicate variables and rules from being created.") -(defmethod initialize-instance :AFTER ((this ede-compiler) &rest fields) +(cl-defmethod initialize-instance :after ((this ede-compiler) &rest fields) "Make sure that all ede compiler objects are cached in `ede-compiler-list'." (add-to-list 'ede-compiler-list this)) -(defmethod initialize-instance :AFTER ((this ede-linker) &rest fields) +(cl-defmethod initialize-instance :after ((this ede-linker) &rest fields) "Make sure that all ede compiler objects are cached in `ede-linker-list'." (add-to-list 'ede-linker-list this)) @@ -235,7 +235,7 @@ This will prevent rules from creating duplicate variables or rules." (car-safe linkers)) ;;; Methods: -(defmethod ede-proj-tweak-autoconf ((this ede-compilation-program)) +(cl-defmethod ede-proj-tweak-autoconf ((this ede-compilation-program)) "Tweak the configure file (current buffer) to accommodate THIS." (mapcar (lambda (obj) @@ -247,7 +247,7 @@ This will prevent rules from creating duplicate variables or rules." ) (oref this autoconf))) -(defmethod ede-proj-flush-autoconf ((this ede-compilation-program)) +(cl-defmethod ede-proj-flush-autoconf ((this ede-compilation-program)) "Flush the configure file (current buffer) to accommodate THIS." nil) @@ -263,7 +263,7 @@ Execute BODY in a location where a value can be placed." )) (put 'proj-comp-insert-variable-once 'lisp-indent-function 1) -(defmethod ede-proj-makefile-insert-variables ((this ede-compilation-program)) +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-compilation-program)) "Insert variables needed by the compiler THIS." (if (eieio-instance-inheritor-slot-boundp this 'variables) (with-slots (variables) this @@ -276,19 +276,19 @@ Execute BODY in a location where a value can be placed." (insert cd))))) variables)))) -(defmethod ede-compiler-intermediate-objects-p ((this ede-compiler)) +(cl-defmethod ede-compiler-intermediate-objects-p ((this ede-compiler)) "Return non-nil if THIS has intermediate object files. If this compiler creates code that can be linked together, then the object files created by the compiler are considered intermediate." (oref this uselinker)) -(defmethod ede-compiler-intermediate-object-variable ((this ede-compiler) +(cl-defmethod ede-compiler-intermediate-object-variable ((this ede-compiler) targetname) "Return a string based on THIS representing a make object variable. TARGETNAME is the name of the target that these objects belong to." (concat targetname "_OBJ")) -(defmethod ede-proj-makefile-insert-object-variables ((this ede-compiler) +(cl-defmethod ede-proj-makefile-insert-object-variables ((this ede-compiler) targetname sourcefiles) "Insert an OBJ variable to specify object code to be generated for THIS. The name of the target is TARGETNAME as a string. SOURCEFILES is the list of @@ -312,19 +312,19 @@ Not all compilers do this." sourcefiles) (insert "\n"))))) -(defmethod ede-proj-makefile-insert-rules ((this ede-compilation-program)) +(cl-defmethod ede-proj-makefile-insert-rules ((this ede-compilation-program)) "Insert rules needed for THIS compiler object." (ede-compiler-only-once this (mapc 'ede-proj-makefile-insert-rules (oref this rules)))) -(defmethod ede-proj-makefile-insert-rules ((this ede-makefile-rule)) +(cl-defmethod ede-proj-makefile-insert-rules ((this ede-makefile-rule)) "Insert rules needed for THIS rule object." (if (oref this phony) (insert ".PHONY: " (oref this target) "\n")) (insert (oref this target) ": " (oref this dependencies) "\n\t" (mapconcat (lambda (c) c) (oref this rules) "\n\t") "\n\n")) -(defmethod ede-proj-makefile-insert-commands ((this ede-compilation-program)) +(cl-defmethod ede-proj-makefile-insert-commands ((this ede-compilation-program)) "Insert the commands needed to use compiler THIS. The object creating makefile rules must call this method for the compiler it decides to use after inserting in the rule." diff --git a/lisp/cedet/ede/proj-elisp.el b/lisp/cedet/ede/proj-elisp.el index 8e01445233..778d485c44 100644 --- a/lisp/cedet/ede/proj-elisp.el +++ b/lisp/cedet/ede/proj-elisp.el @@ -57,7 +57,7 @@ Each package's directory should also appear in :aux-packages via a package name. "This target consists of a group of lisp files. A lisp target may be one general program with many separate lisp files in it.") -(defmethod ede-proj-makefile-insert-rules :after ((this ede-proj-target-elisp)) +(cl-defmethod ede-proj-makefile-insert-rules :after ((this ede-proj-target-elisp)) "Insert rules needed by THIS target. This inserts the PRELOADS target-local variable." (let ((preloads (oref this pre-load-packages))) @@ -67,7 +67,7 @@ This inserts the PRELOADS target-local variable." (mapconcat 'identity preloads " "))))) (insert "\n")) -(defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp)) +(cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp)) "Return a string representing the dependencies for THIS. Some compilers only use the first element in the dependencies, others have a list of intermediates (object files), and others don't care. @@ -109,7 +109,7 @@ For Emacs Lisp, return addsuffix command on source files." "Compile Emacs Lisp programs with XEmacs.") ;;; Claiming files -(defmethod ede-buffer-mine ((this ede-proj-target-elisp) buffer) +(cl-defmethod ede-buffer-mine ((this ede-proj-target-elisp) buffer) "Return t if object THIS lays claim to the file in BUFFER. Lays claim to all .elc files that match .el files in this target." (if (string-match "\\.elc$" (buffer-file-name buffer)) @@ -121,7 +121,7 @@ Lays claim to all .elc files that match .el files in this target." ;; Is this in our list. (member fname (oref this auxsource)) ) - (call-next-method) ; The usual thing. + (cl-call-next-method) ; The usual thing. )) ;;; Emacs Lisp Compiler @@ -145,7 +145,7 @@ Lays claim to all .elc files that match .el files in this target." packages (cdr packages)))) paths)) -(defmethod project-compile-target ((obj ede-proj-target-elisp)) +(cl-defmethod project-compile-target ((obj ede-proj-target-elisp)) "Compile all sources in a Lisp target OBJ. Bonus: Return a cons cell: (COMPILED . UPTODATE)." (let* ((proj (ede-target-parent obj)) @@ -173,7 +173,7 @@ Bonus: Return a cons cell: (COMPILED . UPTODATE)." (message "All Emacs Lisp sources are up to date in %s" (eieio-object-name obj)) (cons comp utd))) -(defmethod ede-update-version-in-source ((this ede-proj-target-elisp) version) +(cl-defmethod ede-update-version-in-source ((this ede-proj-target-elisp) version) "In a Lisp file, updated a version string for THIS to VERSION. There are standards in Elisp files specifying how the version string is found, such as a `-version' variable, or the standard header." @@ -195,12 +195,12 @@ is found, such as a `-version' variable, or the standard header." (insert version))))) (setq vs (cdr vs))) ;; The next method will include comments such as "Version:" - (call-next-method)))) + (cl-call-next-method)))) ;;; Makefile generation functions ;; -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp)) "Return the variable name for THIS's sources." (cond ((ede-proj-automake-p) '("lisp_LISP" . share)) (t (concat (ede-pmake-varname this) "_LISP")))) @@ -219,7 +219,7 @@ is found, such as a `-version' variable, or the standard header." (setq items (cdr items))))) )) -(defmethod ede-proj-makefile-insert-variables :AFTER ((this ede-proj-target-elisp)) +(cl-defmethod ede-proj-makefile-insert-variables :after ((this ede-proj-target-elisp)) "Insert variables needed by target THIS." (let ((newitems (if (oref this aux-packages) (ede-proj-elisp-packages-to-loadpath @@ -244,9 +244,9 @@ is found, such as a `-version' variable, or the standard header." ) (error "Don't know how to update load path")))) -(defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp)) +(cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp)) "Tweak the configure file (current buffer) to accommodate THIS." - (call-next-method) + (cl-call-next-method) ;; Ok, now we have to tweak the autoconf provided `elisp-comp' program. (let ((ec (ede-expand-filename this "elisp-comp" 'newfile)) (enable-local-variables nil)) @@ -270,7 +270,7 @@ is found, such as a `-version' variable, or the standard header." (save-buffer) (kill-buffer))))) -(defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp)) +(cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp)) "Flush the configure file (current buffer) to accommodate THIS." ;; Remove crufty old paths from elisp-compile (let ((ec (ede-expand-filename this "elisp-comp" 'newfile)) @@ -311,14 +311,14 @@ Files do not need to be added to this target.") ;;; Claiming files -(defmethod ede-buffer-mine ((this ede-proj-target-elisp-autoloads) buffer) +(cl-defmethod ede-buffer-mine ((this ede-proj-target-elisp-autoloads) buffer) "Return t if object THIS lays claim to the file in BUFFER. Lays claim to all .elc files that match .el files in this target." (if (string-match (concat (regexp-quote (oref this autoload-file)) "$") (buffer-file-name buffer)) t - (call-next-method) ; The usual thing. + (cl-call-next-method) ; The usual thing. )) ;; Compilers @@ -338,7 +338,7 @@ Lays claim to all .elc files that match .el files in this target." ) "Build an autoloads file.") -(defmethod ede-proj-compilers ((obj ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-compilers ((obj ede-proj-target-elisp-autoloads)) "List of compilers being used by OBJ. If the `compiler' slot is empty, get the car of the compilers list." (let ((comp (oref obj compiler))) @@ -351,7 +351,7 @@ If the `compiler' slot is empty, get the car of the compilers list." (setq comp (list (car avail))))) comp)) -(defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target-elisp-autoloads) +(cl-defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target-elisp-autoloads) &optional moresource) "Insert the source variables needed by THIS. @@ -359,16 +359,16 @@ Optional argument MORESOURCE is a list of additional sources to add to the sources variable." nil) -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp-autoloads)) "Return the variable name for THIS's sources." nil) ; "LOADDEFS") -(defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp-autoloads)) "Return a string representing the dependencies for THIS. Always return an empty string for an autoloads generator." "") -(defmethod ede-proj-makefile-insert-variables :AFTER ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-makefile-insert-variables :after ((this ede-proj-target-elisp-autoloads)) "Insert variables needed by target THIS." (ede-pmake-insert-variable-shared "LOADDEFS" (insert (oref this autoload-file))) @@ -378,7 +378,7 @@ Always return an empty string for an autoloads generator." " "))) ) -(defmethod project-compile-target ((obj ede-proj-target-elisp-autoloads)) +(cl-defmethod project-compile-target ((obj ede-proj-target-elisp-autoloads)) "Create or update the autoload target." (require 'cedet-autogen) (let ((default-directory (ede-expand-filename obj "."))) @@ -387,13 +387,13 @@ Always return an empty string for an autoloads generator." (oref obj autoload-dirs)) )) -(defmethod ede-update-version-in-source ((this ede-proj-target-elisp-autoloads) version) +(cl-defmethod ede-update-version-in-source ((this ede-proj-target-elisp-autoloads) version) "In a Lisp file, updated a version string for THIS to VERSION. There are standards in Elisp files specifying how the version string is found, such as a `-version' variable, or the standard header." nil) -(defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target-elisp-autoloads)) "Insert any symbols that the DIST rule should depend on. Emacs Lisp autoload files ship the generated .el files. Argument THIS is the target which needs to insert an info file." @@ -402,18 +402,18 @@ Argument THIS is the target which needs to insert an info file." (insert " " (ede-proj-makefile-target-name this)) ) -(defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target-elisp-autoloads)) "Insert any symbols that the DIST rule should distribute. Emacs Lisp autoload files ship the generated .el files. Argument THIS is the target which needs to insert an info file." (insert " " (oref this autoload-file)) ) -(defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp-autoloads)) "Tweak the configure file (current buffer) to accommodate THIS." (error "Autoloads not supported in autoconf yet")) -(defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp-autoloads)) +(cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp-autoloads)) "Flush the configure file (current buffer) to accommodate THIS." nil) diff --git a/lisp/cedet/ede/proj-info.el b/lisp/cedet/ede/proj-info.el index 692b51b702..a5031ae875 100644 --- a/lisp/cedet/ede/proj-info.el +++ b/lisp/cedet/ede/proj-info.el @@ -72,17 +72,17 @@ All other sources should be included independently.")) ;;; Makefile generation ;; -(defmethod ede-proj-configure-add-missing +(cl-defmethod ede-proj-configure-add-missing ((this ede-proj-target-makefile-info)) "Query if any files needed by THIS provided by automake are missing. Results in --add-missing being passed to automake." (not (ede-expand-filename (ede-toplevel) "texinfo.tex"))) -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-info)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-info)) "Return the variable name for THIS's sources." (concat (ede-pmake-varname this) "_TEXINFOS")) -(defmethod ede-proj-makefile-insert-source-variables +(cl-defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target-makefile-info) &optional moresource) "Insert the source variables needed by THIS info target. Optional argument MORESOURCE is a list of additional sources to add to the @@ -90,7 +90,7 @@ sources variable. Does the usual for Makefile mode, but splits source into two variables when working in Automake mode." (if (not (ede-proj-automake-p)) - (call-next-method) + (cl-call-next-method) (let* ((sv (ede-proj-makefile-sourcevar this)) (src (copy-sequence (oref this source))) (menu (or (oref this menu) (car src)))) @@ -119,7 +119,7 @@ when working in Automake mode." (kill-buffer buffer)) info)) -(defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-info)) +(cl-defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-info)) "Return the name of the main target for THIS target." ;; The target should be the main-menu file name translated to .info. (let* ((source (if (not (string= (oref this mainmenu) "")) @@ -128,7 +128,7 @@ when working in Automake mode." (info (ede-makeinfo-find-info-filename source))) (concat (or info (file-name-sans-extension source)) ".info"))) -(defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target-makefile-info)) +(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-target-makefile-info)) "Insert any symbols that the DIST rule should depend on. Texinfo files want to insert generated `.info' files. Argument THIS is the target which needs to insert an info file." @@ -137,7 +137,7 @@ Argument THIS is the target which needs to insert an info file." (insert " " (ede-proj-makefile-target-name this)) ) -(defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target-makefile-info)) +(cl-defmethod ede-proj-makefile-insert-dist-filepatterns ((this ede-proj-target-makefile-info)) "Insert any symbols that the DIST rule should depend on. Texinfo files want to insert generated `.info' files. Argument THIS is the target which needs to insert an info file." @@ -151,7 +151,7 @@ Argument THIS is the target which needs to insert an info file." ; n ; (concat n ".info")))) -(defmethod object-write ((this ede-proj-target-makefile-info)) +(cl-defmethod object-write ((this ede-proj-target-makefile-info)) "Before committing any change to THIS, make sure the mainmenu is first." (let ((mm (oref this mainmenu)) (s (oref this source)) @@ -161,9 +161,9 @@ Argument THIS is the target which needs to insert an info file." ;; Make sure that MM is first in the list of items. (setq nl (cons mm (delq mm s))) (oset this source nl))) - (call-next-method)) + (cl-call-next-method)) -(defmethod ede-documentation ((this ede-proj-target-makefile-info)) +(cl-defmethod ede-documentation ((this ede-proj-target-makefile-info)) "Return a list of files that provides documentation. Documentation is not for object THIS, but is provided by THIS for other files in the project." diff --git a/lisp/cedet/ede/proj-misc.el b/lisp/cedet/ede/proj-misc.el index 3514189f4d..c04c9bd78c 100644 --- a/lisp/cedet/ede/proj-misc.el +++ b/lisp/cedet/ede/proj-misc.el @@ -65,11 +65,11 @@ All listed sources are included in the distribution.") ) "Compile code via a sub-makefile.") -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-miscelaneous)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-miscelaneous)) "Return the variable name for THIS's sources." (concat (ede-pmake-varname this) "_MISC")) -(defmethod ede-proj-makefile-dependency-files +(cl-defmethod ede-proj-makefile-dependency-files ((this ede-proj-target-makefile-miscelaneous)) "Return a list of files which THIS target depends on." (with-slots (submakefile) this @@ -79,7 +79,7 @@ All listed sources are included in the distribution.") nil) (t (list submakefile))))) -(defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile-miscelaneous)) +(cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile-miscelaneous)) "Create the make rule needed to create an archive for THIS." ;; DO NOT call the next method. We will never have any compilers, ;; or any dependencies, or stuff like this. This rule will let us diff --git a/lisp/cedet/ede/proj-obj.el b/lisp/cedet/ede/proj-obj.el index b137aee836..de06910f75 100644 --- a/lisp/cedet/ede/proj-obj.el +++ b/lisp/cedet/ede/proj-obj.el @@ -275,9 +275,9 @@ No garbage pattern since it creates C or C++ code.") ;;; The EDE object compiler ;; -(defmethod ede-proj-makefile-insert-variables ((this ede-object-compiler)) +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-object-compiler)) "Insert variables needed by the compiler THIS." - (call-next-method) + (cl-call-next-method) (if (eieio-instance-inheritor-slot-boundp this 'dependencyvar) (with-slots (dependencyvar) this (insert (car dependencyvar) "=") @@ -289,30 +289,30 @@ No garbage pattern since it creates C or C++ code.") ;;; EDE Object target type methods ;; -(defmethod ede-proj-makefile-sourcevar +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-objectcode)) "Return the variable name for THIS's sources." (require 'ede/pmake) (concat (ede-pmake-varname this) "_SOURCES")) -(defmethod ede-proj-makefile-dependency-files +(cl-defmethod ede-proj-makefile-dependency-files ((this ede-proj-target-makefile-objectcode)) "Return a list of source files to convert to dependencies. Argument THIS is the target to get sources from." (append (oref this source) (oref this auxsource))) -(defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-objectcode) +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-objectcode) &optional moresource) "Insert variables needed by target THIS. Optional argument MORESOURCE is not used." (let ((ede-proj-objectcode-dodependencies (oref (ede-target-parent this) automatic-dependencies))) - (call-next-method))) + (cl-call-next-method))) -(defmethod ede-buffer-header-file((this ede-proj-target-makefile-objectcode) +(cl-defmethod ede-buffer-header-file((this ede-proj-target-makefile-objectcode) buffer) "There are no default header files." - (or (call-next-method) + (or (cl-call-next-method) ;; Ok, nothing obvious. Try looking in ourselves. (let ((h (oref this auxsource))) ;; Add more logic here when the problem is better understood. diff --git a/lisp/cedet/ede/proj-prog.el b/lisp/cedet/ede/proj-prog.el index 6a5c3c0730..b1b26d4d1f 100644 --- a/lisp/cedet/ede/proj-prog.el +++ b/lisp/cedet/ede/proj-prog.el @@ -69,14 +69,14 @@ Note: Currently only used for Automake projects." ) "This target is an executable program.") -(defmethod ede-proj-makefile-insert-automake-pre-variables +(cl-defmethod ede-proj-makefile-insert-automake-pre-variables ((this ede-proj-target-makefile-program)) "Insert bin_PROGRAMS variables needed by target THIS." (ede-pmake-insert-variable-shared "bin_PROGRAMS" (insert (ede-name this))) - (call-next-method)) + (cl-call-next-method)) -(defmethod ede-proj-makefile-insert-automake-post-variables +(cl-defmethod ede-proj-makefile-insert-automake-post-variables ((this ede-proj-target-makefile-program)) "Insert bin_PROGRAMS variables needed by target THIS." (ede-pmake-insert-variable-shared @@ -86,11 +86,11 @@ Note: Currently only used for Automake projects." (when (oref this ldlibs) (mapc (lambda (d) (insert " -l" d)) (oref this ldlibs))) ) - (call-next-method)) + (cl-call-next-method)) -(defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-program)) +(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-program)) "Insert variables needed by the compiler THIS." - (call-next-method) + (cl-call-next-method) (let ((lf (mapconcat 'identity (oref this ldflags) " "))) (with-slots (ldlibs) this (if ldlibs @@ -100,7 +100,7 @@ Note: Currently only used for Automake projects." (when (and lf (not (string= "" lf))) (ede-pmake-insert-variable-once "LDDEPS" (insert lf))))) -(defmethod project-debug-target ((obj ede-proj-target-makefile-program)) +(cl-defmethod project-debug-target ((obj ede-proj-target-makefile-program)) "Debug a program target OBJ." (let ((tb (get-buffer-create " *padt*")) (dd (if (not (string= (oref obj path) "")) @@ -118,7 +118,7 @@ Note: Currently only used for Automake projects." (funcall ede-debug-program-function cmd)) (kill-buffer tb)))) -(defmethod project-run-target ((obj ede-proj-target-makefile-program) &optional command) +(cl-defmethod project-run-target ((obj ede-proj-target-makefile-program) &optional command) "Run a program target OBJ. Optional COMMAND is the command to run in place of asking the user." (require 'ede/shell) diff --git a/lisp/cedet/ede/proj-scheme.el b/lisp/cedet/ede/proj-scheme.el index b7ba1cfd20..5877bb98e6 100644 --- a/lisp/cedet/ede/proj-scheme.el +++ b/lisp/cedet/ede/proj-scheme.el @@ -40,7 +40,7 @@ ) "This target consists of scheme files.") -(defmethod ede-proj-tweak-autoconf ((this ede-proj-target-scheme)) +(cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target-scheme)) "Tweak the configure file (current buffer) to accommodate THIS." (autoconf-insert-new-macro "AM_INIT_GUILE_MODULE")) diff --git a/lisp/cedet/ede/proj-shared.el b/lisp/cedet/ede/proj-shared.el index 37999a3759..dfd44ac07c 100644 --- a/lisp/cedet/ede/proj-shared.el +++ b/lisp/cedet/ede/proj-shared.el @@ -171,14 +171,14 @@ Use ldlibs to add addition libraries.") "\t@-rm -f .deps/$(*F).p\n\n")) ) -(defmethod ede-proj-configure-add-missing +(cl-defmethod ede-proj-configure-add-missing ((this ede-proj-target-makefile-shared-object)) "Query if any files needed by THIS provided by automake are missing. Results in --add-missing being passed to automake." (not (and (ede-expand-filename (ede-toplevel) "ltconfig") (ede-expand-filename (ede-toplevel) "ltmain.sh")))) -(defmethod ede-proj-makefile-insert-automake-pre-variables +(cl-defmethod ede-proj-makefile-insert-automake-pre-variables ((this ede-proj-target-makefile-shared-object)) "Insert bin_PROGRAMS variables needed by target THIS. We aren't actually inserting SOURCE details, but this is used by the @@ -186,23 +186,23 @@ Makefile.am generator, so use it to add this important bin program." (ede-pmake-insert-variable-shared "lib_LTLIBRARIES" (insert (concat "lib" (ede-name this) ".la")))) -(defmethod ede-proj-makefile-insert-automake-post-variables +(cl-defmethod ede-proj-makefile-insert-automake-post-variables ((this ede-proj-target-makefile-shared-object)) "Insert bin_PROGRAMS variables needed by target THIS. We need to override -program which has an LDADD element." nil) -(defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-shared-object)) +(cl-defmethod ede-proj-makefile-target-name ((this ede-proj-target-makefile-shared-object)) "Return the name of the main target for THIS target." ;; We need some platform gunk to make the .so change to .sl, or .a, ;; depending on the platform we are going to compile against. (concat "lib" (ede-name this) ".la")) -(defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-shared-object)) +(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-shared-object)) "Return the variable name for THIS's sources." (if (eq (oref (ede-target-parent this) makefile-type) 'Makefile.am) (concat "lib" (oref this name) "_la_SOURCES") - (call-next-method))) + (cl-call-next-method))) (provide 'ede/proj-shared) diff --git a/lisp/cedet/ede/proj.el b/lisp/cedet/ede/proj.el index fd789b3857..7caee08893 100644 --- a/lisp/cedet/ede/proj.el +++ b/lisp/cedet/ede/proj.el @@ -329,27 +329,27 @@ the PROJECT being read in is the root project." ;; Restore the directory slot (oset project directory cdir))) )) -(defmethod ede-commit-local-variables ((proj ede-proj-project)) +(cl-defmethod ede-commit-local-variables ((proj ede-proj-project)) "Commit change to local variables in PROJ." (ede-proj-save proj)) -(defmethod eieio-done-customizing ((proj ede-proj-project)) +(cl-defmethod eieio-done-customizing ((proj ede-proj-project)) "Call this when a user finishes customizing this object. Argument PROJ is the project to save." - (call-next-method) + (cl-call-next-method) (ede-proj-save proj)) -(defmethod eieio-done-customizing ((target ede-proj-target)) +(cl-defmethod eieio-done-customizing ((target ede-proj-target)) "Call this when a user finishes customizing this object. Argument TARGET is the project we are completing customization on." - (call-next-method) + (cl-call-next-method) (ede-proj-save (ede-current-project))) -(defmethod ede-commit-project ((proj ede-proj-project)) +(cl-defmethod ede-commit-project ((proj ede-proj-project)) "Commit any change to PROJ to its file." (ede-proj-save proj)) -(defmethod ede-buffer-mine ((this ede-proj-project) buffer) +(cl-defmethod ede-buffer-mine ((this ede-proj-project) buffer) "Return t if object THIS lays claim to the file in BUFFER." (let ((f (ede-convert-path this (buffer-file-name buffer)))) (or (string= (file-name-nondirectory (oref this file)) f) @@ -360,9 +360,9 @@ Argument TARGET is the project we are completing customization on." (member f '("AUTHORS" "NEWS" "COPYING" "INSTALL" "README")) ))) -(defmethod ede-buffer-mine ((this ede-proj-target) buffer) +(cl-defmethod ede-buffer-mine ((this ede-proj-target) buffer) "Return t if object THIS lays claim to the file in BUFFER." - (or (call-next-method) + (or (cl-call-next-method) (ede-target-buffer-in-sourcelist this buffer (oref this auxsource)))) @@ -371,7 +371,7 @@ Argument TARGET is the project we are completing customization on." (defvar ede-proj-target-history nil "History when querying for a target type.") -(defmethod project-new-target ((this ede-proj-project) +(cl-defmethod project-new-target ((this ede-proj-project) &optional name type autoadd) "Create a new target in THIS based on the current buffer." (let* ((name (or name (read-string "Name: " ""))) @@ -409,7 +409,7 @@ Argument TARGET is the project we are completing customization on." ;; And save (ede-proj-save this))) -(defmethod project-new-target-custom ((this ede-proj-project)) +(cl-defmethod project-new-target-custom ((this ede-proj-project)) "Create a new target in THIS for custom." (let* ((name (read-string "Name: " "")) (type (completing-read "Type: " ede-proj-target-alist @@ -418,7 +418,7 @@ Argument TARGET is the project we are completing customization on." :path (ede-convert-path this default-directory) :source nil))) -(defmethod project-delete-target ((this ede-proj-target)) +(cl-defmethod project-delete-target ((this ede-proj-target)) "Delete the current target THIS from its parent project." (let ((p (ede-current-project)) (ts (oref this source))) @@ -439,7 +439,7 @@ Argument TARGET is the project we are completing customization on." (oset p targets (delq this (oref p targets))) (ede-proj-save (ede-current-project)))) -(defmethod project-add-file ((this ede-proj-target) file) +(cl-defmethod project-add-file ((this ede-proj-target) file) "Add to target THIS the current buffer represented as FILE." (let ((file (ede-convert-path this file)) (src (ede-target-sourcecode this))) @@ -454,7 +454,7 @@ Argument TARGET is the project we are completing customization on." (t (error "`project-add-file(ede-target)' source mismatch error"))) (ede-proj-save)))) -(defmethod project-remove-file ((target ede-proj-target) file) +(cl-defmethod project-remove-file ((target ede-proj-target) file) "For TARGET, remove FILE. FILE must be massaged by `ede-convert-path'." ;; Speedy delete should be safe. @@ -462,11 +462,11 @@ FILE must be massaged by `ede-convert-path'." (object-remove-from-list target 'auxsource (ede-convert-path target file)) (ede-proj-save)) -(defmethod project-update-version ((this ede-proj-project)) +(cl-defmethod project-update-version ((this ede-proj-project)) "The :version of project THIS has changed." (ede-proj-save)) -(defmethod project-make-dist ((this ede-proj-project)) +(cl-defmethod project-make-dist ((this ede-proj-project)) "Build a distribution for the project based on THIS target." (let ((pm (ede-proj-dist-makefile this)) (df (project-dist-files this))) @@ -479,14 +479,14 @@ FILE must be massaged by `ede-convert-path'." (file-name-directory pm)))) (compile (concat ede-make-command " -f " pm " dist")))) -(defmethod project-dist-files ((this ede-proj-project)) +(cl-defmethod project-dist-files ((this ede-proj-project)) "Return a list of files that constitutes a distribution of THIS project." (list ;; Note to self, keep this first for the above fn to check against. (concat (oref this name) "-" (oref this version) ".tar.gz") )) -(defmethod project-compile-project ((proj ede-proj-project) &optional command) +(cl-defmethod project-compile-project ((proj ede-proj-project) &optional command) "Compile the entire current project PROJ. Argument COMMAND is the command to use when compiling." (let ((pm (ede-proj-dist-makefile proj)) @@ -499,12 +499,12 @@ Argument COMMAND is the command to use when compiling." ;;; Target type specific compilations/debug ;; -(defmethod project-compile-target ((obj ede-proj-target) &optional command) +(cl-defmethod project-compile-target ((obj ede-proj-target) &optional command) "Compile the current target OBJ. Argument COMMAND is the command to use for compiling the target." (project-compile-project (ede-current-project) command)) -(defmethod project-compile-target ((obj ede-proj-target-makefile) +(cl-defmethod project-compile-target ((obj ede-proj-target-makefile) &optional command) "Compile the current target program OBJ. Optional argument COMMAND is the s the alternate command to use." @@ -512,21 +512,21 @@ Optional argument COMMAND is the s the alternate command to use." (compile (concat ede-make-command " -f " (oref obj makefile) " " (ede-proj-makefile-target-name obj)))) -(defmethod project-debug-target ((obj ede-proj-target)) +(cl-defmethod project-debug-target ((obj ede-proj-target)) "Run the current project target OBJ in a debugger." (error "Debug-target not supported by %s" (eieio-object-name obj))) -(defmethod project-run-target ((obj ede-proj-target)) +(cl-defmethod project-run-target ((obj ede-proj-target)) "Run the current project target OBJ." (error "Run-target not supported by %s" (eieio-object-name obj))) -(defmethod ede-proj-makefile-target-name ((this ede-proj-target)) +(cl-defmethod ede-proj-makefile-target-name ((this ede-proj-target)) "Return the name of the main target for THIS target." (ede-name this)) ;;; Compiler and source code generators ;; -(defmethod ede-want-file-auxiliary-p ((this ede-target) file) +(cl-defmethod ede-want-file-auxiliary-p ((this ede-target) file) "Return non-nil if THIS target wants FILE." ;; By default, all targets reference the source object, and let it decide. (let ((src (ede-target-sourcecode this))) @@ -534,7 +534,7 @@ Optional argument COMMAND is the s the alternate command to use." (setq src (cdr src))) src)) -(defmethod ede-proj-compilers ((obj ede-proj-target)) +(cl-defmethod ede-proj-compilers ((obj ede-proj-target)) "List of compilers being used by OBJ. If the `compiler' slot is empty, concoct one on a first match found basis for any given type from the `availablecompilers' slot. @@ -570,7 +570,7 @@ You may need to add support for this type of file." ;; Return the discovered compilers. comp))) -(defmethod ede-proj-linkers ((obj ede-proj-target)) +(cl-defmethod ede-proj-linkers ((obj ede-proj-target)) "List of linkers being used by OBJ. If the `linker' slot is empty, concoct one on a first match found basis for any given type from the `availablelinkers' slot. @@ -624,7 +624,7 @@ Converts all symbols into the objects to be used." "Return non-nil if the current project PROJ is automake mode." (eq (ede-proj-makefile-type proj) 'Makefile)) -(defmethod ede-proj-dist-makefile ((this ede-proj-project)) +(cl-defmethod ede-proj-dist-makefile ((this ede-proj-project)) "Return the name of the Makefile with the DIST target in it for THIS." (cond ((eq (oref this makefile-type) 'Makefile.am) (concat (file-name-directory (oref this file)) @@ -651,7 +651,7 @@ Converts all symbols into the objects to be used." (interactive) (ede-proj-setup-buildenvironment (ede-current-project) t)) -(defmethod ede-proj-makefile-create-maybe ((this ede-proj-project) mfilename) +(cl-defmethod ede-proj-makefile-create-maybe ((this ede-proj-project) mfilename) "Create a Makefile for all Makefile targets in THIS if needed. MFILENAME is the makefile to generate." ;; For now, pass through until dirty is implemented. @@ -660,7 +660,7 @@ MFILENAME is the makefile to generate." (file-newer-than-file-p (oref this file) mfilename)) (ede-proj-makefile-create this mfilename))) -(defmethod ede-proj-setup-buildenvironment ((this ede-proj-project) +(cl-defmethod ede-proj-setup-buildenvironment ((this ede-proj-project) &optional force) "Setup the build environment for project THIS. Handles the Makefile, or a Makefile.am configure.ac combination. @@ -686,7 +686,7 @@ Optional argument FORCE will force items to be regenerated." ;;; Lower level overloads ;; -(defmethod project-rescan ((this ede-proj-project)) +(cl-defmethod project-rescan ((this ede-proj-project)) "Rescan the EDE proj project THIS." (let ((root (or (ede-project-root this) this)) ) diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el index d0ca8091c9..462369621e 100644 --- a/lisp/cedet/ede/project-am.el +++ b/lisp/cedet/ede/project-am.el @@ -194,7 +194,7 @@ other meta-variable based on this name.") "Encode one makefile.") ;;; Code: -(defmethod project-add-file ((ot project-am-target)) +(cl-defmethod project-add-file ((ot project-am-target)) "Add the current buffer into a project. OT is the object target. DIR is the directory to start in." (let* ((target (if ede-object (error "Already associated w/ a target") @@ -221,7 +221,7 @@ OT is the object target. DIR is the directory to start in." (save-buffer)) (setq ede-object ot))) -(defmethod project-remove-file ((ot project-am-target) fnnd) +(cl-defmethod project-remove-file ((ot project-am-target) fnnd) "Remove the current buffer from any project targets." (ede-with-projectfile ot (makefile-move-to-macro (project-am-macro ot)) @@ -232,7 +232,7 @@ OT is the object target. DIR is the directory to start in." (save-buffer)) (setq ede-object nil)) -(defmethod project-edit-file-target ((obj project-am-target)) +(cl-defmethod project-edit-file-target ((obj project-am-target)) "Edit the target associated w/ this file." (find-file (concat (oref obj path) "Makefile.am")) (goto-char (point-min)) @@ -240,7 +240,7 @@ OT is the object target. DIR is the directory to start in." (if (= (point-min) (point)) (re-search-forward (ede-target-name obj)))) -(defmethod project-new-target ((proj project-am-makefile) +(cl-defmethod project-new-target ((proj project-am-makefile) &optional name type) "Create a new target named NAME. Argument TYPE is the type of target to insert. This is a string @@ -300,7 +300,7 @@ buffer being in order to provide a smart default target type." ;; This should be handled at the EDE level, calling a method of the ;; top most project. ;; -(defmethod project-compile-project ((obj project-am-target) &optional command) +(cl-defmethod project-compile-project ((obj project-am-target) &optional command) "Compile the entire current project. Argument COMMAND is the command to use when compiling." (require 'compile) @@ -324,7 +324,7 @@ Argument COMMAND is the command to use when compiling." (let* ((default-directory (project-am-find-topmost-level default-directory))) (compile command))) -(defmethod project-compile-project ((obj project-am-makefile) +(cl-defmethod project-compile-project ((obj project-am-makefile) &optional command) "Compile the entire current project. Argument COMMAND is the command to use when compiling." @@ -349,7 +349,7 @@ Argument COMMAND is the command to use when compiling." (let* ((default-directory (project-am-find-topmost-level default-directory))) (compile command))) -(defmethod project-compile-target ((obj project-am-target) &optional command) +(cl-defmethod project-compile-target ((obj project-am-target) &optional command) "Compile the current target. Argument COMMAND is the command to use for compiling the target." (require 'compile) @@ -378,7 +378,7 @@ Argument COMMAND is the command to use for compiling the target." ;; We better be in the right place when compiling a specific target. (compile command)) -(defmethod project-debug-target ((obj project-am-objectcode)) +(cl-defmethod project-debug-target ((obj project-am-objectcode)) "Run the current project target in a debugger." (let ((tb (get-buffer-create " *padt*")) (dd (oref obj path)) @@ -397,7 +397,7 @@ Argument COMMAND is the command to use for compiling the target." (declare-function ede-shell-run-something "ede/shell") -(defmethod project-run-target ((obj project-am-objectcode)) +(cl-defmethod project-run-target ((obj project-am-objectcode)) "Run the current project target in comint buffer." (require 'ede/shell) (let ((tb (get-buffer-create " *padt*")) @@ -413,7 +413,7 @@ Argument COMMAND is the command to use for compiling the target." (ede-shell-run-something obj cmd)) (kill-buffer tb)))) -(defmethod project-make-dist ((this project-am-target)) +(cl-defmethod project-make-dist ((this project-am-target)) "Run the current project in the debugger." (require 'compile) (if (not project-am-compile-project-command) @@ -500,7 +500,7 @@ This is used when subprojects are made in named subdirectories." ampf)))) ;;; Methods: -(defmethod project-targets-for-file ((proj project-am-makefile)) +(cl-defmethod project-targets-for-file ((proj project-am-makefile)) "Return a list of targets the project PROJ." (oref proj targets)) @@ -612,7 +612,7 @@ Strip out duplicates, and recurse on variables." subdirs) ) -(defmethod project-rescan ((this project-am-makefile) &optional suggestedname) +(cl-defmethod project-rescan ((this project-am-makefile) &optional suggestedname) "Rescan the makefile for all targets and sub targets." (project-am-with-makefile-current (file-name-directory (oref this file)) ;;(message "Scanning %s..." (oref this file)) @@ -692,7 +692,7 @@ Strip out duplicates, and recurse on variables." ))) -(defmethod project-rescan ((this project-am-program)) +(cl-defmethod project-rescan ((this project-am-program)) "Rescan object THIS." (oset this :source (makefile-macro-file-list (project-am-macro this))) (unless (oref this :source) @@ -700,65 +700,65 @@ Strip out duplicates, and recurse on variables." (oset this :ldadd (makefile-macro-file-list (concat (oref this :name) "_LDADD")))) -(defmethod project-rescan ((this project-am-lib)) +(cl-defmethod project-rescan ((this project-am-lib)) "Rescan object THIS." (oset this :source (makefile-macro-file-list (project-am-macro this))) (unless (oref this :source) (oset this :source (list (concat (file-name-sans-extension (oref this :name)) ".c"))))) -(defmethod project-rescan ((this project-am-texinfo)) +(cl-defmethod project-rescan ((this project-am-texinfo)) "Rescan object THIS." (oset this :include (makefile-macro-file-list (project-am-macro this)))) -(defmethod project-rescan ((this project-am-man)) +(cl-defmethod project-rescan ((this project-am-man)) "Rescan object THIS." (oset this :source (makefile-macro-file-list (project-am-macro this)))) -(defmethod project-rescan ((this project-am-lisp)) +(cl-defmethod project-rescan ((this project-am-lisp)) "Rescan the lisp sources." (oset this :source (makefile-macro-file-list (project-am-macro this)))) -(defmethod project-rescan ((this project-am-header)) +(cl-defmethod project-rescan ((this project-am-header)) "Rescan the Header sources for object THIS." (oset this :source (makefile-macro-file-list (project-am-macro this)))) -(defmethod project-rescan ((this project-am-built-src)) +(cl-defmethod project-rescan ((this project-am-built-src)) "Rescan built sources for object THIS." (oset this :source (makefile-macro-file-list "BUILT_SOURCES"))) -(defmethod project-rescan ((this project-am-extra-dist)) +(cl-defmethod project-rescan ((this project-am-extra-dist)) "Rescan object THIS." (oset this :source (makefile-macro-file-list "EXTRA_DIST"))) -(defmethod project-am-macro ((this project-am-objectcode)) +(cl-defmethod project-am-macro ((this project-am-objectcode)) "Return the default macro to 'edit' for this object type." (concat (subst-char-in-string ?- ?_ (oref this :name)) "_SOURCES")) -(defmethod project-am-macro ((this project-am-header-noinst)) +(cl-defmethod project-am-macro ((this project-am-header-noinst)) "Return the default macro to 'edit' for this object." "noinst_HEADERS") -(defmethod project-am-macro ((this project-am-header-inst)) +(cl-defmethod project-am-macro ((this project-am-header-inst)) "Return the default macro to 'edit' for this object." "include_HEADERS") -(defmethod project-am-macro ((this project-am-header-pkg)) +(cl-defmethod project-am-macro ((this project-am-header-pkg)) "Return the default macro to 'edit' for this object." "pkginclude_HEADERS") -(defmethod project-am-macro ((this project-am-header-chk)) +(cl-defmethod project-am-macro ((this project-am-header-chk)) "Return the default macro to 'edit' for this object." "check_HEADERS") -(defmethod project-am-macro ((this project-am-texinfo)) +(cl-defmethod project-am-macro ((this project-am-texinfo)) "Return the default macro to 'edit' for this object type." (concat (file-name-sans-extension (oref this :name)) "_TEXINFOS")) -(defmethod project-am-macro ((this project-am-man)) +(cl-defmethod project-am-macro ((this project-am-man)) "Return the default macro to 'edit' for this object type." (oref this :name)) -(defmethod project-am-macro ((this project-am-lisp)) +(cl-defmethod project-am-macro ((this project-am-lisp)) "Return the default macro to 'edit' for this object." "lisp_LISP") @@ -781,7 +781,7 @@ nil means that this buffer belongs to no-one." sobj (cdr sobj))) obj)))) -(defmethod ede-buffer-mine ((this project-am-makefile) buffer) +(cl-defmethod ede-buffer-mine ((this project-am-makefile) buffer) "Return t if object THIS lays claim to the file in BUFFER." (let ((efn (expand-file-name (buffer-file-name buffer)))) (or (string= (oref this :file) efn) @@ -796,42 +796,42 @@ nil means that this buffer belongs to no-one." ans) ))) -(defmethod ede-buffer-mine ((this project-am-objectcode) buffer) +(cl-defmethod ede-buffer-mine ((this project-am-objectcode) buffer) "Return t if object THIS lays claim to the file in BUFFER." (member (file-relative-name (buffer-file-name buffer) (oref this :path)) (oref this :source))) -(defmethod ede-buffer-mine ((this project-am-texinfo) buffer) +(cl-defmethod ede-buffer-mine ((this project-am-texinfo) buffer) "Return t if object THIS lays claim to the file in BUFFER." (let ((bfn (file-relative-name (buffer-file-name buffer) (oref this :path)))) (or (string= (oref this :name) bfn) (member bfn (oref this :include))))) -(defmethod ede-buffer-mine ((this project-am-man) buffer) +(cl-defmethod ede-buffer-mine ((this project-am-man) buffer) "Return t if object THIS lays claim to the file in BUFFER." (string= (oref this :name) (file-relative-name (buffer-file-name buffer) (oref this :path)))) -(defmethod ede-buffer-mine ((this project-am-lisp) buffer) +(cl-defmethod ede-buffer-mine ((this project-am-lisp) buffer) "Return t if object THIS lays claim to the file in BUFFER." (member (file-relative-name (buffer-file-name buffer) (oref this :path)) (oref this :source))) -(defmethod project-am-subtree ((ampf project-am-makefile) subdir) +(cl-defmethod project-am-subtree ((ampf project-am-makefile) subdir) "Return the sub project in AMPF specified by SUBDIR." (object-assoc (expand-file-name subdir) 'file (oref ampf subproj))) -(defmethod project-compile-target-command ((this project-am-target)) +(cl-defmethod project-compile-target-command ((this project-am-target)) "Default target to use when compiling a given target." ;; This is a pretty good default for most. "") -(defmethod project-compile-target-command ((this project-am-objectcode)) +(cl-defmethod project-compile-target-command ((this project-am-objectcode)) "Default target to use when compiling an object code target." (oref this :name)) -(defmethod project-compile-target-command ((this project-am-texinfo)) +(cl-defmethod project-compile-target-command ((this project-am-texinfo)) "Default target t- use when compiling a texinfo file." (let ((n (oref this :name))) (if (string-match "\\.texi?\\(nfo\\)?" n) @@ -861,9 +861,9 @@ Argument FILE is the file to extract the end directory name from." (t 'project-am-program))) -(defmethod ede-buffer-header-file((this project-am-objectcode) buffer) +(cl-defmethod ede-buffer-header-file((this project-am-objectcode) buffer) "There are no default header files." - (or (call-next-method) + (or (cl-call-next-method) (let ((s (oref this source)) (found nil)) (while (and s (not found)) @@ -873,7 +873,7 @@ Argument FILE is the file to extract the end directory name from." (setq s (cdr s))) found))) -(defmethod ede-documentation ((this project-am-texinfo)) +(cl-defmethod ede-documentation ((this project-am-texinfo)) "Return a list of files that provides documentation. Documentation is not for object THIS, but is provided by THIS for other files in the project." @@ -997,12 +997,12 @@ Calculates the info with `project-am-extract-package-info'." (project-am-extract-package-info dir))) ;; for simple per project include path extension -(defmethod ede-system-include-path ((this project-am-makefile)) +(cl-defmethod ede-system-include-path ((this project-am-makefile)) "Return `project-am-localvars-include-path', usually local variable per file or in .dir-locals.el or similar." (bound-and-true-p project-am-localvars-include-path)) -(defmethod ede-system-include-path ((this project-am-target)) +(cl-defmethod ede-system-include-path ((this project-am-target)) "Return `project-am-localvars-include-path', usually local variable per file or in .dir-locals.el or similar." (bound-and-true-p project-am-localvars-include-path)) diff --git a/lisp/cedet/ede/shell.el b/lisp/cedet/ede/shell.el index e15ca19ac5..bdb5d30228 100644 --- a/lisp/cedet/ede/shell.el +++ b/lisp/cedet/ede/shell.el @@ -33,7 +33,7 @@ (declare-function comint-send-input "comint") -(defmethod ede-shell-run-something ((target ede-target) command) +(cl-defmethod ede-shell-run-something ((target ede-target) command) "Create a shell to run stuff for TARGET. COMMAND is a text string representing the thing to be run." (let* ((buff (ede-shell-buffer target)) @@ -72,7 +72,7 @@ COMMAND is a text string representing the thing to be run." (comint-send-input) ) -(defmethod ede-shell-buffer ((target ede-target)) +(cl-defmethod ede-shell-buffer ((target ede-target)) "Get the buffer for running shell commands for TARGET." (let ((name (ede-name target))) (get-buffer-create (format "*EDE Shell %s*" name)))) diff --git a/lisp/cedet/ede/simple.el b/lisp/cedet/ede/simple.el index f9582877ef..3c6cb0c2c2 100644 --- a/lisp/cedet/ede/simple.el +++ b/lisp/cedet/ede/simple.el @@ -102,7 +102,7 @@ All directories need at least one target.") "EDE Simple project class. Each directory needs a project file to control it.") -(defmethod ede-commit-project ((proj ede-simple-project)) +(cl-defmethod ede-commit-project ((proj ede-simple-project)) "Commit any change to PROJ to its file." (when (not (file-exists-p ede-simple-save-directory)) (if (y-or-n-p (concat ede-simple-save-directory @@ -111,7 +111,7 @@ Each directory needs a project file to control it.") (error "No save directory for new project"))) (eieio-persistent-save proj)) -(defmethod ede-find-subproject-for-directory ((proj ede-simple-project) +(cl-defmethod ede-find-subproject-for-directory ((proj ede-simple-project) dir) "Return PROJ, for handling all subdirs below DIR." proj) diff --git a/lisp/cedet/ede/source.el b/lisp/cedet/ede/source.el index 978315a423..d7d2767962 100644 --- a/lisp/cedet/ede/source.el +++ b/lisp/cedet/ede/source.el @@ -72,7 +72,7 @@ that they are willing to use.") ;;; Methods ;; -(defmethod initialize-instance :AFTER ((this ede-sourcecode) &rest fields) +(cl-defmethod initialize-instance :after ((this ede-sourcecode) &rest fields) "Make sure that all ede compiler objects are cached in `ede-compiler-list'." (let ((lst ede-sourcecode-list)) @@ -85,45 +85,45 @@ that they are willing to use.") ;; Add to the beginning of the list. (setq ede-sourcecode-list (cons this ede-sourcecode-list))))) -(defmethod ede-want-file-p ((this ede-sourcecode) filename) +(cl-defmethod ede-want-file-p ((this ede-sourcecode) filename) "Return non-nil if sourcecode definition THIS will take FILENAME." (or (ede-want-file-source-p this filename) (ede-want-file-auxiliary-p this filename))) -(defmethod ede-want-file-source-p ((this ede-sourcecode) filename) +(cl-defmethod ede-want-file-source-p ((this ede-sourcecode) filename) "Return non-nil if THIS will take FILENAME as an auxiliary ." (let ((case-fold-search nil)) (string-match (oref this sourcepattern) filename))) -(defmethod ede-want-file-auxiliary-p ((this ede-sourcecode) filename) +(cl-defmethod ede-want-file-auxiliary-p ((this ede-sourcecode) filename) "Return non-nil if THIS will take FILENAME as an auxiliary ." (let ((case-fold-search nil)) (and (slot-boundp this 'auxsourcepattern) (oref this auxsourcepattern) (string-match (oref this auxsourcepattern) filename)))) -(defmethod ede-want-any-source-files-p ((this ede-sourcecode) filenames) +(cl-defmethod ede-want-any-source-files-p ((this ede-sourcecode) filenames) "Return non-nil if THIS will accept any source files in FILENAMES." (let (found) (while (and (not found) filenames) (setq found (ede-want-file-source-p this (pop filenames)))) found)) -(defmethod ede-want-any-auxiliary-files-p ((this ede-sourcecode) filenames) +(cl-defmethod ede-want-any-auxiliary-files-p ((this ede-sourcecode) filenames) "Return non-nil if THIS will accept any aux files in FILENAMES." (let (found) (while (and (not found) filenames) (setq found (ede-want-file-auxiliary-p this (pop filenames)))) found)) -(defmethod ede-want-any-files-p ((this ede-sourcecode) filenames) +(cl-defmethod ede-want-any-files-p ((this ede-sourcecode) filenames) "Return non-nil if THIS will accept any files in FILENAMES." (let (found) (while (and (not found) filenames) (setq found (ede-want-file-p this (pop filenames)))) found)) -(defmethod ede-buffer-header-file ((this ede-sourcecode) filename) +(cl-defmethod ede-buffer-header-file ((this ede-sourcecode) filename) "Return a list of file names of header files for THIS with FILENAME. Used to guess header files, but uses the auxsource regular expression." (let ((dn (file-name-directory filename)) diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el index e08562a373..46c097ab72 100644 --- a/lisp/cedet/ede/speedbar.el +++ b/lisp/cedet/ede/speedbar.el @@ -181,13 +181,13 @@ Argument DIR is the directory from which to derive the list of objects." (setq depth (1- depth))) (speedbar-line-token)))) -(defmethod eieio-speedbar-derive-line-path ((obj ede-project) &optional depth) +(cl-defmethod eieio-speedbar-derive-line-path ((obj ede-project) &optional depth) "Return the path to OBJ. Optional DEPTH is the depth we start at." (file-name-directory (oref obj file)) ) -(defmethod eieio-speedbar-derive-line-path ((obj ede-target) &optional depth) +(cl-defmethod eieio-speedbar-derive-line-path ((obj ede-target) &optional depth) "Return the path to OBJ. Optional DEPTH is the depth we start at." (let ((proj (ede-target-parent obj))) @@ -201,42 +201,42 @@ Optional DEPTH is the depth we start at." (concat (eieio-speedbar-derive-line-path proj) (ede-find-nearest-file-line))))))) -(defmethod eieio-speedbar-description ((obj ede-project)) +(cl-defmethod eieio-speedbar-description ((obj ede-project)) "Provide a speedbar description for OBJ." (ede-description obj)) -(defmethod eieio-speedbar-description ((obj ede-target)) +(cl-defmethod eieio-speedbar-description ((obj ede-target)) "Provide a speedbar description for OBJ." (ede-description obj)) -(defmethod eieio-speedbar-child-description ((obj ede-target)) +(cl-defmethod eieio-speedbar-child-description ((obj ede-target)) "Provide a speedbar description for a plain-child of OBJ. A plain child is a child element which is not an EIEIO object." (or (speedbar-item-info-file-helper) (speedbar-item-info-tag-helper))) -(defmethod eieio-speedbar-object-buttonname ((object ede-project)) +(cl-defmethod eieio-speedbar-object-buttonname ((object ede-project)) "Return a string to use as a speedbar button for OBJECT." (if (ede-parent-project object) (ede-name object) (concat (ede-name object) " " (oref object version)))) -(defmethod eieio-speedbar-object-buttonname ((object ede-target)) +(cl-defmethod eieio-speedbar-object-buttonname ((object ede-target)) "Return a string to use as a speedbar button for OBJECT." (ede-name object)) -(defmethod eieio-speedbar-object-children ((this ede-project)) +(cl-defmethod eieio-speedbar-object-children ((this ede-project)) "Return the list of speedbar display children for THIS." (condition-case nil (with-slots (subproj targets) this (append subproj targets)) (error nil))) -(defmethod eieio-speedbar-object-children ((this ede-target)) +(cl-defmethod eieio-speedbar-object-children ((this ede-target)) "Return the list of speedbar display children for THIS." (oref this source)) -(defmethod eieio-speedbar-child-make-tag-lines ((this ede-target) depth) +(cl-defmethod eieio-speedbar-child-make-tag-lines ((this ede-target) depth) "Create a speedbar tag line for a child of THIS. It has depth DEPTH." (with-slots (source) this diff --git a/lisp/cedet/ede/util.el b/lisp/cedet/ede/util.el index bfde858c95..dbbf46fd01 100644 --- a/lisp/cedet/ede/util.el +++ b/lisp/cedet/ede/util.el @@ -46,19 +46,19 @@ Argument NEWVERSION is the version number to use in the current project." (project-update-version ede-object) (ede-update-version-in-source ede-object newversion)))) -(defmethod project-update-version ((ot ede-project)) +(cl-defmethod project-update-version ((ot ede-project)) "The :version of the project OT has been updated. Handle saving, or other detail." (error "project-update-version not supported by %s" (eieio-object-name ot))) -(defmethod ede-update-version-in-source ((this ede-project) version) +(cl-defmethod ede-update-version-in-source ((this ede-project) version) "Change occurrences of a version string in sources. In project THIS, cycle over all targets to give them a chance to set their sources to VERSION." (ede-map-targets this (lambda (targ) (ede-update-version-in-source targ version)))) -(defmethod ede-update-version-in-source ((this ede-target) version) +(cl-defmethod ede-update-version-in-source ((this ede-target) version) "In sources for THIS, change version numbers to VERSION." (if (and (slot-boundp this 'versionsource) (oref this versionsource)) diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el index 846501e13c..7ff6977102 100644 --- a/lisp/cedet/semantic/analyze.el +++ b/lisp/cedet/semantic/analyze.el @@ -168,7 +168,7 @@ of the parent function.") ;; ;; Simple methods against the context classes. ;; -(defmethod semantic-analyze-type-constraint +(cl-defmethod semantic-analyze-type-constraint ((context semantic-analyze-context) &optional desired-type) "Return a type constraint for completing :prefix in CONTEXT. Optional argument DESIRED-TYPE may be a non-type tag to analyze." @@ -189,17 +189,17 @@ Optional argument DESIRED-TYPE may be a non-type tag to analyze." ) desired-type)) -(defmethod semantic-analyze-type-constraint +(cl-defmethod semantic-analyze-type-constraint ((context semantic-analyze-context-functionarg)) "Return a type constraint for completing :prefix in CONTEXT." - (call-next-method context (car (oref context argument)))) + (cl-call-next-method context (car (oref context argument)))) -(defmethod semantic-analyze-type-constraint +(cl-defmethod semantic-analyze-type-constraint ((context semantic-analyze-context-assignment)) "Return a type constraint for completing :prefix in CONTEXT." - (call-next-method context (car (reverse (oref context assignee))))) + (cl-call-next-method context (car (reverse (oref context assignee))))) -(defmethod semantic-analyze-interesting-tag +(cl-defmethod semantic-analyze-interesting-tag ((context semantic-analyze-context)) "Return a tag from CONTEXT that would be most interesting to a user." (let ((prefix (reverse (oref context :prefix)))) @@ -209,15 +209,15 @@ Optional argument DESIRED-TYPE may be a non-type tag to analyze." ;; Return the found tag, or nil. (car prefix))) -(defmethod semantic-analyze-interesting-tag +(cl-defmethod semantic-analyze-interesting-tag ((context semantic-analyze-context-functionarg)) "Try the base, and if that fails, return what we are assigning into." - (or (call-next-method) (car-safe (oref context :function)))) + (or (cl-call-next-method) (car-safe (oref context :function)))) -(defmethod semantic-analyze-interesting-tag +(cl-defmethod semantic-analyze-interesting-tag ((context semantic-analyze-context-assignment)) "Try the base, and if that fails, return what we are assigning into." - (or (call-next-method) (car-safe (oref context :assignee)))) + (or (cl-call-next-method) (car-safe (oref context :assignee)))) ;;; ANALYSIS ;; @@ -743,7 +743,7 @@ Optional argument CTXT is the context to show." ;; (declare-function pulse-momentary-highlight-region "pulse") -(defmethod semantic-analyze-pulse ((context semantic-analyze-context)) +(cl-defmethod semantic-analyze-pulse ((context semantic-analyze-context)) "Pulse the region that CONTEXT affects." (require 'pulse) (with-current-buffer (oref context :buffer) @@ -782,7 +782,7 @@ Use BUFF as a source of override methods." (setq prefix (make-string (length prefix) ? )) )) -(defmethod semantic-analyze-show ((context semantic-analyze-context)) +(cl-defmethod semantic-analyze-show ((context semantic-analyze-context)) "Insert CONTEXT into the current buffer in a nice way." (semantic-analyze-princ-sequence (oref context prefix) "Prefix: " ) (semantic-analyze-princ-sequence (oref context prefixclass) "Prefix Classes: ") @@ -796,19 +796,19 @@ Use BUFF as a source of override methods." (semantic-analyze-show (oref context scope))) ) -(defmethod semantic-analyze-show ((context semantic-analyze-context-assignment)) +(cl-defmethod semantic-analyze-show ((context semantic-analyze-context-assignment)) "Insert CONTEXT into the current buffer in a nice way." (semantic-analyze-princ-sequence (oref context assignee) "Assignee: ") - (call-next-method)) + (cl-call-next-method)) -(defmethod semantic-analyze-show ((context semantic-analyze-context-functionarg)) +(cl-defmethod semantic-analyze-show ((context semantic-analyze-context-functionarg)) "Insert CONTEXT into the current buffer in a nice way." (semantic-analyze-princ-sequence (oref context function) "Function: ") (princ "Argument Index: ") (princ (oref context index)) (princ "\n") (semantic-analyze-princ-sequence (oref context argument) "Argument: ") - (call-next-method)) + (cl-call-next-method)) (defun semantic-analyze-pop-to-context (context) "Display CONTEXT in a temporary buffer. diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/analyze/refs.el index 923163cee1..3047dab528 100644 --- a/lisp/cedet/semantic/analyze/refs.el +++ b/lisp/cedet/semantic/analyze/refs.el @@ -100,7 +100,7 @@ Use `semantic-analyze-current-tag' to debug this fcn." ;; ;; These accessor methods will calculate the useful bits from the context, and cache values ;; into the context. -(defmethod semantic-analyze-refs-impl ((refs semantic-analyze-references) &optional in-buffer) +(cl-defmethod semantic-analyze-refs-impl ((refs semantic-analyze-references) &optional in-buffer) "Return the implementations derived in the reference analyzer REFS. Optional argument IN-BUFFER indicates that the returned tag should be in an active buffer." (let ((allhits (oref refs rawsearchdata)) @@ -125,7 +125,7 @@ Optional argument IN-BUFFER indicates that the returned tag should be in an acti allhits) impl)) -(defmethod semantic-analyze-refs-proto ((refs semantic-analyze-references) &optional in-buffer) +(cl-defmethod semantic-analyze-refs-proto ((refs semantic-analyze-references) &optional in-buffer) "Return the prototypes derived in the reference analyzer REFS. Optional argument IN-BUFFER indicates that the returned tag should be in an active buffer." (let ((allhits (oref refs rawsearchdata)) diff --git a/lisp/cedet/semantic/bovine/debug.el b/lisp/cedet/semantic/bovine/debug.el index 465a69a734..8aebcd64eb 100644 --- a/lisp/cedet/semantic/bovine/debug.el +++ b/lisp/cedet/semantic/bovine/debug.el @@ -83,7 +83,7 @@ LEXTOKEN, is a token returned by the lexer which is being matched." frame) frame)) -(defmethod semantic-debug-frame-highlight ((frame semantic-debug-frame)) +(cl-defmethod semantic-debug-frame-highlight ((frame semantic-debug-frame)) "Highlight one parser frame." (let* ((nonterm (oref frame nonterm)) (pb (oref semantic-debug-current-interface parser-buffer)) @@ -102,7 +102,7 @@ LEXTOKEN, is a token returned by the lexer which is being matched." (oref frame lextoken)) )) -(defmethod semantic-debug-frame-info ((frame semantic-debug-frame)) +(cl-defmethod semantic-debug-frame-info ((frame semantic-debug-frame)) "Display info about this one parser frame." (message "%S" (oref frame collection)) ) @@ -125,12 +125,12 @@ Argument CONDITION is the thrown error condition." frame) frame)) -(defmethod semantic-debug-frame-highlight ((frame semantic-bovine-debug-error-frame)) +(cl-defmethod semantic-debug-frame-highlight ((frame semantic-bovine-debug-error-frame)) "Highlight a frame from an action." ;; How do I get the location of the action in the source buffer? ) -(defmethod semantic-debug-frame-info ((frame semantic-bovine-debug-error-frame)) +(cl-defmethod semantic-debug-frame-info ((frame semantic-bovine-debug-error-frame)) "Display info about the error thrown." (message "Error: %S" (oref frame condition))) diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index 3f726ee56f..ad931785af 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -930,7 +930,7 @@ derive from this list.") The only options available for completion are those which can be logically inserted into the current context.") -(defmethod semantic-collector-calculate-completions-raw +(cl-defmethod semantic-collector-calculate-completions-raw ((obj semantic-collector-analyze-completions) prefix completionlist) "calculate the completions for prefix from completionlist." ;; if there are no completions yet, calculate them. @@ -945,11 +945,11 @@ inserted into the current context.") prefix (oref obj first-pass-completions))))) -(defmethod semantic-collector-cleanup ((obj semantic-collector-abstract)) +(cl-defmethod semantic-collector-cleanup ((obj semantic-collector-abstract)) "Clean up any mess this collector may have." nil) -(defmethod semantic-collector-next-action +(cl-defmethod semantic-collector-next-action ((obj semantic-collector-abstract) partial) "What should we do next? OBJ can be used to determine the next action. PARTIAL indicates if we are doing a partial completion." @@ -974,19 +974,19 @@ PARTIAL indicates if we are doing a partial completion." 'complete-whitespace))) 'complete)) -(defmethod semantic-collector-last-prefix= ((obj semantic-collector-abstract) +(cl-defmethod semantic-collector-last-prefix= ((obj semantic-collector-abstract) last-prefix) "Return non-nil if OBJ's prefix matches PREFIX." (and (slot-boundp obj 'last-prefix) (string= (oref obj last-prefix) last-prefix))) -(defmethod semantic-collector-get-cache ((obj semantic-collector-abstract)) +(cl-defmethod semantic-collector-get-cache ((obj semantic-collector-abstract)) "Get the raw cache of tags for completion. Calculate the cache if there isn't one." (or (oref obj cache) (semantic-collector-calculate-cache obj))) -(defmethod semantic-collector-calculate-completions-raw +(cl-defmethod semantic-collector-calculate-completions-raw ((obj semantic-collector-abstract) prefix completionlist) "Calculate the completions for prefix from completionlist. Output must be in semanticdb Find result format." @@ -1005,7 +1005,7 @@ Output must be in semanticdb Find result format." (if result (list (cons table result))))) -(defmethod semantic-collector-calculate-completions +(cl-defmethod semantic-collector-calculate-completions ((obj semantic-collector-abstract) prefix partial) "Calculate completions for prefix as setup for other queries." (let* ((case-fold-search semantic-case-fold) @@ -1082,7 +1082,7 @@ Output must be in semanticdb Find result format." ))) )) -(defmethod semantic-collector-try-completion-whitespace +(cl-defmethod semantic-collector-try-completion-whitespace ((obj semantic-collector-abstract) prefix) "For OBJ, do whitespace completion based on PREFIX. This implies that if there are two completions, one matching @@ -1114,7 +1114,7 @@ has been run first." ))) -(defmethod semantic-collector-current-exact-match ((obj semantic-collector-abstract)) +(cl-defmethod semantic-collector-current-exact-match ((obj semantic-collector-abstract)) "Return the active valid MATCH from the semantic collector. For now, just return the first element from our list of available matches. For semanticdb based results, make sure the file is loaded @@ -1122,12 +1122,12 @@ into a buffer." (when (slot-boundp obj 'current-exact-match) (oref obj current-exact-match))) -(defmethod semantic-collector-current-whitespace-completion ((obj semantic-collector-abstract)) +(cl-defmethod semantic-collector-current-whitespace-completion ((obj semantic-collector-abstract)) "Return the active whitespace completion value." (when (slot-boundp obj 'last-whitespace-completion) (oref obj last-whitespace-completion))) -(defmethod semantic-collector-get-match ((obj semantic-collector-abstract)) +(cl-defmethod semantic-collector-get-match ((obj semantic-collector-abstract)) "Return the active valid MATCH from the semantic collector. For now, just return the first element from our list of available matches. For semanticdb based results, make sure the file is loaded @@ -1135,7 +1135,7 @@ into a buffer." (when (slot-boundp obj 'current-exact-match) (semanticdb-find-result-nth-in-buffer (oref obj current-exact-match) 0))) -(defmethod semantic-collector-all-completions +(cl-defmethod semantic-collector-all-completions ((obj semantic-collector-abstract) prefix) "For OBJ, retrieve all completions matching PREFIX. The returned list consists of all the tags currently @@ -1143,7 +1143,7 @@ matching PREFIX." (when (slot-boundp obj 'last-all-completions) (oref obj last-all-completions))) -(defmethod semantic-collector-try-completion +(cl-defmethod semantic-collector-try-completion ((obj semantic-collector-abstract) prefix) "For OBJ, attempt to match PREFIX. See `try-completion' for details on how this works. @@ -1154,13 +1154,13 @@ with that name." (if (slot-boundp obj 'last-completion) (oref obj last-completion))) -(defmethod semantic-collector-calculate-cache +(cl-defmethod semantic-collector-calculate-cache ((obj semantic-collector-abstract)) "Calculate the completion cache for OBJ." nil ) -(defmethod semantic-collector-flush ((this semantic-collector-abstract)) +(cl-defmethod semantic-collector-flush ((this semantic-collector-abstract)) "Flush THIS collector object, clearing any caches and prefix." (oset this cache nil) (slot-makeunbound this 'last-prefix) @@ -1177,7 +1177,7 @@ with that name." These collectors track themselves on a per-buffer basis." :abstract t) -(defmethod constructor :STATIC ((this semantic-collector-buffer-abstract) +(cl-defmethod constructor ((this (subclass semantic-collector-buffer-abstract)) newname &rest fields) "Reuse previously created objects of this type in buffer." (let ((old nil) @@ -1186,7 +1186,7 @@ These collectors track themselves on a per-buffer basis." (if (eq (eieio-object-class (car bl)) this) (setq old (car bl)))) (unless old - (let ((new (call-next-method))) + (let ((new (cl-call-next-method))) (add-to-list 'semantic-collector-per-buffer-list new) (setq old new))) (slot-makeunbound old 'last-completion) @@ -1217,7 +1217,7 @@ NEWCACHE is the new tag table, but we ignore it." When searching for a tag, uses semantic deep search functions. Basics search only in the current buffer.") -(defmethod semantic-collector-calculate-cache +(cl-defmethod semantic-collector-calculate-cache ((obj semantic-collector-buffer-deep)) "Calculate the completion cache for OBJ. Uses `semantic-flatten-tags-table'" @@ -1247,7 +1247,7 @@ Uses semanticdb for searching all tags in the current project." "Completion engine for tags in a project.") -(defmethod semantic-collector-calculate-completions-raw +(cl-defmethod semantic-collector-calculate-completions-raw ((obj semantic-collector-project) prefix completionlist) "Calculate the completions for prefix from completionlist." (semanticdb-find-tags-for-completion prefix (oref obj path))) @@ -1260,7 +1260,7 @@ Uses semanticdb for searching all tags in the current project." (declare-function semanticdb-brute-deep-find-tags-for-completion "semantic/db-find") -(defmethod semantic-collector-calculate-completions-raw +(cl-defmethod semantic-collector-calculate-completions-raw ((obj semantic-collector-project-brutish) prefix completionlist) "Calculate the completions for prefix from completionlist." (require 'semantic/db-find) @@ -1274,7 +1274,7 @@ Uses semanticdb for searching all tags in the current project." "The scope the local members are being completed from.")) "Completion engine for tags in a project.") -(defmethod semantic-collector-calculate-completions-raw +(cl-defmethod semantic-collector-calculate-completions-raw ((obj semantic-collector-local-members) prefix completionlist) "Calculate the completions for prefix from completionlist." (let* ((scope (or (oref obj scope) @@ -1323,11 +1323,11 @@ Provides the basics for a displayor, including interacting with a collector, and tracking tables of completion to display." :abstract t) -(defmethod semantic-displayor-cleanup ((obj semantic-displayor-abstract)) +(cl-defmethod semantic-displayor-cleanup ((obj semantic-displayor-abstract)) "Clean up any mess this displayor may have." nil) -(defmethod semantic-displayor-next-action ((obj semantic-displayor-abstract)) +(cl-defmethod semantic-displayor-next-action ((obj semantic-displayor-abstract)) "The next action to take on the minibuffer related to display." (if (and (slot-boundp obj 'last-prefix) (or (eq this-command 'semantic-complete-inline-TAB) @@ -1336,33 +1336,33 @@ a collector, and tracking tables of completion to display." 'scroll 'display)) -(defmethod semantic-displayor-set-completions ((obj semantic-displayor-abstract) +(cl-defmethod semantic-displayor-set-completions ((obj semantic-displayor-abstract) table prefix) "Set the list of tags to be completed over to TABLE." (oset obj table table) (oset obj last-prefix prefix)) -(defmethod semantic-displayor-show-request ((obj semantic-displayor-abstract)) +(cl-defmethod semantic-displayor-show-request ((obj semantic-displayor-abstract)) "A request to show the current tags table." (ding)) -(defmethod semantic-displayor-focus-request ((obj semantic-displayor-abstract)) +(cl-defmethod semantic-displayor-focus-request ((obj semantic-displayor-abstract)) "A request to for the displayor to focus on some tag option." (ding)) -(defmethod semantic-displayor-scroll-request ((obj semantic-displayor-abstract)) +(cl-defmethod semantic-displayor-scroll-request ((obj semantic-displayor-abstract)) "A request to for the displayor to scroll the completion list (if needed)." (scroll-other-window)) -(defmethod semantic-displayor-focus-previous ((obj semantic-displayor-abstract)) +(cl-defmethod semantic-displayor-focus-previous ((obj semantic-displayor-abstract)) "Set the current focus to the previous item." nil) -(defmethod semantic-displayor-focus-next ((obj semantic-displayor-abstract)) +(cl-defmethod semantic-displayor-focus-next ((obj semantic-displayor-abstract)) "Set the current focus to the next item." nil) -(defmethod semantic-displayor-current-focus ((obj semantic-displayor-abstract)) +(cl-defmethod semantic-displayor-current-focus ((obj semantic-displayor-abstract)) "Return a single tag currently in focus. This object type doesn't do focus, so will never have a focus object." nil) @@ -1381,7 +1381,7 @@ Traditional display mechanism for a list of possible completions. Completions are showin in a new buffer and listed with the ability to click on the items to aid in completion.") -(defmethod semantic-displayor-show-request ((obj semantic-displayor-traditional)) +(cl-defmethod semantic-displayor-show-request ((obj semantic-displayor-traditional)) "A request to show the current tags table." ;; NOTE TO SELF. Find the character to type next, and emphasize it. @@ -1412,7 +1412,7 @@ Focusing is a way of differentiating among multiple tags which have the same name." :abstract t) -(defmethod semantic-displayor-next-action ((obj semantic-displayor-focus-abstract)) +(cl-defmethod semantic-displayor-next-action ((obj semantic-displayor-focus-abstract)) "The next action to take on the minibuffer related to display." (if (and (slot-boundp obj 'last-prefix) (string= (oref obj last-prefix) (semantic-completion-text)) @@ -1428,13 +1428,13 @@ which have the same name." 'focus) 'display)) -(defmethod semantic-displayor-set-completions ((obj semantic-displayor-focus-abstract) +(cl-defmethod semantic-displayor-set-completions ((obj semantic-displayor-focus-abstract) table prefix) "Set the list of tags to be completed over to TABLE." - (call-next-method) + (cl-call-next-method) (slot-makeunbound obj 'focus)) -(defmethod semantic-displayor-focus-previous ((obj semantic-displayor-focus-abstract)) +(cl-defmethod semantic-displayor-focus-previous ((obj semantic-displayor-focus-abstract)) "Set the current focus to the previous item. Not meaningful return value." (when (and (slot-boundp obj 'table) (oref obj table)) @@ -1446,7 +1446,7 @@ Not meaningful return value." ) ))) -(defmethod semantic-displayor-focus-next ((obj semantic-displayor-focus-abstract)) +(cl-defmethod semantic-displayor-focus-next ((obj semantic-displayor-focus-abstract)) "Set the current focus to the next item. Not meaningful return value." (when (and (slot-boundp obj 'table) (oref obj table)) @@ -1459,13 +1459,13 @@ Not meaningful return value." (oset obj focus 0)) ))) -(defmethod semantic-displayor-focus-tag ((obj semantic-displayor-focus-abstract)) +(cl-defmethod semantic-displayor-focus-tag ((obj semantic-displayor-focus-abstract)) "Return the next tag OBJ should focus on." (when (and (slot-boundp obj 'table) (oref obj table)) (with-slots (table) obj (semanticdb-find-result-nth table (oref obj focus))))) -(defmethod semantic-displayor-current-focus ((obj semantic-displayor-focus-abstract)) +(cl-defmethod semantic-displayor-current-focus ((obj semantic-displayor-focus-abstract)) "Return the tag currently in focus, or call parent method." (if (and (slot-boundp obj 'focus) (slot-boundp obj 'table) @@ -1481,7 +1481,7 @@ Not meaningful return value." ;; database. (car (semanticdb-find-result-nth (oref obj table) (oref obj focus)))) ;; Do whatever - (call-next-method))) + (cl-call-next-method))) ;;; Simple displayor which performs traditional display completion, ;; and also focuses with highlighting. @@ -1494,7 +1494,7 @@ Same as `semantic-displayor-traditional', but with selection between multiple tags with the same name done by 'focusing' on the source location of the different tags to differentiate them.") -(defmethod semantic-displayor-focus-request +(cl-defmethod semantic-displayor-focus-request ((obj semantic-displayor-traditional-with-focus-highlight)) "Focus in on possible tag completions. Focus is performed by cycling through the tags and highlighting @@ -1630,7 +1630,7 @@ This will not happen if you directly set this variable via `setq'." "Display completions options in a tooltip. Display mechanism using tooltip for a list of possible completions.") -(defmethod initialize-instance :AFTER ((obj semantic-displayor-tooltip) &rest args) +(cl-defmethod initialize-instance :after ((obj semantic-displayor-tooltip) &rest args) "Make sure we have tooltips required." (condition-case nil (require 'tooltip) @@ -1639,12 +1639,12 @@ Display mechanism using tooltip for a list of possible completions.") (defvar tooltip-mode) -(defmethod semantic-displayor-show-request ((obj semantic-displayor-tooltip)) +(cl-defmethod semantic-displayor-show-request ((obj semantic-displayor-tooltip)) "A request to show the current tags table." (if (or (not (featurep 'tooltip)) (not tooltip-mode)) ;; If we cannot use tooltips, then go to the normal mode with ;; a traditional completion buffer. - (call-next-method) + (cl-call-next-method) (let* ((tablelong (semanticdb-strip-find-results (oref obj table))) (table (semantic-unique-tag-table-by-name tablelong)) (completions (mapcar semantic-completion-displayor-format-tag-function table)) @@ -1752,7 +1752,7 @@ Return a cons cell (X . Y)" tooltip-frame-parameters) (tooltip-show text))) -(defmethod semantic-displayor-scroll-request ((obj semantic-displayor-tooltip)) +(cl-defmethod semantic-displayor-scroll-request ((obj semantic-displayor-tooltip)) "A request to for the displayor to scroll the completion list (if needed)." ;; Do scrolling in the tooltip. (oset obj max-tags-initial 30) @@ -1778,9 +1778,9 @@ Completion displayor using ghost chars after point for focus options. Whichever completion is currently in focus will be displayed as ghost text using overlay options.") -(defmethod semantic-displayor-next-action ((obj semantic-displayor-ghost)) +(cl-defmethod semantic-displayor-next-action ((obj semantic-displayor-ghost)) "The next action to take on the inline completion related to display." - (let ((ans (call-next-method)) + (let ((ans (cl-call-next-method)) (table (when (slot-boundp obj 'table) (oref obj table)))) (if (and (eq ans 'displayend) @@ -1790,22 +1790,22 @@ text using overlay options.") nil ans))) -(defmethod semantic-displayor-cleanup ((obj semantic-displayor-ghost)) +(cl-defmethod semantic-displayor-cleanup ((obj semantic-displayor-ghost)) "Clean up any mess this displayor may have." (when (slot-boundp obj 'ghostoverlay) (semantic-overlay-delete (oref obj ghostoverlay))) ) -(defmethod semantic-displayor-set-completions ((obj semantic-displayor-ghost) +(cl-defmethod semantic-displayor-set-completions ((obj semantic-displayor-ghost) table prefix) "Set the list of tags to be completed over to TABLE." - (call-next-method) + (cl-call-next-method) (semantic-displayor-cleanup obj) ) -(defmethod semantic-displayor-show-request ((obj semantic-displayor-ghost)) +(cl-defmethod semantic-displayor-show-request ((obj semantic-displayor-ghost)) "A request to show the current tags table." ; (if (oref obj first-show) ; (progn @@ -1816,11 +1816,11 @@ text using overlay options.") ;; Only do the traditional thing if the first show request ;; has been seen. Use the first one to start doing the ghost ;; text display. -; (call-next-method) +; (cl-call-next-method) ; ) ) -(defmethod semantic-displayor-focus-request +(cl-defmethod semantic-displayor-focus-request ((obj semantic-displayor-ghost)) "Focus in on possible tag completions. Focus is performed by cycling through the tags and showing a possible diff --git a/lisp/cedet/semantic/db-ebrowse.el b/lisp/cedet/semantic/db-ebrowse.el index 2590dd1208..2199a7d986 100644 --- a/lisp/cedet/semantic/db-ebrowse.el +++ b/lisp/cedet/semantic/db-ebrowse.el @@ -224,7 +224,7 @@ warn instead." () "Search Ebrowse for symbols.") -(defmethod semanticdb-needs-refresh-p ((table semanticdb-table-ebrowse)) +(cl-defmethod semanticdb-needs-refresh-p ((table semanticdb-table-ebrowse)) "EBROWSE database do not need to be refreshed. JAVE: stub for needs-refresh, because, how do we know if BROWSE files @@ -282,7 +282,7 @@ For instance: /home//.semanticdb/!usr!include!BROWSE" ;;; Methods for creating a database or tables ;; -(defmethod semanticdb-create-database :STATIC ((dbeC semanticdb-project-database-ebrowse) +(cl-defmethod semanticdb-create-database ((dbeC (subclass semanticdb-project-database-ebrowse)) directory) "Create a new semantic database for DIRECTORY based on ebrowse. If there is no database for DIRECTORY available, then @@ -325,7 +325,7 @@ If there is no database for DIRECTORY available, then db))) -(defmethod semanticdb-ebrowse-strip-trees ((dbe semanticdb-project-database-ebrowse) +(cl-defmethod semanticdb-ebrowse-strip-trees ((dbe semanticdb-project-database-ebrowse) data) "For the ebrowse database DBE, strip all tables from DATA." ;JAVE what it actually seems to do is split the original tree in "tables" associated with files @@ -479,7 +479,7 @@ Optional argument BASECLASSES specifies a baseclass to the tree being provided." ;;; ;; Overload for converting the simple faux tag into something better. ;; -(defmethod semanticdb-normalize-tags ((obj semanticdb-table-ebrowse) tags) +(cl-defmethod semanticdb-normalize-tags ((obj semanticdb-table-ebrowse) tags) "Convert in Ebrowse database OBJ a list of TAGS into a complete tag. The default tag provided by searches exclude many features of a semantic parsed tag. Look up the file for OBJ, and match TAGS @@ -521,7 +521,7 @@ return that." (setq tags (cdr tags)))) tagret)) -(defmethod semanticdb-normalize-one-tag ((obj semanticdb-table-ebrowse) tag) +(cl-defmethod semanticdb-normalize-one-tag ((obj semanticdb-table-ebrowse) tag) "Convert in Ebrowse database OBJ one TAG into a complete tag. The default tag provided by searches exclude many features of a semantic parsed tag. Look up the file for OBJ, and match TAG @@ -569,48 +569,48 @@ return that." ;; NOTE WHEN IMPLEMENTING: Be sure to add doc-string updates explaining ;; how your new search routines are implemented. ;; -(defmethod semanticdb-find-tags-by-name-method +(cl-defmethod semanticdb-find-tags-by-name-method ((table semanticdb-table-ebrowse) name &optional tags) "Find all tags named NAME in TABLE. Return a list of tags." ;;(message "semanticdb-find-tags-by-name-method name -- %s" name) (if tags ;; If TAGS are passed in, then we don't need to do work here. - (call-next-method) + (cl-call-next-method) ;; If we ever need to do something special, add here. ;; Since ebrowse tags are converted into semantic tags, we can ;; get away with this sort of thing. - (call-next-method) + (cl-call-next-method) ) ) -(defmethod semanticdb-find-tags-by-name-regexp-method +(cl-defmethod semanticdb-find-tags-by-name-regexp-method ((table semanticdb-table-ebrowse) regex &optional tags) "Find all tags with name matching REGEX in TABLE. Optional argument TAGS is a list of tags to search. Return a list of tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) ;; YOUR IMPLEMENTATION HERE - (call-next-method) + (cl-call-next-method) )) -(defmethod semanticdb-find-tags-for-completion-method +(cl-defmethod semanticdb-find-tags-for-completion-method ((table semanticdb-table-ebrowse) prefix &optional tags) "In TABLE, find all occurrences of tags matching PREFIX. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) ;; YOUR IMPLEMENTATION HERE - (call-next-method) + (cl-call-next-method) )) -(defmethod semanticdb-find-tags-by-class-method +(cl-defmethod semanticdb-find-tags-by-class-method ((table semanticdb-table-ebrowse) class &optional tags) "In TABLE, find all occurrences of tags of CLASS. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." - (if tags (call-next-method) - (call-next-method))) + (if tags (cl-call-next-method) + (cl-call-next-method))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -621,38 +621,38 @@ Returns a table of all matching tags." ;; above. ;; -(defmethod semanticdb-deep-find-tags-by-name-method +(cl-defmethod semanticdb-deep-find-tags-by-name-method ((table semanticdb-table-ebrowse) name &optional tags) "Find all tags name NAME in TABLE. Optional argument TAGS is a list of tags to search. Like `semanticdb-find-tags-by-name-method' for ebrowse." ;;(semanticdb-find-tags-by-name-method table name tags) - (call-next-method)) + (cl-call-next-method)) -(defmethod semanticdb-deep-find-tags-by-name-regexp-method +(cl-defmethod semanticdb-deep-find-tags-by-name-regexp-method ((table semanticdb-table-ebrowse) regex &optional tags) "Find all tags with name matching REGEX in TABLE. Optional argument TAGS is a list of tags to search. Like `semanticdb-find-tags-by-name-method' for ebrowse." ;;(semanticdb-find-tags-by-name-regexp-method table regex tags) - (call-next-method)) + (cl-call-next-method)) -(defmethod semanticdb-deep-find-tags-for-completion-method +(cl-defmethod semanticdb-deep-find-tags-for-completion-method ((table semanticdb-table-ebrowse) prefix &optional tags) "In TABLE, find all occurrences of tags matching PREFIX. Optional argument TAGS is a list of tags to search. Like `semanticdb-find-tags-for-completion-method' for ebrowse." ;;(semanticdb-find-tags-for-completion-method table prefix tags) - (call-next-method)) + (cl-call-next-method)) ;;; Advanced Searches ;; -(defmethod semanticdb-find-tags-external-children-of-type-method +(cl-defmethod semanticdb-find-tags-external-children-of-type-method ((table semanticdb-table-ebrowse) type &optional tags) "Find all nonterminals which are child elements of TYPE Optional argument TAGS is a list of tags to search. Return a list of tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) ;; Ebrowse collects all this type of stuff together for us. ;; but we can't use it.... yet. nil diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index be9ffe31b8..b20a756f6b 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el @@ -44,16 +44,16 @@ ) "A table for returning search results from Emacs.") -(defmethod semanticdb-refresh-table ((obj semanticdb-table-emacs-lisp) &optional force) +(cl-defmethod semanticdb-refresh-table ((obj semanticdb-table-emacs-lisp) &optional force) "Do not refresh Emacs Lisp table. It does not need refreshing." nil) -(defmethod semanticdb-needs-refresh-p ((obj semanticdb-table-emacs-lisp)) +(cl-defmethod semanticdb-needs-refresh-p ((obj semanticdb-table-emacs-lisp)) "Return nil, we never need a refresh." nil) -(defmethod object-print ((obj semanticdb-table-emacs-lisp) &rest strings) +(cl-defmethod object-print ((obj semanticdb-table-emacs-lisp) &rest strings) "Pretty printer extension for `semanticdb-table-emacs-lisp'. Adds the number of tags in this file to the object print name." (apply 'call-next-method obj (cons " (proxy)" strings))) @@ -67,7 +67,7 @@ Adds the number of tags in this file to the object print name." ) "Database representing Emacs core.") -(defmethod object-print ((obj semanticdb-project-database-emacs-lisp) &rest strings) +(cl-defmethod object-print ((obj semanticdb-project-database-emacs-lisp) &rest strings) "Pretty printer extension for `semanticdb-table-emacs-lisp'. Adds the number of tags in this file to the object print name." (let ((count 0)) @@ -90,7 +90,7 @@ the omniscience database.") ;;; Filename based methods ;; -(defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-emacs-lisp)) +(cl-defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-emacs-lisp)) "For an Emacs Lisp database, there are no explicit tables. Create one of our special tables that can act as an intermediary." ;; We need to return something since there is always the "master table" @@ -101,34 +101,34 @@ Create one of our special tables that can act as an intermediary." (oset newtable parent-db obj) (oset newtable tags nil) )) - (call-next-method)) + (cl-call-next-method)) -(defmethod semanticdb-file-table ((obj semanticdb-project-database-emacs-lisp) filename) +(cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-emacs-lisp) filename) "From OBJ, return FILENAME's associated table object. For Emacs Lisp, creates a specialized table." (car (semanticdb-get-database-tables obj)) ) -(defmethod semanticdb-get-tags ((table semanticdb-table-emacs-lisp )) +(cl-defmethod semanticdb-get-tags ((table semanticdb-table-emacs-lisp )) "Return the list of tags belonging to TABLE." ;; specialty table ? Probably derive tags at request time. nil) -(defmethod semanticdb-equivalent-mode ((table semanticdb-table-emacs-lisp) &optional buffer) +(cl-defmethod semanticdb-equivalent-mode ((table semanticdb-table-emacs-lisp) &optional buffer) "Return non-nil if TABLE's mode is equivalent to BUFFER. Equivalent modes are specified by the `semantic-equivalent-major-modes' local variable." (with-current-buffer buffer (eq (or mode-local-active-mode major-mode) 'emacs-lisp-mode))) -(defmethod semanticdb-full-filename ((obj semanticdb-table-emacs-lisp)) +(cl-defmethod semanticdb-full-filename ((obj semanticdb-table-emacs-lisp)) "Fetch the full filename that OBJ refers to. For Emacs Lisp system DB, there isn't one." nil) ;;; Conversion ;; -(defmethod semanticdb-normalize-tags ((obj semanticdb-table-emacs-lisp) tags) +(cl-defmethod semanticdb-normalize-tags ((obj semanticdb-table-emacs-lisp) tags) "Convert tags, originating from Emacs OBJ, into standardized form." (let ((newtags nil)) (dolist (T tags) @@ -138,7 +138,7 @@ For Emacs Lisp system DB, there isn't one." ;; There is no promise to have files associated. (nreverse newtags))) -(defmethod semanticdb-normalize-one-tag ((obj semanticdb-table-emacs-lisp) tag) +(cl-defmethod semanticdb-normalize-one-tag ((obj semanticdb-table-emacs-lisp) tag) "Convert one TAG, originating from Emacs OBJ, into standardized form. If Emacs cannot resolve this symbol to a particular file, then return nil." ;; Here's the idea. For each tag, get the name, then use @@ -223,9 +223,11 @@ TOKTYPE is a hint to the type of tag desired." (symbol-name sym) "class" (semantic-elisp-desymbolify - ;; FIXME: This only gives the instance slots and ignores the - ;; class-allocated slots. - (eieio--class-public-a (find-class 'semanticdb-project-database))) ;; slots ;FIXME: eieio-- + (let ((class (find-class sym))) + (if (fboundp 'eieio-slot-descriptor-name) + (mapcar #'eieio-slot-descriptor-name + (eieio-class-slots class)) + (eieio--class-public-a class)))) (semantic-elisp-desymbolify (eieio-class-parents sym)) ;; parents )) ((not toktype) @@ -245,12 +247,12 @@ TOKTYPE is a hint to the type of tag desired." (defvar semanticdb-elisp-mapatom-collector nil "Variable used to collect `mapatoms' output.") -(defmethod semanticdb-find-tags-by-name-method +(cl-defmethod semanticdb-find-tags-by-name-method ((table semanticdb-table-emacs-lisp) name &optional tags) "Find all tags named NAME in TABLE. Uses `intern-soft' to match NAME to Emacs symbols. Return a list of tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) ;; No need to search. Use `intern-soft' which does the same thing for us. (let* ((sym (intern-soft name)) (fun (semanticdb-elisp-sym->tag sym 'function)) @@ -266,52 +268,52 @@ Return a list of tags." taglst )))) -(defmethod semanticdb-find-tags-by-name-regexp-method +(cl-defmethod semanticdb-find-tags-by-name-regexp-method ((table semanticdb-table-emacs-lisp) regex &optional tags) "Find all tags with name matching REGEX in TABLE. Optional argument TAGS is a list of tags to search. Uses `apropos-internal' to find matches. Return a list of tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) (delq nil (mapcar 'semanticdb-elisp-sym->tag (apropos-internal regex))))) -(defmethod semanticdb-find-tags-for-completion-method +(cl-defmethod semanticdb-find-tags-for-completion-method ((table semanticdb-table-emacs-lisp) prefix &optional tags) "In TABLE, find all occurrences of tags matching PREFIX. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) (delq nil (mapcar 'semanticdb-elisp-sym->tag (all-completions prefix obarray))))) -(defmethod semanticdb-find-tags-by-class-method +(cl-defmethod semanticdb-find-tags-by-class-method ((table semanticdb-table-emacs-lisp) class &optional tags) "In TABLE, find all occurrences of tags of CLASS. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) ;; We could implement this, but it could be messy. nil)) ;;; Deep Searches ;; ;; For Emacs Lisp deep searches are like top level searches. -(defmethod semanticdb-deep-find-tags-by-name-method +(cl-defmethod semanticdb-deep-find-tags-by-name-method ((table semanticdb-table-emacs-lisp) name &optional tags) "Find all tags name NAME in TABLE. Optional argument TAGS is a list of tags to search. Like `semanticdb-find-tags-by-name-method' for Emacs Lisp." (semanticdb-find-tags-by-name-method table name tags)) -(defmethod semanticdb-deep-find-tags-by-name-regexp-method +(cl-defmethod semanticdb-deep-find-tags-by-name-regexp-method ((table semanticdb-table-emacs-lisp) regex &optional tags) "Find all tags with name matching REGEX in TABLE. Optional argument TAGS is a list of tags to search. Like `semanticdb-find-tags-by-name-method' for Emacs Lisp." (semanticdb-find-tags-by-name-regexp-method table regex tags)) -(defmethod semanticdb-deep-find-tags-for-completion-method +(cl-defmethod semanticdb-deep-find-tags-for-completion-method ((table semanticdb-table-emacs-lisp) prefix &optional tags) "In TABLE, find all occurrences of tags matching PREFIX. Optional argument TAGS is a list of tags to search. @@ -320,12 +322,12 @@ Like `semanticdb-find-tags-for-completion-method' for Emacs Lisp." ;;; Advanced Searches ;; -(defmethod semanticdb-find-tags-external-children-of-type-method +(cl-defmethod semanticdb-find-tags-external-children-of-type-method ((table semanticdb-table-emacs-lisp) type &optional tags) "Find all nonterminals which are child elements of TYPE Optional argument TAGS is a list of tags to search. Return a list of tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) ;; EIEIO is the only time this matters (when (featurep 'eieio) (let* ((class (intern-soft type)) diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el index 0360e0680e..f38153b18c 100644 --- a/lisp/cedet/semantic/db-file.el +++ b/lisp/cedet/semantic/db-file.el @@ -123,7 +123,7 @@ To save the version number, we must hand-set this version string.") ;;; Code: ;; -(defmethod semanticdb-create-database :STATIC ((dbc semanticdb-project-database-file) +(cl-defmethod semanticdb-create-database ((dbc (subclass semanticdb-project-database-file)) directory) "Create a new semantic database for DIRECTORY and return it. If a database for DIRECTORY has already been loaded, return it. @@ -197,7 +197,7 @@ If DIRECTORY doesn't exist, create a new one." "Return the project belonging to FILENAME if it was already loaded." (eieio-instance-tracker-find filename 'file 'semanticdb-database-list)) -(defmethod semanticdb-file-directory-exists-p ((DB semanticdb-project-database-file) +(cl-defmethod semanticdb-file-directory-exists-p ((DB semanticdb-project-database-file) &optional suppress-questions) "Does the directory the database DB needs to write to exist? If SUPPRESS-QUESTIONS, then do not ask to create the directory." @@ -219,7 +219,7 @@ If SUPPRESS-QUESTIONS, then do not ask to create the directory." (setq semanticdb--inhibit-make-directory t)) nil)))) -(defmethod semanticdb-save-db ((DB semanticdb-project-database-file) +(cl-defmethod semanticdb-save-db ((DB semanticdb-project-database-file) &optional suppress-questions) "Write out the database DB to its file. @@ -259,13 +259,13 @@ If DB is not specified, then use the current database." ) )) -(defmethod semanticdb-live-p ((obj semanticdb-project-database)) +(cl-defmethod semanticdb-live-p ((obj semanticdb-project-database)) "Return non-nil if the file associated with OBJ is live. Live databases are objects associated with existing directories." (and (slot-boundp obj 'reference-directory) (file-exists-p (oref obj reference-directory)))) -(defmethod semanticdb-live-p ((obj semanticdb-table)) +(cl-defmethod semanticdb-live-p ((obj semanticdb-table)) "Return non-nil if the file associated with OBJ is live. Live files are either buffers in Emacs, or files existing on the filesystem." (let ((full-filename (semanticdb-full-filename obj))) @@ -279,7 +279,7 @@ to prevent overload.") (declare-function data-debug-insert-thing "data-debug") -(defmethod object-write ((obj semanticdb-table)) +(cl-defmethod object-write ((obj semanticdb-table)) "When writing a table, we have to make sure we deoverlay it first. Restore the overlays after writing. Argument OBJ is the object to write." @@ -312,7 +312,7 @@ Argument OBJ is the object to write." ;; Do it! (condition-case tableerror - (call-next-method) + (cl-call-next-method) (error (when semanticdb-data-debug-on-write-error (require 'data-debug) @@ -328,7 +328,7 @@ Argument OBJ is the object to write." ;;; State queries ;; -(defmethod semanticdb-write-directory-p ((obj semanticdb-project-database-file)) +(cl-defmethod semanticdb-write-directory-p ((obj semanticdb-project-database-file)) "Return non-nil if OBJ should be written to disk. Uses `semanticdb-persistent-path' to determine the return value." (let ((path semanticdb-persistent-path)) @@ -360,25 +360,25 @@ Uses `semanticdb-persistent-path' to determine the return value." (throw 'found t)) (t (error "Invalid path %S" (car path)))) (setq path (cdr path))) - (call-next-method)) + (cl-call-next-method)) )) ;;; Filename manipulation ;; -(defmethod semanticdb-file-table ((obj semanticdb-project-database-file) filename) +(cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-file) filename) "From OBJ, return FILENAME's associated table object." ;; Cheater option. In this case, we always have files directly ;; under ourselves. The main project type may not. (object-assoc (file-name-nondirectory filename) 'file (oref obj tables))) -(defmethod semanticdb-file-name-non-directory :STATIC - ((dbclass semanticdb-project-database-file)) +(cl-defmethod semanticdb-file-name-non-directory + ((dbclass (subclass semanticdb-project-database-file))) "Return the file name DBCLASS will use. File name excludes any directory part." semanticdb-default-file-name) -(defmethod semanticdb-file-name-directory :STATIC - ((dbclass semanticdb-project-database-file) directory) +(cl-defmethod semanticdb-file-name-directory + ((dbclass (subclass semanticdb-project-database-file)) directory) "Return the relative directory to where DBCLASS will save its cache file. The returned path is related to DIRECTORY." (if semanticdb-default-save-directory @@ -389,8 +389,8 @@ The returned path is related to DIRECTORY." file (file-name-as-directory semanticdb-default-save-directory))) directory)) -(defmethod semanticdb-cache-filename :STATIC - ((dbclass semanticdb-project-database-file) path) +(cl-defmethod semanticdb-cache-filename + ((dbclass (subclass semanticdb-project-database-file)) path) "For DBCLASS, return a file to a cache file belonging to PATH. This could be a cache file in the current directory, or an encoded file name in a secondary directory." @@ -399,7 +399,7 @@ name in a secondary directory." (concat (semanticdb-file-name-directory dbclass path) (semanticdb-file-name-non-directory dbclass))) -(defmethod semanticdb-full-filename ((obj semanticdb-project-database-file)) +(cl-defmethod semanticdb-full-filename ((obj semanticdb-project-database-file)) "Fetch the full filename that OBJ refers to." (oref obj file)) diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el index dd36cc1a01..ff3431a17c 100644 --- a/lisp/cedet/semantic/db-find.el +++ b/lisp/cedet/semantic/db-find.el @@ -196,7 +196,7 @@ expunge duplicates.") "Concrete search index for `semanticdb-find'. This class will cache data derived during various searches.") -(defmethod semantic-reset ((idx semanticdb-find-search-index)) +(cl-defmethod semantic-reset ((idx semanticdb-find-search-index)) "Reset the object IDX." (require 'semantic/scope) ;; Clear the include path. @@ -208,7 +208,7 @@ This class will cache data derived during various searches.") (semantic-scope-reset-cache) ) -(defmethod semanticdb-synchronize ((idx semanticdb-find-search-index) +(cl-defmethod semanticdb-synchronize ((idx semanticdb-find-search-index) new-tags) "Synchronize the search index IDX with some NEW-TAGS." ;; Reset our parts. @@ -220,7 +220,7 @@ This class will cache data derived during various searches.") (semantic-reset (semanticdb-get-table-index tab)))) ) -(defmethod semanticdb-partial-synchronize ((idx semanticdb-find-search-index) +(cl-defmethod semanticdb-partial-synchronize ((idx semanticdb-find-search-index) new-tags) "Synchronize the search index IDX with some changed NEW-TAGS." ;; Only reset if include statements changed. @@ -1304,25 +1304,25 @@ associated with that tag should be loaded into a buffer." ;; Override these with system databases to as new types of back ends. ;;; Top level Searches -(defmethod semanticdb-find-tags-by-name-method ((table semanticdb-abstract-table) name &optional tags) +(cl-defmethod semanticdb-find-tags-by-name-method ((table semanticdb-abstract-table) name &optional tags) "In TABLE, find all occurrences of tags with NAME. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." (semantic-find-tags-by-name name (or tags (semanticdb-get-tags table)))) -(defmethod semanticdb-find-tags-by-name-regexp-method ((table semanticdb-abstract-table) regexp &optional tags) +(cl-defmethod semanticdb-find-tags-by-name-regexp-method ((table semanticdb-abstract-table) regexp &optional tags) "In TABLE, find all occurrences of tags matching REGEXP. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." (semantic-find-tags-by-name-regexp regexp (or tags (semanticdb-get-tags table)))) -(defmethod semanticdb-find-tags-for-completion-method ((table semanticdb-abstract-table) prefix &optional tags) +(cl-defmethod semanticdb-find-tags-for-completion-method ((table semanticdb-abstract-table) prefix &optional tags) "In TABLE, find all occurrences of tags matching PREFIX. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." (semantic-find-tags-for-completion prefix (or tags (semanticdb-get-tags table)))) -(defmethod semanticdb-find-tags-by-class-method ((table semanticdb-abstract-table) class &optional tags) +(cl-defmethod semanticdb-find-tags-by-class-method ((table semanticdb-abstract-table) class &optional tags) "In TABLE, find all occurrences of tags of CLASS. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." @@ -1333,14 +1333,14 @@ Returns a table of all matching tags." (semantic-find-tags-included (or tags (semanticdb-get-tags table))) (semantic-find-tags-by-class class (or tags (semanticdb-get-tags table))))) -(defmethod semanticdb-find-tags-external-children-of-type-method ((table semanticdb-abstract-table) parent &optional tags) +(cl-defmethod semanticdb-find-tags-external-children-of-type-method ((table semanticdb-abstract-table) parent &optional tags) "In TABLE, find all occurrences of tags whose parent is the PARENT type. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." (require 'semantic/find) (semantic-find-tags-external-children-of-type parent (or tags (semanticdb-get-tags table)))) -(defmethod semanticdb-find-tags-subclasses-of-type-method ((table semanticdb-abstract-table) parent &optional tags) +(cl-defmethod semanticdb-find-tags-subclasses-of-type-method ((table semanticdb-abstract-table) parent &optional tags) "In TABLE, find all occurrences of tags whose parent is the PARENT type. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." @@ -1348,7 +1348,7 @@ Returns a table of all matching tags." (semantic-find-tags-subclasses-of-type parent (or tags (semanticdb-get-tags table)))) ;;; Deep Searches -(defmethod semanticdb-deep-find-tags-by-name-method ((table semanticdb-abstract-table) name &optional tags) +(cl-defmethod semanticdb-deep-find-tags-by-name-method ((table semanticdb-abstract-table) name &optional tags) "In TABLE, find all occurrences of tags with NAME. Search in all tags in TABLE, and all components of top level tags in TABLE. @@ -1356,7 +1356,7 @@ Optional argument TAGS is a list of tags to search. Return a table of all matching tags." (semantic-find-tags-by-name name (semantic-flatten-tags-table (or tags (semanticdb-get-tags table))))) -(defmethod semanticdb-deep-find-tags-by-name-regexp-method ((table semanticdb-abstract-table) regexp &optional tags) +(cl-defmethod semanticdb-deep-find-tags-by-name-regexp-method ((table semanticdb-abstract-table) regexp &optional tags) "In TABLE, find all occurrences of tags matching REGEXP. Search in all tags in TABLE, and all components of top level tags in TABLE. @@ -1364,7 +1364,7 @@ Optional argument TAGS is a list of tags to search. Return a table of all matching tags." (semantic-find-tags-by-name-regexp regexp (semantic-flatten-tags-table (or tags (semanticdb-get-tags table))))) -(defmethod semanticdb-deep-find-tags-for-completion-method ((table semanticdb-abstract-table) prefix &optional tags) +(cl-defmethod semanticdb-deep-find-tags-for-completion-method ((table semanticdb-abstract-table) prefix &optional tags) "In TABLE, find all occurrences of tags matching PREFIX. Search in all tags in TABLE, and all components of top level tags in TABLE. diff --git a/lisp/cedet/semantic/db-global.el b/lisp/cedet/semantic/db-global.el index b042b49ec6..b95fa34cb3 100644 --- a/lisp/cedet/semantic/db-global.el +++ b/lisp/cedet/semantic/db-global.el @@ -112,12 +112,12 @@ if optional DONT-ERR-IF-NOT-AVAILABLE is non-nil; else throw an error." ) "A table for returning search results from GNU Global.") -(defmethod object-print ((obj semanticdb-table-global) &rest strings) +(cl-defmethod object-print ((obj semanticdb-table-global) &rest strings) "Pretty printer extension for `semanticdb-table-global'. Adds the number of tags in this file to the object print name." (apply 'call-next-method obj (cons " (proxy)" strings))) -(defmethod semanticdb-equivalent-mode ((table semanticdb-table-global) &optional buffer) +(cl-defmethod semanticdb-equivalent-mode ((table semanticdb-table-global) &optional buffer) "Return t, pretend that this table's mode is equivalent to BUFFER. Equivalent modes are specified by the `semantic-equivalent-major-modes' local variable." @@ -126,7 +126,7 @@ local variable." ;;; Filename based methods ;; -(defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-global)) +(cl-defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-global)) "For a global database, there are no explicit tables. For each file hit, get the traditional semantic table from that file." ;; We need to return something since there is always the "master table" @@ -138,9 +138,9 @@ For each file hit, get the traditional semantic table from that file." (oset newtable tags nil) )) - (call-next-method)) + (cl-call-next-method)) -(defmethod semanticdb-file-table ((obj semanticdb-project-database-global) filename) +(cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-global) filename) "From OBJ, return FILENAME's associated table object." ;; We pass in "don't load". I wonder if we need to avoid that or not? (car (semanticdb-get-database-tables obj)) @@ -150,13 +150,13 @@ For each file hit, get the traditional semantic table from that file." ;; ;; Only NAME based searches work with GLOBAL as that is all it tracks. ;; -(defmethod semanticdb-find-tags-by-name-method +(cl-defmethod semanticdb-find-tags-by-name-method ((table semanticdb-table-global) name &optional tags) "Find all tags named NAME in TABLE. Return a list of tags." (if tags ;; If TAGS are passed in, then we don't need to do work here. - (call-next-method) + (cl-call-next-method) ;; Call out to GNU Global for some results. (let* ((semantic-symref-tool 'global) (result (semantic-symref-find-tags-by-name name 'project)) @@ -167,12 +167,12 @@ Return a list of tags." (semantic-symref-result-get-tags result)) ))) -(defmethod semanticdb-find-tags-by-name-regexp-method +(cl-defmethod semanticdb-find-tags-by-name-regexp-method ((table semanticdb-table-global) regex &optional tags) "Find all tags with name matching REGEX in TABLE. Optional argument TAGS is a list of tags to search. Return a list of tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) (let* ((semantic-symref-tool 'global) (result (semantic-symref-find-tags-by-regexp regex 'project)) ) @@ -180,12 +180,12 @@ Return a list of tags." (semantic-symref-result-get-tags result)) ))) -(defmethod semanticdb-find-tags-for-completion-method +(cl-defmethod semanticdb-find-tags-for-completion-method ((table semanticdb-table-global) prefix &optional tags) "In TABLE, find all occurrences of tags matching PREFIX. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) (let* ((semantic-symref-tool 'global) (result (semantic-symref-find-tags-by-completion prefix 'project)) (faketags nil) @@ -206,21 +206,21 @@ Returns a table of all matching tags." ;; alone, otherwise replace with implementations similar to those ;; above. ;; -(defmethod semanticdb-deep-find-tags-by-name-method +(cl-defmethod semanticdb-deep-find-tags-by-name-method ((table semanticdb-table-global) name &optional tags) "Find all tags name NAME in TABLE. Optional argument TAGS is a list of tags to search. Like `semanticdb-find-tags-by-name-method' for global." (semanticdb-find-tags-by-name-method table name tags)) -(defmethod semanticdb-deep-find-tags-by-name-regexp-method +(cl-defmethod semanticdb-deep-find-tags-by-name-regexp-method ((table semanticdb-table-global) regex &optional tags) "Find all tags with name matching REGEX in TABLE. Optional argument TAGS is a list of tags to search. Like `semanticdb-find-tags-by-name-method' for global." (semanticdb-find-tags-by-name-regexp-method table regex tags)) -(defmethod semanticdb-deep-find-tags-for-completion-method +(cl-defmethod semanticdb-deep-find-tags-for-completion-method ((table semanticdb-table-global) prefix &optional tags) "In TABLE, find all occurrences of tags matching PREFIX. Optional argument TAGS is a list of tags to search. diff --git a/lisp/cedet/semantic/db-javascript.el b/lisp/cedet/semantic/db-javascript.el index 24aa6b702c..4aced34d8e 100644 --- a/lisp/cedet/semantic/db-javascript.el +++ b/lisp/cedet/semantic/db-javascript.el @@ -111,7 +111,7 @@ the omniscience database.") ;;; Filename based methods ;; -(defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-javascript)) +(cl-defmethod semanticdb-get-database-tables ((obj semanticdb-project-database-javascript)) "For a javascript database, there are no explicit tables. Create one of our special tables that can act as an intermediary." ;; NOTE: This method overrides an accessor for the `tables' slot in @@ -126,23 +126,23 @@ Create one of our special tables that can act as an intermediary." (oset newtable parent-db obj) (oset newtable tags nil) )) - (call-next-method) + (cl-call-next-method) ) -(defmethod semanticdb-file-table ((obj semanticdb-project-database-javascript) filename) +(cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-javascript) filename) "From OBJ, return FILENAME's associated table object." ;; NOTE: See not for `semanticdb-get-database-tables'. (car (semanticdb-get-database-tables obj)) ) -(defmethod semanticdb-get-tags ((table semanticdb-table-javascript )) +(cl-defmethod semanticdb-get-tags ((table semanticdb-table-javascript )) "Return the list of tags belonging to TABLE." ;; NOTE: Omniscient databases probably don't want to keep large tables ;; lolly-gagging about. Keep internal Emacs tables empty and ;; refer to alternate databases when you need something. semanticdb-javascript-tags) -(defmethod semanticdb-equivalent-mode ((table semanticdb-table-javascript) &optional buffer) +(cl-defmethod semanticdb-equivalent-mode ((table semanticdb-table-javascript) &optional buffer) "Return non-nil if TABLE's mode is equivalent to BUFFER. Equivalent modes are specified by the `semantic-equivalent-major-modes' local variable." @@ -192,43 +192,43 @@ database (if available.)" (setq tags (cdr tags))) result)) -(defmethod semanticdb-find-tags-by-name-method +(cl-defmethod semanticdb-find-tags-by-name-method ((table semanticdb-table-javascript) name &optional tags) "Find all tags named NAME in TABLE. Return a list of tags." (if tags ;; If TAGS are passed in, then we don't need to do work here. - (call-next-method) + (cl-call-next-method) (assoc-string name semanticdb-javascript-tags) )) -(defmethod semanticdb-find-tags-by-name-regexp-method +(cl-defmethod semanticdb-find-tags-by-name-regexp-method ((table semanticdb-table-javascript) regex &optional tags) "Find all tags with name matching REGEX in TABLE. Optional argument TAGS is a list of tags to search. Return a list of tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) ;; YOUR IMPLEMENTATION HERE (semanticdb-javascript-regexp-search regex) )) -(defmethod semanticdb-find-tags-for-completion-method +(cl-defmethod semanticdb-find-tags-for-completion-method ((table semanticdb-table-javascript) prefix &optional tags) "In TABLE, find all occurrences of tags matching PREFIX. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) ;; YOUR IMPLEMENTATION HERE (semanticdb-javascript-regexp-search (concat "^" prefix ".*")) )) -(defmethod semanticdb-find-tags-by-class-method +(cl-defmethod semanticdb-find-tags-by-class-method ((table semanticdb-table-javascript) class &optional tags) "In TABLE, find all occurrences of tags of CLASS. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) ;; YOUR IMPLEMENTATION HERE ;; ;; Note: This search method could be considered optional in an @@ -244,21 +244,21 @@ Returns a table of all matching tags." ;; alone, otherwise replace with implementations similar to those ;; above. ;; -(defmethod semanticdb-deep-find-tags-by-name-method +(cl-defmethod semanticdb-deep-find-tags-by-name-method ((table semanticdb-table-javascript) name &optional tags) "Find all tags name NAME in TABLE. Optional argument TAGS is a list of tags to search. Like `semanticdb-find-tags-by-name-method' for javascript." (semanticdb-find-tags-by-name-method table name tags)) -(defmethod semanticdb-deep-find-tags-by-name-regexp-method +(cl-defmethod semanticdb-deep-find-tags-by-name-regexp-method ((table semanticdb-table-javascript) regex &optional tags) "Find all tags with name matching REGEX in TABLE. Optional argument TAGS is a list of tags to search. Like `semanticdb-find-tags-by-name-method' for javascript." (semanticdb-find-tags-by-name-regexp-method table regex tags)) -(defmethod semanticdb-deep-find-tags-for-completion-method +(cl-defmethod semanticdb-deep-find-tags-for-completion-method ((table semanticdb-table-javascript) prefix &optional tags) "In TABLE, find all occurrences of tags matching PREFIX. Optional argument TAGS is a list of tags to search. @@ -267,12 +267,12 @@ Like `semanticdb-find-tags-for-completion-method' for javascript." ;;; Advanced Searches ;; -(defmethod semanticdb-find-tags-external-children-of-type-method +(cl-defmethod semanticdb-find-tags-external-children-of-type-method ((table semanticdb-table-javascript) type &optional tags) "Find all nonterminals which are child elements of TYPE. Optional argument TAGS is a list of tags to search. Return a list of tags." - (if tags (call-next-method) + (if tags (cl-call-next-method) ;; YOUR IMPLEMENTATION HERE ;; ;; OPTIONAL: This could be considered an optional function. It is diff --git a/lisp/cedet/semantic/db-ref.el b/lisp/cedet/semantic/db-ref.el index d2fe67bbf8..445dcfe5c2 100644 --- a/lisp/cedet/semantic/db-ref.el +++ b/lisp/cedet/semantic/db-ref.el @@ -37,6 +37,7 @@ ;;; Code: (require 'eieio) +(require 'cl-generic) (require 'semantic) (require 'semantic/db) (require 'semantic/tag) @@ -44,7 +45,7 @@ ;; For the semantic-find-tags-by-name-regexp macro. (eval-when-compile (require 'semantic/find)) -(defmethod semanticdb-add-reference ((dbt semanticdb-abstract-table) +(cl-defmethod semanticdb-add-reference ((dbt semanticdb-abstract-table) include-tag) "Add a reference for the database table DBT based on INCLUDE-TAG. DBT is the database table that owns the INCLUDE-TAG. The reference @@ -66,18 +67,18 @@ will be added to the database that INCLUDE-TAG refers to." (object-add-to-list refdbt 'db-refs dbt) t))) -(defmethod semanticdb-check-references ((dbt semanticdb-abstract-table)) +(cl-defmethod semanticdb-check-references ((dbt semanticdb-abstract-table)) "Check and cleanup references in the database DBT. Abstract tables would be difficult to reference." ;; Not sure how an abstract table can have references. nil) -(defmethod semanticdb-includes-in-table ((dbt semanticdb-abstract-table)) +(cl-defmethod semanticdb-includes-in-table ((dbt semanticdb-abstract-table)) "Return a list of direct includes in table DBT." (semantic-find-tags-by-class 'include (semanticdb-get-tags dbt))) -(defmethod semanticdb-check-references ((dbt semanticdb-table)) +(cl-defmethod semanticdb-check-references ((dbt semanticdb-table)) "Check and cleanup references in the database DBT. Any reference to a file that cannot be found, or whos file no longer refers to DBT will be removed." @@ -108,13 +109,13 @@ refers to DBT will be removed." )) (setq refs (cdr refs))))) -(defmethod semanticdb-refresh-references ((dbt semanticdb-abstract-table)) +(cl-defmethod semanticdb-refresh-references ((dbt semanticdb-abstract-table)) "Refresh references to DBT in other files." ;; alternate tables can't be edited, so can't be changed. nil ) -(defmethod semanticdb-refresh-references ((dbt semanticdb-table)) +(cl-defmethod semanticdb-refresh-references ((dbt semanticdb-table)) "Refresh references to DBT in other files." (let ((refs (semanticdb-includes-in-table dbt)) ) @@ -127,7 +128,7 @@ refers to DBT will be removed." (setq refs (cdr refs))) )) -(defmethod semanticdb-notify-references ((dbt semanticdb-table) +(cl-defmethod semanticdb-notify-references ((dbt semanticdb-table) method) "Notify all references of the table DBT using method. METHOD takes two arguments. diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el index 723b7bd28b..20b5b3f9ea 100644 --- a/lisp/cedet/semantic/db-typecache.el +++ b/lisp/cedet/semantic/db-typecache.el @@ -67,7 +67,7 @@ Said object must support `semantic-reset' methods.") ) "Structure for maintaining a typecache.") -(defmethod semantic-reset ((tc semanticdb-typecache)) +(cl-defmethod semantic-reset ((tc semanticdb-typecache)) "Reset the object IDX." (oset tc filestream nil) (oset tc includestream nil) @@ -78,14 +78,14 @@ Said object must support `semantic-reset' methods.") (oset tc dependants nil) ) -(defmethod semanticdb-typecache-notify-reset ((tc semanticdb-typecache)) +(cl-defmethod semanticdb-typecache-notify-reset ((tc semanticdb-typecache)) "Do a reset from a notify from a table we depend on." (oset tc includestream nil) (mapc 'semantic-reset (oref tc dependants)) (oset tc dependants nil) ) -(defmethod semanticdb-partial-synchronize ((tc semanticdb-typecache) +(cl-defmethod semanticdb-partial-synchronize ((tc semanticdb-typecache) new-tags) "Reset the typecache based on a partial reparse." (when (semantic-find-tags-by-class 'include new-tags) @@ -125,7 +125,7 @@ Debugging function." (t -1) )) -(defmethod semanticdb-get-typecache ((table semanticdb-abstract-table)) +(cl-defmethod semanticdb-get-typecache ((table semanticdb-abstract-table)) "Retrieve the typecache from the semanticdb TABLE. If there is no table, create one, and fill it in." (semanticdb-refresh-table table) @@ -141,7 +141,7 @@ If there is no table, create one, and fill it in." cache)) -(defmethod semanticdb-have-typecache-p ((table semanticdb-abstract-table)) +(cl-defmethod semanticdb-have-typecache-p ((table semanticdb-abstract-table)) "Return non-nil (the typecache) if TABLE has a pre-calculated typecache." (let* ((idx (semanticdb-get-table-index table))) (oref idx type-cache))) @@ -162,22 +162,22 @@ If there is no table, create one, and fill it in." ) "Structure for maintaining a typecache.") -(defmethod semantic-reset ((tc semanticdb-database-typecache)) +(cl-defmethod semantic-reset ((tc semanticdb-database-typecache)) "Reset the object IDX." (oset tc stream nil) ) -(defmethod semanticdb-synchronize ((cache semanticdb-database-typecache) +(cl-defmethod semanticdb-synchronize ((cache semanticdb-database-typecache) new-tags) "Synchronize a CACHE with some NEW-TAGS." ) -(defmethod semanticdb-partial-synchronize ((cache semanticdb-database-typecache) +(cl-defmethod semanticdb-partial-synchronize ((cache semanticdb-database-typecache) new-tags) "Synchronize a CACHE with some changed NEW-TAGS." ) -(defmethod semanticdb-get-typecache ((db semanticdb-project-database)) +(cl-defmethod semanticdb-get-typecache ((db semanticdb-project-database)) "Retrieve the typecache from the semantic database DB. If there is no table, create one, and fill it in." (semanticdb-cache-get db 'semanticdb-database-typecache) @@ -312,11 +312,11 @@ If TAG has fully qualified names, expand it to a series of nested namespaces instead." tag) -(defmethod semanticdb-typecache-file-tags ((table semanticdb-abstract-table)) +(cl-defmethod semanticdb-typecache-file-tags ((table semanticdb-abstract-table)) "No tags available from non-file based tables." nil) -(defmethod semanticdb-typecache-file-tags ((table semanticdb-table)) +(cl-defmethod semanticdb-typecache-file-tags ((table semanticdb-table)) "Update the typecache for TABLE, and return the file-tags. File-tags are those that belong to this file only, and excludes all included files." @@ -338,11 +338,11 @@ all included files." (oref cache filestream) )) -(defmethod semanticdb-typecache-include-tags ((table semanticdb-abstract-table)) +(cl-defmethod semanticdb-typecache-include-tags ((table semanticdb-abstract-table)) "No tags available from non-file based tables." nil) -(defmethod semanticdb-typecache-include-tags ((table semanticdb-table)) +(cl-defmethod semanticdb-typecache-include-tags ((table semanticdb-table)) "Update the typecache for TABLE, and return the merged types from the include tags. Include-tags are the tags brought in via includes, all merged together into a master list." @@ -418,7 +418,7 @@ is of class 'type." (types (semantic-find-tags-by-class 'type nmerge))) (or (car-safe types) (car-safe nmerge)))) -(defmethod semanticdb-typecache-find-method ((table semanticdb-abstract-table) +(cl-defmethod semanticdb-typecache-find-method ((table semanticdb-abstract-table) type find-file-match) "Search the typecache in TABLE for the datatype TYPE. If type is a string, split the string, and search for the parts. @@ -544,7 +544,7 @@ found tag to be loaded." ;; ;; Routines for a typecache that crosses all tables in a given database ;; for a matching major-mode. -(defmethod semanticdb-typecache-for-database ((db semanticdb-project-database) +(cl-defmethod semanticdb-typecache-for-database ((db semanticdb-project-database) &optional mode) "Return the typecache for the project database DB. If there isn't one, create it. diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el index b2c1252c50..1dba9b1570 100644 --- a/lisp/cedet/semantic/db.el +++ b/lisp/cedet/semantic/db.el @@ -115,11 +115,11 @@ This table is the root of tables, and contains the minimum needed for a new table not associated with a buffer." :abstract t) -(defmethod semanticdb-in-buffer-p ((obj semanticdb-abstract-table)) +(cl-defmethod semanticdb-in-buffer-p ((obj semanticdb-abstract-table)) "Return a nil, meaning abstract table OBJ is not in a buffer." nil) -(defmethod semanticdb-get-buffer ((obj semanticdb-abstract-table)) +(cl-defmethod semanticdb-get-buffer ((obj semanticdb-abstract-table)) "Return a buffer associated with OBJ. If the buffer is not in memory, load it with `find-file-noselect'." nil) @@ -127,7 +127,7 @@ If the buffer is not in memory, load it with `find-file-noselect'." ;; This generic method allows for sloppier coding. Many ;; functions treat "table" as something that could be a buffer, ;; file name, or other. This makes use of table more robust. -(defmethod semanticdb-full-filename (buffer-or-string) +(cl-defmethod semanticdb-full-filename (buffer-or-string) "Fetch the full filename that BUFFER-OR-STRING refers to. This uses semanticdb to get a better file name." (cond ((bufferp buffer-or-string) @@ -136,23 +136,23 @@ This uses semanticdb to get a better file name." ((and (stringp buffer-or-string) (file-exists-p buffer-or-string)) (expand-file-name buffer-or-string)))) -(defmethod semanticdb-full-filename ((obj semanticdb-abstract-table)) +(cl-defmethod semanticdb-full-filename ((obj semanticdb-abstract-table)) "Fetch the full filename that OBJ refers to. Abstract tables do not have file names associated with them." nil) -(defmethod semanticdb-dirty-p ((obj semanticdb-abstract-table)) +(cl-defmethod semanticdb-dirty-p ((obj semanticdb-abstract-table)) "Return non-nil if OBJ is 'dirty'." nil) -(defmethod semanticdb-set-dirty ((obj semanticdb-abstract-table)) +(cl-defmethod semanticdb-set-dirty ((obj semanticdb-abstract-table)) "Mark the abstract table OBJ dirty. Abstract tables can not be marked dirty, as there is nothing for them to synchronize against." ;; The abstract table can not be dirty. nil) -(defmethod semanticdb-normalize-tags ((obj semanticdb-abstract-table) tags) +(cl-defmethod semanticdb-normalize-tags ((obj semanticdb-abstract-table) tags) "For the table OBJ, convert a list of TAGS, into standardized form. The default is to return TAGS. Some databases may default to searching and providing simplified tags @@ -160,7 +160,7 @@ based on whichever technique used. This method provides a hook for them to convert TAG into a more complete form." tags) -(defmethod semanticdb-normalize-one-tag ((obj semanticdb-abstract-table) tag) +(cl-defmethod semanticdb-normalize-one-tag ((obj semanticdb-abstract-table) tag) "For the table OBJ, convert a TAG, into standardized form. This method returns a list of the form (DATABASE . NEWTAG). @@ -171,14 +171,14 @@ based on whichever technique used. This method provides a hook for them to convert TAG into a more complete form." (cons obj tag)) -(defmethod object-print ((obj semanticdb-abstract-table) &rest strings) +(cl-defmethod object-print ((obj semanticdb-abstract-table) &rest strings) "Pretty printer extension for `semanticdb-abstract-table'. Adds the number of tags in this file to the object print name." (if (or (not strings) (and (= (length strings) 1) (stringp (car strings)) (string= (car strings) ""))) ;; Else, add a tags quantifier. - (call-next-method obj (format " (%d tags)" (length (semanticdb-get-tags obj)))) + (cl-call-next-method obj (format " (%d tags)" (length (semanticdb-get-tags obj)))) ;; Pass through. (apply 'call-next-method obj strings) )) @@ -195,7 +195,7 @@ The search index will store data about which other tables might be needed, or perhaps create hash or index tables for the current buffer." :abstract t) -(defmethod semanticdb-get-table-index ((obj semanticdb-abstract-table)) +(cl-defmethod semanticdb-get-table-index ((obj semanticdb-abstract-table)) "Return the search index for the table OBJ. If one doesn't exist, create it." (if (slot-boundp obj 'index) @@ -209,13 +209,13 @@ If one doesn't exist, create it." (oset obj index idx) idx))) -(defmethod semanticdb-synchronize ((idx semanticdb-abstract-search-index) +(cl-defmethod semanticdb-synchronize ((idx semanticdb-abstract-search-index) new-tags) "Synchronize the search index IDX with some NEW-TAGS." ;; The abstract class will do... NOTHING! ) -(defmethod semanticdb-partial-synchronize ((idx semanticdb-abstract-search-index) +(cl-defmethod semanticdb-partial-synchronize ((idx semanticdb-abstract-search-index) new-tags) "Synchronize the search index IDX with some changed NEW-TAGS." ;; The abstract class will do... NOTHING! @@ -233,7 +233,7 @@ If one doesn't exist, create it." Examples include search results from external sources such as from Emacs's own symbol table, or from external libraries.") -(defmethod semanticdb-refresh-table ((obj semanticdb-search-results-table) &optional force) +(cl-defmethod semanticdb-refresh-table ((obj semanticdb-search-results-table) &optional force) "If the tag list associated with OBJ is loaded, refresh it. This will call `semantic-fetch-tags' if that file is in memory." nil) @@ -285,7 +285,7 @@ For C/C++, the C preprocessor macros can be saved here.") ) "A single table of tags derived from file.") -(defmethod semanticdb-in-buffer-p ((obj semanticdb-table)) +(cl-defmethod semanticdb-in-buffer-p ((obj semanticdb-table)) "Return a buffer associated with OBJ. If the buffer is in memory, return that buffer." (let ((buff (oref obj buffer))) @@ -293,7 +293,7 @@ If the buffer is in memory, return that buffer." buff (oset obj buffer nil)))) -(defmethod semanticdb-get-buffer ((obj semanticdb-table)) +(cl-defmethod semanticdb-get-buffer ((obj semanticdb-table)) "Return a buffer associated with OBJ. If the buffer is in memory, return that buffer. If the buffer is not in memory, load it with `find-file-noselect'." @@ -302,26 +302,26 @@ If the buffer is not in memory, load it with `find-file-noselect'." (save-match-data (find-file-noselect (semanticdb-full-filename obj) t)))) -(defmethod semanticdb-set-buffer ((obj semanticdb-table)) +(cl-defmethod semanticdb-set-buffer ((obj semanticdb-table)) "Set the current buffer to be a buffer owned by OBJ. If OBJ's file is not loaded, read it in first." (set-buffer (semanticdb-get-buffer obj))) -(defmethod semanticdb-full-filename ((obj semanticdb-table)) +(cl-defmethod semanticdb-full-filename ((obj semanticdb-table)) "Fetch the full filename that OBJ refers to." (expand-file-name (oref obj file) (oref (oref obj parent-db) reference-directory))) -(defmethod semanticdb-dirty-p ((obj semanticdb-table)) +(cl-defmethod semanticdb-dirty-p ((obj semanticdb-table)) "Return non-nil if OBJ is 'dirty'." (oref obj dirty)) -(defmethod semanticdb-set-dirty ((obj semanticdb-table)) +(cl-defmethod semanticdb-set-dirty ((obj semanticdb-table)) "Mark the abstract table OBJ dirty." (oset obj dirty t) ) -(defmethod object-print ((obj semanticdb-table) &rest strings) +(cl-defmethod object-print ((obj semanticdb-table) &rest strings) "Pretty printer extension for `semanticdb-table'. Adds the number of tags in this file to the object print name." (apply 'call-next-method obj @@ -363,12 +363,12 @@ Note: This index will not be saved in a persistent file.") :documentation "List of `semantic-db-table' objects.")) "Database of file tables.") -(defmethod semanticdb-full-filename ((obj semanticdb-project-database)) +(cl-defmethod semanticdb-full-filename ((obj semanticdb-project-database)) "Fetch the full filename that OBJ refers to. Abstract tables do not have file names associated with them." nil) -(defmethod semanticdb-dirty-p ((DB semanticdb-project-database)) +(cl-defmethod semanticdb-dirty-p ((DB semanticdb-project-database)) "Return non-nil if DB is 'dirty'. A database is dirty if the state of the database changed in a way where it may need to resynchronize with some persistent storage." @@ -379,7 +379,7 @@ where it may need to resynchronize with some persistent storage." (setq tabs (cdr tabs))) dirty)) -(defmethod object-print ((obj semanticdb-project-database) &rest strings) +(cl-defmethod object-print ((obj semanticdb-project-database) &rest strings) "Pretty printer extension for `semanticdb-project-database'. Adds the number of tables in this file to the object print name." (apply 'call-next-method obj @@ -390,7 +390,7 @@ Adds the number of tables in this file to the object print name." ) strings))) -(defmethod semanticdb-create-database :STATIC ((dbc semanticdb-project-database) directory) +(cl-defmethod semanticdb-create-database ((dbc (subclass semanticdb-project-database)) directory) "Create a new semantic database of class DBC for DIRECTORY and return it. If a database for DIRECTORY has already been created, return it. If DIRECTORY doesn't exist, create a new one." @@ -404,11 +404,11 @@ If DIRECTORY doesn't exist, create a new one." (oset db reference-directory (file-truename directory))) db)) -(defmethod semanticdb-flush-database-tables ((db semanticdb-project-database)) +(cl-defmethod semanticdb-flush-database-tables ((db semanticdb-project-database)) "Reset the tables in DB to be empty." (oset db tables nil)) -(defmethod semanticdb-create-table ((db semanticdb-project-database) file) +(cl-defmethod semanticdb-create-table ((db semanticdb-project-database) file) "Create a new table in DB for FILE and return it. The class of DB contains the class name for the type of table to create. If the table for FILE exists, return it. @@ -425,7 +425,7 @@ If the table for FILE does not exist, create one." (object-add-to-list db 'tables newtab t)) newtab)) -(defmethod semanticdb-file-table ((obj semanticdb-project-database) filename) +(cl-defmethod semanticdb-file-table ((obj semanticdb-project-database) filename) "From OBJ, return FILENAME's associated table object." (object-assoc (file-relative-name (file-truename filename) (oref obj reference-directory)) @@ -475,7 +475,7 @@ In order to keep your cache up to date, be sure to implement See the file semantic/scope.el for an example." :abstract t) -(defmethod semanticdb-cache-get ((table semanticdb-abstract-table) +(cl-defmethod semanticdb-cache-get ((table semanticdb-abstract-table) desired-class) "Get a cache object on TABLE of class DESIRED-CLASS. This method will create one if none exists with no init arguments @@ -495,18 +495,18 @@ other than :table." (object-add-to-list table 'cache obj) obj))) -(defmethod semanticdb-cache-remove ((table semanticdb-abstract-table) +(cl-defmethod semanticdb-cache-remove ((table semanticdb-abstract-table) cache) "Remove from TABLE the cache object CACHE." (object-remove-from-list table 'cache cache)) -(defmethod semanticdb-synchronize ((cache semanticdb-abstract-cache) +(cl-defmethod semanticdb-synchronize ((cache semanticdb-abstract-cache) new-tags) "Synchronize a CACHE with some NEW-TAGS." ;; The abstract class will do... NOTHING! ) -(defmethod semanticdb-partial-synchronize ((cache semanticdb-abstract-cache) +(cl-defmethod semanticdb-partial-synchronize ((cache semanticdb-abstract-cache) new-tags) "Synchronize a CACHE with some changed NEW-TAGS." ;; The abstract class will do... NOTHING! @@ -526,7 +526,7 @@ In order to keep your cache up to date, be sure to implement See the file semantic/scope.el for an example." :abstract t) -(defmethod semanticdb-cache-get ((db semanticdb-project-database) +(cl-defmethod semanticdb-cache-get ((db semanticdb-project-database) desired-class) "Get a cache object on DB of class DESIRED-CLASS. This method will create one if none exists with no init arguments @@ -546,19 +546,19 @@ other than :table." (object-add-to-list db 'cache obj) obj))) -(defmethod semanticdb-cache-remove ((db semanticdb-project-database) +(cl-defmethod semanticdb-cache-remove ((db semanticdb-project-database) cache) "Remove from TABLE the cache object CACHE." (object-remove-from-list db 'cache cache)) -(defmethod semanticdb-synchronize ((cache semanticdb-abstract-db-cache) +(cl-defmethod semanticdb-synchronize ((cache semanticdb-abstract-db-cache) new-tags) "Synchronize a CACHE with some NEW-TAGS." ;; The abstract class will do... NOTHING! ) -(defmethod semanticdb-partial-synchronize ((cache semanticdb-abstract-db-cache) +(cl-defmethod semanticdb-partial-synchronize ((cache semanticdb-abstract-db-cache) new-tags) "Synchronize a CACHE with some changed NEW-TAGS." ;; The abstract class will do... NOTHING! @@ -566,7 +566,7 @@ other than :table." ;;; REFRESH -(defmethod semanticdb-refresh-table ((obj semanticdb-table) &optional force) +(cl-defmethod semanticdb-refresh-table ((obj semanticdb-table) &optional force) "If the tag list associated with OBJ is loaded, refresh it. Optional argument FORCE will force a refresh even if the file in question is not in a buffer. Avoid using FORCE for most uses, as an old cache @@ -593,7 +593,7 @@ This will call `semantic-fetch-tags' if that file is in memory." ;; Kill off the buffer if it didn't exist when we were called. (kill-buffer buff)))))) -(defmethod semanticdb-needs-refresh-p ((obj semanticdb-table)) +(cl-defmethod semanticdb-needs-refresh-p ((obj semanticdb-table)) "Return non-nil of OBJ's tag list is out of date. The file associated with OBJ does not need to be in a buffer." (let* ((ff (semanticdb-full-filename obj)) @@ -624,7 +624,7 @@ The file associated with OBJ does not need to be in a buffer." ;;; Synchronization ;; -(defmethod semanticdb-synchronize ((table semanticdb-abstract-table) +(cl-defmethod semanticdb-synchronize ((table semanticdb-abstract-table) new-tags) "Synchronize the table TABLE with some NEW-TAGS." (oset table tags new-tags) @@ -655,7 +655,7 @@ The file associated with OBJ does not need to be in a buffer." (semanticdb-refresh-references table) ) -(defmethod semanticdb-partial-synchronize ((table semanticdb-abstract-table) +(cl-defmethod semanticdb-partial-synchronize ((table semanticdb-abstract-table) new-tags) "Synchronize the table TABLE where some NEW-TAGS changed." ;; You might think we need to reset the tags, but since the partial @@ -688,7 +688,7 @@ The file associated with OBJ does not need to be in a buffer." ;;; SAVE/LOAD ;; -(defmethod semanticdb-save-db ((DB semanticdb-project-database) +(cl-defmethod semanticdb-save-db ((DB semanticdb-project-database) &optional suppress-questions) "Cause a database to save itself. The database base class does not save itself persistently. @@ -741,7 +741,7 @@ Project Management software (such as EDE and JDE) should add their own predicates with `add-hook' to this variable, and semanticdb will save tag caches in directories controlled by them.") -(defmethod semanticdb-write-directory-p ((obj semanticdb-project-database)) +(cl-defmethod semanticdb-write-directory-p ((obj semanticdb-project-database)) "Return non-nil if OBJ should be written to disk. Uses `semanticdb-persistent-path' to determine the return value." nil) @@ -772,7 +772,7 @@ This temporarily sets `semanticdb-match-any-mode' while executing BODY." ,@body)) (put 'semanticdb-with-match-any-mode 'lisp-indent-function 0) -(defmethod semanticdb-equivalent-mode-for-search (table &optional buffer) +(cl-defmethod semanticdb-equivalent-mode-for-search (table &optional buffer) "Return non-nil if TABLE's mode is equivalent to BUFFER. See `semanticdb-equivalent-mode' for details. This version is used during searches. Major-modes that opt @@ -783,13 +783,13 @@ all files of any type." (semanticdb-equivalent-mode table buffer)) ) -(defmethod semanticdb-equivalent-mode ((table semanticdb-abstract-table) &optional buffer) +(cl-defmethod semanticdb-equivalent-mode ((table semanticdb-abstract-table) &optional buffer) "Return non-nil if TABLE's mode is equivalent to BUFFER. Equivalent modes are specified by the `semantic-equivalent-major-modes' local variable." nil) -(defmethod semanticdb-equivalent-mode ((table semanticdb-table) &optional buffer) +(cl-defmethod semanticdb-equivalent-mode ((table semanticdb-table) &optional buffer) "Return non-nil if TABLE's mode is equivalent to BUFFER. Equivalent modes are specified by the `semantic-equivalent-major-modes' local variable." diff --git a/lisp/cedet/semantic/debug.el b/lisp/cedet/semantic/debug.el index 9168af59dd..4a3c51f4e0 100644 --- a/lisp/cedet/semantic/debug.el +++ b/lisp/cedet/semantic/debug.el @@ -39,6 +39,7 @@ (eval-when-compile (require 'cl)) (require 'semantic) (require 'eieio) +(require 'cl-generic) (eval-when-compile (require 'semantic/find)) ;;; Code: @@ -117,13 +118,13 @@ These buffers are brought into view when layout occurs.") "Controls action when in `semantic-debug-mode'") ;; Methods -(defmethod semantic-debug-set-frame ((iface semantic-debug-interface) frame) +(cl-defmethod semantic-debug-set-frame ((iface semantic-debug-interface) frame) "Set the current frame on IFACE to FRAME." (if frame (oset iface current-frame frame) (slot-makeunbound iface 'current-frame))) -(defmethod semantic-debug-set-parser-location ((iface semantic-debug-interface) point) +(cl-defmethod semantic-debug-set-parser-location ((iface semantic-debug-interface) point) "Set the parser location in IFACE to POINT." (with-current-buffer (oref iface parser-buffer) (if (not (slot-boundp iface 'parser-location)) @@ -131,7 +132,7 @@ These buffers are brought into view when layout occurs.") (move-marker (oref iface parser-location) point)) ) -(defmethod semantic-debug-set-source-location ((iface semantic-debug-interface) point) +(cl-defmethod semantic-debug-set-source-location ((iface semantic-debug-interface) point) "Set the source location in IFACE to POINT." (with-current-buffer (oref iface source-buffer) (if (not (slot-boundp iface 'source-location)) @@ -139,7 +140,7 @@ These buffers are brought into view when layout occurs.") (move-marker (oref iface source-location) point)) ) -(defmethod semantic-debug-interface-layout ((iface semantic-debug-interface)) +(cl-defmethod semantic-debug-interface-layout ((iface semantic-debug-interface)) "Layout windows in the current frame to facilitate debugging." (delete-other-windows) ;; Deal with the data buffer @@ -167,7 +168,7 @@ These buffers are brought into view when layout occurs.") (goto-char (oref iface source-location))) ) -(defmethod semantic-debug-highlight-lexical-token ((iface semantic-debug-interface) token) +(cl-defmethod semantic-debug-highlight-lexical-token ((iface semantic-debug-interface) token) "For IFACE, highlight TOKEN in the source buffer . TOKEN is a lexical token." (set-buffer (oref iface :source-buffer)) @@ -178,7 +179,7 @@ TOKEN is a lexical token." (semantic-debug-set-source-location iface (semantic-lex-token-start token)) ) -(defmethod semantic-debug-highlight-rule ((iface semantic-debug-interface) nonterm &optional rule match) +(cl-defmethod semantic-debug-highlight-rule ((iface semantic-debug-interface) nonterm &optional rule match) "For IFACE, highlight NONTERM in the parser buffer. NONTERM is the name of the rule currently being processed that shows up as a nonterminal (or tag) in the source buffer. @@ -226,7 +227,7 @@ If RULE and MATCH indices are specified, highlight those also." )))) -(defmethod semantic-debug-unhighlight ((iface semantic-debug-interface)) +(cl-defmethod semantic-debug-unhighlight ((iface semantic-debug-interface)) "Remove all debugging overlays." (mapc 'semantic-overlay-delete (oref iface overlays)) (oset iface overlays nil)) @@ -271,12 +272,12 @@ on different types of return values." ) "One frame representation.") -(defmethod semantic-debug-frame-highlight ((frame semantic-debug-frame)) +(cl-defmethod semantic-debug-frame-highlight ((frame semantic-debug-frame)) "Highlight one parser frame." ) -(defmethod semantic-debug-frame-info ((frame semantic-debug-frame)) +(cl-defmethod semantic-debug-frame-info ((frame semantic-debug-frame)) "Display info about this one parser frame." ) @@ -521,49 +522,49 @@ by overriding one of the command methods. Be sure to use down to your parser later." :abstract t) -(defmethod semantic-debug-parser-next ((parser semantic-debug-parser)) +(cl-defmethod semantic-debug-parser-next ((parser semantic-debug-parser)) "Execute next for this PARSER." (setq semantic-debug-user-command 'next) ) -(defmethod semantic-debug-parser-step ((parser semantic-debug-parser)) +(cl-defmethod semantic-debug-parser-step ((parser semantic-debug-parser)) "Execute a step for this PARSER." (setq semantic-debug-user-command 'step) ) -(defmethod semantic-debug-parser-go ((parser semantic-debug-parser)) +(cl-defmethod semantic-debug-parser-go ((parser semantic-debug-parser)) "Continue execution in this PARSER until the next breakpoint." (setq semantic-debug-user-command 'go) ) -(defmethod semantic-debug-parser-fail ((parser semantic-debug-parser)) +(cl-defmethod semantic-debug-parser-fail ((parser semantic-debug-parser)) "Continue execution in this PARSER until the next breakpoint." (setq semantic-debug-user-command 'fail) ) -(defmethod semantic-debug-parser-quit ((parser semantic-debug-parser)) +(cl-defmethod semantic-debug-parser-quit ((parser semantic-debug-parser)) "Continue execution in this PARSER until the next breakpoint." (setq semantic-debug-user-command 'quit) ) -(defmethod semantic-debug-parser-abort ((parser semantic-debug-parser)) +(cl-defmethod semantic-debug-parser-abort ((parser semantic-debug-parser)) "Continue execution in this PARSER until the next breakpoint." (setq semantic-debug-user-command 'abort) ) -(defmethod semantic-debug-parser-print-state ((parser semantic-debug-parser)) +(cl-defmethod semantic-debug-parser-print-state ((parser semantic-debug-parser)) "Print state for this PARSER at the current breakpoint." (with-slots (current-frame) semantic-debug-current-interface (when current-frame (semantic-debug-frame-info current-frame) ))) -(defmethod semantic-debug-parser-break ((parser semantic-debug-parser)) +(cl-defmethod semantic-debug-parser-break ((parser semantic-debug-parser)) "Set a breakpoint for this PARSER." ) ;; Stack stuff -(defmethod semantic-debug-parser-frames ((parser semantic-debug-parser)) +(cl-defmethod semantic-debug-parser-frames ((parser semantic-debug-parser)) "Return a list of frames for the current parser. A frame is of the form: ( .. .what ? .. ) diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el index 718669b567..7bfca77e8c 100644 --- a/lisp/cedet/semantic/decorate/include.el +++ b/lisp/cedet/semantic/decorate/include.el @@ -831,7 +831,7 @@ When an include's referring file is parsed, we need to undecorate any decorated referring includes.") -(defmethod semantic-reset ((obj semantic-decoration-unparsed-include-cache)) +(cl-defmethod semantic-reset ((obj semantic-decoration-unparsed-include-cache)) "Reset OBJ back to it's empty settings." (let ((table (oref obj table))) ;; This is a hack. Add in something better? @@ -841,13 +841,13 @@ any decorated referring includes.") )) )) -(defmethod semanticdb-partial-synchronize ((cache semantic-decoration-unparsed-include-cache) +(cl-defmethod semanticdb-partial-synchronize ((cache semantic-decoration-unparsed-include-cache) new-tags) "Synchronize CACHE with some NEW-TAGS." (if (semantic-find-tags-by-class 'include new-tags) (semantic-reset cache))) -(defmethod semanticdb-synchronize ((cache semantic-decoration-unparsed-include-cache) +(cl-defmethod semanticdb-synchronize ((cache semantic-decoration-unparsed-include-cache) new-tags) "Synchronize a CACHE with some NEW-TAGS." (semantic-reset cache)) diff --git a/lisp/cedet/semantic/doc.el b/lisp/cedet/semantic/doc.el index 874763f0a7..3ceb3510ad 100644 --- a/lisp/cedet/semantic/doc.el +++ b/lisp/cedet/semantic/doc.el @@ -56,13 +56,12 @@ If nosnarf if 'lex, then only return the lex token." doctmp ;; Check just before the definition. (when (semantic-tag-with-position-p tag) - (semantic-documentation-comment-preceeding-tag tag nosnarf)) + (semantic-documentation-comment-preceding-tag tag nosnarf)) ;; Let's look for comments either after the definition, but before code: ;; Not sure yet. Fill in something clever later.... nil)))))) -;; FIXME this is not how you spell "preceding". -(defun semantic-documentation-comment-preceeding-tag (&optional tag nosnarf) +(defun semantic-documentation-comment-preceding-tag (&optional tag nosnarf) "Find a comment preceding TAG. If TAG is nil. use the tag under point. Searches the space between TAG and the preceding tag for a comment, @@ -84,6 +83,10 @@ just the lexical token and not the string." ;; of a function. (semantic-doc-snarf-comment-for-tag nosnarf))) )) +(define-obsolete-function-alias + 'semantic-documentation-comment-preceeding-tag + 'semantic-documentation-comment-preceding-tag + "25.1") (defun semantic-doc-snarf-comment-for-tag (nosnarf) "Snarf up the comment at POINT for `semantic-documentation-for-tag'. diff --git a/lisp/cedet/semantic/ede-grammar.el b/lisp/cedet/semantic/ede-grammar.el index 67f0cfeea6..eb4a98c0a2 100644 --- a/lisp/cedet/semantic/ede-grammar.el +++ b/lisp/cedet/semantic/ede-grammar.el @@ -51,7 +51,7 @@ A grammar target consists of grammar files that build Emacs Lisp programs for parsing different languages.") -(defmethod ede-proj-makefile-dependencies ((this semantic-ede-proj-target-grammar)) +(cl-defmethod ede-proj-makefile-dependencies ((this semantic-ede-proj-target-grammar)) "Return a string representing the dependencies for THIS. Some compilers only use the first element in the dependencies, others have a list of intermediates (object files), and others don't care. @@ -124,17 +124,17 @@ For Emacs Lisp, return addsuffix command on source files." "Compile Emacs Lisp programs.") ;;; Target options. -(defmethod ede-buffer-mine ((this semantic-ede-proj-target-grammar) buffer) +(cl-defmethod ede-buffer-mine ((this semantic-ede-proj-target-grammar) buffer) "Return t if object THIS lays claim to the file in BUFFER. Lays claim to all -by.el, and -wy.el files." ;; We need to be a little more careful than this, but at the moment it ;; is common to have only one target of this class per directory. (if (string-match "-[bw]y\\.elc?$" (buffer-file-name buffer)) t - (call-next-method) ; The usual thing. + (cl-call-next-method) ; The usual thing. )) -(defmethod project-compile-target ((obj semantic-ede-proj-target-grammar)) +(cl-defmethod project-compile-target ((obj semantic-ede-proj-target-grammar)) "Compile all sources in a Lisp target OBJ." (let* ((cb (current-buffer)) (proj (ede-target-parent obj)) @@ -167,13 +167,13 @@ Lays claim to all -by.el, and -wy.el files." ;;; Makefile generation functions ;; -(defmethod ede-proj-makefile-sourcevar ((this semantic-ede-proj-target-grammar)) +(cl-defmethod ede-proj-makefile-sourcevar ((this semantic-ede-proj-target-grammar)) "Return the variable name for THIS's sources." (cond ((ede-proj-automake-p) (error "No Automake support for Semantic Grammars")) (t (concat (ede-pmake-varname this) "_SEMANTIC_GRAMMAR")))) -(defmethod ede-proj-makefile-insert-variables :AFTER ((this semantic-ede-proj-target-grammar)) +(cl-defmethod ede-proj-makefile-insert-variables :after ((this semantic-ede-proj-target-grammar)) "Insert variables needed by target THIS." (ede-proj-makefile-insert-loadpath-items (ede-proj-elisp-packages-to-loadpath @@ -192,7 +192,7 @@ Lays claim to all -by.el, and -wy.el files." " "))) ) -(defmethod ede-proj-makefile-insert-rules :after ((this semantic-ede-proj-target-grammar)) +(cl-defmethod ede-proj-makefile-insert-rules :after ((this semantic-ede-proj-target-grammar)) "Insert rules needed by THIS target. This raises `max-specpdl-size' and `max-lisp-eval-depth', which can be needed for the compilation of the resulting parsers." @@ -200,12 +200,12 @@ needed for the compilation of the resulting parsers." max-lisp-eval-depth 700)'\n" (oref this name)))) -(defmethod ede-proj-makefile-insert-dist-dependencies ((this semantic-ede-proj-target-grammar)) +(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this semantic-ede-proj-target-grammar)) "Insert dist dependencies, or intermediate targets. This makes sure that all grammar lisp files are created before the dist runs, so they are always up to date. Argument THIS is the target that should insert stuff." - (call-next-method) + (cl-call-next-method) (insert " $(" (ede-pmake-varname this) "_SEMANTIC_GRAMMAR_EL)") ) diff --git a/lisp/cedet/semantic/ia-sb.el b/lisp/cedet/semantic/ia-sb.el index 410d63acab..fcc9c002ce 100644 --- a/lisp/cedet/semantic/ia-sb.el +++ b/lisp/cedet/semantic/ia-sb.el @@ -138,7 +138,7 @@ DIRECTORY is the current directory, which is ignored, and ZERO is 0." ))) -(defmethod semantic-ia-sb-show-doc ((context semantic-analyze-context)) +(cl-defmethod semantic-ia-sb-show-doc ((context semantic-analyze-context)) "Show documentation about CONTEXT if CONTEXT points at a complete symbol." (let ((sym (car (reverse (oref context prefix)))) (doc nil)) @@ -163,7 +163,7 @@ DIRECTORY is the current directory, which is ignored, and ZERO is 0." ;; This is from semantic-sb 'semantic-sb-token-jump)))) -(defmethod semantic-ia-sb-more-buttons ((context semantic-analyze-context)) +(cl-defmethod semantic-ia-sb-more-buttons ((context semantic-analyze-context)) "Show a set of speedbar buttons specific to CONTEXT." (let ((prefix (oref context prefix))) (when prefix @@ -173,9 +173,9 @@ DIRECTORY is the current directory, which is ignored, and ZERO is 0." 'semantic-sb-token-jump)) )) -(defmethod semantic-ia-sb-more-buttons ((context semantic-analyze-context-assignment)) +(cl-defmethod semantic-ia-sb-more-buttons ((context semantic-analyze-context-assignment)) "Show a set of speedbar buttons specific to CONTEXT." - (call-next-method) + (cl-call-next-method) (let ((assignee (oref context assignee))) (when assignee (speedbar-insert-separator "Assignee") @@ -183,9 +183,9 @@ DIRECTORY is the current directory, which is ignored, and ZERO is 0." 'speedbar-tag-face 'semantic-sb-token-jump)))) -(defmethod semantic-ia-sb-more-buttons ((context semantic-analyze-context-functionarg)) +(cl-defmethod semantic-ia-sb-more-buttons ((context semantic-analyze-context-functionarg)) "Show a set of speedbar buttons specific to CONTEXT." - (call-next-method) + (cl-call-next-method) (let ((func (oref context function))) (when func (speedbar-insert-separator "Function") diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el index ddebcd627b..b75408f6a9 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el @@ -86,7 +86,7 @@ Nice values are 'edit, 'read, 'jump, and 'mark. ) "A single bookmark.") -(defmethod initialize-instance :AFTER ((sbm semantic-bookmark) &rest fields) +(cl-defmethod initialize-instance :after ((sbm semantic-bookmark) &rest fields) "Initialize the bookmark SBM with details about :tag." (condition-case nil (save-excursion @@ -96,7 +96,7 @@ Nice values are 'edit, 'read, 'jump, and 'mark. (error (message "Error bookmarking tag."))) ) -(defmethod semantic-mrub-visit ((sbm semantic-bookmark)) +(cl-defmethod semantic-mrub-visit ((sbm semantic-bookmark)) "Visit the semantic tag bookmark SBM. Uses `semantic-go-to-tag' and highlighting." (require 'semantic/decorate) @@ -117,7 +117,7 @@ Uses `semantic-go-to-tag' and highlighting." (semantic-momentary-highlight-tag tag) )) -(defmethod semantic-mrub-update ((sbm semantic-bookmark) point reason) +(cl-defmethod semantic-mrub-update ((sbm semantic-bookmark) point reason) "Update the existing bookmark SBM. POINT is some important location. REASON is a symbol. See slot `reason' on `semantic-bookmark'." @@ -132,7 +132,7 @@ REASON is a symbol. See slot `reason' on `semantic-bookmark'." (error nil)) ) -(defmethod semantic-mrub-preflush ((sbm semantic-bookmark)) +(cl-defmethod semantic-mrub-preflush ((sbm semantic-bookmark)) "Method called on a tag before the current buffer list of tags is flushed. If there is a buffer match, unlink the tag." (let ((tag (oref sbm tag)) @@ -183,7 +183,7 @@ Argument POINT is where to find the tag near." (when nearby (setq tag nearby)))) tag)) -(defmethod semantic-mrub-push ((sbr semantic-bookmark-ring) point +(cl-defmethod semantic-mrub-push ((sbr semantic-bookmark-ring) point &optional reason) "Add a bookmark to the ring SBR from POINT. REASON is why it is being pushed. See doc for `semantic-bookmark' diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el index c56cbc3c12..acc6545233 100644 --- a/lisp/cedet/semantic/scope.el +++ b/lisp/cedet/semantic/scope.el @@ -101,7 +101,7 @@ Saves scoping information between runs of the analyzer.") ;; ;; Methods for basic management of the structure in semanticdb. ;; -(defmethod semantic-reset ((obj semantic-scope-cache)) +(cl-defmethod semantic-reset ((obj semantic-scope-cache)) "Reset OBJ back to it's empty settings." (oset obj tag nil) (oset obj scopetypes nil) @@ -114,13 +114,13 @@ Saves scoping information between runs of the analyzer.") (oset obj typescope nil) ) -(defmethod semanticdb-synchronize ((cache semantic-scope-cache) +(cl-defmethod semanticdb-synchronize ((cache semantic-scope-cache) new-tags) "Synchronize a CACHE with some NEW-TAGS." (semantic-reset cache)) -(defmethod semanticdb-partial-synchronize ((cache semantic-scope-cache) +(cl-defmethod semanticdb-partial-synchronize ((cache semantic-scope-cache) new-tags) "Synchronize a CACHE with some changed NEW-TAGS." ;; If there are any includes or datatypes changed, then clear. @@ -137,7 +137,7 @@ Saves scoping information between runs of the analyzer.") 'semantic-scope-cache))) (semantic-reset co)))) -(defmethod semantic-scope-set-typecache ((cache semantic-scope-cache) +(cl-defmethod semantic-scope-set-typecache ((cache semantic-scope-cache) types-in-scope) "Set the :typescope property on CACHE to some types. TYPES-IN-SCOPE is a list of type tags whos members are @@ -829,7 +829,7 @@ hits in order, with the first tag being in the closest scope." ;;; DUMP ;; -(defmethod semantic-analyze-show ((context semantic-scope-cache)) +(cl-defmethod semantic-analyze-show ((context semantic-scope-cache)) "Insert CONTEXT into the current buffer in a nice way." (require 'semantic/analyze) (semantic-analyze-princ-sequence (oref context scopetypes) "-> ScopeTypes: " ) diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el index 170495e5d6..10293d9496 100644 --- a/lisp/cedet/semantic/symref.el +++ b/lisp/cedet/semantic/symref.el @@ -314,7 +314,7 @@ Use the `semantic-symref-hit-tags' method to get this list.") ) "The results from a symbol reference search.") -(defmethod semantic-symref-result-get-files ((result semantic-symref-result)) +(cl-defmethod semantic-symref-result-get-files ((result semantic-symref-result)) "Get the list of files from the symref result RESULT." (if (slot-boundp result :hit-files) (oref result hit-files) @@ -352,7 +352,7 @@ until the next command is executed." (remove-hook 'post-command-hook 'semantic-symref-cleanup-recent-buffers-fcn) ) -(defmethod semantic-symref-result-get-tags ((result semantic-symref-result) +(cl-defmethod semantic-symref-result-get-tags ((result semantic-symref-result) &optional open-buffers) "Get the list of tags from the symref result RESULT. Optional OPEN-BUFFERS indicates that the buffers that the hits are @@ -531,7 +531,7 @@ NAME is the name of the tool used in the configuration variable `semantic-symref-tool'" :abstract t) -(defmethod semantic-symref-get-result ((tool semantic-symref-tool-baseclass)) +(cl-defmethod semantic-symref-get-result ((tool semantic-symref-tool-baseclass)) "Calculate the results of a search based on TOOL. The symref TOOL should already contain the search criteria." (let ((answer (semantic-symref-perform-search tool)) @@ -549,11 +549,11 @@ The symref TOOL should already contain the search criteria." ) )) -(defmethod semantic-symref-perform-search ((tool semantic-symref-tool-baseclass)) +(cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-baseclass)) "Base search for symref tools should throw an error." (error "Symref tool objects must implement `semantic-symref-perform-search'")) -(defmethod semantic-symref-parse-tool-output ((tool semantic-symref-tool-baseclass) +(cl-defmethod semantic-symref-parse-tool-output ((tool semantic-symref-tool-baseclass) outputbuffer) "Parse the entire OUTPUTBUFFER of a symref tool. Calls the method `semantic-symref-parse-tool-output-one-line' over and @@ -567,7 +567,7 @@ over until it returns nil." (nreverse result))) ) -(defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-baseclass)) +(cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-baseclass)) "Base tool output parser is not implemented." (error "Symref tool objects must implement `semantic-symref-parse-tool-output-one-line'")) diff --git a/lisp/cedet/semantic/symref/cscope.el b/lisp/cedet/semantic/symref/cscope.el index 3e8c34b983..91804f4ac9 100644 --- a/lisp/cedet/semantic/symref/cscope.el +++ b/lisp/cedet/semantic/symref/cscope.el @@ -42,7 +42,7 @@ the hit list. See the function `cedet-cscope-search' for more details.") -(defmethod semantic-symref-perform-search ((tool semantic-symref-tool-cscope)) +(cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-cscope)) "Perform a search with GNU Global." (let* ((rootproj (when (and (featurep 'ede) ede-minor-mode) (ede-toplevel))) @@ -60,7 +60,7 @@ See the function `cedet-cscope-search' for more details.") (semantic-symref-parse-tool-output tool b) )) -(defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-cscope)) +(cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-cscope)) "Parse one line of grep output, and return it as a match list. Moves cursor to end of the match." (cond ((eq (oref tool :resulttype) 'file) diff --git a/lisp/cedet/semantic/symref/global.el b/lisp/cedet/semantic/symref/global.el index 1f5aecb576..88713474d6 100644 --- a/lisp/cedet/semantic/symref/global.el +++ b/lisp/cedet/semantic/symref/global.el @@ -38,7 +38,7 @@ the hit list. See the function `cedet-gnu-global-search' for more details.") -(defmethod semantic-symref-perform-search ((tool semantic-symref-tool-global)) +(cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-global)) "Perform a search with GNU Global." (let ((b (cedet-gnu-global-search (oref tool :searchfor) (oref tool :searchtype) @@ -49,7 +49,7 @@ See the function `cedet-gnu-global-search' for more details.") (semantic-symref-parse-tool-output tool b) )) -(defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-global)) +(cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-global)) "Parse one line of grep output, and return it as a match list. Moves cursor to end of the match." (cond ((or (eq (oref tool :resulttype) 'file) diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el index f9821b4298..981dab8a8b 100644 --- a/lisp/cedet/semantic/symref/grep.el +++ b/lisp/cedet/semantic/symref/grep.el @@ -121,7 +121,7 @@ This shell should support pipe redirect syntax." :group 'semantic :type 'string) -(defmethod semantic-symref-perform-search ((tool semantic-symref-tool-grep)) +(cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-grep)) "Perform a search with Grep." ;; Grep doesn't support some types of searches. (let ((st (oref tool :searchtype))) @@ -167,7 +167,7 @@ This shell should support pipe redirect syntax." ;; Return the answer ans)) -(defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-grep)) +(cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-grep)) "Parse one line of grep output, and return it as a match list. Moves cursor to end of the match." (cond ((eq (oref tool :resulttype) 'file) diff --git a/lisp/cedet/semantic/symref/idutils.el b/lisp/cedet/semantic/symref/idutils.el index 5e9a0a42bf..c22a6a3b7f 100644 --- a/lisp/cedet/semantic/symref/idutils.el +++ b/lisp/cedet/semantic/symref/idutils.el @@ -38,7 +38,7 @@ the hit list. See the function `cedet-idutils-search' for more details.") -(defmethod semantic-symref-perform-search ((tool semantic-symref-tool-idutils)) +(cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-idutils)) "Perform a search with IDUtils." (let ((b (cedet-idutils-search (oref tool :searchfor) (oref tool :searchtype) @@ -49,7 +49,7 @@ See the function `cedet-idutils-search' for more details.") (semantic-symref-parse-tool-output tool b) )) -(defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-idutils)) +(cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-idutils)) "Parse one line of grep output, and return it as a match list. Moves cursor to end of the match." (cond ((eq (oref tool :resulttype) 'file) diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el index 782121ef5b..c93a6f72a9 100644 --- a/lisp/cedet/srecode/compile.el +++ b/lisp/cedet/srecode/compile.el @@ -34,6 +34,7 @@ (eval-when-compile (require 'cl)) (require 'semantic) (require 'eieio) +(require 'cl-generic) (require 'eieio-base) (require 'srecode/table) (require 'srecode/dictionary) @@ -115,7 +116,7 @@ additional static argument data.")) Plain text strings are not handled via this baseclass." :abstract t) -(defmethod srecode-parse-input ((ins srecode-template-inserter) +(cl-defmethod srecode-parse-input ((ins srecode-template-inserter) tag input STATE) "For the template inserter INS, parse INPUT. Shorten input only by the amount needed. @@ -123,15 +124,15 @@ Return the remains of INPUT. STATE is the current compilation state." input) -(defmethod srecode-match-end ((ins srecode-template-inserter) name) +(cl-defmethod srecode-match-end ((ins srecode-template-inserter) name) "For the template inserter INS, do I end a section called NAME?" nil) -(defmethod srecode-inserter-apply-state ((ins srecode-template-inserter) STATE) +(cl-defmethod srecode-inserter-apply-state ((ins srecode-template-inserter) STATE) "For the template inserter INS, apply information from STATE." nil) -(defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter) +(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter)) escape-start escape-end) "Insert an example using inserter INS. Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." @@ -158,7 +159,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." ) "Current state of the compile.") -(defmethod srecode-compile-add-prompt ((state srecode-compile-state) +(cl-defmethod srecode-compile-add-prompt ((state srecode-compile-state) prompttag) "Add PROMPTTAG to the current list of prompts." (with-slots (prompts) state @@ -595,7 +596,7 @@ A list of defined variables VARS provides a variable table." ;; Dump out information about the current srecoder compiled templates. ;; -(defmethod srecode-dump ((tmp srecode-template)) +(cl-defmethod srecode-dump ((tmp srecode-template)) "Dump the contents of the SRecode template tmp." (princ "== Template \"") (princ (eieio-object-name-string tmp)) @@ -641,7 +642,7 @@ Argument INDENT specifies the indentation level for the list." (princ "\n")))) ) -(defmethod srecode-dump ((ins srecode-template-inserter) indent) +(cl-defmethod srecode-dump ((ins srecode-template-inserter) indent) "Dump the state of the SRecode template inserter INS." (princ "INS: \"") (princ (eieio-object-name-string ins)) diff --git a/lisp/cedet/srecode/dictionary.el b/lisp/cedet/srecode/dictionary.el index 9b471eb102..97d3310a2a 100644 --- a/lisp/cedet/srecode/dictionary.el +++ b/lisp/cedet/srecode/dictionary.el @@ -30,6 +30,7 @@ (eval-when-compile (require 'cl)) (require 'eieio) +(require 'cl-generic) (require 'srecode) (require 'srecode/table) (eval-when-compile (require 'semantic)) @@ -103,7 +104,7 @@ set NAME \"str\" macro \"OTHERNAME\" with appending various parts together in a list.") -(defmethod initialize-instance ((this srecode-dictionary-compound-variable) +(cl-defmethod initialize-instance ((this srecode-dictionary-compound-variable) &optional fields) "Initialize the compound variable THIS. Makes sure that :value is compiled." @@ -120,7 +121,7 @@ Makes sure that :value is compiled." ;;(when (not state) ;; (error "Cannot create compound variable outside of sectiondictionary")) - (call-next-method this (nreverse newfields)) + (cl-call-next-method this (nreverse newfields)) (when (not (slot-boundp this 'compiled)) (let ((val (oref this :value)) (comp nil)) @@ -215,7 +216,7 @@ associated with a buffer or parent." )) dict)))) -(defmethod srecode-dictionary-add-template-table ((dict srecode-dictionary) +(cl-defmethod srecode-dictionary-add-template-table ((dict srecode-dictionary) tpl) "Insert into DICT the variables found in table TPL. TPL is an object representing a compiled template file." @@ -235,7 +236,7 @@ TPL is an object representing a compiled template file." (setq tabs (cdr tabs)))))) -(defmethod srecode-dictionary-set-value ((dict srecode-dictionary) +(cl-defmethod srecode-dictionary-set-value ((dict srecode-dictionary) name value) "In dictionary DICT, set NAME to have VALUE." ;; Validate inputs @@ -247,7 +248,7 @@ TPL is an object representing a compiled template file." (puthash name value namehash)) ) -(defmethod srecode-dictionary-add-section-dictionary ((dict srecode-dictionary) +(cl-defmethod srecode-dictionary-add-section-dictionary ((dict srecode-dictionary) name &optional show-only force) "In dictionary DICT, add a section dictionary for section macro NAME. Return the new dictionary. @@ -299,7 +300,7 @@ inserted dictionaries." ;; Return the new sub-dictionary. new)) -(defmethod srecode-dictionary-show-section ((dict srecode-dictionary) name) +(cl-defmethod srecode-dictionary-show-section ((dict srecode-dictionary) name) "In dictionary DICT, indicate that the section NAME should be exposed." ;; Validate inputs (unless (stringp name) @@ -310,7 +311,7 @@ inserted dictionaries." (srecode-dictionary-add-section-dictionary dict name t) nil) -(defmethod srecode-dictionary-hide-section ((dict srecode-dictionary) name) +(cl-defmethod srecode-dictionary-hide-section ((dict srecode-dictionary) name) "In dictionary DICT, indicate that the section NAME should be hidden." ;; We need to find the has value, and then delete it. ;; Validate inputs @@ -322,7 +323,7 @@ inserted dictionaries." (remhash name namehash)) nil) -(defmethod srecode-dictionary-add-entries ((dict srecode-dictionary) +(cl-defmethod srecode-dictionary-add-entries ((dict srecode-dictionary) entries &optional state) "Add ENTRIES to DICT. @@ -373,7 +374,7 @@ values but STATE is nil." (setq entries (nthcdr 2 entries))) dict) -(defmethod srecode-dictionary-merge ((dict srecode-dictionary) otherdict +(cl-defmethod srecode-dictionary-merge ((dict srecode-dictionary) otherdict &optional force) "Merge into DICT the dictionary entries from OTHERDICT. Unless the optional argument FORCE is non-nil, values in DICT are @@ -405,7 +406,7 @@ OTHERDICT." (srecode-dictionary-set-value dict key entry))))) (oref otherdict namehash)))) -(defmethod srecode-dictionary-lookup-name ((dict srecode-dictionary) +(cl-defmethod srecode-dictionary-lookup-name ((dict srecode-dictionary) name &optional non-recursive) "Return information about DICT's value for NAME. DICT is a dictionary, and NAME is a string that is treated as the @@ -429,7 +430,7 @@ This function derives values for some special NAMEs, such as (srecode-dictionary-lookup-name parent name))))) ) -(defmethod srecode-root-dictionary ((dict srecode-dictionary)) +(cl-defmethod srecode-root-dictionary ((dict srecode-dictionary)) "For dictionary DICT, return the root dictionary. The root dictionary is usually for a current or active insertion." (let ((ans dict)) @@ -442,7 +443,7 @@ The root dictionary is usually for a current or active insertion." ;; Compound values must provide at least the toString method ;; for use in converting the compound value into something insertable. -(defmethod srecode-compound-toString ((cp srecode-dictionary-compound-value) +(cl-defmethod srecode-compound-toString ((cp srecode-dictionary-compound-value) function dictionary) "Convert the compound dictionary value CP to a string. @@ -456,13 +457,13 @@ the value itself using `princ', or by detecting if the current standard out is a buffer, and using `insert'." (eieio-object-name cp)) -(defmethod srecode-dump ((cp srecode-dictionary-compound-value) +(cl-defmethod srecode-dump ((cp srecode-dictionary-compound-value) &optional indent) "Display information about this compound value." (princ (eieio-object-name cp)) ) -(defmethod srecode-compound-toString ((cp srecode-dictionary-compound-variable) +(cl-defmethod srecode-compound-toString ((cp srecode-dictionary-compound-variable) function dictionary) "Convert the compound dictionary variable value CP into a string. @@ -471,7 +472,7 @@ FUNCTION and DICTIONARY are as for the baseclass." (srecode-insert-code-stream (oref cp compiled) dictionary)) -(defmethod srecode-dump ((cp srecode-dictionary-compound-variable) +(cl-defmethod srecode-dump ((cp srecode-dictionary-compound-variable) &optional indent) "Display information about this compound value." (require 'srecode/compile) @@ -501,7 +502,7 @@ Compound values allow a field to be stored in the dictionary for when it is referenced a second time. This compound value can then be inserted with a new editable field.") -(defmethod srecode-compound-toString((cp srecode-field-value) +(cl-defmethod srecode-compound-toString((cp srecode-field-value) function dictionary) "Convert this field into an insertable string." @@ -639,7 +640,7 @@ STATE is the current compiler state." (srecode-dump dict)) )))) -(defmethod srecode-dump ((dict srecode-dictionary) &optional indent) +(cl-defmethod srecode-dump ((dict srecode-dictionary) &optional indent) "Dump a dictionary." (if (not indent) (setq indent 0)) (maphash (lambda (key entry) diff --git a/lisp/cedet/srecode/document.el b/lisp/cedet/srecode/document.el index 9f106a4066..47577844c7 100644 --- a/lisp/cedet/srecode/document.el +++ b/lisp/cedet/srecode/document.el @@ -395,7 +395,7 @@ It is assumed that the comment occurs just in front of FCN-IN." (beginning-of-line) (forward-char -1) - (let ((lextok (semantic-documentation-comment-preceeding-tag fcn-in 'lex)) + (let ((lextok (semantic-documentation-comment-preceding-tag fcn-in 'lex)) (doctext (srecode-document-function-name-comment fcn-in)) ) diff --git a/lisp/cedet/srecode/extract.el b/lisp/cedet/srecode/extract.el index c3b1f6e6da..027ae0c25d 100644 --- a/lisp/cedet/srecode/extract.el +++ b/lisp/cedet/srecode/extract.el @@ -55,16 +55,16 @@ ) "The current extraction state.") -(defmethod srecode-extract-state-set ((st srecode-extract-state) ins dict) +(cl-defmethod srecode-extract-state-set ((st srecode-extract-state) ins dict) "Set onto the extract state ST a new inserter INS and dictionary DICT." (oset st lastinserter ins) (oset st lastdict dict)) -(defmethod srecode-extract-state-set-anchor ((st srecode-extract-state)) +(cl-defmethod srecode-extract-state-set-anchor ((st srecode-extract-state)) "Reset the anchor point on extract state ST." (oset st anchor (point))) -(defmethod srecode-extract-state-extract ((st srecode-extract-state) +(cl-defmethod srecode-extract-state-extract ((st srecode-extract-state) endpoint) "Perform an extraction on the extract state ST with ENDPOINT. If there was no waiting inserter, do nothing." @@ -94,7 +94,7 @@ the dictionary entries were for that block of text." (srecode-extract-method template dict state) dict)))) -(defmethod srecode-extract-method ((st srecode-template) dictionary +(cl-defmethod srecode-extract-method ((st srecode-template) dictionary state) "Extract template ST and store extracted text in DICTIONARY. Optional STARTRETURN is a symbol in which the start of the first @@ -139,11 +139,11 @@ Uses STATE to maintain the current extraction state." ;;; Inserter Base Extractors ;; -(defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter)) +(cl-defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter)) "Return non-nil if this inserter can extract values." nil) -(defmethod srecode-inserter-extract ((ins srecode-template-inserter) +(cl-defmethod srecode-inserter-extract ((ins srecode-template-inserter) start end dict state) "Extract text from START/END and store in DICT. Return nil as this inserter will extract nothing." @@ -151,11 +151,11 @@ Return nil as this inserter will extract nothing." ;;; Variable extractor is simple and can extract later. ;; -(defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-variable)) +(cl-defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-variable)) "Return non-nil if this inserter can extract values." 'later) -(defmethod srecode-inserter-extract ((ins srecode-template-inserter-variable) +(cl-defmethod srecode-inserter-extract ((ins srecode-template-inserter-variable) start end vdict state) "Extract text from START/END and store in VDICT. Return t if something was extracted. @@ -169,11 +169,11 @@ Return nil if this inserter doesn't need to extract anything." ;;; Section Inserter ;; -(defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-section-start)) +(cl-defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-section-start)) "Return non-nil if this inserter can extract values." 'now) -(defmethod srecode-inserter-extract ((ins srecode-template-inserter-section-start) +(cl-defmethod srecode-inserter-extract ((ins srecode-template-inserter-section-start) start end indict state) "Extract text from START/END and store in INDICT. Return the starting location of the first plain-text match. @@ -203,11 +203,11 @@ Return nil if nothing was extracted." ;;; Include Extractor must extract now. ;; -(defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-include)) +(cl-defmethod srecode-inserter-do-extract-p ((ins srecode-template-inserter-include)) "Return non-nil if this inserter can extract values." 'now) -(defmethod srecode-inserter-extract ((ins srecode-template-inserter-include) +(cl-defmethod srecode-inserter-extract ((ins srecode-template-inserter-include) start end dict state) "Extract text from START/END and store in DICT. Return the starting location of the first plain-text match. diff --git a/lisp/cedet/srecode/fields.el b/lisp/cedet/srecode/fields.el index f473a0d826..dd38b65d7b 100644 --- a/lisp/cedet/srecode/fields.el +++ b/lisp/cedet/srecode/fields.el @@ -39,6 +39,7 @@ ;; Keep this library independent of SRecode proper. (require 'eieio) +(require 'cl-generic) ;;; Code: (defvar srecode-field-archive nil @@ -74,7 +75,7 @@ The overlay will crossreference this object.") "An object that gets automatically bound to an overlay. Has virtual :start and :end initializers.") -(defmethod initialize-instance ((olaid srecode-overlaid) &optional args) +(cl-defmethod initialize-instance ((olaid srecode-overlaid) &optional args) "Initialize OLAID, being sure it archived." ;; Extract :start and :end from the olaid list. (let ((newargs nil) @@ -107,11 +108,11 @@ Has virtual :start and :end initializers.") (overlay-put olay 'srecode-init-only t) (oset olaid overlay olay) - (call-next-method olaid (nreverse newargs)) + (cl-call-next-method olaid (nreverse newargs)) )) -(defmethod srecode-overlaid-activate ((olaid srecode-overlaid)) +(cl-defmethod srecode-overlaid-activate ((olaid srecode-overlaid)) "Activate the overlaid area." (let* ((ola (oref olaid overlay)) (start (overlay-start ola)) @@ -128,23 +129,23 @@ Has virtual :start and :end initializers.") )) -(defmethod srecode-delete ((olaid srecode-overlaid)) +(cl-defmethod srecode-delete ((olaid srecode-overlaid)) "Delete the overlay from OLAID." (delete-overlay (oref olaid overlay)) (slot-makeunbound olaid 'overlay) ) -(defmethod srecode-empty-region-p ((olaid srecode-overlaid)) +(cl-defmethod srecode-empty-region-p ((olaid srecode-overlaid)) "Return non-nil if the region covered by OLAID is of length 0." (= 0 (srecode-region-size olaid))) -(defmethod srecode-region-size ((olaid srecode-overlaid)) +(cl-defmethod srecode-region-size ((olaid srecode-overlaid)) "Return the length of region covered by OLAID." (let ((start (overlay-start (oref olaid overlay))) (end (overlay-end (oref olaid overlay)))) (- end start))) -(defmethod srecode-point-in-region-p ((olaid srecode-overlaid)) +(cl-defmethod srecode-point-in-region-p ((olaid srecode-overlaid)) "Return non-nil if point is in the region of OLAID." (let ((start (overlay-start (oref olaid overlay))) (end (overlay-end (oref olaid overlay)))) @@ -161,7 +162,7 @@ Has virtual :start and :end initializers.") (setq ol (cdr ol))) (car (nreverse ret)))) -(defmethod srecode-overlaid-text ((olaid srecode-overlaid) &optional set-to) +(cl-defmethod srecode-overlaid-text ((olaid srecode-overlaid) &optional set-to) "Return the text under OLAID. If SET-TO is a string, then replace the text of OLAID wit SET-TO." (let* ((ol (oref olaid overlay)) @@ -191,7 +192,7 @@ If SET-TO is a string, then replace the text of OLAID wit SET-TO." ) "Manage a buffer region in which fields exist.") -(defmethod initialize-instance ((ir srecode-template-inserted-region) +(cl-defmethod initialize-instance ((ir srecode-template-inserted-region) &rest args) "Initialize IR, capturing the active fields, and creating the overlay." ;; Fill in the fields @@ -199,10 +200,10 @@ If SET-TO is a string, then replace the text of OLAID wit SET-TO." (setq srecode-field-archive nil) ;; Initialize myself first. - (call-next-method) + (cl-call-next-method) ) -(defmethod srecode-overlaid-activate ((ir srecode-template-inserted-region)) +(cl-defmethod srecode-overlaid-activate ((ir srecode-template-inserted-region)) "Activate the template area for IR." ;; Activate all our fields @@ -210,7 +211,7 @@ If SET-TO is a string, then replace the text of OLAID wit SET-TO." (srecode-overlaid-activate F)) ;; Activate our overlay. - (call-next-method) + (cl-call-next-method) ;; Position the cursor at the first field (let ((first (car (oref ir fields)))) @@ -223,14 +224,14 @@ If SET-TO is a string, then replace the text of OLAID wit SET-TO." (add-hook 'post-command-hook 'srecode-field-post-command t t) ) -(defmethod srecode-delete ((ir srecode-template-inserted-region)) +(cl-defmethod srecode-delete ((ir srecode-template-inserted-region)) "Call into our base, but also clear out the fields." ;; Clear us out of the baseclass. (oset ir active-region nil) ;; Clear our fields. (mapc 'srecode-delete (oref ir fields)) ;; Call to our base - (call-next-method) + (cl-call-next-method) ;; Clear our hook. (remove-hook 'post-command-hook 'srecode-field-post-command t) ) @@ -285,15 +286,15 @@ Try to use this to provide useful completion when available.") km) "Keymap applied to field overlays.") -(defmethod initialize-instance ((field srecode-field) &optional args) +(cl-defmethod initialize-instance ((field srecode-field) &optional args) "Initialize FIELD, being sure it archived." (add-to-list 'srecode-field-archive field t) - (call-next-method) + (cl-call-next-method) ) -(defmethod srecode-overlaid-activate ((field srecode-field)) +(cl-defmethod srecode-overlaid-activate ((field srecode-field)) "Activate the FIELD area." - (call-next-method) + (cl-call-next-method) (let* ((ol (oref field overlay)) (end nil) @@ -314,13 +315,13 @@ Try to use this to provide useful completion when available.") ) ) -(defmethod srecode-delete ((olaid srecode-field)) +(cl-defmethod srecode-delete ((olaid srecode-field)) "Delete our secondary overlay." ;; Remove our spare overlay (delete-overlay (oref olaid tail)) (slot-makeunbound olaid 'tail) ;; Do our baseclass work. - (call-next-method) + (cl-call-next-method) ) (defvar srecode-field-replication-max-size 100 @@ -379,7 +380,7 @@ PRE-LEN is used in the after mode for the length of the changed text." (srecode-field-mod-hook ol after start end pre-len)) )) -(defmethod srecode-field-goto ((field srecode-field)) +(cl-defmethod srecode-field-goto ((field srecode-field)) "Goto the FIELD." (goto-char (overlay-start (oref field overlay)))) diff --git a/lisp/cedet/srecode/find.el b/lisp/cedet/srecode/find.el index fc1b79dfd5..092f739df7 100644 --- a/lisp/cedet/srecode/find.el +++ b/lisp/cedet/srecode/find.el @@ -96,7 +96,7 @@ all template files for that application will be loaded." ;; ;; Find if a template table has a project set, and if so, is the ;; current buffer in that project. -(defmethod srecode-template-table-in-project-p ((tab srecode-template-table)) +(cl-defmethod srecode-template-table-in-project-p ((tab srecode-template-table)) "Return non-nil if the table TAB can be used in the current project. If TAB has a :project set, check that the directories match. If TAB is nil, then always return t." @@ -113,7 +113,7 @@ If TAB is nil, then always return t." ;; ;; Find a given template based on name, and features of the current ;; buffer. -(defmethod srecode-template-get-table ((tab srecode-template-table) +(cl-defmethod srecode-template-get-table ((tab srecode-template-table) template-name &optional context application) "Find in the template in table TAB, the template with TEMPLATE-NAME. @@ -129,7 +129,7 @@ The APPLICATION argument is unused." ;; No context, perhaps a merged name? (gethash template-name (oref tab namehash))))) -(defmethod srecode-template-get-table ((tab srecode-mode-table) +(cl-defmethod srecode-template-get-table ((tab srecode-mode-table) template-name &optional context application) "Find in the template in mode table TAB, the template with TEMPLATE-NAME. @@ -157,7 +157,7 @@ tables that do not belong to an application will be searched." ;; ;; Find a given template based on a key binding. ;; -(defmethod srecode-template-get-table-for-binding +(cl-defmethod srecode-template-get-table-for-binding ((tab srecode-template-table) binding &optional context) "Find in the template name in table TAB, the template with BINDING. Optional argument CONTEXT specifies that the template should part @@ -190,7 +190,7 @@ of a particular context." (maphash hashfcn (oref tab namehash))) keyout))) -(defmethod srecode-template-get-table-for-binding +(cl-defmethod srecode-template-get-table-for-binding ((tab srecode-mode-table) binding &optional context application) "Find in the template name in mode table TAB, the template with BINDING. Optional argument CONTEXT specifies a context a particular template diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el index 78ec165885..0c13ee51e3 100644 --- a/lisp/cedet/srecode/insert.el +++ b/lisp/cedet/srecode/insert.el @@ -260,20 +260,20 @@ Optional argument TEMP is the template that is getting its arguments resolved." ;; Code managing the top-level insert method and the current ;; insertion stack. ;; -(defmethod srecode-push ((st srecode-template)) +(cl-defmethod srecode-push ((st srecode-template)) "Push the srecoder template ST onto the active stack." (oset st active (cons st (oref st active)))) -(defmethod srecode-pop :STATIC ((st srecode-template)) +(cl-defmethod srecode-pop ((st (subclass srecode-template))) "Pop the srecoder template ST onto the active stack. ST can be a class, or an object." (oset st active (cdr (oref st active)))) -(defmethod srecode-peek :STATIC ((st srecode-template)) +(cl-defmethod srecode-peek ((st (subclass srecode-template))) "Fetch the topmost active template record. ST can be a class." (car (oref st active))) -(defmethod srecode-insert-method ((st srecode-template) dictionary) +(cl-defmethod srecode-insert-method ((st srecode-template) dictionary) "Insert the srecoder template ST." ;; Merge any template entries into the input dictionary. ;; This may happen twice since some templates arguments need @@ -324,7 +324,7 @@ by themselves.") Specify the :indent argument to enable automatic indentation when newlines occur in your template.") -(defmethod srecode-insert-method ((sti srecode-template-inserter-newline) +(cl-defmethod srecode-insert-method ((sti srecode-template-inserter-newline) dictionary) "Insert the STI inserter." ;; To be safe, indent the previous line since the template will @@ -363,9 +363,9 @@ occur in your template.") ((stringp i) (princ i)))))) -(defmethod srecode-dump ((ins srecode-template-inserter-newline) indent) +(cl-defmethod srecode-dump ((ins srecode-template-inserter-newline) indent) "Dump the state of the SRecode template inserter INS." - (call-next-method) + (cl-call-next-method) (when (oref ins hard) (princ " : hard") )) @@ -388,7 +388,7 @@ When set to 'end it will insert a CR if we are not at 'eol'.") "Insert a newline before and after a template, and possibly do indenting. Specify the :blank argument to enable this inserter.") -(defmethod srecode-insert-method ((sti srecode-template-inserter-blank) +(cl-defmethod srecode-insert-method ((sti srecode-template-inserter-blank) dictionary) "Make sure there is no text before or after point." (let ((i (srecode-dictionary-lookup-name dictionary "INDENT")) @@ -425,7 +425,7 @@ Specify the :blank argument to enable this inserter.") ) "Allow comments within template coding. This inserts nothing.") -(defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter-comment) +(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-comment)) escape-start escape-end) "Insert an example using inserter INS. Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." @@ -436,7 +436,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." (terpri) ) -(defmethod srecode-insert-method ((sti srecode-template-inserter-comment) +(cl-defmethod srecode-insert-method ((sti srecode-template-inserter-comment) dictionary) "Don't insert anything for comment macros in STI." nil) @@ -453,7 +453,7 @@ If there is no entry, insert nothing.") (defvar srecode-inserter-variable-current-dictionary nil "The active dictionary when calling a variable filter.") -(defmethod srecode-insert-variable-secondname-handler +(cl-defmethod srecode-insert-variable-secondname-handler ((sti srecode-template-inserter-variable) dictionary value secondname) "For VALUE handle SECONDNAME behaviors for this variable inserter. Return the result as a string. @@ -471,7 +471,7 @@ If SECONDNAME is nil, return VALUE." (object-print sti) secondname))) value)) -(defmethod srecode-insert-method ((sti srecode-template-inserter-variable) +(cl-defmethod srecode-insert-method ((sti srecode-template-inserter-variable) dictionary) "Insert the STI inserter." ;; Convert the name into a name/fcn pair @@ -541,7 +541,7 @@ If there is no entry, prompt the user for the value to use. The prompt text used is derived from the previous PROMPT command in the template file.") -(defmethod srecode-inserter-apply-state +(cl-defmethod srecode-inserter-apply-state ((ins srecode-template-inserter-ask) STATE) "For the template inserter INS, apply information from STATE. Loop over the prompts to see if we have a match." @@ -561,14 +561,14 @@ Loop over the prompts to see if we have a match." (setq prompts (cdr prompts))) )) -(defmethod srecode-insert-method ((sti srecode-template-inserter-ask) +(cl-defmethod srecode-insert-method ((sti srecode-template-inserter-ask) dictionary) "Insert the STI inserter." (let ((val (srecode-dictionary-lookup-name dictionary (oref sti :object-name)))) (if val ;; Does some extra work. Oh well. - (call-next-method) + (cl-call-next-method) ;; How is our -ask value determined? (if srecode-insert-with-fields-in-progress @@ -585,9 +585,9 @@ Loop over the prompts to see if we have a match." ;; Now that this value is safely stowed in the dictionary, ;; we can do what regular inserters do. - (call-next-method)))) + (cl-call-next-method)))) -(defmethod srecode-insert-ask-default ((sti srecode-template-inserter-ask) +(cl-defmethod srecode-insert-ask-default ((sti srecode-template-inserter-ask) dictionary) "Derive the default value for an askable inserter STI. DICTIONARY is used to derive some values." @@ -612,7 +612,7 @@ DICTIONARY is used to derive some values." dictionary "Unknown default for prompt: %S" defaultfcn))))) -(defmethod srecode-insert-method-ask ((sti srecode-template-inserter-ask) +(cl-defmethod srecode-insert-method-ask ((sti srecode-template-inserter-ask) dictionary) "Do the \"asking\" for the template inserter STI. Use DICTIONARY to resolve values." @@ -646,7 +646,7 @@ Use DICTIONARY to resolve values." val) ) -(defmethod srecode-insert-method-field ((sti srecode-template-inserter-ask) +(cl-defmethod srecode-insert-method-field ((sti srecode-template-inserter-ask) dictionary) "Create an editable field for the template inserter STI. Use DICTIONARY to resolve values." @@ -661,9 +661,9 @@ Use DICTIONARY to resolve values." ;; across multiple locations. compound-value)) -(defmethod srecode-dump ((ins srecode-template-inserter-ask) indent) +(cl-defmethod srecode-dump ((ins srecode-template-inserter-ask) indent) "Dump the state of the SRecode template inserter INS." - (call-next-method) + (cl-call-next-method) (princ " : \"") (princ (oref ins prompt)) (princ "\"") @@ -681,7 +681,7 @@ Thus a specification of `10:left' will insert the value of A to 10 characters, with spaces added to the left. Use `right' for adding spaces to the right.") -(defmethod srecode-insert-variable-secondname-handler +(cl-defmethod srecode-insert-variable-secondname-handler ((sti srecode-template-inserter-width) dictionary value width) "For VALUE handle WIDTH behaviors for this variable inserter. Return the result as a string. @@ -714,7 +714,7 @@ By default, treat as a function name." (concat padchars value) (concat value padchars)))))) -(defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter-width) +(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-width)) escape-start escape-end) "Insert an example using inserter INS. Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." @@ -750,7 +750,7 @@ The cursor is placed at the ^ macro after insertion. Some inserter macros, such as `srecode-template-inserter-include-wrap' will place text at the ^ macro from the included macro.") -(defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter-point) +(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-point)) escape-start escape-end) "Insert an example using inserter INS. Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." @@ -761,7 +761,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." (terpri) ) -(defmethod srecode-insert-method ((sti srecode-template-inserter-point) +(cl-defmethod srecode-insert-method ((sti srecode-template-inserter-point) dictionary) "Insert the STI inserter. Save point in the class allocated 'point' slot. @@ -787,11 +787,11 @@ generalized marker will do something else. See "Wrap a section of a template under the control of a macro." :abstract t) -(defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter-subtemplate) +(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-subtemplate)) escape-start escape-end) "Insert an example using inserter INS. Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." - (call-next-method) + (cl-call-next-method) (princ " Template Text to control") (terpri) (princ " ") @@ -801,7 +801,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." (terpri) ) -(defmethod srecode-insert-subtemplate ((sti srecode-template-inserter-subtemplate) +(cl-defmethod srecode-insert-subtemplate ((sti srecode-template-inserter-subtemplate) dict slot) "Insert a subtemplate for the inserter STI with dictionary DICT." ;; Make sure that only dictionaries are used. @@ -814,7 +814,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." ;; Output the code from the sub-template. (srecode-insert-method (slot-value sti slot) dict)) -(defmethod srecode-insert-method-helper ((sti srecode-template-inserter-subtemplate) +(cl-defmethod srecode-insert-method-helper ((sti srecode-template-inserter-subtemplate) dictionary slot) "Do the work for inserting the STI inserter. Loops over the embedded CODE which was saved here during compilation. @@ -837,7 +837,7 @@ The template to insert is stored in SLOT." (srecode-insert-subtemplate sti (car dicts) slot) (setq dicts (cdr dicts))))) -(defmethod srecode-insert-method ((sti srecode-template-inserter-subtemplate) +(cl-defmethod srecode-insert-method ((sti srecode-template-inserter-subtemplate) dictionary) "Insert the STI inserter. Calls back to `srecode-insert-method-helper' for this class." @@ -858,7 +858,7 @@ The dictionary saved at the named dictionary entry will be applied to the text between the section start and the `srecode-template-inserter-section-end' macro.") -(defmethod srecode-parse-input ((ins srecode-template-inserter-section-start) +(cl-defmethod srecode-parse-input ((ins srecode-template-inserter-section-start) tag input STATE) "For the section inserter INS, parse INPUT. Shorten input until the END token is found. @@ -872,9 +872,9 @@ Return the remains of INPUT." :code (cdr out))) (car out))) -(defmethod srecode-dump ((ins srecode-template-inserter-section-start) indent) +(cl-defmethod srecode-dump ((ins srecode-template-inserter-section-start) indent) "Dump the state of the SRecode template inserter INS." - (call-next-method) + (cl-call-next-method) (princ "\n") (srecode-dump-code-list (oref (oref ins template) code) (concat indent " ")) @@ -889,12 +889,12 @@ Return the remains of INPUT." "All template segments between the section-start and section-end are treated specially.") -(defmethod srecode-insert-method ((sti srecode-template-inserter-section-end) +(cl-defmethod srecode-insert-method ((sti srecode-template-inserter-section-end) dictionary) "Insert the STI inserter." ) -(defmethod srecode-match-end ((ins srecode-template-inserter-section-end) name) +(cl-defmethod srecode-match-end ((ins srecode-template-inserter-section-end) name) "For the template inserter INS, do I end a section called NAME?" (string= name (oref ins :object-name))) @@ -912,7 +912,7 @@ are treated specially.") The included template will have additional dictionary entries from the subdictionary stored specified by this macro.") -(defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter-include) +(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-include)) escape-start escape-end) "Insert an example using inserter INS. Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." @@ -923,7 +923,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." (terpri) ) -(defmethod srecode-insert-include-lookup ((sti srecode-template-inserter-include) +(cl-defmethod srecode-insert-include-lookup ((sti srecode-template-inserter-include) dictionary) "For the template inserter STI, lookup the template to include. Finds the template with this macro function part and stores it in @@ -981,7 +981,7 @@ this template instance." "No template \"%s\" found for include macro `%s'" templatenamepart (oref sti :object-name))))) -(defmethod srecode-insert-method ((sti srecode-template-inserter-include) +(cl-defmethod srecode-insert-method ((sti srecode-template-inserter-include) dictionary) "Insert the STI inserter. Finds the template with this macro function part, and inserts it @@ -1017,7 +1017,7 @@ stored specified by this macro. If the included macro includes a ^ macro, then the text between this macro and the end macro will be inserted at the ^ macro.") -(defmethod srecode-inserter-prin-example :STATIC ((ins srecode-template-inserter-include-wrap) +(cl-defmethod srecode-inserter-prin-example ((ins (subclass srecode-template-inserter-include-wrap)) escape-start escape-end) "Insert an example using inserter INS. Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." @@ -1035,7 +1035,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." (terpri) ) -(defmethod srecode-insert-method ((sti srecode-template-inserter-include-wrap) +(cl-defmethod srecode-insert-method ((sti srecode-template-inserter-include-wrap) dictionary) "Insert the template STI. This will first insert the include part via inheritance, then @@ -1067,7 +1067,7 @@ template where a ^ inserter occurs." inserter1 dict 'template)))))))) ;; Do a regular insertion for an include, but with our override in ;; place. - (call-next-method))) + (cl-call-next-method))) (provide 'srecode/insert) diff --git a/lisp/cedet/srecode/map.el b/lisp/cedet/srecode/map.el index cc0c4ae442..71ed835e4f 100644 --- a/lisp/cedet/srecode/map.el +++ b/lisp/cedet/srecode/map.el @@ -67,11 +67,11 @@ Each app keys to an alist of files and modes (as above.)") ) "A map of srecode templates.") -(defmethod srecode-map-entry-for-file ((map srecode-map) file) +(cl-defmethod srecode-map-entry-for-file ((map srecode-map) file) "Return the entry in MAP for FILE." (assoc file (oref map files))) -(defmethod srecode-map-entries-for-mode ((map srecode-map) mode) +(cl-defmethod srecode-map-entries-for-mode ((map srecode-map) mode) "Return the entries in MAP for major MODE." (let ((ans nil)) (dolist (f (oref map files)) @@ -79,12 +79,12 @@ Each app keys to an alist of files and modes (as above.)") (setq ans (cons f ans)))) ans)) -(defmethod srecode-map-entry-for-app ((map srecode-map) app) +(cl-defmethod srecode-map-entry-for-app ((map srecode-map) app) "Return the entry in MAP for APP." (assoc app (oref map apps)) ) -(defmethod srecode-map-entries-for-app-and-mode ((map srecode-map) app mode) +(cl-defmethod srecode-map-entries-for-app-and-mode ((map srecode-map) app mode) "Return the entries in MAP for major MODE." (let ((ans nil) (appentry (srecode-map-entry-for-app map app))) @@ -93,7 +93,7 @@ Each app keys to an alist of files and modes (as above.)") (setq ans (cons f ans)))) ans)) -(defmethod srecode-map-entry-for-file-anywhere ((map srecode-map) file) +(cl-defmethod srecode-map-entry-for-file-anywhere ((map srecode-map) file) "Search in all entry points in MAP for FILE. Return a list ( APP . FILE-ASSOC ) where APP is nil in the global map." @@ -112,13 +112,13 @@ in the global map." ;; Other? )) -(defmethod srecode-map-delete-file-entry ((map srecode-map) file) +(cl-defmethod srecode-map-delete-file-entry ((map srecode-map) file) "Update MAP to exclude FILE from the file list." (let ((entry (srecode-map-entry-for-file map file))) (when entry (object-remove-from-list map 'files entry)))) -(defmethod srecode-map-update-file-entry ((map srecode-map) file mode) +(cl-defmethod srecode-map-update-file-entry ((map srecode-map) file mode) "Update a MAP entry for FILE to be used with MODE. Return non-nil if the MAP was changed." (let ((entry (srecode-map-entry-for-file map file)) @@ -136,14 +136,14 @@ Return non-nil if the MAP was changed." )) dirty)) -(defmethod srecode-map-delete-file-entry-from-app ((map srecode-map) file app) +(cl-defmethod srecode-map-delete-file-entry-from-app ((map srecode-map) file app) "Delete from MAP the FILE entry within the APP." (let* ((appe (srecode-map-entry-for-app map app)) (fentry (assoc file (cdr appe)))) (setcdr appe (delete fentry (cdr appe)))) ) -(defmethod srecode-map-update-app-file-entry ((map srecode-map) file mode app) +(cl-defmethod srecode-map-update-app-file-entry ((map srecode-map) file mode app) "Update the MAP entry for FILE to be used with MODE within APP. Return non-nil if the map was changed." (let* ((appentry (srecode-map-entry-for-app map app)) diff --git a/lisp/cedet/srecode/semantic.el b/lisp/cedet/srecode/semantic.el index 2313fa73b7..0ea2ab4a5f 100644 --- a/lisp/cedet/srecode/semantic.el +++ b/lisp/cedet/srecode/semantic.el @@ -55,7 +55,7 @@ "Wrap up a collection of semantic tag information. This class will be used to derive dictionary values.") -(defmethod srecode-compound-toString((cp srecode-semantic-tag) +(cl-defmethod srecode-compound-toString((cp srecode-semantic-tag) function dictionary) "Convert the compound dictionary value CP to a string. diff --git a/lisp/cedet/srecode/table.el b/lisp/cedet/srecode/table.el index b4f20a9f35..a2baa7b231 100644 --- a/lisp/cedet/srecode/table.el +++ b/lisp/cedet/srecode/table.el @@ -26,6 +26,7 @@ ;; (require 'eieio) +(require 'cl-generic) (require 'eieio-base) (require 'mode-local) (require 'srecode) @@ -172,7 +173,7 @@ calculate all inherited templates from parent modes." new)))) -(defmethod srecode-mode-table-find ((mt srecode-mode-table) file) +(cl-defmethod srecode-mode-table-find ((mt srecode-mode-table) file) "Look in the mode table MT for a template table from FILE. Return nil if there was none." (object-assoc file 'file (oref mt modetables))) @@ -235,7 +236,7 @@ Use PREDICATE is the same as for the `sort' function." (srecode-dump tmp)) ))) -(defmethod srecode-dump ((tab srecode-mode-table)) +(cl-defmethod srecode-dump ((tab srecode-mode-table)) "Dump the contents of the SRecode mode table TAB." (princ "MODE TABLE FOR ") (princ (oref tab :major-mode)) @@ -248,7 +249,7 @@ Use PREDICATE is the same as for the `sort' function." (setq subtab (cdr subtab))) )) -(defmethod srecode-dump ((tab srecode-template-table)) +(cl-defmethod srecode-dump ((tab srecode-template-table)) "Dump the contents of the SRecode template table TAB." (princ "Template Table for ") (princ (eieio-object-name-string tab)) diff --git a/lisp/comint.el b/lisp/comint.el index 30c4dda5c0..31649ff31c 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -472,6 +472,7 @@ executed once when the buffer is created." (define-key map "\C-c\C-\\" 'comint-quit-subjob) (define-key map "\C-c\C-m" 'comint-copy-old-input) (define-key map "\C-c\C-o" 'comint-delete-output) + (define-key map "\C-c\M-o" 'comint-clear-buffer) (define-key map "\C-c\C-r" 'comint-show-output) (define-key map "\C-c\C-e" 'comint-show-maximum-output) (define-key map "\C-c\C-l" 'comint-dynamic-list-input-ring) @@ -1475,7 +1476,7 @@ Intended to be added to `isearch-mode-hook' in `comint-mode'." (or ;; 1. First try searching in the initial comint text (funcall search-fun string - (if isearch-forward bound (field-beginning)) + (if isearch-forward bound (comint-line-beginning-position)) noerror) ;; 2. If the above search fails, start putting next/prev history ;; elements in the comint successively, and search the string @@ -1491,7 +1492,7 @@ Intended to be added to `isearch-mode-hook' in `comint-mode'." (when (null comint-input-ring-index) (error "End of history; no next item")) (comint-next-input 1) - (goto-char (field-beginning))) + (goto-char (comint-line-beginning-position))) (t ;; Signal an error here explicitly, because ;; `comint-previous-input' doesn't signal an error. @@ -1509,7 +1510,7 @@ Intended to be added to `isearch-mode-hook' in `comint-mode'." (unless isearch-forward ;; For backward search, don't search ;; in the comint prompt - (field-beginning)) + (comint-line-beginning-position)) noerror))) ;; Return point of the new search result (point)) @@ -1533,16 +1534,16 @@ the function `isearch-message'." (if (overlayp comint-history-isearch-message-overlay) (move-overlay comint-history-isearch-message-overlay (save-excursion - (goto-char (field-beginning)) + (goto-char (comint-line-beginning-position)) (forward-line 0) (point)) - (field-beginning)) + (comint-line-beginning-position)) (setq comint-history-isearch-message-overlay (make-overlay (save-excursion - (goto-char (field-beginning)) + (goto-char (comint-line-beginning-position)) (forward-line 0) (point)) - (field-beginning))) + (comint-line-beginning-position))) (overlay-put comint-history-isearch-message-overlay 'evaporate t)) (overlay-put comint-history-isearch-message-overlay 'display (isearch-message-prefix ellipsis isearch-nonincremental)) @@ -1563,7 +1564,7 @@ or to the last history element for a backward search." (comint-goto-input (1- (ring-length comint-input-ring))) (comint-goto-input nil)) (setq isearch-success t) - (goto-char (if isearch-forward (field-beginning) (point-max)))) + (goto-char (if isearch-forward (comint-line-beginning-position) (point-max)))) (defun comint-history-isearch-push-state () "Save a function restoring the state of input history search. @@ -1787,7 +1788,10 @@ Similarly for Soar, Scheme, etc." (widen) (let* ((pmark (process-mark proc)) (intxt (if (>= (point) (marker-position pmark)) - (progn (if comint-eol-on-send (goto-char (field-end))) + (progn (if comint-eol-on-send + (if comint-use-prompt-regexp + (end-of-line) + (goto-char (field-end)))) (buffer-substring pmark (point))) (let ((copy (funcall comint-get-old-input))) (goto-char pmark) @@ -1926,10 +1930,10 @@ the start, the cdr to the end of the last prompt recognized.") Freezes the `font-lock-face' text property in place." (when comint-last-prompt (with-silent-modifications - (add-text-properties + (font-lock-prepend-text-property (car comint-last-prompt) (cdr comint-last-prompt) - '(font-lock-face comint-highlight-prompt))) + 'font-lock-face 'comint-highlight-prompt)) ;; Reset comint-last-prompt so later on comint-output-filter does ;; not remove the font-lock-face text property of the previous ;; (this) prompt. @@ -2080,14 +2084,19 @@ Make backspaces delete the previous character." (add-text-properties prompt-start (point) '(read-only t front-sticky (read-only))))) (when comint-last-prompt - (remove-text-properties (car comint-last-prompt) - (cdr comint-last-prompt) - '(font-lock-face))) + (with-silent-modifications + (font-lock--remove-face-from-text-property + (car comint-last-prompt) + (cdr comint-last-prompt) + 'font-lock-face + 'comint-highlight-prompt))) (setq comint-last-prompt (cons (copy-marker prompt-start) (point-marker))) - (add-text-properties prompt-start (point) - '(rear-nonsticky t - font-lock-face comint-highlight-prompt))) + (with-silent-modifications + (font-lock-prepend-text-property prompt-start (point) + 'font-lock-face + 'comint-highlight-prompt) + (add-text-properties prompt-start (point) '(rear-nonsticky t)))) (goto-char saved-point))))))) (defun comint-preinput-scroll-to-bottom () @@ -2218,7 +2227,10 @@ the current line with any initial string matching the regexp (null (get-char-property (setq bof (field-beginning)) 'field))) (field-string-no-properties bof) (comint-bol) - (buffer-substring-no-properties (point) (line-end-position))))) + (buffer-substring-no-properties (point) + (if comint-use-prompt-regexp + (line-end-position) + (field-end)))))) (defun comint-copy-old-input () "Insert after prompt old input at point as new input to be edited. @@ -2276,7 +2288,10 @@ a buffer local variable." ;; if there are two fields on a line, then the first one is the ;; prompt, and the second one is an input field, and is front-sticky ;; (as input fields should be). - (constrain-to-field (line-beginning-position) (line-end-position)))) + (constrain-to-field (if (eq (field-at-pos (point)) 'output) + (line-beginning-position) + (field-beginning)) + (line-end-position)))) (defun comint-bol (&optional arg) "Go to the beginning of line, then skip past the prompt, if any. @@ -2428,6 +2443,11 @@ Sets mark to the value of point when this command is run." (goto-char (field-beginning pos)) (set-window-start (selected-window) (point)))))) +(defun comint-clear-buffer () + "Clear the comint buffer." + (interactive) + (let ((comint-buffer-maximum-size 0)) + (comint-truncate-buffer))) (defun comint-interrupt-subjob () "Interrupt the current subjob. diff --git a/lisp/delsel.el b/lisp/delsel.el index e6bb3b952b..740b60345e 100644 --- a/lisp/delsel.el +++ b/lisp/delsel.el @@ -1,4 +1,4 @@ -;;; delsel.el --- delete selection if you insert +;;; delsel.el --- delete selection if you insert -*- lexical-binding:t -*- ;; Copyright (C) 1992, 1997-1998, 2001-2015 Free Software Foundation, ;; Inc. @@ -35,16 +35,12 @@ ;; property on their symbols; commands which insert text but don't ;; have this property won't delete the selection. It can be one of ;; the values: -;; 'yank +;; `yank' ;; For commands which do a yank; ensures the region about to be ;; deleted isn't yanked. -;; 'supersede +;; `supersede' ;; Delete the active region and ignore the current command, ;; i.e. the command will just delete the region. -;; 'kill -;; `kill-region' is used on the selection, rather than -;; `delete-region'. (Text selected with the mouse will typically -;; be yankable anyhow.) ;; t ;; The normal case: delete the active region prior to executing ;; the command which will insert replacement text. @@ -93,8 +89,7 @@ If KILLP in not-nil, the active region is killed instead of deleted." (cons (current-buffer) (and (consp buffer-undo-list) (car buffer-undo-list))))) (t - (funcall region-extract-function 'delete-only))) - t) + (funcall region-extract-function 'delete-only)))) (defun delete-selection-repeat-replace-region (arg) "Repeat replacing text of highlighted region with typed text. @@ -167,7 +162,7 @@ With ARG, repeat that many times. `C-u' means until end of buffer." For commands which need to dynamically determine this behavior. FUNCTION should take no argument and return one of the above values or nil." (condition-case data - (cond ((eq type 'kill) + (cond ((eq type 'kill) ;Deprecated, backward compatibility. (delete-active-region t) (if (and overwrite-mode (eq this-command 'self-insert-command)) @@ -255,7 +250,7 @@ See `delete-selection-helper'." (put 'newline-and-indent 'delete-selection t) (put 'newline 'delete-selection t) (put 'electric-newline-and-maybe-indent 'delete-selection t) -(put 'open-line 'delete-selection 'kill) +(put 'open-line 'delete-selection t) ;; This is very useful for canceling a selection in the minibuffer without ;; aborting the minibuffer. diff --git a/lisp/desktop.el b/lisp/desktop.el index c355d7f080..3eca5a6a77 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -136,7 +136,7 @@ (require 'cl-lib) (require 'frameset) -(defvar desktop-file-version "206" +(defvar desktop-file-version "208" "Version number of desktop file format. Written into the desktop file and used at desktop read to provide backward compatibility.") @@ -629,6 +629,18 @@ Only valid during frame saving & restoring; intended for internal use.") "When the desktop file was last modified to the knowledge of this Emacs. Used to detect desktop file conflicts.") +(defvar desktop-var-serdes-funs + (list (list + 'mark-ring + (lambda (mr) + (mapcar #'marker-position mr)) + (lambda (mr) + (mapcar #'copy-marker mr)))) + "Table of serialization/deserialization functions for variables. +Each record is a list of form: (var serializer deserializer). +These records can be freely reordered, deleted, or new ones added. +However, for compatibility, don't modify the functions for existing records.") + (defun desktop-owner (&optional dirname) "Return the PID of the Emacs process that owns the desktop file in DIRNAME. Return nil if no desktop file found or no Emacs process is using it. @@ -744,6 +756,24 @@ is nil, ask the user where to save the desktop." ;; ---------------------------------------------------------------------------- (defun desktop-buffer-info (buffer) + "Return information describing BUFFER. +This function is not pure, as BUFFER is made current with +`set-buffer'. + +Returns a list of all the necessary information to recreate the +buffer, which is (in order): + + `uniquify-buffer-base-name'; + `buffer-file-name'; + `buffer-name'; + `major-mode'; + list of minor-modes,; + `point'; + `mark'; + `buffer-read-only'; + auxiliary information given by `desktop-save-buffer'; + local variables; + auxiliary information given by `desktop-var-serdes-funs'." (set-buffer buffer) (list ;; base name of the buffer; replaces the buffer name if managed by uniquify @@ -754,16 +784,13 @@ is nil, ask the user where to save the desktop." major-mode ;; minor modes (let (ret) - (mapc - #'(lambda (minor-mode) - (and (boundp minor-mode) - (symbol-value minor-mode) - (let* ((special (assq minor-mode desktop-minor-mode-table)) - (value (cond (special (cadr special)) - ((functionp minor-mode) minor-mode)))) - (when value (add-to-list 'ret value))))) - (mapcar #'car minor-mode-alist)) - ret) + (dolist (minor-mode (mapcar #'car minor-mode-alist) ret) + (and (boundp minor-mode) + (symbol-value minor-mode) + (let* ((special (assq minor-mode desktop-minor-mode-table)) + (value (cond (special (cadr special)) + ((functionp minor-mode) minor-mode)))) + (when value (cl-pushnew value ret)))))) ;; point and mark, and read-only status (point) (list (mark t) mark-active) @@ -780,7 +807,12 @@ is nil, ask the user where to save the desktop." (push here ll)) ((member local loclist) (push local ll))))) - ll))) + ll) + (mapcar (lambda (record) + (let ((var (car record))) + (list var + (funcall (cadr record) (symbol-value var))))) + desktop-var-serdes-funs))) ;; ---------------------------------------------------------------------------- (defun desktop--v2s (value) @@ -1119,7 +1151,8 @@ It returns t if a desktop file was loaded, nil otherwise." (desktop-buffer-fail-count 0) (owner (desktop-owner)) ;; Avoid desktop saving during evaluation of desktop buffer. - (desktop-save nil)) + (desktop-save nil) + (desktop-autosave-was-enabled)) (if (and owner (memq desktop-load-locked-desktop '(nil ask)) (or (null desktop-load-locked-desktop) @@ -1135,6 +1168,8 @@ Using it may cause conflicts. Use it anyway? " owner))))) ;; Temporarily disable the autosave that will leave it ;; disabled when loading the desktop fails with errors, ;; thus not overwriting the desktop with broken contents. + (setq desktop-autosave-was-enabled + (memq 'desktop-auto-save-set-timer window-configuration-change-hook)) (desktop-auto-save-disable) ;; Evaluate desktop buffer and remember when it was modified. (load (desktop-full-file-name) t t t) @@ -1188,7 +1223,7 @@ Using it may cause conflicts. Use it anyway? " owner))))) (set-window-prev-buffers window nil) (set-window-next-buffers window nil)))) (setq desktop-saved-frameset nil) - (desktop-auto-save-enable) + (if desktop-autosave-was-enabled (desktop-auto-save-enable)) t)) ;; No desktop file found. (let ((default-directory desktop-dirname)) @@ -1336,7 +1371,9 @@ after that many seconds of idle time." buffer-readonly buffer-misc &optional - buffer-locals) + buffer-locals + compacted-vars + &rest _unsupported) (let ((desktop-file-version file-version) (desktop-buffer-file-name buffer-filename) @@ -1426,7 +1463,14 @@ after that many seconds of idle time." (set (car this) (cdr this))) ;; An entry of the form `symbol'. (make-local-variable this) - (makunbound this)))))))) + (makunbound this))) + (unless (< desktop-file-version 208) ; Don't misinterpret any old custom args + (dolist (record compacted-vars) + (let* + ((var (car record)) + (deser-fun (cl-caddr (assq var desktop-var-serdes-funs)))) + (if deser-fun (set var (funcall deser-fun (cadr record)))))))) + result)))) ;; ---------------------------------------------------------------------------- ;; Backward compatibility -- update parameters to 205 standards. diff --git a/lisp/dired.el b/lisp/dired.el index 2b3e783216..cc16c8c9c5 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2850,11 +2850,16 @@ Any other value means to ask for each directory." ;; to e.g. recursive-delete-file and put it somewhere else. (defun dired-delete-file (file &optional recursive trash) "\ Delete FILE or directory (possibly recursively if optional RECURSIVE is true.) -RECURSIVE determines what to do with a non-empty directory. If RECURSIVE is: -nil, do not delete. -`always', delete recursively without asking. -`top', ask for each directory at top level. -Anything else, ask for each sub-directory." +RECURSIVE determines what to do with a non-empty directory. The effect of +its possible values is: + + nil -- do not delete. + `always' -- delete recursively without asking. + `top' -- ask for each directory at top level. + Anything else -- ask for each sub-directory. + +TRASH non-nil means to trash the file instead of deleting, provided +`delete-by-moving-to-trash' (which see) is non-nil." ;; This test is equivalent to ;; (and (file-directory-p fn) (not (file-symlink-p fn))) ;; but more efficient diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 0e63d37adc..5f1c94a012 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -415,7 +415,6 @@ Typically \"page-%s.png\".") (define-key map "H" 'doc-view-fit-height-to-window) (define-key map "P" 'doc-view-fit-page-to-window) ;; Killing the buffer (and the process) - (define-key map (kbd "k") 'doc-view-kill-proc-and-buffer) (define-key map (kbd "K") 'doc-view-kill-proc) ;; Slicing the image (define-key map (kbd "s s") 'doc-view-set-slice) @@ -645,12 +644,8 @@ at the top edge of the page moves to the previous page." (setq doc-view--current-timer nil)) (setq mode-line-process nil)) -(defun doc-view-kill-proc-and-buffer () - "Kill the current converter process and buffer." - (interactive) - (doc-view-kill-proc) - (when (eq major-mode 'doc-view-mode) - (kill-buffer (current-buffer)))) +(define-obsolete-function-alias 'doc-view-kill-proc-and-buffer + #'image-kill-buffer "25.1") (defun doc-view-make-safe-dir (dir) (condition-case nil @@ -1685,6 +1680,9 @@ If BACKWARD is non-nil, jump to the previous match." ;; desktop.el integration (defun doc-view-desktop-save-buffer (_desktop-dirname) + ;; FIXME: This is wrong, since this info is per-window but we only do it once + ;; here for the buffer. IOW it should be saved via something like + ;; `window-persistent-parameters'. `((page . ,(doc-view-current-page)) (slice . ,(doc-view-current-slice)))) @@ -1695,8 +1693,13 @@ If BACKWARD is non-nil, jump to the previous match." (let ((page (cdr (assq 'page misc))) (slice (cdr (assq 'slice misc)))) (desktop-restore-file-buffer file name misc) + ;; FIXME: We need to run this code after displaying the buffer. (with-selected-window (or (get-buffer-window (current-buffer) 0) (selected-window)) + ;; FIXME: This should be done for all windows restored that show + ;; this buffer. Basically, the page/slice should be saved as + ;; window-parameters in the window-state(s) and then restoring this + ;; window-state should call us back (to interpret/use those parameters). (doc-view-goto-page page) (when slice (apply 'doc-view-set-slice slice))))) diff --git a/lisp/dom.el b/lisp/dom.el index 11357e8880..42131073a0 100644 --- a/lisp/dom.el +++ b/lisp/dom.el @@ -149,6 +149,16 @@ ATTRIBUTE would typically be `class', `id' or the like." (setq result (dom-parent elem node)))) result))) +(defun dom-previous-sibling (dom node) + (when-let (parent (dom-parent dom node)) + (let ((siblings (dom-children parent)) + (previous nil)) + (while siblings + (when (eq (cadr siblings) node) + (setq previous (car siblings))) + (pop siblings)) + previous))) + (defun dom-node (tag &optional attributes &rest children) "Return a DOM node with TAG and ATTRIBUTES." (if children diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el index 2cede62ab4..562b29467c 100644 --- a/lisp/elec-pair.el +++ b/lisp/elec-pair.el @@ -557,7 +557,8 @@ the mode if ARG is omitted or nil. Electric Pair mode is a global minor mode. When enabled, typing an open parenthesis automatically inserts the corresponding -closing parenthesis. (Likewise for brackets, etc.)." +closing parenthesis. (Likewise for brackets, etc.). To toggle +the mode in a single buffer, use `electric-pair-local-mode'." :global t :group 'electricity (if electric-pair-mode (progn @@ -571,6 +572,19 @@ closing parenthesis. (Likewise for brackets, etc.)." (remove-hook 'self-insert-uses-region-functions #'electric-pair-will-use-region))) +;;;###autoload +(define-minor-mode electric-pair-local-mode + "Toggle `electric-pair-mode' only in this buffer." + :variable (buffer-local-value 'electric-pair-mode (current-buffer)) + (cond + ((eq electric-pair-mode (default-value 'electric-pair-mode)) + (kill-local-variable 'electric-pair-mode)) + ((not (default-value 'electric-pair-mode)) + ;; Locally enabled, but globally disabled. + (electric-pair-mode 1) ; Setup the hooks. + (setq-default electric-pair-mode nil) ; But keep it globally disabled. + ))) + (provide 'elec-pair) ;;; elec-pair.el ends here diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 149c472319..06a1106302 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -302,65 +302,65 @@ ;; doesn't matter here, because function's behavior is underspecified so it ;; can safely be turned into a `let', even though the reverse is not true. (or name (setq name "anonymous lambda")) - (let ((lambda (car form)) - (values (cdr form))) - (let ((arglist (nth 1 lambda)) - (body (cdr (cdr lambda))) - optionalp restp - bindings) - (if (and (stringp (car body)) (cdr body)) - (setq body (cdr body))) - (if (and (consp (car body)) (eq 'interactive (car (car body)))) - (setq body (cdr body))) - ;; FIXME: The checks below do not belong in an optimization phase. - (while arglist - (cond ((eq (car arglist) '&optional) - ;; ok, I'll let this slide because funcall_lambda() does... - ;; (if optionalp (error "multiple &optional keywords in %s" name)) - (if restp (error "&optional found after &rest in %s" name)) - (if (null (cdr arglist)) - (error "nothing after &optional in %s" name)) - (setq optionalp t)) - ((eq (car arglist) '&rest) - ;; ...but it is by no stretch of the imagination a reasonable - ;; thing that funcall_lambda() allows (&rest x y) and - ;; (&rest x &optional y) in arglists. - (if (null (cdr arglist)) - (error "nothing after &rest in %s" name)) - (if (cdr (cdr arglist)) - (error "multiple vars after &rest in %s" name)) - (setq restp t)) - (restp - (setq bindings (cons (list (car arglist) - (and values (cons 'list values))) - bindings) - values nil)) - ((and (not optionalp) (null values)) - (byte-compile-warn "attempt to open-code `%s' with too few arguments" name) - (setq arglist nil values 'too-few)) - (t - (setq bindings (cons (list (car arglist) (car values)) - bindings) - values (cdr values)))) - (setq arglist (cdr arglist))) - (if values - (progn - (or (eq values 'too-few) - (byte-compile-warn - "attempt to open-code `%s' with too many arguments" name)) - form) - - ;; The following leads to infinite recursion when loading a - ;; file containing `(defsubst f () (f))', and then trying to - ;; byte-compile that file. - ;(setq body (mapcar 'byte-optimize-form body))) - - (let ((newform - (if bindings - (cons 'let (cons (nreverse bindings) body)) - (cons 'progn body)))) - (byte-compile-log " %s\t==>\t%s" form newform) - newform))))) + (let* ((lambda (car form)) + (values (cdr form)) + (arglist (nth 1 lambda)) + (body (cdr (cdr lambda))) + optionalp restp + bindings) + (if (and (stringp (car body)) (cdr body)) + (setq body (cdr body))) + (if (and (consp (car body)) (eq 'interactive (car (car body)))) + (setq body (cdr body))) + ;; FIXME: The checks below do not belong in an optimization phase. + (while arglist + (cond ((eq (car arglist) '&optional) + ;; ok, I'll let this slide because funcall_lambda() does... + ;; (if optionalp (error "multiple &optional keywords in %s" name)) + (if restp (error "&optional found after &rest in %s" name)) + (if (null (cdr arglist)) + (error "nothing after &optional in %s" name)) + (setq optionalp t)) + ((eq (car arglist) '&rest) + ;; ...but it is by no stretch of the imagination a reasonable + ;; thing that funcall_lambda() allows (&rest x y) and + ;; (&rest x &optional y) in arglists. + (if (null (cdr arglist)) + (error "nothing after &rest in %s" name)) + (if (cdr (cdr arglist)) + (error "multiple vars after &rest in %s" name)) + (setq restp t)) + (restp + (setq bindings (cons (list (car arglist) + (and values (cons 'list values))) + bindings) + values nil)) + ((and (not optionalp) (null values)) + (byte-compile-warn "attempt to open-code `%s' with too few arguments" name) + (setq arglist nil values 'too-few)) + (t + (setq bindings (cons (list (car arglist) (car values)) + bindings) + values (cdr values)))) + (setq arglist (cdr arglist))) + (if values + (progn + (or (eq values 'too-few) + (byte-compile-warn + "attempt to open-code `%s' with too many arguments" name)) + form) + + ;; The following leads to infinite recursion when loading a + ;; file containing `(defsubst f () (f))', and then trying to + ;; byte-compile that file. + ;(setq body (mapcar 'byte-optimize-form body))) + + (let ((newform + (if bindings + (cons 'let (cons (nreverse bindings) body)) + (cons 'progn body)))) + (byte-compile-log " %s\t==>\t%s" form newform) + newform)))) ;;; implementing source-level optimizers @@ -390,12 +390,13 @@ (and (nth 1 form) (not for-effect) form)) - ((eq 'lambda (car-safe fn)) + ((eq (car-safe fn) 'lambda) (let ((newform (byte-compile-unfold-lambda form))) (if (eq newform form) ;; Some error occurred, avoid infinite recursion form (byte-optimize-form-code-walker newform for-effect)))) + ((eq (car-safe fn) 'closure) form) ((memq fn '(let let*)) ;; recursively enter the optimizer for the bindings and body ;; of a let or let*. This for depth-firstness: forms that diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index caa7e3dad3..081ea3183b 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -147,11 +147,16 @@ This is used by `declare'.") (defvar macro-declarations-alist (cons (list 'debug - #'(lambda (name _args spec) - (list 'progn :autoload-end - (list 'put (list 'quote name) - ''edebug-form-spec (list 'quote spec))))) - defun-declarations-alist) + #'(lambda (name _args spec) + (list 'progn :autoload-end + (list 'put (list 'quote name) + ''edebug-form-spec (list 'quote spec))))) + (cons + (list 'no-font-lock-keyword + #'(lambda (name _args val) + (list 'function-put (list 'quote name) + ''no-font-lock-keyword (list 'quote val)))) + defun-declarations-alist)) "List associating properties of macros to their macro expansion. Each element of the list takes the form (PROP FUN) where FUN is a function. For each (PROP . VALUES) in a macro's declaration, the FUN corresponding @@ -201,6 +206,19 @@ The return value is undefined. (message "Warning: Unknown macro property %S in %S" (car x) name)))) decls))) + ;; Refresh font-lock if this is a new macro, or it is an + ;; existing macro whose 'no-font-lock-keyword declaration + ;; has changed. + (if (and + ;; If lisp-mode hasn't been loaded, there's no reason + ;; to flush. + (fboundp 'lisp--el-font-lock-flush-elisp-buffers) + (or (not (fboundp name)) ;; new macro + (and (fboundp name) ;; existing macro + (member `(function-put ',name 'no-font-lock-keyword + ',(get name 'no-font-lock-keyword)) + declarations)))) + (lisp--el-font-lock-flush-elisp-buffers)) (if declarations (cons 'prog1 (cons def declarations)) def)))))) @@ -375,7 +393,7 @@ ACCESS-TYPE if non-nil should specify the kind of access that will trigger This uses `defvaralias' and `make-obsolete-variable' (which see). See the Info node `(elisp)Variable Aliases' for more details. -If CURRENT-NAME is a defcustom (more generally, any variable +If CURRENT-NAME is a defcustom or a defvar (more generally, any variable where OBSOLETE-NAME may be set, e.g. in an init file, before the alias is defined), then the define-obsolete-variable-alias statement should be evaluated before the defcustom, if user @@ -389,7 +407,7 @@ variable (this is due to the way `defvaralias' works). For the benefit of `custom-set-variables', if OBSOLETE-NAME has any of the following properties, they are copied to CURRENT-NAME, if it does not already have them: -'saved-value, 'saved-variable-comment." +`saved-value', `saved-variable-comment'." (declare (doc-string 4) (advertised-calling-convention ;; New code should always provide the `when' argument. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2bd8d07851..e929c02eef 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -31,6 +31,10 @@ ;; faster. [`LAP' == `Lisp Assembly Program'.] ;; The user entry points are byte-compile-file and byte-recompile-directory. +;;; Todo: + +;; - Turn "not bound at runtime" functions into autoloads. + ;;; Code: ;; ======================================================================== @@ -450,7 +454,7 @@ Return the compile-time value of FORM." (eval-when-compile . ,(lambda (&rest body) (let ((result nil)) (byte-compile-recurse-toplevel - (cons 'progn body) + (macroexp-progn body) (lambda (form) (setf result (byte-compile-eval @@ -459,7 +463,7 @@ Return the compile-time value of FORM." (list 'quote result)))) (eval-and-compile . ,(lambda (&rest body) (byte-compile-recurse-toplevel - (cons 'progn body) + (macroexp-progn body) (lambda (form) ;; Don't compile here, since we don't know ;; whether to compile as byte-compile-form @@ -1349,13 +1353,13 @@ extra args." (let ((keyword-args (cdr (cdr (cdr (cdr form))))) (name (cadr form))) (or (not (eq (car-safe name) 'quote)) - (and (eq (car form) 'custom-declare-group) - (equal name ''emacs)) - (plist-get keyword-args :group) - (not (and (consp name) (eq (car name) 'quote))) - (byte-compile-warn - "%s for `%s' fails to specify containing group" - (cdr (assq (car form) + (and (eq (car form) 'custom-declare-group) + (equal name ''emacs)) + (plist-get keyword-args :group) + (not (and (consp name) (eq (car name) 'quote))) + (byte-compile-warn + "%s for `%s' fails to specify containing group" + (cdr (assq (car form) '((custom-declare-group . defgroup) (custom-declare-face . defface) (custom-declare-variable . defcustom)))) @@ -1458,7 +1462,7 @@ extra args." ;; These would sometimes be warned about ;; but such warnings are never useful, ;; so don't warn about them. - macroexpand cl-macroexpand-all + macroexpand cl--compiling-file)))) (byte-compile-warn "function `%s' from cl package called at runtime" func))) @@ -2319,10 +2323,12 @@ list that represents a doc string reference. form)) (put 'define-abbrev-table 'byte-hunk-handler - 'byte-compile-file-form-define-abbrev-table) -(defun byte-compile-file-form-define-abbrev-table (form) - (if (eq 'quote (car-safe (car-safe (cdr form)))) - (byte-compile--declare-var (car-safe (cdr (cadr form))))) + 'byte-compile-file-form-defvar-function) +(put 'defvaralias 'byte-hunk-handler 'byte-compile-file-form-defvar-function) + +(defun byte-compile-file-form-defvar-function (form) + (pcase-let (((or `',name (let name nil)) (nth 1 form))) + (if name (byte-compile--declare-var name))) (byte-compile-keep-pending form)) (put 'custom-declare-variable 'byte-hunk-handler @@ -2330,8 +2336,7 @@ list that represents a doc string reference. (defun byte-compile-file-form-custom-declare-variable (form) (when (byte-compile-warning-enabled-p 'callargs) (byte-compile-nogroup-warn form)) - (byte-compile--declare-var (nth 1 (nth 1 form))) - (byte-compile-keep-pending form)) + (byte-compile-file-form-defvar-function form)) (put 'require 'byte-hunk-handler 'byte-compile-file-form-require) (defun byte-compile-file-form-require (form) @@ -2580,17 +2585,11 @@ If FORM is a lambda or a macro, byte-compile it as a function." fun) (t (when (symbolp form) - (unless (memq (car-safe fun) '(closure lambda)) - (error "Don't know how to compile %S" fun)) (setq lexical-binding (eq (car fun) 'closure)) (setq fun (byte-compile--reify-function fun))) - (unless (eq (car-safe fun) 'lambda) - (error "Don't know how to compile %S" fun)) ;; Expand macros. (setq fun (byte-compile-preprocess fun)) - ;; Get rid of the `function' quote added by the `lambda' macro. - (if (eq (car-safe fun) 'function) (setq fun (cadr fun))) - (setq fun (byte-compile-lambda fun)) + (setq fun (byte-compile-top-level fun nil 'eval)) (if macro (push 'macro fun)) (if (symbolp form) (fset form fun) @@ -2966,6 +2965,16 @@ for symbols generated by the byte compiler itself." (interactive-only (or (get fn 'interactive-only) (memq fn byte-compile-interactive-only-functions)))) + (when (memq fn '(set symbol-value run-hooks ;; add-to-list + add-hook remove-hook run-hook-with-args + run-hook-with-args-until-success + run-hook-with-args-until-failure)) + (pcase (cdr form) + (`(',var . ,_) + (when (assq var byte-compile-lexical-variables) + (byte-compile-log-warning + (format "%s cannot use lexical var `%s'" fn var) + nil :error))))) (when (macroexp--const-symbol-p fn) (byte-compile-warn "`%s' called as a function" fn)) (when (and (byte-compile-warning-enabled-p 'interactive-only) @@ -3079,8 +3088,9 @@ for symbols generated by the byte compiler itself." (dotimes (_ (- (/ (1+ fmax2) 2) alen)) (byte-compile-push-constant nil))) ((zerop (logand fmax2 1)) - (byte-compile-log-warning "Too many arguments for inlined function" - nil :error) + (byte-compile-log-warning + (format "Too many arguments for inlined function %S" form) + nil :error) (byte-compile-discard (- alen (/ fmax2 2)))) (t ;; Turn &rest args into a list. @@ -3453,15 +3463,22 @@ discarding." (if byte-compile--for-effect (setq byte-compile--for-effect nil) (let* ((vars (nth 1 form)) (env (nth 2 form)) - (body (nthcdr 3 form)) + (docstring-exp (nth 3 form)) + (body (nthcdr 4 form)) (fun (byte-compile-lambda `(lambda ,vars . ,body) nil (length env)))) - (cl-assert (> (length env) 0)) ;Otherwise, we don't need a closure. + (cl-assert (or (> (length env) 0) + docstring-exp)) ;Otherwise, we don't need a closure. (cl-assert (byte-code-function-p fun)) (byte-compile-form `(make-byte-code ',(aref fun 0) ',(aref fun 1) (vconcat (vector . ,env) ',(aref fun 2)) - ,@(nthcdr 3 (mapcar (lambda (x) `',x) fun))))))) + ,@(let ((rest (nthcdr 3 (mapcar (lambda (x) `',x) fun)))) + (if docstring-exp + `(,(car rest) + ,docstring-exp + ,@(cddr rest)) + rest))))))) (defun byte-compile-get-closed-var (form) "Byte-compile the special `internal-get-closed-var' form." diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index e9d33e6c64..fa82407593 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -48,7 +48,7 @@ ;; if the function is suitable for lambda lifting (if all calls are known) ;; ;; (lambda (v0 ...) ... fv0 .. fv1 ...) => -;; (internal-make-closure (v0 ...) (fv1 ...) +;; (internal-make-closure (v0 ...) (fv0 ...) ;; ... (internal-get-closed-var 0) ... (internal-get-closed-var 1) ...) ;; ;; If the function has no free variables, we don't do anything. @@ -65,6 +65,14 @@ ;; ;;; Code: +;; PROBLEM cases found during conversion to lexical binding. +;; We should try and detect and warn about those cases, even +;; for lexical-binding==nil to help prepare the migration. +;; - Uses of run-hooks, and friends. +;; - Cases where we want to apply the same code to different vars depending on +;; some test. These sometimes use a (let ((foo (if bar 'a 'b))) +;; ... (symbol-value foo) ... (set foo ...)). + ;; TODO: (not just for cconv but also for the lexbind changes in general) ;; - let (e)debug find the value of lexical variables from the stack. ;; - make eval-region do the eval-sexp-add-defvars dance. @@ -87,9 +95,8 @@ ;; the bytecomp only compiles it once. ;; - Since we know here when a variable is not mutated, we could pass that ;; info to the byte-compiler, e.g. by using a new `immutable-let'. -;; - add tail-calls to bytecode.c and the byte compiler. ;; - call known non-escaping functions with `goto' rather than `call'. -;; - optimize mapcar to a while loop. +;; - optimize mapc to a dolist loop. ;; (defmacro dlet (binders &rest body) ;; ;; Works in both lexical and non-lexical mode. @@ -195,7 +202,7 @@ Returns a form where all lambdas don't have any free variables." (unless (memq (car b) s) (push b res))) (nreverse res))) -(defun cconv--convert-function (args body env parentform) +(defun cconv--convert-function (args body env parentform &optional docstring) (cl-assert (equal body (caar cconv-freevars-alist))) (let* ((fvs (cdr (pop cconv-freevars-alist))) (body-new '()) @@ -240,11 +247,11 @@ Returns a form where all lambdas don't have any free variables." `(,@(nreverse special-forms) (let ,letbind . ,body-new))))) (cond - ((null envector) ;if no freevars - do nothing + ((not (or envector docstring)) ;If no freevars - do nothing. `(function (lambda ,args . ,body-new))) (t `(internal-make-closure - ,args ,envector . ,body-new))))) + ,args ,envector ,docstring . ,body-new))))) (defun cconv-convert (form env extend) ;; This function actually rewrites the tree. @@ -407,7 +414,9 @@ places where they originally did not directly appear." cond-forms))) (`(function (lambda ,args . ,body) . ,_) - (cconv--convert-function args body env form)) + (let ((docstring (if (eq :documentation (car-safe (car body))) + (cconv-convert (cadr (pop body)) env extend)))) + (cconv--convert-function args body env form docstring))) (`(internal-make-closure . ,_) (byte-compile-report-error @@ -533,7 +542,7 @@ FORM is the parent form that binds this var." ;; use = `(,binder ,read ,mutated ,captured ,called) (pcase vardata (`(,_ nil nil nil nil) nil) - (`((,(and (pred (lambda (var) (eq ?_ (aref (symbol-name var) 0)))) var) . ,_) + (`((,(and var (guard (eq ?_ (aref (symbol-name var) 0)))) . ,_) ,_ ,_ ,_ ,_) (byte-compile-log-warning (format "%s `%S' not left unused" varkind var)))) @@ -643,6 +652,8 @@ and updates the data stored in ENV." (cconv--analyze-use vardata form "variable")))) (`(function (lambda ,vrs . ,body-forms)) + (when (eq :documentation (car-safe (car body-forms))) + (cconv-analyze-form (cadr (pop body-forms)) env)) (cconv--analyze-function vrs body-forms env form)) (`(setq . ,forms) @@ -665,6 +676,10 @@ and updates the data stored in ENV." (dolist (forms cond-forms) (dolist (form forms) (cconv-analyze-form form env)))) + ;; ((and `(quote ,v . ,_) (guard (assq v env))) + ;; (byte-compile-log-warning + ;; (format "Possible confusion variable/symbol for `%S'" v))) + (`(quote . ,_) nil) ; quote form (`(function . ,_) nil) ; same as quote diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el index 13de61c493..8fc299d7e9 100644 --- a/lisp/emacs-lisp/check-declare.el +++ b/lisp/emacs-lisp/check-declare.el @@ -125,6 +125,14 @@ With optional argument FULL, sums the number of elements in each element." (autoload 'byte-compile-arglist-signature "bytecomp") +(defgroup check-declare nil + "Check declare-function statements." + :group 'tools) + +(defcustom check-declare-ext-errors nil + "When non-nil, warn about functions not found in :ext." + :type 'boolean) + (defun check-declare-verify (fnfile fnlist) "Check that FNFILE contains function definitions matching FNLIST. Each element of FNLIST has the form (FILE FN ARGLIST FILEONLY), where @@ -226,7 +234,8 @@ method\\|class\\)\\|fset\\)\\>" type) (when type (setq errlist (cons (list (car e) (cadr e) type) errlist)))) (message "%s%s" m - (if (or re (not ext)) + (if (or re (or check-declare-ext-errors + (not ext))) (check-declare-errmsg errlist) (progn (setq errlist nil) @@ -251,12 +260,29 @@ Returned list has elements FNFILE (FILE ...)." "Warn that FILE made a false claim about FN in FNFILE. TYPE is a string giving the nature of the error. Warning is displayed in `check-declare-warning-buffer'." - (display-warning 'check-declare - (format "%s said `%s' was defined in %s: %s" - (file-name-nondirectory file) fn - (file-name-nondirectory fnfile) - type) - nil check-declare-warning-buffer)) + (let ((warning-prefix-function + (lambda (level entry) + (let ((line 0) + (col 0)) + (insert + (with-current-buffer (find-file-noselect file) + (goto-char (point-min)) + (when (re-search-forward + (format "(declare-function[ \t\n]+%s" fn) nil t) + (goto-char (match-beginning 0)) + (setq line (line-number-at-pos)) + (setq col (1+ (current-column)))) + (format "%s:%d:%d:" + (file-name-nondirectory file) + line col)))) + entry)) + (warning-fill-prefix " ")) + (display-warning 'check-declare + (format "%s said `%s' was defined in %s: %s" + (file-name-nondirectory file) fn + (file-name-nondirectory fnfile) + type) + nil check-declare-warning-buffer))) (defun check-declare-files (&rest files) "Check veracity of all `declare-function' statements in FILES. @@ -269,13 +295,20 @@ Return a list of any errors found." (dolist (e (check-declare-sort alist)) (if (setq err (check-declare-verify (car e) (cdr e))) (setq errlist (cons (cons (car e) err) errlist)))) + (setq errlist (nreverse errlist)) (if (get-buffer check-declare-warning-buffer) (kill-buffer check-declare-warning-buffer)) + (with-current-buffer (get-buffer-create check-declare-warning-buffer) + (unless (derived-mode-p 'compilation-mode) + (compilation-mode)) + (let ((inhibit-read-only t)) + (insert "\f\n")) + (compilation-forget-errors)) ;; Sort back again so that errors are ordered by the files ;; containing the declare-function statements. (dolist (e (check-declare-sort errlist)) - (dolist (f (cdr e)) - (check-declare-warn (car e) (cadr f) (car f) (nth 2 f)))) + (dolist (f (cdr e)) + (check-declare-warn (car e) (cadr f) (car f) (nth 2 f)))) errlist)) ;;;###autoload diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 47b6e5f81d..777fed082d 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -1663,14 +1663,15 @@ function,command,variable,option or symbol." ms1)))))) ;; Addendum: Make sure they appear in the doc in the same ;; order that they are found in the arg list. - (let ((args (cdr (cdr (cdr (cdr fp))))) + (let ((args (nthcdr 4 fp)) (last-pos 0) (found 1) (order (and (nth 3 fp) (car (nth 3 fp)))) (nocheck (append '("&optional" "&rest") (nth 3 fp))) (inopts nil)) (while (and args found (> found last-pos)) - (if (member (car args) nocheck) + (if (or (member (car args) nocheck) + (string-match "\\`_" (car args))) (setq args (cdr args) inopts t) (setq last-pos found @@ -2619,14 +2620,15 @@ function called to create the messages." (defun checkdoc-show-diagnostics () "Display the checkdoc diagnostic buffer in a temporary window." (if checkdoc-pending-errors - (let ((b (get-buffer checkdoc-diagnostic-buffer))) - (if b (progn (pop-to-buffer b) - (goto-char (point-max)) - (re-search-backward "\C-l" nil t) - (beginning-of-line) - (forward-line 1) - (recenter 0))) - (other-window -1) + (let* ((b (get-buffer checkdoc-diagnostic-buffer)) + (win (if b (display-buffer b)))) + (when win + (with-selected-window win + (goto-char (point-max)) + (re-search-backward "\C-l" nil t) + (beginning-of-line) + (forward-line 1) + (recenter 0))) (setq checkdoc-pending-errors nil) nil))) diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 72ec8ec180..fb11a3e25a 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2015 Free Software Foundation, Inc. ;; Author: Stefan Monnier +;; Version: 1.0 ;; This file is part of GNU Emacs. @@ -31,37 +32,51 @@ ;; from a significant problem: the method-combination code returns a sexp ;; that needs to be `eval'uated or compiled. IOW it requires run-time ;; code generation. Given how rarely method-combinations are used, -;; I just provided a cl-generic-method-combination-function, which -;; people can use if they are really desperate for such functionality. +;; I just provided a cl-generic-combine-methods generic function, to which +;; people can add methods if they are really desperate for such functionality. ;; - In defgeneric we don't support the options: -;; declare, :method-combination, :generic-function-class, :method-class, -;; :method. +;; declare, :method-combination, :generic-function-class, :method-class. ;; Added elements: ;; - We support aliases to generic functions. -;; - The kind of thing on which to dispatch can be extended. -;; There is support in this file for dispatch on: +;; - cl-generic-generalizers. This generic function lets you extend the kind +;; of thing on which to dispatch. There is support in this file for +;; dispatch on: ;; - (eql ) +;; - (head ) which checks that the arg is a cons with as its head. ;; - plain old types ;; - type of CL structs ;; eieio-core adds dispatch on: ;; - class of eieio objects ;; - actual class argument, using the syntax (subclass ). -;; - cl-generic-method-combination-function (i.s.o define-method-combination). +;; - cl-generic-combine-methods (i.s.o define-method-combination and +;; compute-effective-method). ;; - cl-generic-call-method (which replaces make-method and call-method). +;; - The standard method combination supports ":extra STRING" qualifiers +;; which simply allows adding more methods for the same +;; specializers&qualifiers. ;; Efficiency considerations: overall, I've made an effort to make this fairly ;; efficient for the expected case (e.g. no constant redefinition of methods). ;; - Generic functions which do not dispatch on any argument are implemented ;; optimally (just as efficient as plain old functions). ;; - Generic functions which only dispatch on one argument are fairly efficient -;; (not a lot of room for improvement, I think). +;; (not a lot of room for improvement without changes to the byte-compiler, +;; I think). ;; - Multiple dispatch is implemented rather naively. There's an extra `apply' ;; function call for every dispatch; we don't optimize each dispatch ;; based on the set of candidate methods remaining; we don't optimize the -;; order in which we performs the dispatches either; If/when this -;; becomes a problem, we can try and optimize it. +;; order in which we performs the dispatches either; +;; If/when this becomes a problem, we can try and optimize it. ;; - call-next-method could be made more efficient, but isn't too terrible. +;; TODO: +;; +;; - A generic "filter" generalizer (e.g. could be used to cleanly adds methods +;; to cl-generic-combine-methods with a specializer that says it applies only +;; when some particular qualifier is used). +;; - A way to dispatch on the context (e.g. the major-mode, some global +;; variable, you name it). + ;;; Code: ;; Note: For generic functions that dispatch on several arguments (i.e. those @@ -70,40 +85,24 @@ ;; often suboptimal since after one dispatch, the remaining dispatches can ;; usually be simplified, or even completely skipped. -;; TODO/FIXME: -;; - WIBNI we could use something like -;; (add-function :before (cl-method-function (cl-find-method ...)) ...) - (eval-when-compile (require 'cl-lib)) (eval-when-compile (require 'pcase)) -(defvar cl-generic-tagcode-function - (lambda (type _name) - (if (eq type t) '(0 . 'cl--generic-type) - (error "Unknown specializer %S" type))) - "Function to get the Elisp code to extract the tag on which we dispatch. -Takes a \"parameter-specializer-name\" and a variable name, and returns -a pair (PRIORITY . CODE) where CODE is an Elisp expression that should be -used to extract the \"tag\" (from the object held in the named variable) -that should uniquely determine if we have a match -\(i.e. the \"tag\" is the value that will be used to dispatch to the proper -method(s)). -Such \"tagcodes\" will be or'd together. -PRIORITY is an integer from 0 to 100 which is used to sort the tagcodes -in the `or'. The higher the priority, the more specific the tag should be. -More specifically, if PRIORITY is N and we have two objects X and Y -whose tag (according to TAGCODE) is `eql', then it should be the case -that for all other (PRIORITY . TAGCODE) where PRIORITY ≤ N, then -\(eval TAGCODE) for X is `eql' to (eval TAGCODE) for Y.") - -(defvar cl-generic-tag-types-function - (lambda (tag) (if (eq tag 'cl--generic-type) '(t))) - "Function to get the list of types that a given \"tag\" matches. -They should be sorted from most specific to least specific.") +(cl-defstruct (cl--generic-generalizer + (:constructor nil) + (:constructor cl-generic-make-generalizer + (priority tagcode-function specializers-function))) + (priority nil :type integer) + tagcode-function + specializers-function) + +(defconst cl--generic-t-generalizer + (cl-generic-make-generalizer + 0 (lambda (_name) nil) (lambda (_tag) '(t)))) (cl-defstruct (cl--generic-method (:constructor nil) - (:constructor cl--generic-method-make + (:constructor cl--generic-make-method (specializers qualifiers uses-cnm function)) (:predicate nil)) (specializers nil :read-only t :type list) @@ -115,8 +114,7 @@ They should be sorted from most specific to least specific.") (cl-defstruct (cl--generic (:constructor nil) - (:constructor cl--generic-make - (name &optional dispatches method-table)) + (:constructor cl--generic-make (name)) (:predicate nil)) (name nil :type symbol :read-only t) ;Pointer back to the symbol. ;; `dispatches' holds a list of (ARGNUM . TAGCODES) where ARGNUM is the index @@ -125,8 +123,13 @@ They should be sorted from most specific to least specific.") ;; on which to dispatch and PRIORITY is the priority of each expression to ;; decide in which order to sort them. ;; The most important dispatch is last in the list (and the least is first). - (dispatches nil :type (list-of (cons natnum (list-of tagcode)))) - (method-table nil :type (list-of cl--generic-method))) + (dispatches nil :type (list-of (cons natnum (list-of generalizers)))) + (method-table nil :type (list-of cl--generic-method)) + (options nil :type list)) + +(defun cl-generic-function-options (generic) + "Return the options of the generic function GENERIC." + (cl--generic-options generic)) (defmacro cl--generic (name) `(get ,name 'cl--generic)) @@ -170,20 +173,34 @@ is appropriate to use. Specific methods are defined with `cl-defmethod'. With this implementation the ARGS are currently ignored. OPTIONS-AND-METHODS currently understands: - (:documentation DOCSTRING) -- (declare DECLARATIONS)" +- (declare DECLARATIONS) +- (:argument-precedence-order &rest ARGS) +- (:method [QUALIFIERS...] ARGS &rest BODY) +BODY, if present, is used as the body of a default method. + +\(fn NAME ARGS [DOC-STRING] [OPTIONS-AND-METHODS...] &rest BODY)" (declare (indent 2) (doc-string 3)) - (let* ((docprop (assq :documentation options-and-methods)) - (doc (cond ((stringp (car-safe options-and-methods)) - (pop options-and-methods)) - (docprop - (prog1 - (cadr docprop) - (setq options-and-methods - (delq docprop options-and-methods)))))) - (declarations (assq 'declare options-and-methods))) - (when declarations - (setq options-and-methods - (delq declarations options-and-methods))) + (let* ((doc (if (stringp (car-safe options-and-methods)) + (pop options-and-methods))) + (declarations nil) + (methods ()) + (options ()) + next-head) + (while (progn (setq next-head (car-safe (car options-and-methods))) + (or (keywordp next-head) + (eq next-head 'declare))) + (pcase next-head + (`:documentation + (when doc (error "Multiple doc strings for %S" name)) + (setq doc (cadr (pop options-and-methods)))) + (`declare + (when declarations (error "Multiple `declare' for %S" name)) + (setq declarations (pop options-and-methods))) + (`:method (push (cdr (pop options-and-methods)) methods)) + (_ (push (pop options-and-methods) options)))) + (when options-and-methods + ;; Anything remaining is assumed to be a default method body. + (push `(,args ,@options-and-methods) methods)) `(progn ,(when (eq 'setf (car-safe name)) (pcase-let ((`(,setter . ,code) (cl--generic-setf-rewrite @@ -200,8 +217,10 @@ OPTIONS-AND-METHODS currently understands: nil)))) (cdr declarations)) (defalias ',name - (cl-generic-define ',name ',args ',options-and-methods) - ,(help-add-fundoc-usage doc args))))) + (cl-generic-define ',name ',args ',(nreverse options)) + ,(help-add-fundoc-usage doc args)) + ,@(mapcar (lambda (method) `(cl-defmethod ,name ,@method)) + (nreverse methods))))) (defun cl--generic-mandatory-args (args) (let ((res ())) @@ -210,10 +229,10 @@ OPTIONS-AND-METHODS currently understands: (nreverse res))) ;;;###autoload -(defun cl-generic-define (name args options-and-methods) +(defun cl-generic-define (name args options) (let ((generic (cl-generic-ensure-function name)) (mandatory (cl--generic-mandatory-args args)) - (apo (assq :argument-precedence-order options-and-methods))) + (apo (assq :argument-precedence-order options))) (setf (cl--generic-dispatches generic) nil) (when apo (dolist (arg (cdr apo)) @@ -222,6 +241,7 @@ OPTIONS-AND-METHODS currently understands: (push (list (- (length mandatory) (length pos))) (cl--generic-dispatches generic))))) (setf (cl--generic-method-table generic) nil) + (setf (cl--generic-options generic) options) (cl--generic-make-function generic))) (defmacro cl-generic-current-method-specializers () @@ -243,8 +263,6 @@ This macro can only be used within the lexical scope of a cl-generic method." "Make the lambda expression for a method with ARGS and BODY." (let ((plain-args ()) (specializers nil) - (doc-string (if (and (stringp (car-safe body)) (cdr body)) - (pop body))) (mandatory t)) (dolist (arg args) (push (pcase arg @@ -255,9 +273,7 @@ This macro can only be used within the lexical scope of a cl-generic method." (_ arg)) plain-args)) (setq plain-args (nreverse plain-args)) - (let ((fun `(cl-function (lambda ,plain-args - ,@(if doc-string (list doc-string)) - ,@body))) + (let ((fun `(cl-function (lambda ,plain-args ,@body))) (macroenv (cons `(cl-generic-current-method-specializers . ,(lambda () specializers)) macroexpand-all-environment))) @@ -266,14 +282,13 @@ This macro can only be used within the lexical scope of a cl-generic method." ;; destructuring args, `declare' and whatnot). (pcase (macroexpand fun macroenv) (`#'(lambda ,args . ,body) - (let* ((doc-string (and doc-string (stringp (car body)) (cdr body) - (pop body))) + (let* ((parsed-body (macroexp-parse-body body)) (cnm (make-symbol "cl--cnm")) (nmp (make-symbol "cl--nmp")) (nbody (macroexpand-all `(cl-flet ((cl-call-next-method ,cnm) (cl-next-method-p ,nmp)) - ,@body) + ,@(cdr parsed-body)) macroenv)) ;; FIXME: Rather than `grep' after the fact, the ;; macroexpansion should directly set some flag when cnm @@ -283,7 +298,7 @@ This macro can only be used within the lexical scope of a cl-generic method." (uses-cnm (cl--generic-fgrep (list cnm nmp) nbody))) (cons (not (not uses-cnm)) `#'(lambda (,@(if uses-cnm (list cnm)) ,@args) - ,@(if doc-string (list doc-string)) + ,@(car parsed-body) ,(if (not (memq nmp uses-cnm)) nbody `(let ((,nmp (lambda () @@ -346,7 +361,7 @@ which case this method will be invoked when the argument is `eql' to VAL. ;; But in practice, it's common to use `cl-defmethod' ;; without a previous `cl-defgeneric'. (declare-function ,name "") - (cl-generic-define-method ',name ',qualifiers ',args + (cl-generic-define-method ',name ',(nreverse qualifiers) ',args ,uses-cnm ,fun))))) (defun cl--generic-member-method (specializers qualifiers methods) @@ -355,8 +370,8 @@ which case this method will be invoked when the argument is `eql' to VAL. (let ((m (car methods))) (not (and (equal (cl--generic-method-specializers m) specializers) (equal (cl--generic-method-qualifiers m) qualifiers))))) - (setq methods (cdr methods)) - methods)) + (setq methods (cdr methods))) + methods) ;;;###autoload (defun cl-generic-define-method (name qualifiers args uses-cnm function) @@ -364,28 +379,33 @@ which case this method will be invoked when the argument is `eql' to VAL. (mandatory (cl--generic-mandatory-args args)) (specializers (mapcar (lambda (arg) (if (consp arg) (cadr arg) t)) mandatory)) - (method (cl--generic-method-make + (method (cl--generic-make-method specializers qualifiers uses-cnm function)) (mt (cl--generic-method-table generic)) (me (cl--generic-member-method specializers qualifiers mt)) (dispatches (cl--generic-dispatches generic)) (i 0)) (dolist (specializer specializers) - (let* ((tagcode (funcall cl-generic-tagcode-function specializer 'arg)) + (let* ((generalizers (cl-generic-generalizers specializer)) (x (assq i dispatches))) (unless x - (setq x (list i (funcall cl-generic-tagcode-function t 'arg))) + (setq x (cons i (cl-generic-generalizers t))) (setf (cl--generic-dispatches generic) (setq dispatches (cons x dispatches)))) - (unless (member tagcode (cdr x)) - (setf (cdr x) - (nreverse (sort (cons tagcode (cdr x)) - #'car-less-than-car)))) + (dolist (generalizer generalizers) + (unless (member generalizer (cdr x)) + (setf (cdr x) + (sort (cons generalizer (cdr x)) + (lambda (x y) + (> (cl--generic-generalizer-priority x) + (cl--generic-generalizer-priority y))))))) (setq i (1+ i)))) (if me (setcar me method) (setf (cl--generic-method-table generic) (cons method mt))) (cl-pushnew `(cl-defmethod . (,(cl--generic-name generic) . ,specializers)) current-load-list :test #'equal) + ;; FIXME: Try to avoid re-constructing a new function if the old one + ;; is still valid (e.g. still empty method cache)? (let ((gfun (cl--generic-make-function generic)) ;; Prevent `defalias' from recording this as the definition site of ;; the generic function. @@ -404,62 +424,73 @@ which case this method will be invoked when the argument is `eql' to VAL. (defvar cl--generic-dispatchers (make-hash-table :test #'equal)) -(defun cl--generic-get-dispatcher (tagcodes dispatch-arg) +(defun cl--generic-get-dispatcher (dispatch) (cl--generic-with-memoization - (gethash (cons dispatch-arg tagcodes) cl--generic-dispatchers) - (let ((lexical-binding t) - (tag-exp `(or ,@(mapcar #'cdr - ;; Minor optimization: since this tag-exp is - ;; only used to lookup the method-cache, it - ;; doesn't matter if the default value is some - ;; constant or nil. - (if (macroexp-const-p (car (last tagcodes))) - (butlast tagcodes) - tagcodes)))) - (extraargs ())) + (gethash dispatch cl--generic-dispatchers) + (let* ((dispatch-arg (car dispatch)) + (generalizers (cdr dispatch)) + (lexical-binding t) + (tagcodes + (mapcar (lambda (generalizer) + (funcall (cl--generic-generalizer-tagcode-function + generalizer) + 'arg)) + generalizers)) + (typescodes + (mapcar (lambda (generalizer) + `(funcall ',(cl--generic-generalizer-specializers-function + generalizer) + ,(funcall (cl--generic-generalizer-tagcode-function + generalizer) + 'arg))) + generalizers)) + (tag-exp + ;; Minor optimization: since this tag-exp is + ;; only used to lookup the method-cache, it + ;; doesn't matter if the default value is some + ;; constant or nil. + `(or ,@(if (macroexp-const-p (car (last tagcodes))) + (butlast tagcodes) + tagcodes))) + (extraargs ())) (dotimes (_ dispatch-arg) (push (make-symbol "arg") extraargs)) + ;; FIXME: For generic functions with a single method (or with 2 methods, + ;; one of which always matches), using a tagcode + hash-table is + ;; overkill: better just use a `cl-typep' test. (byte-compile - `(lambda (generic dispatches-left) + `(lambda (generic dispatches-left methods) (let ((method-cache (make-hash-table :test #'eql))) (lambda (,@extraargs arg &rest args) (apply (cl--generic-with-memoization (gethash ,tag-exp method-cache) (cl--generic-cache-miss - generic ',dispatch-arg dispatches-left - (list ,@(mapcar #'cdr tagcodes)))) + generic ',dispatch-arg dispatches-left methods + ,(if (cdr typescodes) + `(append ,@typescodes) (car typescodes)))) ,@extraargs arg args)))))))) (defun cl--generic-make-function (generic) - (let* ((dispatches (cl--generic-dispatches generic)) - (dispatch + (cl--generic-make-next-function generic + (cl--generic-dispatches generic) + (cl--generic-method-table generic))) + +(defun cl--generic-make-next-function (generic dispatches methods) + (let* ((dispatch (progn (while (and dispatches - (member (cdar dispatches) - '(nil ((0 . 'cl--generic-type))))) + (let ((x (nth 1 (car dispatches)))) + ;; No need to dispatch for `t' specializers. + (or (null x) (equal x cl--generic-t-generalizer)))) (setq dispatches (cdr dispatches))) (pop dispatches)))) - (if (null dispatch) - (cl--generic-build-combined-method - (cl--generic-name generic) - (cl--generic-method-table generic)) - (let ((dispatcher (cl--generic-get-dispatcher - (cdr dispatch) (car dispatch)))) - (funcall dispatcher generic dispatches))))) - -(defvar cl-generic-method-combination-function - #'cl--generic-standard-method-combination - "Function to build the effective method. -Called with 2 arguments: NAME and METHOD-ALIST. -It should return an effective method, i.e. a function that expects the same -arguments as the methods, and calls those methods in some appropriate order. -NAME is the name (a symbol) of the corresponding generic function. -METHOD-ALIST is a list of elements (QUALIFIERS . METHODS) where -QUALIFIERS is a list of qualifiers, and METHODS is a list of the selected -methods for that qualifier list. -The METHODS lists are sorted from most generic first to most specific last. -The function can use `cl-generic-call-method' to create functions that call those -methods.") + (if (not (and dispatch + ;; If there's no method left, there's no point checking + ;; further arguments. + methods)) + (cl--generic-build-combined-method generic methods) + (let ((dispatcher (cl--generic-get-dispatcher dispatch))) + (funcall dispatcher generic dispatches methods))))) (defvar cl--generic-combined-method-memoization (make-hash-table :test #'equal :weakness 'value) @@ -468,27 +499,37 @@ This is particularly useful when many different tags select the same set of methods, since this table then allows us to share a single combined-method for all those different tags in the method-cache.") -(defun cl--generic-build-combined-method (generic-name methods) - (cl--generic-with-memoization - (gethash (cons generic-name methods) - cl--generic-combined-method-memoization) - (let ((mets-by-qual ())) - (dolist (method methods) - (let* ((qualifiers (cl--generic-method-qualifiers method)) - (x (assoc qualifiers mets-by-qual))) - ;; FIXME: sadly, alist-get only uses `assq' and we need `assoc'. - ;;(push (cdr qm) (alist-get qualifiers mets-by-qual))) - (if x - (push method (cdr x)) - (push (list qualifiers method) mets-by-qual)))) - (funcall cl-generic-method-combination-function - generic-name mets-by-qual)))) +(define-error 'cl--generic-cyclic-definition "Cyclic definition: %S") + +(defun cl--generic-build-combined-method (generic methods) + (if (null methods) + ;; Special case needed to fix a circularity during bootstrap. + (cl--generic-standard-method-combination generic methods) + (let ((f + (cl--generic-with-memoization + ;; FIXME: Since the fields of `generic' are modified, this + ;; hash-table won't work right, because the hashes will change! + ;; It's not terribly serious, but reduces the effectiveness of + ;; the table. + (gethash (cons generic methods) + cl--generic-combined-method-memoization) + (puthash (cons generic methods) :cl--generic--under-construction + cl--generic-combined-method-memoization) + (condition-case nil + (cl-generic-combine-methods generic methods) + ;; Special case needed to fix a circularity during bootstrap. + (cl--generic-cyclic-definition + (cl--generic-standard-method-combination generic methods)))))) + (if (eq f :cl--generic--under-construction) + (signal 'cl--generic-cyclic-definition + (list (cl--generic-name generic))) + f)))) (defun cl--generic-no-next-method-function (generic method) (lambda (&rest args) (apply #'cl-no-next-method generic method args))) -(defun cl-generic-call-method (generic-name method &optional fun) +(defun cl-generic-call-method (generic method &optional fun) "Return a function that calls METHOD. FUN is the function that should be called when METHOD calls `call-next-method'." @@ -496,7 +537,7 @@ FUN is the function that should be called when METHOD calls (cl--generic-method-function method) (let ((met-fun (cl--generic-method-function method)) (next (or fun (cl--generic-no-next-method-function - generic-name method)))) + generic method)))) (lambda (&rest args) (apply met-fun ;; FIXME: This sucks: passing just `next' would @@ -508,42 +549,122 @@ FUN is the function that should be called when METHOD calls (apply next (or cnm-args args))) args))))) -(defun cl--generic-standard-method-combination (generic-name mets-by-qual) - (dolist (x mets-by-qual) - (unless (member (car x) '(() (:after) (:before) (:around))) - (error "Unsupported qualifiers in function %S: %S" generic-name (car x)))) - (cond - ((null mets-by-qual) - (lambda (&rest args) - (apply #'cl-no-applicable-method generic-name args))) - ((null (alist-get nil mets-by-qual)) - (lambda (&rest args) - (apply #'cl-no-primary-method generic-name args))) - (t - (let* ((fun nil) - (ab-call (lambda (m) (cl-generic-call-method generic-name m))) - (before - (mapcar ab-call (reverse (cdr (assoc '(:before) mets-by-qual))))) - (after (mapcar ab-call (cdr (assoc '(:after) mets-by-qual))))) - (dolist (method (cdr (assoc nil mets-by-qual))) - (setq fun (cl-generic-call-method generic-name method fun))) - (when (or after before) - (let ((next fun)) - (setq fun (lambda (&rest args) - (dolist (bf before) - (apply bf args)) - (prog1 - (apply next args) - (dolist (af after) - (apply af args))))))) - (dolist (method (cdr (assoc '(:around) mets-by-qual))) - (setq fun (cl-generic-call-method generic-name method fun))) - fun)))) +;; Standard CLOS name. +(defalias 'cl-method-qualifiers #'cl--generic-method-qualifiers) + +(defun cl--generic-standard-method-combination (generic methods) + (let ((mets-by-qual ())) + (dolist (method methods) + (let ((qualifiers (cl-method-qualifiers method))) + (if (eq (car qualifiers) :extra) (setq qualifiers (cddr qualifiers))) + (unless (member qualifiers '(() (:after) (:before) (:around))) + (error "Unsupported qualifiers in function %S: %S" + (cl--generic-name generic) qualifiers)) + (push method (alist-get (car qualifiers) mets-by-qual)))) + (cond + ((null mets-by-qual) + (lambda (&rest args) + (apply #'cl-no-applicable-method generic args))) + ((null (alist-get nil mets-by-qual)) + (lambda (&rest args) + (apply #'cl-no-primary-method generic args))) + (t + (let* ((fun nil) + (ab-call (lambda (m) (cl-generic-call-method generic m))) + (before + (mapcar ab-call (reverse (cdr (assoc :before mets-by-qual))))) + (after (mapcar ab-call (cdr (assoc :after mets-by-qual))))) + (dolist (method (cdr (assoc nil mets-by-qual))) + (setq fun (cl-generic-call-method generic method fun))) + (when (or after before) + (let ((next fun)) + (setq fun (lambda (&rest args) + (dolist (bf before) + (apply bf args)) + (prog1 + (apply next args) + (dolist (af after) + (apply af args))))))) + (dolist (method (cdr (assoc :around mets-by-qual))) + (setq fun (cl-generic-call-method generic method fun))) + fun))))) + +(defun cl--generic-cache-miss (generic + dispatch-arg dispatches-left methods-left types) + (let ((methods '())) + (dolist (method methods-left) + (let* ((specializer (or (nth dispatch-arg + (cl--generic-method-specializers method)) + t)) + (m (member specializer types))) + (when m + (push (cons (length m) method) methods)))) + ;; Sort the methods, most specific first. + ;; It would be tempting to sort them once and for all in the method-table + ;; rather than here, but the order might depend on the actual argument + ;; (e.g. for multiple inheritance with defclass). + (setq methods (nreverse (mapcar #'cdr (sort methods #'car-less-than-car)))) + (cl--generic-make-next-function generic dispatches-left methods))) + +(cl-defgeneric cl-generic-generalizers (specializer) + "Return a list of generalizers for a given SPECIALIZER. +To each kind of `specializer', corresponds a `generalizer' which describes +how to extract a \"tag\" from an object which will then let us check if this +object matches the specializer. A typical example of a \"tag\" would be the +type of an object. It's called a `generalizer' because it +takes a specific object and returns a more general approximation, +denoting a set of objects to which it belongs. +A generalizer gives us the chunk of code which the +dispatch function needs to use to extract the \"tag\" of an object, as well +as a function which turns this tag into an ordered list of +`specializers' that this object matches. +The code which extracts the tag should be as fast as possible. +The tags should be chosen according to the following rules: +- The tags should not be too specific: similar objects which match the + same list of specializers should ideally use the same (`eql') tag. + This insures that the cached computation of the applicable + methods for one object can be reused for other objects. +- Corollary: objects which don't match any of the relevant specializers + should ideally all use the same tag (typically nil). + This insures that this cache does not grow unnecessarily large. +- Two different generalizers G1 and G2 should not use the same tag + unless they use it for the same set of objects. IOW, if G1.tag(X1) = + G2.tag(X2) then G1.tag(X1) = G2.tag(X1) = G1.tag(X2) = G2.tag(X2). +- If G1.priority > G2.priority and G1.tag(X1) = G1.tag(X2) and this tag is + non-nil, then you have to make sure that the G2.tag(X1) = G2.tag(X2). + This is because the method-cache is only indexed with the first non-nil + tag (by order of decreasing priority).") + + +(cl-defgeneric cl-generic-combine-methods (generic methods) + "Build the effective method made of METHODS. +It should return a function that expects the same arguments as the methods, and + calls those methods in some appropriate order. +GENERIC is the generic function (mostly used for its name). +METHODS is the list of the selected methods. +The METHODS list is sorted from most specific first to most generic last. +The function can use `cl-generic-call-method' to create functions that call those +methods.") + +;; Temporary definition to let the next defmethod succeed. +(fset 'cl-generic-generalizers + (lambda (_specializer) (list cl--generic-t-generalizer))) +(fset 'cl-generic-combine-methods + #'cl--generic-standard-method-combination) + +(cl-defmethod cl-generic-generalizers (specializer) + "Support for the catch-all `t' specializer." + (if (eq specializer t) (list cl--generic-t-generalizer) + (error "Unknown specializer %S" specializer))) + +(cl-defmethod cl-generic-combine-methods (generic methods) + "Standard support for :after, :before, :around, and `:extra NAME' qualifiers." + (cl--generic-standard-method-combination generic methods)) (defconst cl--generic-nnm-sample (cl--generic-no-next-method-function t t)) (defconst cl--generic-cnm-sample (funcall (cl--generic-build-combined-method - nil (list (cl--generic-method-make () () t #'identity))))) + nil (list (cl--generic-make-method () () t #'identity))))) (defun cl--generic-isnot-nnm-p (cnm) "Return non-nil if CNM is the function that calls `cl-no-next-method'." @@ -571,24 +692,6 @@ FUN is the function that should be called when METHOD calls (setq cnm-env (cdr cnm-env))))) (error "Haven't found no-next-method-sample in cnm-sample"))) -(defun cl--generic-cache-miss (generic dispatch-arg dispatches-left tags) - (let ((types (apply #'append (mapcar cl-generic-tag-types-function tags))) - (methods '())) - (dolist (method (cl--generic-method-table generic)) - (let* ((specializer (or (nth dispatch-arg - (cl--generic-method-specializers method)) - t)) - (m (member specializer types))) - (when m - (push (cons (length m) method) methods)))) - ;; Sort the methods, most specific first. - ;; It would be tempting to sort them once and for all in the method-table - ;; rather than here, but the order might depend on the actual argument - ;; (e.g. for multiple inheritance with defclass). - (setq methods (nreverse (mapcar #'cdr (sort methods #'car-less-than-car)))) - (cl--generic-make-function (cl--generic-make (cl--generic-name generic) - dispatches-left methods)))) - ;;; Define some pre-defined generic functions, used internally. (define-error 'cl-no-method "No method for %S") @@ -598,19 +701,16 @@ FUN is the function that should be called when METHOD calls 'cl-no-method) (cl-defgeneric cl-no-next-method (generic method &rest args) - "Function called when `cl-call-next-method' finds no next method.") -(cl-defmethod cl-no-next-method (generic method &rest args) - (signal 'cl-no-next-method `(,generic ,method ,@args))) + "Function called when `cl-call-next-method' finds no next method." + (signal 'cl-no-next-method `(,(cl--generic-name generic) ,method ,@args))) (cl-defgeneric cl-no-applicable-method (generic &rest args) - "Function called when a method call finds no applicable method.") -(cl-defmethod cl-no-applicable-method (generic &rest args) - (signal 'cl-no-applicable-method `(,generic ,@args))) + "Function called when a method call finds no applicable method." + (signal 'cl-no-applicable-method `(,(cl--generic-name generic) ,@args))) (cl-defgeneric cl-no-primary-method (generic &rest args) - "Function called when a method call finds no primary method.") -(cl-defmethod cl-no-primary-method (generic &rest args) - (signal 'cl-no-primary-method `(,generic ,@args))) + "Function called when a method call finds no primary method." + (signal 'cl-no-primary-method `(,(cl--generic-name generic) ,@args))) (defun cl-call-next-method (&rest _args) "Function to call the next applicable method. @@ -705,69 +805,110 @@ Can only be used from within the lexical body of a primary or around method." (insert "'.\n"))) (insert "\n" (or (nth 2 info) "Undocumented") "\n\n"))))))) +;;; Support for (head ) specializers. + +;; For both the `eql' and the `head' specializers, the dispatch +;; is unsatisfactory. Basically, in the "common&fast case", we end up doing +;; +;; (let ((tag (gethash value ))) +;; (funcall (gethash tag ))) +;; +;; whereas we'd like to just do +;; +;; (funcall (gethash value ))) +;; +;; but the problem is that the method-cache is normally "open ended", so +;; a nil means "not computed yet" and if we bump into it, we dutifully fill the +;; corresponding entry, whereas we'd want to just fallback on some default +;; effective method (so as not to fill the cache with lots of redundant +;; entries). + +(defvar cl--generic-head-used (make-hash-table :test #'eql)) + +(defconst cl--generic-head-generalizer + (cl-generic-make-generalizer + 80 (lambda (name) `(gethash (car-safe ,name) cl--generic-head-used)) + (lambda (tag) (if (eq (car-safe tag) 'head) (list tag))))) + +(cl-defmethod cl-generic-generalizers :extra "head" (specializer) + "Support for the `(head VAL)' specializers." + ;; We have to implement `head' here using the :extra qualifier, + ;; since we can't use the `head' specializer to implement itself. + (if (not (eq (car-safe specializer) 'head)) + (cl-call-next-method) + (cl--generic-with-memoization + (gethash (cadr specializer) cl--generic-head-used) specializer) + (list cl--generic-head-generalizer))) + ;;; Support for (eql ) specializers. (defvar cl--generic-eql-used (make-hash-table :test #'eql)) -(add-function :before-until cl-generic-tagcode-function - #'cl--generic-eql-tagcode) -(defun cl--generic-eql-tagcode (type name) - (when (eq (car-safe type) 'eql) - (puthash (cadr type) type cl--generic-eql-used) - `(100 . (gethash ,name cl--generic-eql-used)))) +(defconst cl--generic-eql-generalizer + (cl-generic-make-generalizer + 100 (lambda (name) `(gethash ,name cl--generic-eql-used)) + (lambda (tag) (if (eq (car-safe tag) 'eql) (list tag))))) -(add-function :before-until cl-generic-tag-types-function - #'cl--generic-eql-tag-types) -(defun cl--generic-eql-tag-types (tag) - (if (eq (car-safe tag) 'eql) (list tag))) +(cl-defmethod cl-generic-generalizers ((specializer (head eql))) + "Support for the `(eql VAL)' specializers." + (puthash (cadr specializer) specializer cl--generic-eql-used) + (list cl--generic-eql-generalizer)) ;;; Support for cl-defstructs specializers. -(add-function :before-until cl-generic-tagcode-function - #'cl--generic-struct-tagcode) - (defun cl--generic-struct-tag (name) + ;; It's tempting to use (and (vectorp ,name) (aref ,name 0)) + ;; but that would suffer from some problems: + ;; - the vector may have size 0. + ;; - when called on an actual vector (rather than an object), we'd + ;; end up returning an arbitrary value, possibly colliding with + ;; other tagcode's values. + ;; - it can also result in returning all kinds of irrelevant + ;; values which would end up filling up the method-cache with + ;; lots of irrelevant/redundant entries. + ;; FIXME: We could speed this up by introducing a dedicated + ;; vector type at the C level, so we could do something like + ;; (and (vector-objectp ,name) (aref ,name 0)) `(and (vectorp ,name) (> (length ,name) 0) (let ((tag (aref ,name 0))) (if (eq (symbol-function tag) :quick-object-witness-check) tag)))) -(defun cl--generic-struct-tagcode (type name) - (and (symbolp type) - (get type 'cl-struct-type) - (or (eq 'vector (car (get type 'cl-struct-type))) - (error "Can't dispatch on cl-struct %S: type is %S" - type (car (get type 'cl-struct-type)))) - (or (equal '(cl-tag-slot) (car (get type 'cl-struct-slots))) - (error "Can't dispatch on cl-struct %S: no tag in slot 0" - type)) - ;; It's tempting to use (and (vectorp ,name) (aref ,name 0)) - ;; but that would suffer from some problems: - ;; - the vector may have size 0. - ;; - when called on an actual vector (rather than an object), we'd - ;; end up returning an arbitrary value, possibly colliding with - ;; other tagcode's values. - ;; - it can also result in returning all kinds of irrelevant - ;; values which would end up filling up the method-cache with - ;; lots of irrelevant/redundant entries. - ;; FIXME: We could speed this up by introducing a dedicated - ;; vector type at the C level, so we could do something like - ;; (and (vector-objectp ,name) (aref ,name 0)) - `(50 . ,(cl--generic-struct-tag name)))) - -(add-function :before-until cl-generic-tag-types-function - #'cl--generic-struct-tag-types) -(defun cl--generic-struct-tag-types (tag) - ;; FIXME: cl-defstruct doesn't make it easy for us. - (and (symbolp tag) - ;; A method call shouldn't itself mess with the match-data. - (string-match-p "\\`cl-struct-\\(.*\\)" (symbol-name tag)) - (let ((types (list (intern (substring (symbol-name tag) 10))))) - (while (get (car types) 'cl-struct-include) - (push (get (car types) 'cl-struct-include) types)) - (push 'cl-struct types) ;The "parent type" of all cl-structs. - (nreverse types)))) +(defun cl--generic-struct-specializers (tag) + (and (symbolp tag) (boundp tag) + (let ((class (symbol-value tag))) + (when (cl-typep class 'cl-structure-class) + (let ((types ()) + (classes (list class))) + ;; BFS precedence. + (while (let ((class (pop classes))) + (push (cl--class-name class) types) + (setq classes + (append classes + (cl--class-parents class))))) + (nreverse types)))))) + +(defconst cl--generic-struct-generalizer + (cl-generic-make-generalizer + 50 #'cl--generic-struct-tag + #'cl--generic-struct-specializers)) + +(cl-defmethod cl-generic-generalizers :extra "cl-struct" (type) + "Support for dispatch on cl-struct types." + (or + (when (symbolp type) + ;; Use the "cl--struct-class*" (inlinable) functions/macros rather than + ;; the "cl-struct-*" variants which aren't inlined, so that dispatch can + ;; take place without requiring cl-lib. + (let ((class (cl--find-class type))) + (and (cl-typep class 'cl-structure-class) + (or (null (cl--struct-class-type class)) + (error "Can't dispatch on cl-struct %S: type is %S" + type (cl--struct-class-type class))) + (progn (cl-assert (null (cl--struct-class-named class))) t) + (list cl--generic-struct-generalizer)))) + (cl-call-next-method))) ;;; Dispatch on "system types". @@ -789,23 +930,23 @@ Can only be used from within the lexical body of a primary or around method." (sequence) (number))) -(add-function :before-until cl-generic-tagcode-function - #'cl--generic-typeof-tagcode) -(defun cl--generic-typeof-tagcode (type name) +(defconst cl--generic-typeof-generalizer + (cl-generic-make-generalizer + ;; FIXME: We could also change `type-of' to return `null' for nil. + 10 (lambda (name) `(if ,name (type-of ,name) 'null)) + (lambda (tag) (and (symbolp tag) (assq tag cl--generic-typeof-types))))) + +(cl-defmethod cl-generic-generalizers :extra "typeof" (type) + "Support for dispatch on builtin types." ;; FIXME: Add support for other types accepted by `cl-typep' such ;; as `character', `atom', `face', `function', ... - (and (assq type cl--generic-typeof-types) - (progn - (if (memq type '(vector array sequence)) - (message "`%S' also matches CL structs and EIEIO classes" type)) - ;; FIXME: We could also change `type-of' to return `null' for nil. - `(10 . (if ,name (type-of ,name) 'null))))) - -(add-function :before-until cl-generic-tag-types-function - #'cl--generic-typeof-types) -(defun cl--generic-typeof-types (tag) - (and (symbolp tag) - (assq tag cl--generic-typeof-types))) + (or + (and (assq type cl--generic-typeof-types) + (progn + (if (memq type '(vector array sequence)) + (message "`%S' also matches CL structs and EIEIO classes" type)) + (list cl--generic-typeof-generalizer))) + (cl-call-next-method))) ;;; Just for kicks: dispatch on major-mode ;; @@ -819,7 +960,7 @@ Can only be used from within the lexical body of a primary or around method." ;; (defvar cl--generic-major-modes (make-hash-table :test #'eq)) ;; -;; (add-function :before-until cl-generic-tagcode-function +;; (add-function :before-until cl-generic-generalizer-function ;; #'cl--generic-major-mode-tagcode) ;; (defun cl--generic-major-mode-tagcode (type name) ;; (if (eq 'major-mode (car-safe type)) diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index 1bcfb6df2c..5e75406cf2 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el @@ -138,6 +138,19 @@ If non-nil, alignment is done with the first parameter :type 'boolean :group 'lisp-indent) +(defcustom lisp-indent-backquote-substitution-mode t + "How to indent substitutions in backquotes. +If `t', the default, indent substituted forms normally. +If `nil', do not apply special indentation rule to substituted +forms. If `corrected', subtract the `,' or `,@' from the form +column, indenting as if this character sequence were not present. +In any case, do not backtrack beyond a backquote substitution. + +Until Emacs 25.1, the `nil' behavior was hard-wired." + :version "25.1" + :type '(choice (const corrected) (const nil) (const t)) + :group 'lisp-indent) + (defvar lisp-indent-defun-method '(4 &lambda &body) "Defun-like indentation method. @@ -145,7 +158,7 @@ This applies when the value of the `common-lisp-indent-function' property is set to `defun'.") -(defun extended-loop-p (loop-start) +(defun lisp-extended-loop-p (loop-start) "True if an extended loop form starts at LOOP-START." (condition-case () (save-excursion @@ -170,11 +183,22 @@ the standard lisp indent package." "Compute the indentation of loop form constituents." (let* ((loop-indentation (save-excursion (goto-char (elt state 1)) - (current-column)))) + (current-column)))) + (when (and (eq lisp-indent-backquote-substitution-mode 'corrected)) + (save-excursion + (goto-char (elt state 1)) + (incf loop-indentation + (cond ((eq (char-before) ?,) -1) + ((and (eq (char-before) ?@) + (progn (backward-char) + (eq (char-before) ?,))) + -2) + (t 0))))) + (goto-char indent-point) (beginning-of-line) (list - (cond ((not (extended-loop-p (elt state 1))) + (cond ((not (lisp-extended-loop-p (elt state 1))) (+ loop-indentation lisp-simple-loop-indentation)) ((looking-at "^\\s-*\\(:?\\sw+\\|;\\)") (+ loop-indentation lisp-loop-keyword-indentation)) @@ -264,9 +288,15 @@ at `common-lisp-indent-function' and, if set, use its value instead." ;; FIXME: why do we need to special-case loop? (if (save-excursion (goto-char (elt state 1)) - (looking-at (if (derived-mode-p 'emacs-lisp-mode) - "(\\(cl-\\)?[Ll][Oo][Oo][Pp]" - "([Ll][Oo][Oo][Pp]"))) + (and (looking-at (if (derived-mode-p 'emacs-lisp-mode) + "(\\(cl-\\)?loop" + "([Ll][Oo][Oo][Pp]")) + (or lisp-indent-backquote-substitution-mode + (not + (or (and (eq (char-before) ?@) + (progn (backward-char) + (eq (char-before) ?,))) + (eq (char-before) ?,)))))) (common-lisp-loop-part-indentation indent-point state) (common-lisp-indent-function-1 indent-point state))) @@ -373,11 +403,21 @@ instead." (not (eq (char-after (- containing-sexp 2)) ?\#))) ;; No indentation for "'(...)" elements (setq calculated (1+ sexp-column))) - ((or (eq (char-after (1- containing-sexp)) ?\,) - (and (eq (char-after (1- containing-sexp)) ?\@) - (eq (char-after (- containing-sexp 2)) ?\,))) - ;; ",(...)" or ",@(...)" - (setq calculated normal-indent)) + ((when + (or (eq (char-after (1- containing-sexp)) ?\,) + (and (eq (char-after (1- containing-sexp)) ?\@) + (eq (char-after (- containing-sexp 2)) ?\,))) + ;; ",(...)" or ",@(...)" + (when (eq lisp-indent-backquote-substitution-mode + 'corrected) + (incf sexp-column -1) + (when (eq (char-after (1- containing-sexp)) ?\@) + (incf sexp-column -1))) + (cond (lisp-indent-backquote-substitution-mode + (setf tentative-calculated normal-indent) + (setq depth lisp-indent-maximum-backtracking) + nil) + (t (setq calculated normal-indent))))) ((eq (char-after (1- containing-sexp)) ?\#) ;; "#(...)" (setq calculated (1+ sexp-column))) diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 0f534181b2..10651cc29b 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -629,7 +629,6 @@ the process stops as soon as KEYS or VALUES run out. If ALIST is non-nil, the new pairs are prepended to it." (nconc (cl-mapcar 'cons keys values) alist)) - ;;; Generalized variables. ;; These used to be in cl-macs.el since all macros that use them (like setf) @@ -731,22 +730,6 @@ If ALIST is non-nil, the new pairs are prepended to it." ;;; Miscellaneous. -;;;###autoload -(progn - ;; The `assert' macro from the cl package signals - ;; `cl-assertion-failed' at runtime so always define it. - (define-error 'cl-assertion-failed (purecopy "Assertion failed")) - ;; Make sure functions defined with cl-defsubst can be inlined even in - ;; packages which do not require CL. We don't put an autoload cookie - ;; directly on that function, since those cookies only go to cl-loaddefs. - (autoload 'cl--defsubst-expand "cl-macs") - ;; Autoload, so autoload.el and font-lock can use it even when CL - ;; is not loaded. - (put 'cl-defun 'doc-string-elt 3) - (put 'cl-defmacro 'doc-string-elt 3) - (put 'cl-defsubst 'doc-string-elt 3) - (put 'cl-defstruct 'doc-string-elt 2)) - (provide 'cl-lib) (or (load "cl-loaddefs" 'noerror 'quiet) ;; When bootstrapping, cl-loaddefs hasn't been built yet! diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index eaec2c5263..f8ddc00c3b 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -220,7 +220,20 @@ The name is made by appending a number to PREFIX, default \"G\"." (defconst cl--lambda-list-keywords '(&optional &rest &key &allow-other-keys &aux &whole &body &environment)) -(defvar cl--bind-block) (defvar cl--bind-defs) (defvar cl--bind-enquote) +;; Internal hacks used in formal arg lists: +;; - &cl-quote: Added to formal-arglists to mean that any default value +;; mentioned in the formal arglist should be considered as implicitly +;; quoted rather than evaluated. This is used in `cl-defsubst' when +;; performing compiler-macro-expansion, since at that time the +;; arguments hold expressions rather than values. +;; - &cl-defs (DEF . DEFS): Gives the default value to use for missing +;; optional arguments which don't have an explicit default value. +;; DEFS is an alist mapping vars to their default default value. +;; and DEF is the default default to use for all other vars. + +(defvar cl--bind-block) ;Name of surrounding block, only use for `signal' data. +(defvar cl--bind-defs) ;(DEF . DEFS) giving the "default default" for optargs. +(defvar cl--bind-enquote) ;Non-nil if &cl-quote was in the formal arglist! (defvar cl--bind-lets) (defvar cl--bind-forms) (defun cl--transform-lambda (form bind-block) @@ -229,20 +242,22 @@ BIND-BLOCK is the name of the symbol to which the function will be bound, and which will be used for the name of the `cl-block' surrounding the function's body. FORM is of the form (ARGS . BODY)." - ;; FIXME: (lambda (a &aux b) 1) expands to (lambda (a &rest --cl-rest--) ...) - ;; where the --cl-rest-- is clearly undesired. (let* ((args (car form)) (body (cdr form)) (orig-args args) (cl--bind-block bind-block) (cl--bind-defs nil) (cl--bind-enquote nil) - (cl--bind-lets nil) (cl--bind-forms nil) - (header nil) (simple-args nil)) - (while (or (stringp (car body)) - (memq (car-safe (car body)) '(interactive declare cl-declare))) - (push (pop body) header)) + (parsed-body (macroexp-parse-body body)) + (header (car parsed-body)) (simple-args nil)) + (setq body (cdr parsed-body)) + ;; "(. X) to (&rest X)" conversion already done in cl--do-arglist, but we + ;; do it here as well, so as to be able to see if we can avoid + ;; cl--do-arglist. (setq args (if (listp args) (cl-copy-list args) (list '&rest args))) (let ((p (last args))) (if (cdr p) (setcdr p (list '&rest (cdr p))))) - (if (setq cl--bind-defs (cadr (memq '&cl-defs args))) - (setq args (delq '&cl-defs (delq cl--bind-defs args)) - cl--bind-defs (cadr cl--bind-defs))) + (let ((cl-defs (memq '&cl-defs args))) + (when cl-defs + (setq cl--bind-defs (cadr cl-defs)) + ;; Remove "&cl-defs DEFS" from args. + (setcdr cl-defs (cddr cl-defs)) + (setq args (delq '&cl-defs args)))) (if (setq cl--bind-enquote (memq '&cl-quote args)) (setq args (delq '&cl-quote args))) (if (memq '&whole args) (error "&whole not currently implemented")) @@ -250,39 +265,68 @@ FORM is of the form (ARGS . BODY)." (v (cadr p))) (if p (setq args (nconc (delq (car p) (delq v args)) `(&aux (,v macroexpand-all-environment)))))) - (while (and args (symbolp (car args)) - (not (memq (car args) '(nil &rest &body &key &aux))) - (not (and (eq (car args) '&optional) - (or cl--bind-defs (consp (cadr args)))))) - (push (pop args) simple-args)) + ;; Take away all the simple args whose parsing can be handled more + ;; efficiently by a plain old `lambda' than the manual parsing generated + ;; by `cl--do-arglist'. + (let ((optional nil)) + (while (and args (symbolp (car args)) + (not (memq (car args) '(nil &rest &body &key &aux))) + (or (not optional) + ;; Optional args whose default is nil are simple. + (null (nth 1 (assq (car args) (cdr cl--bind-defs))))) + (not (and (eq (car args) '&optional) (setq optional t) + (car cl--bind-defs)))) + (push (pop args) simple-args)) + (when optional + (if args (push '&optional args)) + ;; Don't keep a dummy trailing &optional without actual optional args. + (if (eq '&optional (car simple-args)) (pop simple-args)))) (or (eq cl--bind-block 'cl-none) (setq body (list `(cl-block ,cl--bind-block ,@body)))) - (if (null args) - (cl-list* nil (nreverse simple-args) (nconc (nreverse header) body)) - (if (memq '&optional simple-args) (push '&optional args)) - (cl--do-arglist args nil (- (length simple-args) - (if (memq '&optional simple-args) 1 0))) - (setq cl--bind-lets (nreverse cl--bind-lets)) - (cl-list* nil - (nconc (nreverse simple-args) - (list '&rest (car (pop cl--bind-lets)))) - (nconc (let ((hdr (nreverse header))) + (let* ((cl--bind-lets nil) (cl--bind-forms nil) + (rest-args + (cond + ((null args) nil) + ((eq (car args) '&aux) + (cl--do-&aux args) + (setq cl--bind-lets (nreverse cl--bind-lets)) + nil) + (t ;; `simple-args' doesn't handle all the parsing that we need, + ;; so we pass the rest to cl--do-arglist which will do + ;; "manual" parsing. + (let ((slen (length simple-args))) + (when (memq '&optional simple-args) + (cl-decf slen)) + (setq header ;; Macro expansion can take place in the middle of ;; apparently harmless computation, so it should not ;; touch the match-data. (save-match-data (require 'help-fns) (cons (help-add-fundoc-usage - (if (stringp (car hdr)) (pop hdr)) + (if (stringp (car header)) (pop header)) ;; Be careful with make-symbol and (back)quote, ;; see bug#12884. (let ((print-gensym nil) (print-quoted t)) (format "%S" (cons 'fn (cl--make-usage-args orig-args))))) - hdr))) - (list `(let* ,cl--bind-lets - ,@(nreverse cl--bind-forms) - ,@body))))))) + header))) + ;; FIXME: we'd want to choose an arg name for the &rest param + ;; and pass that as `expr' to cl--do-arglist, but that ends up + ;; generating code with a redundant let-binding, so we instead + ;; pass a dummy and then look in cl--bind-lets to find what var + ;; this was bound to. + (cl--do-arglist args :dummy slen) + (setq cl--bind-lets (nreverse cl--bind-lets)) + ;; (cl-assert (eq :dummy (nth 1 (car cl--bind-lets)))) + (list '&rest (car (pop cl--bind-lets)))))))) + `(nil + (,@(nreverse simple-args) ,@rest-args) + ,@header + ,(macroexp-let* cl--bind-lets + (macroexp-progn + `(,@(nreverse cl--bind-forms) + ,@body))))))) ;;;###autoload (defmacro cl-defun (name args &rest body) @@ -304,6 +348,27 @@ and BODY is implicitly surrounded by (cl-block NAME ...). (form `(defun ,name ,@(cdr res)))) (if (car res) `(progn ,(car res) ,form) form))) +;;;###autoload +(defmacro cl-iter-defun (name args &rest body) + "Define NAME as a generator function. +Like normal `iter-defun', except ARGLIST allows full Common Lisp conventions, +and BODY is implicitly surrounded by (cl-block NAME ...). + +\(fn NAME ARGLIST [DOCSTRING] BODY...)" + (declare (debug + ;; Same as iter-defun but use cl-lambda-list. + (&define [&or name ("setf" :name setf name)] + cl-lambda-list + cl-declarations-or-string + [&optional ("interactive" interactive)] + def-body)) + (doc-string 3) + (indent 2)) + (require 'generator) + (let* ((res (cl--transform-lambda (cons args body) name)) + (form `(iter-defun ,name ,@(cdr res)))) + (if (car res) `(progn ,(car res) ,form) form))) + ;; The lambda list for macros is different from that of normal lambdas. ;; Note that &environment is only allowed as first or last items in the ;; top level list. @@ -404,8 +469,7 @@ its argument list allows full Common Lisp conventions." (setcdr last nil) (nconc (cl--make-usage-args arglist) (cl--make-usage-var tail))) (setcdr last tail))) - ;; `orig-args' can contain &cl-defs (an internal - ;; CL thingy I don't understand), so remove it. + ;; `orig-args' can contain &cl-defs. (let ((x (memq '&cl-defs arglist))) (when x (setq arglist (delq (car x) (remq (cadr x) arglist))))) (let ((state nil)) @@ -432,6 +496,17 @@ its argument list allows full Common Lisp conventions." )))) arglist)))) +(defun cl--do-&aux (args) + (while (and (eq (car args) '&aux) (pop args)) + (while (and args (not (memq (car args) cl--lambda-list-keywords))) + (if (consp (car args)) + (if (and cl--bind-enquote (cl-cadar args)) + (cl--do-arglist (caar args) + `',(cadr (pop args))) + (cl--do-arglist (caar args) (cadr (pop args)))) + (cl--do-arglist (pop args) nil)))) + (if args (error "Malformed argument list ends with: %S" args))) + (defun cl--do-arglist (args expr &optional num) ; uses cl--bind-* (if (nlistp args) (if (or (memq args cl--lambda-list-keywords) (not (symbolp args))) @@ -441,8 +516,7 @@ its argument list allows full Common Lisp conventions." (let ((p (last args))) (if (cdr p) (setcdr p (list '&rest (cdr p))))) (let ((p (memq '&body args))) (if p (setcar p '&rest))) (if (memq '&environment args) (error "&environment used incorrectly")) - (let ((save-args args) - (restarg (memq '&rest args)) + (let ((restarg (memq '&rest args)) (safety (if (cl--compiling-file) cl--optimize-safety 3)) (keys nil) (laterarg nil) (exactarg nil) minarg) @@ -512,7 +586,12 @@ its argument list allows full Common Lisp conventions." (intern (format ":%s" name))))) (varg (if (consp (car arg)) (cl-cadar arg) (car arg))) (def (if (cdr arg) (cadr arg) - (or (car cl--bind-defs) (cadr (assq varg cl--bind-defs))))) + ;; The ordering between those two or clauses is + ;; irrelevant, since in practice only one of the two + ;; is ever non-nil (the car is only used for + ;; cl-deftype which doesn't use the cdr). + (or (car cl--bind-defs) + (cadr (assq varg cl--bind-defs))))) (look `(plist-member ,restarg ',karg))) (and def cl--bind-enquote (setq def `',def)) (if (cddr arg) @@ -549,15 +628,8 @@ its argument list allows full Common Lisp conventions." keys) (car ,var))))))) (push `(let ((,var ,restarg)) ,check) cl--bind-forms))) - (while (and (eq (car args) '&aux) (pop args)) - (while (and args (not (memq (car args) cl--lambda-list-keywords))) - (if (consp (car args)) - (if (and cl--bind-enquote (cl-cadar args)) - (cl--do-arglist (caar args) - `',(cadr (pop args))) - (cl--do-arglist (caar args) (cadr (pop args)))) - (cl--do-arglist (pop args) nil)))) - (if args (error "Malformed argument list %s" save-args))))) + (cl--do-&aux args) + nil))) (defun cl--arglist-args (args) (if (nlistp args) (list args) @@ -1680,7 +1752,7 @@ An implicit nil block is established around the loop. (declare (debug ((symbolp form &optional form) cl-declarations body)) (indent 1)) (let ((loop `(dolist ,spec ,@body))) - (if (advice-member-p #'cl--wrap-in-nil-block 'dolist) + (if (advice-member-p 'cl--wrap-in-nil-block 'dolist) loop `(cl-block nil ,loop)))) ;;;###autoload @@ -1693,7 +1765,7 @@ nil. \(fn (VAR COUNT [RESULT]) BODY...)" (declare (debug cl-dolist) (indent 1)) (let ((loop `(dotimes ,spec ,@body))) - (if (advice-member-p #'cl--wrap-in-nil-block 'dotimes) + (if (advice-member-p 'cl--wrap-in-nil-block 'dotimes) loop `(cl-block nil ,loop)))) (defvar cl--tagbody-alist nil) @@ -2362,8 +2434,80 @@ Like `cl-callf', but PLACE is the second argument of FUNC, not the first. (if (symbolp func) (cons func rargs) `(funcall #',func ,@rargs)))))))) +;;;###autoload +(defmacro cl-defsubst (name args &rest body) + "Define NAME as a function. +Like `defun', except the function is automatically declared `inline' and +the arguments are immutable. +ARGLIST allows full Common Lisp conventions, and BODY is implicitly +surrounded by (cl-block NAME ...). +The function's arguments should be treated as immutable. + +\(fn NAME ARGLIST [DOCSTRING] BODY...)" + (declare (debug cl-defun) (indent 2)) + (let* ((argns (cl--arglist-args args)) + (real-args (if (eq '&cl-defs (car args)) (cddr args) args)) + (p argns) + ;; (pbody (cons 'progn body)) + ) + (while (and p (eq (cl--expr-contains real-args (car p)) 1)) (pop p)) + `(progn + ,(if p nil ; give up if defaults refer to earlier args + `(cl-define-compiler-macro ,name + ,(if (memq '&key args) + `(&whole cl-whole &cl-quote ,@args) + (cons '&cl-quote args)) + (cl--defsubst-expand + ',argns '(cl-block ,name ,@body) + ;; We used to pass `simple' as + ;; (not (or unsafe (cl-expr-access-order pbody argns))) + ;; But this is much too simplistic since it + ;; does not pay attention to the argvs (and + ;; cl-expr-access-order itself is also too naive). + nil + ,(and (memq '&key args) 'cl-whole) nil ,@argns))) + (cl-defun ,name ,args ,@body)))) + +(defun cl--defsubst-expand (argns body simple whole _unsafe &rest argvs) + (if (and whole (not (cl--safe-expr-p (cons 'progn argvs)))) whole + (if (cl--simple-exprs-p argvs) (setq simple t)) + (let* ((substs ()) + (lets (delq nil + (cl-mapcar (lambda (argn argv) + (if (or simple (macroexp-const-p argv)) + (progn (push (cons argn argv) substs) + nil) + (list argn argv))) + argns argvs)))) + ;; FIXME: `sublis/subst' will happily substitute the symbol + ;; `argn' in places where it's not used as a reference + ;; to a variable. + ;; FIXME: `sublis/subst' will happily copy `argv' to a different + ;; scope, leading to name capture. + (setq body (cond ((null substs) body) + ((null (cdr substs)) + (cl-subst (cdar substs) (caar substs) body)) + (t (cl--sublis substs body)))) + (if lets `(let ,lets ,body) body)))) + +(defun cl--sublis (alist tree) + "Perform substitutions indicated by ALIST in TREE (non-destructively)." + (let ((x (assq tree alist))) + (cond + (x (cdr x)) + ((consp tree) + (cons (cl--sublis alist (car tree)) (cl--sublis alist (cdr tree)))) + (t tree)))) + ;;; Structures. +(defmacro cl--find-class (type) + `(get ,type 'cl--class)) + +;; Rather than hard code cl-structure-object, we indirect through this variable +;; for bootstrapping reasons. +(defvar cl--struct-default-parent nil) + ;;;###autoload (defmacro cl-defstruct (struct &rest descs) "Define a struct type. @@ -2419,6 +2563,7 @@ non-nil value, that slot cannot be set via `setf'. (tag (intern (format "cl-struct-%s" name))) (tag-symbol (intern (format "cl-struct-%s-tags" name))) (include-descs nil) + (include-name nil) (type nil) (named nil) (forms nil) @@ -2448,12 +2593,14 @@ non-nil value, that slot cannot be set via `setf'. ((eq opt :predicate) (if args (setq predicate (car args)))) ((eq opt :include) - (when include (error "Can't :include more than once")) - (setq include (car args) - include-descs (mapcar (function - (lambda (x) - (if (consp x) x (list x)))) - (cdr args)))) + ;; FIXME: Actually, we can include more than once as long as + ;; we include EIEIO classes rather than cl-structs! + (when include-name (error "Can't :include more than once")) + (setq include-name (car args)) + (setq include-descs (mapcar (function + (lambda (x) + (if (consp x) x (list x)))) + (cdr args)))) ((eq opt :print-function) (setq print-func (car args))) ((eq opt :type) @@ -2465,19 +2612,21 @@ non-nil value, that slot cannot be set via `setf'. descs))) (t (error "Slot option %s unrecognized" opt))))) + (unless (or include-name type) + (setq include-name cl--struct-default-parent)) + (when include-name (setq include (cl--struct-get-class include-name))) (if print-func (setq print-func `(progn (funcall #',print-func cl-x cl-s cl-n) t)) - (or type (and include (not (get include 'cl-struct-print))) + (or type (and include (not (cl--struct-class-print include))) (setq print-auto t print-func (and (or (not (or include type)) (null print-func)) `(progn (princ ,(format "#S(%s" name) cl-s)))))) (if include - (let ((inc-type (get include 'cl-struct-type)) - (old-descs (get include 'cl-struct-slots))) - (or inc-type (error "%s is not a struct name" include)) - (and type (not (eq (car inc-type) type)) + (let* ((inc-type (cl--struct-class-type include)) + (old-descs (cl-struct-slot-info include))) + (and type (not (eq inc-type type)) (error ":type disagrees with :include for %s" name)) (while include-descs (setcar (memq (or (assq (caar include-descs) old-descs) @@ -2486,21 +2635,15 @@ non-nil value, that slot cannot be set via `setf'. old-descs) (pop include-descs))) (setq descs (append old-descs (delq (assq 'cl-tag-slot descs) descs)) - type (car inc-type) - named (assq 'cl-tag-slot descs)) - (if (cadr inc-type) (setq tag name named t)) - (let ((incl include)) - (while incl - (push `(cl-pushnew ',tag - ,(intern (format "cl-struct-%s-tags" incl))) - forms) - (setq incl (get incl 'cl-struct-include))))) + type inc-type + named (if type (assq 'cl-tag-slot descs) 'true)) + (if (cl--struct-class-named include) (setq tag name named t))) (if type (progn (or (memq type '(vector list)) (error "Invalid :type specifier: %s" type)) (if named (setq tag name))) - (setq type 'vector named 'true))) + (setq named 'true))) (or named (setq descs (delq (assq 'cl-tag-slot descs) descs))) (when (and (null predicate) named) (setq predicate (intern (format "cl--struct-%s-p" name)))) @@ -2509,7 +2652,7 @@ non-nil value, that slot cannot be set via `setf'. (length (memq (assq 'cl-tag-slot descs) descs))))) (cond - ((eq type 'vector) + ((memq type '(nil vector)) `(and (vectorp cl-x) (>= (length cl-x) ,(length descs)) (memq (aref cl-x ,pos) ,tag-symbol))) @@ -2539,9 +2682,9 @@ non-nil value, that slot cannot be set via `setf'. (declare (side-effect-free t)) ,@(and pred-check (list `(or ,pred-check - (error "%s accessing a non-%s" - ',accessor ',name)))) - ,(if (eq type 'vector) `(aref cl-x ,pos) + (signal 'wrong-type-argument + (list ',name cl-x))))) + ,(if (memq type '(nil vector)) `(aref cl-x ,pos) (if (= pos 0) '(car cl-x) `(nth ,pos cl-x)))) forms) @@ -2596,10 +2739,10 @@ non-nil value, that slot cannot be set via `setf'. (make (cl-mapcar (function (lambda (s d) (if (memq s anames) s d))) slots defaults))) (push `(cl-defsubst ,name - (&cl-defs '(nil ,@descs) ,@args) + (&cl-defs (nil ,@descs) ,@args) ,@(if (cl--safe-expr-p `(progn ,@(mapcar #'cl-second descs))) '((declare (side-effect-free t)))) - (,type ,@make)) + (,(or type #'vector) ,@make)) forms))) (if print-auto (nconc print-func (list '(princ ")" cl-s) t))) ;; Don't bother adding to cl-custom-print-functions since it's not used @@ -2616,18 +2759,87 @@ non-nil value, that slot cannot be set via `setf'. `(progn (defvar ,tag-symbol) ,@(nreverse forms) + ;; Call cl-struct-define during compilation as well, so that + ;; a subsequent cl-defstruct in the same file can correctly include this + ;; struct as a parent. (eval-and-compile - (cl-struct-define ',name ,docstring ',include + (cl-struct-define ',name ,docstring ',include-name ',type ,(eq named t) ',descs ',tag-symbol ',tag ',print-auto)) ',name))) +;;; Add cl-struct support to pcase + +(defun cl--struct-all-parents (class) + (when (cl--struct-class-p class) + (let ((res ()) + (classes (list class))) + ;; BFS precedence. + (while (let ((class (pop classes))) + (push class res) + (setq classes + (append classes + (cl--class-parents class))))) + (nreverse res)))) + +;;;###autoload +(pcase-defmacro cl-struct (type &rest fields) + "Pcase patterns to match cl-structs. +Elements of FIELDS can be of the form (NAME UPAT) in which case the contents of +field NAME is matched against UPAT, or they can be of the form NAME which +is a shorthand for (NAME NAME)." + `(and (pred (pcase--flip cl-typep ',type)) + ,@(mapcar + (lambda (field) + (let* ((name (if (consp field) (car field) field)) + (pat (if (consp field) (cadr field) field))) + `(app ,(if (eq (cl-struct-sequence-type type) 'list) + `(nth ,(cl-struct-slot-offset type name)) + `(pcase--flip aref ,(cl-struct-slot-offset type name))) + ,pat))) + fields))) + +(defun cl--pcase-mutually-exclusive-p (orig pred1 pred2) + "Extra special cases for `cl-typep' predicates." + (let* ((x1 pred1) (x2 pred2) + (t1 + (and (eq 'pcase--flip (car-safe x1)) (setq x1 (cdr x1)) + (eq 'cl-typep (car-safe x1)) (setq x1 (cdr x1)) + (null (cdr-safe x1)) (setq x1 (car x1)) + (eq 'quote (car-safe x1)) (cadr x1))) + (t2 + (and (eq 'pcase--flip (car-safe x2)) (setq x2 (cdr x2)) + (eq 'cl-typep (car-safe x2)) (setq x2 (cdr x2)) + (null (cdr-safe x2)) (setq x2 (car x2)) + (eq 'quote (car-safe x2)) (cadr x2)))) + (or + (and (symbolp t1) (symbolp t2) + (let ((c1 (cl--find-class t1)) + (c2 (cl--find-class t2))) + (and c1 c2 + (not (or (memq c1 (cl--struct-all-parents c2)) + (memq c2 (cl--struct-all-parents c1))))))) + (let ((c1 (and (symbolp t1) (cl--find-class t1)))) + (and c1 (cl--struct-class-p c1) + (funcall orig (if (eq 'list (cl-struct-sequence-type t1)) + 'consp 'vectorp) + pred2))) + (let ((c2 (and (symbolp t2) (cl--find-class t2)))) + (and c2 (cl--struct-class-p c2) + (funcall orig pred1 + (if (eq 'list (cl-struct-sequence-type t2)) + 'consp 'vectorp)))) + (funcall orig pred1 pred2)))) +(advice-add 'pcase--mutually-exclusive-p + :around #'cl--pcase-mutually-exclusive-p) + + (defun cl-struct-sequence-type (struct-type) "Return the sequence used to build STRUCT-TYPE. STRUCT-TYPE is a symbol naming a struct type. Return 'vector or 'list, or nil if STRUCT-TYPE is not a struct type. " (declare (side-effect-free t) (pure t)) - (car (get struct-type 'cl-struct-type))) + (cl--struct-class-type (cl--struct-get-class struct-type))) (defun cl-struct-slot-info (struct-type) "Return a list of slot names of struct STRUCT-TYPE. @@ -2636,7 +2848,19 @@ slot name symbol and OPTS is a list of slot options given to `cl-defstruct'. Dummy slots that represent the struct name and slots skipped by :initial-offset may appear in the list." (declare (side-effect-free t) (pure t)) - (get struct-type 'cl-struct-slots)) + (let* ((class (cl--struct-get-class struct-type)) + (slots (cl--struct-class-slots class)) + (type (cl--struct-class-type class)) + (descs (if type () (list '(cl-tag-slot))))) + (dotimes (i (length slots)) + (let ((slot (aref slots i))) + (push `(,(cl--slot-descriptor-name slot) + ,(cl--slot-descriptor-initform slot) + ,@(if (not (eq (cl--slot-descriptor-type slot) t)) + `(:type ,(cl--slot-descriptor-type slot))) + ,@(cl--slot-descriptor-props slot)) + descs))) + (nreverse descs))) (defun cl-struct-slot-offset (struct-type slot-name) "Return the offset of slot SLOT-NAME in STRUCT-TYPE. @@ -2645,9 +2869,8 @@ the structure data type and is adjusted for any structure name and :initial-offset slots. Signal error if struct STRUCT-TYPE does not contain SLOT-NAME." (declare (side-effect-free t) (pure t)) - (or (cl-position slot-name - (cl-struct-slot-info struct-type) - :key #'car :test #'eq) + (or (gethash slot-name + (cl--class-index-table (cl--struct-get-class struct-type))) (error "struct %s has no slot %s" struct-type slot-name))) (defvar byte-compile-function-environment) @@ -2661,64 +2884,70 @@ Of course, we really can't know that for sure, so it's just a heuristic." (or (cdr (assq sym byte-compile-function-environment)) (cdr (assq sym byte-compile-macro-environment)))))) -(defun cl--make-type-test (val type) - (pcase type - ((and `(,name . ,args) (guard (get name 'cl-deftype-handler))) - (cl--make-type-test val (apply (get name 'cl-deftype-handler) - args))) - (`(,(and name (or 'integer 'float 'real 'number)) - . ,(or `(,min ,max) pcase--dontcare)) - `(and ,(cl--make-type-test val name) - ,(if (memq min '(* nil)) t - (if (consp min) `(> ,val ,(car min)) - `(>= ,val ,min))) - ,(if (memq max '(* nil)) t - (if (consp max) - `(< ,val ,(car max)) - `(<= ,val ,max))))) - (`(,(and name (or 'and 'or 'not)) . ,args) - (cons name (mapcar (lambda (x) (cl--make-type-test val x)) args))) - (`(member . ,args) - `(and (cl-member ,val ',args) t)) - (`(satisfies ,pred) `(funcall #',pred ,val)) - ((and (pred symbolp) (guard (get type 'cl-deftype-handler))) - (cl--make-type-test val (funcall (get type 'cl-deftype-handler)))) - ((and (pred symbolp) (guard (get type 'cl-deftype-satisfies))) - `(funcall #',(get type 'cl-deftype-satisfies) ,val)) - ((or 'nil 't) type) - ('null `(null ,val)) - ('atom `(atom ,val)) - ('float `(floatp ,val)) - ('real `(numberp ,val)) - ('fixnum `(integerp ,val)) - ;; FIXME: Implement `base-char' and `extended-char'. - ('character `(characterp ,val)) - ((pred symbolp) - (let* ((name (symbol-name type)) - (namep (intern (concat name "p")))) - (cond - ((cl--macroexp-fboundp namep) (list namep val)) - ((cl--macroexp-fboundp - (setq namep (intern (concat name "-p")))) - (list namep val)) - ((cl--macroexp-fboundp type) (list type val)) - (t (error "Unknown type %S" type))))) - (_ (error "Bad type spec: %s" type)))) - -(defvar cl--object) +(put 'null 'cl-deftype-satisfies #'null) +(put 'atom 'cl-deftype-satisfies #'atom) +(put 'real 'cl-deftype-satisfies #'numberp) +(put 'fixnum 'cl-deftype-satisfies #'integerp) +(put 'base-char 'cl-deftype-satisfies #'characterp) +(put 'character 'cl-deftype-satisfies #'integerp) + + ;;;###autoload -(defun cl-typep (object type) ; See compiler macro below. - "Check that OBJECT is of type TYPE. -TYPE is a Common Lisp-style type specifier." - (declare (compiler-macro cl--compiler-macro-typep)) - (let ((cl--object object)) ;; Yuck!! - (eval (cl--make-type-test 'cl--object type)))) - -(defun cl--compiler-macro-typep (form val type) - (if (macroexp-const-p type) - (macroexp-let2 macroexp-copyable-p temp val - (cl--make-type-test temp (cl--const-expr-val type))) - form)) +(define-inline cl-typep (val type) + (inline-letevals (val) + (pcase (inline-const-val type) + ((and `(,name . ,args) (guard (get name 'cl-deftype-handler))) + (inline-quote + (cl-typep ,val ',(apply (get name 'cl-deftype-handler) args)))) + (`(,(and name (or 'integer 'float 'real 'number)) + . ,(or `(,min ,max) pcase--dontcare)) + (inline-quote + (and (cl-typep ,val ',name) + ,(if (memq min '(* nil)) t + (if (consp min) + (inline-quote (> ,val ',(car min))) + (inline-quote (>= ,val ',min)))) + ,(if (memq max '(* nil)) t + (if (consp max) + (inline-quote (< ,val ',(car max))) + (inline-quote (<= ,val ',max))))))) + (`(not ,type) (inline-quote (not (cl-typep ,val ',type)))) + (`(,(and name (or 'and 'or)) . ,types) + (cond + ((null types) (inline-quote ',(eq name 'and))) + ((null (cdr types)) + (inline-quote (cl-typep ,val ',(car types)))) + (t + (let ((head (car types)) + (rest `(,name . ,(cdr types)))) + (cond + ((eq name 'and) + (inline-quote (and (cl-typep ,val ',head) + (cl-typep ,val ',rest)))) + (t + (inline-quote (or (cl-typep ,val ',head) + (cl-typep ,val ',rest))))))))) + (`(eql ,v) (inline-quote (and (eql ,val ',v) t))) + (`(member . ,args) (inline-quote (and (memql ,val ',args) t))) + (`(satisfies ,pred) (inline-quote (funcall #',pred ,val))) + ((and (pred symbolp) type (guard (get type 'cl-deftype-handler))) + (inline-quote + (cl-typep ,val ',(funcall (get type 'cl-deftype-handler))))) + ((and (pred symbolp) type (guard (get type 'cl-deftype-satisfies))) + (inline-quote (funcall #',(get type 'cl-deftype-satisfies) ,val))) + ((and (or 'nil 't) type) (inline-quote ',type)) + ((and (pred symbolp) type) + (let* ((name (symbol-name type)) + (namep (intern (concat name "p")))) + (cond + ((cl--macroexp-fboundp namep) (inline-quote (funcall #',namep ,val))) + ((cl--macroexp-fboundp + (setq namep (intern (concat name "-p")))) + (inline-quote (funcall #',namep ,val))) + ((cl--macroexp-fboundp type) (inline-quote (funcall #',type ,val))) + (t (error "Unknown type %S" type))))) + (type (error "Bad type spec: %s" type))))) + ;;;###autoload (defmacro cl-check-type (form type &optional string) @@ -2751,10 +2980,9 @@ omitted, a default message listing FORM itself is used." (cdr form)))))) `(progn (or ,form - ,(if string - `(error ,string ,@sargs ,@args) - `(signal 'cl-assertion-failed - (list ',form ,@sargs)))) + (cl--assertion-failed + ',form ,@(if (or string sargs args) + `(,string (list ,@sargs) (list ,@args))))) nil)))) ;;; Compiler macros. @@ -2827,70 +3055,6 @@ macro that returns its `&whole' argument." (if cl-found (setcdr cl-found t))) `(throw ,cl-tag ,cl-value)) -;;;###autoload -(defmacro cl-defsubst (name args &rest body) - "Define NAME as a function. -Like `defun', except the function is automatically declared `inline' and -the arguments are immutable. -ARGLIST allows full Common Lisp conventions, and BODY is implicitly -surrounded by (cl-block NAME ...). -The function's arguments should be treated as immutable. - -\(fn NAME ARGLIST [DOCSTRING] BODY...)" - (declare (debug cl-defun) (indent 2)) - (let* ((argns (cl--arglist-args args)) - (p argns) - ;; (pbody (cons 'progn body)) - ) - (while (and p (eq (cl--expr-contains args (car p)) 1)) (pop p)) - `(progn - ,(if p nil ; give up if defaults refer to earlier args - `(cl-define-compiler-macro ,name - ,(if (memq '&key args) - `(&whole cl-whole &cl-quote ,@args) - (cons '&cl-quote args)) - (cl--defsubst-expand - ',argns '(cl-block ,name ,@body) - ;; We used to pass `simple' as - ;; (not (or unsafe (cl-expr-access-order pbody argns))) - ;; But this is much too simplistic since it - ;; does not pay attention to the argvs (and - ;; cl-expr-access-order itself is also too naive). - nil - ,(and (memq '&key args) 'cl-whole) nil ,@argns))) - (cl-defun ,name ,args ,@body)))) - -(defun cl--defsubst-expand (argns body simple whole _unsafe &rest argvs) - (if (and whole (not (cl--safe-expr-p (cons 'progn argvs)))) whole - (if (cl--simple-exprs-p argvs) (setq simple t)) - (let* ((substs ()) - (lets (delq nil - (cl-mapcar (lambda (argn argv) - (if (or simple (macroexp-const-p argv)) - (progn (push (cons argn argv) substs) - nil) - (list argn argv))) - argns argvs)))) - ;; FIXME: `sublis/subst' will happily substitute the symbol - ;; `argn' in places where it's not used as a reference - ;; to a variable. - ;; FIXME: `sublis/subst' will happily copy `argv' to a different - ;; scope, leading to name capture. - (setq body (cond ((null substs) body) - ((null (cdr substs)) - (cl-subst (cdar substs) (caar substs) body)) - (t (cl--sublis substs body)))) - (if lets `(let ,lets ,body) body)))) - -(defun cl--sublis (alist tree) - "Perform substitutions indicated by ALIST in TREE (non-destructively)." - (let ((x (assq tree alist))) - (cond - (x (cdr x)) - ((consp tree) - (cons (cl--sublis alist (car tree)) (cl--sublis alist (cdr tree)))) - (t tree)))) - ;; Compile-time optimizations for some functions defined in this package. (defun cl--compiler-macro-member (form a list &rest keys) @@ -2960,25 +3124,28 @@ The type name can then be used in `cl-typecase', `cl-check-type', etc." (declare (debug cl-defmacro) (doc-string 3) (indent 2)) `(cl-eval-when (compile load eval) (put ',name 'cl-deftype-handler - (cl-function (lambda (&cl-defs '('*) ,@arglist) ,@body))))) + (cl-function (lambda (&cl-defs ('*) ,@arglist) ,@body))))) + +(cl-deftype extended-char () `(and character (not base-char))) ;;; Additional functions that we can now define because we've defined ;;; `cl-defsubst' and `cl-typep'. -(cl-defsubst cl-struct-slot-value (struct-type slot-name inst) - ;; The use of `cl-defsubst' here gives us both a compiler-macro - ;; and a gv-expander "for free". +(define-inline cl-struct-slot-value (struct-type slot-name inst) "Return the value of slot SLOT-NAME in INST of STRUCT-TYPE. STRUCT and SLOT-NAME are symbols. INST is a structure instance." (declare (side-effect-free t)) - (unless (cl-typep inst struct-type) - (signal 'wrong-type-argument (list struct-type inst))) - ;; We could use `elt', but since the byte compiler will resolve the - ;; branch below at compile time, it's more efficient to use the - ;; type-specific accessor. - (if (eq (cl-struct-sequence-type struct-type) 'vector) - (aref inst (cl-struct-slot-offset struct-type slot-name)) - (nth (cl-struct-slot-offset struct-type slot-name) inst))) + (inline-letevals (struct-type slot-name inst) + (inline-quote + (progn + (unless (cl-typep ,inst ,struct-type) + (signal 'wrong-type-argument (list ,struct-type ,inst))) + ;; We could use `elt', but since the byte compiler will resolve the + ;; branch below at compile time, it's more efficient to use the + ;; type-specific accessor. + (if (eq (cl-struct-sequence-type ,struct-type) 'list) + (nth (cl-struct-slot-offset ,struct-type ,slot-name) ,inst) + (aref ,inst (cl-struct-slot-offset ,struct-type ,slot-name))))))) (run-hooks 'cl-macs-load-hook) diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el index c9867b412a..ed0639b63a 100644 --- a/lisp/emacs-lisp/cl-preloaded.el +++ b/lisp/emacs-lisp/cl-preloaded.el @@ -21,28 +21,239 @@ ;;; Commentary: -;; The expectation is that structs defined with cl-defstruct do not -;; need cl-lib at run-time, but we'd like to hide the details of the -;; cl-struct metadata behind the cl-struct-define function, so we put -;; it in this pre-loaded file. +;; The cl-defstruct macro is full of circularities, since it uses the +;; cl-structure-class type (and its accessors) which is defined with itself, +;; and it setups a default parent (cl-structure-object) which is also defined +;; with cl-defstruct, and to make things more interesting, the class of +;; cl-structure-object is of course an object of type cl-structure-class while +;; cl-structure-class's parent is cl-structure-object. +;; Furthermore, the code generated by cl-defstruct generally assumes that the +;; parent will be loaded when the child is loaded. But at the same time, the +;; expectation is that structs defined with cl-defstruct do not need cl-lib at +;; run-time, which means that the `cl-structure-object' parent can't be in +;; cl-lib but should be preloaded. So here's this preloaded circular setup. ;;; Code: +(eval-when-compile (require 'cl-lib)) +(eval-when-compile (require 'cl-macs)) ;For cl--struct-class. + +;; The `assert' macro from the cl package signals +;; `cl-assertion-failed' at runtime so always define it. +(define-error 'cl-assertion-failed (purecopy "Assertion failed")) + +(defun cl--assertion-failed (form &optional string sargs args) + (if debug-on-error + (debug `(cl-assertion-failed ,form ,string ,@sargs)) + (if string + (apply #'error string (append sargs args)) + (signal 'cl-assertion-failed `(,form ,@sargs))))) + +;; When we load this (compiled) file during pre-loading, the cl--struct-class +;; code below will need to access the `cl-struct' info, since it's considered +;; already as its parent (because `cl-struct' was defined while the file was +;; compiled). So let's temporarily setup a fake. +(defvar cl-struct-cl-structure-object-tags nil) +(unless (cl--find-class 'cl-structure-object) + (setf (cl--find-class 'cl-structure-object) 'dummy)) + +(fset 'cl--make-slot-desc + ;; To break circularity, we pre-define the slot constructor by hand. + ;; It's redefined a bit further down as part of the cl-defstruct of + ;; cl--slot-descriptor. + ;; BEWARE: Obviously, it's important to keep the two in sync! + (lambda (name &optional initform type props) + (vector 'cl-struct-cl-slot-descriptor + name initform type props))) + +(defun cl--struct-get-class (name) + (or (if (not (symbolp name)) name) + (cl--find-class name) + (if (not (get name 'cl-struct-type)) + ;; FIXME: Add a conversion for `eieio--class' so we can + ;; create a cl-defstruct that inherits from an eieio class? + (error "%S is not a struct name" name) + ;; Backward compatibility with a defstruct compiled with a version + ;; cl-defstruct from Emacs<25. Convert to new format. + (let ((tag (intern (format "cl-struct-%s" name))) + (type-and-named (get name 'cl-struct-type)) + (descs (get name 'cl-struct-slots))) + (cl-struct-define name nil (get name 'cl-struct-include) + (unless (and (eq (car type-and-named) 'vector) + (null (cadr type-and-named)) + (assq 'cl-tag-slot descs)) + (car type-and-named)) + (cadr type-and-named) + descs + (intern (format "cl-struct-%s-tags" name)) + tag + (get name 'cl-struct-print)) + (cl--find-class name))))) + +(defun cl--plist-remove (plist member) + (cond + ((null plist) nil) + ((null member) plist) + ((eq plist member) (cddr plist)) + (t `(,(car plist) ,(cadr plist) ,@(cl--plist-remove (cddr plist) member))))) + +(defun cl--struct-register-child (parent tag) + ;; Can't use (cl-typep parent 'cl-structure-class) at this stage + ;; because `cl-structure-class' is defined later. + (while (vectorp parent) + (add-to-list (cl--struct-class-children-sym parent) tag) + ;; Only register ourselves as a child of the leftmost parent since structs + ;; can only only have one parent. + (setq parent (car (cl--struct-class-parents parent))))) + +;;;###autoload (defun cl-struct-define (name docstring parent type named slots children-sym - tag print-auto) + tag print) + (cl-assert (or type (not named))) (if (boundp children-sym) (add-to-list children-sym tag) (set children-sym (list tag))) - ;; If the cl-generic support, we need to be able to check - ;; if a vector is a cl-struct object, without knowing its particular type. - ;; So we use the (otherwise) unused function slots of the tag symbol - ;; to put a special witness value, to make the check easy and reliable. - (unless named (fset tag :quick-object-witness-check)) - (put name 'cl-struct-slots slots) - (put name 'cl-struct-type (list type named)) - (if parent (put name 'cl-struct-include parent)) - (if print-auto (put name 'cl-struct-print print-auto)) - (if docstring (put name 'structure-documentation docstring))) + (and (null type) (eq (caar slots) 'cl-tag-slot) + ;; Hide the tag slot from "standard" (i.e. non-`type'd) structs. + (setq slots (cdr slots))) + (let* ((parent-class (when parent (cl--struct-get-class parent))) + (n (length slots)) + (index-table (make-hash-table :test 'eq :size n)) + (vslots (let ((v (make-vector n nil)) + (i 0) + (offset (if type 0 1))) + (dolist (slot slots) + (let* ((props (cddr slot)) + (typep (plist-member props :type)) + (type (if typep (cadr typep) t))) + (aset v i (cl--make-slot-desc + (car slot) (nth 1 slot) + type (cl--plist-remove props typep)))) + (puthash (car slot) (+ i offset) index-table) + (cl-incf i)) + v)) + (class (cl--struct-new-class + name docstring + (unless (symbolp parent-class) (list parent-class)) + type named vslots index-table children-sym tag print))) + (unless (symbolp parent-class) + (let ((pslots (cl--struct-class-slots parent-class))) + (or (>= n (length pslots)) + (let ((ok t)) + (dotimes (i (length pslots)) + (unless (eq (cl--slot-descriptor-name (aref pslots i)) + (cl--slot-descriptor-name (aref vslots i))) + (setq ok nil))) + ok) + (error "Included struct %S has changed since compilation of %S" + parent name)))) + (cl--struct-register-child parent-class tag) + (unless (eq named t) + (eval `(defconst ,tag ',class) t) + ;; In the cl-generic support, we need to be able to check + ;; if a vector is a cl-struct object, without knowing its particular type. + ;; So we use the (otherwise) unused function slots of the tag symbol + ;; to put a special witness value, to make the check easy and reliable. + (fset tag :quick-object-witness-check)) + (setf (cl--find-class name) class))) + +(cl-defstruct (cl-structure-class + (:conc-name cl--struct-class-) + (:predicate cl--struct-class-p) + (:constructor nil) + (:constructor cl--struct-new-class + (name docstring parents type named slots index-table + children-sym tag print)) + (:copier nil)) + "The type of CL structs descriptors." + ;; The first few fields here are actually inherited from cl--class, but we + ;; have to define this one before, to break the circularity, so we manually + ;; list the fields here and later "backpatch" cl--class as the parent. + ;; BEWARE: Obviously, it's indispensable to keep these two structs in sync! + (name nil :type symbol) ;The type name. + (docstring nil :type string) + (parents nil :type (list-of cl--class)) ;The included struct. + (slots nil :type (vector cl--slot-descriptor)) + (index-table nil :type hash-table) + (tag nil :type symbol) ;Placed in cl-tag-slot. Holds the struct-class object. + (type nil :type (memq (vector list))) + (named nil :type bool) + (print nil :type bool) + (children-sym nil :type symbol) ;This sym's value holds the tags of children. + ) + +(cl-defstruct (cl-structure-object + (:predicate cl-struct-p) + (:constructor nil) + (:copier nil)) + "The root parent of all \"normal\" CL structs") + +(setq cl--struct-default-parent 'cl-structure-object) + +(cl-defstruct (cl-slot-descriptor + (:conc-name cl--slot-descriptor-) + (:constructor nil) + (:constructor cl--make-slot-descriptor + (name &optional initform type props)) + (:copier cl--copy-slot-descriptor)) + ;; FIXME: This is actually not used yet, for circularity reasons! + "Descriptor of structure slot." + name ;Attribute name (symbol). + initform + type + ;; Extra properties, kept in an alist, can include: + ;; :documentation, :protection, :custom, :label, :group, :printer. + (props nil :type alist)) + +(cl-defstruct (cl--class + (:constructor nil) + (:copier nil)) + "Type of descriptors for any kind of structure-like data." + ;; Intended to be shared between defstruct and defclass. + (name nil :type symbol) ;The type name. + (docstring nil :type string) + ;; For structs there can only be one parent, but when EIEIO classes inherit + ;; from cl--class, we'll need this to hold a list. + (parents nil :type (list-of cl--class)) + (slots nil :type (vector cl-slot-descriptor)) + (index-table nil :type hash-table)) + +(cl-assert + (let ((sc-slots (cl--struct-class-slots (cl--find-class 'cl-structure-class))) + (c-slots (cl--struct-class-slots (cl--find-class 'cl--class))) + (eq t)) + (dotimes (i (length c-slots)) + (let ((sc-slot (aref sc-slots i)) + (c-slot (aref c-slots i))) + (unless (eq (cl--slot-descriptor-name sc-slot) + (cl--slot-descriptor-name c-slot)) + (setq eq nil)))) + eq)) + +;; Close the recursion between cl-structure-object and cl-structure-class. +(setf (cl--struct-class-parents (cl--find-class 'cl-structure-class)) + (list (cl--find-class 'cl--class))) +(cl--struct-register-child + (cl--find-class 'cl--class) + (cl--struct-class-tag (cl--find-class 'cl-structure-class))) + +(cl-assert (cl--find-class 'cl-structure-class)) +(cl-assert (cl--find-class 'cl-structure-object)) +(cl-assert (cl-struct-p (cl--find-class 'cl-structure-class))) +(cl-assert (cl-struct-p (cl--find-class 'cl-structure-object))) +(cl-assert (cl--class-p (cl--find-class 'cl-structure-class))) +(cl-assert (cl--class-p (cl--find-class 'cl-structure-object))) + +;; Make sure functions defined with cl-defsubst can be inlined even in +;; packages which do not require CL. We don't put an autoload cookie +;; directly on that function, since those cookies only go to cl-loaddefs. +(autoload 'cl--defsubst-expand "cl-macs") +;; Autoload, so autoload.el and font-lock can use it even when CL +;; is not loaded. +(put 'cl-defun 'doc-string-elt 3) +(put 'cl-defmacro 'doc-string-elt 3) +(put 'cl-defsubst 'doc-string-elt 3) +(put 'cl-defstruct 'doc-string-elt 2) (provide 'cl-preloaded) ;;; cl-preloaded.el ends here diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index dc0e666836..ce5c7863c3 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -106,10 +106,10 @@ This is to optimize `debugger-make-xrefs'.") "Non-nil if we expect to get back in the debugger soon.") (defvar inhibit-debug-on-entry nil - "Non-nil means that debug-on-entry is disabled.") + "Non-nil means that `debug-on-entry' is disabled.") (defvar debugger-jumping-flag nil - "Non-nil means that debug-on-entry is disabled. + "Non-nil means that `debug-on-entry' is disabled. This variable is used by `debugger-jump', `debugger-step-through', and `debugger-reenable' to temporarily disable debug-on-entry.") @@ -165,7 +165,6 @@ first will be printed into the backtrace buffer." ;; Don't let these magic variables affect the debugger itself. (let ((last-command nil) this-command track-mouse (inhibit-trace t) - (inhibit-debug-on-entry t) unread-command-events unread-post-input-method-events last-input-event last-command-event last-nonmenu-event @@ -193,8 +192,10 @@ first will be printed into the backtrace buffer." debugger-buffer `((display-buffer-reuse-window display-buffer-in-previous-window) - . (,(when debugger-previous-window - `(previous-window . ,debugger-previous-window))))) + . (,(when (and (window-live-p debugger-previous-window) + (frame-visible-p + (window-frame debugger-previous-window))) + `(previous-window . ,debugger-previous-window))))) (setq debugger-window (selected-window)) (if (eq debugger-previous-window debugger-window) (when debugger-jumping-flag @@ -535,11 +536,7 @@ Applies to the frame whose line point is on in the backtrace." (defmacro debugger-env-macro (&rest body) "Run BODY in original environment." (declare (indent 0)) - `(save-excursion - (if (null (buffer-live-p debugger-old-buffer)) - ;; old buffer deleted - (setq debugger-old-buffer (current-buffer))) - (set-buffer debugger-old-buffer) + `(progn (set-match-data debugger-outer-match-data) (prog1 (progn ,@body) @@ -767,7 +764,8 @@ A call to this function is inserted by `debug-on-entry' to cause functions to break on entry." (if (or inhibit-debug-on-entry debugger-jumping-flag) nil - (funcall debugger 'debug))) + (let ((inhibit-debug-on-entry t)) + (funcall debugger 'debug)))) ;;;###autoload (defun debug-on-entry (function) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index f7e8619948..bd95a6018f 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -114,9 +114,12 @@ Optional KEYMAP is the default keymap bound to the mode keymap. BODY contains code to execute each time the mode is enabled or disabled. It is executed after toggling the mode, and before running MODE-hook. Before the actual body code, you can write keyword arguments, i.e. - alternating keywords and values. These following special keywords - are supported (other keywords are passed to `defcustom' if the minor - mode is global): + alternating keywords and values. If you provide BODY, then you must + provide (even if just nil) INIT-VALUE, LIGHTER, and KEYMAP, or provide + at least one keyword argument, or both; otherwise, BODY would be + misinterpreted as the first omitted argument. The following special + keywords are supported (other keywords are passed to `defcustom' if + the minor mode is global): :group GROUP Custom group name to use in all generated `defcustom' forms. Defaults to MODE without the possible trailing \"-mode\". @@ -159,7 +162,8 @@ For example, you could write ;; Allow skipping the first three args. (cond ((keywordp init-value) - (setq body `(,init-value ,lighter ,keymap ,@body) + (setq body (if keymap `(,init-value ,lighter ,keymap ,@body) + `(,init-value ,lighter)) init-value nil lighter nil keymap nil)) ((keywordp lighter) (setq body `(,lighter ,keymap ,@body) lighter nil keymap nil)) @@ -280,14 +284,23 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. (if (called-interactively-p 'any) (progn ,(if (and globalp (symbolp mode)) + ;; Unnecessary but harmless if mode set buffer-locally `(customize-mark-as-set ',mode)) ;; Avoid overwriting a message shown by the body, ;; but do overwrite previous messages. (unless (and (current-message) (not (equal ,last-message (current-message)))) - (message ,(format "%s %%sabled" pretty-name) - (if ,mode "en" "dis"))))) + (let ((local + ,(if globalp + (if (symbolp mode) + `(if (local-variable-p ',mode) + " in current buffer" + "") + "") + " in current buffer"))) + (message ,(format "%s %%sabled%%s" pretty-name) + (if ,mode "en" "dis") local))))) ,@(when after-hook `(,after-hook))) (force-mode-line-update) ;; Return the new setting. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 7faa101299..aa7cdf9633 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -2358,6 +2358,12 @@ MSG is printed after `::::} '." (defalias 'edebug-mark-marker 'mark-marker) (defun edebug--display (value offset-index arg-mode) + ;; edebug--display-1 is too big, we should split it. This function + ;; here was just introduced to avoid making edebug--display-1 + ;; yet a bit deeper. + (save-excursion (edebug--display-1 value offset-index arg-mode))) + +(defun edebug--display-1 (value offset-index arg-mode) (unless (marker-position edebug-def-mark) ;; The buffer holding the source has been killed. ;; Let's at least show a backtrace so the user can figure out @@ -2440,18 +2446,6 @@ MSG is printed after `::::} '." edebug-function) )) - (setcdr edebug-window-data - (edebug-adjust-window (cdr edebug-window-data))) - - ;; Test if there is input, not including keyboard macros. - (if (input-pending-p) - (progn - (setq edebug-execution-mode 'step - edebug-stop t) - (edebug-stop) - ;; (discard-input) ; is this unfriendly?? - )) - ;; Make sure we bind those in the right buffer (bug#16410). (let ((overlay-arrow-position overlay-arrow-position) (overlay-arrow-string overlay-arrow-string)) @@ -2504,14 +2498,18 @@ MSG is printed after `::::} '." ((eq edebug-execution-mode 'Trace-fast) (sit-for 0))) ; Force update and continue. + (when (input-pending-p) + (setq edebug-stop t) + (setq edebug-execution-mode 'step) ; for `edebug-overlay-arrow' + (edebug-stop)) + + (edebug-overlay-arrow) + (unwind-protect (if (or edebug-stop (memq edebug-execution-mode '(step next)) (eq arg-mode 'error)) - (progn - ;; (setq edebug-execution-mode 'step) - ;; (edebug-overlay-arrow) ; This doesn't always show up. - (edebug--recursive-edit arg-mode))) ; <--- Recursive edit + (edebug--recursive-edit arg-mode)) ; <--- Recursive edit ;; Reset the edebug-window-data to whatever it is now. (let ((window (if (eq (window-buffer) edebug-buffer) @@ -2671,12 +2669,6 @@ MSG is printed after `::::} '." (defining-kbd-macro (if edebug-continue-kbd-macro defining-kbd-macro)) - ;; Disable command hooks. This is essential when - ;; a hook function is instrumented - to avoid infinite loop. - ;; This may be more than we need, however. - (pre-command-hook nil) - (post-command-hook nil) - ;; others?? ) @@ -2705,8 +2697,9 @@ MSG is printed after `::::} '." (if (buffer-name edebug-buffer) ; if it still exists (progn (set-buffer edebug-buffer) - (if (memq edebug-execution-mode '(go Go-nonstop)) - (edebug-overlay-arrow)) + (when (memq edebug-execution-mode '(go Go-nonstop)) + (edebug-overlay-arrow) + (sit-for 0)) (edebug-mode -1)) ;; gotta have a buffer to let its buffer local variables be set (get-buffer-create " bogus edebug buffer")) @@ -2716,31 +2709,6 @@ MSG is printed after `::::} '." ;;; Display related functions -(defun edebug-adjust-window (old-start) - ;; If pos is not visible, adjust current window to fit following context. - ;; (message "window: %s old-start: %s window-start: %s pos: %s" - ;; (selected-window) old-start (window-start) (point)) (sit-for 5) - (if (not (pos-visible-in-window-p)) - (progn - ;; First try old-start - (if old-start - (set-window-start (selected-window) old-start)) - (if (not (pos-visible-in-window-p)) - (progn - ;; (message "resetting window start") (sit-for 2) - (set-window-start - (selected-window) - (save-excursion - (forward-line - (if (< (point) (window-start)) -1 ; one line before if in back - (- (/ (window-height) 2)) ; center the line moving forward - )) - (beginning-of-line) - (point))))))) - (window-start)) - - - (defconst edebug-arrow-alist '((Continue-fast . "=") (Trace-fast . "-") @@ -2749,7 +2717,7 @@ MSG is printed after `::::} '." (step . "=>") (next . "=>") (go . "<>") - (Go-nonstop . "..") ; not used + (Go-nonstop . "..") ) "Association list of arrows for each edebug mode.") @@ -3317,6 +3285,9 @@ Return the result of the last expression." ;; Restore outside context. (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w) (unwind-protect + ;; FIXME: This restoring of edebug-outside-buffer and + ;; edebug-outside-point is redundant now that backtrace-eval does it + ;; for us. (with-current-buffer edebug-outside-buffer ; of edebug-buffer (goto-char edebug-outside-point) (if (marker-buffer (edebug-mark-marker)) diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index 46585ee76c..2e280365a7 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -140,7 +140,7 @@ Multiple calls to `make-instance' will return this object.")) A singleton is a class which will only ever have one instance." :abstract t) -(cl-defmethod eieio-constructor ((class (subclass eieio-singleton)) &rest _slots) +(cl-defmethod make-instance ((class (subclass eieio-singleton)) &rest _slots) "Constructor for singleton CLASS. NAME and SLOTS initialize the new object. This constructor guarantees that no matter how many you request, @@ -254,25 +254,28 @@ malicious code. Note: This function recurses when a slot of :type of some object is identified, and needing more object creation." - (let ((objclass (nth 0 inputlist)) - ;; (objname (nth 1 inputlist)) - (slots (nthcdr 2 inputlist)) - (createslots nil)) - - ;; If OBJCLASS is an eieio autoload object, then we need to load it. - (eieio-class-un-autoload objclass) + (let* ((objclass (nth 0 inputlist)) + ;; (objname (nth 1 inputlist)) + (slots (nthcdr 2 inputlist)) + (createslots nil) + (class + (progn + ;; If OBJCLASS is an eieio autoload object, then we need to + ;; load it. + (eieio-class-un-autoload objclass) + (eieio--class-object objclass)))) (while slots - (let ((name (car slots)) + (let ((initarg (car slots)) (value (car (cdr slots)))) ;; Make sure that the value proposed for SLOT is valid. ;; In addition, strip out quotes, list functions, and update ;; object constructors as needed. (setq value (eieio-persistent-validate/fix-slot-value - (eieio--class-v objclass) name value)) + class (eieio--initarg-to-attribute class initarg) value)) - (push name createslots) + (push initarg createslots) (push value createslots) ) @@ -290,17 +293,12 @@ constructor functions are considered valid. Second, any text properties will be stripped from strings." (cond ((consp proposed-value) ;; Lists with something in them need special treatment. - (let ((slot-idx (eieio--slot-name-index class - nil slot)) - (type nil) - (classtype nil)) - (setq slot-idx (- slot-idx - (eval-when-compile eieio--object-num-slots))) - (setq type (aref (eieio--class-public-type class) - slot-idx)) - - (setq classtype (eieio-persistent-slot-type-is-class-p - type)) + (let* ((slot-idx (- (eieio--slot-name-index class slot) + (eval-when-compile + (length (cl-struct-slot-info 'eieio--object))))) + (type (cl--slot-descriptor-type (aref (eieio--class-slots class) + slot-idx))) + (classtype (eieio-persistent-slot-type-is-class-p type))) (cond ((eq (car proposed-value) 'quote) (car (cdr proposed-value))) @@ -501,6 +499,15 @@ All slots are unbound, except those initialized with PARAMS." (concat nm "-1"))))) nobj)) +(cl-defmethod make-instance ((class (subclass eieio-named)) &rest args) + (if (not (stringp (car args))) + (cl-call-next-method) + (funcall (if eieio-backward-compatibility #'ignore #'message) + "Obsolete: name passed without :object-name to %S constructor" + class) + (apply #'cl-call-next-method class :object-name args))) + + (provide 'eieio-base) ;;; eieio-base.el ends here diff --git a/lisp/emacs-lisp/eieio-compat.el b/lisp/emacs-lisp/eieio-compat.el index fcca99d79d..0283704e03 100644 --- a/lisp/emacs-lisp/eieio-compat.el +++ b/lisp/emacs-lisp/eieio-compat.el @@ -124,30 +124,41 @@ Summary: (defgeneric ,method ,args) (eieio--defmethod ',method ',key ',class #',code)))) -(add-function :before-until cl-generic-tagcode-function - #'eieio--generic-static-tagcode) -(defun eieio--generic-static-tagcode (type name) - (and (eq 'eieio--static (car-safe type)) - `(40 . (cond - ((symbolp ,name) (eieio--class-v ,name)) - ((vectorp ,name) (aref ,name 0)))))) - -(add-function :around cl-generic-tag-types-function - #'eieio--generic-static-tag-types) -(defun eieio--generic-static-tag-types (orig-fun tag) - (cond - ((or (eieio--class-p tag) - (and (symbolp tag) (boundp tag) (eieio--class-p (symbol-value tag)))) - (let ((superclasses (funcall orig-fun tag)) - (types ())) - ;; Interleave: (subclass ) (eieio--static ) ) .. +(defun eieio--generic-static-symbol-specializers (tag) + (cl-assert (or (null tag) (eieio--class-p tag))) + (when (eieio--class-p tag) + (let ((superclasses (eieio--generic-subclass-specializers tag)) + (specializers ())) (dolist (superclass superclasses) - (push superclass types) - (push `(eieio--static - ,(if (consp superclass) (cadr superclass) superclass)) - types)) - (nreverse types))) - (t (funcall orig-fun tag)))) + (push superclass specializers) + (push `(eieio--static ,(cadr superclass)) specializers)) + (nreverse specializers)))) + +(defconst eieio--generic-static-symbol-generalizer + (cl-generic-make-generalizer + ;; Give it a slightly higher priority than `subclass' so that the + ;; interleaved list comes before subclass's non-interleaved list. + 61 (lambda (name) `(and (symbolp ,name) (eieio--class-v ,name))) + #'eieio--generic-static-symbol-specializers)) +(defconst eieio--generic-static-object-generalizer + (cl-generic-make-generalizer + ;; Give it a slightly higher priority than `class' so that the + ;; interleaved list comes before the class's non-interleaved list. + 51 #'cl--generic-struct-tag + (lambda (tag) + (and (symbolp tag) (boundp tag) (setq tag (symbol-value tag)) + (eieio--class-p tag) + (let ((superclasses (eieio--class-precedence-list tag)) + (specializers ())) + (dolist (superclass superclasses) + (setq superclass (eieio--class-name superclass)) + (push superclass specializers) + (push `(eieio--static ,superclass) specializers)) + (nreverse specializers)))))) + +(cl-defmethod cl-generic-generalizers ((_specializer (head eieio--static))) + (list eieio--generic-static-symbol-generalizer + eieio--generic-static-object-generalizer)) ;;;###autoload (defun eieio--defgeneric-init-form (method doc-string) @@ -188,11 +199,10 @@ Summary: (args (help-function-arglist code 'preserve-names)) (doc-only (if docstring (let ((split (help-split-fundoc docstring nil))) - (if split (cdr split) docstring)))) - (new-docstring (help-add-fundoc-usage doc-only - (cons 'cl-cnm args)))) - ;; FIXME: ¡Add new-docstring to those closures! + (if split (cdr split) docstring))))) (lambda (cnm &rest args) + (:documentation + (help-add-fundoc-usage doc-only (cons 'cl-cnm args))) (cl-letf (((symbol-function 'call-next-method) cnm) ((symbol-function 'next-method-p) (lambda () (cl--generic-isnot-nnm-p cnm)))) diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index 77d8c01388..6fd9c14088 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el @@ -85,9 +85,10 @@ Currently under control of this var: ;; Arrange for field access not to bother checking if the access is indeed ;; made to an eieio--class object. (cl-declaim (optimize (safety 0))) + (cl-defstruct (eieio--class (:constructor nil) - (:constructor eieio--class-make (symbol &aux (tag 'defclass))) + (:constructor eieio--class-make (name &aux (tag 'defclass))) (:type vector) (:copier nil)) ;; We use an untagged cl-struct, with our own hand-made tag as first field @@ -96,30 +97,16 @@ Currently under control of this var: ;; predicate for us), but that breaks compatibility with .elc files compiled ;; against older versions of EIEIO. tag - symbol ;; symbol (self-referencing) - parent children - symbol-hashtable ;; hashtable permitting fast access to variable position indexes - ;; @todo - ;; the word "public" here is leftovers from the very first version. - ;; Get rid of it! - public-a ;; class attribute index - public-d ;; class attribute defaults index - public-doc ;; class documentation strings for attributes - public-type ;; class type for a slot - public-custom ;; class custom type for a slot - public-custom-label ;; class custom group for a slot - public-custom-group ;; class custom group for a slot - public-printer ;; printer for a slot - protection ;; protection for a slot + ;; Fields we could inherit from cl--class (if we used a tagged cl-struct): + (name nil :type symbol) ;The type name. + (docstring nil :type string) + (parents nil :type (or eieio--class (list-of eieio--class))) + (slots nil :type (vector cl-slot-descriptor)) + (index-table nil :type hash-table) + ;; Fields specific to EIEIO classes: + children initarg-tuples ;; initarg tuples list - class-allocation-a ;; class allocated attributes - class-allocation-doc ;; class allocated documentation - class-allocation-type ;; class allocated value type - class-allocation-custom ;; class allocated custom descriptor - class-allocation-custom-label ;; class allocated custom descriptor - class-allocation-custom-group ;; class allocated custom group - class-allocation-printer ;; class allocated printer for a slot - class-allocation-protection ;; class allocated protection list + (class-slots nil :type eieio--slot) class-allocation-values ;; class allocated value vector default-object-cache ;; what a newly created object would look like. ; This will speed up instantiation time as @@ -142,18 +129,13 @@ Currently under control of this var: ;; object/struct in its `symbol-value' slot. class-tag) -(eval-and-compile +(eval-when-compile (defconst eieio--object-num-slots - (length (get 'eieio--object 'cl-struct-slots)))) + (length (cl-struct-slot-info 'eieio--object)))) -(defsubst eieio--object-class-object (obj) +(defsubst eieio--object-class (obj) (symbol-value (eieio--object-class-tag obj))) -(defsubst eieio--object-class-name (obj) - ;; FIXME: Most uses of this function should be changed to use - ;; eieio--object-class-object instead! - (eieio--class-symbol (eieio--object-class-object obj))) - ;;; Important macros used internally in eieio. @@ -181,15 +163,15 @@ Currently under control of this var: CLASS is a symbol." ;FIXME: Is it a vector or a symbol? (and (symbolp class) (eieio--class-p (eieio--class-v class)))) +(defun eieio--class-print-name (class) + "Return a printed representation of CLASS." + (format "#" (eieio-class-name class))) + (defun eieio-class-name (class) "Return a Lisp like symbol name for CLASS." - ;; FIXME: What's a "Lisp like symbol name"? - ;; FIXME: CLOS returns a symbol, but the code returns a string. - (if (eieio--class-p class) (setq class (eieio--class-symbol class))) - (cl-check-type class class) - ;; I think this is supposed to return a symbol, but to me CLASS is a symbol, - ;; and I wanted a string. Arg! - (format "#" (symbol-name class))) + (setq class (eieio--class-object class)) + (cl-check-type class eieio--class) + (eieio--class-name class)) (define-obsolete-function-alias 'class-name #'eieio-class-name "24.4") (defalias 'eieio--class-constructor #'identity @@ -288,16 +270,17 @@ It creates an autoload function for CNAME's constructor." (defun eieio-make-class-predicate (class) (lambda (obj) - ;; (:docstring (format "Test OBJ to see if it's an object of type %S." - ;; class)) + (:documentation + (format "Return non-nil if OBJ is an object of type `%S'.\n\n(fn OBJ)" + class)) (and (eieio-object-p obj) (same-class-p obj class)))) (defun eieio-make-child-predicate (class) (lambda (obj) - ;; (:docstring (format - ;; "Test OBJ to see if it's an object is a child of type %S." - ;; class)) + (:documentation + (format "Return non-nil if OBJ is an object of type `%S' or a subclass. +\n(fn OBJ)" class)) (and (eieio-object-p obj) (object-of-class-p obj class)))) @@ -312,12 +295,11 @@ See `defclass' for more information." (run-hooks 'eieio-hook) (setq eieio-hook nil) - (let* ((pname superclasses) - (oldc (let ((c (eieio--class-v cname))) (if (eieio--class-p c) c))) + (let* ((oldc (let ((c (eieio--class-v cname))) (if (eieio--class-p c) c))) (newc (if (and oldc (not (eieio--class-default-object-cache oldc))) ;; The oldc class is a stub setup by eieio-defclass-autoload. ;; Reuse it instead of creating a new one, so that existing - ;; references are still valid. + ;; references stay valid. oldc (eieio--class-make cname))) (groups nil) ;; list of groups id'd from slots @@ -338,9 +320,9 @@ See `defclass' for more information." (setf (eieio--class-children newc) children) (remhash cname eieio-defclass-autoload-map)))) - (if pname + (if superclasses (progn - (dolist (p pname) + (dolist (p superclasses) (if (not (and p (symbolp p))) (error "Invalid parent class %S" p) (let ((c (eieio--class-v p))) @@ -354,10 +336,10 @@ See `defclass' for more information." (mapc (lambda (g) (cl-pushnew g groups :test #'equal)) (eieio--class-option c :custom-groups)) ;; Save parent in child. - (push c (eieio--class-parent newc)))))) + (push c (eieio--class-parents newc)))))) ;; Reverse the list of our parents so that they are prioritized in ;; the same order as specified in the code. - (cl-callf nreverse (eieio--class-parent newc))) + (cl-callf nreverse (eieio--class-parents newc))) ;; If there is nothing to loop over, then inherit from the ;; default superclass. (unless (eq cname 'eieio-default-superclass) @@ -366,7 +348,7 @@ See `defclass' for more information." ;; save new child in parent (cl-pushnew cname (eieio--class-children eieio-default-superclass)) ;; save parent in child - (setf (eieio--class-parent newc) (list eieio-default-superclass)))) + (setf (eieio--class-parents newc) (list eieio-default-superclass)))) ;; turn this into a usable self-pointing symbol; FIXME: Why? (when eieio-backward-compatibility @@ -396,7 +378,7 @@ See `defclass' for more information." ;; Before adding new slots, let's add all the methods and classes ;; in from the parent class. - (eieio-copy-parents-into-subclass newc superclasses) + (eieio-copy-parents-into-subclass newc) ;; Store the new class vector definition into the symbol. We need to ;; do this first so that we can call defmethod for the accessor. @@ -442,68 +424,70 @@ See `defclass' for more information." (make-obsolete-variable initarg (format "use '%s instead" initarg) "25.1")))) - ;; The customgroup should be a list of symbols - (cond ((null customg) + ;; The customgroup should be a list of symbols. + (cond ((and (null customg) custom) (setq customg '(default))) ((not (listp customg)) (setq customg (list customg)))) - ;; The customgroup better be a symbol, or list of symbols. - (mapc (lambda (cg) - (if (not (symbolp cg)) - (signal 'invalid-slot-type (list :group cg)))) - customg) + ;; The customgroup better be a list of symbols. + (dolist (cg customg) + (unless (symbolp cg) + (signal 'invalid-slot-type (list :group cg)))) ;; First up, add this slot into our new class. - (eieio--add-new-slot newc name init docstr type custom label customg printer - prot initarg alloc 'defaultoverride skip-nil) + (eieio--add-new-slot + newc (cl--make-slot-descriptor + name init type + `(,@(if docstr `((:documentation . ,docstr))) + ,@(if custom `((:custom . ,custom))) + ,@(if label `((:label . ,label))) + ,@(if customg `((:group . ,customg))) + ,@(if printer `((:printer . ,printer))) + ,@(if prot `((:protection . ,prot))))) + initarg alloc 'defaultoverride skip-nil) ;; We need to id the group, and store them in a group list attribute. (dolist (cg customg) - (cl-pushnew cg groups :test 'equal)) + (cl-pushnew cg groups :test #'equal)) )) ;; Now that everything has been loaded up, all our lists are backwards! - ;; Fix that up now. - (cl-callf nreverse (eieio--class-public-a newc)) - (cl-callf nreverse (eieio--class-public-d newc)) - (cl-callf nreverse (eieio--class-public-doc newc)) - (cl-callf (lambda (types) (apply #'vector (nreverse types))) - (eieio--class-public-type newc)) - (cl-callf nreverse (eieio--class-public-custom newc)) - (cl-callf nreverse (eieio--class-public-custom-label newc)) - (cl-callf nreverse (eieio--class-public-custom-group newc)) - (cl-callf nreverse (eieio--class-public-printer newc)) - (cl-callf nreverse (eieio--class-protection newc)) + ;; Fix that up now and then them into vectors. + (cl-callf (lambda (slots) (apply #'vector (nreverse slots))) + (eieio--class-slots newc)) (cl-callf nreverse (eieio--class-initarg-tuples newc)) ;; The storage for class-class-allocation-type needs to be turned into ;; a vector now. - (cl-callf (lambda (cat) (apply #'vector cat)) - (eieio--class-class-allocation-type newc)) - - ;; Also, take class allocated values, and vectorize them for speed. - (cl-callf (lambda (cavs) (apply #'vector cavs)) - (eieio--class-class-allocation-values newc)) + (cl-callf (lambda (slots) (apply #'vector slots)) + (eieio--class-class-slots newc)) + + ;; Also, setup the class allocated values. + (let* ((slots (eieio--class-class-slots newc)) + (n (length slots)) + (v (make-vector n nil))) + (dotimes (i n) + (setf (aref v i) (eieio-default-eval-maybe + (cl--slot-descriptor-initform (aref slots i))))) + (setf (eieio--class-class-allocation-values newc) v)) ;; Attach slot symbols into a hashtable, and store the index of ;; this slot as the value this table. - (let* ((cnt 0) - (pubsyms (eieio--class-public-a newc)) - (prots (eieio--class-protection newc)) + (let* ((slots (eieio--class-slots newc)) + ;; (cslots (eieio--class-class-slots newc)) (oa (make-hash-table :test #'eq))) - (while pubsyms - (let ((newsym (list cnt))) - (setf (gethash (car pubsyms) oa) newsym) - (setq cnt (1+ cnt)) - (if (car prots) (setcdr newsym (car prots)))) - (setq pubsyms (cdr pubsyms) - prots (cdr prots))) - (setf (eieio--class-symbol-hashtable newc) oa)) + ;; (dotimes (cnt (length cslots)) + ;; (setf (gethash (cl--slot-descriptor-name (aref cslots cnt)) oa) (- -1 cnt))) + (dotimes (cnt (length slots)) + (setf (gethash (cl--slot-descriptor-name (aref slots cnt)) oa) cnt)) + (setf (eieio--class-index-table newc) oa)) ;; Set up a specialized doc string. ;; Use stored value since it is calculated in a non-trivial way - (put cname 'variable-documentation - (eieio--class-option-assoc options :documentation)) + (let ((docstring (eieio--class-option-assoc options :documentation))) + (setf (eieio--class-docstring newc) docstring) + (when eieio-backward-compatibility + (put cname 'variable-documentation docstring))) ;; Save the file location where this class is defined. (add-to-list 'current-load-list `(eieio-defclass . ,cname)) @@ -520,10 +504,10 @@ See `defclass' for more information." ;; if this is a superclass, clear out parent (which was set to the ;; default superclass eieio-default-superclass) - (if clearparent (setf (eieio--class-parent newc) nil)) + (if clearparent (setf (eieio--class-parents newc) nil)) ;; Create the cached default object. - (let ((cache (make-vector (+ (length (eieio--class-public-a newc)) + (let ((cache (make-vector (+ (length (eieio--class-slots newc)) (eval-when-compile eieio--object-num-slots)) nil)) ;; We don't strictly speaking need to use a symbol, but the old @@ -550,303 +534,156 @@ See `defclass' for more information." "Whether the default value VAL should be evaluated for use." (and (consp val) (symbolp (car val)) (fboundp (car val)))) -(defun eieio--perform-slot-validation-for-default (slot spec value skipnil) - "For SLOT, signal if SPEC does not match VALUE. -If SKIPNIL is non-nil, then if VALUE is nil return t instead." - (if (not (or (eieio-eval-default-p value) ;FIXME: Why? - eieio-skip-typecheck - (and skipnil (null value)) - (eieio--perform-slot-validation spec value))) - (signal 'invalid-slot-type (list slot spec value)))) - -(defun eieio--add-new-slot (newc a d doc type cust label custg print prot init alloc +(defun eieio--perform-slot-validation-for-default (slot skipnil) + "For SLOT, signal if its type does not match its default value. +If SKIPNIL is non-nil, then if default value is nil return t instead." + (let ((value (cl--slot-descriptor-initform slot)) + (spec (cl--slot-descriptor-type slot))) + (if (not (or (eieio-eval-default-p value) ;FIXME: Why? + eieio-skip-typecheck + (and skipnil (null value)) + (eieio--perform-slot-validation spec value))) + (signal 'invalid-slot-type (list (cl--slot-descriptor-name slot) spec value))))) + +(defun eieio--slot-override (old new skipnil) + (cl-assert (eq (cl--slot-descriptor-name old) (cl--slot-descriptor-name new))) + ;; There is a match, and we must override the old value. + (let* ((a (cl--slot-descriptor-name old)) + (tp (cl--slot-descriptor-type old)) + (d (cl--slot-descriptor-initform new)) + (type (cl--slot-descriptor-type new)) + (oprops (cl--slot-descriptor-props old)) + (nprops (cl--slot-descriptor-props new)) + (custg (alist-get :group nprops))) + ;; If type is passed in, is it the same? + (if (not (eq type t)) + (if (not (equal type tp)) + (error + "Child slot type `%s' does not match inherited type `%s' for `%s'" + type tp a)) + (setf (cl--slot-descriptor-type new) tp)) + ;; If we have a repeat, only update the initarg... + (unless (eq d eieio-unbound) + (eieio--perform-slot-validation-for-default new skipnil) + (setf (cl--slot-descriptor-initform old) d)) + + ;; PLN Tue Jun 26 11:57:06 2007 : The protection is + ;; checked and SHOULD match the superclass + ;; protection. Otherwise an error is thrown. However + ;; I wonder if a more flexible schedule might be + ;; implemented. + ;; + ;; EML - We used to have (if prot... here, + ;; but a prot of 'nil means public. + ;; + (let ((super-prot (alist-get :protection oprops)) + (prot (alist-get :protection nprops))) + (if (not (eq prot super-prot)) + (error "Child slot protection `%s' does not match inherited protection `%s' for `%s'" + prot super-prot a))) + ;; End original PLN + + ;; PLN Tue Jun 26 11:57:06 2007 : + ;; Do a non redundant combination of ancient custom + ;; groups and new ones. + (when custg + (let* ((list1 (alist-get :group oprops))) + (dolist (elt custg) + (unless (memq elt list1) + (push elt list1))) + (setf (alist-get :group (cl--slot-descriptor-props old)) list1))) + ;; End PLN + + ;; PLN Mon Jun 25 22:44:34 2007 : If a new cust is + ;; set, simply replaces the old one. + (dolist (prop '(:custom :label :documentation :printer)) + (when (alist-get prop (cl--slot-descriptor-props new)) + (setf (alist-get prop (cl--slot-descriptor-props old)) + (alist-get prop (cl--slot-descriptor-props new)))) + + ) )) + +(defun eieio--add-new-slot (newc slot init alloc &optional defaultoverride skipnil) - "Add into NEWC attribute A. -If A already exists in NEWC, then do nothing. If it doesn't exist, -then also add in D (default), DOC, TYPE, CUST, LABEL, CUSTG, PRINT, PROT, and INIT arg. + "Add into NEWC attribute SLOT. +If a slot of that name already exists in NEWC, then do nothing. If it doesn't exist, +INIT is the initarg, if any. Argument ALLOC specifies if the slot is allocated per instance, or per class. If optional DEFAULTOVERRIDE is non-nil, then if A exists in NEWC, we must override its value for a default. Optional argument SKIPNIL indicates if type checking should be skipped if default value is nil." ;; Make sure we duplicate those items that are sequences. + (let* ((a (cl--slot-descriptor-name slot)) + (d (cl--slot-descriptor-initform slot)) + (old (car (cl-member a (eieio--class-slots newc) + :key #'cl--slot-descriptor-name))) + (cold (car (cl-member a (eieio--class-class-slots newc) + :key #'cl--slot-descriptor-name)))) (condition-case nil (if (sequencep d) (setq d (copy-sequence d))) - ;; This copy can fail on a cons cell with a non-cons in the cdr. Let's skip it if it doesn't work. + ;; This copy can fail on a cons cell with a non-cons in the cdr. Let's + ;; skip it if it doesn't work. (error nil)) - (if (sequencep type) (setq type (copy-sequence type))) - (if (sequencep cust) (setq cust (copy-sequence cust))) - (if (sequencep custg) (setq custg (copy-sequence custg))) + ;; (if (sequencep type) (setq type (copy-sequence type))) + ;; (if (sequencep cust) (setq cust (copy-sequence cust))) + ;; (if (sequencep custg) (setq custg (copy-sequence custg))) ;; To prevent override information w/out specification of storage, ;; we need to do this little hack. - (if (member a (eieio--class-class-allocation-a newc)) (setq alloc :class)) + (if cold (setq alloc :class)) - (if (or (not alloc) (and (symbolp alloc) (eq alloc :instance))) + (if (memq alloc '(nil :instance)) ;; In this case, we modify the INSTANCE version of a given slot. - (progn - - ;; Only add this element if it is so-far unique - (if (not (member a (eieio--class-public-a newc))) - (progn - (eieio--perform-slot-validation-for-default a type d skipnil) - (push a (eieio--class-public-a newc)) - (push d (eieio--class-public-d newc)) - (push doc (eieio--class-public-doc newc)) - (push type (eieio--class-public-type newc)) - (push cust (eieio--class-public-custom newc)) - (push label (eieio--class-public-custom-label newc)) - (push custg (eieio--class-public-custom-group newc)) - (push print (eieio--class-public-printer newc)) - (push prot (eieio--class-protection newc)) - (setf (eieio--class-initarg-tuples newc) (cons (cons init a) (eieio--class-initarg-tuples newc))) - ) - ;; When defaultoverride is true, we are usually adding new local - ;; attributes which must override the default value of any slot - ;; passed in by one of the parent classes. - (when defaultoverride - ;; There is a match, and we must override the old value. - (let* ((ca (eieio--class-public-a newc)) - (np (member a ca)) - (num (- (length ca) (length np))) - (dp (if np (nthcdr num (eieio--class-public-d newc)) - nil)) - (tp (if np (nth num (eieio--class-public-type newc)))) - ) - (if (not np) - (error "EIEIO internal error overriding default value for %s" - a) - ;; If type is passed in, is it the same? - (if (not (eq type t)) - (if (not (equal type tp)) - (error - "Child slot type `%s' does not match inherited type `%s' for `%s'" - type tp a))) - ;; If we have a repeat, only update the initarg... - (unless (eq d eieio-unbound) - (eieio--perform-slot-validation-for-default a tp d skipnil) - (setcar dp d)) - ;; If we have a new initarg, check for it. - (when init - (let* ((inits (eieio--class-initarg-tuples newc)) - (inita (rassq a inits))) - ;; Replace the CAR of the associate INITA. - ;;(message "Initarg: %S replace %s" inita init) - (setcar inita init) - )) - - ;; PLN Tue Jun 26 11:57:06 2007 : The protection is - ;; checked and SHOULD match the superclass - ;; protection. Otherwise an error is thrown. However - ;; I wonder if a more flexible schedule might be - ;; implemented. - ;; - ;; EML - We used to have (if prot... here, - ;; but a prot of 'nil means public. - ;; - (let ((super-prot (nth num (eieio--class-protection newc))) - ) - (if (not (eq prot super-prot)) - (error "Child slot protection `%s' does not match inherited protection `%s' for `%s'" - prot super-prot a))) - ;; End original PLN - - ;; PLN Tue Jun 26 11:57:06 2007 : - ;; Do a non redundant combination of ancient custom - ;; groups and new ones. - (when custg - (let* ((groups - (nthcdr num (eieio--class-public-custom-group newc))) - (list1 (car groups)) - (list2 (if (listp custg) custg (list custg)))) - (if (< (length list1) (length list2)) - (setq list1 (prog1 list2 (setq list2 list1)))) - (dolist (elt list2) - (unless (memq elt list1) - (push elt list1))) - (setcar groups list1))) - ;; End PLN - - ;; PLN Mon Jun 25 22:44:34 2007 : If a new cust is - ;; set, simply replaces the old one. - (when cust - ;; (message "Custom type redefined to %s" cust) - (setcar (nthcdr num (eieio--class-public-custom newc)) cust)) - - ;; If a new label is specified, it simply replaces - ;; the old one. - (when label - ;; (message "Custom label redefined to %s" label) - (setcar (nthcdr num (eieio--class-public-custom-label newc)) label)) - ;; End PLN - - ;; PLN Sat Jun 30 17:24:42 2007 : when a new - ;; doc is specified, simply replaces the old one. - (when doc - ;;(message "Documentation redefined to %s" doc) - (setcar (nthcdr num (eieio--class-public-doc newc)) - doc)) - ;; End PLN - - ;; If a new printer is specified, it simply replaces - ;; the old one. - (when print - ;; (message "printer redefined to %s" print) - (setcar (nthcdr num (eieio--class-public-printer newc)) print)) - - ))) - )) + ;; Only add this element if it is so-far unique + (if (not old) + (progn + (eieio--perform-slot-validation-for-default slot skipnil) + (push slot (eieio--class-slots newc)) + ) + ;; When defaultoverride is true, we are usually adding new local + ;; attributes which must override the default value of any slot + ;; passed in by one of the parent classes. + (when defaultoverride + (eieio--slot-override old slot skipnil))) + (when init + (cl-pushnew (cons init a) (eieio--class-initarg-tuples newc) + :test #'equal))) ;; CLASS ALLOCATED SLOTS - (let ((value (eieio-default-eval-maybe d))) - (if (not (member a (eieio--class-class-allocation-a newc))) - (progn - (eieio--perform-slot-validation-for-default a type value skipnil) - ;; Here we have found a :class version of a slot. This - ;; requires a very different approach. - (push a (eieio--class-class-allocation-a newc)) - (push doc (eieio--class-class-allocation-doc newc)) - (push type (eieio--class-class-allocation-type newc)) - (push cust (eieio--class-class-allocation-custom newc)) - (push label (eieio--class-class-allocation-custom-label newc)) - (push custg (eieio--class-class-allocation-custom-group newc)) - (push prot (eieio--class-class-allocation-protection newc)) - ;; Default value is stored in the 'values section, since new objects - ;; can't initialize from this element. - (push value (eieio--class-class-allocation-values newc))) - (when defaultoverride - ;; There is a match, and we must override the old value. - (let* ((ca (eieio--class-class-allocation-a newc)) - (np (member a ca)) - (num (- (length ca) (length np))) - (dp (if np - (nthcdr num - (eieio--class-class-allocation-values newc)) - nil)) - (tp (if np (nth num (eieio--class-class-allocation-type newc)) - nil))) - (if (not np) - (error "EIEIO internal error overriding default value for %s" - a) - ;; If type is passed in, is it the same? - (if (not (eq type t)) - (if (not (equal type tp)) - (error - "Child slot type `%s' does not match inherited type `%s' for `%s'" - type tp a))) - ;; EML - Note: the only reason to override a class bound slot - ;; is to change the default, so allow unbound in. - - ;; If we have a repeat, only update the value... - (eieio--perform-slot-validation-for-default a tp value skipnil) - (setcar dp value)) - - ;; PLN Tue Jun 26 11:57:06 2007 : The protection is - ;; checked and SHOULD match the superclass - ;; protection. Otherwise an error is thrown. However - ;; I wonder if a more flexible schedule might be - ;; implemented. - (let ((super-prot - (car (nthcdr num (eieio--class-class-allocation-protection newc))))) - (if (not (eq prot super-prot)) - (error "Child slot protection `%s' does not match inherited protection `%s' for `%s'" - prot super-prot a))) - ;; Do a non redundant combination of ancient custom groups - ;; and new ones. - (when custg - (let* ((groups - (nthcdr num (eieio--class-class-allocation-custom-group newc))) - (list1 (car groups)) - (list2 (if (listp custg) custg (list custg)))) - (if (< (length list1) (length list2)) - (setq list1 (prog1 list2 (setq list2 list1)))) - (dolist (elt list2) - (unless (memq elt list1) - (push elt list1))) - (setcar groups list1))) - - ;; PLN Sat Jun 30 17:24:42 2007 : when a new - ;; doc is specified, simply replaces the old one. - (when doc - ;;(message "Documentation redefined to %s" doc) - (setcar (nthcdr num (eieio--class-class-allocation-doc newc)) - doc)) - ;; End PLN - - ;; If a new printer is specified, it simply replaces - ;; the old one. - (when print - ;; (message "printer redefined to %s" print) - (setcar (nthcdr num (eieio--class-class-allocation-printer newc)) print)) - - )) - )) - )) - -(defun eieio-copy-parents-into-subclass (newc _parents) + (if (not cold) + (progn + (eieio--perform-slot-validation-for-default slot skipnil) + ;; Here we have found a :class version of a slot. This + ;; requires a very different approach. + (push slot (eieio--class-class-slots newc))) + (when defaultoverride + ;; There is a match, and we must override the old value. + (eieio--slot-override cold slot skipnil)))))) + +(defun eieio-copy-parents-into-subclass (newc) "Copy into NEWC the slots of PARENTS. Follow the rules of not overwriting early parents when applying to the new child class." (let ((sn (eieio--class-option-assoc (eieio--class-options newc) :allow-nil-initform))) - (dolist (pcv (eieio--class-parent newc)) + (dolist (pcv (eieio--class-parents newc)) ;; First, duplicate all the slots of the parent. - (let ((pa (eieio--class-public-a pcv)) - (pd (eieio--class-public-d pcv)) - (pdoc (eieio--class-public-doc pcv)) - (ptype (eieio--class-public-type pcv)) - (pcust (eieio--class-public-custom pcv)) - (plabel (eieio--class-public-custom-label pcv)) - (pcustg (eieio--class-public-custom-group pcv)) - (printer (eieio--class-public-printer pcv)) - (pprot (eieio--class-protection pcv)) - (pinit (eieio--class-initarg-tuples pcv)) - (i 0)) - (while pa - (eieio--add-new-slot newc - (car pa) (car pd) (car pdoc) (aref ptype i) - (car pcust) (car plabel) (car pcustg) - (car printer) - (car pprot) (car-safe (car pinit)) nil nil sn) + (let ((pslots (eieio--class-slots pcv)) + (pinit (eieio--class-initarg-tuples pcv))) + (dotimes (i (length pslots)) + (eieio--add-new-slot newc (cl--copy-slot-descriptor (aref pslots i)) + (car-safe (car pinit)) nil nil sn) ;; Increment each value. - (setq pa (cdr pa) - pd (cdr pd) - pdoc (cdr pdoc) - i (1+ i) - pcust (cdr pcust) - plabel (cdr plabel) - pcustg (cdr pcustg) - printer (cdr printer) - pprot (cdr pprot) - pinit (cdr pinit)) + (setq pinit (cdr pinit)) )) ;; while/let ;; Now duplicate all the class alloc slots. - (let ((pa (eieio--class-class-allocation-a pcv)) - (pdoc (eieio--class-class-allocation-doc pcv)) - (ptype (eieio--class-class-allocation-type pcv)) - (pcust (eieio--class-class-allocation-custom pcv)) - (plabel (eieio--class-class-allocation-custom-label pcv)) - (pcustg (eieio--class-class-allocation-custom-group pcv)) - (printer (eieio--class-class-allocation-printer pcv)) - (pprot (eieio--class-class-allocation-protection pcv)) - (pval (eieio--class-class-allocation-values pcv)) - (i 0)) - (while pa - (eieio--add-new-slot newc - (car pa) (aref pval i) (car pdoc) (aref ptype i) - (car pcust) (car plabel) (car pcustg) - (car printer) - (car pprot) nil :class sn) - ;; Increment each value. - (setq pa (cdr pa) - pdoc (cdr pdoc) - pcust (cdr pcust) - plabel (cdr plabel) - pcustg (cdr pcustg) - printer (cdr printer) - pprot (cdr pprot) - i (1+ i)) + (let ((pcslots (eieio--class-class-slots pcv))) + (dotimes (i (length pcslots)) + (eieio--add-new-slot newc (cl--copy-slot-descriptor + (aref pcslots i)) + nil :class sn) ))))) @@ -871,10 +708,11 @@ an error." nil ;; Trim off object IDX junk added in for the object index. (setq slot-idx (- slot-idx (eval-when-compile eieio--object-num-slots))) - (let ((st (aref (eieio--class-public-type class) slot-idx))) + (let ((st (cl--slot-descriptor-type (aref (eieio--class-slots class) + slot-idx)))) (if (not (eieio--perform-slot-validation st value)) (signal 'invalid-slot-type - (list (eieio--class-symbol class) slot st value)))))) + (list (eieio--class-name class) slot st value)))))) (defun eieio--validate-class-slot-value (class slot-idx value slot) "Make sure that for CLASS referencing SLOT-IDX, VALUE is valid. @@ -883,11 +721,11 @@ SLOT is the slot that is being checked, and is only used when throwing an error." (if eieio-skip-typecheck nil - (let ((st (aref (eieio--class-class-allocation-type class) - slot-idx))) + (let ((st (cl--slot-descriptor-type (aref (eieio--class-class-slots class) + slot-idx)))) (if (not (eieio--perform-slot-validation st value)) (signal 'invalid-slot-type - (list (eieio--class-symbol class) slot st value)))))) + (list (eieio--class-name class) slot st value)))))) (defun eieio-barf-if-slot-unbound (value instance slotname fn) "Throw a signal if VALUE is a representation of an UNBOUND slot. @@ -895,7 +733,7 @@ INSTANCE is the object being referenced. SLOTNAME is the offending slot. If the slot is ok, return VALUE. Argument FN is the function calling this verifier." (if (and (eq value eieio-unbound) (not eieio-skip-typecheck)) - (slot-unbound instance (eieio--object-class-name instance) slotname fn) + (slot-unbound instance (eieio--object-class instance) slotname fn) value)) @@ -910,8 +748,8 @@ Argument FN is the function calling this verifier." (let ((c (eieio--class-v obj))) (if (eieio--class-p c) (eieio-class-un-autoload obj)) c)) - (t (eieio--object-class-object obj)))) - (c (eieio--slot-name-index class obj slot))) + (t (eieio--object-class obj)))) + (c (eieio--slot-name-index class slot))) (if (not c) ;; It might be missing because it is a :class allocated slot. ;; Let's check that info out. @@ -934,8 +772,8 @@ Fills in OBJ's SLOT with its default value." (cl-check-type obj (or eieio-object class)) (cl-check-type slot symbol) (let* ((cl (cond ((symbolp obj) (eieio--class-v obj)) - (t (eieio--object-class-object obj)))) - (c (eieio--slot-name-index cl obj slot))) + (t (eieio--object-class obj)))) + (c (eieio--slot-name-index cl slot))) (if (not c) ;; It might be missing because it is a :class allocated slot. ;; Let's check that info out. @@ -948,10 +786,11 @@ Fills in OBJ's SLOT with its default value." ;;(signal 'invalid-slot-name (list (class-name cl) slot)) ) (eieio-barf-if-slot-unbound - (let ((val (nth (- c (eval-when-compile eieio--object-num-slots)) - (eieio--class-public-d cl)))) + (let ((val (cl--slot-descriptor-initform + (aref (eieio--class-slots cl) + (- c (eval-when-compile eieio--object-num-slots)))))) (eieio-default-eval-maybe val)) - obj (eieio--class-symbol cl) 'oref-default)))) + obj (eieio--class-name cl) 'oref-default)))) (defun eieio-default-eval-maybe (val) "Check VAL, and return what `oref-default' would provide." @@ -972,8 +811,8 @@ Fills in OBJ's SLOT with its default value." Fills in OBJ's SLOT with VALUE." (cl-check-type obj eieio-object) (cl-check-type slot symbol) - (let* ((class (eieio--object-class-object obj)) - (c (eieio--slot-name-index class obj slot))) + (let* ((class (eieio--object-class obj)) + (c (eieio--slot-name-index class slot))) (if (not c) ;; It might be missing because it is a :class allocated slot. ;; Let's check that info out. @@ -997,7 +836,7 @@ Fills in the default value in CLASS' in SLOT with VALUE." (setq class (eieio--class-object class)) (cl-check-type class eieio--class) (cl-check-type slot symbol) - (let* ((c (eieio--slot-name-index class nil slot))) + (let* ((c (eieio--slot-name-index class slot))) (if (not c) ;; It might be missing because it is a :class allocated slot. ;; Let's check that info out. @@ -1007,11 +846,24 @@ Fills in the default value in CLASS' in SLOT with VALUE." (eieio--validate-class-slot-value class c value slot) (aset (eieio--class-class-allocation-values class) c value)) - (signal 'invalid-slot-name (list (eieio--class-symbol class) slot))) + (signal 'invalid-slot-name (list (eieio--class-name class) slot))) + ;; `oset-default' on an instance-allocated slot is allowed by EIEIO but + ;; not by CLOS and is mildly inconsistent with the :initform thingy, so + ;; it'd be nice to get of it. This said, it is/was used at one place by + ;; gnus/registry.el, so it might be used elsewhere as well, so let's + ;; keep it for now. + ;; FIXME: Generate a compile-time warning for it! + ;; (error "Can't `oset-default' an instance-allocated slot: %S of %S" + ;; slot class) (eieio--validate-slot-value class c value slot) ;; Set this into the storage for defaults. - (setcar (nthcdr (- c (eval-when-compile eieio--object-num-slots)) - (eieio--class-public-d class)) + (if (eieio-eval-default-p value) + (error "Can't set default to a sexp that gets evaluated again")) + (setf (cl--slot-descriptor-initform + ;; FIXME: Apparently we set it both in `slots' and in + ;; `object-cache', which seems redundant. + (aref (eieio--class-slots class) + (- c (eval-when-compile eieio--object-num-slots)))) value) ;; Take the value, and put it into our cache object. (eieio-oset (eieio--class-default-object-cache class) @@ -1021,21 +873,22 @@ Fills in the default value in CLASS' in SLOT with VALUE." ;;; EIEIO internal search functions ;; -(defun eieio--slot-name-index (class obj slot) - "In CLASS for OBJ find the index of the named SLOT. -The slot is a symbol which is installed in CLASS by the `defclass' -call. OBJ can be nil, but if it is an object, and the slot in question -is protected, access will be allowed if OBJ is a child of the currently -scoped class. +(defun eieio--slot-name-index (class slot) + "In CLASS find the index of the named SLOT. +The slot is a symbol which is installed in CLASS by the `defclass' call. If SLOT is the value created with :initarg instead, reverse-lookup that name, and recurse with the associated slot value." ;; Removed checks to outside this call - (let* ((fsym (gethash slot (eieio--class-symbol-hashtable class))) - (fsi (car fsym))) + (let* ((fsi (gethash slot (eieio--class-index-table class)))) (if (integerp fsi) (+ (eval-when-compile eieio--object-num-slots) fsi) (let ((fn (eieio--initarg-to-attribute class slot))) - (if fn (eieio--slot-name-index class obj fn) nil))))) + (if fn + ;; Accessing a slot via its :initarg is accepted by EIEIO + ;; (but not CLOS) but is a bad idea (for one: it's slower). + ;; FIXME: We should emit a compile-time warning when this happens! + (eieio--slot-name-index class fn) + nil))))) (defun eieio--class-slot-name-index (class slot) "In CLASS find the index of the named SLOT. @@ -1044,13 +897,12 @@ call. If SLOT is the value created with :initarg instead, reverse-lookup that name, and recurse with the associated slot value." ;; This will happen less often, and with fewer slots. Do this the ;; storage cheap way. - (let* ((a (eieio--class-class-allocation-a class)) - (l1 (length a)) - (af (memq slot a)) - (l2 (length af))) - ;; Slot # is length of the total list, minus the remaining list of - ;; the found slot. - (if af (- l1 l2)))) + (let ((index nil) + (slots (eieio--class-class-slots class))) + (dotimes (i (length slots)) + (if (eq slot (cl--slot-descriptor-name (aref slots i))) + (setq index i))) + index)) ;;; ;; Way to assign slots based on a list. Used for constructors, or @@ -1061,12 +913,12 @@ reverse-lookup that name, and recurse with the associated slot value." If SET-ALL is non-nil, then when a default is nil, that value is reset. If SET-ALL is nil, the slots are only reset if the default is not nil." - (let ((pub (eieio--class-public-a (eieio--object-class-object obj)))) - (while pub - (let ((df (eieio-oref-default obj (car pub)))) + (let ((slots (eieio--class-slots (eieio--object-class obj)))) + (dotimes (i (length slots)) + (let* ((name (cl--slot-descriptor-name (aref slots i))) + (df (eieio-oref-default obj name))) (if (or df set-all) - (eieio-oset obj (car pub) df))) - (setq pub (cdr pub))))) + (eieio-oset obj name df)))))) (defun eieio--initarg-to-attribute (class initarg) "For CLASS, convert INITARG to the actual attribute name. @@ -1093,11 +945,8 @@ need be... May remove that later...)" (defun eieio--c3-merge-lists (reversed-partial-result remaining-inputs) "Merge REVERSED-PARTIAL-RESULT REMAINING-INPUTS in a consistent order, if possible. If a consistent order does not exist, signal an error." - (if (let ((tail remaining-inputs) - (found nil)) - (while (and tail (not found)) - (setq found (car tail) tail (cdr tail))) - (not found)) + (setq remaining-inputs (delq nil remaining-inputs)) + (if (null remaining-inputs) ;; If all remaining inputs are empty lists, we are done. (nreverse reversed-partial-result) ;; Otherwise, we try to find the next element of the result. This @@ -1108,9 +957,8 @@ If a consistent order does not exist, signal an error." (tail remaining-inputs) (next (progn (while (and tail (not found)) - (setq found (and (car tail) - (eieio--c3-candidate (caar tail) - remaining-inputs)) + (setq found (eieio--c3-candidate (caar tail) + remaining-inputs) tail (cdr tail))) found))) (if next @@ -1124,9 +972,13 @@ If a consistent order does not exist, signal an error." ;; The graph is inconsistent, give up (signal 'inconsistent-class-hierarchy (list remaining-inputs)))))) +(defsubst eieio--class/struct-parents (class) + (or (eieio--class-parents class) + `(,eieio-default-superclass))) + (defun eieio--class-precedence-c3 (class) "Return all parents of CLASS in c3 order." - (let ((parents (eieio--class-parent (eieio--class-v class)))) + (let ((parents (eieio--class-parents (eieio--class-v class)))) (eieio--c3-merge-lists (list class) (append @@ -1140,7 +992,7 @@ If a consistent order does not exist, signal an error." (defun eieio--class-precedence-dfs (class) "Return all parents of CLASS in depth-first order." - (let* ((parents (eieio--class-parent class)) + (let* ((parents (eieio--class-parents class)) (classes (copy-sequence (apply #'append (list class) @@ -1163,15 +1015,13 @@ If a consistent order does not exist, signal an error." (defun eieio--class-precedence-bfs (class) "Return all parents of CLASS in breadth-first order." (let* ((result) - (queue (or (eieio--class-parent class) - `(,eieio-default-superclass)))) + (queue (eieio--class/struct-parents class))) (while queue (let ((head (pop queue))) (unless (member head result) (push head result) (unless (eq head eieio-default-superclass) - (setq queue (append queue (or (eieio--class-parent head) - `(,eieio-default-superclass)))))))) + (setq queue (append queue (eieio--class/struct-parents head))))))) (cons class (nreverse result))) ) @@ -1185,7 +1035,7 @@ method invocation orders of the involved classes." (if (or (null class) (eq class eieio-default-superclass)) nil (unless (eieio--class-default-object-cache class) - (eieio-class-un-autoload (eieio--class-symbol class))) + (eieio-class-un-autoload (eieio--class-name class))) (cl-case (eieio--class-method-invocation-order class) (:depth-first (eieio--class-precedence-dfs class)) @@ -1211,25 +1061,26 @@ method invocation orders of the involved classes." ;;;; General support to dispatch based on the type of the argument. -(add-function :before-until cl-generic-tagcode-function - #'eieio--generic-tagcode) -(defun eieio--generic-tagcode (type name) +(defconst eieio--generic-generalizer + (cl-generic-make-generalizer + ;; Use the exact same tagcode as for cl-struct, so that methods + ;; that dispatch on both kinds of objects get to share this + ;; part of the dispatch code. + 50 #'cl--generic-struct-tag + (lambda (tag) + (and (symbolp tag) (boundp tag) (eieio--class-p (symbol-value tag)) + (mapcar #'eieio--class-name + (eieio--class-precedence-list (symbol-value tag))))))) + +(cl-defmethod cl-generic-generalizers :extra "class" (specializer) ;; CLHS says: ;; A class must be defined before it can be used as a parameter ;; specializer in a defmethod form. ;; So we can ignore types that are not known to denote classes. - (and (eieio--class-p (eieio--class-object type)) - ;; Use the exact same code as for cl-struct, so that methods - ;; that dispatch on both kinds of objects get to share this - ;; part of the dispatch code. - `(50 . ,(cl--generic-struct-tag name)))) - -(add-function :before-until cl-generic-tag-types-function - #'eieio--generic-tag-types) -(defun eieio--generic-tag-types (tag) - (and (symbolp tag) (boundp tag) (eieio--class-p (symbol-value tag)) - (mapcar #'eieio--class-symbol - (eieio--class-precedence-list (symbol-value tag))))) + (or + (and (eieio--class-p (eieio--class-object specializer)) + (list eieio--generic-generalizer)) + (cl-call-next-method))) ;;;; Dispatch for arguments which are classes. @@ -1239,23 +1090,22 @@ method invocation orders of the involved classes." ;; would not make much sense (e.g. to which argument should it apply?). ;; Instead, we add a new "subclass" specializer. -(add-function :before-until cl-generic-tagcode-function - #'eieio--generic-subclass-tagcode) -(defun eieio--generic-subclass-tagcode (type name) - (when (eq 'subclass (car-safe type)) - `(60 . (and (symbolp ,name) (eieio--class-v ,name))))) - -(add-function :before-until cl-generic-tag-types-function - #'eieio--generic-subclass-tag-types) -(defun eieio--generic-subclass-tag-types (tag) +(defun eieio--generic-subclass-specializers (tag) (when (eieio--class-p tag) (mapcar (lambda (class) - `(subclass - ,(if (symbolp class) class (eieio--class-symbol class)))) + `(subclass ,(eieio--class-name class))) (eieio--class-precedence-list tag)))) +(defconst eieio--generic-subclass-generalizer + (cl-generic-make-generalizer + 60 (lambda (name) `(and (symbolp ,name) (eieio--class-v ,name))) + #'eieio--generic-subclass-specializers)) + +(cl-defmethod cl-generic-generalizers ((_specializer (head subclass))) + (list eieio--generic-subclass-generalizer)) + -;;;### (autoloads nil "eieio-compat" "eieio-compat.el" "b568ffb3c90ed5d0ae673f0051d608ee") +;;;### (autoloads nil "eieio-compat" "eieio-compat.el" "0609a7bdcd6f38876b7f5647047ddca9") ;;; Generated autoloads from eieio-compat.el (autoload 'eieio--defalias "eieio-compat" "\ diff --git a/lisp/emacs-lisp/eieio-custom.el b/lisp/emacs-lisp/eieio-custom.el index 0e0b31e4e7..26fc452f7b 100644 --- a/lisp/emacs-lisp/eieio-custom.el +++ b/lisp/emacs-lisp/eieio-custom.el @@ -193,12 +193,8 @@ Optional argument IGNORE is an extraneous parameter." (let* ((chil nil) (obj (widget-get widget :value)) (master-group (widget-get widget :eieio-group)) - (cv (eieio--object-class-object obj)) - (slots (eieio--class-public-a cv)) - (flabel (eieio--class-public-custom-label cv)) - (fgroup (eieio--class-public-custom-group cv)) - (fdoc (eieio--class-public-doc cv)) - (fcust (eieio--class-public-custom cv))) + (cv (eieio--object-class obj)) + (slots (eieio--class-slots cv))) ;; First line describes the object, but may not editable. (if (widget-get widget :eieio-show-name) (setq chil (cons (widget-create-child-and-convert @@ -208,7 +204,7 @@ Optional argument IGNORE is an extraneous parameter." chil))) ;; Display information about the group being shown (when master-group - (let ((groups (eieio--class-option (eieio--object-class-object obj) + (let ((groups (eieio--class-option (eieio--object-class obj) :custom-groups))) (widget-insert "Groups:") (while groups @@ -225,63 +221,59 @@ Optional argument IGNORE is an extraneous parameter." (setq groups (cdr groups))) (widget-insert "\n\n"))) ;; Loop over all the slots, creating child widgets. - (while slots - ;; Output this slot if it has a customize flag associated with it. - (when (and (car fcust) - (or (not master-group) (member master-group (car fgroup))) - (slot-boundp obj (car slots))) - ;; In this case, this slot has a custom type. Create its - ;; children widgets. - (let ((type (eieio-filter-slot-type widget (car fcust))) - (stuff nil)) - ;; This next bit is an evil hack to get some EDE functions - ;; working the way I like. - (if (and (listp type) - (setq stuff (member :slotofchoices type))) - (let ((choices (eieio-oref obj (car (cdr stuff)))) - (newtype nil)) - (while (not (eq (car type) :slotofchoices)) - (setq newtype (cons (car type) newtype) - type (cdr type))) - (while choices - (setq newtype (cons (list 'const (car choices)) - newtype) - choices (cdr choices))) - (setq type (nreverse newtype)))) - (setq chil (cons (widget-create-child-and-convert - widget 'object-slot - :childtype type - :sample-face 'eieio-custom-slot-tag-face - :tag - (concat - (make-string - (or (widget-get widget :indent) 0) - ? ) - (if (car flabel) - (car flabel) - (let ((s (symbol-name - (or - (eieio--class-slot-initarg - (eieio--object-class-object obj) - (car slots)) - (car slots))))) - (capitalize - (if (string-match "^:" s) - (substring s (match-end 0)) - s))))) - :value (slot-value obj (car slots)) - :doc (if (car fdoc) (car fdoc) - "Slot not Documented.") - :eieio-custom-visibility 'visible - ) - chil)) - ) - ) - (setq slots (cdr slots) - fdoc (cdr fdoc) - fcust (cdr fcust) - flabel (cdr flabel) - fgroup (cdr fgroup))) + (dotimes (i (length slots)) + (let* ((slot (aref slots i)) + (props (cl--slot-descriptor-props slot))) + ;; Output this slot if it has a customize flag associated with it. + (when (and (alist-get :custom props) + (or (not master-group) + (member master-group (alist-get :group props))) + (slot-boundp obj (cl--slot-descriptor-name slot))) + ;; In this case, this slot has a custom type. Create its + ;; children widgets. + (let ((type (eieio-filter-slot-type widget (alist-get :custom props))) + (stuff nil)) + ;; This next bit is an evil hack to get some EDE functions + ;; working the way I like. + (if (and (listp type) + (setq stuff (member :slotofchoices type))) + (let ((choices (eieio-oref obj (car (cdr stuff)))) + (newtype nil)) + (while (not (eq (car type) :slotofchoices)) + (setq newtype (cons (car type) newtype) + type (cdr type))) + (while choices + (setq newtype (cons (list 'const (car choices)) + newtype) + choices (cdr choices))) + (setq type (nreverse newtype)))) + (setq chil (cons (widget-create-child-and-convert + widget 'object-slot + :childtype type + :sample-face 'eieio-custom-slot-tag-face + :tag + (concat + (make-string + (or (widget-get widget :indent) 0) + ?\s) + (or (alist-get :label props) + (let ((s (symbol-name + (or + (eieio--class-slot-initarg + (eieio--object-class obj) + (car slots)) + (car slots))))) + (capitalize + (if (string-match "^:" s) + (substring s (match-end 0)) + s))))) + :value (slot-value obj (car slots)) + :doc (or (alist-get :documentation props) + "Slot not Documented.") + :eieio-custom-visibility 'visible + ) + chil)) + )))) (widget-put widget :children (nreverse chil)) )) @@ -289,34 +281,33 @@ Optional argument IGNORE is an extraneous parameter." "Get the value of WIDGET." (let* ((obj (widget-get widget :value)) (master-group eieio-cog) - (cv (eieio--object-class-object obj)) - (fgroup (eieio--class-public-custom-group cv)) (wids (widget-get widget :children)) (name (if (widget-get widget :eieio-show-name) (car (widget-apply (car wids) :value-inline)) nil)) (chil (if (widget-get widget :eieio-show-name) (nthcdr 1 wids) wids)) - (cv (eieio--object-class-object obj)) - (slots (eieio--class-public-a cv)) - (fcust (eieio--class-public-custom cv))) + (cv (eieio--object-class obj)) + (i 0) + (slots (eieio--class-slots cv))) ;; If there are any prefix widgets, clear them. ;; -- None yet ;; Create a batch of initargs for each slot. - (while (and slots chil) - (if (and (car fcust) - (or eieio-custom-ignore-eieio-co - (not master-group) (member master-group (car fgroup))) - (slot-boundp obj (car slots))) - (progn - ;; Only customized slots have widgets - (let ((eieio-custom-ignore-eieio-co t)) - (eieio-oset obj (car slots) - (car (widget-apply (car chil) :value-inline)))) - (setq chil (cdr chil)))) - (setq slots (cdr slots) - fgroup (cdr fgroup) - fcust (cdr fcust))) + (while (and (< i (length slots)) chil) + (let* ((slot (aref slots i)) + (props (cl--slot-descriptor-props slot)) + (cust (alist-get :custom props))) + (if (and cust + (or eieio-custom-ignore-eieio-co + (not master-group) + (member master-group (alist-get :group props))) + (slot-boundp obj (cl--slot-descriptor-name slot))) + (progn + ;; Only customized slots have widgets + (let ((eieio-custom-ignore-eieio-co t)) + (eieio-oset obj (cl--slot-descriptor-name slot) + (car (widget-apply (car chil) :value-inline)))) + (setq chil (cdr chil)))))) ;; Set any name updates on it. (if name (eieio-object-set-name-string obj name)) ;; This is the same object we had before. @@ -452,7 +443,7 @@ Must return the created widget." (vector (concat "Group " (symbol-name group)) (list 'customize-object obj (list 'quote group)) t)) - (eieio--class-option (eieio--object-class-object obj) :custom-groups))) + (eieio--class-option (eieio--object-class obj) :custom-groups))) (defvar eieio-read-custom-group-history nil "History for the custom group reader.") @@ -460,7 +451,7 @@ Must return the created widget." (cl-defmethod eieio-read-customization-group ((obj eieio-default-superclass)) "Do a completing read on the name of a customization group in OBJ. Return the symbol for the group, or nil" - (let ((g (eieio--class-option (eieio--object-class-object obj) + (let ((g (eieio--class-option (eieio--object-class obj) :custom-groups))) (if (= (length g) 1) (car g) diff --git a/lisp/emacs-lisp/eieio-datadebug.el b/lisp/emacs-lisp/eieio-datadebug.el index 82349192e5..c820180359 100644 --- a/lisp/emacs-lisp/eieio-datadebug.el +++ b/lisp/emacs-lisp/eieio-datadebug.el @@ -31,6 +31,9 @@ ;;; Code: +(declare-function data-debug/eieio-insert-slots "eieio-datadebug" + (obj eieio-default-superclass)) + (defun data-debug-insert-object-slots (object prefix) "Insert all the slots of OBJECT. PREFIX specifies what to insert at the start of each line." @@ -54,16 +57,17 @@ PREFIX specifies what to insert at the start of each line." "Insert a button representing OBJECT. PREFIX is the text that precedes the button. PREBUTTONTEXT is some text between PREFIX and the object button." - (let ((start (point)) - (end nil) - (str (object-print object)) - (tip (format "Object %s\nClass: %S\nParent(s): %S\n%d slots" - (eieio-object-name-string object) - (eieio-object-class object) - (eieio-class-parents (eieio-object-class object)) - (length (object-slots object)) - )) - ) + (let* ((start (point)) + (end nil) + (str (object-print object)) + (class (eieio-object-class object)) + (tip (format "Object %s\nClass: %S\nParent(s): %S\n%d slots" + (eieio-object-name-string object) + class + (eieio-class-parents class) + (length (eieio-class-slots class)) + )) + ) (insert prefix prebuttontext str) (setq end (point)) (put-text-property (- end (length str)) end 'face 'font-lock-keyword-face) @@ -80,41 +84,31 @@ PREBUTTONTEXT is some text between PREFIX and the object button." ;; Each object should have an opportunity to show stuff about itself. (cl-defmethod data-debug/eieio-insert-slots ((obj eieio-default-superclass) - prefix) + prefix) "Insert the slots of OBJ into the current DDEBUG buffer." (let ((inhibit-read-only t)) (data-debug-insert-thing (eieio-object-name-string obj) prefix "Name: ") - (let* ((cl (eieio-object-class obj)) - (cv (eieio--class-v cl))) - (data-debug-insert-thing (eieio--class-constructor cl) + (let* ((cv (eieio--object-class obj))) + (data-debug-insert-thing (eieio--class-name cv) prefix "Class: ") ;; Loop over all the public slots - (let ((publa (eieio--class-public-a cv)) - ) - (while publa - (if (slot-boundp obj (car publa)) - (let* ((i (eieio--class-slot-initarg (eieio--class-v cl) - (car publa))) - (v (eieio-oref obj (car publa)))) - (data-debug-insert-thing - v prefix (concat - (if i (symbol-name i) - (symbol-name (car publa))) - " "))) - ;; Unbound case - (let ((i (eieio--class-slot-initarg (eieio--class-v cl) - (car publa)))) - (data-debug-insert-custom - "#unbound" prefix - (concat (if i (symbol-name i) - (symbol-name (car publa))) - " ") - 'font-lock-keyword-face)) - ) - (setq publa (cdr publa))))))) + (let ((slots (eieio--class-slots cv))) + (dotimes (i (length slots)) + (let* ((slot (aref slots i)) + (sname (cl--slot-descriptor-name slot)) + (i (eieio--class-slot-initarg cv sname)) + (sstr (concat (symbol-name (or i sname)) " "))) + (if (slot-boundp obj sname) + (let* ((v (eieio-oref obj sname))) + (data-debug-insert-thing v prefix sstr)) + ;; Unbound case + (data-debug-insert-custom + "#unbound" prefix sstr + 'font-lock-keyword-face) + ))))))) ;;; Augment the Data debug thing display list. (data-debug-add-specialized-thing (lambda (thing) (eieio-object-p thing)) diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index 304ee364dc..7f98730340 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el @@ -99,6 +99,7 @@ If CLASS is actually an object, then also display current values of that object. (when pl (insert " Inherits from ") (while (setq cur (pop pl)) + (setq cur (eieio--class-name cur)) (insert "`") (help-insert-xref-button (symbol-name cur) 'help-function cur) @@ -135,74 +136,40 @@ If CLASS is actually an object, then also display current values of that object. (or doc ""))) (insert "\n\n"))))) +(defun eieio--help-print-slot (slot) + (insert + (concat + (propertize "Slot: " 'face 'bold) + (prin1-to-string (cl--slot-descriptor-name slot)) + (unless (eq (cl--slot-descriptor-type slot) t) + (concat " type = " + (prin1-to-string (cl--slot-descriptor-type slot)))) + (unless (eq (cl--slot-descriptor-initform slot) eieio-unbound) + (concat " default = " + (prin1-to-string (cl--slot-descriptor-initform slot)))) + (when (alist-get :printer (cl--slot-descriptor-props slot)) + (concat " printer = " + (prin1-to-string + (alist-get :printer (cl--slot-descriptor-props slot))))) + (when (alist-get :documentation (cl--slot-descriptor-props slot)) + (concat "\n " (alist-get :documentation (cl--slot-descriptor-props slot)) + "\n"))) + "\n")) + (defun eieio-help-class-slots (class) "Print help description for the slots in CLASS. Outputs to the current buffer." (let* ((cv (eieio--class-v class)) - (docs (eieio--class-public-doc cv)) - (names (eieio--class-public-a cv)) - (deflt (eieio--class-public-d cv)) - (types (eieio--class-public-type cv)) - (publp (eieio--class-public-printer cv)) - (i 0) - (prot (eieio--class-protection cv)) - ) + (slots (eieio--class-slots cv)) + (cslots (eieio--class-class-slots cv))) (insert (propertize "Instance Allocated Slots:\n\n" 'face 'bold)) - (while names - (insert - (concat - (when (car prot) - (propertize "Private " 'face 'bold)) - (propertize "Slot: " 'face 'bold) - (prin1-to-string (car names)) - (unless (eq (aref types i) t) - (concat " type = " - (prin1-to-string (aref types i)))) - (unless (eq (car deflt) eieio-unbound) - (concat " default = " - (prin1-to-string (car deflt)))) - (when (car publp) - (concat " printer = " - (prin1-to-string (car publp)))) - (when (car docs) - (concat "\n " (car docs) "\n")) - "\n")) - (setq names (cdr names) - docs (cdr docs) - deflt (cdr deflt) - publp (cdr publp) - prot (cdr prot) - i (1+ i))) - (setq docs (eieio--class-class-allocation-doc cv) - names (eieio--class-class-allocation-a cv) - types (eieio--class-class-allocation-type cv) - i 0 - prot (eieio--class-class-allocation-protection cv)) - (when names + (dotimes (i (length slots)) + (eieio--help-print-slot (aref slots i))) + (when (> (length cslots) 0) (insert (propertize "\nClass Allocated Slots:\n\n" 'face 'bold))) - (while names - (insert - (concat - (when (car prot) - "Private ") - "Slot: " - (prin1-to-string (car names)) - (unless (eq (aref types i) t) - (concat " type = " - (prin1-to-string (aref types i)))) - (condition-case nil - (let ((value (eieio-oref class (car names)))) - (concat " value = " - (prin1-to-string value))) - (error nil)) - (when (car docs) - (concat "\n\n " (car docs) "\n")) - "\n")) - (setq names (cdr names) - docs (cdr docs) - prot (cdr prot) - i (1+ i))))) + (dotimes (i (length cslots)) + (eieio--help-print-slot (aref cslots i))))) (defun eieio-build-class-alist (&optional class instantiable-only buildlist) "Return an alist of all currently active classes for completion purposes. diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 526090954a..bca53c0c89 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -130,7 +130,7 @@ and reference them using the function `class-option'." (error "Method invocation order %s is not allowed" io))) (let ((testsym1 (intern (concat (symbol-name name) "-p"))) - (testsym2 (intern (format "eieio--childp--%s" name))) + (testsym2 (intern (format "%s--eieio-childp" name))) (accessors ())) ;; Collect the accessors we need to define. @@ -272,34 +272,9 @@ This method is obsolete." ;; but hide it so we don't trigger indefinitely. `(,(car whole) (identity ,(car slots)) ,@(cdr slots))))))) - (apply #'eieio-constructor ',name slots)))))) + (apply #'make-instance ',name slots)))))) -;;; CLOS style implementation of object creators. -;; -(defun make-instance (class &rest initargs) - "Make a new instance of CLASS based on INITARGS. -CLASS is a class symbol. For example: - - (make-instance 'foo) - - INITARGS is a property list with keywords based on the :initarg -for each slot. For example: - - (make-instance 'foo :slot1 value1 :slotN valueN) - -Compatibility note: - -If the first element of INITARGS is a string, it is used as the -name of the class. - -In EIEIO, the class' constructor requires a name for use when printing. -`make-instance' in CLOS doesn't use names the way Emacs does, so the -class is used as the name slot instead when INITARGS doesn't start with -a string." - (apply (eieio--class-constructor class) initargs)) - - ;;; Get/Set slots in an object. ;; (defmacro oref (obj slot) @@ -311,6 +286,7 @@ created by the :initarg tag." (defalias 'slot-value 'eieio-oref) (defalias 'set-slot-value 'eieio-oset) +(make-obsolete 'set-slot-value "use (setf (slot-value ..) ..) instead" "25.1") (defmacro oref-default (obj slot) "Get the default value of OBJ (maybe a class) for SLOT. @@ -344,29 +320,69 @@ variable name of the same name as the slot." (declare (indent 2) (debug (sexp sexp def-body))) (require 'cl-lib) ;; Transform the spec-list into a cl-symbol-macrolet spec-list. - (let ((mappings (mapcar (lambda (entry) - (let ((var (if (listp entry) (car entry) entry)) - (slot (if (listp entry) (cadr entry) entry))) - (list var `(slot-value ,object ',slot)))) - spec-list))) - (append (list 'cl-symbol-macrolet mappings) - body))) + (macroexp-let2 nil object object + `(cl-symbol-macrolet + ,(mapcar (lambda (entry) + (let ((var (if (listp entry) (car entry) entry)) + (slot (if (listp entry) (cadr entry) entry))) + (list var `(slot-value ,object ',slot)))) + spec-list) + ,@body))) + +;; Keep it as a non-inlined function, so the internals of object don't get +;; hard-coded in random .elc files. +(defun eieio-pcase-slot-index-table (obj) + "Return some data structure from which can be extracted the slot offset." + (eieio--class-index-table + (symbol-value (eieio--object-class-tag obj)))) + +(defun eieio-pcase-slot-index-from-index-table (index-table slot) + "Find the index to pass to `aref' to access SLOT." + (let ((index (gethash slot index-table))) + (if index (+ (eval-when-compile + (length (cl-struct-slot-info 'eieio--object))) + index)))) + +(pcase-defmacro eieio (&rest fields) + "Pcase patterns to match EIEIO objects. +Elements of FIELDS can be of the form (NAME UPAT) in which case the contents of +field NAME is matched against UPAT, or they can be of the form NAME which +is a shorthand for (NAME NAME)." + (let ((is (make-symbol "table"))) + ;; FIXME: This generates a horrendous mess of redundant let bindings. + ;; `pcase' needs to be improved somehow to introduce let-bindings more + ;; sparingly, or the byte-compiler needs to be taught to optimize + ;; them away. + ;; FIXME: `pcase' does not do a good job here of sharing tests&code among + ;; various branches. + `(and (pred eieio-object-p) + (app eieio-pcase-slot-index-table ,is) + ,@(mapcar (lambda (field) + (let* ((name (if (consp field) (car field) field)) + (pat (if (consp field) (cadr field) field)) + (i (make-symbol "index"))) + `(and (let (and ,i (pred natnump)) + (eieio-pcase-slot-index-from-index-table + ,is ',name)) + (app (pcase--flip aref ,i) ,pat)))) + fields)))) ;;; Simple generators, and query functions. None of these would do ;; well embedded into an object. ;; + (define-obsolete-function-alias - 'object-class-fast #'eieio--object-class-name "24.4") + 'object-class-fast #'eieio-object-class "24.4") (cl-defgeneric eieio-object-name-string (obj) "Return a string which is OBJ's name." (declare (obsolete eieio-named "25.1"))) (defun eieio-object-name (obj &optional extra) - "Return a Lisp like symbol string for object OBJ. + "Return a printed representation for object OBJ. If EXTRA, include that in the string returned to represent the symbol." (cl-check-type obj eieio-object) - (format "#<%s %s%s>" (eieio--object-class-name obj) + (format "#<%s %s%s>" (eieio-object-class obj) (eieio-object-name-string obj) (or extra ""))) (define-obsolete-function-alias 'object-name #'eieio-object-name "24.4") @@ -394,7 +410,7 @@ If EXTRA, include that in the string returned to represent the symbol." "Return the class struct defining OBJ." ;; FIXME: We say we return a "struct" but we return a symbol instead! (cl-check-type obj eieio-object) - (eieio--object-class-name obj)) + (eieio--class-name (eieio--object-class obj))) (define-obsolete-function-alias 'object-class #'eieio-object-class "24.4") ;; CLOS name, maybe? (define-obsolete-function-alias 'class-of #'eieio-object-class "24.4") @@ -402,7 +418,7 @@ If EXTRA, include that in the string returned to represent the symbol." (defun eieio-object-class-name (obj) "Return a Lisp like symbol name for OBJ's class." (cl-check-type obj eieio-object) - (eieio-class-name (eieio--object-class-name obj))) + (eieio-class-name (eieio--object-class obj))) (define-obsolete-function-alias 'object-class-name 'eieio-object-class-name "24.4") @@ -410,7 +426,7 @@ If EXTRA, include that in the string returned to represent the symbol." "Return parent classes to CLASS. (overload of variable). The CLOS function `class-direct-superclasses' is aliased to this function." - (eieio--class-parent (eieio--class-object class))) + (eieio--class-parents (eieio--class-object class))) (define-obsolete-function-alias 'class-parents #'eieio-class-parents "24.4") @@ -438,13 +454,13 @@ The CLOS function `class-direct-subclasses' is aliased to this function." (setq class (eieio--class-object class)) (cl-check-type class eieio--class) (cl-check-type obj eieio-object) - (eq (eieio--object-class-object obj) class)) + (eq (eieio--object-class obj) class)) (defun object-of-class-p (obj class) "Return non-nil if OBJ is an instance of CLASS or CLASS' subclasses." (cl-check-type obj eieio-object) ;; class will be checked one layer down - (child-of-class-p (eieio--object-class-object obj) class)) + (child-of-class-p (eieio--object-class obj) class)) ;; Backwards compatibility (defalias 'obj-of-class-p 'object-of-class-p) @@ -452,23 +468,37 @@ The CLOS function `class-direct-subclasses' is aliased to this function." "Return non-nil if CHILD class is a subclass of CLASS." (setq child (eieio--class-object child)) (cl-check-type child eieio--class) - ;; `eieio-default-superclass' is never mentioned in eieio--class-parent, + ;; `eieio-default-superclass' is never mentioned in eieio--class-parents, ;; so we have to special case it here. (or (eq class 'eieio-default-superclass) (let ((p nil)) (setq class (eieio--class-object class)) (cl-check-type class eieio--class) (while (and child (not (eq child class))) - (setq p (append p (eieio--class-parent child)) + (setq p (append p (eieio--class-parents child)) child (pop p))) (if child t)))) +(defun eieio-slot-descriptor-name (slot) + (cl--slot-descriptor-name slot)) + +(defun eieio-class-slots (class) + "Return list of slots available in instances of CLASS." + ;; FIXME: This only gives the instance slots and ignores the + ;; class-allocated slots. + (setq class (eieio--class-object class)) + (cl-check-type class eieio--class) + (mapcar #'identity (eieio--class-slots class))) + (defun object-slots (obj) - "Return list of slots available in OBJ." + "Return list of slot names available in OBJ." + (declare (obsolete eieio-class-slots "25.1")) (cl-check-type obj eieio-object) - (eieio--class-public-a (eieio--object-class-object obj))) + (mapcar #'cl--slot-descriptor-name + (eieio-class-slots (eieio--object-class obj)))) -(defun eieio--class-slot-initarg (class slot) "Fetch from CLASS, SLOT's :initarg." +(defun eieio--class-slot-initarg (class slot) + "Fetch from CLASS, SLOT's :initarg." (cl-check-type class eieio--class) (let ((ia (eieio--class-initarg-tuples class)) (f nil)) @@ -518,12 +548,18 @@ OBJECT can be an instance or a class." (defun slot-exists-p (object-or-class slot) "Return non-nil if OBJECT-OR-CLASS has SLOT." (let ((cv (cond ((eieio-object-p object-or-class) - (eieio--object-class-object object-or-class)) + (eieio--object-class object-or-class)) ((eieio--class-p object-or-class) object-or-class) (t (find-class object-or-class 'error))))) - (or (memq slot (eieio--class-public-a cv)) - (memq slot (eieio--class-class-allocation-a cv))) - )) + (or (gethash slot (eieio--class-index-table cv)) + ;; FIXME: We could speed this up by adding class slots into the + ;; index-table (e.g. with a negative index?). + (let ((cs (eieio--class-class-slots cv)) + found) + (dotimes (i (length cs)) + (if (eq slot (cl--slot-descriptor-name (aref cs i))) + (setq found t))) + found)))) (defun find-class (symbol &optional errorp) "Return the class that SYMBOL represents. @@ -613,6 +649,9 @@ If SLOT is unbound, do nothing." ;;; Here are some CLOS items that need the CL package ;; +;; FIXME: Shouldn't this be a more complex gv-expander which extracts the +;; common code between oref and oset, so as to reduce the redundant work done +;; in (push foo (oref bar baz)), like we do for the `nth' expander? (gv-define-simple-setter eieio-oref eieio-oset) @@ -636,20 +675,28 @@ This class is not stored in the `parent' slot of a class vector." (defalias 'standard-class 'eieio-default-superclass) -(cl-defgeneric eieio-constructor (class &rest slots) - "Default constructor for CLASS `eieio-default-superclass'.") +(cl-defgeneric make-instance (class &rest initargs) + "Make a new instance of CLASS based on INITARGS. +For example: + + (make-instance 'foo) + +INITARGS is a property list with keywords based on the `:initarg' +for each slot. For example: + + (make-instance 'foo :slot1 value1 :slotN valueN)") -(define-obsolete-function-alias 'constructor #'eieio-constructor "25.1") +(define-obsolete-function-alias 'constructor #'make-instance "25.1") -(cl-defmethod eieio-constructor - ((class (subclass eieio-default-superclass)) &rest slots) +(cl-defmethod make-instance + ((class (subclass eieio-default-superclass)) &rest slots) "Default constructor for CLASS `eieio-default-superclass'. -SLOTS are the initialization slots used by `shared-initialize'. +SLOTS are the initialization slots used by `initialize-instance'. This static method is called when an object is constructed. It allocates the vector used to represent an EIEIO object, and then -calls `shared-initialize' on that object." +calls `initialize-instance' on that object." (let* ((new-object (copy-sequence (eieio--class-default-object-cache - (eieio--class-v class))))) + (eieio--class-object class))))) (if (and slots (let ((x (car slots))) (or (stringp x) (null x)))) @@ -662,6 +709,7 @@ calls `shared-initialize' on that object." ;; Return the created object. new-object)) +;; FIXME: CLOS uses "&rest INITARGS" instead. (cl-defgeneric shared-initialize (obj slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs. Called from the constructor routine.") @@ -670,13 +718,14 @@ Called from the constructor routine.") "Set slots of OBJ with SLOTS which is a list of name/value pairs. Called from the constructor routine." (while slots - (let ((rn (eieio--initarg-to-attribute (eieio--object-class-object obj) + (let ((rn (eieio--initarg-to-attribute (eieio--object-class obj) (car slots)))) (if (not rn) (slot-missing obj (car slots) 'oset (car (cdr slots))) (eieio-oset obj rn (car (cdr slots))))) (setq slots (cdr (cdr slots))))) +;; FIXME: CLOS uses "&rest INITARGS" instead. (cl-defgeneric initialize-instance (this &optional slots) "Construct the new object THIS based on SLOTS.") @@ -692,10 +741,9 @@ not taken, then new objects of your class will not have their values dynamically set from SLOTS." ;; First, see if any of our defaults are `lambda', and ;; re-evaluate them and apply the value to our slots. - (let* ((this-class (eieio--object-class-object this)) - (slot (eieio--class-public-a this-class)) - (defaults (eieio--class-public-d this-class))) - (while slot + (let* ((this-class (eieio--object-class this)) + (slots (eieio--class-slots this-class))) + (dotimes (i (length slots)) ;; For each slot, see if we need to evaluate it. ;; ;; Paul Landes said in an email: @@ -703,12 +751,12 @@ dynamically set from SLOTS." ;; > the quoted thing as you already have. This is by the ;; > Sonya E. Keene book and other things I've look at on the ;; > web. - (let ((dflt (eieio-default-eval-maybe (car defaults)))) - (when (not (eq dflt (car defaults))) - (eieio-oset this (car slot) dflt) )) - ;; Next. - (setq slot (cdr slot) - defaults (cdr defaults)))) + (let* ((slot (aref slots i)) + (initform (cl--slot-descriptor-initform slot)) + (dflt (eieio-default-eval-maybe initform))) + (when (not (eq dflt initform)) + ;; FIXME: We should be able to just do (aset this (+ i ) dflt)! + (eieio-oset this (cl--slot-descriptor-name slot) dflt))))) ;; Shared initialize will parse our slots for us. (shared-initialize this slots)) @@ -742,7 +790,8 @@ Use `slot-boundp' to determine if a slot is bound or not. In CLOS, the argument list is (CLASS OBJECT SLOT-NAME), but EIEIO can only dispatch on the first argument, so the first two are swapped." - (signal 'unbound-slot (list (eieio-class-name class) (eieio-object-name object) + (signal 'unbound-slot (list (eieio-class-name class) + (eieio-object-name object) slot-name fn))) (cl-defgeneric clone (obj &rest params) @@ -824,32 +873,31 @@ this object." (prin1 (eieio-object-name-string this)) (princ "\n") ;; Loop over all the public slots - (let ((publa (eieio--class-public-a cv)) - (publd (eieio--class-public-d cv)) - (publp (eieio--class-public-printer cv)) + (let ((slots (eieio--class-slots cv)) (eieio-print-depth (1+ eieio-print-depth))) - (while publa - (when (slot-boundp this (car publa)) - (let ((i (eieio--class-slot-initarg cv (car publa))) - (v (eieio-oref this (car publa))) - ) - (unless (or (not i) (equal v (car publd))) - (unless (bolp) - (princ "\n")) - (princ (make-string (* eieio-print-depth 2) ? )) - (princ (symbol-name i)) - (if (car publp) - ;; Use our public printer - (progn - (princ " ") - (funcall (car publp) v)) - ;; Use our generic override prin1 function. - (princ (if (or (eieio-object-p v) - (eieio-object-p (car-safe v))) - "\n" " ")) - (eieio-override-prin1 v))))) - (setq publa (cdr publa) publd (cdr publd) - publp (cdr publp)))) + (dotimes (i (length slots)) + (let ((slot (aref slots i))) + (when (slot-boundp this (cl--slot-descriptor-name slot)) + (let ((i (eieio--class-slot-initarg + cv (cl--slot-descriptor-name slot))) + (v (eieio-oref this (cl--slot-descriptor-name slot)))) + (unless (or (not i) (equal v (cl--slot-descriptor-initform slot))) + (unless (bolp) + (princ "\n")) + (princ (make-string (* eieio-print-depth 2) ? )) + (princ (symbol-name i)) + (if (alist-get :printer (cl--slot-descriptor-props slot)) + ;; Use our public printer + (progn + (princ " ") + (funcall (alist-get :printer + (cl--slot-descriptor-props slot)) + v)) + ;; Use our generic override prin1 function. + (princ (if (or (eieio-object-p v) + (eieio-object-p (car-safe v))) + "\n" " ")) + (eieio-override-prin1 v)))))))) (princ ")") (when (= eieio-print-depth 0) (princ "\n")))) @@ -861,7 +909,7 @@ this object." ((consp thing) (eieio-list-prin1 thing)) ((eieio--class-p thing) - (princ (eieio-class-name thing))) + (princ (eieio--class-print-name thing))) (t (prin1 thing)))) (defun eieio-list-prin1 (list) @@ -902,7 +950,7 @@ of `eq'." Used as advice around `edebug-prin1-to-string', held in the variable PRINT-FUNCTION. Optional argument NOESCAPE is passed to `prin1-to-string' when appropriate." - (cond ((eieio--class-p object) (eieio-class-name object)) + (cond ((eieio--class-p object) (eieio--class-print-name object)) ((eieio-object-p object) (object-print object)) ((and (listp object) (or (eieio--class-p (car object)) (eieio-object-p (car object)))) @@ -918,7 +966,7 @@ variable PRINT-FUNCTION. Optional argument NOESCAPE is passed to ;;; Start of automatically extracted autoloads. -;;;### (autoloads nil "eieio-custom" "eieio-custom.el" "2ec91e473fcad1ff20cd76edc4aab706") +;;;### (autoloads nil "eieio-custom" "eieio-custom.el" "813d32fbf76d4248fc6b4dc97ebcd720") ;;; Generated autoloads from eieio-custom.el (autoload 'customize-object "eieio-custom" "\ @@ -929,7 +977,7 @@ Optional argument GROUP is the sub-group of slots to display. ;;;*** -;;;### (autoloads nil "eieio-opt" "eieio-opt.el" "ff1097f185bc2c253276a7d19fe2f54a") +;;;### (autoloads nil "eieio-opt" "eieio-opt.el" "3005b815c6b30eccbf0642170b3f82a5") ;;; Generated autoloads from eieio-opt.el (autoload 'eieio-browse "eieio-opt" "\ diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el new file mode 100644 index 0000000000..8251682590 --- /dev/null +++ b/lisp/emacs-lisp/generator.el @@ -0,0 +1,796 @@ +;;; generator.el --- generators -*- lexical-binding: t -*- + +;;; Copyright (C) 2015 Free Software Foundation, Inc. + +;; Author: Daniel Colascione +;; Keywords: extensions, elisp +;; Package: emacs + +;; 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 . + +;;; Commentary: + +;; This package implements generators for Emacs Lisp through a +;; continuation-passing transformation. It provides essentially the +;; same generator API and iterator facilities that Python and +;; JavaScript ES6 provide. +;; +;; `iter-lambda' and `iter-defun' work like `lambda' and `defun', +;; except that they evaluate to or define, respectively, generator +;; functions. These functions, when called, return an iterator. +;; An iterator is an opaque object that generates a sequence of +;; values. Callers use `iter-next' to retrieve the next value from +;; the sequence; when the sequence is exhausted, `iter-next' will +;; raise the `iter-end-of-sequence' condition. +;; +;; Generator functions are written like normal functions, except that +;; they can invoke `iter-yield' to suspend themselves and return a +;; value to callers; this value becomes the return value of +;; `iter-next'. On the next call to `iter-next', execution of the +;; generator function resumes where it left off. When a generator +;; function returns normally, the `iter-next' raises +;; `iter-end-of-sequence' with the value the function returned. +;; +;; `iter-yield-from' yields all the values from another iterator; it +;; then evaluates to the value the sub-iterator returned normally. +;; This facility is useful for functional composition of generators +;; and for implementing coroutines. +;; +;; `iter-yield' is illegal inside the UNWINDFORMS of an +;; `unwind-protect' for various sordid internal reasons documented in +;; the code. +;; +;; N.B. Each call to a generator function generates a *new* iterator, +;; and each iterator maintains its own internal state. +;; +;; This raw form of iteration is general, but a bit awkward to use, so +;; this library also provides some convenience functions: +;; +;; `iter-do' is like `cl-do', except that instead of walking a list, +;; it walks an iterator. `cl-loop' is also extended with a new +;; keyword, `iter-by', that iterates over an iterator. +;; + +;;; Implementation: + +;; +;; The internal cps transformation code uses the cps- namespace. +;; Iteration functions use the `iter-' namespace. Generator functions +;; are somewhat less efficient than conventional elisp routines, +;; although we try to avoid CPS transformation on forms that do not +;; invoke `iter-yield'. +;; + +;;; Code: + +(require 'cl-lib) +(require 'pcase) + +(defvar cps--bindings nil) +(defvar cps--states nil) +(defvar cps--value-symbol nil) +(defvar cps--state-symbol nil) +(defvar cps--cleanup-table-symbol nil) +(defvar cps--cleanup-function nil) + +(defmacro cps--gensym (fmt &rest args) + ;; Change this function to use `cl-gensym' if you want the generated + ;; code to be easier to read and debug. + ;; (cl-gensym (apply #'format fmt args)) + `(make-symbol ,fmt)) + +(defvar cps--dynamic-wrappers '(identity) + "List of transformer functions to apply to atomic forms we +evaluate in CPS context.") + +(defconst cps-standard-special-forms + '(setq setq-default throw interactive) + "List of special forms that we treat just like ordinary + function applications." ) + +(defun cps--trace-funcall (func &rest args) + (message "%S: args=%S" func args) + (let ((result (apply func args))) + (message "%S: result=%S" func result) + result)) + +(defun cps--trace (fmt &rest args) + (princ (apply #'format (concat fmt "\n") args))) + +(defun cps--special-form-p (definition) + "Non-nil if and only if DEFINITION is a special form." + ;; Copied from ad-special-form-p + (if (and (symbolp definition) (fboundp definition)) + (setf definition (indirect-function definition))) + (and (subrp definition) (eq (cdr (subr-arity definition)) 'unevalled))) + +(defmacro cps--define-unsupported (function) + `(defun ,(intern (format "cps--transform-%s" function)) + (error "%s not supported in generators" ,function))) + +(defmacro cps--with-value-wrapper (wrapper &rest body) + "Continue generating CPS code with an atomic-form wrapper +to the current stack of such wrappers. WRAPPER is a function that +takes a form and returns a wrapped form. + +Whenever we generate an atomic form (i.e., a form that can't +iter-yield), we first (before actually inserting that form in our +generated code) pass that form through all the transformer +functions. We use this facility to wrap forms that can transfer +control flow non-locally in goo that diverts this control flow to +the CPS state machinery. +" + (declare (indent 1)) + `(let ((cps--dynamic-wrappers + (cons + ,wrapper + cps--dynamic-wrappers))) + ,@body)) + +(defun cps--make-dynamic-binding-wrapper (dynamic-var static-var) + (cl-assert lexical-binding) + (lambda (form) + `(let ((,dynamic-var ,static-var)) + (unwind-protect ; Update the static shadow after evaluation is done + ,form + (setf ,static-var ,dynamic-var)) + ,form))) + +(defmacro cps--with-dynamic-binding (dynamic-var static-var &rest body) + "Evaluate BODY such that generated atomic evaluations run with +DYNAMIC-VAR bound to STATIC-VAR." + (declare (indent 2)) + `(cps--with-value-wrapper + (cps--make-dynamic-binding-wrapper ,dynamic-var ,static-var) + ,@body)) + +(defun cps--add-state (kind body) + "Create a new CPS state with body BODY and return the state's name." + (declare (indent 1)) + (let* ((state (cps--gensym "cps-state-%s-" kind))) + (push (list state body cps--cleanup-function) cps--states) + (push state cps--bindings) + state)) + +(defun cps--add-binding (original-name) + (car (push (cps--gensym (format "cps-binding-%s-" original-name)) + cps--bindings))) + +(defun cps--find-special-form-handler (form) + (let* ((handler-name (format "cps--transform-%s" (car-safe form))) + (handler (intern-soft handler-name))) + (and (fboundp handler) handler))) + +(defvar cps-inhibit-atomic-optimization nil + "When t, always rewrite forms into cps even when they +don't yield.") + +(defvar cps--yield-seen) + +(defun cps--atomic-p (form) + "Return whether the given form never yields." + + (and (not cps-inhibit-atomic-optimization) + (let* ((cps--yield-seen)) + (ignore (macroexpand-all + `(cl-macrolet ((cps-internal-yield + (_val) + (setf cps--yield-seen t))) + ,form) + macroexpand-all-environment)) + (not cps--yield-seen)))) + +(defun cps--make-atomic-state (form next-state) + (let ((tform `(prog1 ,form (setf ,cps--state-symbol ,next-state)))) + (cl-loop for wrapper in cps--dynamic-wrappers + do (setf tform (funcall wrapper tform))) + ;; Bind cps--cleanup-function to nil here because the wrapper + ;; function mechanism is responsible for cleanup here, not the + ;; generic cleanup mechanism. If we didn't make this binding, + ;; we'd run cleanup handlers twice on anything that made it out + ;; to toplevel. + (let ((cps--cleanup-function nil)) + (cps--add-state "atom" + `(setf ,cps--value-symbol ,tform))))) + +(defun cps--transform-1 (form next-state) + (pcase form + + ;; If we're looking at an "atomic" form (i.e., one that does not + ;; iter-yield), just evaluate the form as a whole instead of rewriting + ;; it into CPS. + + ((guard (cps--atomic-p form)) + (cps--make-atomic-state form next-state)) + + ;; Process `and'. + + (`(and) ; (and) -> t + (cps--transform-1 t next-state)) + (`(and ,condition) ; (and CONDITION) -> CONDITION + (cps--transform-1 condition next-state)) + (`(and ,condition . ,rest) + ;; Evaluate CONDITION; if it's true, go on to evaluate the rest + ;; of the `and'. + (cps--transform-1 + condition + (cps--add-state "and" + `(setf ,cps--state-symbol + (if ,cps--value-symbol + ,(cps--transform-1 `(and ,@rest) + next-state) + ,next-state))))) + + ;; Process `catch'. + + (`(catch ,tag . ,body) + (let ((tag-binding (cps--add-binding "catch-tag"))) + (cps--transform-1 tag + (cps--add-state "cps-update-tag" + `(setf ,tag-binding ,cps--value-symbol + ,cps--state-symbol + ,(cps--with-value-wrapper + (cps--make-catch-wrapper + tag-binding next-state) + (cps--transform-1 `(progn ,@body) + next-state))))))) + + ;; Process `cond': transform into `if' or `or' depending on the + ;; precise kind of the condition we're looking at. + + (`(cond) ; (cond) -> nil + (cps--transform-1 nil next-state)) + (`(cond (,condition) . ,rest) + (cps--transform-1 `(or ,condition (cond ,@rest)) + next-state)) + (`(cond (,condition . ,body) . ,rest) + (cps--transform-1 `(if ,condition + (progn ,@body) + (cond ,@rest)) + next-state)) + + ;; Process `condition-case': do the heavy lifting in a helper + ;; function. + + (`(condition-case ,var ,bodyform . ,handlers) + (cps--with-value-wrapper + (cps--make-condition-wrapper var next-state handlers) + (cps--transform-1 bodyform + next-state))) + + ;; Process `if'. + + (`(if ,cond ,then . ,else) + (cps--transform-1 cond + (cps--add-state "if" + `(setf ,cps--state-symbol + (if ,cps--value-symbol + ,(cps--transform-1 then + next-state) + ,(cps--transform-1 `(progn ,@else) + next-state)))))) + + ;; Process `progn' and `inline': they are identical except for the + ;; name, which has some significance to the byte compiler. + + (`(inline) (cps--transform-1 nil next-state)) + (`(inline ,form) (cps--transform-1 form next-state)) + (`(inline ,form . ,rest) + (cps--transform-1 form + (cps--transform-1 `(inline ,@rest) + next-state))) + + (`(progn) (cps--transform-1 nil next-state)) + (`(progn ,form) (cps--transform-1 form next-state)) + (`(progn ,form . ,rest) + (cps--transform-1 form + (cps--transform-1 `(progn ,@rest) + next-state))) + + ;; Process `let' in a helper function that transforms it into a + ;; let* with temporaries. + + (`(let ,bindings . ,body) + (let* ((bindings (cl-loop for binding in bindings + collect (if (symbolp binding) + (list binding nil) + binding))) + (temps (cl-loop for (var value-form) in bindings + collect (cps--add-binding var)))) + (cps--transform-1 + `(let* ,(append + (cl-loop for (var value-form) in bindings + for temp in temps + collect (list temp value-form)) + (cl-loop for (var binding) in bindings + for temp in temps + collect (list var temp))) + ,@body) + next-state))) + + ;; Process `let*' binding: process one binding at a time. Flatten + ;; lexical bindings. + + (`(let* () . ,body) + (cps--transform-1 `(progn ,@body) next-state)) + + (`(let* (,binding . ,more-bindings) . ,body) + (let* ((var (if (symbolp binding) binding (car binding))) + (value-form (car (cdr-safe binding))) + (new-var (cps--add-binding var))) + + (cps--transform-1 + value-form + (cps--add-state "let*" + `(setf ,new-var ,cps--value-symbol + ,cps--state-symbol + ,(if (or (not lexical-binding) (special-variable-p var)) + (cps--with-dynamic-binding var new-var + (cps--transform-1 + `(let* ,more-bindings ,@body) + next-state)) + (cps--transform-1 + (cps--replace-variable-references + var new-var + `(let* ,more-bindings ,@body)) + next-state))))))) + + ;; Process `or'. + + (`(or) (cps--transform-1 nil next-state)) + (`(or ,condition) (cps--transform-1 condition next-state)) + (`(or ,condition . ,rest) + (cps--transform-1 + condition + (cps--add-state "or" + `(setf ,cps--state-symbol + (if ,cps--value-symbol + ,next-state + ,(cps--transform-1 + `(or ,@rest) next-state)))))) + + ;; Process `prog1'. + + (`(prog1 ,first) (cps--transform-1 first next-state)) + (`(prog1 ,first . ,body) + (cps--transform-1 + first + (let ((temp-var-symbol (cps--add-binding "prog1-temp"))) + (cps--add-state "prog1" + `(setf ,temp-var-symbol + ,cps--value-symbol + ,cps--state-symbol + ,(cps--transform-1 + `(progn ,@body) + (cps--add-state "prog1inner" + `(setf ,cps--value-symbol ,temp-var-symbol + ,cps--state-symbol ,next-state)))))))) + + ;; Process `prog2'. + + (`(prog2 ,form1 ,form2 . ,body) + (cps--transform-1 + `(progn ,form1 (prog1 ,form2 ,@body)) + next-state)) + + ;; Process `unwind-protect': If we're inside an unwind-protect, we + ;; have a block of code UNWINDFORMS which we would like to run + ;; whenever control flows away from the main piece of code, + ;; BODYFORM. We deal with the local control flow case by + ;; generating BODYFORM such that it yields to a continuation that + ;; executes UNWINDFORMS, which then yields to NEXT-STATE. + ;; + ;; Non-local control flow is trickier: we need to ensure that we + ;; execute UNWINDFORMS even when control bypasses our normal + ;; continuation. To make this guarantee, we wrap every external + ;; application (i.e., every piece of elisp that can transfer + ;; control non-locally) in an unwind-protect that runs UNWINDFORMS + ;; before allowing the non-local control transfer to proceed. + ;; + ;; Unfortunately, because elisp lacks a mechanism for generically + ;; capturing the reason for an arbitrary non-local control + ;; transfer and restarting the transfer at a later point, we + ;; cannot reify non-local transfers and cannot allow + ;; continuation-passing code inside UNWINDFORMS. + + (`(unwind-protect ,bodyform . ,unwindforms) + ;; Signal the evaluator-generator that it needs to generate code + ;; to handle cleanup forms. + (unless cps--cleanup-table-symbol + (setf cps--cleanup-table-symbol (cps--gensym "cps-cleanup-table-"))) + (let* ((unwind-state + (cps--add-state + "unwind" + ;; N.B. It's safe to just substitute unwindforms by + ;; sexp-splicing: we've already replaced all variable + ;; references inside it with lifted equivalents. + `(progn + ,@unwindforms + (setf ,cps--state-symbol ,next-state)))) + (old-cleanup cps--cleanup-function) + (cps--cleanup-function + (let ((cps--cleanup-function nil)) + (cps--add-state "cleanup" + `(progn + ,(when old-cleanup `(funcall ,old-cleanup)) + ,@unwindforms))))) + (cps--with-value-wrapper + (cps--make-unwind-wrapper unwindforms) + (cps--transform-1 bodyform unwind-state)))) + + ;; Process `while'. + + (`(while ,test . ,body) + ;; Open-code state addition instead of using cps--add-state: we + ;; need our states to be self-referential. (That's what makes the + ;; state a loop.) + (let* ((loop-state + (cps--gensym "cps-state-while-")) + (eval-loop-condition-state + (cps--transform-1 test loop-state)) + (loop-state-body + `(progn + (setf ,cps--state-symbol + (if ,cps--value-symbol + ,(cps--transform-1 + `(progn ,@body) + eval-loop-condition-state) + ,next-state))))) + (push (list loop-state loop-state-body cps--cleanup-function) + cps--states) + (push loop-state cps--bindings) + eval-loop-condition-state)) + + ;; Process various kinds of `quote'. + + (`(quote ,arg) (cps--add-state "quote" + `(setf ,cps--value-symbol (quote ,arg) + ,cps--state-symbol ,next-state))) + (`(function ,arg) (cps--add-state "function" + `(setf ,cps--value-symbol (function ,arg) + ,cps--state-symbol ,next-state))) + + ;; Deal with `iter-yield'. + + (`(cps-internal-yield ,value) + (cps--transform-1 + value + (cps--add-state "iter-yield" + `(progn + (setf ,cps--state-symbol + ,(if cps--cleanup-function + (cps--add-state "after-yield" + `(setf ,cps--state-symbol ,next-state)) + next-state)) + (throw 'cps--yield ,cps--value-symbol))))) + + ;; Catch any unhandled special forms. + + ((and `(,name . ,_) + (guard (cps--special-form-p name)) + (guard (not (memq name cps-standard-special-forms)))) + name ; Shut up byte compiler + (error "special form %S incorrect or not supported" form)) + + ;; Process regular function applications with nontrivial + ;; parameters, converting them to applications of trivial + ;; let-bound parameters. + + ((and `(,function . ,arguments) + (guard (not (cl-loop for argument in arguments + always (atom argument))))) + (let ((argument-symbols + (cl-loop for argument in arguments + collect (if (atom argument) + argument + (cps--gensym "cps-argument-"))))) + + (cps--transform-1 + `(let* ,(cl-loop for argument in arguments + for argument-symbol in argument-symbols + unless (eq argument argument-symbol) + collect (list argument-symbol argument)) + ,(cons function argument-symbols)) + next-state))) + + ;; Process everything else by just evaluating the form normally. + (t (cps--make-atomic-state form next-state)))) + +(defun cps--make-catch-wrapper (tag-binding next-state) + (lambda (form) + (let ((normal-exit-symbol + (cps--gensym "cps-normal-exit-from-catch-"))) + `(let (,normal-exit-symbol) + (prog1 + (catch ,tag-binding + (prog1 + ,form + (setf ,normal-exit-symbol t))) + (unless ,normal-exit-symbol + (setf ,cps--state-symbol ,next-state))))))) + +(defun cps--make-condition-wrapper (var next-state handlers) + ;; Each handler is both one of the transformers with which we wrap + ;; evaluated atomic forms and a state to which we jump when we + ;; encounter the given error. + + (let* ((error-symbol (cps--add-binding "condition-case-error")) + (lexical-error-symbol (cps--gensym "cps-lexical-error-")) + (processed-handlers + (cl-loop for (condition . body) in handlers + collect (cons condition + (cps--transform-1 + (cps--replace-variable-references + var error-symbol + `(progn ,@body)) + next-state))))) + + (lambda (form) + `(condition-case + ,lexical-error-symbol + ,form + ,@(cl-loop + for (condition . error-state) in processed-handlers + collect + `(,condition + (setf ,error-symbol + ,lexical-error-symbol + ,cps--state-symbol + ,error-state))))))) + +(defun cps--replace-variable-references (var new-var form) + "Replace all non-shadowed references to VAR with NEW-VAR in FORM. +This routine does not modify FORM. Instead, it returns a +modified copy." + (macroexpand-all + `(cl-symbol-macrolet ((,var ,new-var)) ,form) + macroexpand-all-environment)) + +(defun cps--make-unwind-wrapper (unwind-forms) + (cl-assert lexical-binding) + (lambda (form) + (let ((normal-exit-symbol + (cps--gensym "cps-normal-exit-from-unwind-"))) + `(let (,normal-exit-symbol) + (unwind-protect + (prog1 + ,form + (setf ,normal-exit-symbol t)) + (unless ,normal-exit-symbol + ,@unwind-forms)))))) + +(put 'iter-end-of-sequence 'error-conditions '(iter-end-of-sequence)) +(put 'iter-end-of-sequence 'error-message "iteration terminated") + +(defun cps--make-close-iterator-form (terminal-state) + (if cps--cleanup-table-symbol + `(let ((cleanup (cdr (assq ,cps--state-symbol ,cps--cleanup-table-symbol)))) + (setf ,cps--state-symbol ,terminal-state + ,cps--value-symbol nil) + (when cleanup (funcall cleanup))) + `(setf ,cps--state-symbol ,terminal-state + ,cps--value-symbol nil))) + +(defun cps-generate-evaluator (body) + (let* (cps--states + cps--bindings + cps--cleanup-function + (cps--value-symbol (cps--gensym "cps-current-value-")) + (cps--state-symbol (cps--gensym "cps-current-state-")) + ;; We make *cps-cleanup-table-symbol** non-nil when we notice + ;; that we have cleanup processing to perform. + (cps--cleanup-table-symbol nil) + (terminal-state (cps--add-state "terminal" + `(signal 'iter-end-of-sequence + ,cps--value-symbol))) + (initial-state (cps--transform-1 + (macroexpand-all + `(cl-macrolet + ((iter-yield (value) + `(cps-internal-yield ,value))) + ,@body) + macroexpand-all-environment) + terminal-state)) + (finalizer-symbol + (when cps--cleanup-table-symbol + (when cps--cleanup-table-symbol + (cps--gensym "cps-iterator-finalizer-"))))) + `(let ,(append (list cps--state-symbol cps--value-symbol) + (when cps--cleanup-table-symbol + (list cps--cleanup-table-symbol)) + (when finalizer-symbol + (list finalizer-symbol)) + (nreverse cps--bindings)) + ;; Order state list so that cleanup states are always defined + ;; before they're referenced. + ,@(cl-loop for (state body cleanup) in (nreverse cps--states) + collect `(setf ,state (lambda () ,body)) + when cleanup + do (cl-assert cps--cleanup-table-symbol) + and collect `(push (cons ,state ,cleanup) ,cps--cleanup-table-symbol)) + (setf ,cps--state-symbol ,initial-state) + + (let ((iterator + (lambda (op value) + (cond + ,@(when finalizer-symbol + `(((eq op :stash-finalizer) + (setf ,finalizer-symbol value)) + ((eq op :get-finalizer) + ,finalizer-symbol))) + ((eq op :close) + ,(cps--make-close-iterator-form terminal-state)) + ((eq op :next) + (setf ,cps--value-symbol value) + (let ((yielded nil)) + (unwind-protect + (prog1 + (catch 'cps--yield + (while t + (funcall ,cps--state-symbol))) + (setf yielded t)) + (unless yielded + ;; If we're exiting non-locally (error, quit, + ;; etc.) close the iterator. + ,(cps--make-close-iterator-form terminal-state))))) + (t (error "unknown iterator operation %S" op)))))) + ,(when finalizer-symbol + `(funcall iterator + :stash-finalizer + (make-finalizer + (lambda () + (iter-close iterator))))) + iterator)))) + +(defun iter-yield (value) + "When used inside a generator, yield control to caller. +The caller of `iter-next' receives VALUE, and the next call to +`iter-next' resumes execution at the previous +`iter-yield' point." + (identity value) + (error "`iter-yield' used outside a generator")) + +(defmacro iter-yield-from (value) + "When used inside a generator function, delegate to a sub-iterator. +The values that the sub-iterator yields are passed directly to +the caller, and values supplied to `iter-next' are sent to the +sub-iterator. `iter-yield-from' evaluates to the value that the +sub-iterator function returns via `iter-end-of-sequence'." + (let ((errsym (cps--gensym "yield-from-result")) + (valsym (cps--gensym "yield-from-value"))) + `(let ((,valsym ,value)) + (unwind-protect + (condition-case ,errsym + (let ((vs nil)) + (while t + (setf vs (iter-yield (iter-next ,valsym vs))))) + (iter-end-of-sequence (cdr ,errsym))) + (iter-close ,valsym))))) + +(defmacro iter-defun (name arglist &rest body) + "Creates a generator NAME. +When called as a function, NAME returns an iterator value that +encapsulates the state of a computation that produces a sequence +of values. Callers can retrieve each value using `iter-next'." + (declare (indent defun)) + (cl-assert lexical-binding) + (let* ((parsed-body (macroexp-parse-body body)) + (declarations (car parsed-body)) + (exps (cdr parsed-body))) + `(defun ,name ,arglist + ,@declarations + ,(cps-generate-evaluator exps)))) + +(defmacro iter-lambda (arglist &rest body) + "Return a lambda generator. +`iter-lambda' is to `iter-defun' as `lambda' is to `defun'." + (declare (indent defun)) + (cl-assert lexical-binding) + `(lambda ,arglist + ,(cps-generate-evaluator body))) + +(defun iter-next (iterator &optional yield-result) + "Extract a value from an iterator. +YIELD-RESULT becomes the return value of `iter-yield` in the +context of the generator. + +This routine raises the `iter-end-of-sequence' condition if the +iterator cannot supply more values." + (funcall iterator :next yield-result)) + +(defun iter-close (iterator) + "Terminate an iterator early. +Run any unwind-protect handlers in scope at the point ITERATOR +is blocked." + (funcall iterator :close nil)) + +(cl-defmacro iter-do ((var iterator) &rest body) + "Loop over values from an iterator. +Evaluate BODY with VAR bound to each value from ITERATOR. +Return the value with which ITERATOR finished iteration." + (declare (indent 1)) + (let ((done-symbol (cps--gensym "iter-do-iterator-done")) + (condition-symbol (cps--gensym "iter-do-condition")) + (it-symbol (cps--gensym "iter-do-iterator")) + (result-symbol (cps--gensym "iter-do-result"))) + `(let (,var + ,result-symbol + (,done-symbol nil) + (,it-symbol ,iterator)) + (while (not ,done-symbol) + (condition-case ,condition-symbol + (setf ,var (iter-next ,it-symbol)) + (iter-end-of-sequence + (setf ,result-symbol (cdr ,condition-symbol)) + (setf ,done-symbol t))) + (unless ,done-symbol ,@body)) + ,result-symbol))) + +(defvar cl--loop-args) + +(defmacro cps--advance-for (conscell) + ;; See cps--handle-loop-for + `(condition-case nil + (progn + (setcar ,conscell (iter-next (cdr ,conscell))) + ,conscell) + (iter-end-of-sequence + nil))) + +(defmacro cps--initialize-for (iterator) + ;; See cps--handle-loop-for + (let ((cs (cps--gensym "cps--loop-temp"))) + `(let ((,cs (cons nil ,iterator))) + (cps--advance-for ,cs)))) + +(defun cps--handle-loop-for (var) + "Support `iter-by' in `loop'. " + ;; N.B. While the cl-loop-for-handler is a documented interface, + ;; there's no documented way for cl-loop-for-handler callbacks to do + ;; anything useful! Additionally, cl-loop currently lexbinds useful + ;; internal variables, so our only option is to modify + ;; cl--loop-args. If we substitute a general-purpose for-clause for + ;; our iterating clause, however, we can't preserve the + ;; parallel-versus-sequential `loop' semantics for for clauses --- + ;; we need a terminating condition as well, which requires us to use + ;; while, and inserting a while would break and-sequencing. + ;; + ;; To work around this problem, we actually use the "for var in LIST + ;; by FUNCTION" syntax, creating a new fake list each time through + ;; the loop, this "list" being a cons cell (val . it). + (let ((it-form (pop cl--loop-args))) + (setf cl--loop-args + (append + `(for ,var + in (cps--initialize-for ,it-form) + by 'cps--advance-for) + cl--loop-args)))) + +(put 'iter-by 'cl-loop-for-handler 'cps--handle-loop-for) + +(eval-after-load 'elisp-mode + (lambda () + (font-lock-add-keywords + 'emacs-lisp-mode + '(("(\\(iter-defun\\)\\_>\\s *\\(\\(?:\\sw\\|\\s_\\)+\\)?" + (1 font-lock-keyword-face nil t) + (2 font-lock-function-name-face nil t)) + ("(\\(iter-\\(?:next\\|lambda\\|yield\\|yield-from\\)\\)\\_>" + (1 font-lock-keyword-face nil t)))))) + +(provide 'generator) + +;;; generator.el ends here diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index 5d6e6e1b37..fae3bcb86f 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el @@ -493,9 +493,20 @@ This is like the `&' operator of the C language. Note: this only works reliably with lexical binding mode, except for very simple PLACEs such as (function-symbol 'foo) which will also work in dynamic binding mode." - (gv-letplace (getter setter) place - `(cons (lambda () ,getter) - (lambda (gv--val) ,(funcall setter 'gv--val))))) + (let ((code + (gv-letplace (getter setter) place + `(cons (lambda () ,getter) + (lambda (gv--val) ,(funcall setter 'gv--val)))))) + (if (or lexical-binding + ;; If `code' still starts with `cons' then presumably gv-letplace + ;; did not add any new let-bindings, so the `lambda's don't capture + ;; any new variables. As a consequence, the code probably works in + ;; dynamic binding mode as well. + (eq (car-safe code) 'cons)) + code + (macroexp--warn-and-return + "Use of gv-ref probably requires lexical-binding" + code)))) (defsubst gv-deref (ref) "Dereference REF, returning the referenced value. diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index f9874d83bb..fec172d05c 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -436,8 +436,10 @@ This can be found in an RCS or SCCS header." ;; Look for an SCCS header ((re-search-forward (concat - (regexp-quote "@(#)") - (regexp-quote (file-name-nondirectory (buffer-file-name))) + "@(#)" + (if buffer-file-name + (regexp-quote (file-name-nondirectory buffer-file-name)) + "[^\t\n]*") "\t\\([012345679.]*\\)") header-max t) (match-string-no-properties 1))))))) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 868a9578b0..4c9a39fe17 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -181,6 +181,63 @@ nil))) res)) +(defun lisp--el-non-funcall-position-p (&optional pos) + "Heuristically determine whether POS is an evaluated position." + (setf pos (or pos (point))) + (save-match-data + (save-excursion + (ignore-errors + (goto-char pos) + (or (eql (char-before) ?\') + (let ((parent + (progn + (up-list -1) + (cond + ((ignore-errors + (and (eql (char-after) ?\() + (progn + (up-list -1) + (looking-at "(\\_")))) + (goto-char (match-end 0)) + 'let) + ((looking-at + (rx "(" + (group-n 1 (+ (or (syntax w) (syntax _)))) + symbol-end)) + (prog1 (intern-soft (match-string-no-properties 1)) + (goto-char (match-end 1)))))))) + (or (eq parent 'declare) + (and (eq parent 'let) + (progn + (forward-sexp 1) + (< pos (point)))) + (and (eq parent 'condition-case) + (progn + (forward-sexp 2) + (< (point) pos)))))))))) + +(defun lisp--el-match-keyword (limit) + (catch 'found + (while (re-search-forward "(\\(\\(?:\\sw\\|\\s_\\)+\\)\\_>" limit t) + (let ((sym (intern-soft (match-string 1)))) + (when (or (special-form-p sym) + (and (macrop sym) + (not (get sym 'no-font-lock-keyword)) + (not (lisp--el-non-funcall-position-p + (match-beginning 0))))) + (throw 'found t)))))) + +(defun lisp--el-font-lock-flush-elisp-buffers (&optional file) + ;; Don't flush during load unless called from after-load-functions. + ;; In that case, FILE is non-nil. It's somehow strange that + ;; load-in-progress is t when an after-load-function is called since + ;; that should run *after* the load... + (when (or (not load-in-progress) file) + (dolist (buf (buffer-list)) + (with-current-buffer buf + (when (derived-mode-p 'emacs-lisp-mode) + (font-lock-flush)))))) + (pcase-let ((`(,vdefs ,tdefs ,el-defs-re ,cl-defs-re @@ -194,7 +251,9 @@ "when" "unless" "with-output-to-string" "ignore-errors" "dotimes" "dolist" "declare")) (lisp-errs '("warn" "error" "signal")) - ;; Elisp constructs. FIXME: update dynamically from obarray. + ;; Elisp constructs. Now they are update dynamically + ;; from obarray but they are also used for setting up + ;; the keywords for Common Lisp. (el-fdefs '("define-advice" "defadvice" "defalias" "define-derived-mode" "define-minor-mode" "define-generic-mode" "define-global-minor-mode" @@ -204,7 +263,7 @@ "defface")) (el-tdefs '("defgroup" "deftheme")) (el-kw '("while-no-input" "letrec" "pcase" "pcase-exhaustive" - "pcase-let" "pcase-let*" "save-restriction" + "pcase-lambda" "pcase-let" "pcase-let*" "save-restriction" "save-excursion" "save-selected-window" ;; "eval-after-load" "eval-next-after-load" "save-window-excursion" "save-current-buffer" @@ -227,7 +286,7 @@ (eieio-tdefs '("defclass")) (eieio-kw '("with-slots")) ;; Common-Lisp constructs supported by cl-lib. - (cl-lib-fdefs '("defmacro" "defsubst" "defun")) + (cl-lib-fdefs '("defmacro" "defsubst" "defun" "defmethod")) (cl-lib-tdefs '("defstruct" "deftype")) (cl-lib-kw '("progv" "eval-when" "case" "ecase" "typecase" "etypecase" "ccase" "ctypecase" "loop" "do" "do*" @@ -298,14 +357,21 @@ `( ;; Definitions. (,(concat "(" el-defs-re "\\_>" ;; Any whitespace and defined object. - "[ \t'\(]*" - "\\(\\(?:\\sw\\|\\s_\\)+\\)?") + "[ \t']*" + "\\(([ \t']*\\)?" ;; An opening paren. + "\\(\\(setf\\)[ \t]+\\(?:\\sw\\|\\s_\\)+\\|\\(?:\\sw\\|\\s_\\)+\\)?") (1 font-lock-keyword-face) - (2 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type))) - (cond ((eq type 'var) font-lock-variable-name-face) - ((eq type 'type) font-lock-type-face) - (t font-lock-function-name-face))) - nil t)) + (3 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type))) + (cond ((eq type 'var) font-lock-variable-name-face) + ((eq type 'type) font-lock-type-face) + ;; If match-string 2 is non-nil, we encountered a + ;; form like (defalias (intern (concat s "-p"))), + ;; unless match-string 4 is also there. Then its a + ;; defmethod with (setf foo) as name. + ((or (not (match-string 2)) ;; Normal defun. + (and (match-string 2) ;; Setf method. + (match-string 4))) font-lock-function-name-face))) + nil t)) ;; Emacs Lisp autoload cookies. Supports the slightly different ;; forms used by mh-e, calendar, etc. ("^;;;###\\([-a-z]*autoload\\)" 1 font-lock-warning-face prepend)) @@ -315,13 +381,16 @@ `( ;; Definitions. (,(concat "(" cl-defs-re "\\_>" ;; Any whitespace and defined object. - "[ \t'\(]*" - "\\(setf[ \t]+\\(?:\\sw\\|\\s_\\)+\\|\\(?:\\sw\\|\\s_\\)+\\)?") + "[ \t']*" + "\\(([ \t']*\\)?" ;; An opening paren. + "\\(\\(setf\\)[ \t]+\\(?:\\sw\\|\\s_\\)+\\|\\(?:\\sw\\|\\s_\\)+\\)?") (1 font-lock-keyword-face) - (2 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type))) + (3 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type))) (cond ((eq type 'var) font-lock-variable-name-face) ((eq type 'type) font-lock-type-face) - (t font-lock-function-name-face))) + ((or (not (match-string 2)) ;; Normal defun. + (and (match-string 2) ;; Setf function. + (match-string 4))) font-lock-function-name-face))) nil t))) "Subdued level highlighting for Lisp modes.") @@ -333,7 +402,7 @@ `( ;; Regexp negated char group. ("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend) ;; Control structures. Common Lisp forms. - (,(concat "(" el-kws-re "\\_>") . 1) + (lisp--el-match-keyword . 1) ;; Exit/Feature symbols as constants. (,(concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\_>" "[ \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)?") @@ -514,6 +583,7 @@ font-lock keywords will not be case sensitive." . lisp-font-lock-syntactic-face-function))) (setq-local prettify-symbols-alist lisp--prettify-symbols-alist) (when elisp + (add-hook 'after-load-functions #'lisp--el-font-lock-flush-elisp-buffers) (setq-local electric-pair-text-pairs (cons '(?\` . ?\') electric-pair-text-pairs))) (setq-local electric-pair-skip-whitespace 'chomp) diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 214bed7622..67d14872b3 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -263,7 +263,7 @@ This command assumes point is not in a string or comment." (backward-up-list arg) (kill-sexp) (insert current-sexp)) - (error "Not at a sexp")))) + (user-error "Not at a sexp")))) (defvar beginning-of-defun-function nil "If non-nil, function for `beginning-of-defun-raw' to call. @@ -714,7 +714,8 @@ character." (condition-case data ;; Buffer can't have more than (point-max) sexps. (scan-sexps (point-min) (point-max)) - (scan-error (goto-char (nth 2 data)) + (scan-error (push-mark) + (goto-char (nth 2 data)) ;; Could print (nth 1 data), which is either ;; "Containing expression ends prematurely" or ;; "Unbalanced parentheses", but those may not be so diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 797de9abb5..f0410f8744 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -297,6 +297,17 @@ definitions to shadow the loaded ones for use in file byte-compilation." ;;; Handy functions to use in macros. +(defun macroexp-parse-body (body) + "Parse a function BODY into (DECLARATIONS . EXPS)." + (let ((decls ())) + (while (and (cdr body) + (let ((e (car body))) + (or (stringp e) + (memq (car-safe e) + '(:documentation declare interactive cl-declare))))) + (push (pop body) decls)) + (cons (nreverse decls) body))) + (defun macroexp-progn (exps) "Return an expression equivalent to `(progn ,@EXPS)." (if (cdr exps) `(progn ,@exps) (car exps))) @@ -454,6 +465,8 @@ itself or not." (defvar macroexp--pending-eager-loads nil "Stack of files currently undergoing eager macro-expansion.") +(defvar macroexp--debug-eager nil) + (defun internal-macroexpand-for-load (form full-p) ;; Called from the eager-macroexpansion in readevalloop. (cond @@ -469,8 +482,10 @@ itself or not." (tail (member elem (cdr (member elem bt))))) (if tail (setcdr tail (list '…))) (if (eq (car-safe (car bt)) 'macroexpand-all) (setq bt (cdr bt))) - (message "Warning: Eager macro-expansion skipped due to cycle:\n %s" - (mapconcat #'prin1-to-string (nreverse bt) " => ")) + (if macroexp--debug-eager + (debug 'eager-macroexp-cycle) + (message "Warning: Eager macro-expansion skipped due to cycle:\n %s" + (mapconcat #'prin1-to-string (nreverse bt) " => "))) (push 'skip macroexp--pending-eager-loads) form)) (t diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el index e0945d47a4..6955ce8f5a 100644 --- a/lisp/emacs-lisp/package-x.el +++ b/lisp/emacs-lisp/package-x.el @@ -247,7 +247,7 @@ if it exists." (concat (symbol-name pkg-name) "-readme.txt") package-archive-upload-base))) - (set-buffer pkg-buffer) + (set-buffer (if (eq file-type 'tar) tar-data-buffer pkg-buffer)) (write-region (point-min) (point-max) (expand-file-name (format "%s-%s.%s" pkg-name pkg-version extension) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 88fc950ee2..32a3e015f0 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -161,6 +161,7 @@ ;;; Code: +(eval-when-compile (require 'subr-x)) (eval-when-compile (require 'cl-lib)) (eval-when-compile (require 'epg)) ;For setf accessors. @@ -172,6 +173,8 @@ :group 'applications :version "24.1") + +;;; Customization options ;;;###autoload (defcustom package-enable-at-startup t "Whether to activate installed packages when Emacs starts. @@ -203,12 +206,6 @@ If VERSION is nil, the package is not loaded (it is \"disabled\")." :group 'package :version "24.1") -(defvar Info-directory-list) -(declare-function info-initialize "info" ()) -(declare-function url-http-file-exists-p "url-http" (url)) -(declare-function lm-header "lisp-mnt" (header)) -(declare-function lm-commentary "lisp-mnt" (&optional file)) - (defcustom package-archives '(("gnu" . "http://elpa.gnu.org/packages/")) "An alist of archives from which to fetch. The default value points to the GNU Emacs package repository. @@ -269,17 +266,6 @@ the package will be unavailable." :group 'package :version "24.4") -(defconst package-archive-version 1 - "Version number of the package archive understood by this file. -Lower version numbers than this will probably be understood as well.") - -;; We don't prime the cache since it tends to get out of date. -(defvar package-archive-contents nil - "Cache of the contents of the Emacs Lisp Package Archive. -This is an alist mapping package names (symbols) to -non-empty lists of `package-desc' structures.") -(put 'package-archive-contents 'risky-local-variable t) - (defcustom package-user-dir (locate-user-emacs-file "elpa") "Directory containing the user's Emacs Lisp packages. The directory name should be absolute. @@ -295,8 +281,8 @@ packages in `package-directory-list'." (let (result) (dolist (f load-path) (and (stringp f) - (equal (file-name-nondirectory f) "site-lisp") - (push (expand-file-name "elpa" f) result))) + (equal (file-name-nondirectory f) "site-lisp") + (push (expand-file-name "elpa" f) result))) (nreverse result)) "List of additional directories containing Emacs Lisp packages. Each directory name should be absolute. @@ -320,8 +306,8 @@ it is unsigned. This also applies to the \"archive-contents\" file that lists the contents of the archive." :type '(choice (const nil :tag "Never") - (const allow-unsigned :tag "Allow unsigned") - (const t :tag "Check always")) + (const allow-unsigned :tag "Allow unsigned") + (const t :tag "Check always")) :risky t :group 'package :version "24.4") @@ -333,6 +319,28 @@ contents of the archive." :group 'package :version "24.4") +(defcustom package-selected-packages nil + "Store here packages installed explicitly by user. +This variable is fed automatically by Emacs when installing a new package. +This variable is used by `package-autoremove' to decide +which packages are no longer needed. +You can use it to (re)install packages on other machines +by running `package-user-selected-packages-install'. + +To check if a package is contained in this list here, use +`package--user-selected-p', as it may populate the variable with +a sane initial value." + :group 'package + :type '(repeat symbol)) + + +;;; `package-desc' object definition +;; This is the struct used internally to represent packages. +;; Functions that deal with packages should generally take this object +;; as an argument. In some situations (e.g. commands that query the +;; user) it makes sense to take the package name as a symbol instead, +;; but keep in mind there could be multiple `package-desc's with the +;; same name. (defvar package--default-summary "No description available.") (cl-defstruct (package-desc @@ -376,20 +384,20 @@ Slots: `version' Version of the package, as a version list. `summary' Short description of the package, typically taken from - the first line of the file. + the first line of the file. `reqs' Requirements of the package. A list of (PACKAGE - VERSION-LIST) naming the dependent package and the minimum - required version. + VERSION-LIST) naming the dependent package and the minimum + required version. `kind' The distribution format of the package. Currently, it is - either `single' or `tar'. + either `single' or `tar'. `archive' The name of the archive (as a string) whence this - package came. + package came. `dir' The directory where the package is installed (if installed), - `builtin' if it is built-in, or nil otherwise. + `builtin' if it is built-in, or nil otherwise. `extras' Optional alist of additional keyword-value pairs. @@ -404,7 +412,43 @@ Slots: extras signed) +(defun package--from-builtin (bi-desc) + (package-desc-create :name (pop bi-desc) + :version (package--bi-desc-version bi-desc) + :summary (package--bi-desc-summary bi-desc) + :dir 'builtin)) + ;; Pseudo fields. +(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 -4) + (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") + ((= num -4) "snapshot")) + str-list)))) + (if (equal "." (car str-list)) + (pop str-list)) + (apply 'concat (nreverse str-list))))) + (defun package-desc-full-name (pkg-desc) (format "%s-%s" (package-desc-name pkg-desc) @@ -431,6 +475,13 @@ Slots: reqs summary) + +;;; Installed packages +;; The following variables store information about packages present in +;; the system. The most important of these is `package-alist'. The +;; command `package-initialize' is also closely related to this +;; section, but it is left for a later section because it also affects +;; other stuff. (defvar package--builtins nil "Alist of built-in packages. The actual value is initialized by loading the library @@ -457,50 +508,44 @@ loaded and/or activated, customize `package-load-list'.") "List of the names of currently activated packages.") (put 'package-activated-list 'risky-local-variable t) -(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 -4) - (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") - ((= num -4) "snapshot")) - str-list)))) - (if (equal "." (car str-list)) - (pop str-list)) - (apply 'concat (nreverse str-list))))) +;;;; Populating `package-alist'. +;; The following functions are called on each installed package by +;; `package-load-all-descriptors', which ultimately populates the +;; `package-alist' variable. +(defun package-process-define-package (exp) + (when (eq (car-safe exp) 'define-package) + (let* ((new-pkg-desc (apply #'package-desc-from-define (cdr exp))) + (name (package-desc-name new-pkg-desc)) + (version (package-desc-version new-pkg-desc)) + (old-pkgs (assq name package-alist))) + (if (null old-pkgs) + ;; If there's no old package, just add this to `package-alist'. + (push (list name new-pkg-desc) package-alist) + ;; If there is, insert the new package at the right place in the list. + (while + (if (and (cdr old-pkgs) + (version-list-< version + (package-desc-version (cadr old-pkgs)))) + (setq old-pkgs (cdr old-pkgs)) + (push new-pkg-desc (cdr old-pkgs)) + nil))) + new-pkg-desc))) (defun package-load-descriptor (pkg-dir) "Load the description file in directory PKG-DIR." (let ((pkg-file (expand-file-name (package--description-file pkg-dir) pkg-dir)) - (signed-file (concat pkg-dir ".signed"))) + (signed-file (concat pkg-dir ".signed"))) (when (file-exists-p pkg-file) (with-temp-buffer (insert-file-contents pkg-file) (goto-char (point-min)) - (let ((pkg-desc (package-process-define-package - (read (current-buffer)) pkg-file))) + (let ((pkg-desc (or (package-process-define-package + (read (current-buffer))) + (error "Can't find define-package in %s" pkg-file)))) (setf (package-desc-dir pkg-desc) pkg-dir) - (if (file-exists-p signed-file) - (setf (package-desc-signed pkg-desc) t)) + (if (file-exists-p signed-file) + (setf (package-desc-signed pkg-desc) t)) pkg-desc))))) (defun package-load-all-descriptors () @@ -519,6 +564,24 @@ updates `package-alist'." (when (file-directory-p pkg-dir) (package-load-descriptor pkg-dir))))))) +(defun define-package (_name-string _version-string + &optional _docstring _requirements + &rest _extra-properties) + "Define a new package. +NAME-STRING is the name of the package, as a string. +VERSION-STRING is the version of the package, as a string. +DOCSTRING is a short description of the package, a string. +REQUIREMENTS is a list of dependencies on other packages. + Each requirement is of the form (OTHER-PACKAGE OTHER-VERSION), + where OTHER-VERSION is a string. + +EXTRA-PROPERTIES is currently unused." + ;; FIXME: Placeholder! Should we keep it? + (error "Don't call me!")) + + +;;; Package activation +;; Section for functions used by `package-activate', which see. (defun package-disabled-p (pkg-name version) "Return whether PKG-NAME at VERSION can be activated. The decision is made according to `package-load-list'. @@ -534,17 +597,34 @@ Return the max version (as a string) if the package is held at a lower version." force)) (t (error "Invalid element in `package-load-list'"))))) +(defun package-built-in-p (package &optional min-version) + "Return true if PACKAGE is built-in to Emacs. +Optional arg MIN-VERSION, if non-nil, should be a version list +specifying the minimum acceptable version." + (if (package-desc-p package) ;; was built-in and then was converted + (eq 'builtin (package-desc-dir package)) + (let ((bi (assq package package--builtin-versions))) + (cond + (bi (version-list-<= min-version (cdr bi))) + ((remove 0 min-version) nil) + (t + (require 'finder-inf nil t) ; For `package--builtins'. + (assq package package--builtins)))))) + +(defvar Info-directory-list) +(declare-function info-initialize "info" ()) + (defun package-activate-1 (pkg-desc &optional reload) "Activate package given by PKG-DESC, even if it was already active. If RELOAD is non-nil, also `load' any files inside the package which correspond to previously loaded files (those returned by `package--list-loaded-files')." (let* ((name (package-desc-name pkg-desc)) - (pkg-dir (package-desc-dir pkg-desc)) + (pkg-dir (package-desc-dir pkg-desc)) (pkg-dir-dir (file-name-as-directory pkg-dir))) (unless pkg-dir (error "Internal error: unable to find directory for `%s'" - (package-desc-full-name pkg-desc))) + (package-desc-full-name pkg-desc))) ;; Add to load path, add autoloads, and activate the package. (let* ((old-lp load-path) (autoloads-file (expand-file-name @@ -564,7 +644,7 @@ correspond to previously loaded files (those returned by ;; depends on this new definition, not doing this update would cause ;; compilation errors and break the installation. (with-demoted-errors "Error in package-activate-1: %s" - (mapc (lambda (feature) (load feature nil t)) + (mapc (lambda (feature) (load feature nil t)) ;; Skip autoloads file since we already evaluated it above. (remove (file-truename autoloads-file) loaded-files-list)))) ;; Add info node. @@ -578,6 +658,7 @@ correspond to previously loaded files (those returned by t)) (declare-function find-library-name "find-func" (library)) + (defun package--list-loaded-files (dir) "Recursively list all files in DIR which correspond to loaded features. Returns the `file-name-sans-extension' of each file, relative to @@ -612,33 +693,14 @@ DIR, sorted by most recently loaded last." ;; Sort the files by ascending HISTORY-POSITION. (lambda (x y) (< (cdr x) (cdr y)))))))) -(defun package-built-in-p (package &optional min-version) - "Return true if PACKAGE is built-in to Emacs. -Optional arg MIN-VERSION, if non-nil, should be a version list -specifying the minimum acceptable version." - (if (package-desc-p package) ;; was built-in and then was converted - (eq 'builtin (package-desc-dir package)) - (let ((bi (assq package package--builtin-versions))) - (cond - (bi (version-list-<= min-version (cdr bi))) - ((remove 0 min-version) nil) - (t - (require 'finder-inf nil t) ; For `package--builtins'. - (assq package package--builtins)))))) - -(defun package--from-builtin (bi-desc) - (package-desc-create :name (pop bi-desc) - :version (package--bi-desc-version bi-desc) - :summary (package--bi-desc-summary bi-desc) - :dir 'builtin)) - -;; This function goes ahead and activates a newer version of a package -;; if an older one was already activated. This is not ideal; we'd at -;; least need to check to see if the package has actually been loaded, -;; and not merely activated. +;;;; `package-activate' +;; This function activates a newer version of a package if an older +;; one was already activated. It also loads a features of this +;; package which were already loaded. (defun package-activate (package &optional force) "Activate package PACKAGE. -If FORCE is true, (re-)activate it if it's already activated." +If FORCE is true, (re-)activate it if it's already activated. +Newer versions are always activated, regardless of FORCE." (let ((pkg-descs (cdr (assq package package-alist)))) ;; Check if PACKAGE is available in `package-alist'. (while @@ -663,83 +725,21 @@ If FORCE is true, (re-)activate it if it's already activated." (dolist (req (package-desc-reqs pkg-vec)) (unless (package-activate (car req)) (throw 'dep-failure req)))))) - (if fail - (warn "Unable to activate package `%s'. + (if fail + (warn "Unable to activate package `%s'. Required package `%s-%s' is unavailable" - package (car fail) (package-version-join (cadr fail))) - ;; If all goes well, activate the package itself. - (package-activate-1 pkg-vec force))))))) - -(defun define-package (_name-string _version-string - &optional _docstring _requirements - &rest _extra-properties) - "Define a new package. -NAME-STRING is the name of the package, as a string. -VERSION-STRING is the version of the package, as a string. -DOCSTRING is a short description of the package, a string. -REQUIREMENTS is a list of dependencies on other packages. - Each requirement is of the form (OTHER-PACKAGE OTHER-VERSION), - where OTHER-VERSION is a string. - -EXTRA-PROPERTIES is currently unused." - ;; FIXME: Placeholder! Should we keep it? - (error "Don't call me!")) - -(defun package-process-define-package (exp origin) - (unless (eq (car-safe exp) 'define-package) - (error "Can't find define-package in %s" origin)) - (let* ((new-pkg-desc (apply #'package-desc-from-define (cdr exp))) - (name (package-desc-name new-pkg-desc)) - (version (package-desc-version new-pkg-desc)) - (old-pkgs (assq name package-alist))) - (if (null old-pkgs) - ;; If there's no old package, just add this to `package-alist'. - (push (list name new-pkg-desc) package-alist) - ;; If there is, insert the new package at the right place in the list. - (while - (if (and (cdr old-pkgs) - (version-list-< version - (package-desc-version (cadr old-pkgs)))) - (setq old-pkgs (cdr old-pkgs)) - (push new-pkg-desc (cdr old-pkgs)) - nil))) - new-pkg-desc)) - -;; From Emacs 22, but changed so it adds to load-path. -(defun package-autoload-ensure-default-file (file) - "Make sure that the autoload file FILE exists and if not create it." - (unless (file-exists-p file) - (write-region - (concat ";;; " (file-name-nondirectory file) - " --- automatically extracted autoloads\n" - ";;\n" - ";;; Code:\n" - "(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))\n" - " \n;; Local Variables:\n" - ";; version-control: never\n" - ";; no-byte-compile: t\n" - ";; no-update-autoloads: t\n" - ";; End:\n" - ";;; " (file-name-nondirectory file) - " ends here\n") - nil file nil 'silent)) - file) - -(defvar generated-autoload-file) -(defvar version-control) + package (car fail) (package-version-join (cadr fail))) + ;; If all goes well, activate the package itself. + (package-activate-1 pkg-vec force))))))) -(defun package-generate-autoloads (name pkg-dir) - (let* ((auto-name (format "%s-autoloads.el" name)) - ;;(ignore-name (concat name "-pkg.el")) - (generated-autoload-file (expand-file-name auto-name pkg-dir)) - (backup-inhibited t) - (version-control 'never)) - (package-autoload-ensure-default-file generated-autoload-file) - (update-directory-autoloads pkg-dir) - (let ((buf (find-buffer-visiting generated-autoload-file))) - (when buf (kill-buffer buf))) - auto-name)) + +;;; Installation -- Local operations +;; This section contains a variety of features regarding installing a +;; package to/from disk. This includes autoload generation, +;; unpacking, compiling, as well as defining a package from the +;; current buffer. +;;;; Unpacking (defvar tar-parse-info) (declare-function tar-untar-buffer "tar-mode" ()) (declare-function tar-header-name "tar-mode" (tar-header) t) @@ -753,45 +753,17 @@ untar into a directory named DIR; otherwise, signal an error." (tar-mode) ;; Make sure everything extracts into DIR. (let ((regexp (concat "\\`" (regexp-quote (expand-file-name dir)) "/")) - (case-fold-search (memq system-type '(windows-nt ms-dos cygwin)))) + (case-fold-search (memq system-type '(windows-nt ms-dos cygwin)))) (dolist (tar-data tar-parse-info) (let ((name (expand-file-name (tar-header-name tar-data)))) - (or (string-match regexp name) - ;; Tarballs created by some utilities don't list - ;; directories with a trailing slash (Bug#13136). - (and (string-equal dir name) - (eq (tar-header-link-type tar-data) 5)) - (error "Package does not untar cleanly into directory %s/" dir))))) + (or (string-match regexp name) + ;; Tarballs created by some utilities don't list + ;; directories with a trailing slash (Bug#13136). + (and (string-equal dir name) + (eq (tar-header-link-type tar-data) 5)) + (error "Package does not untar cleanly into directory %s/" dir))))) (tar-untar-buffer)) -(defun package-generate-description-file (pkg-desc pkg-file) - "Create the foo-pkg.el file for single-file packages." - (let* ((name (package-desc-name pkg-desc))) - (let ((print-level nil) - (print-quoted t) - (print-length nil)) - (write-region - (concat - ";;; -*- no-byte-compile: t -*-\n" - (prin1-to-string - (nconc - (list 'define-package - (symbol-name name) - (package-version-join (package-desc-version pkg-desc)) - (package-desc-summary pkg-desc) - (let ((requires (package-desc-reqs pkg-desc))) - (list 'quote - ;; Turn version lists into string form. - (mapcar - (lambda (elt) - (list (car elt) - (package-version-join (cadr elt)))) - requires)))) - (package--alist-to-plist-args - (package-desc-extras pkg-desc)))) - "\n") - nil pkg-file nil 'silent)))) - (defun package--alist-to-plist-args (alist) (mapcar 'macroexp-quote (apply #'nconc @@ -800,7 +772,7 @@ untar into a directory named DIR; otherwise, signal an error." "Install the contents of the current buffer as a package." (let* ((name (package-desc-name pkg-desc)) (dirname (package-desc-full-name pkg-desc)) - (pkg-dir (expand-file-name dirname package-user-dir))) + (pkg-dir (expand-file-name dirname package-user-dir))) (pcase (package-desc-kind pkg-desc) (`dir (make-directory pkg-dir t) @@ -838,6 +810,70 @@ untar into a directory named DIR; otherwise, signal an error." (package-activate name 'force) pkg-dir)) +(defun package-generate-description-file (pkg-desc pkg-file) + "Create the foo-pkg.el file for single-file packages." + (let* ((name (package-desc-name pkg-desc))) + (let ((print-level nil) + (print-quoted t) + (print-length nil)) + (write-region + (concat + ";;; -*- no-byte-compile: t -*-\n" + (prin1-to-string + (nconc + (list 'define-package + (symbol-name name) + (package-version-join (package-desc-version pkg-desc)) + (package-desc-summary pkg-desc) + (let ((requires (package-desc-reqs pkg-desc))) + (list 'quote + ;; Turn version lists into string form. + (mapcar + (lambda (elt) + (list (car elt) + (package-version-join (cadr elt)))) + requires)))) + (package--alist-to-plist-args + (package-desc-extras pkg-desc)))) + "\n") + nil pkg-file nil 'silent)))) + +;;;; Autoload +;; From Emacs 22, but changed so it adds to load-path. +(defun package-autoload-ensure-default-file (file) + "Make sure that the autoload file FILE exists and if not create it." + (unless (file-exists-p file) + (write-region + (concat ";;; " (file-name-nondirectory file) + " --- automatically extracted autoloads\n" + ";;\n" + ";;; Code:\n" + "(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))\n" + " \n;; Local Variables:\n" + ";; version-control: never\n" + ";; no-byte-compile: t\n" + ";; no-update-autoloads: t\n" + ";; End:\n" + ";;; " (file-name-nondirectory file) + " ends here\n") + nil file nil 'silent)) + file) + +(defvar generated-autoload-file) +(defvar version-control) + +(defun package-generate-autoloads (name pkg-dir) + (let* ((auto-name (format "%s-autoloads.el" name)) + ;;(ignore-name (concat name "-pkg.el")) + (generated-autoload-file (expand-file-name auto-name pkg-dir)) + (backup-inhibited t) + (version-control 'never)) + (package-autoload-ensure-default-file generated-autoload-file) + (update-directory-autoloads pkg-dir) + (let ((buf (find-buffer-visiting generated-autoload-file))) + (when buf (kill-buffer buf))) + auto-name)) + (defun package--make-autoloads-and-stuff (pkg-desc pkg-dir) "Generate autoloads, description file, etc.. for PKG-DESC installed at PKG-DIR." (package-generate-autoloads (package-desc-name pkg-desc) pkg-dir) @@ -848,49 +884,169 @@ untar into a directory named DIR; otherwise, signal an error." ;; FIXME: Create foo.info and dir file from foo.texi? ) +;;;; Compilation (defun package--compile (pkg-desc) "Byte-compile installed package PKG-DESC." (package-activate-1 pkg-desc) (byte-recompile-directory (package-desc-dir pkg-desc) 0 t)) -(defun package--write-file-no-coding (file-name) - (let ((buffer-file-coding-system 'no-conversion)) - (write-region (point-min) (point-max) file-name nil 'silent))) - -(defmacro package--with-work-buffer (location file &rest body) - "Run BODY in a buffer containing the contents of FILE at LOCATION. -LOCATION is the base location of a package archive, and should be -one of the URLs (or file names) specified in `package-archives'. -FILE is the name of a file relative to that base location. - -This macro retrieves FILE from LOCATION into a temporary buffer, -and evaluates BODY while that buffer is current. This work -buffer is killed afterwards. Return the last value in BODY." - (declare (indent 2) (debug t)) - `(with-temp-buffer - (if (string-match-p "\\`https?:" ,location) - (url-insert-file-contents (concat ,location ,file)) - (unless (file-name-absolute-p ,location) - (error "Archive location %s is not an absolute file name" - ,location)) - (insert-file-contents (expand-file-name ,file ,location))) - ,@body)) +;;;; Inferring package from current buffer +(defun package-read-from-string (str) + "Read a Lisp expression from STR. +Signal an error if the entire string was not used." + (let* ((read-data (read-from-string str)) + (more-left + (condition-case nil + ;; The call to `ignore' suppresses a compiler warning. + (progn (ignore (read-from-string + (substring str (cdr read-data)))) + t) + (end-of-file nil)))) + (if more-left + (error "Can't read whole string") + (car read-data)))) -(defun package--archive-file-exists-p (location file) - (let ((http (string-match "\\`https?:" location))) - (if http - (progn - (require 'url-http) - (url-http-file-exists-p (concat location file))) - (file-exists-p (expand-file-name file location))))) +(defun package--prepare-dependencies (deps) + "Turn DEPS into an acceptable list of dependencies. + +Any parts missing a version string get a default version string +of \"0\" (meaning any version) and an appropriate level of lists +is wrapped around any parts requiring it." + (cond + ((not (listp deps)) + (error "Invalid requirement specifier: %S" deps)) + (t (mapcar (lambda (dep) + (cond + ((symbolp dep) `(,dep "0")) + ((stringp dep) + (error "Invalid requirement specifier: %S" dep)) + ((and (listp dep) (null (cdr dep))) + (list (car dep) "0")) + (t dep))) + deps)))) + +(declare-function lm-header "lisp-mnt" (header)) +(declare-function lm-homepage "lisp-mnt" ()) + +(defun package-buffer-info () + "Return a `package-desc' describing the package in the current buffer. + +If the buffer does not contain a conforming package, signal an +error. If there is a package, narrow the buffer to the file's +boundaries." + (goto-char (point-min)) + (unless (re-search-forward "^;;; \\([^ ]*\\)\\.el ---[ \t]*\\(.*?\\)[ \t]*\\(-\\*-.*-\\*-[ \t]*\\)?$" nil t) + (error "Package lacks a file header")) + (let ((file-name (match-string-no-properties 1)) + (desc (match-string-no-properties 2)) + (start (line-beginning-position))) + (unless (search-forward (concat ";;; " file-name ".el ends here")) + (error "Package lacks a terminating comment")) + ;; Try to include a trailing newline. + (forward-line) + (narrow-to-region start (point)) + (require 'lisp-mnt) + ;; Use some headers we've invented to drive the process. + (let* ((requires-str (lm-header "package-requires")) + ;; Prefer Package-Version; if defined, the package author + ;; probably wants us to use it. Otherwise try Version. + (pkg-version + (or (package-strip-rcs-id (lm-header "package-version")) + (package-strip-rcs-id (lm-header "version")))) + (homepage (lm-homepage))) + (unless pkg-version + (error + "Package lacks a \"Version\" or \"Package-Version\" header")) + (package-desc-from-define + file-name pkg-version desc + (if requires-str + (package--prepare-dependencies + (package-read-from-string requires-str))) + :kind 'single + :url homepage)))) + +(defun package--read-pkg-desc (kind) + "Read a `define-package' form in current buffer. +Return the pkg-desc, with desc-kind set to KIND." + (goto-char (point-min)) + (unwind-protect + (let* ((pkg-def-parsed (read (current-buffer))) + (pkg-desc + (when (eq (car pkg-def-parsed) 'define-package) + (apply #'package-desc-from-define + (append (cdr pkg-def-parsed)))))) + (when pkg-desc + (setf (package-desc-kind pkg-desc) kind) + pkg-desc)))) + +(declare-function tar-get-file-descriptor "tar-mode" (file)) +(declare-function tar--extract "tar-mode" (descriptor)) + +(defun package-tar-file-info () + "Find package information for a tar file. +The return result is a `package-desc'." + (cl-assert (derived-mode-p 'tar-mode)) + (let* ((dir-name (file-name-directory + (tar-header-name (car tar-parse-info)))) + (desc-file (package--description-file dir-name)) + (tar-desc (tar-get-file-descriptor (concat dir-name desc-file)))) + (unless tar-desc + (error "No package descriptor file found")) + (with-current-buffer (tar--extract tar-desc) + (unwind-protect + (or (package--read-pkg-desc 'tar) + (error "Can't find define-package in %s" + (tar-header-name tar-desc))) + (kill-buffer (current-buffer)))))) + +(defun package-dir-info () + "Find package information for a directory. +The return result is a `package-desc'." + (cl-assert (derived-mode-p 'dired-mode)) + (let* ((desc-file (package--description-file default-directory))) + (if (file-readable-p desc-file) + (with-temp-buffer + (insert-file-contents desc-file) + (package--read-pkg-desc 'dir)) + (let ((files (directory-files default-directory t "\\.el\\'" t)) + info) + (while files + (with-temp-buffer + (insert-file-contents (pop files)) + ;; When we find the file with the data, + (when (setq info (ignore-errors (package-buffer-info))) + ;; stop looping, + (setq files nil) + ;; set the 'dir kind, + (setf (package-desc-kind info) 'dir)))) + ;; and return the info. + info)))) + + +;;; Communicating with Archives +;; Set of low-level functions for communicating with archives and +;; signature checking. +(defun package--write-file-no-coding (file-name) + (let ((buffer-file-coding-system 'no-conversion)) + (write-region (point-min) (point-max) file-name nil 'silent))) + +(declare-function url-http-file-exists-p "url-http" (url)) + +(defun package--archive-file-exists-p (location file) + (let ((http (string-match "\\`https?:" location))) + (if http + (progn + (require 'url-http) + (url-http-file-exists-p (concat location file))) + (file-exists-p (expand-file-name file location))))) (declare-function epg-make-context "epg" - (&optional protocol armor textmode include-certs - cipher-algorithm - digest-algorithm - compress-algorithm)) + (&optional protocol armor textmode include-certs + cipher-algorithm + digest-algorithm + compress-algorithm)) (declare-function epg-verify-string "epg" (context signature - &optional signed-text)) + &optional signed-text)) (declare-function epg-context-result-for "epg" (context name)) (declare-function epg-signature-status "epg" (signature)) (declare-function epg-signature-to-string "epg" (signature)) @@ -899,98 +1055,402 @@ buffer is killed afterwards. Return the last value in BODY." (unless (equal (epg-context-error-output context) "") (with-output-to-temp-buffer "*Error*" (with-current-buffer standard-output - (if (epg-context-result-for context 'verify) - (insert (format "Failed to verify signature %s:\n" sig-file) - (mapconcat #'epg-signature-to-string - (epg-context-result-for context 'verify) - "\n")) - (insert (format "Error while verifying signature %s:\n" sig-file))) - (insert "\nCommand output:\n" (epg-context-error-output context)))))) - -(defun package--check-signature (location file) - "Check signature of the current buffer. -GnuPG keyring is located under \"gnupg\" in `package-user-dir'." + (if (epg-context-result-for context 'verify) + (insert (format "Failed to verify signature %s:\n" sig-file) + (mapconcat #'epg-signature-to-string + (epg-context-result-for context 'verify) + "\n")) + (insert (format "Error while verifying signature %s:\n" sig-file))) + (insert "\nCommand output:\n" (epg-context-error-output context)))))) + +(defmacro package--with-work-buffer (location file &rest body) + "Run BODY in a buffer containing the contents of FILE at LOCATION. +LOCATION is the base location of a package archive, and should be +one of the URLs (or file names) specified in `package-archives'. +FILE is the name of a file relative to that base location. + +This macro retrieves FILE from LOCATION into a temporary buffer, +and evaluates BODY while that buffer is current. This work +buffer is killed afterwards. Return the last value in BODY." + (declare (indent 2) (debug t)) + `(with-temp-buffer + (if (string-match-p "\\`https?:" ,location) + (url-insert-file-contents (concat ,location ,file)) + (unless (file-name-absolute-p ,location) + (error "Archive location %s is not an absolute file name" + ,location)) + (insert-file-contents (expand-file-name ,file ,location))) + ,@body)) + +(defmacro package--with-work-buffer-async (location file async &rest body) + "Run BODY in a buffer containing the contents of FILE at LOCATION. +If ASYNC is non-nil, and if it is possible, run BODY +asynchronously. If an error is encountered and ASYNC is a +function, call it with no arguments (instead of executing BODY), +otherwise propagate the error. For description of the other +arguments see `package--with-work-buffer'." + (declare (indent 3) (debug t)) + (macroexp-let2* macroexp-copyable-p + ((async-1 async) + (file-1 file) + (location-1 location)) + `(if (or (not ,async-1) + (not (string-match-p "\\`https?:" ,location-1))) + (package--with-work-buffer ,location-1 ,file-1 ,@body) + (url-retrieve (concat ,location-1 ,file-1) + (lambda (status) + (if (eq (car status) :error) + (if (functionp ,async-1) + (funcall ,async-1) + (signal (cdar status) (cddr status))) + (goto-char (point-min)) + (unless (search-forward "\n\n" nil 'noerror) + (error "Invalid url response")) + (delete-region (point-min) (point)) + ,@body) + (kill-buffer (current-buffer))) + nil + 'silent)))) + +(defun package--check-signature-content (content string &optional sig-file) + "Check signature CONTENT against STRING. +SIG-FILE is the name of the signature file, used when signaling +errors." (let* ((context (epg-make-context 'OpenPGP)) - (homedir (expand-file-name "gnupg" package-user-dir)) - (sig-file (concat file ".sig")) - (sig-content (package--with-work-buffer location sig-file - (buffer-string)))) + (homedir (expand-file-name "gnupg" package-user-dir))) (setf (epg-context-home-directory context) homedir) (condition-case error - (epg-verify-string context sig-content (buffer-string)) - (error - (package--display-verify-error context sig-file) - (signal (car error) (cdr error)))) + (epg-verify-string context content string) + (error (package--display-verify-error context sig-file) + (signal (car error) (cdr error)))) (let (good-signatures had-fatal-error) ;; The .sig file may contain multiple signatures. Success if one ;; of the signatures is good. (dolist (sig (epg-context-result-for context 'verify)) - (if (eq (epg-signature-status sig) 'good) - (push sig good-signatures) - ;; If package-check-signature is allow-unsigned, don't - ;; signal error when we can't verify signature because of - ;; missing public key. Other errors are still treated as - ;; fatal (bug#17625). - (unless (and (eq package-check-signature 'allow-unsigned) - (eq (epg-signature-status sig) 'no-pubkey)) - (setq had-fatal-error t)))) + (if (eq (epg-signature-status sig) 'good) + (push sig good-signatures) + ;; If package-check-signature is allow-unsigned, don't + ;; signal error when we can't verify signature because of + ;; missing public key. Other errors are still treated as + ;; fatal (bug#17625). + (unless (and (eq package-check-signature 'allow-unsigned) + (eq (epg-signature-status sig) 'no-pubkey)) + (setq had-fatal-error t)))) (when (and (null good-signatures) had-fatal-error) - (package--display-verify-error context sig-file) - (error "Failed to verify signature %s" sig-file)) + (package--display-verify-error context sig-file) + (error "Failed to verify signature %s" sig-file)) good-signatures))) -(defun package-install-from-archive (pkg-desc) - "Download and install a tar package." - ;; This won't happen, unless the archive is doing something wrong. - (when (eq (package-desc-kind pkg-desc) 'dir) - (error "Can't install directory package from archive")) - (let* ((location (package-archive-base pkg-desc)) - (file (concat (package-desc-full-name pkg-desc) - (package-desc-suffix pkg-desc))) - (sig-file (concat file ".sig")) - good-signatures pkg-descs) - (package--with-work-buffer location file - (if (and package-check-signature - (not (member (package-desc-archive pkg-desc) - package-unsigned-archives))) - (if (package--archive-file-exists-p location sig-file) - (setq good-signatures (package--check-signature location file)) - (unless (eq package-check-signature 'allow-unsigned) - (error "Unsigned package: `%s'" - (package-desc-name pkg-desc))))) - (package-unpack pkg-desc)) - ;; Here the package has been installed successfully, mark it as - ;; signed if appropriate. - (when good-signatures - ;; Write out good signatures into NAME-VERSION.signed file. - (write-region (mapconcat #'epg-signature-to-string good-signatures "\n") - nil - (expand-file-name - (concat (package-desc-full-name pkg-desc) - ".signed") - package-user-dir) - nil 'silent) - ;; Update the old pkg-desc which will be shown on the description buffer. - (setf (package-desc-signed pkg-desc) t) - ;; Update the new (activated) pkg-desc as well. - (setq pkg-descs (cdr (assq (package-desc-name pkg-desc) package-alist))) - (if pkg-descs - (setf (package-desc-signed (car pkg-descs)) t))))) +(defun package--check-signature (location file &optional string async callback) + "Check signature of the current buffer. +Download the signature file from LOCATION by appending \".sig\" +to FILE. +GnuPG keyring is located under \"gnupg\" in `package-user-dir'. +STRING is the string to verify, it defaults to `buffer-string'. +If ASYNC is non-nil, the download of the signature file is +done asynchronously. + +If the signature is verified and CALLBACK was provided, CALLBACK +is `funcall'ed with the list of good signatures as argument (the +list can be empty). If the signatures file is not found, +CALLBACK is called with no arguments." + (let ((sig-file (concat file ".sig")) + (string (or string (buffer-string)))) + (condition-case nil + (package--with-work-buffer-async + location sig-file (when async (or callback t)) + (let ((sig (package--check-signature-content + (buffer-string) string sig-file))) + (when callback (funcall callback sig)) + sig)) + (file-error (funcall callback))))) + + +;;; Packages on Archives +;; The following variables store information about packages available +;; from archives. The most important of these is +;; `package-archive-contents' which is initially populated by the +;; function `package-read-all-archive-contents' from a cache on disk. +;; The `package-initialize' command is also closely related to this +;; section, but it has its own section. +(defconst package-archive-version 1 + "Version number of the package archive understood by this file. +Lower version numbers than this will probably be understood as well.") + +;; We don't prime the cache since it tends to get out of date. +(defvar package-archive-contents nil + "Cache of the contents of the Emacs Lisp Package Archive. +This is an alist mapping package names (symbols) to +non-empty lists of `package-desc' structures.") +(put 'package-archive-contents 'risky-local-variable t) + +(defvar package--compatibility-table nil + "Hash table connecting package names to their compatibility. +Each key is a symbol, the name of a package. + +The value is either nil, representing an incompatible package, or +a version list, representing the highest compatible version of +that package which is available. + +A package is considered incompatible if it requires an Emacs +version higher than the one being used. To check for package +\(in)compatibility, don't read this table directly, use +`package--incompatible-p' which also checks dependencies.") + +(defun package--build-compatibility-table () + "Build `package--compatibility-table' with `package--mapc'." + ;; Build compat table. + (setq package--compatibility-table (make-hash-table :test 'eq)) + (package--mapc #'package--add-to-compatibility-table)) + +(defun package--add-to-compatibility-table (pkg) + "If PKG is compatible (without dependencies), add to the compatibility table. +PKG is a package-desc object. +Only adds if its version is higher than what's already stored in +the table." + (unless (package--incompatible-p pkg 'shallow) + (let* ((name (package-desc-name pkg)) + (version (or (package-desc-version pkg) '(0))) + (table-version (gethash name package--compatibility-table))) + (when (or (not table-version) + (version-list-< table-version version)) + (puthash name version package--compatibility-table))))) + +;; Package descriptor objects used inside the "archive-contents" file. +;; Changing this defstruct implies changing the format of the +;; "archive-contents" files. +(cl-defstruct (package--ac-desc + (:constructor package-make-ac-desc (version reqs summary kind extras)) + (:copier nil) + (:type vector)) + version reqs summary kind extras) + +(defun package--append-to-alist (pkg-desc alist) + "Append an entry for PKG-DESC to the start of ALIST and return it. +This entry takes the form (`package-desc-name' PKG-DESC). + +If ALIST already has an entry with this name, destructively add +PKG-DESC to the cdr of this entry instead, sorted by version +number." + (let* ((name (package-desc-name pkg-desc)) + (priority-version (package-desc-priority-version pkg-desc)) + (existing-packages (assq name alist))) + (if (not existing-packages) + (cons (list name pkg-desc) + alist) + (while (if (and (cdr existing-packages) + (version-list-< priority-version + (package-desc-priority-version + (cadr existing-packages)))) + (setq existing-packages (cdr existing-packages)) + (push pkg-desc (cdr existing-packages)) + nil)) + alist))) + +(defun package--add-to-archive-contents (package archive) + "Add the PACKAGE from the given ARCHIVE if necessary. +PACKAGE should have the form (NAME . PACKAGE--AC-DESC). +Also, add the originating archive to the `package-desc' structure." + (let* ((name (car package)) + (version (package--ac-desc-version (cdr package))) + (pkg-desc + (package-desc-create + :name name + :version version + :reqs (package--ac-desc-reqs (cdr package)) + :summary (package--ac-desc-summary (cdr package)) + :kind (package--ac-desc-kind (cdr package)) + :archive archive + :extras (and (> (length (cdr package)) 4) + ;; Older archive-contents files have only 4 + ;; elements here. + (package--ac-desc-extras (cdr package))))) + (pinned-to-archive (assoc name package-pinned-packages))) + ;; Skip entirely if pinned to another archive. + (when (not (and pinned-to-archive + (not (equal (cdr pinned-to-archive) archive)))) + (setq package-archive-contents + (package--append-to-alist pkg-desc package-archive-contents))))) + +(defun package--read-archive-file (file) + "Re-read archive file FILE, if it exists. +Will return the data from the file, or nil if the file does not exist. +Will throw an error if the archive version is too new." + (let ((filename (expand-file-name file package-user-dir))) + (when (file-exists-p filename) + (with-temp-buffer + (insert-file-contents-literally filename) + (let ((contents (read (current-buffer)))) + (if (> (car contents) package-archive-version) + (error "Package archive version %d is higher than %d" + (car contents) package-archive-version)) + (cdr contents)))))) + +(defun package-read-archive-contents (archive) + "Re-read archive contents for ARCHIVE. +If successful, set the variable `package-archive-contents'. +If the archive version is too new, signal an error." + ;; Version 1 of 'archive-contents' is identical to our internal + ;; representation. + (let* ((contents-file (format "archives/%s/archive-contents" archive)) + (contents (package--read-archive-file contents-file))) + (when contents + (dolist (package contents) + (package--add-to-archive-contents package archive))))) +(defun package-read-all-archive-contents () + "Re-read `archive-contents', if it exists. +If successful, set `package-archive-contents'." + (setq package-archive-contents nil) + (dolist (archive package-archives) + (package-read-archive-contents (car archive)))) + +;;;; Package Initialize +;; A bit of a milestone. This brings together some of the above +;; sections and populates all relevant lists of packages from contents +;; available on disk. (defvar package--initialized nil) -(defun package-installed-p (package &optional min-version) - "Return true if PACKAGE, of MIN-VERSION or newer, is installed. -MIN-VERSION should be a version list." - (unless package--initialized (error "package.el is not yet initialized!")) - (or - (let ((pkg-descs (cdr (assq package package-alist)))) - (and pkg-descs - (version-list-<= min-version - (package-desc-version (car pkg-descs))))) - ;; Also check built-in packages. - (package-built-in-p package min-version))) +;;;###autoload +(defun package-initialize (&optional no-activate) + "Load Emacs Lisp packages, and activate them. +The variable `package-load-list' controls which packages to load. +If optional arg NO-ACTIVATE is non-nil, don't activate packages." + (interactive) + (setq package-alist nil) + (package-load-all-descriptors) + (package-read-all-archive-contents) + (unless no-activate + (dolist (elt package-alist) + (package-activate (car elt)))) + (setq package--initialized t) + ;; This uses `package--mapc' so it must be called after + ;; `package--initialized' is t. + (package--build-compatibility-table)) + + +;;;; Populating `package-archive-contents' from archives +;; This subsection populates the variables listed above from the +;; actual archives, instead of from a local cache. +(defvar package--downloads-in-progress nil + "List of in-progress asynchronous downloads.") +(declare-function epg-check-configuration "epg-config" + (config &optional minimum-version)) +(declare-function epg-configuration "epg-config" ()) +(declare-function epg-import-keys-from-file "epg" (context keys)) + +;;;###autoload +(defun package-import-keyring (&optional file) + "Import keys from FILE." + (interactive "fFile: ") + (setq file (expand-file-name file)) + (let ((context (epg-make-context 'OpenPGP)) + (homedir (expand-file-name "gnupg" package-user-dir))) + (with-file-modes 448 + (make-directory homedir t)) + (setf (epg-context-home-directory context) homedir) + (message "Importing %s..." (file-name-nondirectory file)) + (epg-import-keys-from-file context file) + (message "Importing %s...done" (file-name-nondirectory file)))) + +(defvar package--post-download-archives-hook nil + "Hook run after the archive contents are downloaded. +Don't run this hook directly. It is meant to be run as part of +`package--update-downloads-in-progress'.") +(put 'package--post-download-archives-hook 'risky-local-variable t) + +(defun package--update-downloads-in-progress (entry) + "Remove ENTRY from `package--downloads-in-progress'. +Once it's empty, run `package--post-download-archives-hook'." + ;; Keep track of the downloading progress. + (setq package--downloads-in-progress + (remove entry package--downloads-in-progress)) + ;; If this was the last download, run the hook. + (unless package--downloads-in-progress + (package--build-compatibility-table) + (package-read-all-archive-contents) + ;; We message before running the hook, so the hook can give + ;; messages as well. + (message "Package refresh done") + (run-hooks 'package--post-download-archives-hook))) + +(defun package--download-one-archive (archive file &optional async) + "Retrieve an archive file FILE from ARCHIVE, and cache it. +ARCHIVE should be a cons cell of the form (NAME . LOCATION), +similar to an entry in `package-alist'. Save the cached copy to +\"archives/NAME/FILE\" in `package-user-dir'." + (package--with-work-buffer-async (cdr archive) file async + (let* ((location (cdr archive)) + (name (car archive)) + (content (buffer-string)) + (dir (expand-file-name (format "archives/%s" name) package-user-dir)) + (local-file (expand-file-name file dir))) + (when (listp (read-from-string content)) + (make-directory dir t) + (if (or (not package-check-signature) + (member archive package-unsigned-archives)) + ;; If we don't care about the signature, save the file and + ;; we're done. + (progn (write-region content nil local-file nil 'silent) + (package--update-downloads-in-progress archive)) + ;; If we care, check it (perhaps async) and *then* write the file. + (package--check-signature + location file content async + (lambda (&optional good-sigs) + (unless (or good-sigs (eq package-check-signature 'allow-unsigned)) + (error "Unsigned archive `%s'" name)) + ;; Write out the archives file. + (write-region content nil local-file nil 'silent) + ;; Write out good signatures into archive-contents.signed file. + (when good-sigs + (write-region (mapconcat #'epg-signature-to-string good-sigs "\n") + nil (concat local-file ".signed") nil 'silent)) + (package--update-downloads-in-progress archive)))))))) + +(defun package--download-and-read-archives (&optional async) + "Download descriptions of all `package-archives' and read them. +This populates `package-archive-contents'. If ASYNC is non-nil, +perform the downloads asynchronously." + ;; The downloaded archive contents will be read as part of + ;; `package--update-downloads-in-progress'. + (setq package--downloads-in-progress + (append package-archives + package--downloads-in-progress)) + (dolist (archive package-archives) + (condition-case-unless-debug nil + (package--download-one-archive archive "archive-contents" async) + (error (message "Failed to download `%s' archive." + (car archive)))))) + +;;;###autoload +(defun package-refresh-contents (&optional async) + "Download descriptions of all configured ELPA packages. +For each archive configured in the variable `package-archives', +inform Emacs about the latest versions of all packages it offers, +and make them available for download. +Optional argument ASYNC specifies whether to perform the +downloads in the background." + (interactive) + ;; FIXME: Do it asynchronously. + (unless (file-exists-p package-user-dir) + (make-directory package-user-dir t)) + (let ((default-keyring (expand-file-name "package-keyring.gpg" + data-directory))) + (when (and package-check-signature (file-exists-p default-keyring)) + (condition-case-unless-debug error + (progn + (epg-check-configuration (epg-configuration)) + (package-import-keyring default-keyring)) + (error (message "Cannot import default keyring: %S" (cdr error)))))) + (package--download-and-read-archives async)) + + +;;; Dependency Management +;; Calculating the full transaction necessary for an installation, +;; keeping track of which packages were installed strictly as +;; dependencies, and determining which packages cannot be removed +;; because they are dependencies. (defun package-compute-transaction (packages requirements &optional seen) "Return a list of packages to be installed, including PACKAGES. PACKAGES should be a list of `package-desc'. @@ -1013,7 +1473,7 @@ SEEN is used internally to detect infinite recursion." ;; older bar-1.3). (dolist (elt requirements) (let* ((next-pkg (car elt)) - (next-version (cadr elt)) + (next-version (cadr elt)) (already ())) (dolist (pkg packages) (if (eq next-pkg (package-desc-name pkg)) @@ -1037,9 +1497,9 @@ SEEN is used internally to detect infinite recursion." ((package-installed-p next-pkg next-version) nil) (t - ;; A package is required, but not installed. It might also be - ;; blocked via `package-load-list'. - (let ((pkg-descs (cdr (assq next-pkg package-archive-contents))) + ;; A package is required, but not installed. It might also be + ;; blocked via `package-load-list'. + (let ((pkg-descs (cdr (assq next-pkg package-archive-contents))) (found nil) (problem nil)) (while (and pkg-descs (not found)) @@ -1063,120 +1523,189 @@ but version %s required" (format "Required package '%s' is disabled" next-pkg))))) (t (setq found pkg-desc))))) - (unless found + (unless found (if problem (error "%s" problem) (error "Package `%s-%s' is unavailable" - next-pkg (package-version-join next-version)))) - (setq packages - (package-compute-transaction (cons found packages) - (package-desc-reqs found) - (cons found seen)))))))) - packages) - -(defun package-read-from-string (str) - "Read a Lisp expression from STR. -Signal an error if the entire string was not used." - (let* ((read-data (read-from-string str)) - (more-left - (condition-case nil - ;; The call to `ignore' suppresses a compiler warning. - (progn (ignore (read-from-string - (substring str (cdr read-data)))) - t) - (end-of-file nil)))) - (if more-left - (error "Can't read whole string") - (car read-data)))) - -(defun package--read-archive-file (file) - "Re-read archive file FILE, if it exists. -Will return the data from the file, or nil if the file does not exist. -Will throw an error if the archive version is too new." - (let ((filename (expand-file-name file package-user-dir))) - (when (file-exists-p filename) - (with-temp-buffer - (insert-file-contents-literally filename) - (let ((contents (read (current-buffer)))) - (if (> (car contents) package-archive-version) - (error "Package archive version %d is higher than %d" - (car contents) package-archive-version)) - (cdr contents)))))) - -(defun package-read-all-archive-contents () - "Re-read `archive-contents', if it exists. -If successful, set `package-archive-contents'." - (setq package-archive-contents nil) - (dolist (archive package-archives) - (package-read-archive-contents (car archive)))) - -(defun package-read-archive-contents (archive) - "Re-read archive contents for ARCHIVE. -If successful, set the variable `package-archive-contents'. -If the archive version is too new, signal an error." - ;; Version 1 of 'archive-contents' is identical to our internal - ;; representation. - (let* ((contents-file (format "archives/%s/archive-contents" archive)) - (contents (package--read-archive-file contents-file))) - (when contents - (dolist (package contents) - (package--add-to-archive-contents package archive))))) - -;; Package descriptor objects used inside the "archive-contents" file. -;; Changing this defstruct implies changing the format of the -;; "archive-contents" files. -(cl-defstruct (package--ac-desc - (:constructor package-make-ac-desc (version reqs summary kind extras)) - (:copier nil) - (:type vector)) - version reqs summary kind extras) - -(defun package--add-to-archive-contents (package archive) - "Add the PACKAGE from the given ARCHIVE if necessary. -PACKAGE should have the form (NAME . PACKAGE--AC-DESC). -Also, add the originating archive to the `package-desc' structure." - (let* ((name (car package)) - (version (package--ac-desc-version (cdr package))) - (pkg-desc - (package-desc-create - :name name - :version version - :reqs (package--ac-desc-reqs (cdr package)) - :summary (package--ac-desc-summary (cdr package)) - :kind (package--ac-desc-kind (cdr package)) - :archive archive - :extras (and (> (length (cdr package)) 4) - ;; Older archive-contents files have only 4 - ;; elements here. - (package--ac-desc-extras (cdr package))))) - (pinned-to-archive (assoc name package-pinned-packages))) - ;; Skip entirely if pinned to another archive. - (when (not (and pinned-to-archive - (not (equal (cdr pinned-to-archive) archive)))) - (setq package-archive-contents - (package--append-to-alist pkg-desc package-archive-contents))))) + next-pkg (package-version-join next-version)))) + (setq packages + (package-compute-transaction (cons found packages) + (package-desc-reqs found) + (cons found seen)))))))) + packages) -(defun package--append-to-alist (pkg-desc alist) - "Append an entry for PKG-DESC to the start of ALIST and return it. -This entry takes the form (`package-desc-name' PKG-DESC). +(defun package--find-non-dependencies () + "Return a list of installed packages which are not dependencies. +Finds all packages in `package-alist' which are not dependencies +of any other packages. +Used to populate `package-selected-packages'." + (let ((dep-list + (delete-dups + (apply #'append + (mapcar (lambda (p) (mapcar #'car (package-desc-reqs (cadr p)))) + package-alist))))) + (cl-loop for p in package-alist + for name = (car p) + unless (memq name dep-list) + collect name))) + +(defun package--user-selected-p (pkg) + "Return non-nil if PKG is a package was installed by the user. +PKG is a package name. +This looks into `package-selected-packages', populating it first +if it is still empty." + (unless (consp package-selected-packages) + (customize-save-variable + 'package-selected-packages + (setq package-selected-packages (package--find-non-dependencies)))) + (memq pkg package-selected-packages)) + +(defun package--get-deps (pkg &optional only) + (let* ((pkg-desc (cadr (assq pkg package-alist))) + (direct-deps (cl-loop for p in (package-desc-reqs pkg-desc) + for name = (car p) + when (assq name package-alist) + collect name)) + (indirect-deps (unless (eq only 'direct) + (delete-dups + (cl-loop for p in direct-deps + append (package--get-deps p)))))) + (cl-case only + (direct direct-deps) + (separate (list direct-deps indirect-deps)) + (indirect indirect-deps) + (t (delete-dups (append direct-deps indirect-deps)))))) + +(defun package--removable-packages () + "Return a list of names of packages no longer needed. +These are packages which are neither contained in +`package-selected-packages' nor a dependency of one that is." + (let ((needed (cl-loop for p in package-selected-packages + if (assq p package-alist) + ;; `p' and its dependencies are needed. + append (cons p (package--get-deps p))))) + (cl-loop for p in (mapcar #'car package-alist) + unless (memq p needed) + collect p))) + +(defun package--used-elsewhere-p (pkg-desc &optional pkg-list) + "Non-nil if PKG-DESC is a dependency of a package in PKG-LIST. +Return the first package found in PKG-LIST of which PKG is a +dependency. + +When not specified, PKG-LIST defaults to `package-alist' +with PKG-DESC entry removed." + (unless (string= (package-desc-status pkg-desc) "obsolete") + (let ((pkg (package-desc-name pkg-desc))) + (cl-loop with alist = (or pkg-list + (remove (assq pkg package-alist) + package-alist)) + for p in alist thereis + (and (memq pkg (mapcar #'car (package-desc-reqs (cadr p)))) + (car p)))))) + +(defun package--sort-deps-in-alist (package only) + "Return a list of dependencies for PACKAGE sorted by dependency. +PACKAGE is included as the first element of the returned list. +ONLY is an alist associating package names to package objects. +Only these packages will be in the return value an their cdrs are +destructively set to nil in ONLY." + (let ((out)) + (dolist (dep (package-desc-reqs package)) + (when-let ((cell (assq (car dep) only)) + (dep-package (cdr-safe cell))) + (setcdr cell nil) + (setq out (append (package--sort-deps-in-alist dep-package only) + out)))) + (cons package out))) + +(defun package--sort-by-dependence (package-list) + "Return PACKAGE-LIST sorted by dependence. +That is, any element of the returned list is guaranteed to not +directly depend on any elements that come before it. + +PACKAGE-LIST is a list of package-desc objects. +Indirect dependencies are guaranteed to be returned in order only +if all the in-between dependencies are also in PACKAGE-LIST." + (let ((alist (mapcar (lambda (p) (cons (package-desc-name p) p)) package-list)) + out-list) + (dolist (cell alist out-list) + ;; `package--sort-deps-in-alist' destructively changes alist, so + ;; some cells might already be empty. We check this here. + (when-let ((pkg-desc (cdr cell))) + (setcdr cell nil) + (setq out-list + (append (package--sort-deps-in-alist pkg-desc alist) + out-list)))))) -If ALIST already has an entry with this name, destructively add -PKG-DESC to the cdr of this entry instead, sorted by version -number." - (let* ((name (package-desc-name pkg-desc)) - (priority-version (package-desc-priority-version pkg-desc)) - (existing-packages (assq name alist))) - (if (not existing-packages) - (cons (list name pkg-desc) - alist) - (while (if (and (cdr existing-packages) - (version-list-< priority-version - (package-desc-priority-version - (cadr existing-packages)))) - (setq existing-packages (cdr existing-packages)) - (push pkg-desc (cdr existing-packages)) - nil)) - alist))) + +;;; Installation Functions +;; As opposed to the previous section (which listed some underlying +;; functions necessary for installation), this one contains the actual +;; functions that install packages. The package itself can be +;; installed in a variety of ways (archives, buffer, file), but +;; requirements (dependencies) are always satisfied by looking in +;; `package-archive-contents'. +(defun package-archive-base (desc) + "Return the archive containing the package NAME." + (cdr (assoc (package-desc-archive desc) package-archives))) + +(defun package-install-from-archive (pkg-desc) + "Download and install a tar package." + ;; This won't happen, unless the archive is doing something wrong. + (when (eq (package-desc-kind pkg-desc) 'dir) + (error "Can't install directory package from archive")) + (let* ((location (package-archive-base pkg-desc)) + (file (concat (package-desc-full-name pkg-desc) + (package-desc-suffix pkg-desc))) + (sig-file (concat file ".sig")) + good-signatures pkg-descs) + (package--with-work-buffer location file + (if (and package-check-signature + (not (member (package-desc-archive pkg-desc) + package-unsigned-archives))) + (if (package--archive-file-exists-p location sig-file) + (setq good-signatures (package--check-signature location file)) + (unless (eq package-check-signature 'allow-unsigned) + (error "Unsigned package: `%s'" + (package-desc-name pkg-desc))))) + (package-unpack pkg-desc)) + ;; Here the package has been installed successfully, mark it as + ;; signed if appropriate. + (when good-signatures + ;; Write out good signatures into NAME-VERSION.signed file. + (write-region (mapconcat #'epg-signature-to-string good-signatures "\n") + nil + (expand-file-name + (concat (package-desc-full-name pkg-desc) + ".signed") + package-user-dir) + nil 'silent) + ;; Update the old pkg-desc which will be shown on the description buffer. + (setf (package-desc-signed pkg-desc) t) + ;; Update the new (activated) pkg-desc as well. + (setq pkg-descs (cdr (assq (package-desc-name pkg-desc) package-alist))) + (if pkg-descs + (setf (package-desc-signed (car pkg-descs)) t))))) + +(defun package-installed-p (package &optional min-version) + "Return true if PACKAGE, of MIN-VERSION or newer, is installed. +If PACKAGE is a symbol, it is the package name and MIN-VERSION +should be a version list. + +If PACKAGE is a package-desc object, MIN-VERSION is ignored." + (unless package--initialized (error "package.el is not yet initialized!")) + (if (package-desc-p package) + (let ((dir (package-desc-dir package))) + (and (stringp dir) + (file-exists-p dir))) + (or + (let ((pkg-descs (cdr (assq package package-alist)))) + (and pkg-descs + (version-list-<= min-version + (package-desc-version (car pkg-descs))))) + ;; Also check built-in packages. + (package-built-in-p package min-version)))) (defun package-download-transaction (packages) "Download and install all the packages in PACKAGES. @@ -1187,10 +1716,16 @@ using `package-compute-transaction'." (mapc #'package-install-from-archive packages)) ;;;###autoload -(defun package-install (pkg) +(defun package-install (pkg &optional dont-select) "Install the package PKG. PKG can be a package-desc or the package name of one the available packages -in an archive in `package-archives'. Interactively, prompt for its name." +in an archive in `package-archives'. Interactively, prompt for its name. + +If called interactively or if DONT-SELECT nil, add PKG to +`package-selected-packages'. + +If PKG is a package-desc and it is already installed, don't try +to install it but still mark it as selected." (interactive (progn ;; Initialize the package system to get the list of package @@ -1206,11 +1741,21 @@ in an archive in `package-archives'. Interactively, prompt for its name." (unless (package-installed-p (car elt)) (symbol-name (car elt)))) package-archive-contents)) - nil t))))) - (package-download-transaction - (if (package-desc-p pkg) - (package-compute-transaction (list pkg) - (package-desc-reqs pkg)) + nil t)) + nil))) + (let ((name (if (package-desc-p pkg) + (package-desc-name pkg) + pkg))) + (unless (or dont-select (package--user-selected-p name)) + (customize-save-variable 'package-selected-packages + (cons name package-selected-packages)))) + (if (package-desc-p pkg) + (if (package-installed-p pkg) + (message "`%s' is already installed" (package-desc-full-name pkg)) + (package-download-transaction + (package-compute-transaction (list pkg) + (package-desc-reqs pkg)))) + (package-download-transaction (package-compute-transaction () (list (list pkg)))))) @@ -1222,125 +1767,12 @@ Otherwise return nil." (when (string-match "\\`[ \t]*[$]Revision:[ \t]+" str) (setq str (substring str (match-end 0)))) (condition-case nil - (if (version-to-list str) - str) + (if (version-to-list str) + str) (error nil)))) (declare-function lm-homepage "lisp-mnt" (&optional file)) -(defun package--prepare-dependencies (deps) - "Turn DEPS into an acceptable list of dependencies. - -Any parts missing a version string get a default version string -of \"0\" (meaning any version) and an appropriate level of lists -is wrapped around any parts requiring it." - (cond - ((not (listp deps)) - (error "Invalid requirement specifier: %S" deps)) - (t (mapcar (lambda (dep) - (cond - ((symbolp dep) `(,dep "0")) - ((stringp dep) - (error "Invalid requirement specifier: %S" dep)) - ((and (listp dep) (null (cdr dep))) - (list (car dep) "0")) - (t dep))) - deps)))) - -(defun package-buffer-info () - "Return a `package-desc' describing the package in the current buffer. - -If the buffer does not contain a conforming package, signal an -error. If there is a package, narrow the buffer to the file's -boundaries." - (goto-char (point-min)) - (unless (re-search-forward "^;;; \\([^ ]*\\)\\.el ---[ \t]*\\(.*?\\)[ \t]*\\(-\\*-.*-\\*-[ \t]*\\)?$" nil t) - (error "Package lacks a file header")) - (let ((file-name (match-string-no-properties 1)) - (desc (match-string-no-properties 2)) - (start (line-beginning-position))) - (unless (search-forward (concat ";;; " file-name ".el ends here")) - (error "Package lacks a terminating comment")) - ;; Try to include a trailing newline. - (forward-line) - (narrow-to-region start (point)) - (require 'lisp-mnt) - ;; Use some headers we've invented to drive the process. - (let* ((requires-str (lm-header "package-requires")) - ;; Prefer Package-Version; if defined, the package author - ;; probably wants us to use it. Otherwise try Version. - (pkg-version - (or (package-strip-rcs-id (lm-header "package-version")) - (package-strip-rcs-id (lm-header "version")))) - (homepage (lm-homepage))) - (unless pkg-version - (error - "Package lacks a \"Version\" or \"Package-Version\" header")) - (package-desc-from-define - file-name pkg-version desc - (if requires-str - (package--prepare-dependencies - (package-read-from-string requires-str))) - :kind 'single - :url homepage)))) - -(declare-function tar-get-file-descriptor "tar-mode" (file)) -(declare-function tar--extract "tar-mode" (descriptor)) - -(defun package-tar-file-info () - "Find package information for a tar file. -The return result is a `package-desc'." - (cl-assert (derived-mode-p 'tar-mode)) - (let* ((dir-name (file-name-directory - (tar-header-name (car tar-parse-info)))) - (desc-file (package--description-file dir-name)) - (tar-desc (tar-get-file-descriptor (concat dir-name desc-file)))) - (unless tar-desc - (error "No package descriptor file found")) - (with-current-buffer (tar--extract tar-desc) - (unwind-protect - (package--read-pkg-desc 'tar) - (kill-buffer (current-buffer)))))) - -(defun package-dir-info () - "Find package information for a directory. -The return result is a `package-desc'." - (cl-assert (derived-mode-p 'dired-mode)) - (let* ((desc-file (package--description-file default-directory))) - (if (file-readable-p desc-file) - (with-temp-buffer - (insert-file-contents desc-file) - (package--read-pkg-desc 'dir)) - (let ((files (directory-files default-directory t "\\.el\\'" t)) - info) - (while files - (with-temp-buffer - (insert-file-contents (pop files)) - ;; When we find the file with the data, - (when (setq info (ignore-errors (package-buffer-info))) - ;; stop looping, - (setq files nil) - ;; set the 'dir kind, - (setf (package-desc-kind info) 'dir)))) - ;; and return the info. - info)))) - -(defun package--read-pkg-desc (kind) - "Read a `define-package' form in current buffer. -Return the pkg-desc, with desc-kind set to KIND." - (goto-char (point-min)) - (unwind-protect - (let* ((pkg-def-parsed (read (current-buffer))) - (pkg-desc - (if (not (eq (car pkg-def-parsed) 'define-package)) - (error "Can't find define-package in %s" - (tar-header-name tar-desc)) - (apply #'package-desc-from-define - (append (cdr pkg-def-parsed)))))) - (setf (package-desc-kind pkg-desc) kind) - pkg-desc))) - - ;;;###autoload (defun package-install-from-buffer () "Install a package from the current buffer. @@ -1354,24 +1786,28 @@ is derived from the main .el file in the directory. Downloads and installs required packages as needed." (interactive) - (let ((pkg-desc - (cond - ((derived-mode-p 'dired-mode) - ;; This is the only way a package-desc object with a `dir' - ;; desc-kind can be created. Such packages can't be - ;; uploaded or installed from archives, they can only be - ;; installed from local buffers or directories. - (package-dir-info)) - ((derived-mode-p 'tar-mode) - (package-tar-file-info)) - (t - (package-buffer-info))))) + (let* ((pkg-desc + (cond + ((derived-mode-p 'dired-mode) + ;; This is the only way a package-desc object with a `dir' + ;; desc-kind can be created. Such packages can't be + ;; uploaded or installed from archives, they can only be + ;; installed from local buffers or directories. + (package-dir-info)) + ((derived-mode-p 'tar-mode) + (package-tar-file-info)) + (t + (package-buffer-info)))) + (name (package-desc-name pkg-desc))) ;; Download and install the dependencies. (let* ((requires (package-desc-reqs pkg-desc)) (transaction (package-compute-transaction nil requires))) (package-download-transaction transaction)) ;; Install the package itself. (package-unpack pkg-desc) + (unless (package--user-selected-p name) + (customize-save-variable 'package-selected-packages + (cons name package-selected-packages))) pkg-desc)) ;;;###autoload @@ -1388,137 +1824,122 @@ The file can either be a tar file or an Emacs Lisp file." (when (string-match "\\.tar\\'" file) (tar-mode))) (package-install-from-buffer))) -(defun package-delete (pkg-desc) - (let ((dir (package-desc-dir pkg-desc))) - (if (not (string-prefix-p (file-name-as-directory - (expand-file-name package-user-dir)) - (expand-file-name dir))) - ;; Don't delete "system" packages. - (error "Package `%s' is a system package, not deleting" - (package-desc-full-name pkg-desc)) - (delete-directory dir t t) - ;; Remove NAME-VERSION.signed file. - (let ((signed-file (concat dir ".signed"))) - (if (file-exists-p signed-file) - (delete-file signed-file))) - ;; Update package-alist. - (let* ((name (package-desc-name pkg-desc)) - (pkgs (assq name package-alist))) - (delete pkg-desc pkgs) - (unless (cdr pkgs) - (setq package-alist (delq pkgs package-alist)))) - (message "Package `%s' deleted." (package-desc-full-name pkg-desc))))) - -(defun package-archive-base (desc) - "Return the archive containing the package NAME." - (cdr (assoc (package-desc-archive desc) package-archives))) - -(defun package-archive-priority (archive) - "Return the priority of ARCHIVE. - -The archive priorities are specified in -`package-archive-priorities'. If not given there, the priority -defaults to 0." - (or (cdr (assoc archive package-archive-priorities)) - 0)) - -(defun package-desc-priority-version (pkg-desc) - "Return the version PKG-DESC with the archive priority prepended. - -This allows for easy comparison of package versions from -different archives if archive priorities are meant to be taken in -consideration." - (cons (package-archive-priority - (package-desc-archive pkg-desc)) - (package-desc-version pkg-desc))) - -(defun package--download-one-archive (archive file) - "Retrieve an archive file FILE from ARCHIVE, and cache it. -ARCHIVE should be a cons cell of the form (NAME . LOCATION), -similar to an entry in `package-alist'. Save the cached copy to -\"archives/NAME/archive-contents\" in `package-user-dir'." - (let ((dir (expand-file-name (format "archives/%s" (car archive)) - package-user-dir)) - (sig-file (concat file ".sig")) - good-signatures) - (package--with-work-buffer (cdr archive) file - ;; Check signature of archive-contents, if desired. - (if (and package-check-signature - (not (member archive package-unsigned-archives))) - (if (package--archive-file-exists-p (cdr archive) sig-file) - (setq good-signatures (package--check-signature (cdr archive) - file)) - (unless (eq package-check-signature 'allow-unsigned) - (error "Unsigned archive `%s'" - (car archive))))) - ;; Read the retrieved buffer to make sure it is valid (e.g. it - ;; may fetch a URL redirect page). - (when (listp (read (current-buffer))) - (make-directory dir t) - (write-region nil nil (expand-file-name file dir) nil 'silent))) - (when good-signatures - ;; Write out good signatures into archive-contents.signed file. - (write-region (mapconcat #'epg-signature-to-string good-signatures "\n") - nil - (expand-file-name (concat file ".signed") dir) - nil 'silent)))) +;;;###autoload +(defun package-install-user-selected-packages () + "Ensure packages in `package-selected-packages' are installed. +If some packages are not installed propose to install them." + (interactive) + ;; We don't need to populate `package-selected-packages' before + ;; using here, because the outcome is the same either way (nothing + ;; gets installed). + (if (not package-selected-packages) + (message "`package-selected-packages' is empty, nothing to install") + (cl-loop for p in package-selected-packages + unless (package-installed-p p) + collect p into lst + finally + (if lst + (when (y-or-n-p + (format "%s packages will be installed:\n%s, proceed?" + (length lst) + (mapconcat #'symbol-name lst ", "))) + (mapc #'package-install lst)) + (message "All your packages are already installed"))))) -(declare-function epg-check-configuration "epg-config" - (config &optional minimum-version)) -(declare-function epg-configuration "epg-config" ()) -(declare-function epg-import-keys-from-file "epg" (context keys)) + +;;; Package Deletion +(defun package--newest-p (pkg) + "Return t if PKG is the newest package with its name." + (equal (cadr (assq (package-desc-name pkg) package-alist)) + pkg)) + +(defun package-delete (pkg-desc &optional force nosave) + "Delete package PKG-DESC. + +Argument PKG-DESC is a full description of package as vector. +When package is used elsewhere as dependency of another package, +refuse deleting it and return an error. +If FORCE is non-nil package will be deleted even if it is used +elsewhere. +If NOSAVE is non-nil, the package is not removed from +`package-selected-packages'." + (let ((dir (package-desc-dir pkg-desc)) + (name (package-desc-name pkg-desc)) + pkg-used-elsewhere-by) + ;; If the user is trying to delete this package, they definitely + ;; don't want it marked as selected, so we remove it from + ;; `package-selected-packages' even if it can't be deleted. + (when (and (null nosave) + (package--user-selected-p name) + ;; Don't deselect if this is an older version of an + ;; upgraded package. + (package--newest-p pkg-desc)) + (customize-save-variable + 'package-selected-packages (remove name package-selected-packages))) + (cond ((not (string-prefix-p (file-name-as-directory + (expand-file-name package-user-dir)) + (expand-file-name dir))) + ;; Don't delete "system" packages. + (error "Package `%s' is a system package, not deleting" + (package-desc-full-name pkg-desc))) + ((and (null force) + (setq pkg-used-elsewhere-by + (package--used-elsewhere-p pkg-desc))) + ;; Don't delete packages used as dependency elsewhere. + (error "Package `%s' is used by `%s' as dependency, not deleting" + (package-desc-full-name pkg-desc) + pkg-used-elsewhere-by)) + (t + (delete-directory dir t t) + ;; Remove NAME-VERSION.signed file. + (let ((signed-file (concat dir ".signed"))) + (if (file-exists-p signed-file) + (delete-file signed-file))) + ;; Update package-alist. + (let ((pkgs (assq name package-alist))) + (delete pkg-desc pkgs) + (unless (cdr pkgs) + (setq package-alist (delq pkgs package-alist)))) + (message "Package `%s' deleted." (package-desc-full-name pkg-desc)))))) ;;;###autoload -(defun package-import-keyring (&optional file) - "Import keys from FILE." - (interactive "fFile: ") - (setq file (expand-file-name file)) - (let ((context (epg-make-context 'OpenPGP)) - (homedir (expand-file-name "gnupg" package-user-dir))) - (with-file-modes 448 - (make-directory homedir t)) - (setf (epg-context-home-directory context) homedir) - (message "Importing %s..." (file-name-nondirectory file)) - (epg-import-keys-from-file context file) - (message "Importing %s...done" (file-name-nondirectory file)))) +(defun package-reinstall (pkg) + "Reinstall package PKG. +PKG should be either a symbol, the package name, or a package-desc +object." + (interactive (list (intern (completing-read + "Reinstall package: " + (mapcar #'symbol-name + (mapcar #'car package-alist)))))) + (package-delete + (if (package-desc-p pkg) pkg (cadr (assq pkg package-alist))) + 'force 'nosave) + (package-install pkg 'dont-select)) ;;;###autoload -(defun package-refresh-contents () - "Download the ELPA archive description if needed. -This informs Emacs about the latest versions of all packages, and -makes them available for download." - (interactive) - ;; FIXME: Do it asynchronously. - (unless (file-exists-p package-user-dir) - (make-directory package-user-dir t)) - (let ((default-keyring (expand-file-name "package-keyring.gpg" - data-directory))) - (when (and package-check-signature (file-exists-p default-keyring)) - (condition-case-unless-debug error - (progn - (epg-check-configuration (epg-configuration)) - (package-import-keyring default-keyring)) - (error (message "Cannot import default keyring: %S" (cdr error)))))) - (dolist (archive package-archives) - (condition-case-unless-debug nil - (package--download-one-archive archive "archive-contents") - (error (message "Failed to download `%s' archive." - (car archive))))) - (package-read-all-archive-contents)) +(defun package-autoremove () + "Remove packages that are no more needed. -;;;###autoload -(defun package-initialize (&optional no-activate) - "Load Emacs Lisp packages, and activate them. -The variable `package-load-list' controls which packages to load. -If optional arg NO-ACTIVATE is non-nil, don't activate packages." +Packages that are no more needed by other packages in +`package-selected-packages' and their dependencies +will be deleted." (interactive) - (setq package-alist nil) - (package-load-all-descriptors) - (package-read-all-archive-contents) - (unless no-activate - (dolist (elt package-alist) - (package-activate (car elt)))) - (setq package--initialized t)) + ;; If `package-selected-packages' is nil, it would make no sense to + ;; try to populate it here, because then `package-autoremove' will + ;; do absolutely nothing. + (when (or package-selected-packages + (yes-or-no-p + "`package-selected-packages' is empty! Really remove ALL packages? ")) + (let ((removable (package--removable-packages))) + (if removable + (when (y-or-n-p + (format "%s packages will be deleted:\n%s, proceed? " + (length removable) + (mapconcat #'symbol-name removable ", "))) + (mapc (lambda (p) + (package-delete (cadr (assq p package-alist)) t)) + removable)) + (message "Nothing to autoremove"))))) ;;;; Package description buffer. @@ -1548,10 +1969,12 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages." (if (not (or (package-desc-p package) (and package (symbolp package)))) (message "No package specified") (help-setup-xref (list #'describe-package package) - (called-interactively-p 'interactive)) + (called-interactively-p 'interactive)) (with-help-window (help-buffer) (with-current-buffer standard-output - (describe-package-1 package))))) + (describe-package-1 package))))) + +(declare-function lm-commentary "lisp-mnt" (&optional file)) (defun describe-package-1 (pkg) (require 'lisp-mnt) @@ -1573,7 +1996,10 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages." (built-in (eq pkg-dir 'builtin)) (installable (and archive (not built-in))) (status (if desc (package-desc-status desc) "orphan")) + (incompatible-reason (package--incompatible-p desc)) (signed (if desc (package-desc-signed desc)))) + (when incompatible-reason + (setq status "incompatible")) (prin1 name) (princ " is ") (princ (if (memq (aref status 0) '(?a ?e ?i ?o ?u)) "an " "a ")) @@ -1582,64 +2008,73 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages." (insert " " (propertize "Status" 'font-lock-face 'bold) ": ") (cond (built-in - (insert (propertize (capitalize status) + (insert (propertize (capitalize status) 'font-lock-face 'font-lock-builtin-face) ".")) - (pkg-dir - (insert (propertize (if (equal status "unsigned") - "Installed" - (capitalize status)) ;FIXME: Why comment-face? - 'font-lock-face 'font-lock-comment-face)) - (insert " in `") - ;; Todo: Add button for uninstalling. - (help-insert-xref-button (abbreviate-file-name + (pkg-dir + (insert (propertize (if (member status '("unsigned" "dependency")) + "Installed" + (capitalize status)) ;FIXME: Why comment-face? + 'font-lock-face 'font-lock-comment-face)) + (insert " in `") + ;; Todo: Add button for uninstalling. + (help-insert-xref-button (abbreviate-file-name (file-name-as-directory pkg-dir)) - 'help-package-def pkg-dir) - (if (and (package-built-in-p name) + 'help-package-def pkg-dir) + (if (and (package-built-in-p name) (not (package-built-in-p name version))) - (insert "',\n shadowing a " - (propertize "built-in package" - 'font-lock-face 'font-lock-builtin-face)) - (insert "'")) - (if signed - (insert ".") - (insert " (unsigned)."))) - (installable + (insert "',\n shadowing a " + (propertize "built-in package" + 'font-lock-face 'font-lock-builtin-face)) + (insert "'")) + (if signed + (insert ".") + (insert " (unsigned)."))) + (incompatible-reason + (insert (propertize "Incompatible" 'face font-lock-warning-face) + " because it depends on ") + (if (stringp incompatible-reason) + (insert "Emacs " incompatible-reason ".") + (insert "uninstallable packages."))) + (installable (insert (capitalize status)) - (insert " from " (format "%s" archive)) - (insert " -- ") + (insert " from " (format "%s" archive)) + (insert " -- ") (package-make-button "Install" 'action 'package-install-button-action 'package-desc desc)) - (t (insert (capitalize status) "."))) + (t (insert (capitalize status) "."))) (insert "\n") (insert " " (propertize "Archive" 'font-lock-face 'bold) - ": " (or archive "n/a") "\n") + ": " (or archive "n/a") "\n") (and version - (insert " " - (propertize "Version" 'font-lock-face 'bold) ": " + (insert " " + (propertize "Version" 'font-lock-face 'bold) ": " (package-version-join version) "\n")) (setq reqs (if desc (package-desc-reqs desc))) (when reqs (insert " " (propertize "Requires" 'font-lock-face 'bold) ": ") - (let ((first t) - name vers text) - (dolist (req reqs) - (setq name (car req) - vers (cadr req) - text (format "%s-%s" (symbol-name name) - (package-version-join vers))) - (cond (first (setq first nil)) - ((>= (+ 2 (current-column) (length text)) - (window-width)) - (insert ",\n ")) - (t (insert ", "))) - (help-insert-xref-button text 'help-package name)) - (insert "\n"))) + (let ((first t)) + (dolist (req reqs) + (let* ((name (car req)) + (vers (cadr req)) + (text (format "%s-%s" (symbol-name name) + (package-version-join vers))) + (reason (if (and (listp incompatible-reason) + (assq name incompatible-reason)) + " (not available)" ""))) + (cond (first (setq first nil)) + ((>= (+ 2 (current-column) (length text) (length reason)) + (window-width)) + (insert ",\n ")) + (t (insert ", "))) + (help-insert-xref-button text 'help-package name) + (insert reason))) + (insert "\n"))) (insert " " (propertize "Summary" 'font-lock-face 'bold) - ": " (if desc (package-desc-summary desc)) "\n") + ": " (if desc (package-desc-summary desc)) "\n") (when homepage (insert " " (propertize "Homepage" 'font-lock-face 'bold) ": ") (help-insert-xref-button homepage 'help-url homepage) @@ -1681,23 +2116,23 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages." (insert "\n") (if built-in - ;; For built-in packages, insert the commentary. - (let ((fn (locate-file (format "%s.el" name) load-path - load-file-rep-suffixes)) - (opoint (point))) - (insert (or (lm-commentary fn) "")) - (save-excursion - (goto-char opoint) - (when (re-search-forward "^;;; Commentary:\n" nil t) - (replace-match "")) - (while (re-search-forward "^\\(;+ ?\\)" nil t) - (replace-match "")))) + ;; For built-in packages, insert the commentary. + (let ((fn (locate-file (format "%s.el" name) load-path + load-file-rep-suffixes)) + (opoint (point))) + (insert (or (lm-commentary fn) "")) + (save-excursion + (goto-char opoint) + (when (re-search-forward "^;;; Commentary:\n" nil t) + (replace-match "")) + (while (re-search-forward "^\\(;+ ?\\)" nil t) + (replace-match "")))) (let ((readme (expand-file-name (format "%s-readme.txt" name) - package-user-dir)) - readme-string) - ;; For elpa packages, try downloading the commentary. If that - ;; fails, try an existing readme file in `package-user-dir'. - (cond ((condition-case nil + package-user-dir)) + readme-string) + ;; For elpa packages, try downloading the commentary. If that + ;; fails, try an existing readme file in `package-user-dir'. + (cond ((condition-case nil (save-excursion (package--with-work-buffer (package-archive-base desc) @@ -1711,17 +2146,17 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages." nil 'silent) (setq readme-string (buffer-string)) t)) - (error nil)) - (insert readme-string)) - ((file-readable-p readme) - (insert-file-contents readme) - (goto-char (point-max)))))))) + (error nil)) + (insert readme-string)) + ((file-readable-p readme) + (insert-file-contents readme) + (goto-char (point-max)))))))) (defun package-install-button-action (button) (let ((pkg-desc (button-get button 'package-desc))) (when (y-or-n-p (format "Install package `%s'? " (package-desc-full-name pkg-desc))) - (package-install pkg-desc) + (package-install pkg-desc nil) (revert-buffer nil t) (goto-char (point-min))))) @@ -1744,7 +2179,7 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages." (defvar package-menu-mode-map (let ((map (make-sparse-keymap)) - (menu-map (make-sparse-keymap "Package"))) + (menu-map (make-sparse-keymap "Package"))) (set-keymap-parent map tabulated-list-mode-map) (define-key map "\C-m" 'package-menu-describe-package) (define-key map "u" 'package-menu-mark-unmark) @@ -1761,58 +2196,58 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages." (define-key map [menu-bar package-menu] (cons "Package" menu-map)) (define-key menu-map [mq] '(menu-item "Quit" quit-window - :help "Quit package selection")) + :help "Quit package selection")) (define-key menu-map [s1] '("--")) (define-key menu-map [mn] '(menu-item "Next" next-line - :help "Next Line")) + :help "Next Line")) (define-key menu-map [mp] '(menu-item "Previous" previous-line - :help "Previous Line")) + :help "Previous Line")) (define-key menu-map [s2] '("--")) (define-key menu-map [mu] '(menu-item "Unmark" package-menu-mark-unmark - :help "Clear any marks on a package and move to the next line")) + :help "Clear any marks on a package and move to the next line")) (define-key menu-map [munm] '(menu-item "Unmark Backwards" package-menu-backup-unmark - :help "Back up one line and clear any marks on that package")) + :help "Back up one line and clear any marks on that package")) (define-key menu-map [md] '(menu-item "Mark for Deletion" package-menu-mark-delete - :help "Mark a package for deletion and move to the next line")) + :help "Mark a package for deletion and move to the next line")) (define-key menu-map [mi] '(menu-item "Mark for Install" package-menu-mark-install - :help "Mark a package for installation and move to the next line")) + :help "Mark a package for installation and move to the next line")) (define-key menu-map [mupgrades] '(menu-item "Mark Upgradable Packages" package-menu-mark-upgrades - :help "Mark packages that have a newer version for upgrading")) + :help "Mark packages that have a newer version for upgrading")) (define-key menu-map [s3] '("--")) (define-key menu-map [mf] '(menu-item "Filter Package List..." package-menu-filter - :help "Filter package selection (q to go back)")) + :help "Filter package selection (q to go back)")) (define-key menu-map [mg] '(menu-item "Update Package List" revert-buffer - :help "Update the list of packages")) + :help "Update the list of packages")) (define-key menu-map [mr] '(menu-item "Refresh Package List" package-menu-refresh - :help "Download the ELPA archive")) + :help "Download the ELPA archive")) (define-key menu-map [s4] '("--")) (define-key menu-map [mt] '(menu-item "Mark Obsolete Packages" package-menu-mark-obsolete-for-deletion - :help "Mark all obsolete packages for deletion")) + :help "Mark all obsolete packages for deletion")) (define-key menu-map [mx] '(menu-item "Execute Actions" package-menu-execute - :help "Perform all the marked actions")) + :help "Perform all the marked actions")) (define-key menu-map [s5] '("--")) (define-key menu-map [mh] '(menu-item "Help" package-menu-quick-help - :help "Show short key binding help for package-menu-mode")) + :help "Show short key binding help for package-menu-mode")) (define-key menu-map [mc] '(menu-item "Describe Package" package-menu-describe-package - :help "Display information about this package")) + :help "Display information about this package")) map) "Local keymap for `package-menu-mode' buffers.") -(defvar package-menu--new-package-list nil +(defvar-local package-menu--new-package-list nil "List of newly-available packages since `list-packages' was last called.") (define-derived-mode package-menu-mode tabulated-list-mode "Package Menu" @@ -1846,13 +2281,44 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC." (defvar package-list-unsigned nil "If non-nil, mention in the list which packages were installed w/o signature.") +(defvar package--emacs-version-list (version-to-list emacs-version) + "`emacs-version', as a list.") + +(defun package--incompatible-p (pkg &optional shallow) + "Return non-nil if PKG has no chance of being installable. +PKG is a package-desc object. + +If SHALLOW is non-nil, this only checks if PKG depends on a +higher `emacs-version' than the one being used. Otherwise, also +checks the viability of dependencies, according to +`package--compatibility-table'. + +If PKG requires an incompatible Emacs version, the return value +is this version (as a string). +If PKG requires incompatible packages, the return value is a list +of these dependencies, similar to the list returned by +`package-desc-reqs'." + (let* ((reqs (package-desc-reqs pkg)) + (version (cadr (assq 'emacs reqs)))) + (if (and version (version-list-< package--emacs-version-list version)) + (package-version-join version) + (unless shallow + (let (out) + (dolist (dep (package-desc-reqs pkg) out) + (let ((dep-name (car dep))) + (unless (eq 'emacs dep-name) + (let ((cv (gethash dep-name package--compatibility-table))) + (when (version-list-< (or cv '(0)) (or (cadr dep) '(0))) + (push dep out))))))))))) + (defun package-desc-status (pkg-desc) (let* ((name (package-desc-name pkg-desc)) (dir (package-desc-dir pkg-desc)) (lle (assq name package-load-list)) (held (cadr lle)) (version (package-desc-version pkg-desc)) - (signed (package-desc-signed pkg-desc))) + (signed (or (not package-list-unsigned) + (package-desc-signed pkg-desc)))) (cond ((eq dir 'builtin) "built-in") ((and lle (null held)) "disabled") @@ -1863,11 +2329,14 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC." ((version-list-< version hv) "obsolete") (t "disabled")))) ((package-built-in-p name version) "obsolete") + ((package--incompatible-p pkg-desc) "incompat") (dir ;One of the installed packages. (cond ((not (file-exists-p (package-desc-dir pkg-desc))) "deleted") ((eq pkg-desc (cadr (assq name package-alist))) - (if (or (not package-list-unsigned) signed) "installed" "unsigned")) + (if (not signed) "unsigned" + (if (package--user-selected-p name) + "installed" "dependency"))) (t "obsolete"))) (t (let* ((ins (cadr (assq name package-alist))) @@ -1878,8 +2347,9 @@ package PKG-DESC, add one. The alist is keyed with PKG-DESC." "new" "available")) ((version-list-< version ins-v) "obsolete") ((version-list-= version ins-v) - (if (or (not package-list-unsigned) signed) - "installed" "unsigned")))))))) + (if (not signed) "unsigned" + (if (package--user-selected-p name) + "installed" "dependency"))))))))) (defun package-menu--refresh (&optional packages keywords) "Re-populate the `tabulated-list-entries'. @@ -1903,8 +2373,8 @@ KEYWORDS should be nil or a list of keywords." (package--has-keyword-p (package--from-builtin elt) keywords) (or package-list-unversioned (package--bi-desc-version (cdr elt))) - (or (eq packages t) (memq name packages))) - (package--push (package--from-builtin elt) "built-in" info-list))) + (or (eq packages t) (memq name packages))) + (package--push (package--from-builtin elt) "built-in" info-list))) ;; Available and disabled packages: (dolist (elt package-archive-contents) @@ -1949,7 +2419,7 @@ Built-in packages are converted with `package--from-builtin'." (when (and (not (eq name 'emacs)) ; Hide the `emacs' package. (or package-list-unversioned (package--bi-desc-version (cdr elt))) - (or (eq packages t) (memq name packages))) + (or (eq packages t) (memq name packages))) (funcall function (package--from-builtin elt)))) ;; Available and disabled packages: @@ -2000,18 +2470,20 @@ shown." PKG has the form (PKG-DESC . STATUS). Return (PKG-DESC [NAME VERSION STATUS DOC])." (let* ((pkg-desc (car pkg)) - (status (cdr pkg)) - (face (pcase status + (status (cdr pkg)) + (face (pcase status (`"built-in" 'font-lock-builtin-face) (`"available" 'default) (`"new" 'bold) (`"held" 'font-lock-constant-face) (`"disabled" 'font-lock-warning-face) (`"installed" 'font-lock-comment-face) + (`"dependency" 'font-lock-comment-face) (`"unsigned" 'font-lock-warning-face) + (`"incompat" 'font-lock-comment-face) (_ 'font-lock-warning-face)))) ; obsolete. (list pkg-desc - `[,(list (symbol-name (package-desc-name pkg-desc)) + `[,(list (symbol-name (package-desc-name pkg-desc)) 'face 'link 'follow-link t 'package-desc pkg-desc @@ -2041,23 +2513,24 @@ This fetches the contents of each archive specified in If optional arg BUTTON is non-nil, describe its associated package." (interactive) (let ((pkg-desc (if button (button-get button 'package-desc) - (tabulated-list-get-id)))) + (tabulated-list-get-id)))) (if pkg-desc - (describe-package pkg-desc) + (describe-package pkg-desc) (user-error "No package here")))) ;; fixme numeric argument (defun package-menu-mark-delete (&optional _num) "Mark a package for deletion and move to the next line." (interactive "p") - (if (member (package-menu-get-status) '("installed" "obsolete" "unsigned")) + (if (member (package-menu-get-status) + '("installed" "dependency" "obsolete" "unsigned")) (tabulated-list-put-tag "D" t) (forward-line))) (defun package-menu-mark-install (&optional _num) "Mark a package for installation and move to the next line." (interactive "p") - (if (member (package-menu-get-status) '("available" "new")) + (if (member (package-menu-get-status) '("available" "new" "dependency")) (tabulated-list-put-tag "I" t) (forward-line))) @@ -2079,8 +2552,8 @@ If optional arg BUTTON is non-nil, describe its associated package." (goto-char (point-min)) (while (not (eobp)) (if (equal (package-menu-get-status) "obsolete") - (tabulated-list-put-tag "D" t) - (forward-line 1))))) + (tabulated-list-put-tag "D" t) + (forward-line 1))))) (defun package-menu-quick-help () "Show short key binding help for package-menu-mode." @@ -2092,19 +2565,38 @@ If optional arg BUTTON is non-nil, describe its associated package." (defun package-menu-get-status () (let* ((id (tabulated-list-get-id)) - (entry (and id (assq id tabulated-list-entries)))) + (entry (and id (assq id tabulated-list-entries)))) (if entry - (aref (cadr entry) 2) + (aref (cadr entry) 2) ""))) +(defun package-archive-priority (archive) + "Return the priority of ARCHIVE. + +The archive priorities are specified in +`package-archive-priorities'. If not given there, the priority +defaults to 0." + (or (cdr (assoc archive package-archive-priorities)) + 0)) + +(defun package-desc-priority-version (pkg-desc) + "Return the version PKG-DESC with the archive priority prepended. + +This allows for easy comparison of package versions from +different archives if archive priorities are meant to be taken in +consideration." + (cons (package-archive-priority + (package-desc-archive pkg-desc)) + (package-desc-version pkg-desc))) + (defun package-menu--find-upgrades () (let (installed available upgrades) ;; Build list of installed/available packages in this buffer. (dolist (entry tabulated-list-entries) ;; ENTRY is (PKG-DESC [NAME VERSION STATUS DOC]) (let ((pkg-desc (car entry)) - (status (aref (cadr entry) 2))) - (cond ((member status '("installed" "unsigned")) + (status (aref (cadr entry) 2))) + (cond ((member status '("installed" "dependency" "unsigned")) (push pkg-desc installed)) ((member status '("available" "new")) (setq available (package--append-to-alist pkg-desc available)))))) @@ -2129,22 +2621,22 @@ call will upgrade the package." (error "The current buffer is not a Package Menu")) (let ((upgrades (package-menu--find-upgrades))) (if (null upgrades) - (message "No packages to upgrade.") + (message "No packages to upgrade.") (widen) (save-excursion - (goto-char (point-min)) - (while (not (eobp)) - (let* ((pkg-desc (tabulated-list-get-id)) - (upgrade (cdr (assq (package-desc-name pkg-desc) upgrades)))) - (cond ((null upgrade) - (forward-line 1)) - ((equal pkg-desc upgrade) - (package-menu-mark-install)) - (t - (package-menu-mark-delete)))))) + (goto-char (point-min)) + (while (not (eobp)) + (let* ((pkg-desc (tabulated-list-get-id)) + (upgrade (cdr (assq (package-desc-name pkg-desc) upgrades)))) + (cond ((null upgrade) + (forward-line 1)) + ((equal pkg-desc upgrade) + (package-menu-mark-install)) + (t + (package-menu-mark-delete)))))) (message "%d package%s marked for upgrading." - (length upgrades) - (if (= (length upgrades) 1) "" "s"))))) + (length upgrades) + (if (= (length upgrades) 1) "" "s"))))) (defun package-menu-execute (&optional noquery) "Perform marked Package Menu actions. @@ -2158,15 +2650,15 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm." (save-excursion (goto-char (point-min)) (while (not (eobp)) - (setq cmd (char-after)) - (unless (eq cmd ?\s) - ;; This is the key PKG-DESC. - (setq pkg-desc (tabulated-list-get-id)) - (cond ((eq cmd ?D) - (push pkg-desc delete-list)) - ((eq cmd ?I) - (push pkg-desc install-list)))) - (forward-line))) + (setq cmd (char-after)) + (unless (eq cmd ?\s) + ;; This is the key PKG-DESC. + (setq pkg-desc (tabulated-list-get-id)) + (cond ((eq cmd ?D) + (push pkg-desc delete-list)) + ((eq cmd ?I) + (push pkg-desc install-list)))) + (forward-line))) (when install-list (if (or noquery @@ -2178,70 +2670,132 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm." (length install-list) (mapconcat #'package-desc-full-name install-list ", "))))) - (mapc 'package-install install-list))) + (mapc (lambda (p) + ;; Don't mark as selected if it's a new version of + ;; an installed package. + (package-install p (and (not (package-installed-p p)) + (package-installed-p + (package-desc-name p))))) + install-list))) ;; Delete packages, prompting if necessary. (when delete-list (if (or noquery (yes-or-no-p - (if (= (length delete-list) 1) - (format "Delete package `%s'? " + (if (= (length delete-list) 1) + (format "Delete package `%s'? " (package-desc-full-name (car delete-list))) - (format "Delete these %d packages (%s)? " - (length delete-list) - (mapconcat #'package-desc-full-name - delete-list ", "))))) - (dolist (elt delete-list) - (condition-case-unless-debug err - (package-delete elt) - (error (message (cadr err))))) - (error "Aborted"))) - (if (or delete-list install-list) - (package-menu--generate t t) - (message "No operations specified.")))) + (format "Delete these %d packages (%s)? " + (length delete-list) + (mapconcat #'package-desc-full-name + delete-list ", "))))) + (dolist (elt (package--sort-by-dependence delete-list)) + (condition-case-unless-debug err + (package-delete elt) + (error (message (cadr err))))) + (error "Aborted"))) + (if (not (or delete-list install-list)) + (message "No operations specified.") + (when package-selected-packages + (let ((removable (package--removable-packages))) + (when (and removable + (y-or-n-p + (format "These %d packages are no longer needed, delete them (%s)? " + (length removable) + (mapconcat #'symbol-name removable ", ")))) + ;; We know these are removable, so we can use force instead of sorting them. + (mapc (lambda (p) (package-delete (cadr (assq p package-alist)) 'force 'nosave)) + removable)))) + (package-menu--generate t t)))) (defun package-menu--version-predicate (A B) (let ((vA (or (aref (cadr A) 1) '(0))) - (vB (or (aref (cadr B) 1) '(0)))) + (vB (or (aref (cadr B) 1) '(0)))) (if (version-list-= vA vB) - (package-menu--name-predicate A B) + (package-menu--name-predicate A B) (version-list-< vA vB)))) (defun package-menu--status-predicate (A B) (let ((sA (aref (cadr A) 2)) - (sB (aref (cadr B) 2))) + (sB (aref (cadr B) 2))) (cond ((string= sA sB) - (package-menu--name-predicate A B)) - ((string= sA "new") t) - ((string= sB "new") nil) - ((string= sA "available") t) - ((string= sB "available") nil) - ((string= sA "installed") t) - ((string= sB "installed") nil) - ((string= sA "unsigned") t) - ((string= sB "unsigned") nil) - ((string= sA "held") t) - ((string= sB "held") nil) - ((string= sA "built-in") t) - ((string= sB "built-in") nil) - ((string= sA "obsolete") t) - ((string= sB "obsolete") nil) - (t (string< sA sB))))) + (package-menu--name-predicate A B)) + ((string= sA "new") t) + ((string= sB "new") nil) + ((string= sA "available") t) + ((string= sB "available") nil) + ((string= sA "installed") t) + ((string= sB "installed") nil) + ((string= sA "dependency") t) + ((string= sB "dependency") nil) + ((string= sA "unsigned") t) + ((string= sB "unsigned") nil) + ((string= sA "held") t) + ((string= sB "held") nil) + ((string= sA "built-in") t) + ((string= sB "built-in") nil) + ((string= sA "obsolete") t) + ((string= sB "obsolete") nil) + ((string= sA "incompat") t) + ((string= sB "incompat") nil) + (t (string< sA sB))))) (defun package-menu--description-predicate (A B) (let ((dA (aref (cadr A) 3)) - (dB (aref (cadr B) 3))) + (dB (aref (cadr B) 3))) (if (string= dA dB) - (package-menu--name-predicate A B) + (package-menu--name-predicate A B) (string< dA dB)))) (defun package-menu--name-predicate (A B) (string< (symbol-name (package-desc-name (car A))) - (symbol-name (package-desc-name (car B))))) + (symbol-name (package-desc-name (car B))))) (defun package-menu--archive-predicate (A B) (string< (or (package-desc-archive (car A)) "") - (or (package-desc-archive (car B)) ""))) + (or (package-desc-archive (car B)) ""))) + +(defvar-local package-menu--old-archive-contents nil + "`package-archive-contents' before the latest refresh.") + +(defun package-menu--populate-new-package-list () + "Decide which packages are new in `package-archives-contents'. +Store this list in `package-menu--new-package-list'." + ;; Find which packages are new. + (when package-menu--old-archive-contents + (dolist (elt package-archive-contents) + (unless (assq (car elt) package-menu--old-archive-contents) + (push (car elt) package-menu--new-package-list))) + (setq package-menu--old-archive-contents nil))) + +(defun package-menu--find-and-notify-upgrades () + "Notify the user of upgradable packages." + (when-let ((upgrades (package-menu--find-upgrades))) + (message "%d package%s can be upgraded; type `%s' to mark %s for upgrading." + (length upgrades) + (if (= (length upgrades) 1) "" "s") + (substitute-command-keys "\\[package-menu-mark-upgrades]") + (if (= (length upgrades) 1) "it" "them")))) + +(defun package-menu--post-refresh () + "Check for new packages, revert the *Packages* buffer, and check for upgrades. +This function is called after `package-refresh-contents' is done. +It goes in `package--post-download-archives-hook', so that it +works with async refresh as well." + (package-menu--populate-new-package-list) + (let ((buf (get-buffer "*Packages*"))) + (when (buffer-live-p buf) + (with-current-buffer buf + (revert-buffer nil 'noconfirm)))) + (package-menu--find-and-notify-upgrades)) + +(defcustom package-menu-async t + "If non-nil, package-menu will use async operations when possible. +Currently, only the refreshing of archive contents supports +asynchronous operations. Package transactions are still done +synchronously." + :type 'boolean + :group 'package) ;;;###autoload (defun list-packages (&optional no-fetch) @@ -2254,36 +2808,24 @@ The list is displayed in a buffer named `*Packages*'." ;; Initialize the package system if necessary. (unless package--initialized (package-initialize t)) - (let (old-archives new-packages) - (unless no-fetch - ;; Read the locally-cached archive-contents. - (package-read-all-archive-contents) - (setq old-archives package-archive-contents) - ;; Fetch the remote list of packages. - (package-refresh-contents) - ;; Find which packages are new. - (dolist (elt package-archive-contents) - (unless (assq (car elt) old-archives) - (push (car elt) new-packages)))) - - ;; Generate the Package Menu. - (let ((buf (get-buffer-create "*Packages*"))) - (with-current-buffer buf - (package-menu-mode) - (set (make-local-variable 'package-menu--new-package-list) - new-packages) - (package-menu--generate nil t)) - ;; The package menu buffer has keybindings. If the user types - ;; `M-x list-packages', that suggests it should become current. - (switch-to-buffer buf)) - - (let ((upgrades (package-menu--find-upgrades))) - (if upgrades - (message "%d package%s can be upgraded; type `%s' to mark %s for upgrading." - (length upgrades) - (if (= (length upgrades) 1) "" "s") - (substitute-command-keys "\\[package-menu-mark-upgrades]") - (if (= (length upgrades) 1) "it" "them")))))) + ;; Integrate the package-menu with updating the archives. + (add-hook 'package--post-download-archives-hook + #'package-menu--post-refresh) + + (unless no-fetch + (setq package-menu--old-archive-contents package-archive-contents) + (setq package-menu--new-package-list nil) + ;; Fetch the remote list of packages. + (package-refresh-contents package-menu-async)) + + ;; Generate the Package Menu. + (let ((buf (get-buffer-create "*Packages*"))) + (with-current-buffer buf + (package-menu-mode) + (package-menu--generate nil t)) + ;; The package menu buffer has keybindings. If the user types + ;; `M-x list-packages', that suggests it should become current. + (switch-to-buffer buf))) ;;;###autoload (defalias 'package-list-packages 'list-packages) diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index b495793bee..3a2fa4fdc8 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -103,7 +103,6 @@ UPatterns can take the following forms: (or UPAT...) matches if any of the patterns matches. (and UPAT...) matches if all the patterns match. 'VAL matches if the object is `equal' to VAL - `QPAT matches if the QPattern QPAT matches. (pred FUN) matches if FUN applied to the object returns non-nil. (guard BOOLEXP) matches if BOOLEXP evaluates to non-nil. (let UPAT EXP) matches if EXP matches UPAT. @@ -111,14 +110,6 @@ UPatterns can take the following forms: If a SYMBOL is used twice in the same pattern (i.e. the pattern is \"non-linear\"), then the second occurrence is turned into an `eq'uality test. -QPatterns can take the following forms: - (QPAT1 . QPAT2) matches if QPAT1 matches the car and QPAT2 the cdr. - [QPAT1 QPAT2..QPATn] matches a vector of length n and QPAT1..QPATn match - its 0..(n-1)th elements, respectively. - ,UPAT matches if the UPattern UPAT matches. - STRING matches if the object is `equal' to STRING. - ATOM matches if the object is `eq' to ATOM. - FUN can take the form SYMBOL or (lambda ARGS BODY) in which case it's called with one argument. (F ARG1 .. ARGn) in which case F gets called with an n+1'th argument @@ -129,7 +120,10 @@ FUN is assumed to be pure, i.e. it can be dropped if its result is not used, and two identical calls can be merged into one. E.g. you can match pairs where the cdr is larger than the car with a pattern like `(,a . ,(pred (< a))) or, with more checks: -`(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a))))" +`(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a)))) + +Additional patterns can be defined via `pcase-defmacro'. +Currently, the following patterns are provided this way:" (declare (indent 1) (debug (form &rest (pcase-UPAT body)))) ;; We want to use a weak hash table as a cache, but the key will unavoidably ;; be based on `exp' and `cases', yet `cases' is a fresh new list each time @@ -154,6 +148,26 @@ like `(,a . ,(pred (< a))) or, with more checks: ;; (puthash (car cases) `(,exp ,cases ,@expansion) pcase--memoize-2) expansion)))) +;; FIXME: Obviously, this will collide with nadvice's use of +;; function-documentation if we happen to advise `pcase'. +(put 'pcase 'function-documentation '(pcase--make-docstring)) +(defun pcase--make-docstring () + (let* ((main (documentation (symbol-function 'pcase) 'raw)) + (ud (help-split-fundoc main 'pcase))) + (with-temp-buffer + (insert (or (cdr ud) main)) + (mapatoms + (lambda (symbol) + (let ((me (get symbol 'pcase-macroexpander))) + (when me + (insert "\n\n-- ") + (let* ((doc (documentation me 'raw))) + (setq doc (help-fns--signature symbol doc me + (indirect-function me))) + (insert "\n" (or doc "Not documented."))))))) + (let ((combined-doc (buffer-string))) + (if ud (help-add-fundoc-usage combined-doc (car ud)) combined-doc))))) + ;;;###autoload (defmacro pcase-exhaustive (exp &rest cases) "The exhaustive version of `pcase' (which see)." @@ -164,6 +178,29 @@ like `(,a . ,(pred (< a))) or, with more checks: ;; FIXME: Could we add the FILE:LINE data in the error message? exp (append cases `((,x (error "No clause matching `%S'" ,x))))))) +;;;###autoload +(defmacro pcase-lambda (lambda-list &rest body) + "Like `lambda' but allow each argument to be a UPattern. +I.e. accepts the usual &optional and &rest keywords, but every +formal argument can be any pattern accepted by `pcase' (a mere +variable name being but a special case of it)." + (declare (doc-string 2) (indent defun) + (debug ((&rest pcase-UPAT) body))) + (let* ((bindings ()) + (parsed-body (macroexp-parse-body body)) + (args (mapcar (lambda (pat) + (if (symbolp pat) + ;; Simple vars and &rest/&optional are just passed + ;; through unchanged. + pat + (let ((arg (make-symbol + (format "arg%s" (length bindings))))) + (push `(,pat ,arg) bindings) + arg))) + lambda-list))) + `(lambda ,args ,@(car parsed-body) + (pcase-let* ,(nreverse bindings) ,@(cdr parsed-body))))) + (defun pcase--let* (bindings body) (cond ((null bindings) (macroexp-progn body)) @@ -324,9 +361,13 @@ of the form (UPAT EXP)." ;;;###autoload (defmacro pcase-defmacro (name args &rest body) "Define a pcase UPattern macro." - (declare (indent 2) (debug (def-name sexp def-body)) (doc-string 3)) - `(put ',name 'pcase-macroexpander - (lambda ,args ,@body))) + (declare (indent 2) (debug defun) (doc-string 3)) + (let ((fsym (intern (format "%s--pcase-macroexpander" name)))) + ;; Add the function via `fsym', so that an autoload cookie placed + ;; on a pcase-defmacro will cause the macro to be loaded on demand. + `(progn + (defun ,fsym ,args ,@body) + (put ',name 'pcase-macroexpander #',fsym)))) (defun pcase--match (val upat) "Build a MATCH structure, hoisting all `or's and `and's outside." @@ -541,6 +582,7 @@ MATCH is the pattern that needs to be matched, of the form: (cond ((eq 'pred (car-safe pat)) (cadr pat)) ((not (eq 'quote (car-safe pat))) nil) ((consp (cadr pat)) #'consp) + ((stringp (cadr pat)) #'stringp) ((vectorp (cadr pat)) #'vectorp) ((byte-code-function-p (cadr pat)) #'byte-code-function-p)))) @@ -787,6 +829,14 @@ Otherwise, it defers to REST which is a list of branches of the form (t (error "Incorrect MATCH %S" (car matches))))) (pcase-defmacro \` (qpat) + "Backquote-style pcase patterns. +QPAT can take the following forms: + (QPAT1 . QPAT2) matches if QPAT1 matches the car and QPAT2 the cdr. + [QPAT1 QPAT2..QPATn] matches a vector of length n and QPAT1..QPATn match + its 0..(n-1)th elements, respectively. + ,UPAT matches if the UPattern UPAT matches. + STRING matches if the object is `equal' to STRING. + ATOM matches if the object is `eq' to ATOM." (cond ((eq (car-safe qpat) '\,) (cadr qpat)) ((vectorp qpat) diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el index b28153b7f8..c5f5906e7e 100644 --- a/lisp/emacs-lisp/seq.el +++ b/lisp/emacs-lisp/seq.el @@ -2,9 +2,10 @@ ;; Copyright (C) 2014-2015 Free Software Foundation, Inc. -;; Author: Nicolas Petton +;; Author: Nicolas Petton ;; Keywords: sequences -;; Version: 1.0 +;; Version: 1.3 +;; Package: seq ;; Maintainer: emacs-devel@gnu.org @@ -32,8 +33,8 @@ ;; ;; All provided functions work on lists, strings and vectors. ;; -;; Functions taking a predicate or a function iterating over the -;; sequence as argument take the function as their first argument and +;; Functions taking a predicate or iterating over a sequence using a +;; function as argument take the function as their first argument and ;; the sequence as their second argument. All other functions take ;; the sequence as their first argument. ;; @@ -92,14 +93,14 @@ returned." (seq-subseq seq 0 (min (max n 0) (seq-length seq))))) (defun seq-drop-while (pred seq) - "Return a sequence, from the first element for which (PRED element) is nil, of SEQ. + "Return a sequence from the first element for which (PRED element) is nil in SEQ. The result is a sequence of the same type as SEQ." (if (listp seq) (seq--drop-while-list pred seq) (seq-drop seq (seq--count-successive pred seq)))) (defun seq-take-while (pred seq) - "Return a sequence of the successive elements for which (PRED element) is non-nil in SEQ. + "Return the successive elements for which (PRED element) is non-nil in SEQ. The result is a sequence of the same type as SEQ." (if (listp seq) (seq--take-while-list pred seq) @@ -152,7 +153,7 @@ If SEQ is empty, return INITIAL-VALUE and FUNCTION is not called." t)) (defun seq-count (pred seq) - "Return the number of elements for which (PRED element) returns non-nil in seq." + "Return the number of elements for which (PRED element) is non-nil in SEQ." (let ((count 0)) (seq-doseq (elt seq) (when (funcall pred elt) @@ -171,9 +172,7 @@ The result is a sequence of the same type as SEQ." (if (listp seq) (sort (seq-copy seq) pred) (let ((result (seq-sort pred (append seq nil)))) - (cond ((stringp seq) (concat result)) - ((vectorp seq) (vconcat result)) - (t (error "Unsupported sequence: %s" seq)))))) + (seq-into result (type-of seq))))) (defun seq-contains-p (seq elt &optional testfn) "Return the first element in SEQ that equals to ELT. @@ -224,15 +223,71 @@ TYPE must be one of following symbols: vector, string or list. (`list (apply #'append (append seqs '(nil)))) (t (error "Not a sequence type name: %s" type)))) +(defun seq-mapcat (function seq &optional type) + "Concatenate the result of applying FUNCTION to each element of SEQ. +The result is a sequence of type TYPE, or a list if TYPE is nil." + (apply #'seq-concatenate (or type 'list) + (seq-map function seq))) + +(defun seq-partition (seq n) + "Return a list of the elements of SEQ grouped into sub-sequences of length N. +The last sequence may contain less than N elements. If N is a +negative integer or 0, nil is returned." + (unless (< n 1) + (let ((result '())) + (while (not (seq-empty-p seq)) + (push (seq-take seq n) result) + (setq seq (seq-drop seq n))) + (nreverse result)))) + +(defun seq-group-by (function seq) + "Apply FUNCTION to each element of SEQ. +Separate the elements of SEQ into an alist using the results as +keys. Keys are compared using `equal'." + (seq-reduce + (lambda (acc elt) + (let* ((key (funcall function elt)) + (cell (assoc key acc))) + (if cell + (setcdr cell (push elt (cdr cell))) + (push (list key elt) acc)) + acc)) + (seq-reverse seq) + nil)) + +(defalias 'seq-reverse + (if (ignore-errors (reverse [1 2])) + #'reverse + (lambda (seq) + "Return the reversed copy of list, vector, or string SEQ. +See also the function `nreverse', which is used more often." + (let ((result '())) + (seq-map (lambda (elt) (push elt result)) + seq) + (if (listp seq) + result + (seq-into result (type-of seq))))))) + +(defun seq-into (seq type) + "Convert the sequence SEQ into a sequence of type TYPE. +TYPE can be one of the following symbols: vector, string or list." + (pcase type + (`vector (vconcat seq)) + (`string (concat seq)) + (`list (append seq nil)) + (t (error "Not a sequence type name: %s" type)))) + (defun seq--drop-list (list n) - "Optimized version of `seq-drop' for lists." + "Return a list from LIST without its first N elements. +This is an optimization for lists in `seq-drop'." (while (and list (> n 0)) (setq list (cdr list) n (1- n))) list) (defun seq--take-list (list n) - "Optimized version of `seq-take' for lists." + "Return a list from LIST made of its first N elements. +This is an optimization for lists in `seq-take'." (let ((result '())) (while (and list (> n 0)) (setq n (1- n)) @@ -240,13 +295,15 @@ TYPE must be one of following symbols: vector, string or list. (nreverse result))) (defun seq--drop-while-list (pred list) - "Optimized version of `seq-drop-while' for lists." + "Return a list from the first element for which (PRED element) is nil in LIST. +This is an optimization for lists in `seq-drop-while'." (while (and list (funcall pred (car list))) (setq list (cdr list))) list) (defun seq--take-while-list (pred list) - "Optimized version of `seq-take-while' for lists." + "Return the successive elements for which (PRED element) is non-nil in LIST. +This is an optimization for lists in `seq-take-while'." (let ((result '())) (while (and list (funcall pred (car list))) (push (pop list) result)) @@ -263,7 +320,6 @@ TYPE must be one of following symbols: vector, string or list. (defalias 'seq-copy #'copy-sequence) (defalias 'seq-elt #'elt) -(defalias 'seq-reverse #'reverse) (defalias 'seq-length #'length) (defalias 'seq-do #'mapc) (defalias 'seq-each #'seq-do) diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index 5b9dc6422a..1bc5eb2872 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -612,8 +612,11 @@ PREC2 is a table as returned by `smie-precs->prec2' or (cons (pcase (cdr x) (`closer (cddr (assoc token table))) (`opener (cdr (assoc token table)))))) - (cl-assert (numberp (car cons))) - (setf (car cons) (list (car cons))))) + ;; `cons' can be nil for openers/closers which only contain + ;; "atomic" elements. + (when cons + (cl-assert (numberp (car cons))) + (setf (car cons) (list (car cons)))))) (let ((ca (gethash :smie-closer-alist prec2))) (when ca (push (cons :smie-closer-alist ca) table))) ;; (smie-check-grammar table prec2 'step3) @@ -834,12 +837,12 @@ Possible return values: ;;; Miscellaneous commands using the precedence parser. -(defun smie-backward-sexp-command (&optional n) +(defun smie-backward-sexp-command (n) "Move backward through N logical elements." (interactive "^p") (smie-forward-sexp-command (- n))) -(defun smie-forward-sexp-command (&optional n) +(defun smie-forward-sexp-command (n) "Move forward through N logical elements." (interactive "^p") (let ((forw (> n 0)) diff --git a/lisp/emacs-parallel/README.org b/lisp/emacs-parallel/README.org deleted file mode 100644 index 743050518b..0000000000 --- a/lisp/emacs-parallel/README.org +++ /dev/null @@ -1,147 +0,0 @@ -* Emacs Parallel - - Emacs Parallel is yet another library to simulate parallel - computations in Emacs (because it lacks threads support in Elisp). - -* STARTED HowTo - - You can execute a simple function a retrive the result like this: - #+BEGIN_SRC emacs-lisp - (parallel-get-result (parallel-start (lambda () (* 42 42)))) - ⇒ 1764 - #+END_SRC - - Though you won't benefit from the parallelism because - ~parallel-get-result~ is blocking, that is it waits for the function - to be executed. - - So you can use define a callback to be called when the function is - finished: - #+BEGIN_SRC emacs-lisp - (parallel-start (lambda () (sleep-for 4.2) "Hello World") - :post-exec (lambda (results _status) - (message (first results)))) - ⊣ Hello World - #+END_SRC - - Here, why ~(first results)~ and not ~result~? Because you can send - data from the remote instance while it's running with - ~parallel-remote-send~: - #+BEGIN_SRC emacs-lisp - (parallel-start (lambda () - (parallel-remote-send "Hello") - (sleep-for 4.2) - "World") - :post-exec (lambda (results _status) - (message "%s" - (mapconcat #'identity (reverse results) " ")))) - ⊣ Hello World - #+END_SRC - As you may have noticed the results are pushed in a list, so the - first element is the result returned by the function called, the - second is the last piece of data send, and so on... - - And of course you can execute some code when you receive data from - the remote instance: - #+BEGIN_SRC emacs-lisp - (parallel-start (lambda () - (parallel-remote-send 42) - (sleep-for 4.2) ; heavy computation to compute PI - pi) - :on-event (lambda (data) - (message "Received %S" data))) - ⊣ Received 42 - ⊣ Received 3.141592653589793 - #+END_SRC - - Because the function is executed in another Emacs instance (in Batch - Mode by default), the environment isn't the same. However you can - send some data with the ~env~ parameter: - #+BEGIN_SRC emacs-lisp - (let ((a 42) - (b 12)) - (parallel-get-result (parallel-start (lambda (a b) (+ a b)) - :env (list a b)))) - ⇒ 54 - #+END_SRC - - By default, the remote Emacs instance is exited when the function is - executed, but you can keep it running with the - ~:continue-when-executed~ option and send new code to be executed - with ~parellel-send~. - #+BEGIN_SRC emacs-lisp - (let ((task (parallel-start (lambda () 42) - :continue-when-executed t))) - (sleep-for 4.2) - (parallel-send task (lambda () (setq parallel-continue-when-executed nil) 12)) - (parallel-get-results task)) - ⇒ (12 42) - #+END_SRC - - As you can see, to stop the remote instance you have to set the - variable ~parallel-continue-when-executed~ to nil. - -* Modules - -** Parallel XWidget - - [[http://www.emacswiki.org/emacs/EmacsXWidgets][Emacs XWidget]] is an experimental branch which permits to embed GTK+ - widget inside Emacs buffers. For instance, it is possible to use it - to render an HTML page using the webkit engine within an Emacs - buffer. - - With this module, you can configure your "main" Emacs to use - another one to render web pages. - - Let's assume that you've cloned [[https://github.com/jave/xwidget-emacs][the Emacs XWidget repository]] in - ~$HOME/src/emacs-xwidget/~. Once you've compiled it, an Emacs - executable is available ~$HOME/src/emacs-xwidget/src/emacs~. - - Configure ~parallel-xwidget~ to use it: - #+BEGIN_SRC emacs-lisp - (setq parallel-xwidget-config (list :emacs-path - (concat (getenv "HOME") - "/src/emacs-xwidget/src/emacs"))) - #+END_SRC - - Then configure your current Emacs to use it: - #+BEGIN_SRC emacs-lisp - (setq browse-url-browser-function 'parallel-xwidget-browse-url) - #+END_SRC - - You can check it out with M-x browse-url RET google.com RET. - -* Tips & Tricks - - If your windows manager is smart enough (like StumpwWM) you can use - it to move graphical windows (Emacs frames) in another desktop. - - For example, I use this to move Emacs frames (with the title - "emacs-debug") to the group (aka desktop) 9: - #+BEGIN_SRC lisp - (define-frame-preference "9" - (0 nil t :title "emacs-debug")) - #+END_SRC - - And this to specify the title of the frame: - #+BEGIN_SRC emacs-lisp - (parallel-start (lambda () 42) - :no-batch t - :emacs-args '("-T" "emacs-debug")) - #+END_SRC - -* TODO How does it work? - -* Known limitations - - You can only send data to the remote (with the ~env~ parameter) or - from the remote (with ~parallel-send~ and ~parallel-remote-send~) - that have a printed representation (see [[info:elisp#Printed%20Representation][info:elisp#Printed - Representation]]). - - So you can pass around numbers, symbols, strings, lists, vectors, - hash-table but you can't pass buffers, windows, frames... - - - It lacks documentation, tests and probably a clean API, but I'm - working on it! diff --git a/lisp/emacs-parallel/parallel-remote.el b/lisp/emacs-parallel/parallel-remote.el deleted file mode 100644 index 54626afc26..0000000000 --- a/lisp/emacs-parallel/parallel-remote.el +++ /dev/null @@ -1,81 +0,0 @@ -;; -*- mode: emacs-lisp; lexical-binding: t; -*- -;;; parallel-remote.el --- - -;; Copyright (C) 2013 Grégoire Jadi - -;; Author: Grégoire Jadi - -;; This program is free software: you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation, either version 3 of -;; the License, or (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;;; Commentary: - -;;; Code: - -(require 'cl) - -(defvar parallel-service nil) -(defvar parallel-task-id nil) -(defvar parallel-client nil) -(defvar parallel--executed nil) -(defvar parallel-continue-when-executed nil) - -(defun parallel-remote-send (data) - (process-send-string parallel-client - (format "%S " (cons parallel-task-id data)))) - -(defun parallel-remote--init () - (setq parallel-client (make-network-process :name "emacs-parallel" - :buffer nil - :server nil - :service parallel-service - :host "localhost" - :family 'ipv4)) - (set-process-filter parallel-client #'parallel-remote--filter) - (parallel-remote-send 'code) - (when noninteractive ; Batch Mode - ;; The evaluation is done in the `parallel--filter' but in Batch - ;; Mode, Emacs doesn't wait for the input, it stops as soon as - ;; `parallel--init' has been executed. - (while (null parallel--executed) - (sleep-for 10)))) ; arbitrary chosen - -(defun parallel-remote--filter (_proc output) - (dolist (code (parallel--read-output output)) - (parallel-remote-send - (if (or noninteractive - (not debug-on-error)) - (condition-case err - (eval code) - (error err)) - (eval code)))) - (unless parallel-continue-when-executed - (setq parallel--executed t) - (kill-emacs))) - -(defun parallel--read-output (output) - "Read lisp forms from output and return them as a list." - (loop with output = (replace-regexp-in-string - "\\`[ \t\n]*" "" - (replace-regexp-in-string "[ \t\n]*\\'" "" output)) ; trim string - with start = 0 - with end = (length output) - for ret = (read-from-string output start end) - for data = (first ret) - do (setq start (rest ret)) - collect data - until (= start end))) - -(provide 'parallel-remote) - -;;; parallel-remote.el ends here diff --git a/lisp/emacs-parallel/parallel-xwidget.el b/lisp/emacs-parallel/parallel-xwidget.el deleted file mode 100644 index 7e23863d6e..0000000000 --- a/lisp/emacs-parallel/parallel-xwidget.el +++ /dev/null @@ -1,59 +0,0 @@ -;;; parallel-xwidget.el --- - -;; Copyright (C) 2013 Grégoire Jadi - -;; Author: Grégoire Jadi - -;; This program is free software: you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation, either version 3 of -;; the License, or (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;;; Commentary: - -;;; Code: - -(require 'parallel) -(require 'browse-url) - -(defgroup parallel-xwidget nil - "Browse the web in another emacs instance with XWidget." - :group 'emacs) - -(defvar parallel-xwidget--task nil) - -(defcustom parallel-xwidget-config nil - "Parallel configuration." - :type 'alist - :group 'parallel-xwidget) - -(defun parallel-xwidget--init () - (setq parallel-xwidget--task - (parallel-start (lambda () - (require 'xwidget)) - :graphical t - :continue-when-executed t - :config parallel-xwidget-config))) - -(defun parallel-xwidget-browse-url (url &optional new-session) - "Browse URL in another Emacs instance." - (interactive (browse-url-interactive-arg "xwidget-webkit URL: ")) - (unless (and parallel-xwidget--task - (eq 'run (parallel-status parallel-xwidget--task))) - (parallel-xwidget--init)) - (parallel-send parallel-xwidget--task - (lambda (url new-session) - (xwidget-webkit-browse-url url new-session)) - (url-tidy url) new-session)) - -(provide 'parallel-xwidget) - -;;; parallel-xwidget.el ends here diff --git a/lisp/emacs-parallel/parallel.el b/lisp/emacs-parallel/parallel.el deleted file mode 100644 index 3e5eccfd73..0000000000 --- a/lisp/emacs-parallel/parallel.el +++ /dev/null @@ -1,310 +0,0 @@ -;; -*- lexical-binding: t; -*- -;;; parallel.el --- - -;; Copyright (C) 2013 Grégoire Jadi - -;; Author: Grégoire Jadi - -;; This program is free software: you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation, either version 3 of -;; the License, or (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;;; Commentary: - -;;; Code: - -(require 'cl) -(require 'parallel-remote) - -(defgroup parallel nil - "Execute stuff in parallel" - :group 'emacs) - -(defcustom parallel-sleep 0.05 - "How many sec should we wait while polling." - :type 'number - :group 'parallel) - -(defcustom parallel-config nil - "Global config setting to use." - :type 'plist - :group 'parallel) - -(defvar parallel--server nil) -(defvar parallel--tasks nil) -(defvar parallel--tunnels nil) - -;; Declare external function -(declare-function parallel-send "parallel-remote") - -(defun parallel-make-tunnel (username hostname) - (parallel--init-server) - (let ((tunnel (find-if (lambda (tun) - (and (string= username - (process-get tun 'username)) - (string= hostname - (process-get tun 'hostname)))) - parallel--tunnels))) - (unless tunnel - (setq tunnel (start-process "parallel-ssh" nil "ssh" - "-N" "-R" (format "0:localhost:%s" - (process-contact parallel--server :service)) - (format "%s@%s" username hostname))) - (process-put tunnel 'username username) - (process-put tunnel 'hostname hostname) - (set-process-filter tunnel #'parallel--tunnel-filter) - (while (null (process-get tunnel 'service)) - (sleep-for 0.01)) - (push tunnel parallel--tunnels)) - tunnel)) - -(defun parallel-stop-tunnel (tunnel) - (setq parallel--tunnels (delq tunnel parallel--tunnels)) - (delete-process tunnel)) - -(defun parallel--tunnel-filter (proc output) - (if (string-match "\\([0-9]+\\)" output) - (process-put proc 'service (match-string 1 output)))) - -(defmacro parallel--set-option (place config) - `(setf ,place (or ,place - (plist-get ,config ,(intern (format ":%s" (symbol-name place)))) - (plist-get parallel-config ,(intern (format ":%s" (symbol-name place))))))) - -(defmacro parallel--set-options (config &rest options) - `(progn - ,@(loop for option in options - collect `(parallel--set-option ,option ,config)))) - -(defun* parallel-start (exec-fun &key post-exec env timeout - emacs-path library-path emacs-args - graphical debug on-event continue-when-executed - username hostname hostport - config) - (parallel--init-server) - - ;; Initialize parameters - (parallel--set-options config - post-exec - env - timeout - emacs-args - graphical - debug - on-event - continue-when-executed - username - hostname - hostport) - - (setq emacs-path (or emacs-path - (plist-get config :emacs-path) - (plist-get parallel-config :emacs-path) - (expand-file-name invocation-name - invocation-directory)) - library-path (or library-path - (plist-get config :library-path) - (plist-get parallel-config :library-path) - (locate-library "parallel-remote"))) - - (let ((task (parallel--new-task)) - proc tunnel ssh-args) - (push task parallel--tasks) - (put task 'initialized nil) - (put task 'exec-fun exec-fun) - (put task 'env env) - (when (functionp post-exec) - (put task 'post-exec post-exec)) - (when (functionp on-event) - (put task 'on-event on-event)) - (put task 'results nil) - (put task 'status 'run) - (put task 'queue nil) - - ;; We need to get the tunnel if it exists so we can send the right - ;; `service' to the remote. - (when (and username hostname) - (if hostport - (setq ssh-args (list "-R" (format "%s:localhost:%s" hostport - (process-contact parallel--server :service))) - tunnel t) - (setq tunnel (parallel-make-tunnel username hostname) - hostport (process-get tunnel 'service))) - (setq ssh-args (append - ssh-args - (if graphical (list "-X")) - (list (format "%s@%s" username hostname))))) - (setq emacs-args (remq nil - (list* "-Q" "-l" library-path - (if graphical nil "-batch") - "--eval" (format "(setq parallel-service '%S)" - (if tunnel - hostport - (process-contact parallel--server :service))) - "--eval" (format "(setq parallel-task-id '%S)" task) - "--eval" (format "(setq debug-on-error '%S)" debug) - "--eval" (format "(setq parallel-continue-when-executed '%S)" continue-when-executed) - "-f" "parallel-remote--init" - emacs-args))) - - ;; Reformat emacs-args if we use a tunnel (escape string) - (when tunnel - (setq emacs-args (list (mapconcat (lambda (string) - (if (find ?' string) - (prin1-to-string string) - string)) - emacs-args " ")))) - (setq proc (apply #'start-process "parallel" nil - `(,@(when tunnel - (list* "ssh" ssh-args)) - ,emacs-path - ,@emacs-args))) - (put task 'proc proc) - (set-process-sentinel (get task 'proc) #'parallel--sentinel) - (when timeout - (run-at-time timeout nil (lambda () - (when (memq (parallel-status task) - '(run stop)) - (parallel-stop task))))) - task)) - -(defun parallel--new-task () - "Generate a new task by enforcing a unique name." - (let ((symbol-name (make-temp-name "parallel-task-"))) - (while (intern-soft symbol-name) - (setq symbol-name (make-temp-name "parallel-task-"))) - (intern symbol-name))) - -(defun parallel--init-server () - "Initialize `parallel--server'." - (when (or (null parallel--server) - (not (eq (process-status parallel--server) - 'listen))) - (setq parallel--server - (make-network-process :name "parallel-server" - :buffer nil - :server t - :host "localhost" - :service t - :family 'ipv4 - :filter #'parallel--filter - :filter-multibyte t)))) - -(defun parallel--get-task-process (proc) - "Return the task running the given PROC." - (find-if (lambda (task) - (eq (get task 'proc) proc)) - parallel--tasks)) - -(defun parallel--sentinel (proc _event) - "Sentinel to watch over the remote process. - -This function do the necessary cleanup when the remote process is -finished." - (when (memq (process-status proc) '(exit signal)) - (let* ((task (parallel--get-task-process proc)) - (results (get task 'results)) - (status (process-status proc))) - ;; 0 means that the remote process has terminated normally (no - ;; SIGNUM 0). - (if (zerop (process-exit-status proc)) - (setq status 'success) - ;; on failure, push the exit-code or signal number on the - ;; results stack. - (push (process-exit-status proc) results)) - (put task 'results results) - (put task 'status status) - - (when (functionp (get task 'post-exec)) - (funcall (get task 'post-exec) - results status)) - (setq parallel--tasks (delq task parallel--tasks))))) - -(defun parallel--call-with-env (fun env) - "Return a string which can be READ/EVAL by the remote process -to `funcall' FUN with ENV as arguments." - (format "(funcall (read %S) %s)" - (prin1-to-string fun) - (mapconcat (lambda (obj) - ;; We need to quote it because the remote - ;; process will READ/EVAL it. - (format "'%S" obj)) env " "))) - -(defun parallel--filter (connection output) - "Server filter used to retrieve the results send by the remote -process and send the code to be executed by it." - (dolist (data (parallel--read-output output)) - (parallel--process-output connection (first data) (rest data)))) - -(defun parallel--process-output (connection task result) - (put task 'connection connection) - (cond ((and (not (get task 'initialized)) - (eq result 'code)) - (apply #'parallel-send - task - (get task 'exec-fun) - (get task 'env)) - (let ((code nil)) - (while (setq code (pop (get task 'queue))) - (apply #'parallel-send task (car code) (cdr code)))) - (put task 'initialized t)) - (t - (push result (get task 'results)) - (if (functionp (get task 'on-event)) - (funcall (get task 'on-event) result))))) - -(defun parallel-ready-p (task) - "Determine whether TASK is finished and if the results are -available." - (memq (parallel-status task) '(success exit signal))) - -(defun parallel-get-result (task) - "Return the last result send by the remote call, that is the -result returned by exec-fun." - (first (parallel-get-results task))) - -(defun parallel-get-results (task) - "Return all results send during the call of exec-fun." - (parallel-wait task) - (get task 'results)) - -(defun parallel-success-p (task) - "Determine whether TASK has ended successfully." - (parallel-wait task) - (eq (parallel-status task) 'success)) - -(defun parallel-status (task) - "Return TASK status." - (get task 'status)) - -(defun parallel-wait (task) - "Wait for TASK." - (while (not (parallel-ready-p task)) - (sleep-for parallel-sleep)) - t) ; for REPL - -(defun parallel-stop (task) - "Stop TASK." - (delete-process (get task 'proc))) - -(defun parallel-send (task fun &rest env) - "Send FUN to be evaluated by TASK in ENV." - (let ((connection (get task 'connection))) - (if connection - (process-send-string - connection - (parallel--call-with-env fun env)) - (push (cons fun env) (get task 'queue))))) - -(provide 'parallel) - -;;; parallel.el ends here diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index e41109a561..bd03a870fd 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -961,11 +961,11 @@ Suffixes such as .el or .elc should be stripped." (defun viper-ESC (arg) "Emulate ESC key in Emacs. Prevents multiple escape keystrokes if viper-no-multiple-ESC is true. -If viper-no-multiple-ESC is 'twice double ESC would ding in vi-state. +If `viper-no-multiple-ESC' is `twice' double ESC would ding in vi-state. Other ESC sequences are emulated via the current Emacs's major mode keymap. This is more convenient on TTYs, since this won't block function keys such as up, down, etc. ESC will also will also work as -a Meta key in this case. When viper-no-multiple-ESC is nil, ESC works +a Meta key in this case. When `viper-no-multiple-ESC' is nil, ESC works as a Meta key and any number of multiple escapes are allowed." (interactive "P") (let (char) diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 75932a80d4..e575eee6c9 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -463,7 +463,7 @@ color displays. By default, the delimiters are used only on TTYs." :type 'boolean :group 'viper) -(defcustom viper-read-buffer-function 'read-buffer +(defcustom viper-read-buffer-function #'read-buffer "Function to use for prompting the user for a buffer name." :type 'symbol :group 'viper) diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el index 179ae169ec..250c292d72 100644 --- a/lisp/emulation/viper-keym.el +++ b/lisp/emulation/viper-keym.el @@ -60,13 +60,13 @@ Full Vi compatibility is not recommended for power use of Viper." :group 'viper) (defcustom viper-no-multiple-ESC t - "If true, multiple ESC in Vi mode will cause bell to ring. -This is set to t on a windowing terminal and to 'twice on a dumb + "If non-nil, multiple ESC in Vi mode will cause bell to ring. +This is set to t on a windowing terminal and to `twice' on a dumb terminal (unless the user level is 1, 2, or 5). On a dumb terminal, this enables cursor keys and is generally more convenient, as terminals usually don't have a convenient Meta key. -Setting viper-no-multiple-ESC to nil will allow as many multiple ESC, -as is allowed by the major mode in effect." +Setting it to nil will allow as many multiple ESC, as is allowed by the +major mode in effect." :type 'boolean :group 'viper) diff --git a/lisp/epg.el b/lisp/epg.el index f66545306d..1b75b50df0 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -2051,7 +2051,9 @@ If you are unsure, use synchronous version of this function (defun epg-start-generate-key (context parameters) "Initiate a key generation. -PARAMETERS specifies parameters for the key. +PARAMETERS is a string which specifies parameters of the generated key. +See Info node `(gnupg) Unattended GPG key generation' in the +GnuPG manual for the format. If you use this function, you will need to wait for the completion of `epg-gpg-program' by using `epg-wait-for-completion' and call @@ -2061,9 +2063,9 @@ If you are unsure, use synchronous version of this function (setf (epg-context-operation context) 'generate-key) (setf (epg-context-result context) nil) (if (epg-data-file parameters) - (epg--start context (list "--batch" "--genkey" "--" + (epg--start context (list "--batch" "--gen-key" "--" (epg-data-file parameters))) - (epg--start context '("--batch" "--genkey")) + (epg--start context '("--batch" "--gen-key")) (if (eq (process-status (epg-context-process context)) 'run) (process-send-string (epg-context-process context) (epg-data-string parameters))) diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 44971cc16f..a4a7d47a0a 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,37 @@ +2015-03-25 Stefan Monnier + + * erc.el (erc-switch-to-buffer): Fix last change (bug#20187). + +2015-03-16 Stefan Monnier + + * erc.el (erc-switch-to-buffer): Rename from erc-iswitchb and rewrite + using read-buffer (bug#20116). + (erc--buffer-p): New function, extracted from erc-buffer-filter. + (erc-buffer-filter): Use it. + (erc-with-all-buffers-of-server): Silence compile warning if the return + value is unused. + (erc-is-valid-nick-p, erc-common-server-suffixes, erc-get-arglist) + (erc-command-name, erc-popup-input-buffer): Use \` and \' to match + beg/end of string. + +2015-03-03 Kelvin White + + * erc.el: Add old version string back to file header for + package.el compatibility + +2015-03-03 Glenn Morris + + * erc.el (erc-rename-buffers): Doc fix. Add :version. + +2015-03-03 Dima Kogan + + * erc-backend.el (define-erc-response-handler): Give hook-name + default value of nil and add-to-list (bug#19363). +2015-02-14 Stefan Monnier + + * erc-spelling.el (erc-spelling-init): + Use flyspell-generic-check-word-predicate. + 2015-01-28 Dima Kogan * erc-backend.el (define-erc-response-handler): Give hook-name diff --git a/lisp/erc/erc-spelling.el b/lisp/erc/erc-spelling.el index e2ddb04538..0cba956c42 100644 --- a/lisp/erc/erc-spelling.el +++ b/lisp/erc/erc-spelling.el @@ -71,7 +71,7 @@ The current buffer is given by BUFFER." (if dicts (cadr (car dicts)) (erc-with-server-buffer ispell-local-dictionary))))) - (setq flyspell-generic-check-word-p 'erc-spelling-flyspell-verify) + (setq flyspell-generic-check-word-predicate #'erc-spelling-flyspell-verify) (flyspell-mode 1))) (defun erc-spelling-unhighlight-word (word) @@ -85,6 +85,7 @@ The cadr is the beginning and the caddr is the end." (defun erc-spelling-flyspell-verify () "Flyspell only the input line, nothing else." + ;; FIXME: Don't use `flyspell-word'! (let ((word-data (and (boundp 'flyspell-word) flyspell-word))) (when word-data diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 7b9a3eb862..cf422f1cfc 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -12,7 +12,7 @@ ;; Kelvin White (kwhite@gnu.org) ;; Maintainer: emacs-devel@gnu.org ;; Keywords: IRC, chat, client, Internet - +;; Version: 5.3 ;; This file is part of GNU Emacs. @@ -197,7 +197,8 @@ parameters and authentication." (set sym (if (functionp val) (funcall val) val)))) (defcustom erc-rename-buffers nil - "When this is set to t, buffers will be renamed to network name if available" + "Non-nil means rename buffers with network name, if available." + :version "24.5" :group 'erc :type 'boolean) @@ -1109,7 +1110,7 @@ which the local user typed." (define-key map "\C-a" 'erc-bol) (define-key map [home] 'erc-bol) (define-key map "\C-c\C-a" 'erc-bol) - (define-key map "\C-c\C-b" 'erc-iswitchb) + (define-key map "\C-c\C-b" 'erc-switch-to-buffer) (define-key map "\C-c\C-c" 'erc-toggle-interpret-controls) (define-key map "\C-c\C-d" 'erc-input-action) (define-key map "\C-c\C-e" 'erc-toggle-ctcp-autoresponse) @@ -1148,6 +1149,7 @@ which the local user typed." "Faces for ERC." :group 'erc) +;; FIXME faces should not end in "-face". (defface erc-default-face '((t)) "ERC default face." :group 'erc-faces) @@ -1645,6 +1647,14 @@ If PROC is not supplied, all processes are searched." (throw 'buffer (current-buffer))))) proc)))) +(defun erc--buffer-p (buf predicate proc) + (with-current-buffer buf + (and (derived-mode-p 'erc-mode) + (or (not proc) + (eq proc erc-server-process)) + (funcall predicate) + buf))) + (defun erc-buffer-filter (predicate &optional proc) "Return a list of `erc-mode' buffers matching certain criteria. PREDICATE is a function executed with each buffer, if it returns t, that buffer @@ -1657,12 +1667,7 @@ server connection, or nil which means all open connections." nil (mapcar (lambda (buf) (when (buffer-live-p buf) - (with-current-buffer buf - (and (eq major-mode 'erc-mode) - (or (not proc) - (eq proc erc-server-process)) - (funcall predicate) - buf)))) + (erc--buffer-p buf predicate proc))) (buffer-list))))) (defun erc-buffer-list (&optional predicate proc) @@ -1693,42 +1698,33 @@ nil." ,pro)))) ;; Silence the byte-compiler by binding the result of mapcar to ;; a variable. + (ignore res) res))) -;; (iswitchb-mode) will autoload iswitchb.el -(defvar iswitchb-temp-buflist) -(declare-function iswitchb-read-buffer "iswitchb" - (prompt &optional default require-match start matches-set)) -(defvar iswitchb-make-buflist-hook) - -(defun erc-iswitchb (&optional arg) - "Use `iswitchb-read-buffer' to prompt for a ERC buffer to switch to. +(define-obsolete-function-alias 'erc-iswitchb 'erc-switch-to-buffer "25.1") +(defun erc-switch-to-buffer (&optional arg) + "Prompt for a ERC buffer to switch to. When invoked with prefix argument, use all erc buffers. Without prefix ARG, allow only buffers related to same session server. If `erc-track-mode' is in enabled, put the last element of -`erc-modified-channels-alist' in front of the buffer list. - -Due to some yet unresolved reason, global function `iswitchb-mode' -needs to be active for this function to work." +`erc-modified-channels-alist' in front of the buffer list." (interactive "P") - (let ((enabled (bound-and-true-p iswitchb-mode))) - (or enabled (iswitchb-mode 1)) - (unwind-protect - (let ((iswitchb-make-buflist-hook - (lambda () - (setq iswitchb-temp-buflist - (mapcar 'buffer-name - (erc-buffer-list - nil - (when arg erc-server-process))))))) - (switch-to-buffer - (iswitchb-read-buffer - "Switch-to: " - (if (boundp 'erc-modified-channels-alist) - (buffer-name (caar (last erc-modified-channels-alist))) - nil) - t))) - (or enabled (iswitchb-mode -1))))) + (switch-to-buffer + (read-buffer "Switch to ERC buffer: " + (when (boundp 'erc-modified-channels-alist) + (buffer-name (caar (last erc-modified-channels-alist)))) + t + ;; Only allow ERC buffers in the same session. + (let ((proc (unless arg erc-server-process))) + (lambda (bufname) + (let ((buf (if (consp bufname) + (cdr bufname) (get-buffer bufname)))) + (when buf + (erc--buffer-p buf (lambda () t) proc) + (with-current-buffer buf + (and (derived-mode-p 'erc-mode) + (or (null proc) + (eq proc erc-server-process))))))))))) (defun erc-channel-list (proc) "Return a list of channel buffers. @@ -2187,7 +2183,7 @@ be invoked for the values of the other parameters." Arguments are the same as for `erc'." (interactive (erc-select-read-args)) (let ((erc-server-connect-function 'erc-open-tls-stream)) - (apply 'erc r))) + (apply #'erc r))) (defun erc-open-tls-stream (name buffer host port) "Open an TLS stream to an IRC server. @@ -2401,7 +2397,7 @@ If STRING is nil, the function does nothing." (defun erc-is-valid-nick-p (nick) "Check if NICK is a valid IRC nickname." - (string-match (concat "^" erc-valid-nick-regexp "$") nick)) + (string-match (concat "\\`" erc-valid-nick-regexp "\\'") nick)) (defun erc-display-line (string &optional buffer) "Display STRING in the ERC BUFFER. @@ -2600,9 +2596,9 @@ server within `erc-lurker-threshold-time'. See also erc-lurker-threshold-time)))) (defcustom erc-common-server-suffixes - '(("openprojects.net$" . "OPN") - ("freenode.net$" . "freenode") - ("oftc.net$" . "OFTC")) + '(("openprojects.net\\'" . "OPN") + ("freenode.net\\'" . "freenode") + ("oftc.net\\'" . "OFTC")) "Alist of common server name suffixes. This variable is used in mode-line display to save screen real estate. Set it to nil if you want to avoid changing @@ -2638,7 +2634,7 @@ ARGS, PARSED, and TYPE are used to format MSG sensibly. See also `erc-format-message' and `erc-display-line'." (let ((string (if (symbolp msg) - (apply 'erc-format-message msg args) + (apply #'erc-format-message msg args) msg))) (setq string (cond @@ -2687,7 +2683,7 @@ See also `erc-server-send'." (defun erc-get-arglist (fun) "Return the argument list of a function without the parens." (let ((arglist (format "%S" (erc-function-arglist fun)))) - (if (string-match "^(\\(.*\\))$" arglist) + (if (string-match "\\`(\\(.*\\))\\'" arglist) (match-string 1 arglist) arglist))) @@ -2703,7 +2699,7 @@ is not alive, nil otherwise." "For CMD being the function name of a ERC command, something like erc-cmd-FOO, this returns a string /FOO." (let ((command-name (symbol-name cmd))) - (if (string-match "^erc-cmd-\\(.*\\)$" command-name) + (if (string-match "\\`erc-cmd-\\(.*\\)\\'" command-name) (concat "/" (match-string 1 command-name)) command-name))) @@ -2794,7 +2790,7 @@ VALUE is computed by evaluating the rest of LINE in Lisp." (erc-display-line (concat "Available user variables:\n" (apply - 'concat + #'concat (mapcar (lambda (var) (let ((val (symbol-value var))) @@ -3773,7 +3769,7 @@ Unban all currently banned users in the current channel." t))) (erc-server-send (format "MODE %s b" chnl))))) - (t (let ((bans (mapcar 'cdr erc-channel-banlist))) + (t (let ((bans (mapcar #'cdr erc-channel-banlist))) (when bans ;; Glob the bans into groups of three, and carry out the unban. ;; eg. /mode #foo -bbb a*!*@* b*!*@* c*!*@* @@ -3928,7 +3924,7 @@ If `point' is at the beginning of a channel name, use that as default." (concat "Set topic of " (erc-default-target) ": ") (when erc-channel-topic (let ((ss (split-string erc-channel-topic "\C-o"))) - (cons (apply 'concat (if (cdr ss) (butlast ss) ss)) + (cons (apply #'concat (if (cdr ss) (butlast ss) ss)) 0)))))) (let ((topic-list (split-string topic "\C-o"))) ; strip off the topic setter (erc-cmd-TOPIC (concat (erc-default-target) " " (car topic-list))))) @@ -5050,7 +5046,7 @@ arg-modes is a list of triples of the form: (MODE-CHAR ON/OFF ARGUMENT)." (if (string-match "^\\s-*\\(\\S-+\\)\\(\\s-.*$\\|$\\)" mode-string) - (let ((chars (mapcar 'char-to-string (match-string 1 mode-string))) + (let ((chars (mapcar #'char-to-string (match-string 1 mode-string))) ;; arguments in channel modes (args-str (match-string 2 mode-string)) (args nil) @@ -5996,7 +5992,7 @@ Returns a list of the form (HIGH LOW), compatible with Emacs time format." (if (> minutes 0) `("%d minutes, %d seconds" ,minutes ,seconds) `("%d seconds" ,seconds)))) - output (apply 'format format-args)) + output (apply #'format format-args)) ;; Change all "1 units" to "1 unit". (while (string-match "\\([^0-9]\\|^\\)1 \\S-+\\(s\\)" output) (setq output (erc-replace-match-subexpression-in-string @@ -6244,7 +6240,7 @@ if `erc-away' is non-nil." (defun erc-format-channel-modes () "Return the current channel's modes." - (concat (apply 'concat + (concat (apply #'concat "+" erc-channel-modes) (cond ((and erc-channel-user-limit erc-channel-key) (if erc-show-channel-key-p @@ -6436,7 +6432,7 @@ All windows are opened in the current frame." "Mode: " (mapcar (lambda (e) (list (symbol-name e))) - (apropos-internal "-mode$" 'commandp)) + (apropos-internal "-mode\\'" 'commandp)) nil t)))) (pop-to-buffer (make-indirect-buffer (current-buffer) buffer-name)) (funcall mode) @@ -6632,7 +6628,7 @@ See also `format-spec'." (error "No format spec for message %s" msg)) (when (functionp entry) (setq entry (apply entry args))) - (format-spec entry (apply 'format-spec-make args)))) + (format-spec entry (apply #'format-spec-make args)))) ;;; Various hook functions diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 55c83e4522..1cdf6d6971 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -724,7 +724,7 @@ matched." (setq nth (eshell-hist-word-reference nth))) (unless (numberp mth) (setq mth (eshell-hist-word-reference mth))) - (cons (mapconcat 'identity (eshell-sublist textargs nth mth) "") + (cons (mapconcat 'identity (eshell-sublist textargs nth mth) " ") end)))) (defun eshell-hist-parse-modifier (hist reference) @@ -737,7 +737,7 @@ matched." (goto-char (point-min)) (let ((modifiers (cdr (eshell-parse-modifiers)))) (dolist (mod modifiers) - (setq hist (funcall mod hist))) + (setq hist (car (funcall mod (list hist))))) hist)) (delete-region here (point))))) diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index abaa99eff2..289d37dd58 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el @@ -119,7 +119,8 @@ The format of each entry is (function (lambda (str) (eshell-stringify - (car (eshell-parse-argument str))))) lst))) + (car (eshell-parse-argument str))))) + lst))) (?L . #'(lambda (lst) (mapcar 'downcase lst))) (?U . #'(lambda (lst) (mapcar 'upcase lst))) (?C . #'(lambda (lst) (mapcar 'capitalize lst))) @@ -296,16 +297,15 @@ This function is specially for adding onto `eshell-parse-argument-hook'." (defun eshell-parse-modifiers () "Parse value modifiers and predicates at point. -If ALLOW-PREDS is non-nil, predicates will be parsed as well. Return a cons cell of the form (PRED-FUNC-LIST . MOD-FUNC-LIST) -NEW-STRING is STRING minus any modifiers. PRED-FUNC-LIST is a list of -predicate functions. MOD-FUNC-LIST is a list of result modifier -functions. PRED-FUNCS take a filename and return t if the test -succeeds; MOD-FUNCS take any string and preform a modification, -returning the resultant string." +PRED-FUNC-LIST is a list of predicate functions. MOD-FUNC-LIST +is a list of result modifier functions. PRED-FUNCS take a +filename and return t if the test succeeds; MOD-FUNCS take any +list of strings and perform a modification, returning the +resultant list of strings." (let (negate follow preds mods) (condition-case nil (while (not (eobp)) diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index da83ec6a6a..15120cb61d 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -871,6 +871,13 @@ When run interactively, widen the buffer first." (goto-char (point-max)) (recenter -1)) +(defun eshell/clear () + "Scroll contents of eshell window out of sight, leaving a blank window." + (interactive) + (let ((number-newlines (count-lines (window-start) (point)))) + (insert (make-string number-newlines ?\n))) + (eshell-send-input)) + (defun eshell-get-old-input (&optional use-current-region) "Return the command input on the current line." (if use-current-region diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 1a765f9ebd..2c246b44d5 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -732,7 +732,7 @@ effect. See `facemenu-remove-face-function'." face (facemenu-active-faces (cons face - (if (listp prev) + (if (face-list-p prev) prev (list prev))) ;; Specify the selected frame diff --git a/lisp/faces.el b/lisp/faces.el index 22bf262672..54e444b730 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -273,6 +273,17 @@ If FRAME is omitted or nil, use the selected frame." (not (internal-lisp-face-empty-p face frame))) +(defun face-list-p (face-or-list) + "True if FACE-OR-LIST is a list of faces. +Return nil if FACE-OR-LIST is a non-nil atom, or a cons cell whose car +is either 'foreground-color, 'background-color, or a keyword." + ;; The logic of merge_face_ref (xfaces.c) is recreated here. + (and (listp face-or-list) + (not (memq (car face-or-list) + '(foreground-color background-color))) + (not (keywordp (car face-or-list))))) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Setting face attributes from X resources. @@ -1922,11 +1933,7 @@ Return nil if there is no face." (get-char-property (point) 'face)))) (cond ((facep faceprop) (push faceprop faces)) - ((and (listp faceprop) - ;; Don't treat an attribute spec as a list of faces. - (not (keywordp (car faceprop))) - (not (memq (car faceprop) - '(foreground-color background-color)))) + ((face-list-p faceprop) (dolist (face faceprop) (if (facep face) (push face faces)))))) @@ -2092,8 +2099,7 @@ frame parameters in PARAMETERS." (value (cdr (assq param-name parameters)))) (if value (set-face-attribute (nth 1 param) frame - (nth 2 param) value)))) - (frame-can-run-window-configuration-change-hook frame t))) + (nth 2 param) value)))))) (defun tty-handle-reverse-video (frame parameters) "Handle the reverse-video frame parameter for terminal frames." diff --git a/lisp/ffap.el b/lisp/ffap.el index 350a6bdac2..d4e30a05dc 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -265,20 +265,10 @@ ffap most of the time." :group 'ffap :risky t) -(defcustom ffap-url-fetcher - (if (fboundp 'browse-url) - 'browse-url ; rely on browse-url-browser-function - 'w3-fetch) - ;; Remote control references: - ;; http://www.ncsa.uiuc.edu/SDG/Software/XMosaic/remote-control.html - ;; http://home.netscape.com/newsref/std/x-remote.html +(defcustom ffap-url-fetcher 'browse-url "A function of one argument, called by ffap to fetch an URL. -Reasonable choices are `w3-fetch' or a `browse-url-*' function. For a fancy alternative, get `ffap-url.el'." - :type '(choice (const w3-fetch) - (const browse-url) ; in recent versions of browse-url - (const browse-url-netscape) - (const browse-url-mosaic) + :type '(choice (const browse-url) function) :group 'ffap :risky t) diff --git a/lisp/filecache.el b/lisp/filecache.el index d036107d6f..fd99ee0fb9 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el @@ -154,11 +154,12 @@ ;; These are also used in buffers containing lines of file names, ;; so the end-of-name is matched with $ rather than \\'. (list "~$" "\\.o$" "\\.exe$" "\\.a$" "\\.elc$" ",v$" "\\.output$" - "\\.$" "#$" "\\.class$") + "\\.$" "#$" "\\.class$" "/\\.#") "List of regular expressions used as filters by the file cache. File names which match these expressions will not be added to the cache. Note that the functions `file-cache-add-file' and `file-cache-add-file-list' do not use this variable." + :version "25.1" ; added "/\\.#" :type '(repeat regexp) :group 'file-cache) diff --git a/lisp/files.el b/lisp/files.el index 5e80cb7659..0fdf0048ac 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1192,7 +1192,7 @@ containing it, until no links are left at any level. (setq dirfile (directory-file-name dir)) ;; If these are equal, we have the (or a) root directory. (or (string= dir dirfile) - (and (memq system-type '(windows-nt ms-dos cygwin)) + (and (memq system-type '(windows-nt ms-dos cygwin nacl)) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) ;; If this is the same dir we last got the truename for, ;; save time--don't recalculate. @@ -1628,10 +1628,10 @@ killed." (confirm-nonexistent-file-or-buffer) file-name) t))) (unless (run-hook-with-args-until-failure 'kill-buffer-query-functions) - (error "Aborted")) + (user-error "Aborted")) (and (buffer-modified-p) buffer-file-name (not (yes-or-no-p "Kill and replace the buffer without saving it? ")) - (error "Aborted")) + (user-error "Aborted")) (let ((obuf (current-buffer)) (ofile buffer-file-name) (onum buffer-file-number) @@ -1844,7 +1844,7 @@ OP-TYPE specifies the file operation being performed (for message to user)." (not (y-or-n-p (format "File %s is large (%s), really %s? " (file-name-nondirectory filename) (file-size-human-readable size) op-type)))) - (error "Aborted"))) + (user-error "Aborted"))) (defun warn-maybe-out-of-memory (size) "Warn if an attempt to open file of SIZE bytes may run out of memory." @@ -2110,7 +2110,7 @@ Do you want to revisit the file normally now? ") (defun insert-file-contents-literally (filename &optional visit beg end replace) "Like `insert-file-contents', but only reads in the file literally. A buffer may be modified in several ways after reading into the buffer, -to Emacs features such as format decoding, character code +due to Emacs features such as format decoding, character code conversion, `find-file-hook', automatic uncompression, etc. This function ensures that none of these modifications will take place." @@ -3883,7 +3883,7 @@ the old visited file has been renamed to the new name FILENAME." (not no-query) (not (y-or-n-p (format "A buffer is visiting %s; proceed? " filename))) - (error "Aborted"))) + (user-error "Aborted"))) (or (equal filename buffer-file-name) (progn (and filename (lock-buffer filename)) @@ -4007,7 +4007,7 @@ Interactively, confirmation is required unless you supply a prefix argument." (listp last-nonmenu-event) use-dialog-box)) (or (y-or-n-p (format "File `%s' exists; overwrite? " filename)) - (error "Canceled"))) + (user-error "Canceled"))) (set-visited-file-name filename (not confirm)))) (set-buffer-modified-p t) ;; Make buffer writable if file is writable. @@ -5664,13 +5664,14 @@ Then you'll be asked about a number of files to recover." (interactive) (if (null auto-save-list-file-prefix) (error "You set `auto-save-list-file-prefix' to disable making session files")) - (let ((dir (file-name-directory auto-save-list-file-prefix))) + (let ((dir (file-name-directory auto-save-list-file-prefix)) + (nd (file-name-nondirectory auto-save-list-file-prefix))) (unless (file-directory-p dir) (make-directory dir t)) (unless (directory-files dir nil - (concat "\\`" (regexp-quote - (file-name-nondirectory - auto-save-list-file-prefix))) + (if (string= "" nd) + directory-files-no-dot-files-regexp + (concat "\\`" (regexp-quote nd))) t) (error "No previous sessions to recover"))) (let ((ls-lisp-support-shell-wildcards t)) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 6ec6c9f119..96b290e34f 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -585,11 +585,14 @@ This is normally set via `font-lock-defaults'.") This is used when turning off Font Lock mode. This is normally set via `font-lock-defaults'.") -(defvar font-lock-fontify-region-function 'font-lock-default-fontify-region +(defvar font-lock-fontify-region-function #'font-lock-default-fontify-region "Function to use for fontifying a region. It should take two args, the beginning and end of the region, and an optional third arg VERBOSE. If VERBOSE is non-nil, the function should print status -messages. This is normally set via `font-lock-defaults'.") +messages. This is normally set via `font-lock-defaults'. +If it fontifies a larger region, it should ideally return a list of the form +\(jit-lock-bounds BEG . END) indicating the bounds of the region actually +fontified.") (defvar font-lock-unfontify-region-function 'font-lock-default-unfontify-region "Function to use for unfontifying a region. @@ -600,6 +603,7 @@ This is normally set via `font-lock-defaults'.") "List of Font Lock mode related modes that should not be turned on. Currently, valid mode names are `fast-lock-mode', `jit-lock-mode' and `lazy-lock-mode'. This is normally set via `font-lock-defaults'.") +(make-obsolete-variable 'font-lock-inhibit-thing-lock nil "25.1") (defvar-local font-lock-multiline nil "Whether font-lock should cater to multiline keywords. @@ -935,7 +939,7 @@ The value of this variable is used when Font Lock mode is turned on." ;; Don't fontify eagerly (and don't abort if the buffer is large). (set (make-local-variable 'font-lock-fontified) t) ;; Use jit-lock. - (jit-lock-register 'font-lock-fontify-region + (jit-lock-register #'font-lock-fontify-region (not font-lock-keywords-only)) ;; Tell jit-lock how we extend the region to refontify. (add-hook 'jit-lock-after-change-extend-region-functions @@ -1220,7 +1224,8 @@ This function is the default `font-lock-fontify-region-function'." (font-lock-fontify-syntactic-keywords-region start end))) (unless font-lock-keywords-only (font-lock-fontify-syntactically-region beg end loudly)) - (font-lock-fontify-keywords-region beg end loudly))))) + (font-lock-fontify-keywords-region beg end loudly) + `(jit-lock-bounds ,beg . ,end))))) ;; The following must be rethought, since keywords can override fontification. ;; ;; Now scan for keywords, but not if we are inside a comment now. @@ -1325,11 +1330,13 @@ This function does 2 things: (when (memq 'font-lock-extend-region-wholelines font-lock-extend-region-functions) (goto-char beg) - (setq jit-lock-start (min jit-lock-start (line-beginning-position))) + (setq beg (min jit-lock-start (line-beginning-position))) (goto-char end) - (setq jit-lock-end + (setq end (max jit-lock-end - (if (bolp) (point) (line-beginning-position 2)))))))) + (if (bolp) (point) (line-beginning-position 2))))) + (setq jit-lock-start beg + jit-lock-end end)))) (defun font-lock-fontify-block (&optional arg) "Fontify some lines the way `font-lock-fontify-buffer' would. @@ -1416,37 +1423,33 @@ Optional argument OBJECT is the string or buffer containing the text." (put-text-property start next prop value object) (setq start (text-property-any next end prop nil object))))) -;; For completeness: this is to `remove-text-properties' as `put-text-property' -;; is to `add-text-properties', etc. -;;(defun remove-text-property (start end property &optional object) -;; "Remove a property from text from START to END. -;;Argument PROPERTY is the property to remove. -;;Optional argument OBJECT is the string or buffer containing the text. -;;Return t if the property was actually removed, nil otherwise." -;; (remove-text-properties start end (list property) object)) - -;; For consistency: maybe this should be called `remove-single-property' like -;; `next-single-property-change' (not `next-single-text-property-change'), etc. -;;(defun remove-single-text-property (start end prop value &optional object) -;; "Remove a specific property value from text from START to END. -;;Arguments PROP and VALUE specify the property and value to remove. The -;;resulting property values are not equal to VALUE nor lists containing VALUE. -;;Optional argument OBJECT is the string or buffer containing the text." -;; (let ((start (text-property-not-all start end prop nil object)) next prev) -;; (while start -;; (setq next (next-single-property-change start prop object end) -;; prev (get-text-property start prop object)) -;; (cond ((and (symbolp prev) (eq value prev)) -;; (remove-text-property start next prop object)) -;; ((and (listp prev) (memq value prev)) -;; (let ((new (delq value prev))) -;; (cond ((null new) -;; (remove-text-property start next prop object)) -;; ((= (length new) 1) -;; (put-text-property start next prop (car new) object)) -;; (t -;; (put-text-property start next prop new object)))))) -;; (setq start (text-property-not-all next end prop nil object))))) +(defun font-lock--remove-face-from-text-property (start + end + prop value &optional object) + "Remove a specific property value from text from START to END. +Arguments PROP and VALUE specify the property and value to remove. The +resulting property values are not `eq' to VALUE nor lists containing VALUE. +Optional argument OBJECT is the string or buffer containing the text." + (let ((start (text-property-not-all start end prop nil object)) next prev) + (while start + (setq next (next-single-property-change start prop object end) + prev (get-text-property start prop object)) + (cond ((or (atom prev) + (keywordp (car prev)) + (eq (car prev) 'foreground-color) + (eq (car prev) 'background-color)) + (when (eq value prev) + (remove-list-of-text-properties start next (list prop) object))) + ((memq value prev) ;Assume prev is not dotted. + (let ((new (remq value prev))) + (cond ((null new) + (remove-list-of-text-properties start next (list prop) + object)) + ((= (length new) 1) + (put-text-property start next prop (car new) object)) + (t + (put-text-property start next prop new object)))))) + (setq start (text-property-not-all next end prop nil object))))) ;;; End of Additional text property functions. diff --git a/lisp/frame.el b/lisp/frame.el index 1d5bbf2317..e8a89828b8 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -259,6 +259,10 @@ there (in decreasing order of priority)." (let ((newparms (frame-parameters)) (frame (selected-frame))) (tty-handle-reverse-video frame newparms) + ;; tty-handle-reverse-video might change the frame's + ;; color parameters, and we need to use the updated + ;; value below. + (setq newparms (frame-parameters)) ;; If we changed the background color, we need to update ;; the background-mode parameter, and maybe some faces, ;; too. @@ -266,7 +270,7 @@ there (in decreasing order of priority)." (unless (or (assq 'background-mode initial-frame-alist) (assq 'background-mode default-frame-alist)) (frame-set-background-mode frame)) - (face-set-after-frame-default frame)))))) + (face-set-after-frame-default frame newparms)))))) ;; If the initial frame is still around, apply initial-frame-alist ;; and default-frame-alist to it. @@ -465,6 +469,16 @@ there (in decreasing order of priority)." (frame-set-background-mode frame-initial-frame)) (face-set-after-frame-default frame-initial-frame) (setq newparms (delq new-bg newparms))) + + (when (numberp (car frame-size-history)) + (setq frame-size-history + (cons (1- (car frame-size-history)) + (cons + (list frame-initial-frame + "frame-notice-user-settings" + nil newparms) + (cdr frame-size-history))))) + (modify-frame-parameters frame-initial-frame newparms))))) ;; Restore the original buffer. @@ -536,7 +550,8 @@ is not considered (see `next-frame')." Return nil if we don't know how to interpret DISPLAY." ;; MS-Windows doesn't know how to create a GUI frame in a -nw session. (if (and (eq system-type 'windows-nt) - (null (window-system))) + (null (window-system)) + (not (daemonp))) nil (cl-loop for descriptor in display-format-alist for pattern = (car descriptor) @@ -686,7 +701,7 @@ the new frame according to its own rules." ;; Now make the frame. (run-hooks 'before-make-frame-hook) -;; (setq frame-adjust-size-history '(t)) +;; (setq frame-size-history '(1000)) (setq frame (funcall (gui-method frame-creation-function w) params)) @@ -697,11 +712,14 @@ the new frame according to its own rules." (let ((val (frame-parameter oldframe param))) (when val (set-frame-parameter frame param val))))) - (when (eq (car frame-adjust-size-history) t) - (setq frame-adjust-size-history - (cons t (cons (list "Frame made") - (cdr frame-adjust-size-history))))) + (when (numberp (car frame-size-history)) + (setq frame-size-history + (cons (1- (car frame-size-history)) + (cons (list frame "make-frame") + (cdr frame-size-history))))) + ;; We can run `window-configuration-change-hook' for this frame now. + (frame-after-make-frame frame t) (run-hook-with-args 'after-make-frame-functions frame) frame)) @@ -1187,7 +1205,15 @@ To get the frame's current background color, use `frame-parameters'." (modify-frame-parameters (selected-frame) (list (cons 'background-color color-name))) (or window-system - (face-set-after-frame-default (selected-frame)))) + (face-set-after-frame-default (selected-frame) + (list + (cons 'background-color color-name) + ;; Pass the foreground-color as + ;; well, if defined, to avoid + ;; losing it when faces are reset + ;; to their defaults. + (assq 'foreground-color + (frame-parameters)))))) (defun set-foreground-color (color-name) "Set the foreground color of the selected frame to COLOR-NAME. @@ -1197,7 +1223,15 @@ To get the frame's current foreground color, use `frame-parameters'." (modify-frame-parameters (selected-frame) (list (cons 'foreground-color color-name))) (or window-system - (face-set-after-frame-default (selected-frame)))) + (face-set-after-frame-default (selected-frame) + (list + (cons 'foreground-color color-name) + ;; Pass the background-color as + ;; well, if defined, to avoid + ;; losing it when faces are reset + ;; to their defaults. + (assq 'background-color + (frame-parameters)))))) (defun set-cursor-color (color-name) "Set the text cursor color of the selected frame to COLOR-NAME. @@ -1782,8 +1816,12 @@ command starts, by installing a pre-command hook." (defun blink-cursor-timer-function () "Timer function of timer `blink-cursor-timer'." (internal-show-cursor nil (not (internal-show-cursor-p))) + ;; Suspend counting blinks when the w32 menu-bar menu is displayed, + ;; since otherwise menu tooltips will behave erratically. + (or (and (fboundp 'w32--menu-bar-in-use) + (w32--menu-bar-in-use)) + (setq blink-cursor-blinks-done (1+ blink-cursor-blinks-done))) ;; Each blink is two calls to this function. - (setq blink-cursor-blinks-done (1+ blink-cursor-blinks-done)) (when (and (> blink-cursor-blinks 0) (<= (* 2 blink-cursor-blinks) blink-cursor-blinks-done)) (blink-cursor-suspend) @@ -1861,57 +1899,56 @@ terminals, cursor blinking is controlled by the terminal." ;; Frame maximization/fullscreen (defun toggle-frame-maximized () - "Toggle maximization state of the selected frame. -Maximize the selected frame or un-maximize if it is already maximized. -Respect window manager screen decorations. -If the frame is in fullscreen mode, don't change its mode, -just toggle the temporary frame parameter `maximized', -so the frame will go to the right maximization state -after disabling fullscreen mode. + "Toggle maximization state of selected frame. +Maximize selected frame or un-maximize if it is already maximized. + +If the frame is in fullscreen state, don't change its state, but +set the frame's `fullscreen-restore' parameter to `maximized', so +the frame will be maximized after disabling fullscreen state. Note that with some window managers you may have to set `frame-resize-pixelwise' to non-nil in order to make a frame -appear truly maximized. +appear truly maximized. In addition, you may have to set +`x-frame-normalize-before-maximize' in order to enable +transitions from one fullscreen state to another. See also `toggle-frame-fullscreen'." (interactive) - (if (memq (frame-parameter nil 'fullscreen) '(fullscreen fullboth)) - (modify-frame-parameters - nil - `((maximized - . ,(unless (eq (frame-parameter nil 'maximized) 'maximized) - 'maximized)))) - (modify-frame-parameters - nil - `((fullscreen - . ,(unless (eq (frame-parameter nil 'fullscreen) 'maximized) - 'maximized)))))) + (let ((fullscreen (frame-parameter nil 'fullscreen))) + (cond + ((memq fullscreen '(fullscreen fullboth)) + (set-frame-parameter nil 'fullscreen-restore 'maximized)) + ((eq fullscreen 'maximized) + (set-frame-parameter nil 'fullscreen nil)) + (t + (set-frame-parameter nil 'fullscreen 'maximized))))) (defun toggle-frame-fullscreen () - "Toggle fullscreen mode of the selected frame. -Enable fullscreen mode of the selected frame or disable if it is -already fullscreen. Ignore window manager screen decorations. -When turning on fullscreen mode, remember the previous value of the -maximization state in the temporary frame parameter `maximized'. -Restore the maximization state when turning off fullscreen mode. + "Toggle fullscreen state of selected frame. +Make selected frame fullscreen or restore its previous size if it +is already fullscreen. + +Before making the frame fullscreen remember the current value of +the frame's `fullscreen' parameter in the `fullscreen-restore' +parameter of the frame. That value is used to restore the +frame's fullscreen state when toggling fullscreen the next time. Note that with some window managers you may have to set `frame-resize-pixelwise' to non-nil in order to make a frame -appear truly fullscreen. +appear truly fullscreen. In addition, you may have to set +`x-frame-normalize-before-maximize' in order to enable +transitions from one fullscreen state to another. See also `toggle-frame-maximized'." (interactive) - (modify-frame-parameters - nil - `((maximized - . ,(unless (memq (frame-parameter nil 'fullscreen) '(fullscreen fullboth)) - (frame-parameter nil 'fullscreen))) - (fullscreen - . ,(if (memq (frame-parameter nil 'fullscreen) '(fullscreen fullboth)) - (if (eq (frame-parameter nil 'maximized) 'maximized) - 'maximized) - 'fullscreen))))) - + (let ((fullscreen (frame-parameter nil 'fullscreen))) + (if (memq fullscreen '(fullscreen fullboth)) + (let ((fullscreen-restore (frame-parameter nil 'fullscreen-restore))) + (if (memq fullscreen-restore '(maximized fullheight fullwidth)) + (set-frame-parameter nil 'fullscreen fullscreen-restore) + (set-frame-parameter nil 'fullscreen nil))) + (modify-frame-parameters + nil `((fullscreen . fullboth) (fullscreen-restore . ,fullscreen)))))) ;;;; Key bindings diff --git a/lisp/frameset.el b/lisp/frameset.el index 4a0637439d..17fe39be84 100644 --- a/lisp/frameset.el +++ b/lisp/frameset.el @@ -1022,8 +1022,8 @@ Internal use only." (defun frameset-keep-original-display-p (force-display) "True if saved frames' displays should be honored. For the meaning of FORCE-DISPLAY, see `frameset-restore'." - (cond ((daemonp) t) - ((eq system-type 'windows-nt) nil) ;; Does ns support more than one display? + (cond ((eq system-type 'windows-nt) nil) ;; Does ns support more than one display? + ((daemonp) t) (t (not force-display)))) (defun frameset-minibufferless-first-p (frame1 _frame2) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 76683310b3..14734e3e40 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,211 @@ +2015-04-03 Katsumi Yamaoka + + * gnus-art.el (gnus-article-browse-html-save-cid-content): + Always return relative file name. + (gnus-article-browse-html-parts): + Make external links absolute and cid file names relative. + +2015-04-01 Eric Abrahamsen + + * registry.el (registry-prune): Re-use `registry-full' in + `registry-prune'. It's a bit of redundant work, but safer. + Also ensure that target-size is an integer. + +2015-03-31 Daiki Ueno + + * plstore.el (plstore--decrypt): Clear entry in + `plstore-passphrase-alist' if decryption failed (bug#20030). + +2015-03-28 Adam Sjøgren + + * gnus-sum.el (gnus-summary-make-menu-bar): Add "Display HTML images" + to "Display" menu. + +2015-03-24 Eric Abrahamsen + + * nnimap.el (nnimap-split-incoming-mail): If a message is already + in the group it should be split to, don't re-copy it into the group. + +2015-03-23 Ben Bacarisse (tiny change) + + * nnmh.el (nnmh-request-expire-articles): + Work for the case nnmail-expiry-target is an nnmh group (bug#20170). + +2015-03-21 Eric Abrahamsen + + * registry.el (registry-lookup-secondary, registry-full) + (registry-prune, registry-collect-prune-candidates): + * gnus-registry.el (gnus-registry-load): Use slot names rather than + initarg names in `oref' and `oset'. + +2015-03-19 Eric Abrahamsen + + * registry.el (registry-prune): Allow registry to reach full size + before pruning. + +2015-03-19 Eric Abrahamsen + + * registry.el (registry-collect-prune-candidates): Fix call to + cl-subseq. + +2015-03-11 Stefan Monnier + + * gnus-registry.el (gnus-registry-handle-action) + (gnus-registry-post-process-groups): Don't add-to-list on a local var. + (gnus-registry-keywords): Make it do something. + (gnus-registry-import-eld): Remove unused var `new-entry'. + (gnus-registry-action): Remove unused var `to-name'. + (gnus-registry-make-db): Prefer `make-instance' to avoid + compiler warnings. + (gnus-registry-load, gnus-registry-fixup-registry): Avoid `oset'. + + * registry.el (registry-db): Don't oset-default an instance-allocated + slot. + +2015-03-10 Glenn Morris + + * message.el (message-valid-fqdn-regexp): Bump :version for + 2014-11-17 change. + +2015-03-08 Rasmus Pank Roulund + + * gnus-notifications.el (gnus-notifications-action): Raise window + frame. + (gnus-notifications-action): Allow mark as read. + (gnus-notifications-notify): Show uption to mark as read. + +2015-03-08 Adam Sjøgren + + * message.el (message-insert-formatted-citation-line): Change %F to + fall back to email address if no first name could be determined. + +2015-03-07 Stefan Monnier + + * registry.el (registry-lookup-breaks-before-lexbind, registry-lookup) + (registry-search, registry-delete, registry-size, registry-insert) + (registry-reindex, registry-collect-prune-candidates): + * gnus-registry.el (gnus-registry-fixup-registry) + (gnus-registry-remove-extra-data): Use slot names rather than initarg + names in `oref' and `oset'. + +2015-02-26 Katsumi Yamaoka + + * gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part): + Fix point motion when removing displayed MIME part. + (gnus-article-edit-part): Make jumping to the next part really work + when deleting or stripping. + (gnus-mime-buttonize-attachments-in-header): Make header attachment + buttons identical to the ones in the article body so as to work deleting + and stripping. + +2015-02-25 Katsumi Yamaoka + + * mm-decode.el (mm-shr) + * mm-view.el (mm-inline-text-html-render-with-w3m): + Revert my bogus change that made the start marker of a part + the "moves after insertion" type. + +2015-02-23 Tassilo Horn + + * mailcap.el (mailcap-mime-data): Support `pdf-view-mode' (from PDF + Tools: https://github.com/politza/pdf-tools) for viewing PDF + attachments in emacs. + +2015-02-23 Katsumi Yamaoka + + * gnus-art.el (gnus-mime-display-single): Avoid "End of buffer" error. + +2015-02-18 Eric Abrahamsen + + * nnimap.el (nnimap-get-groups): Correctly read unquoted group names + from the server LIST response. + +2015-02-14 Lars Ingebrigtsen + + * nnimap.el (nnimap-retrieve-headers): If the server closes connection + during header retrieval, error out instead of interpreting the data in + the buffer as the only messages there. This way, we don't mark + articles as read on a server hangup (bug#19035). + + * mm-decode.el (mm-head-p): New function. + (mm-display-part): Go to a blank line when inserting parts internally. + +2015-02-13 Lars Ingebrigtsen + + * gnus-msg.el (gnus-msg-mail): Don't let-bind `gnus-newsgroup-name' so + that we don't get a warning when setting the buffer-local variable + (bug#19573). + + * nnmail.el (nnmail-expiry-target-group): Supply the info structure to + `gnus-request-group'. + +2015-02-12 Katsumi Yamaoka + + * gnus-art.el (gnus-article-browse-html-save-cid-content) + (gnus-article-browse-html-parts): Make cid file names relative if and + only if html doesn't specify directory. + +2015-02-11 Lars Ingebrigtsen + + * gnus-art.el (gnus-treat-buttonize): Don't re-buttonize URLs in HTML + parts, because that breaks filling (since buttons are in a bold face). + +2015-02-10 Katsumi Yamaoka + + * mm-decode.el (mm-convert-shr-links): Delete useless variable `face'; + use gnus-overlays-at and gnus-overlay-put. + +2015-02-10 Lars Ingebrigtsen + + * mm-decode.el (mm-shr): Only pass the fill column when not using + fonts, because limiting the width to what's appropriate for followups + doesn't really help when not using proportional fonts. + +2015-02-09 Lars Ingebrigtsen + + * mm-decode.el (mm-convert-shr-links): Don't overwrite the faces from + shr, beacause that breaks folding. + (mm-shr): Don't shorten the width when using fonts. + +2015-02-05 Teodor Zlatanov + + * gnus-start.el (gnus-save-newsrc-file-check-timestamp): Remove + variable; always check the newrc timestamp. + (gnus-save-newsrc-file): Always check timestamp. + +2015-02-05 Timo Lilja (tiny change) + + * mail-source.el (mail-source-call-script): If scripts exit with an + error, pop up an error buffer. + +2015-02-05 Lars Ingebrigtsen + + * gnus-sum.el (gnus-extra-headers): Add the popular Gmail X-GM-LABELS + as a default. + + * nnimap.el (nnimap-request-group-scan): Ensure that we've selected the + correct server. + +2015-02-05 Vincent Bernat (tiny change) + + * nnimap.el (nnimap-request-group-scan): Fix the function name. + + * gnus-int.el (gnus-request-group-scan): Use the correct function name. + +2015-02-05 Lars Ingebrigtsen + + * gnus-sum.el (gnus-select-newsgroup): Pass the group info along so + that nnimap works for non-activated backends. + +2015-02-04 Stefan Monnier + + * mm-util.el (mm-with-unibyte-current-buffer): Don't emit a warning + message, since we already get an obsolescence message. Use `declare'. + +2015-02-04 Eric Abrahamsen + + * nnir.el: Revert "Enable non-ASCII IMAP searches". + 2015-01-30 Glenn Morris * gnus-registry.el (gnus-registry-max-pruned-entries) @@ -736,7 +944,7 @@ 2014-01-30 Lars Ingebrigtsen * nnmail.el (nnmail-split-it): Instead of redoing the search to restore - the match data, just save and restore it explictly (bug#12375). + the match data, just save and restore it explicitly (bug#12375). * gnus-sum.el (gnus-summary-read-group-1): Initialize the spam code if that's needed. @@ -23993,7 +24201,7 @@ (spam-ham-copy-or-move-routine): Return the number of processed ham messages. (spam-summary-prepare-exit): Use the above values to decide - whether status messages shouled be displayed. + whether status messages should be displayed. 2004-05-20 Katsumi Yamaoka diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 557c6a3a4a..5ec1268aee 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -50,6 +50,7 @@ (autoload 'ansi-color-apply-on-region "ansi-color") (autoload 'mm-url-insert-file-contents-external "mm-url") (autoload 'mm-extern-cache-contents "mm-extern") +(autoload 'url-expand-file-name "url-expand") (defgroup gnus-article nil "Article display." @@ -1139,7 +1140,7 @@ predicate. See Info node `(gnus)Customizing Articles'." :type gnus-article-treat-custom) (put 'gnus-treat-highlight-signature 'highlight t) -(defcustom gnus-treat-buttonize 100000 +(defcustom gnus-treat-buttonize '(and 100000 (typep "text/plain")) "Add buttons. Valid values are nil, t, `head', `first', `last', an integer or a predicate. See Info node `(gnus)Customizing Articles'." @@ -2794,9 +2795,9 @@ summary buffer." (defun gnus-article-browse-html-save-cid-content (cid handles directory) "Find CID content in HANDLES and save it in a file in DIRECTORY. -Return file name." +Return file name relative to the parent of DIRECTORY." (save-match-data - (let (file) + (let (file afile) (catch 'found (dolist (handle handles) (cond @@ -2809,16 +2810,16 @@ Return file name." cid handle directory)) (throw 'found file))) ((equal (concat "<" cid ">") (mm-handle-id handle)) - (setq file - (expand-file-name - (or (mm-handle-filename handle) - (concat - (make-temp-name "cid") - (car (rassoc (car (mm-handle-type handle)) - mailcap-mime-extensions)))) - directory)) - (mm-save-part-to-file handle file) - (throw 'found file)))))))) + (setq file (or (mm-handle-filename handle) + (concat + (make-temp-name "cid") + (car (rassoc (car (mm-handle-type handle)) + mailcap-mime-extensions)))) + afile (expand-file-name file directory)) + (mm-save-part-to-file handle afile) + (throw 'found (concat (file-name-nondirectory + (directory-file-name directory)) + "/" file))))))))) (defun gnus-article-browse-html-parts (list &optional header) "View all \"text/html\" parts from LIST. @@ -2854,8 +2855,32 @@ message header will be added to the bodies of the \"text/html\" parts." (insert content) ;; resolve cid contents (let ((case-fold-search t) - cid-file) + st base regexp cid-file) (goto-char (point-min)) + (when (and (re-search-forward "]" nil t) + (progn + (setq st (match-end 0)) + (re-search-forward "]" nil t)) + (re-search-backward "]+\\)*[\t\n ]+href=\"\\([^\"]+\\)\"[^>]*>" st t)) + (setq base (match-string 1)) + (replace-match "") + (setq st (point)) + (dolist (tag '(("a" . "href") ("form" . "action") + ("img" . "src"))) + (setq regexp (concat "<" (car tag) + "\\(?:[\t\n ]+[^\t\n >]+\\)*[\t\n ]+" + (cdr tag) "=\"\\([^\"]+\\)")) + (while (re-search-forward regexp nil t) + (insert (prog1 + (condition-case nil + (save-match-data + (url-expand-file-name (match-string 1) + base)) + (error (match-string 1))) + (delete-region (match-beginning 1) + (match-end 1))))) + (goto-char st))) (while (re-search-forward "\ ]+[\t\n ]+\\)*src=\"\\(cid:\\([^\"]+\\)\\)\"" nil t) @@ -2870,16 +2895,7 @@ message header will be added to the bodies of the \"text/html\" parts." (with-current-buffer gnus-article-buffer gnus-article-mime-handles) cid-dir)) - (when (eq system-type 'cygwin) - (setq cid-file - (concat "/" (substring - (with-output-to-string - (call-process "cygpath" nil - standard-output - nil "-m" cid-file)) - 0 -1)))) - (replace-match (concat "file://" cid-file) - nil nil nil 1)))) + (replace-match cid-file nil nil nil 1)))) (unless content (setq content (buffer-string)))) (when (or charset header (not file)) (setq tmp-file (mm-make-temp-file @@ -5054,6 +5070,7 @@ and `gnus-mime-delete-part', and not provided at run-time normally." (let ((gnus-mime-buttonized-part-id current-id)) (gnus-article-edit-done)) (gnus-configure-windows 'article) + (sit-for 0) (when (and current-id (integerp gnus-auto-select-part)) (gnus-article-jump-to-part (min (max (+ current-id gnus-auto-select-part) 1) @@ -5349,7 +5366,10 @@ Compressed files like .gz and .bz2 are decompressed." 'gnus-data)))) (setq b btn)) (if (and (not arg) (mm-handle-undisplayer handle)) - (mm-remove-part handle) + (progn + (setq b (copy-marker b) + btn (copy-marker btn)) + (mm-remove-part handle)) (cond ((not arg) nil) ((numberp arg) @@ -5363,6 +5383,9 @@ Compressed files like .gz and .bz2 are decompressed." (forward-line 1)) (mm-display-inline handle)) ;; Toggle the button appearance between `[button]...' and `[button]'. + (when (markerp btn) + (setq btn (prog1 (marker-position btn) + (set-marker btn nil)))) (goto-char btn) (let ((displayed-p (mm-handle-displayed-p handle))) (gnus-insert-mime-button handle (get-text-property btn 'gnus-part) @@ -5398,6 +5421,9 @@ Compressed files like .gz and .bz2 are decompressed." '((gnus-treat-highlight-headers gnus-article-highlight-headers)))) (gnus-treat-article 'head))))) + (when (markerp b) + (setq b (prog1 (marker-position b) + (set-marker b nil)))) (goto-char b)))) (defun gnus-mime-set-charset-parameters (handle charset) @@ -5495,7 +5521,8 @@ If no internal viewer is available, use an external viewer." (gnus-mime-view-part-as-type nil (lambda (type) (mm-inlinable-p handle type))) (when handle - (gnus-bind-safe-url-regexp (mm-display-part handle)))))) + (gnus-bind-safe-url-regexp + (mm-display-part handle nil t)))))) (defun gnus-mime-action-on-part (&optional action) "Do something with the MIME attachment at \(point\)." @@ -5719,7 +5746,8 @@ all parts." point (previous-single-property-change start 'gnus-data)) (if (mm-handle-displayed-p handle) ;; This will remove the part. - (setq retval (mm-display-part handle)) + (setq point (copy-marker point) + retval (mm-display-part handle)) (let ((part (or (and (mm-inlinable-p handle) (mm-inlined-p handle) t) @@ -5750,6 +5778,9 @@ all parts." ,(point-max-marker))))))) (part (mm-display-inline handle)))))) + (when (markerp point) + (setq point (prog1 (marker-position point) + (set-marker point nil)))) (goto-char point) ;; Toggle the button appearance between `[button]...' and `[button]'. (let ((displayed-p (mm-handle-displayed-p handle))) @@ -6090,7 +6121,7 @@ If nil, don't show those extra buttons." (gnus-article-insert-newline) (if (prog1 (= (skip-chars-backward "\n") -1) - (forward-char 1)) + (unless (eobp) (forward-char 1))) (gnus-article-insert-newline) (put-text-property (point) (point-max) 'gnus-undeletable t)) (goto-char (point-max))) @@ -6421,8 +6452,7 @@ in the body. Use `gnus-header-face-alist' to highlight buttons." (dolist (button (nreverse buttons)) (setq st (point)) (insert " ") - (mm-handle-set-undisplayer - (setq handle (copy-sequence (cdr button))) nil) + (mm-handle-set-undisplayer (setq handle (cdr button)) nil) (gnus-insert-mime-button handle (car button)) (skip-chars-backward "\t\n ") (delete-region (point) (point-max)) @@ -7186,6 +7216,8 @@ If given a prefix, show the hidden text instead." (set-buffer buf)))))) (defun gnus-block-private-groups (group) + "Allows images in newsgroups to be shown, blocks images in all +other groups." (if (or (gnus-news-group-p group) (gnus-member-of-valid 'global group)) ;; Block nothing in news groups. diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index dd938ce075..4e870bb84b 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -442,7 +442,7 @@ If it is down, start it up (again)." (defun gnus-request-group-scan (group info) "Request that GROUP get a complete rescan." (let ((gnus-command-method (gnus-find-method-for-group group)) - (func 'request-group-description)) + (func 'request-group-scan)) (when (gnus-check-backend-function func group) (funcall (gnus-get-function gnus-command-method func) (gnus-group-real-name group) (nth 1 gnus-command-method) info)))) diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 6c80c0daca..bfd3da2e69 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -541,11 +541,15 @@ instead." nil yank-action send-actions return-action)) (let ((buf (current-buffer)) ;; Don't use posting styles corresponding to any existing group. - (gnus-newsgroup-name "") + (group-name gnus-newsgroup-name) mail-buf) - (gnus-setup-message 'message - (message-mail to subject other-headers continue - nil yank-action send-actions return-action)) + (unwind-protect + (progn + (setq gnus-newsgroup-name "") + (gnus-setup-message 'message + (message-mail to subject other-headers continue + nil yank-action send-actions return-action))) + (setq gnus-newsgroup-name group-name)) (when switch-action (setq mail-buf (current-buffer)) (switch-to-buffer buf) diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el index 2941cc46e4..f73aac1f5b 100644 --- a/lisp/gnus/gnus-notifications.el +++ b/lisp/gnus/gnus-notifications.el @@ -75,12 +75,19 @@ not get notifications." "Map notifications ids to messages.") (defun gnus-notifications-action (id key) - (when (string= key "read") - (let ((group-article (assoc id gnus-notifications-id-to-msg))) - (when group-article - (let ((group (cadr group-article)) - (article (nth 2 group-article))) - (gnus-fetch-group group (list article))))))) + (let ((group-article (assoc id gnus-notifications-id-to-msg))) + (when group-article + (let ((group (cadr group-article)) + (article (nth 2 group-article))) + (cond ((string= key "read") + (gnus-fetch-group group (list article)) + (gnus-select-frame-set-input-focus (selected-frame))) + ((string= key "mark-read") + (gnus-update-read-articles + group + (delq article (gnus-list-of-unread-articles group))) + ;; gnus-group-refresh-group + (gnus-group-update-group group))))))) (defun gnus-notifications-notify (from subject photo-file) "Send a notification about a new mail. @@ -90,7 +97,7 @@ Return a notification id if any, or t on success." 'notifications-notify :title from :body subject - :actions '("read" "Read") + :actions '("read" "Read" "mark-read" "Mark As Read") :on-action 'gnus-notifications-action :app-icon (gnus-funcall-no-warning 'image-search-load-path "gnus/gnus.png") diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 2017ea2f82..f73f21694b 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -276,20 +276,20 @@ This can slow pruning down. Set to nil to perform no sorting." (defun gnus-registry-fixup-registry (db) (when db - (let ((old (oref db :tracked))) - (oset db :precious + (let ((old (oref db tracked))) + (setf (oref db precious) (append gnus-registry-extra-entries-precious '())) - (oset db :max-size + (setf (oref db max-size) (or gnus-registry-max-entries most-positive-fixnum)) - (oset db :prune-factor + (setf (oref db prune-factor) (or gnus-registry-prune-factor 0.1)) - (oset db :tracked + (setf (oref db tracked) (append gnus-registry-track-extra '(mark group keyword))) - (when (not (equal old (oref db :tracked))) + (when (not (equal old (oref db tracked))) (gnus-message 9 "Reindexing the Gnus registry (tracked change)") (registry-reindex db)))) db) @@ -297,14 +297,13 @@ This can slow pruning down. Set to nil to perform no sorting." (defun gnus-registry-make-db (&optional file) (interactive "fGnus registry persistence file: \n") (gnus-registry-fixup-registry - (registry-db - "Gnus Registry" - :file (or file gnus-registry-cache-file) - ;; these parameters are set in `gnus-registry-fixup-registry' - :max-size most-positive-fixnum - :version registry-db-version - :precious nil - :tracked nil))) + (make-instance 'registry-db + :file (or file gnus-registry-cache-file) + ;; these parameters are set in `gnus-registry-fixup-registry' + :max-size most-positive-fixnum + :version registry-db-version + :precious nil + :tracked nil))) (defvar gnus-registry-db (gnus-registry-make-db) "The article registry by Message ID. See `registry-db'.") @@ -336,7 +335,7 @@ This is not required after changing `gnus-registry-cache-file'." old-file-name file))) (progn (gnus-registry-read old-file-name) - (oset gnus-registry-db :file file) + (setf (oref gnus-registry-db file) file) (gnus-message 1 "Registry filename changed to %s" file)) (gnus-registry-remake-db t)))) (error @@ -398,8 +397,7 @@ This is not required after changing `gnus-registry-cache-file'." (sender (nth 0 (gnus-registry-extract-addresses (mail-header-from data-header)))) (from (gnus-group-guess-full-name-from-command-method from)) - (to (if to (gnus-group-guess-full-name-from-command-method to) nil)) - (to-name (if to to "the Bit Bucket"))) + (to (if to (gnus-group-guess-full-name-from-command-method to) nil))) (gnus-message 7 "Gnus registry: article %s %s from %s to %s" id (if method "respooling" "going") from to) @@ -455,7 +453,8 @@ This is not required after changing `gnus-registry-cache-file'." (let ((new (or (assq (first kv) entry) (list (first kv))))) (dolist (toadd (cdr kv)) - (add-to-list 'new toadd t)) + (unless (member toadd new) + (setq new (append new (list toadd))))) (setq entry (cons new (assq-delete-all (first kv) entry)))))) (gnus-message 10 "Gnus registry: new entry for %s is %S" @@ -699,7 +698,7 @@ possible. Uses `gnus-registry-split-strategy'." 10 "%s: stripped group %s to %s" log-agent group short-name)) - (add-to-list 'out short-name)) + (pushnew short-name out :test #'equal)) ;; else... (gnus-message 7 @@ -785,8 +784,9 @@ Overrides existing keywords with FORCE set non-nil." (gnus-registry-set-id-key id 'keyword words))))) (defun gnus-registry-keywords () - (let ((table (registry-lookup-secondary gnus-registry-db 'keyword))) - (when table (maphash (lambda (k v) k) table)))) + (let ((table (registry-lookup-secondary gnus-registry-db 'keyword)) + (ks ())) + (when table (maphash (lambda (k _v) (push k ks)) table) ks))) (defun gnus-registry-find-keywords (keyword) (interactive (list @@ -1104,7 +1104,6 @@ only the last one's marks are returned." (setq entry (car-safe old) old (cdr-safe old)) (let* ((id (car-safe entry)) - (new-entry (gnus-registry-get-or-make-entry id)) (rest (cdr-safe entry)) (groups (loop for p in rest when (stringp p) @@ -1242,7 +1241,7 @@ from your existing entries." (when extra (let ((db gnus-registry-db)) (registry-reindex db) - (loop for k being the hash-keys of (oref db :data) + (loop for k being the hash-keys of (oref db data) using (hash-value v) do (let ((newv (delq nil (mapcar #'(lambda (entry) (unless (member (car entry) extra) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index aa2568d555..0c0246a4e1 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -442,15 +442,6 @@ See also `gnus-before-startup-hook'." :group 'gnus-newsrc :type 'hook) -(defcustom gnus-save-newsrc-file-check-timestamp nil - "Check the modification time of the newsrc.eld file before saving it. -When the newsrc.eld file is updated by multiple machines, -checking the file's modification time is a good way to avoid -overwriting updated data." - :version "25.1" - :group 'gnus-newsrc - :type 'boolean) - (defcustom gnus-save-newsrc-hook nil "A hook called before saving any of the newsrc files." :group 'gnus-newsrc @@ -2833,19 +2824,18 @@ If FORCE is non-nil, the .newsrc file is read." ;; check timestamp of `gnus-current-startup-file'.eld against ;; `gnus-save-newsrc-file-last-timestamp' - (when gnus-save-newsrc-file-check-timestamp - (let* ((checkfile (concat gnus-current-startup-file ".eld")) - (mtime (nth 5 (file-attributes checkfile)))) - (when (and gnus-save-newsrc-file-last-timestamp - (time-less-p gnus-save-newsrc-file-last-timestamp - mtime)) - (unless (y-or-n-p - (format "%s was updated externally after %s, save?" - checkfile - (format-time-string - "%c" - gnus-save-newsrc-file-last-timestamp))) - (error "Couldn't save %s: updated externally" checkfile))))) + (let* ((checkfile (concat gnus-current-startup-file ".eld")) + (mtime (nth 5 (file-attributes checkfile)))) + (when (and gnus-save-newsrc-file-last-timestamp + (time-less-p gnus-save-newsrc-file-last-timestamp + mtime)) + (unless (y-or-n-p + (format "%s was updated externally after %s, save?" + checkfile + (format-time-string + "%c" + gnus-save-newsrc-file-last-timestamp))) + (error "Couldn't save %s: updated externally" checkfile)))) (if gnus-save-startup-file-via-temp-buffer (let ((coding-system-for-write gnus-ding-file-coding-system) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index efe7a4d3d6..c68d496263 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -1160,9 +1160,9 @@ which it may alter in any way." 'mail-decode-encoded-address-string "Function used to decode addresses with encoded words.") -(defcustom gnus-extra-headers '(To Cc Keywords Gcc Newsgroups) +(defcustom gnus-extra-headers '(To Cc Keywords Gcc Newsgroups X-GM-LABELS) "*Extra headers to parse." - :version "24.1" ; added Cc Keywords Gcc + :version "25.1" :group 'gnus-summary :type '(repeat symbol)) @@ -2424,6 +2424,7 @@ increase the score of each group you read." ["Lapsed" gnus-article-date-lapsed t] ["User-defined" gnus-article-date-user t]) ("Display" + ["Display HTML images" gnus-article-show-images t] ["Remove images" gnus-article-remove-images t] ["Toggle smiley" gnus-treat-smiley t] ["Show X-Face" gnus-article-display-x-face t] @@ -5620,7 +5621,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (mm-decode-coding-string group charset) (mm-decode-coding-string (gnus-status-message group) charset)))) - (unless (gnus-request-group group t) + (unless (gnus-request-group group t nil (gnus-get-info group)) (when (derived-mode-p 'gnus-summary-mode) (gnus-kill-buffer (current-buffer))) (error "Couldn't request group %s: %s" diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index eb05d714ab..94c8950988 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -750,13 +750,16 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile) (setq script (substring script 0 (match-beginning 0)) background 0)) (setq result - (call-process shell-file-name nil background nil + (call-process shell-file-name nil stderr nil shell-command-switch script)) - (when (and result - (not (zerop result))) - (set-buffer stderr) - (message "Mail source error: %s" (buffer-string))) - (kill-buffer stderr))) + (if (and result + (not (zerop result))) + (progn + (split-window-vertically) + (other-window 1) + (switch-to-buffer stderr) + (message "Mail source error: %s " (buffer-string))) + (kill-buffer stderr)))) ;;; ;;; Different fetchers diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index 01d8587f06..9f84413996 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el @@ -152,6 +152,11 @@ This is a compatibility function for different Emacsen." (non-viewer . t) (type . "application/zip") ("copiousoutput")) + ("pdf" + (viewer . pdf-view-mode) + (type . "application/pdf") + (test . (and (fboundp 'pdf-view-mode) + (eq window-system 'x)))) ("pdf" (viewer . doc-view-mode) (type . "application/pdf") diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index a06de2a641..04145ded10 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -989,7 +989,8 @@ are replaced: %n The mail address, e.g. \"john.doe@example.invalid\". %N The real name if present, e.g.: \"John Doe\", else fall back to the mail address. - %F The first name if present, e.g.: \"John\". + %F The first name if present, e.g.: \"John\", else fall + back to the mail address. %L The last name if present, e.g.: \"Doe\". %Z, %z The time zone in the numeric form, e.g.:\"+0000\". @@ -1968,7 +1969,7 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'." ;; "dead" nato bitnet uucp "Regular expression that matches a valid FQDN." ;; see also: gnus-button-valid-fqdn-regexp - :version "22.1" + :version "25.1" :group 'message-headers :type 'regexp) @@ -4039,7 +4040,7 @@ See `message-citation-line-format'." (setq fname lname lname newlname))))) ;; The following letters are not used in `format-time-string': (push ?E lst) (push "" lst) - (push ?F lst) (push fname lst) + (push ?F lst) (push (or fname name-or-net) lst) ;; We might want to use "" instead of "" later. (push ?J lst) (push "" lst) (push ?K lst) (push "" lst) diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 311ea7cfff..ae6bb71dfc 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -31,6 +31,9 @@ (autoload 'gnus-replace-in-string "gnus-util") (autoload 'gnus-read-shell-command "gnus-util") +(autoload 'gnus-overlays-at "gnus") +(autoload 'gnus-overlay-put "gnus") + (autoload 'mm-inline-partial "mm-partial") (autoload 'mm-inline-external-body "mm-extern") (autoload 'mm-extern-cache-contents "mm-extern") @@ -788,6 +791,14 @@ MIME-Version header before proceeding." (autoload 'mailcap-parse-mailcaps "mailcap") (autoload 'mailcap-mime-info "mailcap") +(defun mm-head-p (&optional point) + "Return non-nil if point is in the article header." + (let ((point (or point (point)))) + (save-excursion + (goto-char point) + (and (not (re-search-backward "^$" nil t)) + (re-search-forward "^$" nil t))))) + (defun mm-display-part (handle &optional no-default force) "Display the MIME part represented by HANDLE. Returns nil if the part is removed; inline if displayed inline; @@ -821,6 +832,10 @@ external if displayed external." 'inline) ((and (mm-inlinable-p ehandle) (mm-inlined-p ehandle)) + (when force + (if (mm-head-p) + (re-search-forward "^$" nil t) + (forward-line 1))) (mm-display-inline handle) 'inline) ((or method @@ -1815,6 +1830,7 @@ If RECURSIVE, search recursively." (start end &optional base-url)) (declare-function shr-insert-document "shr" (dom)) (defvar shr-blocked-images) +(defvar shr-use-fonts) (defvar gnus-inhibit-images) (autoload 'gnus-blocked-images "gnus-art") @@ -1822,7 +1838,10 @@ If RECURSIVE, search recursively." ;; Require since we bind its variables. (require 'shr) (let ((article-buffer (current-buffer)) - (shr-width fill-column) + (shr-width (if (and (boundp 'shr-use-fonts) + shr-use-fonts) + nil + fill-column)) (shr-content-function (lambda (id) (let ((handle (mm-get-content-id id))) (when handle @@ -1876,7 +1895,7 @@ If RECURSIVE, search recursively." handle `(lambda () (let ((inhibit-read-only t)) - (delete-region ,(copy-marker (point-min) t) + (delete-region ,(point-min-marker) ,(point-max-marker)))))))) (defvar shr-map) @@ -1896,6 +1915,8 @@ If RECURSIVE, search recursively." :keymap shr-map (get-text-property start 'shr-url)) (put-text-property start end 'local-map nil) + (dolist (overlay (gnus-overlays-at start)) + (gnus-overlay-put overlay 'face nil)) (setq start end))))) (defun mm-handle-filename (handle) diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index b2e0ee66d9..0b7590114c 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -1241,9 +1241,9 @@ better ways to do a similar thing. The previous version of this macro bound the default value of `enable-multibyte-characters' to nil while evaluating FORMS but it is no longer done. So, some programs assuming it if any may malfunction." + (declare (obsolete nil "25.1") (indent 0) (debug t)) (if (featurep 'xemacs) `(progn ,@forms) - (message "Warning: Using brain-dead macro `mm-with-unibyte-current-buffer'!") (let ((multibyte (make-symbol "multibyte"))) `(let ((,multibyte enable-multibyte-characters)) (when ,multibyte @@ -1252,9 +1252,6 @@ it if any may malfunction." (progn ,@forms) (when ,multibyte (set-buffer-multibyte t))))))) -(put 'mm-with-unibyte-current-buffer 'lisp-indent-function 0) -(put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body)) -(make-obsolete 'mm-with-unibyte-current-buffer nil "25.1") (defun mm-find-charset-region (b e) "Return a list of Emacs charsets in the region B to E." diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 4b520edf1e..a3d6e74fbc 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -217,7 +217,7 @@ handle `(lambda () (let ((inhibit-read-only t)) - (delete-region ,(copy-marker (point-min) t) + (delete-region ,(point-min-marker) ,(point-max-marker))))))))) (defvar mm-w3m-standalone-supports-m17n-p (if (featurep 'mule) 'undecided) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index e619c0f13c..c476be6bc8 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -196,6 +196,8 @@ textual parts.") (nnimap-article-ranges (gnus-compress-sequence articles)) (nnimap-header-parameters)) t) + (unless (process-live-p (get-buffer-process (current-buffer))) + (error "Server closed connection")) (nnimap-transform-headers) (nnheader-remove-cr-followed-by-lf)) (insert-buffer-substring @@ -820,39 +822,40 @@ textual parts.") group)) t)))) -(deffoo nnimap-request-scan-group (group &optional server info) +(deffoo nnimap-request-group-scan (group &optional server info) (setq group (nnimap-decode-gnus-group group)) - (let (marks high low) - (with-current-buffer (nnimap-buffer) - (erase-buffer) - (let ((group-sequence - (nnimap-send-command "SELECT %S" (utf7-encode group t))) - (flag-sequence - (nnimap-send-command "UID FETCH 1:* FLAGS"))) - (setf (nnimap-group nnimap-object) group) - (nnimap-wait-for-response flag-sequence) - (setq marks - (nnimap-flags-to-marks - (nnimap-parse-flags - (list (list group-sequence flag-sequence - 1 group "SELECT"))))) - (when (and info - marks) - (nnimap-update-infos marks (list info)) - (nnimap-store-info info (gnus-active (gnus-info-group info)))) - (goto-char (point-max)) - (let ((uidnext (nth 5 (car marks)))) - (setq high (or (if uidnext - (1- uidnext) - (nth 3 (car marks))) - 0) - low (or (nth 4 (car marks)) uidnext 1))))) - (with-current-buffer nntp-server-buffer - (erase-buffer) - (insert - (format - "211 %d %d %d %S\n" (1+ (- high low)) low high group)) - t))) + (when (nnimap-change-group nil server) + (let (marks high low) + (with-current-buffer (nnimap-buffer) + (erase-buffer) + (let ((group-sequence + (nnimap-send-command "SELECT %S" (utf7-encode group t))) + (flag-sequence + (nnimap-send-command "UID FETCH 1:* FLAGS"))) + (setf (nnimap-group nnimap-object) group) + (nnimap-wait-for-response flag-sequence) + (setq marks + (nnimap-flags-to-marks + (nnimap-parse-flags + (list (list group-sequence flag-sequence + 1 group "SELECT"))))) + (when (and info + marks) + (nnimap-update-infos marks (list info)) + (nnimap-store-info info (gnus-active (gnus-info-group info)))) + (goto-char (point-max)) + (let ((uidnext (nth 5 (car marks)))) + (setq high (or (if uidnext + (1- uidnext) + (nth 3 (car marks))) + 0) + low (or (nth 4 (car marks)) uidnext 1))))) + (with-current-buffer nntp-server-buffer + (erase-buffer) + (insert + (format + "211 %d %d %d %S\n" (1+ (- high low)) low high group)) + t)))) (deffoo nnimap-request-create-group (group &optional server args) (setq group (nnimap-decode-gnus-group group)) @@ -1259,7 +1262,12 @@ If LIMIT, first try to limit the search to the N last articles." (while (search-forward "* LIST " nil t) (let ((flags (read (current-buffer))) (separator (read (current-buffer))) - (group (read (current-buffer)))) + (group (buffer-substring-no-properties + (progn (skip-chars-forward " \"") + (point)) + (progn (end-of-line) + (skip-chars-backward " \"") + (point))))) (unless (member '%NoSelect flags) (push (utf7-decode (if (stringp group) group @@ -2078,12 +2086,15 @@ Return the server's response to the SELECT or EXAMINE command." (ranges (cdr spec))) (if (eq group 'junk) (setq junk-articles ranges) - (push (list (nnimap-send-command - "UID COPY %s %S" - (nnimap-article-ranges ranges) - (utf7-encode group t)) - ranges) - sequences)))) + ;; Don't copy if the message is already in its + ;; target group. + (unless (string= group nnimap-inbox) + (push (list (nnimap-send-command + "UID COPY %s %S" + (nnimap-article-ranges ranges) + (utf7-encode group t)) + ranges) + sequences))))) ;; Wait for the last COPY response... (when sequences (nnimap-wait-for-response (caar sequences)) diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 6d111e89e8..08ca7c7e06 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -284,8 +284,6 @@ is `(valuefunc member)'." (eval-when-compile (autoload 'nnimap-buffer "nnimap") (autoload 'nnimap-command "nnimap") - (autoload 'nnimap-capability "nnimap") - (autoload 'nnimap-wait-for-line "nnimap") (autoload 'nnimap-change-group "nnimap") (autoload 'nnimap-make-thread-query "nnimap") (autoload 'gnus-registry-action "gnus-registry") @@ -970,52 +968,33 @@ details on the language and supported extensions." (catch 'found (mapcar #'(lambda (group) - (let (artlist) - (condition-case () - (when (nnimap-change-group - (gnus-group-short-name group) server) - (with-current-buffer (nnimap-buffer) - (message "Searching %s..." group) - (let* ((arts 0) - (literal+ (nnimap-capability "LITERAL+")) - (search (split-string - (if (string= criteria "") - qstring - (nnir-imap-make-query - criteria qstring)) - "\n")) - (coding (upcase - (replace-regexp-in-string - "-\\(unix\\|dos\\|mac\\)" "" - (symbol-name - (cdr default-process-coding-system))))) - call result) - (setq call (nnimap-send-command - "UID SEARCH CHARSET %s %s" coding (pop search))) - (while search ; Non-ascii search terms - (unless literal+ - (nnimap-wait-for-line "^\\+\\(.*\\)\n")) - (process-send-string (get-buffer-process (current-buffer)) (pop search)) - (process-send-string (get-buffer-process (current-buffer)) - (if (nnimap-newlinep nnimap-object) - "\n" - "\r\n"))) - (setq result (nnimap-get-response call)) - (mapc - (lambda (artnum) - (let ((artn (string-to-number artnum))) - (when (> artn 0) - (push (vector group artn 100) - artlist) - (when (assq 'shortcut query) - (throw 'found (list artlist))) - (setq arts (1+ arts))))) - (and (car result) - (cdr (assoc "SEARCH" (cdr result))))) - (message "Searching %s... %d matches" group arts))) - (message "Searching %s...done" group)) - (quit nil)) - (nreverse artlist))) + (let (artlist) + (condition-case () + (when (nnimap-change-group + (gnus-group-short-name group) server) + (with-current-buffer (nnimap-buffer) + (message "Searching %s..." group) + (let ((arts 0) + (result (nnimap-command "UID SEARCH %s" + (if (string= criteria "") + qstring + (nnir-imap-make-query + criteria qstring))))) + (mapc + (lambda (artnum) + (let ((artn (string-to-number artnum))) + (when (> artn 0) + (push (vector group artn 100) + artlist) + (when (assq 'shortcut query) + (throw 'found (list artlist))) + (setq arts (1+ arts))))) + (and (car result) + (cdr (assoc "SEARCH" (cdr result))))) + (message "Searching %s... %d matches" group arts))) + (message "Searching %s...done" group)) + (quit nil)) + (nreverse artlist))) groups)))))) (defun nnir-imap-make-query (criteria qstring) @@ -1069,30 +1048,25 @@ In future the following will be added to the language: (defun nnir-imap-expr-to-imap (criteria expr) "Convert EXPR into an IMAP search expression on CRITERIA" ;; What sort of expression is this, eh? - (let ((literal+ (nnimap-capability "LITERAL+"))) - (cond - ;; Simple string term - ((stringp expr) - (format "%s %S" criteria expr)) - ;; Trivial term: and - ((eq expr 'and) nil) - ;; Composite term: or expression - ((eq (car-safe expr) 'or) - (format "OR %s %s" - (nnir-imap-expr-to-imap criteria (second expr)) - (nnir-imap-expr-to-imap criteria (third expr)))) - ;; Composite term: just the fax, mam - ((eq (car-safe expr) 'not) - (format "NOT (%s)" (nnir-imap-query-to-imap criteria (rest expr)))) - ;; Composite term: non-ascii search term - ((numberp (car-safe expr)) - (format "%s {%d%s}\n%s" criteria (car expr) - (if literal+ "+" "") (second expr))) - ;; Composite term: just expand it all. - ((and (not (null expr)) (listp expr)) - (format "(%s)" (nnir-imap-query-to-imap criteria expr))) - ;; Complex value, give up for now. - (t (error "Unhandled input: %S" expr))))) + (cond + ;; Simple string term + ((stringp expr) + (format "%s %S" criteria expr)) + ;; Trivial term: and + ((eq expr 'and) nil) + ;; Composite term: or expression + ((eq (car-safe expr) 'or) + (format "OR %s %s" + (nnir-imap-expr-to-imap criteria (second expr)) + (nnir-imap-expr-to-imap criteria (third expr)))) + ;; Composite term: just the fax, mam + ((eq (car-safe expr) 'not) + (format "NOT (%s)" (nnir-imap-query-to-imap criteria (rest expr)))) + ;; Composite term: just expand it all. + ((and (not (null expr)) (listp expr)) + (format "(%s)" (nnir-imap-query-to-imap criteria expr))) + ;; Complex value, give up for now. + (t (error "Unhandled input: %S" expr)))) (defun nnir-imap-parse-query (string) @@ -1134,11 +1108,6 @@ that the search language can then understand and use." ((eq term 'and) 'and) ;; negated term ((eq term 'not) (list 'not (nnir-imap-next-expr))) - ;; non-ascii search string - ((and (stringp term) - (not (= (string-bytes term) - (length term)))) - (list (string-bytes term) term)) ;; generic term (t term)))) diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 62fcc2d8bd..5c5481095e 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -1921,7 +1921,7 @@ If TIME is nil, then return the cutoff time for oldness instead." (when (functionp target) (setq target (funcall target group))) (unless (eq target 'delete) - (when (or (gnus-request-group target) + (when (or (gnus-request-group target nil nil (gnus-get-info target)) (gnus-request-create-group target)) (let ((group-art (gnus-request-accept-article target nil nil t))) (when (and (consp group-art) diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el index 9be0c14884..04270a554c 100644 --- a/lisp/gnus/nnmh.el +++ b/lisp/gnus/nnmh.el @@ -259,12 +259,12 @@ as unread by Gnus.") &optional server force) (nnmh-possibly-change-directory newsgroup server) (let ((is-old t) + (dir nnmh-current-directory) article rest mod-time) (nnheader-init-server-buffer) (while (and articles is-old) - (setq article (concat nnmh-current-directory - (int-to-string (car articles)))) + (setq article (concat dir (int-to-string (car articles)))) (when (setq mod-time (nth 5 (file-attributes article))) (if (and (nnmh-deletable-article-p newsgroup (car articles)) (setq is-old diff --git a/lisp/gnus/plstore.el b/lisp/gnus/plstore.el index 12a0413dca..175e272cb9 100644 --- a/lisp/gnus/plstore.el +++ b/lisp/gnus/plstore.el @@ -270,9 +270,16 @@ symmetric encryption will be used.") context (cons #'plstore-progress-callback-function (format "Decrypting %s" (plstore-get-file plstore)))) - (setq plain - (epg-decrypt-string context - (plstore--get-encrypted-data plstore))) + (condition-case error + (setq plain + (epg-decrypt-string context + (plstore--get-encrypted-data plstore))) + (error + (let ((entry (assoc (plstore-get-file plstore) + plstore-passphrase-alist))) + (if entry + (setcdr entry nil))) + (signal (car error) (cdr error)))) (plstore--set-secret-alist plstore (car (read-from-string plain))) (plstore--merge-secret plstore) (plstore--set-encrypted-data plstore nil)))) diff --git a/lisp/gnus/registry.el b/lisp/gnus/registry.el index 55b83a8e88..96a89fca1b 100644 --- a/lisp/gnus/registry.el +++ b/lisp/gnus/registry.el @@ -98,7 +98,12 @@ :type (or null float) :documentation "The registry version.") (max-size :initarg :max-size - ;; :initform most-positive-fixnum ;; see below + ;; EIEIO's :initform is not 100% compatible with CLOS in + ;; that if the form is an atom, it assumes it's constant + ;; value rather than an expression, so in order to get the value + ;; of `most-positive-fixnum', we need to use an + ;; expression that's not just a symbol. + :initform (symbol-value 'most-positive-fixnum) :type integer :custom integer :documentation "The maximum number of registry entries.") @@ -123,8 +128,6 @@ (data :initarg :data :type hash-table :documentation "The data hashtable."))) -;; Do this separately, since defclass doesn't allow expressions in :initform. -(oset-default 'registry-db max-size most-positive-fixnum) (defmethod initialize-instance :BEFORE ((this registry-db) slots) "Check whether a registry object needs to be upgraded." @@ -155,7 +158,7 @@ (defmethod registry-lookup ((db registry-db) keys) "Search for KEYS in the registry-db THIS. Returns an alist of the key followed by the entry in a list, not a cons cell." - (let ((data (oref db :data))) + (let ((data (oref db data))) (delq nil (mapcar (lambda (k) @@ -166,7 +169,7 @@ Returns an alist of the key followed by the entry in a list, not a cons cell." (defmethod registry-lookup-breaks-before-lexbind ((db registry-db) keys) "Search for KEYS in the registry-db THIS. Returns an alist of the key followed by the entry in a list, not a cons cell." - (let ((data (oref db :data))) + (let ((data (oref db data))) (delq nil (loop for key in keys when (gethash key data) @@ -182,8 +185,8 @@ When CREATE is not nil, create the secondary index hashtable if needed." (when create (puthash tracksym (make-hash-table :size 800 :rehash-size 2.0 :test 'equal) - (oref db :tracker)) - (gethash tracksym (oref db :tracker)))))) + (oref db tracker)) + (gethash tracksym (oref db tracker)))))) (defmethod registry-lookup-secondary-value ((db registry-db) tracksym val &optional set) @@ -227,7 +230,7 @@ The test order is to check :all first, then :member, then :regex." (let ((all (plist-get spec :all)) (member (plist-get spec :member)) (regex (plist-get spec :regex))) - (loop for k being the hash-keys of (oref db :data) + (loop for k being the hash-keys of (oref db data) using (hash-values v) when (or ;; :all non-nil returns all @@ -243,10 +246,10 @@ The test order is to check :all first, then :member, then :regex." If KEYS is nil, use SPEC to do a search. Updates the secondary ('tracked') indices as well. With assert non-nil, errors out if the key does not exist already." - (let* ((data (oref db :data)) + (let* ((data (oref db data)) (keys (or keys (apply 'registry-search db spec))) - (tracked (oref db :tracked))) + (tracked (oref db tracked))) (dolist (key keys) (let ((entry (gethash key data))) @@ -273,20 +276,20 @@ With assert non-nil, errors out if the key does not exist already." (defmethod registry-size ((db registry-db)) "Returns the size of the registry-db object THIS. -This is the key count of the :data slot." - (hash-table-count (oref db :data))) +This is the key count of the `data' slot." + (hash-table-count (oref db data))) (defmethod registry-full ((db registry-db)) "Checks if registry-db THIS is full." (>= (registry-size db) - (oref db :max-size))) + (oref db max-size))) (defmethod registry-insert ((db registry-db) key entry) "Insert ENTRY under KEY into the registry-db THIS. Updates the secondary ('tracked') indices as well. Errors out if the key exists already." - (assert (not (gethash key (oref db :data))) nil + (assert (not (gethash key (oref db data))) nil "Key already exists in database") (assert (not (registry-full db)) @@ -294,10 +297,10 @@ Errors out if the key exists already." "registry max-size limit reached") ;; store the entry - (puthash key entry (oref db :data)) + (puthash key entry (oref db data)) ;; store the secondary indices - (dolist (tr (oref db :tracked)) + (dolist (tr (oref db tracked)) ;; for every value in the entry under that key... (dolist (val (cdr-safe (assq tr entry))) (let* ((value-keys (registry-lookup-secondary-value db tr val))) @@ -308,8 +311,8 @@ Errors out if the key exists already." (defmethod registry-reindex ((db registry-db)) "Rebuild the secondary indices of registry-db THIS." (let ((count 0) - (expected (* (length (oref db :tracked)) (registry-size db)))) - (dolist (tr (oref db :tracked)) + (expected (* (length (oref db tracked)) (registry-size db)))) + (dolist (tr (oref db tracked)) (let (values) (maphash (lambda (key v) @@ -322,7 +325,7 @@ Errors out if the key exists already." (let* ((value-keys (registry-lookup-secondary-value db tr val))) (push key value-keys) (registry-lookup-secondary-value db tr val value-keys)))) - (oref db :data)))))) + (oref db data)))))) (defmethod registry-prune ((db registry-db) &optional sortfunc) "Prunes the registry-db object DB. @@ -338,11 +341,12 @@ from the front of the list are deleted first. Returns the number of deleted entries." (let ((size (registry-size db)) - (target-size (- (oref db :max-size) - (* (oref db :max-size) - (oref db :prune-factor)))) + (target-size + (floor (- (oref db max-size) + (* (oref db max-size) + (oref db prune-factor))))) candidates) - (if (> size target-size) + (if (registry-full db) (progn (setq candidates (registry-collect-prune-candidates @@ -356,10 +360,10 @@ Returns the number of deleted entries." Proposes only entries without the :precious keys, and attempts to return LIMIT such candidates. If SORTFUNC is provided, sort entries first and return candidates from beginning of list." - (let* ((precious (oref db :precious)) + (let* ((precious (oref db precious)) (precious-p (lambda (entry-key) (cdr (memq (car entry-key) precious)))) - (data (oref db :data)) + (data (oref db data)) (candidates (cl-loop for k being the hash-keys of data using (hash-values v) when (notany precious-p v) @@ -368,7 +372,7 @@ entries first and return candidates from beginning of list." ;; list of entry keys. (when sortfunc (setq candidates (sort candidates sortfunc))) - (delq nil (cl-subseq (mapcar #'car candidates) 0 limit)))) + (cl-subseq (mapcar #'car candidates) 0 (min limit (length candidates))))) (provide 'registry) ;;; registry.el ends here diff --git a/lisp/help-fns.el b/lisp/help-fns.el index c0d6393503..7ecd271d0c 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -352,7 +352,9 @@ suitable file is found, return nil." (insert ".\n")))) (defun help-fns--signature (function doc real-def real-function) - (unless (keymapp function) ; If definition is a keymap, skip arglist note. + "Insert usage at point and return docstring. With highlighting." + (if (keymapp function) + doc ; If definition is a keymap, skip arglist note. (let* ((advertised (gethash real-def advertised-signature-table t)) (arglist (if (listp advertised) advertised (help-function-arglist real-def))) @@ -929,6 +931,37 @@ file-local variable.\n") (buffer-string)))))))) +;;;###autoload +(defun describe-function-or-variable (symbol &optional buffer frame) + "Display the full documentation of the function or variable SYMBOL. +If SYMBOL is a variable and has a buffer-local value in BUFFER or FRAME +\(default to the current buffer and current frame), it is displayed along +with the global value." + (interactive + (let* ((v-or-f (variable-at-point)) + (found (symbolp v-or-f)) + (v-or-f (if found v-or-f (function-called-at-point))) + (found (or found v-or-f)) + (enable-recursive-minibuffers t) + val) + (setq val (completing-read (if found + (format + "Describe function or variable (default %s): " v-or-f) + "Describe function or variable: ") + obarray + (lambda (vv) + (or (fboundp vv) + (get vv 'variable-documentation) + (and (boundp vv) (not (keywordp vv))))) + t nil nil + (if found (symbol-name v-or-f)))) + (list (if (equal val "") + v-or-f (intern val))))) + (if (not (symbolp symbol)) (message "You didn't specify a function or variable") + (unless (buffer-live-p buffer) (setq buffer (current-buffer))) + (unless (frame-live-p frame) (setq frame (selected-frame))) + (help-xref-interned symbol buffer frame))) + ;;;###autoload (defun describe-syntax (&optional buffer) "Describe the syntax specifications in the syntax table of BUFFER. diff --git a/lisp/help-mode.el b/lisp/help-mode.el index c62ddc3dcd..d6679e9e4d 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -621,10 +621,13 @@ See `help-make-xrefs'." ;; Additional functions for (re-)creating types of help buffers. -(defun help-xref-interned (symbol) + +;;;###autoload +(defun help-xref-interned (symbol &optional buffer frame) "Follow a hyperlink which appeared to be an arbitrary interned SYMBOL. Both variable, function and face documentation are extracted into a single -help buffer." +help buffer. If SYMBOL is a variable, include buffer-local value for optional +BUFFER or FRAME." (with-current-buffer (help-buffer) ;; Push the previous item on the stack before clobbering the output buffer. (help-setup-xref nil nil) @@ -640,7 +643,7 @@ help buffer." (get symbol 'variable-documentation)) ;; Don't record the current entry in the stack. (setq help-xref-stack-item nil) - (describe-variable symbol)))) + (describe-variable symbol buffer frame)))) (cond (sdoc ;; We now have a help buffer on the variable. @@ -721,14 +724,14 @@ help buffer." (interactive) (if help-xref-stack (help-xref-go-back (current-buffer)) - (error "No previous help buffer"))) + (user-error "No previous help buffer"))) (defun help-go-forward () "Go back to next topic in this help buffer." (interactive) (if help-xref-forward-stack (help-xref-go-forward (current-buffer)) - (error "No next help buffer"))) + (user-error "No next help buffer"))) (defun help-do-xref (_pos function args) "Call the help cross-reference function FUNCTION with args ARGS. @@ -736,7 +739,8 @@ Things are set up properly so that the resulting help-buffer has a proper [back] button." ;; There is a reference at point. Follow it. (let ((help-xref-following t)) - (apply function args))) + (apply function (if (eq function 'info) + (append args (list (generate-new-buffer-name "*info*"))) args)))) ;; The doc string is meant to explain what buttons do. (defun help-follow-mouse () @@ -750,7 +754,7 @@ a proper [back] button." For the cross-reference format, see `help-make-xrefs'." (interactive) - (error "No cross-reference here")) + (user-error "No cross-reference here")) (defun help-follow-symbol (&optional pos) "In help buffer, show docs for symbol at POS, defaulting to point. diff --git a/lisp/help.el b/lisp/help.el index bf724252d5..fb1719ac9c 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -95,6 +95,7 @@ (define-key map "k" 'describe-key) (define-key map "l" 'view-lossage) (define-key map "m" 'describe-mode) + (define-key map "o" 'describe-function-or-variable) (define-key map "n" 'view-emacs-news) (define-key map "p" 'finder-by-keyword) (define-key map "P" 'describe-package) @@ -218,6 +219,7 @@ L LANG-ENV Describes a specific language environment, or RET for current. m Display documentation of current minor modes and current major mode, including their special commands. n Display news of recent Emacs changes. +o SYMBOL Display the given function or variable's documentation and value. p TOPIC Find packages matching a given topic keyword. P PACKAGE Describe the given Emacs Lisp package. r Display the Emacs manual in Info mode. diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 65a4561e3a..0255585f53 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -596,7 +596,12 @@ then remove all hi-lock highlighting." ;; Make `face' the next one to use by default. (when (symbolp face) ;Don't add it if it's a list (bug#13297). (add-to-list 'hi-lock--unused-faces (face-name face)))) - (font-lock-remove-keywords nil (list keyword)) + ;; FIXME: Calling `font-lock-remove-keywords' causes + ;; `font-lock-specified-p' to go from nil to non-nil (because it + ;; calls font-lock-set-defaults). This is yet-another bug in + ;; font-lock-add/remove-keywords, which we circumvent here by + ;; testing `font-lock-fontified' (bug#19796). + (if font-lock-fontified (font-lock-remove-keywords nil (list keyword))) (setq hi-lock-interactive-patterns (delq keyword hi-lock-interactive-patterns)) (remove-overlays diff --git a/lisp/ido.el b/lisp/ido.el index 1f4e3facd3..60a59d6e99 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1590,10 +1590,10 @@ enable the mode if ARG is omitted or nil." (when ido-everywhere (when (memq ido-mode '(both file)) (put 'ido-everywhere 'file (cons read-file-name-function nil)) - (setq read-file-name-function 'ido-read-file-name)) + (setq read-file-name-function #'ido-read-file-name)) (when (memq ido-mode '(both buffer)) (put 'ido-everywhere 'buffer (cons read-buffer-function nil)) - (setq read-buffer-function 'ido-read-buffer)))) + (setq read-buffer-function #'ido-read-buffer)))) (defvar ido-minor-mode-map-entry nil) @@ -3480,8 +3480,14 @@ This is to make them appear as if they were \"virtual buffers\"." ;; the file which the user might thought was still open. (unless recentf-mode (recentf-mode 1)) (setq ido-virtual-buffers nil) - (let (name) - (dolist (head recentf-list) + (let ((bookmarks (and (boundp 'bookmark-alist) + bookmark-alist)) + name) + (dolist (head (append + recentf-list + (delq nil (mapcar (lambda (bookmark) + (cdr (assoc 'filename bookmark))) + bookmarks)))) (setq name (file-name-nondirectory head)) ;; In case HEAD is a directory with trailing /. See bug#14552. (when (equal name "") @@ -4776,7 +4782,7 @@ Modified from `icomplete-completions'." (put 'dired-do-rename 'ido 'ignore) ;;;###autoload -(defun ido-read-buffer (prompt &optional default require-match) +(defun ido-read-buffer (prompt &optional default require-match predicate) "Ido replacement for the built-in `read-buffer'. Return the name of a buffer selected. PROMPT is the prompt to give to the user. DEFAULT if given is the default @@ -4790,7 +4796,7 @@ If REQUIRE-MATCH is non-nil, an existing buffer must be selected." (if (eq ido-exit 'fallback) (let ((read-buffer-function nil)) (run-hook-with-args 'ido-before-fallback-functions 'read-buffer) - (read-buffer prompt default require-match)) + (read-buffer prompt default require-match predicate)) buf))) ;;;###autoload diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 9e527f1f0b..e6d6a3edb7 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -380,6 +380,7 @@ call." (define-key map "a-" 'image-decrease-speed) (define-key map "a0" 'image-reset-speed) (define-key map "ar" 'image-reverse-speed) + (define-key map "k" 'image-kill-buffer) (define-key map [remap forward-char] 'image-forward-hscroll) (define-key map [remap backward-char] 'image-backward-hscroll) (define-key map [remap right-char] 'image-forward-hscroll) @@ -722,6 +723,11 @@ the image by calling `image-mode'." (image-mode-as-text) (image-mode))) +(defun image-kill-buffer () + "Kill the current buffer." + (interactive) + (kill-buffer (current-buffer))) + (defun image-after-revert-hook () (when (image-get-display-property) (image-toggle-display-text) diff --git a/lisp/info-look.el b/lisp/info-look.el index 1baea4619f..9cf185edf5 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -35,6 +35,11 @@ ;; (or CTAN mirrors) ;; Perl: (or CPAN mirrors) +;; Traditionally, makeinfo quoted `like this', but version 5 and later +;; quotes 'like this' or ‘like this’. Doc specs with patterns +;; therefore match open and close quotes with ['`‘] and ['’], +;; respectively. + ;;; Code: (require 'info) @@ -716,12 +721,12 @@ Return nil if there is nothing appropriate in the buffer near point." ;; suffix "\\>" is not used because that sends DBL_MAX to ;; DBL_MAX_EXP ("_" is a non-word char) ("(libc)Variable Index" nil - "^\\([ \t]+-+ \\(Variable\\|Macro\\): .*\\<\\|`\\)" - "\\( \\|'?$\\)") + "^\\([ \t]+-+ \\(Variable\\|Macro\\): .*\\<\\|['`‘]\\)" + "\\( \\|['’]?$\\)") ("(libc)Type Index" nil "^[ \t]+-+ Data Type: \\<" "\\>") ("(termcap)Var Index" nil - "^[ \t]*`" "'")) + "^[ \t]*['`‘]" "['’]")) :parse-rule 'info-lookup-guess-c-symbol) (info-lookup-maybe-add-help @@ -733,7 +738,7 @@ Return nil if there is nothing appropriate in the buffer near point." :mode 'bison-mode :regexp "[:;|]\\|%\\([%{}]\\|[_a-z]+\\)\\|YY[_A-Z]+\\|yy[_a-z]+" :doc-spec '(("(bison)Index" nil - "`" "'")) + "['`‘]" "['’]")) :parse-rule "[:;|]\\|%\\([%{}]\\|[_a-zA-Z][_a-zA-Z0-9]*\\)" :other-modes '(c-mode)) @@ -741,7 +746,7 @@ Return nil if there is nothing appropriate in the buffer near point." :mode 'makefile-mode :regexp "\\$[^({]\\|\\.[_A-Z]*\\|[_a-zA-Z][_a-zA-Z0-9-]*" :doc-spec '(("(make)Name Index" nil - "^[ \t]*`" "'")) + "^[ \t]*['`‘]" "['’]")) :parse-rule "\\$[^({]\\|\\.[_A-Z]*\\|[_a-zA-Z0-9-]+") (info-lookup-maybe-add-help @@ -756,15 +761,16 @@ Return nil if there is nothing appropriate in the buffer near point." :doc-spec '( ;; "(automake)Macro Index" is autoconf macros used in ;; configure.ac, not Makefile.am, so don't have that here. - ("(automake)Variable Index" nil "^[ \t]*`" "'") + ("(automake)Variable Index" nil "^[ \t]*['`‘]" "['’]") ;; In automake 1.4 macros and variables were a combined node. - ("(automake)Macro and Variable Index" nil "^[ \t]*`" "'") + ("(automake)Macro and Variable Index" nil "^[ \t]*['`‘]" + "['’]") ;; Directives like "if" are in the "General Index". ;; Prefix "`" since the text for say `+=' isn't always an ;; @item etc and so not always at the start of a line. - ("(automake)General Index" nil "`" "'") + ("(automake)General Index" nil "['`‘]" "['’]") ;; In automake 1.3 there was just a single "Index" node. - ("(automake)Index" nil "`" "'")) + ("(automake)Index" nil "['`‘]" "['’]")) :other-modes '(makefile-mode)) (info-lookup-maybe-add-help @@ -775,7 +781,7 @@ Return nil if there is nothing appropriate in the buffer near point." (lambda (item) (if (string-match "^\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\( .*\\)?$" item) (concat "@" (match-string 1 item)))) - "`" "[' ]"))) + "['`‘]" "['’ ]"))) (info-lookup-maybe-add-help :mode 'm4-mode @@ -821,7 +827,7 @@ Return nil if there is nothing appropriate in the buffer near point." ;; macros (eg. AC_PROG_CC). Ensure this is after the autoconf ;; index, so as to prefer the autoconf docs. ("(automake)Macro and Variable Index" nil - "^[ \t]*`" "'")) + "^[ \t]*['`‘]" "['’]")) ;; Autoconf symbols are M4 macros. Thus use M4's parser. :parse-rule 'ignore :other-modes '(m4-mode)) @@ -846,7 +852,7 @@ Return nil if there is nothing appropriate in the buffer near point." ;; Built-in functions (matches to many entries). ((string-match "^[a-z]+$" item) item)))) - "`" "\\([ \t]*([^)]*)\\)?'"))) + "['`‘]" "\\([ \t]*([^)]*)\\)?['’]"))) (info-lookup-maybe-add-help :mode 'perl-mode @@ -885,16 +891,19 @@ Return nil if there is nothing appropriate in the buffer near point." ;; From http://home.gna.org/latexrefman "(latex2e)Command Index" "(latex)Command Index") - nil "`" "\\({[^}]*}\\)?'"))) + ;; \frac{NUM}{DEN} etc can have more than one {xx} argument. + ;; \sqrt[ROOT]{num} and others can have square brackets. + nil "[`'‘]" "\\({[^}]*}|\\[[^]]*\\]\\)*['’]"))) + (info-lookup-maybe-add-help :mode 'emacs-lisp-mode :regexp "[^][()`',\" \t\n]+" :doc-spec '(;; Commands with key sequences appear in nodes as `foo' and ;; those without as `M-x foo'. - ("(emacs)Command Index" nil "`\\(M-x[ \t\n]+\\)?" "'") + ("(emacs)Command Index" nil "['`‘]\\(M-x[ \t\n]+\\)?" "['’]") ;; Variables normally appear in nodes as just `foo'. - ("(emacs)Variable Index" nil "`" "'") + ("(emacs)Variable Index" nil "['`‘]" "['’]") ;; Almost all functions, variables, etc appear in nodes as ;; " -- Function: foo" etc. A small number of aliases and ;; symbols appear only as `foo', and will miss out on exact @@ -976,9 +985,9 @@ Return nil if there is nothing appropriate in the buffer near point." ;; bash has "." and ":" in its index, but those chars will probably never ;; work in info, so don't bother matching them in the regexp. :regexp "\\([a-zA-Z0-9_-]+\\|[!{}@*#?$]\\|\\[\\[?\\|]]?\\)" - :doc-spec '(("(bash)Builtin Index" nil "^`" "[ .']") - ("(bash)Reserved Word Index" nil "^`" "[ .']") - ("(bash)Variable Index" nil "^`" "[ .']") + :doc-spec '(("(bash)Builtin Index" nil "^['`‘]" "[ .'’]") + ("(bash)Reserved Word Index" nil "^['`‘]" "[ .'’]") + ("(bash)Variable Index" nil "^['`‘]" "[ .'’]") ;; coreutils (version 4.5.10) doesn't have a separate program ;; index, so exclude extraneous stuff (most of it) by demanding @@ -1026,7 +1035,7 @@ Return nil if there is nothing appropriate in the buffer near point." item)) ;; This gets functions in evaluated classes. Other ;; possible patterns don't seem to work too well. - "`" "("))) + "['`‘]" "("))) (info-lookup-maybe-add-help :mode 'Custom-mode diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 8eb1c0d396..06a47af010 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -153,6 +153,7 @@ (cyrillic #x42F) (armenian #x531) (hebrew #x5D0) + (vai #xA500) (arabic #x628) (syriac #x710) (thaana #x78C) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index dcf850d942..cca659f2cc 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2941,6 +2941,14 @@ on encoding." ;; char with that name. (setq ucs-names `(("BELL (BEL)" . 7) ,@names))))) +(defun mule--ucs-names-annotation (name) + ;; FIXME: It would be much better to add this annotation before rather than + ;; after the char name, so the annotations are aligned. + ;; FIXME: The default behavior of displaying annotations in italics + ;; doesn't work well here. + (let ((char (assoc name ucs-names))) + (when char (format " (%c)" (cdr char))))) + (defun read-char-by-name (prompt) "Read a character by its Unicode name or hex number string. Display PROMPT and read a string that represents a character by its @@ -2964,7 +2972,9 @@ point or a number in hash notation, e.g. #o21430 for octal, prompt (lambda (string pred action) (if (eq action 'metadata) - '(metadata (category . unicode-name)) + '(metadata + (annotation-function . mule--ucs-names-annotation) + (category . unicode-name)) (complete-with-action action (ucs-names) string pred))))) (char (cond diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 2755fd68be..5e422bf5fd 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -202,7 +202,7 @@ It is an alist of translations and corresponding keys." See also the documentation of `quail-define-package'." (nth 11 quail-current-package)) (defsubst quail-overlay-plist () - "Return property list of an overly used in the current Quail package." + "Return property list of an overlay used in the current Quail package." (nth 12 quail-current-package)) (defsubst quail-update-translation-function () "Return a function for updating translation in the current Quail package." @@ -1335,9 +1335,7 @@ If STR has `advice' text property, append the following special event: overriding-local-map) (list key) (quail-setup-overlays (quail-conversion-keymap)) - (let ((modified-p (buffer-modified-p)) - (buffer-undo-list t) - (inhibit-modification-hooks t)) + (with-silent-modifications (unwind-protect (let ((input-string (if (quail-conversion-keymap) (quail-start-conversion key) @@ -1349,7 +1347,6 @@ If STR has `advice' text property, append the following special event: (list (aref input-string 0)) (quail-input-string-to-events input-string)))) (quail-delete-overlays) - (set-buffer-modified-p modified-p) ;; Run this hook only when the current input method doesn't require ;; conversion. When conversion is required, the conversion function ;; should run this hook at a proper timing. diff --git a/lisp/isearchb.el b/lisp/isearchb.el index ffd4d62be3..5e7771cea5 100644 --- a/lisp/isearchb.el +++ b/lisp/isearchb.el @@ -75,7 +75,9 @@ ;; killing iswitchb.el and then trying to switch back is broken ;; make sure TAB isn't broken -(require 'iswitchb) +;;; Code: + +(require 'iswitchb) ;FIXME: Don't rely on iswitchb! (defgroup isearchb nil "Switch between buffers using a mechanism like isearch." @@ -118,7 +120,7 @@ Its purpose is to pass different call arguments to (interactive) (let* ((prompt "iswitch ") (iswitchb-method 'samewindow) - (buf (iswitchb-read-buffer prompt nil nil iswitchb-text t))) + (buf (iswitchb-read-buffer prompt nil nil nil iswitchb-text t))) (if (eq iswitchb-exit 'findfile) (call-interactively 'find-file) (when buf diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 788646c97b..d5651c6281 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -351,6 +351,30 @@ is active." (min (point-max) (+ start jit-lock-chunk-size))) 'fontified 'defer))))) +(defun jit-lock--run-functions (beg end) + (let ((tight-beg nil) (tight-end nil) + (loose-beg beg) (loose-end end)) + (run-hook-wrapped + 'jit-lock-functions + (lambda (fun) + (pcase-let* + ((res (funcall fun beg end)) + (`(,this-beg . ,this-end) + (if (eq (car-safe res) 'jit-lock-bounds) + (cdr res) (cons beg end)))) + ;; If all functions don't fontify the same region, we currently + ;; just try to "still be correct". But we could go further and for + ;; the chunks of text that was fontified by some functions but not + ;; all, we could add text-properties indicating which functions were + ;; already run to avoid running them redundantly when we get to + ;; those chunks. + (setq tight-beg (max (or tight-beg (point-min)) this-beg)) + (setq tight-end (min (or tight-end (point-max)) this-end)) + (setq loose-beg (min loose-beg this-beg)) + (setq loose-end (max loose-end this-end)) + nil))) + `(,(min tight-beg beg) ,(max tight-end end) ,loose-beg ,loose-end))) + (defun jit-lock-fontify-now (&optional start end) "Fontify current buffer from START to END. Defaults to the whole buffer. END can be out of bounds." @@ -376,54 +400,58 @@ Defaults to the whole buffer. END can be out of bounds." (setq next (or (text-property-any start end 'fontified t) end)) - ;; Decide which range of text should be fontified. - ;; The problem is that START and NEXT may be in the - ;; middle of something matched by a font-lock regexp. - ;; Until someone has a better idea, let's start - ;; at the start of the line containing START and - ;; stop at the start of the line following NEXT. - (goto-char next) (setq next (line-beginning-position 2)) - (goto-char start) (setq start (line-beginning-position)) - - ;; Make sure the contextual refontification doesn't re-refontify - ;; what's already been refontified. - (when (and jit-lock-context-unfontify-pos - (< jit-lock-context-unfontify-pos next) - (>= jit-lock-context-unfontify-pos start) - ;; Don't move boundary forward if we have to - ;; refontify previous text. Otherwise, we risk moving - ;; it past the end of the multiline property and thus - ;; forget about this multiline region altogether. - (not (get-text-property start 'jit-lock-defer-multiline))) - (setq jit-lock-context-unfontify-pos next)) - ;; Fontify the chunk, and mark it as fontified. ;; We mark it first, to make sure that we don't indefinitely ;; re-execute this fontification if an error occurs. (put-text-property start next 'fontified t) - (condition-case err - (run-hook-with-args 'jit-lock-functions start next) - ;; If the user quits (which shouldn't happen in normal on-the-fly - ;; jit-locking), make sure the fontification will be performed - ;; before displaying the block again. - (quit (put-text-property start next 'fontified nil) - (funcall 'signal (car err) (cdr err)))) - - ;; The redisplay engine has already rendered the buffer up-to - ;; `orig-start' and won't notice if the above jit-lock-functions - ;; changed the appearance of any part of the buffer prior - ;; to that. So if `start' is before `orig-start', we need to - ;; cause a new redisplay cycle after this one so that any changes - ;; are properly reflected on screen. - ;; To make such repeated redisplay happen less often, we can - ;; eagerly extend the refontified region with - ;; jit-lock-after-change-extend-region-functions. - (when (< start orig-start) - (run-with-timer 0 nil #'jit-lock-force-redisplay - (copy-marker start) (copy-marker orig-start))) - - ;; Find the start of the next chunk, if any. - (setq start (text-property-any next end 'fontified nil)))))))) + (pcase-let + ;; `tight' is the part we've fully refontified, and `loose' + ;; is the part we've partly refontified (some of the + ;; functions have refontified it but maybe not all). + ((`(,tight-beg ,tight-end ,loose-beg ,_loose-end) + (condition-case err + (jit-lock--run-functions start next) + ;; If the user quits (which shouldn't happen in normal + ;; on-the-fly jit-locking), make sure the fontification + ;; will be performed before displaying the block again. + (quit (put-text-property start next 'fontified nil) + (signal (car err) (cdr err)))))) + + ;; In case we fontified more than requested, take advantage of the + ;; good news. + (when (or (< tight-beg start) (> tight-end next)) + (put-text-property tight-beg tight-end 'fontified t)) + + ;; Make sure the contextual refontification doesn't re-refontify + ;; what's already been refontified. + (when (and jit-lock-context-unfontify-pos + (< jit-lock-context-unfontify-pos tight-end) + (>= jit-lock-context-unfontify-pos tight-beg) + ;; Don't move boundary forward if we have to + ;; refontify previous text. Otherwise, we risk moving + ;; it past the end of the multiline property and thus + ;; forget about this multiline region altogether. + (not (get-text-property tight-beg + 'jit-lock-defer-multiline))) + (setq jit-lock-context-unfontify-pos tight-end)) + + ;; The redisplay engine has already rendered the buffer up-to + ;; `orig-start' and won't notice if the above jit-lock-functions + ;; changed the appearance of any part of the buffer prior + ;; to that. So if `loose-beg' is before `orig-start', we need to + ;; cause a new redisplay cycle after this one so that the changes + ;; are properly reflected on screen. + ;; To make such repeated redisplay happen less often, we can + ;; eagerly extend the refontified region with + ;; jit-lock-after-change-extend-region-functions. + (when (< loose-beg orig-start) + (run-with-timer 0 nil #'jit-lock-force-redisplay + (copy-marker loose-beg) + (copy-marker orig-start))) + + ;; Find the start of the next chunk, if any. + (setq start + (text-property-any tight-end end 'fontified nil))))))))) (defun jit-lock-force-redisplay (start end) "Force the display engine to re-render START's buffer from START to END. @@ -622,12 +650,14 @@ will take place when text is fontified stealthily." (let ((jit-lock-start start) (jit-lock-end end)) (with-buffer-prepared-for-jit-lock - (run-hook-with-args 'jit-lock-after-change-extend-region-functions - start end old-len) - ;; Make sure we change at least one char (in case of deletions). - (setq jit-lock-end (min (max jit-lock-end (1+ start)) (point-max))) - ;; Request refontification. - (put-text-property jit-lock-start jit-lock-end 'fontified nil)) + (save-restriction + (widen) + (run-hook-with-args 'jit-lock-after-change-extend-region-functions + start end old-len) + ;; Make sure we change at least one char (in case of deletions). + (setq jit-lock-end (min (max jit-lock-end (1+ start)) (point-max))) + ;; Request refontification. + (put-text-property jit-lock-start jit-lock-end 'fontified nil))) ;; Mark the change for deferred contextual refontification. (when jit-lock-context-unfontify-pos (setq jit-lock-context-unfontify-pos diff --git a/lisp/json.el b/lisp/json.el index 68ab020c37..eaf8596a6d 100644 --- a/lisp/json.el +++ b/lisp/json.el @@ -52,13 +52,6 @@ ;;; Code: - -;; Compatibility code - -(defalias 'json-encode-char0 'encode-char) -(defalias 'json-decode-char0 'decode-char) - - ;; Parameters (defvar json-object-type 'alist @@ -166,7 +159,7 @@ without indentation.") "Advance past the character at point, returning it." (let ((char (json-peek))) (if (eq char :json-eof) - (signal 'end-of-file nil) + (signal 'json-end-of-file nil) (json-advance) char))) @@ -186,6 +179,8 @@ without indentation.") (define-error 'json-string-format "Bad string format" 'json-error) (define-error 'json-key-format "Bad JSON object key" 'json-error) (define-error 'json-object-format "Bad JSON object" 'json-error) +(define-error 'json-end-of-file "End of file while parsing JSON" + '(end-of-file json-error)) @@ -263,7 +258,6 @@ representation will be parsed correctly." (defvar json-special-chars '((?\" . ?\") (?\\ . ?\\) - (?/ . ?/) (?b . ?\b) (?f . ?\f) (?n . ?\n) @@ -285,7 +279,7 @@ representation will be parsed correctly." ((looking-at "[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]") (let ((hex (match-string 0))) (json-advance 4) - (json-decode-char0 'ucs (string-to-number hex 16)))) + (string-to-number hex 16))) (t (signal 'json-string-escape (list (point))))))) @@ -311,24 +305,29 @@ representation will be parsed correctly." ;; String encoding -(defun json-encode-char (char) - "Encode CHAR as a JSON string." - (setq char (json-encode-char0 char 'ucs)) - (let ((control-char (car (rassoc char json-special-chars)))) - (cond - ;; Special JSON character (\n, \r, etc.). - (control-char - (format "\\%c" control-char)) - ;; ASCIIish printable character. - ((and (> char 31) (< char 127)) - (format "%c" char)) - ;; Fallback: UCS code point in \uNNNN form. - (t - (format "\\u%04x" char))))) - (defun json-encode-string (string) "Return a JSON representation of STRING." - (format "\"%s\"" (mapconcat 'json-encode-char string ""))) + ;; Reimplement the meat of `replace-regexp-in-string', for + ;; performance (bug#20154). + (let ((l (length string)) + (start 0) + res mb) + ;; Only escape quotation mark, backslash and the control + ;; characters U+0000 to U+001F (RFC 4627, ECMA-404). + (while (setq mb (string-match "[\"\\[:cntrl:]]" string start)) + (let* ((c (aref string mb)) + (special (rassq c json-special-chars))) + (push (substring string start mb) res) + (push (if special + ;; Special JSON character (\n, \r, etc.). + (string ?\\ (car special)) + ;; Fallback: UCS code point in \uNNNN form. + (format "\\u%04x" c)) + res) + (setq start (1+ mb)))) + (push (substring string start l) res) + (push "\"" res) + (apply #'concat "\"" (nreverse res)))) (defun json-encode-key (object) "Return a JSON representation of OBJECT. @@ -554,7 +553,7 @@ Advances point just past JSON object." (if (functionp (car record)) (apply (car record) (cdr record)) (signal 'json-readtable-error record))) - (signal 'end-of-file nil)))) + (signal 'json-end-of-file nil)))) ;; Syntactic sugar for the reader diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 8fc14de135..b12606681a 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -1245,8 +1245,8 @@ Entering array mode calls the function `array-mode-hook'. ;;;*** -;;;### (autoloads nil "artist" "textmodes/artist.el" (21704 50495 -;;;;;; 455324 752000)) +;;;### (autoloads nil "artist" "textmodes/artist.el" (21750 59840 +;;;;;; 704617 663000)) ;;; Generated autoloads from textmodes/artist.el (push (purecopy '(artist 1 2 6)) package--builtin-versions) @@ -1656,8 +1656,8 @@ should be non-nil). ;;;*** -;;;### (autoloads nil "autorevert" "autorevert.el" (21670 32330 885624 -;;;;;; 725000)) +;;;### (autoloads nil "autorevert" "autorevert.el" (21752 15166 568176 +;;;;;; 278000)) ;;; Generated autoloads from autorevert.el (autoload 'auto-revert-mode "autorevert" "\ @@ -1802,8 +1802,8 @@ Run script using `bat-run' and `bat-run-args'. ;;;*** -;;;### (autoloads nil "battery" "battery.el" (21670 32330 885624 -;;;;;; 725000)) +;;;### (autoloads nil "battery" "battery.el" (21754 56896 744606 +;;;;;; 568000)) ;;; Generated autoloads from battery.el (put 'battery-mode-line-string 'risky-local-variable t) @@ -2123,8 +2123,8 @@ a reflection. ;;;*** -;;;### (autoloads nil "bookmark" "bookmark.el" (21670 32330 885624 -;;;;;; 725000)) +;;;### (autoloads nil "bookmark" "bookmark.el" (21779 56495 106033 +;;;;;; 935000)) ;;; Generated autoloads from bookmark.el (define-key ctl-x-r-map "b" 'bookmark-jump) (define-key ctl-x-r-map "m" 'bookmark-set) @@ -2317,8 +2317,8 @@ Incremental search of bookmarks, hiding the non-matches as we go. ;;;*** -;;;### (autoloads nil "browse-url" "net/browse-url.el" (21710 2878 -;;;;;; 794621 967000)) +;;;### (autoloads nil "browse-url" "net/browse-url.el" (21778 35636 +;;;;;; 244616 784000)) ;;; Generated autoloads from net/browse-url.el (defvar browse-url-browser-function 'browse-url-default-browser "\ @@ -2363,7 +2363,7 @@ Ask a WWW browser to display the current region. (autoload 'browse-url "browse-url" "\ Ask a WWW browser to load URL. -Prompts for a URL, defaulting to the URL at or before point. Variable +Prompt for a URL, defaulting to the URL at or before point. Variable `browse-url-browser-function' says which browser to use. If the URL is a mailto: URL, consult `browse-url-mailto-function' first, if that exists. @@ -2372,17 +2372,15 @@ first, if that exists. (autoload 'browse-url-at-point "browse-url" "\ Ask a WWW browser to load the URL at or before point. -Doesn't let you edit the URL like `browse-url'. Variable -`browse-url-browser-function' says which browser to use. +Variable `browse-url-browser-function' says which browser to use. \(fn &optional ARG)" t nil) (autoload 'browse-url-at-mouse "browse-url" "\ Ask a WWW browser to load a URL clicked with the mouse. The URL is the one around or before the position of the mouse click -but point is not changed. Doesn't let you edit the URL like -`browse-url'. Variable `browse-url-browser-function' says which browser -to use. +but point is not changed. Variable `browse-url-browser-function' +says which browser to use. \(fn EVENT)" t nil) @@ -2412,6 +2410,8 @@ used instead of `browse-url-new-window-flag'. \(fn URL &optional NEW-WINDOW)" t nil) +(make-obsolete 'browse-url-netscape 'nil '"25.1") + (autoload 'browse-url-mozilla "browse-url" "\ Ask the Mozilla WWW browser to load URL. Default to the URL around or before point. The strings in variable @@ -2433,29 +2433,19 @@ used instead of `browse-url-new-window-flag'. (autoload 'browse-url-firefox "browse-url" "\ Ask the Firefox WWW browser to load URL. -Default to the URL around or before point. The strings in -variable `browse-url-firefox-arguments' are also passed to -Firefox. +Defaults to the URL around or before point. Passes the strings +in the variable `browse-url-firefox-arguments' to Firefox. -When called interactively, if variable -`browse-url-new-window-flag' is non-nil, load the document in a -new Firefox window, otherwise use a random existing one. A -non-nil interactive prefix argument reverses the effect of -`browse-url-new-window-flag'. +Interactively, if the variable `browse-url-new-window-flag' is non-nil, +loads the document in a new Firefox window. A non-nil prefix argument +reverses the effect of `browse-url-new-window-flag'. If `browse-url-firefox-new-window-is-tab' is non-nil, then whenever a document would otherwise be loaded in a new window, it is loaded in a new tab in an existing window instead. -When called non-interactively, optional second argument -NEW-WINDOW is used instead of `browse-url-new-window-flag'. - -On MS-Windows systems the optional `new-window' parameter is -ignored. Firefox for Windows does not support the \"-remote\" -command line parameter. Therefore, the -`browse-url-new-window-flag' and `browse-url-firefox-new-window-is-tab' -are ignored as well. Firefox on Windows will always open the requested -URL in a new window. +Non-interactively, this uses the optional second argument NEW-WINDOW +instead of `browse-url-new-window-flag'. \(fn URL &optional NEW-WINDOW)" t nil) @@ -2486,6 +2476,8 @@ used instead of `browse-url-new-window-flag'. \(fn URL &optional NEW-WINDOW)" t nil) +(make-obsolete 'browse-url-galeon 'nil '"25.1") + (autoload 'browse-url-emacs "browse-url" "\ Ask Emacs to load URL into a buffer and show it in another window. @@ -2506,6 +2498,8 @@ used instead of `browse-url-new-window-flag'. \(fn URL &optional NEW-WINDOW)" t nil) +(make-obsolete 'browse-url-gnome-moz 'nil '"25.1") + (autoload 'browse-url-mosaic "browse-url" "\ Ask the XMosaic WWW browser to load URL. @@ -2524,6 +2518,8 @@ used instead of `browse-url-new-window-flag'. \(fn URL &optional NEW-WINDOW)" t nil) +(make-obsolete 'browse-url-mosaic 'nil '"25.1") + (autoload 'browse-url-cci "browse-url" "\ Ask the XMosaic WWW browser to load URL. Default to the URL around or before point. @@ -2542,6 +2538,28 @@ used instead of `browse-url-new-window-flag'. \(fn URL &optional NEW-WINDOW)" t nil) +(make-obsolete 'browse-url-cci 'nil '"25.1") + +(autoload 'browse-url-conkeror "browse-url" "\ +Ask the Conkeror WWW browser to load URL. +Default to the URL around or before point. Also pass the strings +in the variable `browse-url-conkeror-arguments' to Conkeror. + +When called interactively, if variable +`browse-url-new-window-flag' is non-nil, load the document in a +new Conkeror window, otherwise use a random existing one. A +non-nil interactive prefix argument reverses the effect of +`browse-url-new-window-flag'. + +If variable `browse-url-conkeror-new-window-is-buffer' is +non-nil, then whenever a document would otherwise be loaded in a +new window, load it in a new buffer in an existing window instead. + +When called non-interactively, use optional second argument +NEW-WINDOW instead of `browse-url-new-window-flag'. + +\(fn URL &optional NEW-WINDOW)" t nil) + (autoload 'browse-url-w3 "browse-url" "\ Ask the w3 WWW browser to load URL. Default to the URL around or before point. @@ -2562,6 +2580,8 @@ The `browse-url-gnudoit-program' program is used with options given by \(fn URL &optional NEW-WINDOW)" t nil) +(make-obsolete 'browse-url-w3-gnudoit 'nil '"25.1") + (autoload 'browse-url-text-xterm "browse-url" "\ Ask a text browser to load URL. URL defaults to the URL around or before point. @@ -2717,8 +2737,8 @@ Like `bug-reference-mode', but only buttonize in comments and strings. ;;;*** -;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21696 -;;;;;; 56380 925320 624000)) +;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21729 +;;;;;; 53695 825320 214000)) ;;; Generated autoloads from emacs-lisp/bytecomp.el (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) @@ -3044,8 +3064,8 @@ it fails. ;;;*** -;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (21670 -;;;;;; 32331 385639 720000)) +;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (21743 +;;;;;; 190 195328 729000)) ;;; Generated autoloads from progmodes/cc-engine.el (autoload 'c-guess-basic-syntax "cc-engine" "\ @@ -3154,8 +3174,8 @@ the absolute file name of the file if STYLE-NAME is nil. ;;;*** -;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (21670 32331 -;;;;;; 385639 720000)) +;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (21786 29744 +;;;;;; 368212 633000)) ;;; Generated autoloads from progmodes/cc-mode.el (autoload 'c-initialize-cc-mode "cc-mode" "\ @@ -3667,8 +3687,8 @@ See the documentation of `define-ccl-program' for the detail of CCL program. ;;;*** -;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (21670 32330 -;;;;;; 885624 725000)) +;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (21716 41663 +;;;;;; 456033 27000)) ;;; Generated autoloads from emacs-lisp/cconv.el (autoload 'cconv-closure-convert "cconv" "\ @@ -3732,7 +3752,7 @@ Choose `cfengine2-mode' or `cfengine3-mode' by buffer contents. ;;;*** ;;;### (autoloads nil "check-declare" "emacs-lisp/check-declare.el" -;;;;;; (21670 32330 885624 725000)) +;;;;;; (21750 59840 206034 761000)) ;;; Generated autoloads from emacs-lisp/check-declare.el (autoload 'check-declare-file "check-declare" "\ @@ -3749,8 +3769,8 @@ Returns non-nil if any false statements are found. ;;;*** -;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (21670 -;;;;;; 32330 885624 725000)) +;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (21779 +;;;;;; 56495 106033 935000)) ;;; Generated autoloads from emacs-lisp/checkdoc.el (push (purecopy '(checkdoc 0 6 2)) package--builtin-versions) (put 'checkdoc-force-docstrings-flag 'safe-local-variable #'booleanp) @@ -4028,8 +4048,8 @@ and runs the normal hook `command-history-hook'. ;;;*** -;;;### (autoloads nil "cl-indent" "emacs-lisp/cl-indent.el" (21670 -;;;;;; 32330 885624 725000)) +;;;### (autoloads nil "cl-indent" "emacs-lisp/cl-indent.el" (21765 +;;;;;; 23600 805241 145000)) ;;; Generated autoloads from emacs-lisp/cl-indent.el (autoload 'common-lisp-indent-function "cl-indent" "\ @@ -4112,8 +4132,8 @@ instead. ;;;*** -;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (21670 32330 -;;;;;; 885624 725000)) +;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (21777 14770 +;;;;;; 397461 322000)) ;;; Generated autoloads from emacs-lisp/cl-lib.el (push (purecopy '(cl-lib 1 0)) package--builtin-versions) @@ -4129,18 +4149,6 @@ printer proceeds to the next function on the list. This variable is not used at present, but it is defined in hopes that a future Emacs interpreter will be able to use it.") -(define-error 'cl-assertion-failed (purecopy "Assertion failed")) - -(autoload 'cl--defsubst-expand "cl-macs") - -(put 'cl-defun 'doc-string-elt 3) - -(put 'cl-defmacro 'doc-string-elt 3) - -(put 'cl-defsubst 'doc-string-elt 3) - -(put 'cl-defstruct 'doc-string-elt 2) - ;;;*** ;;;### (autoloads nil "cmacexp" "progmodes/cmacexp.el" (21670 32331 @@ -4204,7 +4212,7 @@ If FRAME cannot display COLOR, return nil. ;;;*** -;;;### (autoloads nil "comint" "comint.el" (21670 32330 885624 725000)) +;;;### (autoloads nil "comint" "comint.el" (21781 11826 448890 994000)) ;;; Generated autoloads from comint.el (defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\ @@ -4771,8 +4779,8 @@ If FIX is non-nil, run `copyright-fix-years' instead. ;;;*** -;;;### (autoloads nil "cperl-mode" "progmodes/cperl-mode.el" (21670 -;;;;;; 32331 385639 720000)) +;;;### (autoloads nil "cperl-mode" "progmodes/cperl-mode.el" (21771 +;;;;;; 62389 36768 739000)) ;;; Generated autoloads from progmodes/cperl-mode.el (put 'cperl-indent-level 'safe-local-variable 'integerp) (put 'cperl-brace-offset 'safe-local-variable 'integerp) @@ -5016,8 +5024,8 @@ with empty strings removed. ;;;*** -;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (21669 40225 -;;;;;; 825176 608000)) +;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (21787 5486 +;;;;;; 8891 32000)) ;;; Generated autoloads from textmodes/css-mode.el (autoload 'css-mode "css-mode" "\ @@ -5588,7 +5596,7 @@ Create a new data-debug buffer with NAME. ;;;*** -;;;### (autoloads nil "dbus" "net/dbus.el" (21670 32331 385639 720000)) +;;;### (autoloads nil "dbus" "net/dbus.el" (21743 190 195328 729000)) ;;; Generated autoloads from net/dbus.el (autoload 'dbus-handle-event "dbus" "\ @@ -5728,8 +5736,8 @@ There is some minimal font-lock support (see vars ;;;*** -;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (21670 32330 -;;;;;; 885624 725000)) +;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (21777 14770 +;;;;;; 397461 322000)) ;;; Generated autoloads from emacs-lisp/debug.el (setq debugger 'debug) @@ -5827,7 +5835,7 @@ START and END delimits the corners of text rectangle. ;;;*** -;;;### (autoloads nil "delsel" "delsel.el" (21670 32330 885624 725000)) +;;;### (autoloads nil "delsel" "delsel.el" (21716 41663 456033 27000)) ;;; Generated autoloads from delsel.el (defalias 'pending-delete-mode 'delete-selection-mode) @@ -5974,7 +5982,8 @@ This function is meant to be used as a value of ;;;*** -;;;### (autoloads nil "desktop" "desktop.el" (21691 38459 74604 918000)) +;;;### (autoloads nil "desktop" "desktop.el" (21753 36028 905339 +;;;;;; 955000)) ;;; Generated autoloads from desktop.el (defvar desktop-save-mode nil "\ @@ -6347,7 +6356,7 @@ Optional arguments are passed to `dig-invoke'. ;;;*** -;;;### (autoloads nil "dired" "dired.el" (21670 32624 385626 484000)) +;;;### (autoloads nil "dired" "dired.el" (21757 29489 158925 687000)) ;;; Generated autoloads from dired.el (defvar dired-listing-switches (purecopy "-al") "\ @@ -6696,8 +6705,8 @@ Locate SOA record and increment the serial field. ;;;*** -;;;### (autoloads nil "doc-view" "doc-view.el" (21670 32330 885624 -;;;;;; 725000)) +;;;### (autoloads nil "doc-view" "doc-view.el" (21716 41663 456033 +;;;;;; 27000)) ;;; Generated autoloads from doc-view.el (autoload 'doc-view-mode-p "doc-view" "\ @@ -6782,8 +6791,8 @@ Switch to *dungeon* buffer and start game. ;;;*** -;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (21708 -;;;;;; 47547 478182 210000)) +;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (21732 +;;;;;; 29888 498897 471000)) ;;; Generated autoloads from emacs-lisp/easy-mmode.el (defalias 'easy-mmode-define-minor-mode 'define-minor-mode) @@ -6819,9 +6828,12 @@ Optional KEYMAP is the default keymap bound to the mode keymap. BODY contains code to execute each time the mode is enabled or disabled. It is executed after toggling the mode, and before running MODE-hook. Before the actual body code, you can write keyword arguments, i.e. - alternating keywords and values. These following special keywords - are supported (other keywords are passed to `defcustom' if the minor - mode is global): + alternating keywords and values. If you provide BODY, then you must + provide (even if just nil) INIT-VALUE, LIGHTER, and KEYMAP, or provide + at least one keyword argument, or both; otherwise, BODY would be + misinterpreted as the first omitted argument. The following special + keywords are supported (other keywords are passed to `defcustom' if + the minor mode is global): :group GROUP Custom group name to use in all generated `defcustom' forms. Defaults to MODE without the possible trailing \"-mode\". @@ -7534,7 +7546,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing. ;;;*** -;;;### (autoloads nil "ede" "cedet/ede.el" (21679 47292 556033 759000)) +;;;### (autoloads nil "ede" "cedet/ede.el" (21715 20800 626041 761000)) ;;; Generated autoloads from cedet/ede.el (push (purecopy '(ede 1 2)) package--builtin-versions) @@ -7560,8 +7572,8 @@ an EDE controlled project. ;;;*** -;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (21670 32330 -;;;;;; 885624 725000)) +;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (21767 65327 +;;;;;; 504606 256000)) ;;; Generated autoloads from emacs-lisp/edebug.el (defvar edebug-all-defs nil "\ @@ -8045,15 +8057,15 @@ BUFFER is put back into its original major mode. ;;;*** -;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (21708 47547 -;;;;;; 478182 210000)) +;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (21781 11826 +;;;;;; 448890 994000)) ;;; Generated autoloads from emacs-lisp/eieio.el (push (purecopy '(eieio 1 4)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (21708 -;;;;;; 47547 478182 210000)) +;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (21770 +;;;;;; 41522 196747 399000)) ;;; Generated autoloads from emacs-lisp/eieio-core.el (push (purecopy '(eieio-core 1 4)) package--builtin-versions) @@ -8069,8 +8081,8 @@ It creates an autoload function for CNAME's constructor. ;;;*** -;;;### (autoloads nil "elec-pair" "elec-pair.el" (21670 32330 885624 -;;;;;; 725000)) +;;;### (autoloads nil "elec-pair" "elec-pair.el" (21783 53552 656724 +;;;;;; 351000)) ;;; Generated autoloads from elec-pair.el (defvar electric-pair-text-pairs '((34 . 34)) "\ @@ -8099,7 +8111,13 @@ the mode if ARG is omitted or nil. Electric Pair mode is a global minor mode. When enabled, typing an open parenthesis automatically inserts the corresponding -closing parenthesis. (Likewise for brackets, etc.). +closing parenthesis. (Likewise for brackets, etc.). To toggle +the mode in a single buffer, use `electric-pair-local-mode'. + +\(fn &optional ARG)" t nil) + +(autoload 'electric-pair-local-mode "elec-pair" "\ +Toggle `electric-pair-mode' only in this buffer. \(fn &optional ARG)" t nil) @@ -8644,7 +8662,7 @@ if ARG is omitted or nil. ;;;*** -;;;### (autoloads nil "epg" "epg.el" (21670 32330 885624 725000)) +;;;### (autoloads nil "epg" "epg.el" (21777 14770 397461 322000)) ;;; Generated autoloads from epg.el (push (purecopy '(epg 1 0 0)) package--builtin-versions) @@ -8676,8 +8694,9 @@ Look at CONFIG and try to expand GROUP. ;;;*** -;;;### (autoloads nil "erc" "erc/erc.el" (21670 32330 885624 725000)) +;;;### (autoloads nil "erc" "erc/erc.el" (21779 56495 106033 935000)) ;;; Generated autoloads from erc/erc.el +(push (purecopy '(erc 5 3)) package--builtin-versions) (autoload 'erc-select-read-args "erc" "\ Prompt the user for values of nick, server, port, and password. @@ -9110,8 +9129,8 @@ This will add a speedbar major display mode. ;;;*** -;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (21670 -;;;;;; 32330 885624 725000)) +;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (21727 +;;;;;; 11963 635339 992000)) ;;; Generated autoloads from erc/erc-spelling.el (autoload 'erc-spelling-mode "erc-spelling" nil t) @@ -9265,8 +9284,8 @@ Kill all test buffers that are still live. ;;;*** -;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (21670 32330 -;;;;;; 885624 725000)) +;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (21767 65327 +;;;;;; 504606 256000)) ;;; Generated autoloads from eshell/esh-mode.el (autoload 'eshell-mode "esh-mode" "\ @@ -9942,9 +9961,17 @@ fourth arg NOSEP non-nil inhibits this. ;;;*** -;;;### (autoloads nil "eww" "net/eww.el" (21702 8774 274627 813000)) +;;;### (autoloads nil "eww" "net/eww.el" (21753 36029 405318 957000)) ;;; Generated autoloads from net/eww.el +(defvar eww-suggest-uris '(eww-links-at-point url-get-url-at-point eww-current-url) "\ +List of functions called to form the list of default URIs for `eww'. +Each of the elements is a function returning either a string or a list +of strings. The results will be joined into a single list with +duplicate entries (if any) removed.") + +(custom-autoload 'eww-suggest-uris "eww" t) + (autoload 'eww "eww" "\ Fetch URL and render the page. If the input doesn't look like an URL or a domain name, the @@ -9954,16 +9981,21 @@ word(s) will be searched for via `eww-search-prefix'. (defalias 'browse-web 'eww) (autoload 'eww-open-file "eww" "\ -Render a file using EWW. +Render FILE using EWW. \(fn FILE)" t nil) (autoload 'eww-search-words "eww" "\ -Search the web for the text between the point and marker. +Search the web for the text between BEG and END. See the `eww-search-prefix' variable for the search engine used. \(fn &optional BEG END)" t nil) +(autoload 'eww-mode "eww" "\ +Mode for browsing the web. + +\(fn)" t nil) + (autoload 'eww-browse-url "eww" "\ @@ -10067,8 +10099,8 @@ This is used only in conjunction with `expand-add-abbrevs'. ;;;*** -;;;### (autoloads nil "f90" "progmodes/f90.el" (21670 32331 385639 -;;;;;; 720000)) +;;;### (autoloads nil "f90" "progmodes/f90.el" (21740 23998 526747 +;;;;;; 884000)) ;;; Generated autoloads from progmodes/f90.el (autoload 'f90-mode "f90" "\ @@ -10350,7 +10382,7 @@ you can set `feedmail-queue-reminder-alist' to nil. ;;;*** -;;;### (autoloads nil "ffap" "ffap.el" (21696 56380 925320 624000)) +;;;### (autoloads nil "ffap" "ffap.el" (21778 35636 244616 784000)) ;;; Generated autoloads from ffap.el (autoload 'ffap-next "ffap" "\ @@ -10413,8 +10445,8 @@ Evaluate the forms in variable `ffap-bindings'. ;;;*** -;;;### (autoloads nil "filecache" "filecache.el" (21670 32330 885624 -;;;;;; 725000)) +;;;### (autoloads nil "filecache" "filecache.el" (21740 23998 26747 +;;;;;; 125000)) ;;; Generated autoloads from filecache.el (autoload 'file-cache-add-directory "filecache" "\ @@ -10989,8 +11021,8 @@ Turn flymake mode off. ;;;*** -;;;### (autoloads nil "flyspell" "textmodes/flyspell.el" (21670 32331 -;;;;;; 885635 586000)) +;;;### (autoloads nil "flyspell" "textmodes/flyspell.el" (21750 59840 +;;;;;; 704617 663000)) ;;; Generated autoloads from textmodes/flyspell.el (autoload 'flyspell-prog-mode "flyspell" "\ @@ -11318,8 +11350,8 @@ and choose the directory as the fortune-file. ;;;*** -;;;### (autoloads nil "frameset" "frameset.el" (21670 32330 885624 -;;;;;; 725000)) +;;;### (autoloads nil "frameset" "frameset.el" (21744 21055 525326 +;;;;;; 515000)) ;;; Generated autoloads from frameset.el (defvar frameset-session-filter-alist '((name . :never) (left . frameset-filter-iconified) (minibuffer . frameset-filter-minibuffer) (top . frameset-filter-iconified)) "\ @@ -11505,15 +11537,15 @@ Interactively, reads the register using `register-read-with-preview'. ;;;*** -;;;### (autoloads nil "gamegrid" "play/gamegrid.el" (21696 56380 -;;;;;; 925320 624000)) +;;;### (autoloads nil "gamegrid" "play/gamegrid.el" (21720 38720 +;;;;;; 956749 443000)) ;;; Generated autoloads from play/gamegrid.el (push (purecopy '(gamegrid 1 2)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (21670 32331 -;;;;;; 385639 720000)) +;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (21724 35774 +;;;;;; 954622 790000)) ;;; Generated autoloads from progmodes/gdb-mi.el (defvar gdb-enable-debug nil "\ @@ -11882,8 +11914,8 @@ CLEAN is obsolete and ignored. ;;;*** -;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (21670 32330 -;;;;;; 885624 725000)) +;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (21785 8881 6781 +;;;;;; 649000)) ;;; Generated autoloads from gnus/gnus-art.el (autoload 'gnus-article-prepare-display "gnus-art" "\ @@ -12290,8 +12322,8 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns: ;;;*** -;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (21670 32330 -;;;;;; 885624 725000)) +;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (21725 56638 +;;;;;; 795320 63000)) ;;; Generated autoloads from gnus/gnus-msg.el (autoload 'gnus-msg-mail "gnus-msg" "\ @@ -12318,7 +12350,7 @@ Like `message-reply'. ;;;*** ;;;### (autoloads nil "gnus-notifications" "gnus/gnus-notifications.el" -;;;;;; (21670 32330 885624 725000)) +;;;;;; (21757 29489 158925 687000)) ;;; Generated autoloads from gnus/gnus-notifications.el (autoload 'gnus-notifications "gnus-notifications" "\ @@ -12426,8 +12458,8 @@ Add NUM into sorted LIST by side effect. ;;;*** -;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (21707 -;;;;;; 26689 135319 638000)) +;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (21774 +;;;;;; 38574 225319 550000)) ;;; Generated autoloads from gnus/gnus-registry.el (autoload 'gnus-registry-initialize "gnus-registry" "\ @@ -12481,8 +12513,8 @@ Update the format specification near point. ;;;*** -;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (21670 32330 -;;;;;; 885624 725000)) +;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (21716 41663 +;;;;;; 456033 27000)) ;;; Generated autoloads from gnus/gnus-start.el (autoload 'gnus-declare-backend "gnus-start" "\ @@ -12492,8 +12524,8 @@ Declare back end NAME with ABILITIES as a Gnus back end. ;;;*** -;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (21670 32330 -;;;;;; 885624 725000)) +;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (21785 8881 6781 +;;;;;; 649000)) ;;; Generated autoloads from gnus/gnus-sum.el (autoload 'gnus-summary-bookmark-jump "gnus-sum" "\ @@ -12812,8 +12844,8 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful. ;;;*** -;;;### (autoloads nil "gud" "progmodes/gud.el" (21670 32331 385639 -;;;;;; 720000)) +;;;### (autoloads nil "gud" "progmodes/gud.el" (21769 20661 366048 +;;;;;; 601000)) ;;; Generated autoloads from progmodes/gud.el (autoload 'gud-gdb "gud" "\ @@ -12908,8 +12940,8 @@ it if ARG is omitted or nil. ;;;*** -;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (21670 32330 885624 -;;;;;; 725000)) +;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (21750 59840 206034 +;;;;;; 761000)) ;;; Generated autoloads from emacs-lisp/gv.el (autoload 'gv-get "gv" "\ @@ -13228,8 +13260,8 @@ different regions. With numeric argument ARG, behaves like ;;;*** -;;;### (autoloads nil "help-fns" "help-fns.el" (21690 17600 745361 -;;;;;; 875000)) +;;;### (autoloads nil "help-fns" "help-fns.el" (21721 59582 784612 +;;;;;; 824000)) ;;; Generated autoloads from help-fns.el (autoload 'describe-function "help-fns" "\ @@ -13280,6 +13312,14 @@ it is displayed along with the global value. \(fn VARIABLE &optional BUFFER FRAME)" t nil) +(autoload 'describe-function-or-variable "help-fns" "\ +Display the full documentation of the function or variable SYMBOL. +If SYMBOL is a variable and has a buffer-local value in BUFFER or FRAME +\(default to the current buffer and current frame), it is displayed along +with the global value. + +\(fn SYMBOL &optional BUFFER FRAME)" t nil) + (autoload 'describe-syntax "help-fns" "\ Describe the syntax specifications in the syntax table of BUFFER. The descriptions are inserted in a help buffer, which is then displayed. @@ -13322,8 +13362,8 @@ gives the window that lists the options.") ;;;*** -;;;### (autoloads nil "help-mode" "help-mode.el" (21690 17600 745361 -;;;;;; 875000)) +;;;### (autoloads nil "help-mode" "help-mode.el" (21733 50750 334730 +;;;;;; 5000)) ;;; Generated autoloads from help-mode.el (autoload 'help-mode "help-mode" "\ @@ -13413,6 +13453,14 @@ Add xrefs for symbols in `pp's output between FROM and TO. \(fn FROM TO)" nil nil) +(autoload 'help-xref-interned "help-mode" "\ +Follow a hyperlink which appeared to be an arbitrary interned SYMBOL. +Both variable, function and face documentation are extracted into a single +help buffer. If SYMBOL is a variable, include buffer-local value for optional +BUFFER or FRAME. + +\(fn SYMBOL &optional BUFFER FRAME)" nil nil) + (autoload 'help-bookmark-jump "help-mode" "\ Jump to help-mode bookmark BOOKMARK. Handler function for record returned by `help-bookmark-make-record'. @@ -13532,8 +13580,7 @@ This discards the buffer's undo information. ;;;*** -;;;### (autoloads nil "hi-lock" "hi-lock.el" (21670 32331 385639 -;;;;;; 720000)) +;;;### (autoloads nil "hi-lock" "hi-lock.el" (21741 1161 438890 423000)) ;;; Generated autoloads from hi-lock.el (autoload 'hi-lock-mode "hi-lock" "\ @@ -14616,7 +14663,7 @@ The main features of this mode are ;;;*** -;;;### (autoloads nil "ido" "ido.el" (21694 14651 747488 989000)) +;;;### (autoloads nil "ido" "ido.el" (21767 65327 504606 256000)) ;;; Generated autoloads from ido.el (defvar ido-mode nil "\ @@ -14842,7 +14889,7 @@ PROMPT is the prompt to give to the user. DEFAULT if given is the default buffer to be selected, which will go to the front of the list. If REQUIRE-MATCH is non-nil, an existing buffer must be selected. -\(fn PROMPT &optional DEFAULT REQUIRE-MATCH)" nil nil) +\(fn PROMPT &optional DEFAULT REQUIRE-MATCH PREDICATE)" nil nil) (autoload 'ido-read-file-name "ido" "\ Ido replacement for the built-in `read-file-name'. @@ -15300,8 +15347,8 @@ An image file is one whose name has an extension in ;;;*** -;;;### (autoloads nil "image-mode" "image-mode.el" (21670 32331 385639 -;;;;;; 720000)) +;;;### (autoloads nil "image-mode" "image-mode.el" (21716 41663 456033 +;;;;;; 27000)) ;;; Generated autoloads from image-mode.el (autoload 'image-mode "image-mode" "\ @@ -15748,8 +15795,8 @@ completion alternatives to currently visited manuals. ;;;*** -;;;### (autoloads nil "info-look" "info-look.el" (21670 32331 385639 -;;;;;; 720000)) +;;;### (autoloads nil "info-look" "info-look.el" (21764 2734 445319 +;;;;;; 586000)) ;;; Generated autoloads from info-look.el (autoload 'info-lookup-reset "info-look" "\ @@ -15975,8 +16022,8 @@ Toggle input method in interactive search. ;;;*** -;;;### (autoloads nil "isearchb" "isearchb.el" (21670 32331 385639 -;;;;;; 720000)) +;;;### (autoloads nil "isearchb" "isearchb.el" (21767 65327 504606 +;;;;;; 256000)) ;;; Generated autoloads from isearchb.el (push (purecopy '(isearchb 1 5)) package--builtin-versions) @@ -16089,8 +16136,8 @@ Add submenus to the File menu, to convert to and from various formats. ;;;*** -;;;### (autoloads nil "ispell" "textmodes/ispell.el" (21670 32331 -;;;;;; 885635 586000)) +;;;### (autoloads nil "ispell" "textmodes/ispell.el" (21750 59840 +;;;;;; 704617 663000)) ;;; Generated autoloads from textmodes/ispell.el (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive)))) @@ -16425,7 +16472,7 @@ by `jka-compr-installed'. ;;;*** -;;;### (autoloads nil "js" "progmodes/js.el" (21681 2618 385332 620000)) +;;;### (autoloads nil "js" "progmodes/js.el" (21760 5676 875320 615000)) ;;; Generated autoloads from progmodes/js.el (push (purecopy '(js 9)) package--builtin-versions) @@ -16439,7 +16486,7 @@ Major mode for editing JavaScript. ;;;*** -;;;### (autoloads nil "json" "json.el" (21670 32331 385639 720000)) +;;;### (autoloads nil "json" "json.el" (21779 56495 106033 935000)) ;;; Generated autoloads from json.el (push (purecopy '(json 1 4)) package--builtin-versions) @@ -17761,8 +17808,8 @@ recursion depth in the minibuffer prompt. This is only useful if ;;;*** -;;;### (autoloads nil "message" "gnus/message.el" (21706 5826 304666 -;;;;;; 725000)) +;;;### (autoloads nil "message" "gnus/message.el" (21759 29151 445319 +;;;;;; 109000)) ;;; Generated autoloads from gnus/message.el (define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook) @@ -18263,8 +18310,8 @@ The return value is always nil. ;;;*** -;;;### (autoloads nil "misearch" "misearch.el" (21691 38459 74604 -;;;;;; 918000)) +;;;### (autoloads nil "misearch" "misearch.el" (21767 65327 504606 +;;;;;; 256000)) ;;; Generated autoloads from misearch.el (add-hook 'isearch-mode-hook 'multi-isearch-setup) @@ -19058,8 +19105,8 @@ listed in the PORTS list. ;;;*** -;;;### (autoloads nil "network-stream" "net/network-stream.el" (21670 -;;;;;; 32331 385639 720000)) +;;;### (autoloads nil "network-stream" "net/network-stream.el" (21716 +;;;;;; 41663 456033 27000)) ;;; Generated autoloads from net/network-stream.el (autoload 'open-network-stream "network-stream" "\ @@ -20135,8 +20182,8 @@ The Git version of org-mode. ;;;*** -;;;### (autoloads nil "outline" "outline.el" (21708 47547 478182 -;;;;;; 210000)) +;;;### (autoloads nil "outline" "outline.el" (21720 38720 956749 +;;;;;; 443000)) ;;; Generated autoloads from outline.el (put 'outline-regexp 'safe-local-variable 'stringp) (put 'outline-heading-end-regexp 'safe-local-variable 'stringp) @@ -20179,8 +20226,8 @@ See the command `outline-mode' for more information on this mode. ;;;*** -;;;### (autoloads nil "package" "emacs-lisp/package.el" (21695 35516 -;;;;;; 595262 313000)) +;;;### (autoloads nil "package" "emacs-lisp/package.el" (21787 50612 +;;;;;; 215339 172000)) ;;; Generated autoloads from emacs-lisp/package.el (push (purecopy '(package 1 0 1)) package--builtin-versions) @@ -20195,12 +20242,40 @@ activate the package system at any time.") (custom-autoload 'package-enable-at-startup "package" t) +(autoload 'package-initialize "package" "\ +Load Emacs Lisp packages, and activate them. +The variable `package-load-list' controls which packages to load. +If optional arg NO-ACTIVATE is non-nil, don't activate packages. + +\(fn &optional NO-ACTIVATE)" t nil) + +(autoload 'package-import-keyring "package" "\ +Import keys from FILE. + +\(fn &optional FILE)" t nil) + +(autoload 'package-refresh-contents "package" "\ +Download descriptions of all configured ELPA packages. +For each archive configured in the variable `package-archives', +inform Emacs about the latest versions of all packages it offers, +and make them available for download. +Optional argument, ASYNC, specifies whether the downloads should +be performed in the background. + +\(fn &optional ASYNC)" t nil) + (autoload 'package-install "package" "\ Install the package PKG. PKG can be a package-desc or the package name of one the available packages in an archive in `package-archives'. Interactively, prompt for its name. -\(fn PKG)" t nil) +If called interactively or if DONT-SELECT nil, add PKG to +`package-selected-packages'. + +If PKG is a package-desc and it is already installed, don't try +to install it but still mark it as selected. + +\(fn PKG &optional DONT-SELECT)" t nil) (autoload 'package-install-from-buffer "package" "\ Install a package from the current buffer. @@ -20222,24 +20297,27 @@ The file can either be a tar file or an Emacs Lisp file. \(fn FILE)" t nil) -(autoload 'package-import-keyring "package" "\ -Import keys from FILE. +(autoload 'package-install-user-selected-packages "package" "\ +Ensure packages in `package-selected-packages' are installed. +If some packages are not installed propose to install them. -\(fn &optional FILE)" t nil) +\(fn)" t nil) -(autoload 'package-refresh-contents "package" "\ -Download the ELPA archive description if needed. -This informs Emacs about the latest versions of all packages, and -makes them available for download. +(autoload 'package-reinstall "package" "\ +Reinstall package PKG. +PKG should be either a symbol, the package name, or a package-desc +object. -\(fn)" t nil) +\(fn PKG)" t nil) -(autoload 'package-initialize "package" "\ -Load Emacs Lisp packages, and activate them. -The variable `package-load-list' controls which packages to load. -If optional arg NO-ACTIVATE is non-nil, don't activate packages. +(autoload 'package-autoremove "package" "\ +Remove packages that are no more needed. -\(fn &optional NO-ACTIVATE)" t nil) +Packages that are no more needed by other packages in +`package-selected-packages' and their dependencies +will be deleted. + +\(fn)" t nil) (autoload 'describe-package "package" "\ Display the full documentation of PACKAGE (a symbol). @@ -20370,8 +20448,8 @@ Check if KEY is in the cache. ;;;*** -;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (21670 32330 -;;;;;; 885624 725000)) +;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (21777 14770 +;;;;;; 397461 322000)) ;;; Generated autoloads from emacs-lisp/pcase.el (autoload 'pcase "pcase" "\ @@ -20385,7 +20463,6 @@ UPatterns can take the following forms: (or UPAT...) matches if any of the patterns matches. (and UPAT...) matches if all the patterns match. 'VAL matches if the object is `equal' to VAL - `QPAT matches if the QPattern QPAT matches. (pred FUN) matches if FUN applied to the object returns non-nil. (guard BOOLEXP) matches if BOOLEXP evaluates to non-nil. (let UPAT EXP) matches if EXP matches UPAT. @@ -20393,14 +20470,6 @@ UPatterns can take the following forms: If a SYMBOL is used twice in the same pattern (i.e. the pattern is \"non-linear\"), then the second occurrence is turned into an `eq'uality test. -QPatterns can take the following forms: - (QPAT1 . QPAT2) matches if QPAT1 matches the car and QPAT2 the cdr. - [QPAT1 QPAT2..QPATn] matches a vector of length n and QPAT1..QPATn match - its 0..(n-1)th elements, respectively. - ,UPAT matches if the UPattern UPAT matches. - STRING matches if the object is `equal' to STRING. - ATOM matches if the object is `eq' to ATOM. - FUN can take the form SYMBOL or (lambda ARGS BODY) in which case it's called with one argument. (F ARG1 .. ARGn) in which case F gets called with an n+1'th argument @@ -20413,6 +20482,9 @@ E.g. you can match pairs where the cdr is larger than the car with a pattern like `(,a . ,(pred (< a))) or, with more checks: `(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a)))) +Additional patterns can be defined via `pcase-defmacro'. +Currently, the following patterns are provided this way: + \(fn EXP &rest CASES)" nil t) (function-put 'pcase 'lisp-indent-function '1) @@ -20424,6 +20496,18 @@ The exhaustive version of `pcase' (which see). (function-put 'pcase-exhaustive 'lisp-indent-function '1) +(autoload 'pcase-lambda "pcase" "\ +Like `lambda' but allow each argument to be a UPattern. +I.e. accepts the usual &optional and &rest keywords, but every +formal argument can be any pattern accepted by `pcase' (a mere +variable name being but a special case of it). + +\(fn LAMBDA-LIST &rest BODY)" nil t) + +(function-put 'pcase-lambda 'doc-string-elt '2) + +(function-put 'pcase-lambda 'lisp-indent-function 'defun) + (autoload 'pcase-let* "pcase" "\ Like `let*' but where you can use `pcase' patterns for bindings. BODY should be an expression, and BINDINGS should be a list of bindings @@ -20890,8 +20974,8 @@ they are not by default assigned to keys. ;;;*** -;;;### (autoloads nil "plstore" "gnus/plstore.el" (21670 32331 385639 -;;;;;; 720000)) +;;;### (autoloads nil "plstore" "gnus/plstore.el" (21786 29744 368212 +;;;;;; 633000)) ;;; Generated autoloads from gnus/plstore.el (autoload 'plstore-open "plstore" "\ @@ -21929,10 +22013,10 @@ If EXTENSION is any other symbol, it is ignored. ;;;*** -;;;### (autoloads nil "python" "progmodes/python.el" (21704 50495 -;;;;;; 455324 752000)) +;;;### (autoloads nil "python" "progmodes/python.el" (21781 11826 +;;;;;; 448890 994000)) ;;; Generated autoloads from progmodes/python.el -(push (purecopy '(python 0 24 4)) package--builtin-versions) +(push (purecopy '(python 0 24 5)) package--builtin-versions) (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode)) @@ -21986,8 +22070,8 @@ them into characters should be done separately. ;;;*** -;;;### (autoloads nil "quail" "international/quail.el" (21673 8506 -;;;;;; 69195 402000)) +;;;### (autoloads nil "quail" "international/quail.el" (21761 26543 +;;;;;; 734945 674000)) ;;; Generated autoloads from international/quail.el (autoload 'quail-title "quail" "\ @@ -22217,8 +22301,8 @@ of each directory. ;;;*** -;;;### (autoloads nil "quail/hangul" "leim/quail/hangul.el" (21670 -;;;;;; 32331 385639 720000)) +;;;### (autoloads nil "quail/hangul" "leim/quail/hangul.el" (21770 +;;;;;; 41522 196747 399000)) ;;; Generated autoloads from leim/quail/hangul.el (autoload 'hangul-input-method-activate "quail/hangul" "\ @@ -22402,7 +22486,7 @@ were operated on recently. ;;;*** -;;;### (autoloads nil "rect" "rect.el" (21670 32331 885635 586000)) +;;;### (autoloads nil "rect" "rect.el" (21733 50750 334730 5000)) ;;; Generated autoloads from rect.el (autoload 'delete-rectangle "rect" "\ @@ -22617,8 +22701,8 @@ This enforces rescanning the buffer on next use. ;;;*** -;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (21670 -;;;;;; 32331 885635 586000)) +;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (21743 +;;;;;; 190 195328 729000)) ;;; Generated autoloads from textmodes/reftex-vars.el (put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x)))) (put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x)))) @@ -22897,8 +22981,8 @@ variable. ;;;*** -;;;### (autoloads nil "rmail" "mail/rmail.el" (21670 32623 885622 -;;;;;; 218000)) +;;;### (autoloads nil "rmail" "mail/rmail.el" (21756 8970 306748 +;;;;;; 51000)) ;;; Generated autoloads from mail/rmail.el (defvar rmail-file-name (purecopy "~/RMAIL") "\ @@ -23345,8 +23429,8 @@ for modes derived from Text mode, like Mail mode. ;;;*** -;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (21670 -;;;;;; 32331 385639 720000)) +;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (21771 +;;;;;; 62389 36768 739000)) ;;; Generated autoloads from progmodes/ruby-mode.el (push (purecopy '(ruby-mode 1 2)) package--builtin-versions) @@ -23919,8 +24003,8 @@ Major mode for editing Wisent grammars. ;;;*** -;;;### (autoloads nil "sendmail" "mail/sendmail.el" (21670 32331 -;;;;;; 385639 720000)) +;;;### (autoloads nil "sendmail" "mail/sendmail.el" (21786 29744 +;;;;;; 368212 633000)) ;;; Generated autoloads from mail/sendmail.el (defvar mail-from-style 'default "\ @@ -24201,14 +24285,14 @@ Like `mail' command, but display mail buffer in another frame. ;;;*** -;;;### (autoloads nil "seq" "emacs-lisp/seq.el" (21691 38459 74604 -;;;;;; 918000)) +;;;### (autoloads nil "seq" "emacs-lisp/seq.el" (21778 35636 244616 +;;;;;; 784000)) ;;; Generated autoloads from emacs-lisp/seq.el -(push (purecopy '(seq 1 0)) package--builtin-versions) +(push (purecopy '(seq 1 3)) package--builtin-versions) ;;;*** -;;;### (autoloads nil "server" "server.el" (21670 32331 885635 586000)) +;;;### (autoloads nil "server" "server.el" (21744 21055 525326 515000)) ;;; Generated autoloads from server.el (put 'server-host 'risky-local-variable t) @@ -24319,8 +24403,8 @@ formula: ;;;*** -;;;### (autoloads nil "sgml-mode" "textmodes/sgml-mode.el" (21670 -;;;;;; 32331 885635 586000)) +;;;### (autoloads nil "sgml-mode" "textmodes/sgml-mode.el" (21775 +;;;;;; 59440 64641 144000)) ;;; Generated autoloads from textmodes/sgml-mode.el (autoload 'sgml-mode "sgml-mode" "\ @@ -24586,7 +24670,7 @@ Otherwise, one argument `-i' is passed to the shell. ;;;*** -;;;### (autoloads nil "shr" "net/shr.el" (21704 50495 455324 752000)) +;;;### (autoloads nil "shr" "net/shr.el" (21748 18111 534605 274000)) ;;; Generated autoloads from net/shr.el (autoload 'shr-render-region "shr" "\ @@ -24929,8 +25013,8 @@ then `snmpv2-mode-hook'. ;;;*** -;;;### (autoloads nil "solar" "calendar/solar.el" (21670 32330 885624 -;;;;;; 725000)) +;;;### (autoloads nil "solar" "calendar/solar.el" (21735 6077 666769 +;;;;;; 364000)) ;;; Generated autoloads from calendar/solar.el (autoload 'sunrise-sunset "solar" "\ @@ -25294,10 +25378,10 @@ Return a vector containing the lines from `spook-phrases-file'. ;;;*** -;;;### (autoloads nil "sql" "progmodes/sql.el" (21670 32331 885635 -;;;;;; 586000)) +;;;### (autoloads nil "sql" "progmodes/sql.el" (21765 23600 805241 +;;;;;; 145000)) ;;; Generated autoloads from progmodes/sql.el -(push (purecopy '(sql 3 4)) package--builtin-versions) +(push (purecopy '(sql 3 5)) package--builtin-versions) (autoload 'sql-add-product-keywords "sql" "\ Add highlighting KEYWORDS for SQL PRODUCT. @@ -26831,7 +26915,7 @@ Normally input is edited in Emacs and sent a line at a time. ;;;*** -;;;### (autoloads nil "term" "term.el" (21670 32331 885635 586000)) +;;;### (autoloads nil "term" "term.el" (21775 59440 64641 144000)) ;;; Generated autoloads from term.el (autoload 'make-term "term" "\ @@ -27987,8 +28071,8 @@ Its value should be an event that has a binding in MENU. ;;;*** -;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (21670 -;;;;;; 32330 885624 725000)) +;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (21750 +;;;;;; 59840 206034 761000)) ;;; Generated autoloads from calendar/todo-mode.el (autoload 'todo-show "todo-mode" "\ @@ -28186,8 +28270,8 @@ the output buffer or changing the window configuration. ;;;*** -;;;### (autoloads nil "tramp" "net/tramp.el" (21704 50495 455324 -;;;;;; 752000)) +;;;### (autoloads nil "tramp" "net/tramp.el" (21766 44463 655319 +;;;;;; 936000)) ;;; Generated autoloads from net/tramp.el (defvar tramp-mode t "\ @@ -28273,7 +28357,7 @@ Invoke Tramp file name completion handler. Falls back to normal file name handler if no Tramp file name handler exists." (let ((directory-sep-char 47) (fn (assoc operation tramp-completion-file-name-handler-alist))) (if (and fn tramp-mode (or (eq tramp-syntax (quote sep)) (featurep (quote tramp)) (and (boundp (quote partial-completion-mode)) (symbol-value (quote partial-completion-mode))) (featurep (quote ido)) (featurep (quote icicles)))) (save-match-data (apply (cdr fn) args)) (tramp-completion-run-real-handler operation args)))) (defun tramp-autoload-file-name-handler (operation &rest args) "\ -Load Tramp file name handler, and perform OPERATION." (let ((default-directory (or (symbol-value (quote temporary-file-directory)) "/"))) (load "tramp" nil t)) (apply operation args)) +Load Tramp file name handler, and perform OPERATION." (let ((default-directory "/")) (load "tramp" nil t)) (apply operation args)) (defun tramp-register-autoload-file-name-handlers nil "\ Add Tramp file name handlers to `file-name-handler-alist' during autoload." (add-to-list (quote file-name-handler-alist) (cons tramp-file-name-regexp (quote tramp-autoload-file-name-handler))) (put (quote tramp-autoload-file-name-handler) (quote safe-magic) t) (add-to-list (quote file-name-handler-alist) (cons tramp-completion-file-name-regexp (quote tramp-completion-file-name-handler))) (put (quote tramp-completion-file-name-handler) (quote safe-magic) t)) @@ -28854,8 +28938,8 @@ overriding the value of `url-gateway-method'. ;;;*** -;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (21670 -;;;;;; 32331 885635 586000)) +;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (21766 +;;;;;; 44463 655319 936000)) ;;; Generated autoloads from url/url-handlers.el (defvar url-handler-mode nil "\ @@ -29408,7 +29492,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME. ;;;*** -;;;### (autoloads nil "vc" "vc/vc.el" (21670 32331 885635 586000)) +;;;### (autoloads nil "vc" "vc/vc.el" (21748 18111 534605 274000)) ;;; Generated autoloads from vc/vc.el (defvar vc-checkout-hook nil "\ @@ -29429,6 +29513,16 @@ See `run-hooks'.") (custom-autoload 'vc-before-checkin-hook "vc" t) +(autoload 'vc-responsible-backend "vc" "\ +Return the name of a backend system that is responsible for FILE. + +If FILE is already registered, return the +backend of FILE. If FILE is not registered, then the +first backend in `vc-handled-backends' that declares itself +responsible for FILE is returned. + +\(fn FILE)" nil nil) + (autoload 'vc-next-action "vc" "\ Do the next logical version control operation on the current fileset. This requires that all files in the current VC fileset be in the @@ -29735,8 +29829,8 @@ should be applied to the background or to the foreground. ;;;*** -;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (21691 38459 74604 -;;;;;; 918000)) +;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (21744 21055 525326 +;;;;;; 515000)) ;;; Generated autoloads from vc/vc-bzr.el (defconst vc-bzr-admin-dirname ".bzr" "\ @@ -29752,8 +29846,8 @@ Name of the format file in a .bzr directory.") ;;;*** -;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (21670 32331 885635 -;;;;;; 586000)) +;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (21744 21055 525326 +;;;;;; 515000)) ;;; Generated autoloads from vc/vc-cvs.el (defun vc-cvs-registered (f) "Return non-nil if file F is registered with CVS." @@ -29813,8 +29907,8 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-git" "vc/vc-git.el" (21670 32331 885635 -;;;;;; 586000)) +;;;### (autoloads nil "vc-git" "vc/vc-git.el" (21744 21055 525326 +;;;;;; 515000)) ;;; Generated autoloads from vc/vc-git.el (defun vc-git-registered (file) "Return non-nil if FILE is registered with git." @@ -29825,7 +29919,7 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (21670 32331 885635 586000)) +;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (21744 21055 525326 515000)) ;;; Generated autoloads from vc/vc-hg.el (defun vc-hg-registered (file) "Return non-nil if FILE is registered with hg." @@ -29836,8 +29930,8 @@ case, and the process object in the asynchronous case. ;;;*** -;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (21670 32331 885635 -;;;;;; 586000)) +;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (21744 21055 525326 +;;;;;; 515000)) ;;; Generated autoloads from vc/vc-mtn.el (defconst vc-mtn-admin-dir "_MTN" "\ @@ -29853,8 +29947,8 @@ Name of the monotone directory's format file.") ;;;*** -;;;### (autoloads nil "vc-rcs" "vc/vc-rcs.el" (21670 32331 885635 -;;;;;; 586000)) +;;;### (autoloads nil "vc-rcs" "vc/vc-rcs.el" (21748 18111 534605 +;;;;;; 274000)) ;;; Generated autoloads from vc/vc-rcs.el (defvar vc-rcs-master-templates (purecopy '("%sRCS/%s,v" "%s%s,v" "%sRCS/%s")) "\ @@ -29867,8 +29961,8 @@ For a description of possible values, see `vc-check-master-templates'.") ;;;*** -;;;### (autoloads nil "vc-sccs" "vc/vc-sccs.el" (21670 32331 885635 -;;;;;; 586000)) +;;;### (autoloads nil "vc-sccs" "vc/vc-sccs.el" (21748 18111 534605 +;;;;;; 274000)) ;;; Generated autoloads from vc/vc-sccs.el (defvar vc-sccs-master-templates (purecopy '("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir)) "\ @@ -29886,8 +29980,8 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir) ;;;*** -;;;### (autoloads nil "vc-src" "vc/vc-src.el" (21670 32331 885635 -;;;;;; 586000)) +;;;### (autoloads nil "vc-src" "vc/vc-src.el" (21748 18111 534605 +;;;;;; 274000)) ;;; Generated autoloads from vc/vc-src.el (defvar vc-src-master-templates (purecopy '("%s.src/%s,v")) "\ @@ -29900,8 +29994,8 @@ For a description of possible values, see `vc-check-master-templates'.") ;;;*** -;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (21688 62278 418203 -;;;;;; 119000)) +;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (21744 21055 525326 +;;;;;; 515000)) ;;; Generated autoloads from vc/vc-svn.el (defun vc-svn-registered (f) (let ((admin-dir (cond ((and (eq system-type 'windows-nt) @@ -29974,7 +30068,7 @@ Key bindings: ;;;*** ;;;### (autoloads nil "verilog-mode" "progmodes/verilog-mode.el" -;;;;;; (21670 32331 885635 586000)) +;;;;;; (21735 54828 874639 640000)) ;;; Generated autoloads from progmodes/verilog-mode.el (autoload 'verilog-mode "verilog-mode" "\ @@ -30113,8 +30207,8 @@ Key bindings specific to `verilog-mode-map' are: ;;;*** -;;;### (autoloads nil "vhdl-mode" "progmodes/vhdl-mode.el" (21670 -;;;;;; 32331 885635 586000)) +;;;### (autoloads nil "vhdl-mode" "progmodes/vhdl-mode.el" (21735 +;;;;;; 53834 375321 1000)) ;;; Generated autoloads from progmodes/vhdl-mode.el (autoload 'vhdl-mode "vhdl-mode" "\ @@ -30491,7 +30585,7 @@ Usage: VHDL STANDARDS: The VHDL standards to be used are specified in option `vhdl-standard'. - Available standards are: VHDL'87/'93(02), VHDL-AMS, and Math Packages. + Available standards are: VHDL'87/'93(02)/'08, VHDL-AMS, and Math Packages. KEYWORD CASE: @@ -31585,8 +31679,8 @@ Setup current buffer so editing string widgets works. ;;;*** -;;;### (autoloads nil "windmove" "windmove.el" (21670 32331 885635 -;;;;;; 586000)) +;;;### (autoloads nil "windmove" "windmove.el" (21733 50750 334730 +;;;;;; 5000)) ;;; Generated autoloads from windmove.el (autoload 'windmove-left "windmove" "\ @@ -31638,7 +31732,7 @@ Default MODIFIER is 'shift. ;;;*** -;;;### (autoloads nil "winner" "winner.el" (21670 32331 885635 586000)) +;;;### (autoloads nil "winner" "winner.el" (21733 50750 334730 5000)) ;;; Generated autoloads from winner.el (defvar winner-mode nil "\ @@ -31785,8 +31879,8 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT. ;;;*** -;;;### (autoloads nil "xref" "progmodes/xref.el" (21696 56380 925320 -;;;;;; 624000)) +;;;### (autoloads nil "xref" "progmodes/xref.el" (21739 3132 687120 +;;;;;; 143000)) ;;; Generated autoloads from progmodes/xref.el (autoload 'xref-pop-marker-stack "xref" "\ @@ -31835,8 +31929,8 @@ The argument has the same meaning as in `apropos'. ;;;*** -;;;### (autoloads nil "xt-mouse" "xt-mouse.el" (21670 32331 885635 -;;;;;; 586000)) +;;;### (autoloads nil "xt-mouse" "xt-mouse.el" (21779 56495 106033 +;;;;;; 935000)) ;;; Generated autoloads from xt-mouse.el (defvar xterm-mouse-mode nil "\ @@ -31863,18 +31957,6 @@ down the SHIFT key while pressing the mouse button. \(fn &optional ARG)" t nil) -;;;*** - -;;;### (autoloads nil "xwidget" "xwidget.el" (21710 2878 794621 967000)) -;;; Generated autoloads from xwidget.el - -(autoload 'xwidget-webkit-browse-url "xwidget" "\ -Ask xwidget-webkit to browse URL. -NEW-SESSION specifies whether to create a new xwidget-webkit session. URL -defaults to the string looking like a url around the cursor position. - -\(fn URL &optional NEW-SESSION)" t nil) - ;;;*** ;;;### (autoloads nil "yenc" "gnus/yenc.el" (21670 32331 385639 720000)) @@ -31908,37 +31990,37 @@ Zone out, completely. ;;;;;; "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el" ;;;;;; "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el" ;;;;;; "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el" -;;;;;; "calc/calc-macs.el" "calc/calc-map.el" "calc/calc-math.el" -;;;;;; "calc/calc-menu.el" "calc/calc-misc.el" "calc/calc-mode.el" -;;;;;; "calc/calc-mtx.el" "calc/calc-nlfit.el" "calc/calc-poly.el" -;;;;;; "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el" -;;;;;; "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el" -;;;;;; "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-units.el" -;;;;;; "calc/calc-vec.el" "calc/calc-yank.el" "calc/calcalg2.el" -;;;;;; "calc/calcalg3.el" "calc/calccomp.el" "calc/calcsel2.el" -;;;;;; "calendar/cal-bahai.el" "calendar/cal-coptic.el" "calendar/cal-french.el" -;;;;;; "calendar/cal-html.el" "calendar/cal-islam.el" "calendar/cal-iso.el" -;;;;;; "calendar/cal-julian.el" "calendar/cal-loaddefs.el" "calendar/cal-mayan.el" -;;;;;; "calendar/cal-menu.el" "calendar/cal-move.el" "calendar/cal-persia.el" -;;;;;; "calendar/cal-tex.el" "calendar/cal-x.el" "calendar/diary-loaddefs.el" -;;;;;; "calendar/hol-loaddefs.el" "cdl.el" "cedet/cedet-cscope.el" -;;;;;; "cedet/cedet-files.el" "cedet/cedet-global.el" "cedet/cedet-idutils.el" -;;;;;; "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" "cedet/ede/base.el" -;;;;;; "cedet/ede/config.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el" -;;;;;; "cedet/ede/detect.el" "cedet/ede/dired.el" "cedet/ede/emacs.el" -;;;;;; "cedet/ede/files.el" "cedet/ede/generic.el" "cedet/ede/linux.el" -;;;;;; "cedet/ede/locate.el" "cedet/ede/make.el" "cedet/ede/makefile-edit.el" -;;;;;; "cedet/ede/pconf.el" "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" -;;;;;; "cedet/ede/proj-aux.el" "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" -;;;;;; "cedet/ede/proj-info.el" "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" -;;;;;; "cedet/ede/proj-prog.el" "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" -;;;;;; "cedet/ede/proj.el" "cedet/ede/project-am.el" "cedet/ede/shell.el" -;;;;;; "cedet/ede/simple.el" "cedet/ede/source.el" "cedet/ede/speedbar.el" -;;;;;; "cedet/ede/srecode.el" "cedet/ede/system.el" "cedet/ede/util.el" -;;;;;; "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el" -;;;;;; "cedet/semantic/analyze/debug.el" "cedet/semantic/analyze/fcn.el" -;;;;;; "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el" -;;;;;; "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el" +;;;;;; "calc/calc-loaddefs.el" "calc/calc-macs.el" "calc/calc-map.el" +;;;;;; "calc/calc-math.el" "calc/calc-menu.el" "calc/calc-misc.el" +;;;;;; "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-nlfit.el" +;;;;;; "calc/calc-poly.el" "calc/calc-prog.el" "calc/calc-rewr.el" +;;;;;; "calc/calc-rules.el" "calc/calc-sel.el" "calc/calc-stat.el" +;;;;;; "calc/calc-store.el" "calc/calc-stuff.el" "calc/calc-trail.el" +;;;;;; "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el" +;;;;;; "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el" +;;;;;; "calc/calcsel2.el" "calendar/cal-bahai.el" "calendar/cal-coptic.el" +;;;;;; "calendar/cal-french.el" "calendar/cal-html.el" "calendar/cal-islam.el" +;;;;;; "calendar/cal-iso.el" "calendar/cal-julian.el" "calendar/cal-loaddefs.el" +;;;;;; "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el" +;;;;;; "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el" +;;;;;; "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "cdl.el" +;;;;;; "cedet/cedet-cscope.el" "cedet/cedet-files.el" "cedet/cedet-global.el" +;;;;;; "cedet/cedet-idutils.el" "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" +;;;;;; "cedet/ede/base.el" "cedet/ede/config.el" "cedet/ede/cpp-root.el" +;;;;;; "cedet/ede/custom.el" "cedet/ede/detect.el" "cedet/ede/dired.el" +;;;;;; "cedet/ede/emacs.el" "cedet/ede/files.el" "cedet/ede/generic.el" +;;;;;; "cedet/ede/linux.el" "cedet/ede/loaddefs.el" "cedet/ede/locate.el" +;;;;;; "cedet/ede/make.el" "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el" +;;;;;; "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el" +;;;;;; "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el" +;;;;;; "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el" +;;;;;; "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" "cedet/ede/proj.el" +;;;;;; "cedet/ede/project-am.el" "cedet/ede/shell.el" "cedet/ede/simple.el" +;;;;;; "cedet/ede/source.el" "cedet/ede/speedbar.el" "cedet/ede/srecode.el" +;;;;;; "cedet/ede/system.el" "cedet/ede/util.el" "cedet/semantic/analyze.el" +;;;;;; "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/debug.el" +;;;;;; "cedet/semantic/analyze/fcn.el" "cedet/semantic/analyze/refs.el" +;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el" ;;;;;; "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el" ;;;;;; "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm.el" ;;;;;; "cedet/semantic/chart.el" "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" @@ -31953,13 +32035,13 @@ Zone out, completely. ;;;;;; "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el" ;;;;;; "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el" ;;;;;; "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el" -;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el" -;;;;;; "cedet/semantic/sb.el" "cedet/semantic/scope.el" "cedet/semantic/senator.el" -;;;;;; "cedet/semantic/sort.el" "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el" -;;;;;; "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el" -;;;;;; "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el" -;;;;;; "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el" -;;;;;; "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" +;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/loaddefs.el" +;;;;;; "cedet/semantic/mru-bookmark.el" "cedet/semantic/sb.el" "cedet/semantic/scope.el" +;;;;;; "cedet/semantic/senator.el" "cedet/semantic/sort.el" "cedet/semantic/symref.el" +;;;;;; "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/filter.el" +;;;;;; "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el" +;;;;;; "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el" +;;;;;; "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" ;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el" ;;;;;; "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el" ;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el" @@ -31969,19 +32051,19 @@ Zone out, completely. ;;;;;; "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el" ;;;;;; "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el" ;;;;;; "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el" -;;;;;; "cedet/srecode/map.el" "cedet/srecode/mode.el" "cedet/srecode/semantic.el" -;;;;;; "cedet/srecode/srt.el" "cedet/srecode/table.el" "cedet/srecode/template.el" -;;;;;; "cedet/srecode/texi.el" "cus-dep.el" "dframe.el" "dired-aux.el" -;;;;;; "dired-x.el" "dom.el" "dos-fns.el" "dos-vars.el" "dos-w32.el" -;;;;;; "dynamic-setting.el" "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" -;;;;;; "emacs-lisp/byte-opt.el" "emacs-lisp/cl-extra.el" "emacs-lisp/cl-generic.el" -;;;;;; "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" "emacs-lisp/cl.el" -;;;;;; "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-compat.el" "emacs-lisp/eieio-custom.el" +;;;;;; "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el" +;;;;;; "cedet/srecode/semantic.el" "cedet/srecode/srt.el" "cedet/srecode/table.el" +;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el" +;;;;;; "dframe.el" "dired-aux.el" "dired-x.el" "dom.el" "dos-fns.el" +;;;;;; "dos-vars.el" "dos-w32.el" "dynamic-setting.el" "emacs-lisp/avl-tree.el" +;;;;;; "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" "emacs-lisp/cl-extra.el" +;;;;;; "emacs-lisp/cl-generic.el" "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" +;;;;;; "emacs-lisp/cl-seq.el" "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" +;;;;;; "emacs-lisp/eieio-compat.el" "emacs-lisp/eieio-custom.el" ;;;;;; "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-opt.el" -;;;;;; "emacs-lisp/eieio-speedbar.el" "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" -;;;;;; "emacs-lisp/smie.el" "emacs-lisp/subr-x.el" "emacs-lisp/tcover-ses.el" -;;;;;; "emacs-lisp/tcover-unsafep.el" "emacs-parallel/parallel-remote.el" -;;;;;; "emacs-parallel/parallel-xwidget.el" "emacs-parallel/parallel.el" +;;;;;; "emacs-lisp/eieio-speedbar.el" "emacs-lisp/generator.el" +;;;;;; "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" "emacs-lisp/smie.el" +;;;;;; "emacs-lisp/subr-x.el" "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el" ;;;;;; "emulation/cua-gmrk.el" "emulation/edt-lk201.el" "emulation/edt-mapper.el" ;;;;;; "emulation/edt-pc.el" "emulation/edt-vt100.el" "emulation/viper-cmd.el" ;;;;;; "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el" @@ -31994,10 +32076,10 @@ Zone out, completely. ;;;;;; "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el" ;;;;;; "eshell/em-tramp.el" "eshell/em-unix.el" "eshell/em-xtra.el" ;;;;;; "eshell/esh-arg.el" "eshell/esh-cmd.el" "eshell/esh-ext.el" -;;;;;; "eshell/esh-io.el" "eshell/esh-module.el" "eshell/esh-opt.el" -;;;;;; "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el" -;;;;;; "ezimage.el" "format-spec.el" "fringe.el" "generic-x.el" -;;;;;; "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el" +;;;;;; "eshell/esh-groups.el" "eshell/esh-io.el" "eshell/esh-module.el" +;;;;;; "eshell/esh-opt.el" "eshell/esh-proc.el" "eshell/esh-util.el" +;;;;;; "eshell/esh-var.el" "ezimage.el" "format-spec.el" "fringe.el" +;;;;;; "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el" ;;;;;; "gnus/gnus-cite.el" "gnus/gnus-cloud.el" "gnus/gnus-cus.el" ;;;;;; "gnus/gnus-demon.el" "gnus/gnus-dup.el" "gnus/gnus-eform.el" ;;;;;; "gnus/gnus-ems.el" "gnus/gnus-icalendar.el" "gnus/gnus-int.el" @@ -32015,11 +32097,10 @@ Zone out, completely. ;;;;;; "gnus/nnmh.el" "gnus/nnnil.el" "gnus/nnoo.el" "gnus/nnregistry.el" ;;;;;; "gnus/nnrss.el" "gnus/nnspool.el" "gnus/nntp.el" "gnus/nnvirtual.el" ;;;;;; "gnus/nnweb.el" "gnus/registry.el" "gnus/rfc1843.el" "gnus/rfc2045.el" -;;;;;; "gnus/rfc2047.el" "gnus/rfc2104.el" "gnus/rfc2231.el" "gnus/rtree.el" -;;;;;; "gnus/sieve-manage.el" "gnus/smime.el" "gnus/spam-stat.el" -;;;;;; "gnus/spam-wash.el" "hex-util.el" "hfy-cmap.el" "ibuf-ext.el" -;;;;;; "international/cp51932.el" "international/eucjp-ms.el" "international/fontset.el" -;;;;;; "international/iso-ascii.el" "international/ja-dic-cnv.el" +;;;;;; "gnus/rfc2047.el" "gnus/rfc2231.el" "gnus/rtree.el" "gnus/sieve-manage.el" +;;;;;; "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el" +;;;;;; "hfy-cmap.el" "ibuf-ext.el" "international/cp51932.el" "international/eucjp-ms.el" +;;;;;; "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el" ;;;;;; "international/ja-dic-utl.el" "international/ogonek.el" "kermit.el" ;;;;;; "language/hanja-util.el" "language/thai-word.el" "ldefs-boot.el" ;;;;;; "leim/quail/arabic.el" "leim/quail/croatian.el" "leim/quail/cyril-jis.el" @@ -32049,45 +32130,45 @@ Zone out, completely. ;;;;;; "net/dns.el" "net/eudc-vars.el" "net/eudcb-bbdb.el" "net/eudcb-ldap.el" ;;;;;; "net/eudcb-mab.el" "net/eudcb-ph.el" "net/hmac-def.el" "net/hmac-md5.el" ;;;;;; "net/imap.el" "net/ldap.el" "net/mairix.el" "net/newsticker.el" -;;;;;; "net/nsm.el" "net/sasl-cram.el" "net/sasl-digest.el" "net/sasl.el" -;;;;;; "net/shr-color.el" "net/soap-client.el" "net/soap-inspect.el" -;;;;;; "net/socks.el" "net/tls.el" "net/tramp-adb.el" "net/tramp-cache.el" -;;;;;; "net/tramp-cmds.el" "net/tramp-compat.el" "net/tramp-gvfs.el" -;;;;;; "net/tramp-gw.el" "net/tramp-loaddefs.el" "net/tramp-sh.el" -;;;;;; "net/tramp-smb.el" "net/tramp-uu.el" "net/trampver.el" "net/zeroconf.el" -;;;;;; "notifications.el" "nxml/nxml-enc.el" "nxml/nxml-maint.el" -;;;;;; "nxml/nxml-ns.el" "nxml/nxml-outln.el" "nxml/nxml-parse.el" -;;;;;; "nxml/nxml-rap.el" "nxml/nxml-util.el" "nxml/rng-dt.el" "nxml/rng-loc.el" -;;;;;; "nxml/rng-maint.el" "nxml/rng-match.el" "nxml/rng-parse.el" -;;;;;; "nxml/rng-pttrn.el" "nxml/rng-uri.el" "nxml/rng-util.el" -;;;;;; "nxml/xsd-regexp.el" "org/ob-C.el" "org/ob-R.el" "org/ob-asymptote.el" -;;;;;; "org/ob-awk.el" "org/ob-calc.el" "org/ob-clojure.el" "org/ob-comint.el" -;;;;;; "org/ob-core.el" "org/ob-css.el" "org/ob-ditaa.el" "org/ob-dot.el" -;;;;;; "org/ob-emacs-lisp.el" "org/ob-eval.el" "org/ob-exp.el" "org/ob-fortran.el" -;;;;;; "org/ob-gnuplot.el" "org/ob-haskell.el" "org/ob-io.el" "org/ob-java.el" -;;;;;; "org/ob-js.el" "org/ob-keys.el" "org/ob-latex.el" "org/ob-ledger.el" -;;;;;; "org/ob-lilypond.el" "org/ob-lisp.el" "org/ob-lob.el" "org/ob-makefile.el" -;;;;;; "org/ob-matlab.el" "org/ob-maxima.el" "org/ob-mscgen.el" -;;;;;; "org/ob-ocaml.el" "org/ob-octave.el" "org/ob-org.el" "org/ob-perl.el" -;;;;;; "org/ob-picolisp.el" "org/ob-plantuml.el" "org/ob-python.el" -;;;;;; "org/ob-ref.el" "org/ob-ruby.el" "org/ob-sass.el" "org/ob-scala.el" -;;;;;; "org/ob-scheme.el" "org/ob-screen.el" "org/ob-sh.el" "org/ob-shen.el" -;;;;;; "org/ob-sql.el" "org/ob-sqlite.el" "org/ob-table.el" "org/ob-tangle.el" -;;;;;; "org/ob.el" "org/org-archive.el" "org/org-attach.el" "org/org-bbdb.el" -;;;;;; "org/org-bibtex.el" "org/org-clock.el" "org/org-crypt.el" -;;;;;; "org/org-ctags.el" "org/org-datetree.el" "org/org-docview.el" -;;;;;; "org/org-element.el" "org/org-entities.el" "org/org-eshell.el" -;;;;;; "org/org-faces.el" "org/org-feed.el" "org/org-footnote.el" -;;;;;; "org/org-gnus.el" "org/org-habit.el" "org/org-id.el" "org/org-indent.el" -;;;;;; "org/org-info.el" "org/org-inlinetask.el" "org/org-install.el" -;;;;;; "org/org-irc.el" "org/org-list.el" "org/org-macro.el" "org/org-mhe.el" -;;;;;; "org/org-mobile.el" "org/org-mouse.el" "org/org-pcomplete.el" -;;;;;; "org/org-plot.el" "org/org-protocol.el" "org/org-rmail.el" -;;;;;; "org/org-src.el" "org/org-table.el" "org/org-timer.el" "org/org-w3m.el" -;;;;;; "org/ox-ascii.el" "org/ox-beamer.el" "org/ox-html.el" "org/ox-icalendar.el" -;;;;;; "org/ox-latex.el" "org/ox-man.el" "org/ox-md.el" "org/ox-odt.el" -;;;;;; "org/ox-org.el" "org/ox-publish.el" "org/ox-texinfo.el" "org/ox.el" -;;;;;; "play/gametree.el" "progmodes/ada-prj.el" "progmodes/cc-align.el" +;;;;;; "net/nsm.el" "net/rfc2104.el" "net/sasl-cram.el" "net/sasl-digest.el" +;;;;;; "net/sasl-scram-rfc.el" "net/sasl.el" "net/shr-color.el" +;;;;;; "net/soap-client.el" "net/soap-inspect.el" "net/socks.el" +;;;;;; "net/tls.el" "net/tramp-adb.el" "net/tramp-cache.el" "net/tramp-cmds.el" +;;;;;; "net/tramp-compat.el" "net/tramp-gvfs.el" "net/tramp-gw.el" +;;;;;; "net/tramp-loaddefs.el" "net/tramp-sh.el" "net/tramp-smb.el" +;;;;;; "net/tramp-uu.el" "net/trampver.el" "net/zeroconf.el" "notifications.el" +;;;;;; "nxml/nxml-enc.el" "nxml/nxml-maint.el" "nxml/nxml-ns.el" +;;;;;; "nxml/nxml-outln.el" "nxml/nxml-parse.el" "nxml/nxml-rap.el" +;;;;;; "nxml/nxml-util.el" "nxml/rng-dt.el" "nxml/rng-loc.el" "nxml/rng-maint.el" +;;;;;; "nxml/rng-match.el" "nxml/rng-parse.el" "nxml/rng-pttrn.el" +;;;;;; "nxml/rng-uri.el" "nxml/rng-util.el" "nxml/xsd-regexp.el" +;;;;;; "org/ob-C.el" "org/ob-R.el" "org/ob-asymptote.el" "org/ob-awk.el" +;;;;;; "org/ob-calc.el" "org/ob-clojure.el" "org/ob-comint.el" "org/ob-core.el" +;;;;;; "org/ob-css.el" "org/ob-ditaa.el" "org/ob-dot.el" "org/ob-emacs-lisp.el" +;;;;;; "org/ob-eval.el" "org/ob-exp.el" "org/ob-fortran.el" "org/ob-gnuplot.el" +;;;;;; "org/ob-haskell.el" "org/ob-io.el" "org/ob-java.el" "org/ob-js.el" +;;;;;; "org/ob-keys.el" "org/ob-latex.el" "org/ob-ledger.el" "org/ob-lilypond.el" +;;;;;; "org/ob-lisp.el" "org/ob-lob.el" "org/ob-makefile.el" "org/ob-matlab.el" +;;;;;; "org/ob-maxima.el" "org/ob-mscgen.el" "org/ob-ocaml.el" "org/ob-octave.el" +;;;;;; "org/ob-org.el" "org/ob-perl.el" "org/ob-picolisp.el" "org/ob-plantuml.el" +;;;;;; "org/ob-python.el" "org/ob-ref.el" "org/ob-ruby.el" "org/ob-sass.el" +;;;;;; "org/ob-scala.el" "org/ob-scheme.el" "org/ob-screen.el" "org/ob-sh.el" +;;;;;; "org/ob-shen.el" "org/ob-sql.el" "org/ob-sqlite.el" "org/ob-table.el" +;;;;;; "org/ob-tangle.el" "org/ob.el" "org/org-archive.el" "org/org-attach.el" +;;;;;; "org/org-bbdb.el" "org/org-bibtex.el" "org/org-clock.el" +;;;;;; "org/org-crypt.el" "org/org-ctags.el" "org/org-datetree.el" +;;;;;; "org/org-docview.el" "org/org-element.el" "org/org-entities.el" +;;;;;; "org/org-eshell.el" "org/org-faces.el" "org/org-feed.el" +;;;;;; "org/org-footnote.el" "org/org-gnus.el" "org/org-habit.el" +;;;;;; "org/org-id.el" "org/org-indent.el" "org/org-info.el" "org/org-inlinetask.el" +;;;;;; "org/org-install.el" "org/org-irc.el" "org/org-list.el" "org/org-loaddefs.el" +;;;;;; "org/org-macro.el" "org/org-mhe.el" "org/org-mobile.el" "org/org-mouse.el" +;;;;;; "org/org-pcomplete.el" "org/org-plot.el" "org/org-protocol.el" +;;;;;; "org/org-rmail.el" "org/org-src.el" "org/org-table.el" "org/org-timer.el" +;;;;;; "org/org-w3m.el" "org/ox-ascii.el" "org/ox-beamer.el" "org/ox-html.el" +;;;;;; "org/ox-icalendar.el" "org/ox-latex.el" "org/ox-man.el" "org/ox-md.el" +;;;;;; "org/ox-odt.el" "org/ox-org.el" "org/ox-publish.el" "org/ox-texinfo.el" +;;;;;; "org/ox.el" "play/gametree.el" "progmodes/ada-prj.el" "progmodes/cc-align.el" ;;;;;; "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el" "progmodes/cc-cmds.el" ;;;;;; "progmodes/cc-defs.el" "progmodes/cc-fonts.el" "progmodes/cc-langs.el" ;;;;;; "progmodes/cc-menus.el" "progmodes/ebnf-abn.el" "progmodes/ebnf-bnf.el" @@ -32110,8 +32191,8 @@ Zone out, completely. ;;;;;; "vc/ediff-ptch.el" "vc/ediff-vers.el" "vc/ediff-wind.el" ;;;;;; "vc/pcvs-info.el" "vc/pcvs-parse.el" "vc/pcvs-util.el" "vc/vc-dav.el" ;;;;;; "vc/vc-filewise.el" "vcursor.el" "vt-control.el" "vt100-led.el" -;;;;;; "w32-fns.el" "w32-vars.el" "x-dnd.el") (21710 3276 42011 -;;;;;; 943000)) +;;;;;; "w32-fns.el" "w32-vars.el" "x-dnd.el") (21787 50860 126301 +;;;;;; 167000)) ;;;*** diff --git a/lisp/leim/quail/hangul.el b/lisp/leim/quail/hangul.el index 243fa04257..12d7358841 100644 --- a/lisp/leim/quail/hangul.el +++ b/lisp/leim/quail/hangul.el @@ -351,7 +351,7 @@ Other parts are the same as a `hangul3-input-method-cho'." (aset hangul-queue i 0)) (if (notzerop (apply '+ (append hangul-queue nil))) (hangul-insert-character hangul-queue) - (delete-backward-char 1))) + (delete-char -1))) (defun hangul-to-hanja-conversion () "Convert the previous hangul character to the corresponding hanja character. @@ -363,7 +363,7 @@ When a Korean input method is off, convert the following hangul character." (if (and (overlayp quail-overlay) (overlay-start quail-overlay)) (progn (setq hanja-character (hangul-to-hanja-char (preceding-char))) - (setq delete-func (lambda () (delete-backward-char 1)))) + (setq delete-func (lambda () (delete-char -1)))) (setq hanja-character (hangul-to-hanja-char (following-char))) (setq delete-func (lambda () (delete-char 1)))) (when hanja-character diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 790254a631..d150324fc7 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4744,7 +4744,7 @@ With prefix argument N moves forward N messages with these labels. ;;;*** -;;;### (autoloads nil "rmailmm" "rmailmm.el" "43e0b9f680c4d2581640b286bd4b3107") +;;;### (autoloads nil "rmailmm" "rmailmm.el" "a17df5ef8968113c8f6a78cf85c82da4") ;;; Generated autoloads from rmailmm.el (autoload 'rmail-mime "rmailmm" "\ @@ -4841,7 +4841,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order. ;;;*** -;;;### (autoloads nil "rmailsum" "rmailsum.el" "e3943ef45946f10b9b5cab8097d7f271") +;;;### (autoloads nil "rmailsum" "rmailsum.el" "3203e61425330fc20f3154b559f8b539") ;;; Generated autoloads from rmailsum.el (autoload 'rmail-summary "rmailsum" "\ diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 120d517f55..00fc25dd44 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -661,6 +661,7 @@ HEADER is a header component of a MIME-entity object (see (transfer-encoding (rmail-mime-entity-transfer-encoding entity)) (charset (cdr (assq 'charset (cdr (rmail-mime-entity-type entity))))) (buffer (current-buffer)) + (case-fold-search t) coding-system) (if charset (setq coding-system (coding-system-from-name charset))) (or (and coding-system (coding-system-p coding-system)) @@ -674,6 +675,22 @@ HEADER is a header component of a MIME-entity object (see (ignore-errors (base64-decode-region (point-min) (point-max)))) ((string= transfer-encoding "quoted-printable") (quoted-printable-decode-region (point-min) (point-max)))) + ;; Some broken MUAs state the charset only in the HTML , + ;; so if we don't have a non-trivial coding-system at this + ;; point, make one last attempt to find it there. + (if (eq coding-system 'undecided) + (save-excursion + (goto-char (point-min)) + (when (re-search-forward + "^ number 0) (forward-line -1)) @@ -812,17 +812,14 @@ the message being processed." (defun rmail-summary-previous-all (&optional number) (interactive "p") - (forward-line (- (if number number 1))) - ;; It doesn't look nice to move forward past the last message line. - (and (eobp) (< number 0) - (forward-line -1)) - (display-buffer rmail-buffer)) + (rmail-summary-next-all (- (or number 1)))) (defun rmail-summary-next-msg (&optional number) "Display next non-deleted msg from rmail file. With optional prefix argument NUMBER, moves forward this number of non-deleted messages, or backward if NUMBER is negative." (interactive "p") + (or number (setq number 1)) (forward-line 0) (and (> number 0) (end-of-line)) (let ((count (if (< number 0) (- number) number)) @@ -840,7 +837,7 @@ messages, or backward if NUMBER is negative." With optional prefix argument NUMBER, moves backward this number of non-deleted messages." (interactive "p") - (rmail-summary-next-msg (- (if number number 1)))) + (rmail-summary-next-msg (- (or number 1)))) (defun rmail-summary-next-labeled-message (n labels) "Show next message with LABELS. Defaults to last labels used. diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 7e9bd5bca2..9fa7aa5a6f 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -1299,10 +1299,10 @@ external program defined by `sendmail-program'." (error "Sending...failed to %s" (buffer-substring (point-min) (point-max))))))) (kill-buffer tembuf) - (if (and (bufferp errbuf) - (not error)) - (kill-buffer errbuf) - (switch-to-buffer-other-window errbuf))))) + (when (buffer-live-p errbuf) + (if error + (switch-to-buffer-other-window errbuf) + (kill-buffer errbuf)))))) (autoload 'rmail-output-to-rmail-buffer "rmailout") diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index cd1a4d05b5..2ace3162c9 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1747,12 +1747,14 @@ The menu frame is the frame for which we are updating the menu." (frame-visible-p menu-frame)))) (defun menu-bar-non-minibuffer-window-p () - "Return non-nil if selected window of the menu frame is not a minibuf window. - -See the documentation of `menu-bar-menu-frame-live-and-visible-p' -for the definition of the menu frame." + "Return non-nil if the menu frame's selected window is no minibuffer window. +Return nil if the menu frame is dead or its selected window is a +minibuffer window. The menu frame is the frame for which we are +updating the menu." (let ((menu-frame (or menu-updating-frame (selected-frame)))) - (not (window-minibuffer-p (frame-selected-window menu-frame))))) + (and (frame-live-p menu-frame) + (not (window-minibuffer-p + (frame-selected-window menu-frame)))))) (defun kill-this-buffer () ; for the menu bar "Kill the current buffer. @@ -1947,20 +1949,20 @@ It must accept a buffer as its only required argument.") (let ((buffers (buffer-list)) (frames (frame-list)) buffers-menu) - ;; If requested, list only the N most recently selected buffers. - (if (and (integerp buffers-menu-max-size) - (> buffers-menu-max-size 1)) - (if (> (length buffers) buffers-menu-max-size) - (setcdr (nthcdr buffers-menu-max-size buffers) nil))) ;; Make the menu of buffers proper. (setq buffers-menu - (let (alist) + (let ((i 0) + (limit (if (and (integerp buffers-menu-max-size) + (> buffers-menu-max-size 1)) + buffers-menu-max-size most-positive-fixnum)) + alist) ;; Put into each element of buffer-list ;; the name for actual display, ;; perhaps truncated in the middle. - (dolist (buf buffers) - (let ((name (buffer-name buf))) + (while buffers + (let* ((buf (pop buffers)) + (name (buffer-name buf))) (unless (eq ?\s (aref name 0)) (push (menu-bar-update-buffers-1 (cons buf @@ -1974,7 +1976,11 @@ It must accept a buffer as its only required argument.") name (- (/ buffers-menu-buffer-name-length 2)))) name) )) - alist)))) + alist) + ;; If requested, list only the N most recently + ;; selected buffers. + (when (= limit (setq i (1+ i))) + (setq buffers nil))))) (list (menu-bar-buffer-vector alist)))) ;; Make a Frames menu if we have more than one frame. diff --git a/lisp/misearch.el b/lisp/misearch.el index dcc819564f..65969113d9 100644 --- a/lisp/misearch.el +++ b/lisp/misearch.el @@ -234,7 +234,7 @@ set in `multi-isearch-buffers' or `multi-isearch-buffers-regexp'." (ido-ignore-item-temp-list bufs)) (while (not (string-equal (setq buf (read-buffer - (if (eq read-buffer-function 'ido-read-buffer) + (if (eq read-buffer-function #'ido-read-buffer) "Next buffer to search (C-j to end): " "Next buffer to search (RET to end): ") nil t)) @@ -377,6 +377,8 @@ whose file names match the specified wildcard." (goto-char (if isearch-forward (point-min) (point-max))) (isearch-forward-regexp nil t))) +(defvar unload-function-defs-list) + (defun multi-isearch-unload-function () "Remove autoloaded variables from `unload-function-defs-list'. Also prevent the feature from being reloaded via `isearch-mode-hook'." diff --git a/lisp/mouse.el b/lisp/mouse.el index e78eca40bc..5f3fa5d769 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -486,9 +486,10 @@ must be one of the symbols `header', `mode', or `vertical'." `(menu-item "" ,(lambda () (interactive) (funcall exitfun)) :filter ,(lambda (cmd) (if dragged cmd))))) ;; Some of the events will of course end up looked up - ;; with a mode-line or header-line prefix ... + ;; with a mode-line, header-line or vertical-line prefix ... (define-key map [mode-line] map) (define-key map [header-line] map) + (define-key map [vertical-line] map) ;; ... and some maybe even with a right- or bottom-divider ;; prefix. (define-key map [right-divider] map) @@ -1801,6 +1802,8 @@ choose a font." (declare-function buffer-face-mode-invoke "face-remap" (face arg &optional interactive)) (declare-function font-face-attributes "font.c" (font &optional frame)) +(defvar w32-use-w32-font-dialog) +(defvar w32-fixed-font-alist) (defun mouse-appearance-menu (event) "Show a menu for changing the default face in the current buffer." @@ -1820,13 +1823,18 @@ choose a font." (define-key mouse-appearance-menu-map [text-scale-increase] '(menu-item "Increase Buffer Text Size" text-scale-increase)) ;; Font selector - (if (functionp 'x-select-font) + (if (and (functionp 'x-select-font) + (or (not (boundp 'w32-use-w32-font-dialog)) + w32-use-w32-font-dialog)) (define-key mouse-appearance-menu-map [x-select-font] '(menu-item "Change Buffer Font..." x-select-font)) ;; If the select-font is unavailable, construct a menu. (let ((font-submenu (make-sparse-keymap "Change Text Font")) - (font-alist (cdr (append x-fixed-font-alist - (list (generate-fontset-menu)))))) + (font-alist (cdr (append + (if (eq system-type 'windows-nt) + w32-fixed-font-alist + x-fixed-font-alist) + (list (generate-fontset-menu)))))) (dolist (family font-alist) (let* ((submenu-name (car family)) (submenu-map (make-sparse-keymap submenu-name))) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index e21a4c201f..933d292ddf 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -31,88 +31,32 @@ ;; different methods of remote control so there is one function for ;; each supported browser. If the chosen browser is not running, it ;; is started. Currently there is support for the following browsers, -;; some of them probably now obsolete: +;; as well as some other obsolete ones: ;; Function Browser Earliest version ;; browse-url-mozilla Mozilla Don't know ;; browse-url-firefox Firefox Don't know (tried with 1.0.1) ;; browse-url-chromium Chromium 3.0 -;; browse-url-galeon Galeon Don't know ;; browse-url-epiphany Epiphany Don't know -;; browse-url-netscape Netscape 1.1b1 -;; browse-url-mosaic XMosaic/mMosaic <= 2.4 -;; browse-url-cci XMosaic 2.5 +;; browse-url-conkeror Conkeror Don't know ;; browse-url-w3 w3 0 -;; browse-url-w3-gnudoit w3 remotely ;; browse-url-text-* Any text browser 0 ;; browse-url-generic arbitrary ;; browse-url-default-windows-browser MS-Windows browser ;; browse-url-default-macosx-browser Mac OS X browser ;; browse-url-xdg-open Free Desktop xdg-open on Gnome, KDE, Xfce4, LXDE -;; browse-url-gnome-moz GNOME interface to Mozilla ;; browse-url-kde KDE konqueror (kfm) ;; browse-url-elinks Elinks Don't know (tried with 0.12.GIT) -;; [A version of the Netscape browser is now free software -;; , albeit not GPLed, so it is -;; reasonable to have that as the default.] - -;; Note that versions of Netscape before 1.1b1 did not have remote -;; control. . - ;; Browsers can cache Web pages so it may be necessary to tell them to -;; reload the current page if it has changed (e.g. if you have edited +;; reload the current page if it has changed (e.g., if you have edited ;; it). There is currently no perfect automatic solution to this. -;; Netscape allows you to specify the id of the window you want to -;; control but which window DO you want to control and how do you -;; discover its id? - -;; William M. Perry's excellent "w3" WWW browser for -;; Emacs -;; has a function w3-follow-url-at-point, but that -;; doesn't let you edit the URL like browse-url. -;; The `gnuserv' package that can be used to control it in another -;; Emacs process is available from -;; . - -;; Lynx is now distributed by the FSF. See also -;; . - -;; Free graphical browsers that could be used by `browse-url-generic' -;; include Chimera and -;; , Arena -;; and Amaya -;; . mMosaic -;; , -;; (with development -;; support for Java applets and multicast) can be used like Mosaic by -;; setting `browse-url-mosaic-program' appropriately. - -;; I [Denis Howe, not Dave Love] recommend Nelson Minar -;; 's excellent html-helper-mode.el for editing -;; HTML and thank Nelson for his many useful comments on this code. -;; - -;; See also hm--html-menus . For composing correct HTML see also -;; PSGML the general SGML structure editor package -;; ; hm--html-menus can be used -;; with this. - ;; This package generalizes function html-previewer-process in Marc ;; Andreessen's html-mode (LCD modes/html-mode.el.Z). See also the ;; ffap.el package. The huge hyperbole package also contains similar ;; functions. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Help! - -;; Can you write and test some code for the Macintrash and Windoze -;; Netscape remote control APIs? (See the URL above). - -;; Do any other browsers have remote control? - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Usage @@ -169,34 +113,9 @@ ;; To always save modified buffers before displaying the file in a browser: ;; (setq browse-url-save-file t) -;; To get round the Netscape caching problem, you could EITHER have -;; write-file in html-helper-mode make Netscape reload the document: -;; -;; (autoload 'browse-url-netscape-reload "browse-url" -;; "Ask a WWW browser to redisplay the current file." t) -;; (add-hook 'html-helper-mode-hook -;; (lambda () -;; (add-hook 'local-write-file-hooks -;; (lambda () -;; (let ((local-write-file-hooks)) -;; (save-buffer)) -;; (browse-url-netscape-reload) -;; t) ; => file written by hook -;; t))) ; append to l-w-f-hooks -;; -;; OR have browse-url-of-file ask Netscape to load and then reload the -;; file: -;; -;; (add-hook 'browse-url-of-file-hook 'browse-url-netscape-reload) - -;; You may also want to customize browse-url-netscape-arguments, e.g. -;; (setq browse-url-netscape-arguments '("-install")) -;; -;; or similarly for the other browsers. - ;; To invoke different browsers for different URLs: ;; (setq browse-url-browser-function '(("^mailto:" . browse-url-mail) -;; ("." . browse-url-netscape))) +;; ("." . browse-url-firefox))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Code: @@ -225,17 +144,12 @@ function is passed the URL and any other args of `browse-url'. The last regexp should probably be \".\" to specify a default browser." :type '(choice (function-item :tag "Emacs W3" :value browse-url-w3) - (function-item :tag "W3 in another Emacs via `gnudoit'" - :value browse-url-w3-gnudoit) (function-item :tag "eww" :value eww-browse-url) (function-item :tag "Mozilla" :value browse-url-mozilla) (function-item :tag "Firefox" :value browse-url-firefox) (function-item :tag "Chromium" :value browse-url-chromium) - (function-item :tag "Galeon" :value browse-url-galeon) (function-item :tag "Epiphany" :value browse-url-epiphany) - (function-item :tag "Netscape" :value browse-url-netscape) - (function-item :tag "Mosaic" :value browse-url-mosaic) - (function-item :tag "Mosaic using CCI" :value browse-url-cci) + (function-item :tag "Conkeror" :value browse-url-conkeror) (function-item :tag "Text browser in an xterm window" :value browse-url-text-xterm) (function-item :tag "Text browser in an Emacs window" @@ -248,8 +162,6 @@ regexp should probably be \".\" to specify a default browser." :value browse-url-default-windows-browser) (function-item :tag "Default Mac OS X browser" :value browse-url-default-macosx-browser) - (function-item :tag "GNOME invoking Mozilla" - :value browse-url-gnome-moz) (function-item :tag "Default browser" :value browse-url-default-browser) (function :tag "Your own function") @@ -282,18 +194,25 @@ system, given vroot.h from the same directory, with cc flags :type 'string :group 'browse-url) +(make-obsolete-variable 'browse-url-netscape-program nil "25.1") + (defcustom browse-url-netscape-arguments nil "A list of strings to pass to Netscape as arguments." :type '(repeat (string :tag "Argument")) :group 'browse-url) +(make-obsolete-variable 'browse-url-netscape-arguments nil "25.1") + (defcustom browse-url-netscape-startup-arguments browse-url-netscape-arguments "A list of strings to pass to Netscape when it starts up. Defaults to the value of `browse-url-netscape-arguments' at the time `browse-url' is loaded." :type '(repeat (string :tag "Argument")) + :group 'browse-url) +(make-obsolete-variable 'browse-url-netscape-startup-arguments nil "25.1") + (defcustom browse-url-browser-display nil "The X display for running the browser, if not same as Emacs's." :type '(choice string (const :tag "Default" nil)) @@ -337,6 +256,9 @@ Defaults to the value of `browse-url-firefox-arguments' at the time :type '(repeat (string :tag "Argument")) :group 'browse-url) +(make-obsolete-variable 'browse-url-firefox-startup-arguments + "it no longer has any effect." "24.5") + (defcustom browse-url-chromium-program (let ((candidates '("chromium" "chromium-browser"))) (while (and candidates (not (executable-find (car candidates)))) @@ -358,11 +280,15 @@ Defaults to the value of `browse-url-firefox-arguments' at the time :type 'string :group 'browse-url) +(make-obsolete-variable 'browse-url-galeon-program nil "25.1") + (defcustom browse-url-galeon-arguments nil "A list of strings to pass to Galeon as arguments." :type '(repeat (string :tag "Argument")) :group 'browse-url) +(make-obsolete-variable 'browse-url-galeon-arguments nil "25.1") + (defcustom browse-url-galeon-startup-arguments browse-url-galeon-arguments "A list of strings to pass to Galeon when it starts up. Defaults to the value of `browse-url-galeon-arguments' at the time @@ -370,6 +296,8 @@ Defaults to the value of `browse-url-galeon-arguments' at the time :type '(repeat (string :tag "Argument")) :group 'browse-url) +(make-obsolete-variable 'browse-url-galeon-startup-arguments nil "25.1") + (defcustom browse-url-epiphany-program "epiphany" "The name by which to invoke Epiphany." :type 'string @@ -390,12 +318,16 @@ Defaults to the value of `browse-url-epiphany-arguments' at the time ;; GNOME means of invoking either Mozilla or Netscape. (defvar browse-url-gnome-moz-program "gnome-moz-remote") +(make-obsolete-variable 'browse-url-gnome-moz-program nil "25.1") + (defcustom browse-url-gnome-moz-arguments '() "A list of strings passed to the GNOME mozilla viewer as arguments." :version "21.1" :type '(repeat (string :tag "Argument")) :group 'browse-url) +(make-obsolete-variable 'browse-url-gnome-moz-arguments nil "25.1") + (defcustom browse-url-mozilla-new-window-is-tab nil "Whether to open up new windows in a tab or a new window. If non-nil, then open the URL in a new tab rather than a new window if @@ -413,6 +345,13 @@ functionality is not available there." :type 'boolean :group 'browse-url) +(defcustom browse-url-conkeror-new-window-is-buffer nil + "Whether to open up new windows in a buffer or a new window. +If non-nil, then open the URL in a new buffer rather than a new window if +`browse-url-conkeror' is asked to open it in a new window." + :type 'boolean + :group 'browse-url) + (defcustom browse-url-galeon-new-window-is-tab nil "Whether to open up new windows in a tab or a new window. If non-nil, then open the URL in a new tab rather than a new window if @@ -420,6 +359,8 @@ If non-nil, then open the URL in a new tab rather than a new window if :type 'boolean :group 'browse-url) +(make-obsolete-variable 'browse-url-galeon-new-window-is-tab nil "25.1") + (defcustom browse-url-epiphany-new-window-is-tab nil "Whether to open up new windows in a tab or a new window. If non-nil, then open the URL in a new tab rather than a new window if @@ -435,11 +376,12 @@ window." :type 'boolean :group 'browse-url) +(make-obsolete-variable 'browse-url-netscape-new-window-is-tab nil "25.1") + (defcustom browse-url-new-window-flag nil "Non-nil means always open a new browser window with appropriate browsers. Passing an interactive argument to \\[browse-url], or specific browser -commands reverses the effect of this variable. Requires Netscape version -1.1N or later or XMosaic version 2.5 or later if using those browsers." +commands reverses the effect of this variable." :type 'boolean :group 'browse-url) @@ -449,16 +391,33 @@ commands reverses the effect of this variable. Requires Netscape version :version "20.3" :group 'browse-url) +(make-obsolete-variable 'browse-url-mosaic-program nil "25.1") + (defcustom browse-url-mosaic-arguments nil "A list of strings to pass to Mosaic as arguments." :type '(repeat (string :tag "Argument")) :group 'browse-url) +(make-obsolete-variable 'browse-url-mosaic-arguments nil "25.1") + (defcustom browse-url-mosaic-pidfile "~/.mosaicpid" "The name of the pidfile created by Mosaic." :type 'string :group 'browse-url) +(make-obsolete-variable 'browse-url-mosaic-pidfile nil "25.1") + +(defcustom browse-url-conkeror-program "conkeror" + "The name by which to invoke Conkeror." + :type 'string + :version "25.1" + :group 'browse-url) + +(defcustom browse-url-conkeror-arguments nil + "A list of strings to pass to Conkeror as arguments." + :type '(repeat (string :tag "Argument")) + :group 'browse-url) + (defcustom browse-url-filename-alist `(("^/\\(ftp@\\|anonymous@\\)?\\([^:]+\\):/*" . "ftp://\\2/") ;; The above loses the username to avoid the browser prompting for @@ -498,12 +457,8 @@ Used by the `browse-url-of-file' command." :group 'browse-url) (defcustom browse-url-of-file-hook nil - "Run after `browse-url-of-file' has asked a browser to load a file. - -Set this to `browse-url-netscape-reload' to force Netscape to load the -file rather than displaying a cached copy." + "Hook run after `browse-url-of-file' has asked a browser to load a file." :type 'hook - :options '(browse-url-netscape-reload) :group 'browse-url) (defcustom browse-url-CCI-port 3003 @@ -513,6 +468,8 @@ the value set in the browser." :type 'integer :group 'browse-url) +(make-obsolete-variable 'browse-url-CCI-port nil "25.1") + (defcustom browse-url-CCI-host "localhost" "Host to access XMosaic via CCI. This should be the host name of the machine running XMosaic with CCI @@ -520,6 +477,8 @@ enabled. The port number should be set in `browse-url-CCI-port'." :type 'string :group 'browse-url) +(make-obsolete-variable 'browse-url-CCI-host nil "25.1") + (defvar browse-url-temp-file-name nil) (make-variable-buffer-local 'browse-url-temp-file-name) @@ -571,6 +530,8 @@ incompatibly at version 4." :type 'number :group 'browse-url) +(make-obsolete-variable 'browse-url-netscape-version nil "25.1") + (defcustom browse-url-text-browser "lynx" "The name of the text browser to invoke." :type 'string @@ -668,7 +629,7 @@ regarding its parameter treatment." ;; functions allows them to be stand-alone commands, making it easier ;; to switch between browsers. -(defun browse-url-interactive-arg (prompt &optional default-url) +(defun browse-url-interactive-arg (prompt) "Read a URL from the minibuffer, prompting with PROMPT. If `transient-mark-mode' is non-nil and the mark is active, it defaults to the current region, else to the URL at or before @@ -685,8 +646,7 @@ for use in `interactive'." "[\t\r\f\n ]+" "" (buffer-substring-no-properties (region-beginning) (region-end)))) - (browse-url-url-at-point) - default-url)) + (browse-url-url-at-point))) (not (eq (null browse-url-new-window-flag) (null current-prefix-arg))))) @@ -796,26 +756,18 @@ narrowed." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Browser-independent commands -(defun url-tidy (url) - "Tidy up URL as much as possible." - (if (equal 0 (string-match ".*://" url)) - url - (concat "http://" url) ;;TODO guess more url forms, like mailto - )) - ;; A generic command to call the current browse-url-browser-function ;;;###autoload (defun browse-url (url &rest args) "Ask a WWW browser to load URL. -Prompts for a URL, defaulting to the URL at or before point. Variable +Prompt for a URL, defaulting to the URL at or before point. Variable `browse-url-browser-function' says which browser to use. If the URL is a mailto: URL, consult `browse-url-mailto-function' first, if that exists." (interactive (browse-url-interactive-arg "URL: ")) (unless (called-interactively-p 'interactive) (setq args (or args (list browse-url-new-window-flag)))) - (setq url (url-tidy url)) (when (and url-handler-mode (not (file-name-absolute-p url))) (setq url (expand-file-name url))) (let ((process-environment (copy-sequence process-environment)) @@ -848,8 +800,7 @@ first, if that exists." ;;;###autoload (defun browse-url-at-point (&optional arg) "Ask a WWW browser to load the URL at or before point. -Doesn't let you edit the URL like `browse-url'. Variable -`browse-url-browser-function' says which browser to use." +Variable `browse-url-browser-function' says which browser to use." (interactive "P") (let ((url (browse-url-url-at-point))) (if url @@ -862,9 +813,8 @@ Doesn't let you edit the URL like `browse-url'. Variable (defun browse-url-at-mouse (event) "Ask a WWW browser to load a URL clicked with the mouse. The URL is the one around or before the position of the mouse click -but point is not changed. Doesn't let you edit the URL like -`browse-url'. Variable `browse-url-browser-function' says which browser -to use." +but point is not changed. Variable `browse-url-browser-function' +says which browser to use." (interactive "e") (save-excursion (mouse-set-point event) @@ -934,14 +884,15 @@ used instead of `browse-url-new-window-flag'." ((memq system-type '(darwin)) 'browse-url-default-macosx-browser) ((browse-url-can-use-xdg-open) 'browse-url-xdg-open) - ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) +;;; ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) ((executable-find browse-url-mozilla-program) 'browse-url-mozilla) ((executable-find browse-url-firefox-program) 'browse-url-firefox) ((executable-find browse-url-chromium-program) 'browse-url-chromium) - ((executable-find browse-url-galeon-program) 'browse-url-galeon) +;;; ((executable-find browse-url-galeon-program) 'browse-url-galeon) ((executable-find browse-url-kde-program) 'browse-url-kde) - ((executable-find browse-url-netscape-program) 'browse-url-netscape) - ((executable-find browse-url-mosaic-program) 'browse-url-mosaic) +;;; ((executable-find browse-url-netscape-program) 'browse-url-netscape) +;;; ((executable-find browse-url-mosaic-program) 'browse-url-mosaic) + ((executable-find browse-url-conkeror-program) 'browse-url-conkeror) ((executable-find browse-url-xterm-program) 'browse-url-text-xterm) ((locate-library "w3") 'browse-url-w3) (t @@ -1006,6 +957,7 @@ is loaded in a new tab in an existing window instead. When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." + (declare (obsolete nil "25.1")) (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) (let* ((process-environment (browse-url-process-environment)) @@ -1033,6 +985,7 @@ used instead of `browse-url-new-window-flag'." (defun browse-url-netscape-sentinel (process url) "Handle a change to the process communicating with Netscape." + (declare (obsolete nil "25.1")) (or (eq (process-exit-status process) 0) (let* ((process-environment (browse-url-process-environment))) ;; Netscape not running - start it @@ -1044,6 +997,7 @@ used instead of `browse-url-new-window-flag'." (defun browse-url-netscape-reload () "Ask Netscape to reload its current document. How depends on `browse-url-netscape-version'." + (declare (obsolete nil "25.1")) (interactive) ;; Backwards incompatibility reported by ;; . @@ -1053,6 +1007,7 @@ How depends on `browse-url-netscape-version'." (defun browse-url-netscape-send (command) "Send a remote control command to Netscape." + (declare (obsolete nil "25.1")) (let* ((process-environment (browse-url-process-environment))) (apply 'start-process "netscape" nil browse-url-netscape-program @@ -1111,68 +1066,32 @@ used instead of `browse-url-new-window-flag'." ;;;###autoload (defun browse-url-firefox (url &optional new-window) "Ask the Firefox WWW browser to load URL. -Default to the URL around or before point. The strings in -variable `browse-url-firefox-arguments' are also passed to -Firefox. +Defaults to the URL around or before point. Passes the strings +in the variable `browse-url-firefox-arguments' to Firefox. -When called interactively, if variable -`browse-url-new-window-flag' is non-nil, load the document in a -new Firefox window, otherwise use a random existing one. A -non-nil interactive prefix argument reverses the effect of -`browse-url-new-window-flag'. +Interactively, if the variable `browse-url-new-window-flag' is non-nil, +loads the document in a new Firefox window. A non-nil prefix argument +reverses the effect of `browse-url-new-window-flag'. If `browse-url-firefox-new-window-is-tab' is non-nil, then whenever a document would otherwise be loaded in a new window, it is loaded in a new tab in an existing window instead. -When called non-interactively, optional second argument -NEW-WINDOW is used instead of `browse-url-new-window-flag'. - -On MS-Windows systems the optional `new-window' parameter is -ignored. Firefox for Windows does not support the \"-remote\" -command line parameter. Therefore, the -`browse-url-new-window-flag' and `browse-url-firefox-new-window-is-tab' -are ignored as well. Firefox on Windows will always open the requested -URL in a new window." +Non-interactively, this uses the optional second argument NEW-WINDOW +instead of `browse-url-new-window-flag'." (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) - (let* ((process-environment (browse-url-process-environment)) - (use-remote - (not (memq system-type '(windows-nt ms-dos)))) - (process - (apply 'start-process - (concat "firefox " url) nil - browse-url-firefox-program - (append - browse-url-firefox-arguments - (if use-remote - (list "-remote" - (concat - "openURL(" - url - (if (browse-url-maybe-new-window new-window) - (if browse-url-firefox-new-window-is-tab - ",new-tab" - ",new-window")) - ")")) - (list url)))))) - ;; If we use -remote, the process exits with status code 2 if - ;; Firefox is not already running. The sentinel runs firefox - ;; directly if that happens. - (when use-remote - (set-process-sentinel process - `(lambda (process change) - (browse-url-firefox-sentinel process ,url)))))) - -(defun browse-url-firefox-sentinel (process url) - "Handle a change to the process communicating with Firefox." - (or (eq (process-exit-status process) 0) - (let* ((process-environment (browse-url-process-environment))) - ;; Firefox is not running - start it - (message "Starting Firefox...") - (apply 'start-process (concat "firefox " url) nil - browse-url-firefox-program - (append browse-url-firefox-startup-arguments (list url)))))) + (let* ((process-environment (browse-url-process-environment))) + (apply 'start-process + (concat "firefox " url) nil + browse-url-firefox-program + (append + browse-url-firefox-arguments + (if (browse-url-maybe-new-window new-window) + (if browse-url-firefox-new-window-is-tab + '("-new-tab") + '("-new-window"))) + (list url))))) ;;;###autoload (defun browse-url-chromium (url &optional _new-window) @@ -1207,6 +1126,7 @@ new tab in an existing window instead. When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." + (declare (obsolete nil "25.1")) (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) (let* ((process-environment (browse-url-process-environment)) @@ -1228,6 +1148,7 @@ used instead of `browse-url-new-window-flag'." (defun browse-url-galeon-sentinel (process url) "Handle a change to the process communicating with Galeon." + (declare (obsolete nil "25.1")) (or (eq (process-exit-status process) 0) (let* ((process-environment (browse-url-process-environment))) ;; Galeon is not running - start it @@ -1310,6 +1231,7 @@ effect of `browse-url-new-window-flag'. When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." + (declare (obsolete nil "25.1")) (interactive (browse-url-interactive-arg "URL: ")) (apply 'start-process (concat "gnome-moz-remote " url) nil @@ -1338,6 +1260,7 @@ the effect of `browse-url-new-window-flag'. When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." + (declare (obsolete nil "25.1")) (interactive (browse-url-interactive-arg "Mosaic URL: ")) (let ((pidfile (expand-file-name browse-url-mosaic-pidfile)) pid) @@ -1388,6 +1311,7 @@ the effect of `browse-url-new-window-flag'. When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." + (declare (obsolete nil "25.1")) (interactive (browse-url-interactive-arg "Mosaic URL: ")) (open-network-stream "browse-url" " *browse-url*" browse-url-CCI-host browse-url-CCI-port) @@ -1401,6 +1325,42 @@ used instead of `browse-url-new-window-flag'." (process-send-string "browse-url" "disconnect\r\n") (delete-process "browse-url")) +;; --- Conkeror --- +;;;###autoload +(defun browse-url-conkeror (url &optional new-window) + "Ask the Conkeror WWW browser to load URL. +Default to the URL around or before point. Also pass the strings +in the variable `browse-url-conkeror-arguments' to Conkeror. + +When called interactively, if variable +`browse-url-new-window-flag' is non-nil, load the document in a +new Conkeror window, otherwise use a random existing one. A +non-nil interactive prefix argument reverses the effect of +`browse-url-new-window-flag'. + +If variable `browse-url-conkeror-new-window-is-buffer' is +non-nil, then whenever a document would otherwise be loaded in a +new window, load it in a new buffer in an existing window instead. + +When called non-interactively, use optional second argument +NEW-WINDOW instead of `browse-url-new-window-flag'." + (interactive (browse-url-interactive-arg "URL: ")) + (setq url (browse-url-encode-url url)) + (let* ((process-environment (browse-url-process-environment))) + (apply 'start-process (format "conkeror %s" url) + nil + browse-url-conkeror-program + (append + browse-url-conkeror-arguments + (list + "-e" + (format "load_url_in_new_%s('%s')" + (if (browse-url-maybe-new-window new-window) + (if browse-url-conkeror-new-window-is-buffer + "buffer" + "window") + "buffer") + url)))))) ;; --- W3 --- ;; External. @@ -1430,6 +1390,7 @@ used instead of `browse-url-new-window-flag'." "Ask another Emacs running gnuserv to load the URL using the W3 browser. The `browse-url-gnudoit-program' program is used with options given by `browse-url-gnudoit-args'. Default to the URL around or before point." + (declare (obsolete nil "25.1")) (interactive (browse-url-interactive-arg "W3 URL: ")) (apply 'start-process (concat "gnudoit:" url) nil browse-url-gnudoit-program @@ -1481,7 +1442,7 @@ used instead of `browse-url-new-window-flag'." (n browse-url-text-input-attempts)) (require 'term) (if (and (browse-url-maybe-new-window new-buffer) buf) - ;; Rename away the OLD buffer. This isn't very polite, but + ;; Rename away the OLD buffer. This isn't very polite, but ;; term insists on working in a buffer named *lynx* and would ;; choke on *lynx*<1> (progn (set-buffer buf) diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index bbce300af4..b2c1ba883a 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -707,7 +707,8 @@ Example: (setq counter (match-string 2 (symbol-name key)) args (cdr args) value (car args)) - (unless (and (<= counter 63) (stringp value)) + (unless (and (<= (string-to-number counter) 63) + (stringp value)) (signal 'wrong-type-argument (list "Wrong argument" key value))) (format diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el index 5be2bec0c5..bd5d4536aa 100644 --- a/lisp/net/eudcb-bbdb.el +++ b/lisp/net/eudcb-bbdb.el @@ -42,6 +42,24 @@ (defvar eudc-bbdb-current-query nil) (defvar eudc-bbdb-current-return-attributes nil) +(defvar bbdb-version) + +(defun eudc-bbdb-field (field-symbol) + "Convert FIELD-SYMBOL so that it is recognized by the current BBDB version. +BBDB < 3 used `net'; BBDB >= 3 uses `mail'." + ;; This just-in-time translation permits upgrading from BBDB 2 to + ;; BBDB 3 without restarting Emacs. + (if (and (eq field-symbol 'net) + (or + ;; MELPA versions of BBDB may have a bad package version, + ;; but they're all version 3 or later. + (equal bbdb-version "@PACKAGE_VERSION@") + ;; Development versions of BBDB can have the format "X.YZ + ;; devo". Split the string just in case. + (version<= "3" (car (split-string bbdb-version))))) + 'mail + field-symbol)) + (defvar eudc-bbdb-attributes-translation-alist '((name . lastname) (email . net) @@ -85,7 +103,9 @@ (progn (setq bbdb-val (eval (list (intern (concat "bbdb-record-" - (symbol-name attr))) + (symbol-name + (eudc-bbdb-field + attr)))) 'record))) (if (listp bbdb-val) (if eudc-bbdb-enable-substring-matches @@ -168,7 +188,7 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'" (setq val (eval (list (intern (concat "bbdb-record-" - (symbol-name attr))) + (symbol-name (eudc-bbdb-field attr)))) 'record)))) (t (error "Unknown BBDB attribute"))) diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el index 1d426a7b7b..d22dff615e 100644 --- a/lisp/net/eudcb-ldap.el +++ b/lisp/net/eudcb-ldap.el @@ -74,13 +74,10 @@ (defun eudc-ldap-cleanup-record-simple (record) "Do some cleanup in a RECORD to make it suitable for EUDC." + (declare (obsolete eudc-ldap-cleanup-record-filtering-addresses "25.1")) (mapcar (function (lambda (field) - ;; Some servers return case-sensitive names (e.g. givenName - ;; instead of givenname); downcase the field's name so that it - ;; can be matched against - ;; eudc-ldap-attributes-translation-alist. (cons (intern (downcase (car field))) (if (cdr (cdr field)) (cdr field) @@ -90,22 +87,36 @@ (defun eudc-filter-$ (string) (mapconcat 'identity (split-string string "\\$") "\n")) -;; Cleanup a LDAP record to make it suitable for EUDC: -;; Make the record a cons-cell instead of a list if it is single-valued -;; Filter the $ character in addresses into \n if not done by the LDAP lib (defun eudc-ldap-cleanup-record-filtering-addresses (record) - (mapcar - (function - (lambda (field) + "Clean up RECORD to make it suitable for EUDC. +Make the record a cons-cell instead of a list if it is +single-valued. Change the `$' character in postal addresses to a +newline. Combine separate mail fields into one mail field with +multiple addresses." + (let ((clean-up-addresses (or (not (boundp 'ldap-ignore-attribute-codings)) + (not ldap-ignore-attribute-codings))) + result mail-addresses) + (dolist (field record) + ;; Some servers return case-sensitive names (e.g. givenName + ;; instead of givenname); downcase the field's name so that it + ;; can be matched against + ;; eudc-ldap-attributes-translation-alist. (let ((name (intern (downcase (car field)))) (value (cdr field))) - (if (memq name '(postaladdress registeredaddress)) - (setq value (mapcar 'eudc-filter-$ value))) - (cons name - (if (cdr value) - value - (car value)))))) - record)) + (when (and clean-up-addresses + (memq name '(postaladdress registeredaddress))) + (setq value (mapcar 'eudc-filter-$ value))) + (if (eq name 'mail) + (setq mail-addresses (append mail-addresses value)) + (push (cons name (if (cdr value) + value + (car value))) + result)))) + (push (cons 'mail (if (cdr mail-addresses) + mail-addresses + (car mail-addresses))) + result) + (nreverse result))) (defun eudc-ldap-simple-query-internal (query &optional return-attrs) "Query the LDAP server with QUERY. @@ -118,11 +129,7 @@ RETURN-ATTRS is a list of attributes to return, defaulting to (if (listp return-attrs) (mapcar 'symbol-name return-attrs)))) final-result) - (if (or (not (boundp 'ldap-ignore-attribute-codings)) - ldap-ignore-attribute-codings) - (setq result - (mapcar 'eudc-ldap-cleanup-record-filtering-addresses result)) - (setq result (mapcar 'eudc-ldap-cleanup-record-simple result))) + (setq result (mapcar 'eudc-ldap-cleanup-record-filtering-addresses result)) (if (and eudc-strict-return-matches return-attrs @@ -148,7 +155,7 @@ attribute names are returned. Default to `person'" (let ((ldap-host-parameters-alist (list (cons eudc-server '(scope subtree sizelimit 1))))) - (mapcar 'eudc-ldap-cleanup-record-simple + (mapcar 'eudc-ldap-cleanup-record-filtering-addresses (ldap-search (eudc-ldap-format-query-as-rfc1558 (list (cons "objectclass" diff --git a/lisp/net/eww.el b/lisp/net/eww.el index ec7a0baacf..a128ffb9d0 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -49,7 +49,7 @@ :type 'string) (defcustom eww-search-prefix "https://duckduckgo.com/html/?q=" - "Prefix URL to search engine" + "Prefix URL to search engine." :version "24.4" :group 'eww :type 'string) @@ -60,6 +60,7 @@ :group 'eww :type 'string) +;;;###autoload (defcustom eww-suggest-uris '(eww-links-at-point url-get-url-at-point @@ -253,7 +254,7 @@ word(s) will be searched for via `eww-search-prefix'." (cond ((string-match-p "\\`file:/" url)) ;; Don't mangle file: URLs at all. ((string-match-p "\\`ftp://" url) - (user-error "FTP is not supported.")) + (user-error "FTP is not supported")) (t ;; Anything that starts with something that vaguely looks ;; like a protocol designator is interpreted as a full URL. @@ -291,7 +292,7 @@ word(s) will be searched for via `eww-search-prefix'." ;;;###autoload (defun eww-open-file (file) - "Render a file using EWW." + "Render FILE using EWW." (interactive "fFile: ") (eww (concat "file://" (and (memq system-type '(windows-nt ms-dos)) @@ -300,11 +301,17 @@ word(s) will be searched for via `eww-search-prefix'." ;;;###autoload (defun eww-search-words (&optional beg end) - "Search the web for the text between the point and marker. + "Search the web for the text between BEG and END. See the `eww-search-prefix' variable for the search engine used." (interactive "r") (eww (buffer-substring beg end))) +(defun eww-html-p (content-type) + "Return non-nil if CONTENT-TYPE designates an HTML content type. +Currently this means either text/html or application/xhtml+xml." + (member content-type '("text/html" + "application/xhtml+xml"))) + (defun eww-render (status url &optional point buffer encode) (let ((redirect (plist-get status :redirect))) (when redirect @@ -317,8 +324,7 @@ See the `eww-search-prefix' variable for the search engine used." (charset (intern (downcase (or (cdr (assq 'charset (cdr content-type))) - (eww-detect-charset (equal (car content-type) - "text/html")) + (eww-detect-charset (eww-html-p (car content-type))) "utf-8")))) (data-buffer (current-buffer))) ;; Save the https peer status. @@ -331,7 +337,7 @@ See the `eww-search-prefix' variable for the search engine used." (string-match-p eww-use-external-browser-for-content-type (car content-type))) (eww-browse-with-external-browser url)) - ((equal (car content-type) "text/html") + ((eww-html-p (car content-type)) (eww-display-html charset url nil point buffer encode)) ((equal (car content-type) "application/pdf") (eww-display-pdf)) @@ -409,7 +415,6 @@ See the `eww-search-prefix' variable for the search engine used." (form . eww-tag-form) (input . eww-tag-input) (textarea . eww-tag-textarea) - (body . eww-tag-body) (select . eww-tag-select) (link . eww-tag-link) (a . eww-tag-a)))) @@ -495,15 +500,6 @@ See the `eww-search-prefix' variable for the search engine used." (replace-regexp-in-string "[ \t\r\n]+" " " (dom-text dom)))) (eww-update-header-line-format)) -(defun eww-tag-body (dom) - (let* ((start (point)) - (fgcolor (or (dom-attr dom 'fgcolor) (dom-attr dom 'text))) - (bgcolor (dom-attr dom 'bgcolor)) - (shr-stylesheet (list (cons 'color fgcolor) - (cons 'background-color bgcolor)))) - (shr-generic dom) - (shr-colorize-region start (point) fgcolor bgcolor))) - (defun eww-display-raw (buffer &optional encode) (let ((data (buffer-substring (point) (point-max)))) (unless (buffer-live-p buffer) @@ -653,6 +649,7 @@ the like." (define-key map "H" 'eww-list-histories) (define-key map "E" 'eww-set-character-encoding) (define-key map "S" 'eww-list-buffers) + (define-key map "F" 'eww-toggle-fonts) (define-key map "b" 'eww-add-bookmark) (define-key map "B" 'eww-list-bookmarks) @@ -695,6 +692,8 @@ the like." map) "Tool bar for `eww-mode'.") +;; Autoload cookie needed by desktop.el. +;;;###autoload (define-derived-mode eww-mode special-mode "eww" "Mode for browsing the web." (setq-local eww-data (list :title "")) @@ -1369,7 +1368,7 @@ If EXTERNAL is double prefix, browse in new buffer." (eww-browse-url url external))))) (defun eww-same-page-p (url1 url2) - "Return non-nil if both URLs represent the same page. + "Return non-nil if URL1 and URL2 represent the same page. Differences in #targets are ignored." (let ((obj1 (url-generic-parse-url url1)) (obj2 (url-generic-parse-url url2))) @@ -1419,12 +1418,22 @@ Differences in #targets are ignored." (expand-file-name file directory))) (defun eww-set-character-encoding (charset) - "Set character encoding." + "Set character encoding to CHARSET. +If CHARSET is nil then use UTF-8." (interactive "zUse character set (default utf-8): ") (if (null charset) (eww-reload nil 'utf-8) (eww-reload nil charset))) +(defun eww-toggle-fonts () + "Toggle whether to use monospaced or font-enabled layouts." + (interactive) + (message "Fonts are now %s" + (if (setq shr-use-fonts (not shr-use-fonts)) + "on" + "off")) + (eww-reload)) + ;;; Bookmarks code (defvar eww-bookmarks nil) @@ -1877,8 +1886,9 @@ Otherwise, the restored buffer will contain a prompt to do so by using (case eww-restore-desktop ((t auto) (eww (plist-get eww-data :url))) ((zerop (buffer-size)) - (insert (substitute-command-keys - eww-restore-reload-prompt)))))) + (let ((inhibit-read-only t)) + (insert (substitute-command-keys + eww-restore-reload-prompt))))))) ;; . (current-buffer))) diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index a77fc3c651..1c604e330b 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -376,9 +376,19 @@ RFC2252 section 4.3.2") (houseidentifier . 15) (supportedalgorithms . 49) (deltarevocationlist . 9) - (dmdname . 15)) + (dmdname . 15) + (carlicense . 15) + (departmentnumber . 15) + (displayname . 15) + (employeenumber . 15) + (employeetype . 15) + (jpegphoto . 28) + (preferredlanguage . 15) + (usersmimecertificate . 5) + (userpkcs12 . 5)) "A map of LDAP attribute names to their type object id minor number. -This table is built from RFC2252 Section 5 and RFC2256 Section 5") +This table is built from RFC2252 Section 5, RFC2256 Section 5 and +RFC2798 Section 9.1.1") ;; Coding/decoding functions @@ -546,8 +556,8 @@ not their associated values. `auth' is one of the symbols `simple', `krbv41' or `krbv42'. `base' is the base for the search as described in RFC 1779. `scope' is one of the three symbols `sub', `base' or `one'. - `binddn' is the distinguished name of the user to bind as (in RFC 1779 syntax). - `auth' is one of the symbols `simple', `krbv41' or `krbv42' + `binddn' is the distinguished name of the user to bind as (in +RFC 1779 syntax). `passwd' is the password to use for simple authentication. `deref' is one of the symbols `never', `always', `search' or `find'. `timelimit' is the timeout limit for the connection in seconds. diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el index e7b3150b79..0104fa7dd1 100644 --- a/lisp/net/network-stream.el +++ b/lisp/net/network-stream.el @@ -374,10 +374,12 @@ asynchronously, if possible." (when (re-search-forward eoc nil t) (goto-char (match-beginning 0)) (delete-region (point-min) (line-beginning-position)))) - (let* ((capability-command (plist-get parameters :capability-command))) + (let ((capability-command (plist-get parameters :capability-command)) + (eo-capa (or (plist-get parameters :end-of-capability) + eoc))) (list stream (network-stream-get-response stream start eoc) - (network-stream-command stream capability-command eoc) + (network-stream-command stream capability-command eo-capa) 'tls)))))) (defun network-stream-open-shell (name buffer host service parameters) diff --git a/lisp/gnus/rfc2104.el b/lisp/net/rfc2104.el similarity index 100% rename from lisp/gnus/rfc2104.el rename to lisp/net/rfc2104.el diff --git a/lisp/net/sasl-scram-rfc.el b/lisp/net/sasl-scram-rfc.el new file mode 100644 index 0000000000..18d7a6bfa1 --- /dev/null +++ b/lisp/net/sasl-scram-rfc.el @@ -0,0 +1,163 @@ +;;; sasl-scram-rfc.el --- SCRAM-SHA-1 module for the SASL client framework -*- lexical-binding: t; -*- + +;; Copyright (C) 2014-2015 Free Software Foundation, Inc. + +;; Author: Magnus Henoch + +;; 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 . + +;;; Commentary: + +;; This program is implemented from RFC 5802. It implements the +;; SCRAM-SHA-1 SASL mechanism. +;; +;; RFC 5802 foresees "hash agility", i.e. new mechanisms based on the +;; same protocol but using a different hash function. Likewise, this +;; module attempts to separate generic and specific functions, which +;; should make it easy to implement any future SCRAM-* SASL mechanism. +;; It should be as simple as copying the SCRAM-SHA-1 section below and +;; replacing all SHA-1 references. +;; +;; This module does not yet implement the variants with channel +;; binding, i.e. SCRAM-*-PLUS. That would require cooperation from +;; the TLS library. + +;;; Code: + +(require 'cl-lib) +(require 'sasl) +(require 'hex-util) +(require 'rfc2104) + +;;; Generic for SCRAM-* + +(defun sasl-scram-client-first-message (client _step) + (let ((c-nonce (sasl-unique-id))) + (sasl-client-set-property client 'c-nonce c-nonce)) + (concat + ;; n = client doesn't support channel binding + "n," + ;; TODO: where would we get authorization id from? + "," + (sasl-scram--client-first-message-bare client))) + +(defun sasl-scram--client-first-message-bare (client) + (let ((c-nonce (sasl-client-property client 'c-nonce))) + (concat + ;; TODO: saslprep username or disallow non-ASCII characters + "n=" (sasl-client-name client) "," + "r=" c-nonce))) + +(defun sasl-scram--client-final-message (hash-fun block-length hash-length client step) + (unless (string-match + "^r=\\([^,]+\\),s=\\([^,]+\\),i=\\([0-9]+\\)\\(?:$\\|,\\)" + (sasl-step-data step)) + (sasl-error "Unexpected server response")) + (let* ((hmac-fun (lambda (text key) + (decode-hex-string + (rfc2104-hash hash-fun block-length hash-length key text)))) + (step-data (sasl-step-data step)) + (nonce (match-string 1 step-data)) + (salt-base64 (match-string 2 step-data)) + (iteration-count (string-to-number (match-string 3 step-data))) + + (c-nonce (sasl-client-property client 'c-nonce)) + ;; no channel binding, no authorization id + (cbind-input "n,,")) + (unless (string-prefix-p c-nonce nonce) + (sasl-error "Invalid nonce from server")) + (let* ((client-final-message-without-proof + (concat "c=" (base64-encode-string cbind-input) "," + "r=" nonce)) + (password + ;; TODO: either apply saslprep or disallow non-ASCII characters + (sasl-read-passphrase + (format "%s passphrase for %s: " + (sasl-mechanism-name (sasl-client-mechanism client)) + (sasl-client-name client)))) + (salt (base64-decode-string salt-base64)) + (salted-password + ;; Hi(str, salt, i): + (let ((digest (concat salt (string 0 0 0 1))) + (xored nil)) + (dotimes (_i iteration-count xored) + (setq digest (funcall hmac-fun digest password)) + (setq xored (if (null xored) + digest + (cl-map 'string 'logxor xored digest)))))) + (client-key + (funcall hmac-fun "Client Key" salted-password)) + (stored-key (decode-hex-string (funcall hash-fun client-key))) + (auth-message + (concat + (sasl-scram--client-first-message-bare client) "," + step-data "," + client-final-message-without-proof)) + (client-signature (funcall hmac-fun (encode-coding-string auth-message 'utf-8) stored-key)) + (client-proof (cl-map 'string 'logxor client-key client-signature)) + (client-final-message + (concat client-final-message-without-proof "," + "p=" (base64-encode-string client-proof)))) + (sasl-client-set-property client 'auth-message auth-message) + (sasl-client-set-property client 'salted-password salted-password) + client-final-message))) + +(defun sasl-scram--authenticate-server (hash-fun block-length hash-length client step) + (cond + ((string-match "^e=\\([^,]+\\)" (sasl-step-data step)) + (sasl-error (format "Server error: %s" (match-string 1 (sasl-step-data step))))) + ((string-match "^v=\\([^,]+\\)" (sasl-step-data step)) + (let* ((hmac-fun (lambda (text key) + (decode-hex-string + (rfc2104-hash hash-fun block-length hash-length key text)))) + (verifier (base64-decode-string (match-string 1 (sasl-step-data step)))) + (auth-message (sasl-client-property client 'auth-message)) + (salted-password (sasl-client-property client 'salted-password)) + (server-key (funcall hmac-fun "Server Key" salted-password)) + (expected-server-signature + (funcall hmac-fun (encode-coding-string auth-message 'utf-8) server-key))) + (unless (string= expected-server-signature verifier) + (sasl-error "Server not authenticated")))) + (t + (sasl-error "Invalid response from server")))) + +;;; SCRAM-SHA-1 + +(defconst sasl-scram-sha-1-steps + '(sasl-scram-client-first-message + sasl-scram-sha-1-client-final-message + sasl-scram-sha-1-authenticate-server)) + +(defun sasl-scram-sha-1-client-final-message (client step) + (sasl-scram--client-final-message + ;; HMAC-SHA1 uses block length 64 and hash length 20; see RFC 2104. + 'sha1 64 20 client step)) + +(defun sasl-scram-sha-1-authenticate-server (client step) + (sasl-scram--authenticate-server + 'sha1 64 20 client step)) + +;; This needs to be at the end, because of how `sasl-make-mechanism' +;; handles step function names. +(put 'sasl-scram-sha-1 'sasl-mechanism + (sasl-make-mechanism "SCRAM-SHA-1" sasl-scram-sha-1-steps)) + +(put 'sasl-scram-rfc 'sasl-mechanism (get 'sasl-scram-sha-1 'sasl-mechanism)) + +(provide 'sasl-scram-sha-1) + +(provide 'sasl-scram-rfc) +;;; sasl-scram-rfc.el ends here diff --git a/lisp/net/sasl.el b/lisp/net/sasl.el index 648e622749..9321efdfda 100644 --- a/lisp/net/sasl.el +++ b/lisp/net/sasl.el @@ -35,8 +35,8 @@ ;;; Code: (defvar sasl-mechanisms - '("CRAM-MD5" "DIGEST-MD5" "PLAIN" "LOGIN" "ANONYMOUS" - "NTLM" "SCRAM-MD5")) + '("SCRAM-SHA-1" "CRAM-MD5" "DIGEST-MD5" "PLAIN" "LOGIN" "ANONYMOUS" + "NTLM")) (defvar sasl-mechanism-alist '(("CRAM-MD5" sasl-cram) @@ -45,7 +45,7 @@ ("LOGIN" sasl-login) ("ANONYMOUS" sasl-anonymous) ("NTLM" sasl-ntlm) - ("SCRAM-MD5" sasl-scram))) + ("SCRAM-SHA-1" sasl-scram-rfc))) (defvar sasl-unique-id-function #'sasl-unique-id-function) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 59c277b01c..9d88d1ff44 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -57,6 +57,12 @@ fit these criteria." :group 'shr :type '(choice (const nil) regexp)) +(defcustom shr-use-fonts nil + "If non-nil, use proportional fonts for text." + :version "25.1" + :group 'shr + :type 'boolean) + (defcustom shr-table-horizontal-line nil "Character used to draw horizontal table lines. If nil, don't draw horizontal table lines." @@ -132,10 +138,9 @@ cid: URL as the argument.") ;;; Internal variables. (defvar shr-folding-mode nil) -(defvar shr-state nil) (defvar shr-start nil) (defvar shr-indentation 0) -(defvar shr-internal-width (or shr-width (1- (window-width)))) +(defvar shr-internal-width nil) (defvar shr-list-mode nil) (defvar shr-content-cache nil) (defvar shr-kinsoku-shorten nil) @@ -149,6 +154,10 @@ cid: URL as the argument.") (defvar shr-target-id nil) (defvar shr-inhibit-decoration nil) (defvar shr-table-separator-length 1) +(defvar shr-table-separator-pixel-width 0) +(defvar shr-table-id nil) +(defvar shr-current-font nil) +(defvar shr-internal-bullet nil) (defvar shr-map (let ((map (make-sparse-keymap))) @@ -202,13 +211,24 @@ DOM should be a parse tree as generated by `libxml-parse-html-region' or similar." (setq shr-content-cache nil) (let ((start (point)) - (shr-state nil) (shr-start nil) (shr-base nil) (shr-depth 0) + (shr-table-id 0) (shr-warning nil) - (shr-internal-width (or shr-width (1- (window-width))))) + (shr-table-separator-pixel-width (shr-string-pixel-width "-")) + (shr-internal-bullet (cons shr-bullet + (shr-string-pixel-width shr-bullet))) + (shr-internal-width (or (and shr-width + (if (not shr-use-fonts) + shr-width + (* shr-width (frame-char-width)))) + (if (not shr-use-fonts) + (- (window-width) 2) + (- (window-pixel-width) + (* (frame-fringe-width) 2)))))) (shr-descend dom) + (shr-fill-lines start (point)) (shr-remove-trailing-whitespace start (point)) (when shr-warning (message "%s" shr-warning)))) @@ -303,7 +323,7 @@ redirects somewhere else." (let ((text (get-text-property (point) 'shr-alt))) (if (not text) (message "No image under point") - (message "%s" (shr-fold-text text))))) + (message "%s" (shr-fill-text text))))) (defun shr-browse-image (&optional copy-url) "Browse the image under point. @@ -414,14 +434,14 @@ size, and full-buffer size." (cdr (assq 'color shr-stylesheet)) (cdr (assq 'background-color shr-stylesheet)))))))) -(defun shr-fold-text (text) +(defun shr-fill-text (text) (if (zerop (length text)) text (with-temp-buffer (let ((shr-indentation 0) - (shr-state nil) (shr-start nil) - (shr-internal-width (window-width))) + (shr-internal-width (- (window-pixel-width) + (* (frame-fringe-width) 2)))) (shr-insert text) (buffer-string))))) @@ -447,76 +467,146 @@ size, and full-buffer size." (unless (shr-char-kinsoku-bol-p (make-char 'japanese-jisx0208 33 35)) (load "kinsoku" nil t)) +(defun shr-pixel-column () + (if (not shr-use-fonts) + (current-column) + (if (not (get-buffer-window (current-buffer))) + (save-window-excursion + (set-window-buffer nil (current-buffer)) + (car (window-text-pixel-size nil (line-beginning-position) (point)))) + (car (window-text-pixel-size nil (line-beginning-position) (point)))))) + +(defun shr-pixel-region () + (- (shr-pixel-column) + (save-excursion + (goto-char (mark)) + (shr-pixel-column)))) + +(defun shr-string-pixel-width (string) + (if (not shr-use-fonts) + (length string) + (with-temp-buffer + (insert string) + (shr-pixel-column)))) + (defun shr-insert (text) - (when (and (eq shr-state 'image) - (not (bolp)) - (not (string-match "\\`[ \t\n]+\\'" text))) - (insert "\n") - (setq shr-state nil)) + (when (and (not (bolp)) + (get-text-property (1- (point)) 'image-url)) + (insert "\n")) (cond ((eq shr-folding-mode 'none) - (insert text)) + (let ((start (point))) + (insert text) + (save-restriction + (narrow-to-region start (point)) + ;; Remove soft hyphens. + (goto-char (point-min)) + (while (search-forward "­" nil t) + (replace-match "" t t)) + (goto-char (point-max))))) (t - (when (and (string-match "\\`[ \t\n ]" text) - (not (bolp)) - (not (eq (char-after (1- (point))) ? ))) - (insert " ")) - (dolist (elem (split-string text "[ \f\t\n\r\v ]+" t)) - (when (and (bolp) - (> shr-indentation 0)) - (shr-indent)) - ;; No space is needed behind a wide character categorized as - ;; kinsoku-bol, between characters both categorized as nospace, - ;; or at the beginning of a line. - (let (prev) - (when (and (> (current-column) shr-indentation) - (eq (preceding-char) ? ) - (or (= (line-beginning-position) (1- (point))) - (and (shr-char-breakable-p - (setq prev (char-after (- (point) 2)))) - (shr-char-kinsoku-bol-p prev)) - (and (shr-char-nospace-p prev) - (shr-char-nospace-p (aref elem 0))))) - (delete-char -1))) - ;; The shr-start is a special variable that is used to pass - ;; upwards the first point in the buffer where the text really - ;; starts. - (unless shr-start - (setq shr-start (point))) - (insert elem) - (setq shr-state nil) - (let (found) - (while (and (> (current-column) shr-internal-width) - (> shr-internal-width 0) - (progn - (setq found (shr-find-fill-point)) - (not (eolp)))) - (when (eq (preceding-char) ? ) - (delete-char -1)) - (insert "\n") - (unless found - ;; No space is needed at the beginning of a line. - (when (eq (following-char) ? ) - (delete-char 1))) - (when (> shr-indentation 0) - (shr-indent)) - (end-of-line)) - (if (<= (current-column) shr-internal-width) - (insert " ") - ;; In case we couldn't get a valid break point (because of a - ;; word that's longer than `shr-internal-width'), just break anyway. - (insert "\n") - (when (> shr-indentation 0) - (shr-indent))))) - (unless (string-match "[ \t\r\n ]\\'" text) - (delete-char -1))))) - -(defun shr-find-fill-point () - (when (> (move-to-column shr-internal-width) shr-internal-width) - (backward-char 1)) + (let ((font-start (point))) + (when (and (string-match "\\`[ \t\n\r ]" text) + (not (bolp)) + (not (eq (char-after (1- (point))) ? ))) + (insert " ")) + (let ((start (point)) + (bolp (bolp))) + (insert text) + (save-restriction + (narrow-to-region start (point)) + (goto-char start) + (when (looking-at "[ \t\n\r ]+") + (replace-match "" t t)) + (while (re-search-forward "[ \t\n\r ]+" nil t) + (replace-match " " t t)) + ;; Remove soft hyphens. + (goto-char (point-min)) + (while (search-forward "­" nil t) + (replace-match "" t t)) + (goto-char (point-max))) + ;; We may have removed everything we inserted if if was just + ;; spaces. + (unless (= font-start (point)) + ;; Mark all lines that should possibly be folded afterwards. + (when bolp + (shr-mark-fill start)) + (when shr-use-fonts + (put-text-property font-start (point) + 'face + (or shr-current-font 'variable-pitch))))))))) + +(defun shr-fill-lines (start end) + (if (<= shr-internal-width 0) + nil + (save-restriction + (narrow-to-region start end) + (goto-char start) + (when (get-text-property (point) 'shr-indentation) + (shr-fill-line)) + (while (setq start (next-single-property-change start 'shr-indentation)) + (goto-char start) + (when (bolp) + (shr-fill-line))) + (goto-char (point-max))))) + +(defun shr-vertical-motion (column) + (if (not shr-use-fonts) + (move-to-column column) + (unless (eolp) + (forward-char 1)) + (vertical-motion (cons (/ column (frame-char-width)) 0)) + (unless (eolp) + (forward-char 1)))) + +(defun shr-fill-line () + (let ((shr-indentation (get-text-property (point) 'shr-indentation)) + (continuation (get-text-property + (point) 'shr-continuation-indentation)) + start) + (put-text-property (point) (1+ (point)) 'shr-indentation nil) + (let ((face (get-text-property (point) 'face)) + (background-start (point))) + (shr-indent) + (when face + (put-text-property background-start (point) 'face + `,(shr-face-background face)))) + (setq start (point)) + (setq shr-indentation (or continuation shr-indentation)) + (shr-vertical-motion shr-internal-width) + (when (looking-at " $") + (delete-region (point) (line-end-position))) + (while (not (eolp)) + ;; We have to do some folding. First find the first + ;; previous point suitable for folding. + (if (or (not (shr-find-fill-point (line-beginning-position))) + (= (point) start)) + ;; We had unbreakable text (for this width), so just go to + ;; the first space and carry on. + (progn + (beginning-of-line) + (skip-chars-forward " ") + (search-forward " " (line-end-position) 'move))) + ;; Success; continue. + (when (= (preceding-char) ?\s) + (delete-char -1)) + (let ((face (get-text-property (point) 'face)) + (background-start (point))) + (insert "\n") + (shr-indent) + (when face + (put-text-property background-start (point) 'face + `,(shr-face-background face)))) + (setq start (point)) + (shr-vertical-motion shr-internal-width) + (when (looking-at " $") + (delete-region (point) (line-end-position)))))) + +(defun shr-find-fill-point (start) (let ((bp (point)) + (end (point)) failed) - (while (not (or (setq failed (<= (current-column) shr-indentation)) + (while (not (or (setq failed (<= (point) start)) (eq (preceding-char) ? ) (eq (following-char) ? ) (shr-char-breakable-p (preceding-char)) @@ -547,12 +637,12 @@ size, and full-buffer size." (while (and (not (memq (preceding-char) (list ?\C-@ ?\n ? ))) (shr-char-kinsoku-eol-p (preceding-char))) (backward-char 1)) - (when (setq failed (<= (current-column) shr-indentation)) + (when (setq failed (<= (point) start)) ;; There's no breakable point that doesn't violate kinsoku, ;; so we look for the second best position. (while (and (progn (forward-char 1) - (<= (current-column) shr-internal-width)) + (<= (point) end)) (progn (setq bp (point)) (shr-char-kinsoku-eol-p (following-char))))) @@ -567,7 +657,7 @@ size, and full-buffer size." (not (memq (preceding-char) (list ?\C-@ ?\n ? ))) (or (shr-char-kinsoku-eol-p (preceding-char)) (shr-char-kinsoku-bol-p (following-char))))))) - (when (setq failed (<= (current-column) shr-indentation)) + (when (setq failed (<= (point) start)) ;; There's no breakable point that doesn't violate kinsoku, ;; so we go to the second best position. (if (looking-at "\\(\\c<+\\)\\c<") @@ -644,33 +734,47 @@ size, and full-buffer size." (defun shr-ensure-paragraph () (unless (bobp) - (if (<= (current-column) shr-indentation) - (unless (save-excursion - (forward-line -1) - (looking-at " *$")) - (insert "\n")) - (if (save-excursion - (beginning-of-line) - ;; If the current line is totally blank, and doesn't even - ;; have any face properties set, then delete the blank - ;; space. - (and (looking-at " *$") - (not (get-text-property (point) 'face)) - (not (= (next-single-property-change (point) 'face nil - (line-end-position)) - (line-end-position))))) - (delete-region (match-beginning 0) (match-end 0)) - (insert "\n\n"))))) + (let ((prefix (get-text-property (line-beginning-position) + 'shr-prefix-length))) + (cond + ((and (bolp) + (save-excursion + (forward-line -1) + (looking-at " *$"))) + ;; We're already at a new paragraph; do nothing. + ) + ((and prefix + (= prefix (- (point) (line-beginning-position)))) + ;; Do nothing; we're at the start of a
  • . + ) + ((save-excursion + (beginning-of-line) + ;; If the current line is totally blank, and doesn't even + ;; have any face properties set, then delete the blank + ;; space. + (and (looking-at " *$") + (not (get-text-property (point) 'face)) + (not (= (next-single-property-change (point) 'face nil + (line-end-position)) + (line-end-position))))) + (delete-region (match-beginning 0) (match-end 0))) + (t + (insert "\n\n")))))) (defun shr-indent () (when (> shr-indentation 0) - (insert (make-string shr-indentation ? )))) + (insert + (if (not shr-use-fonts) + (make-string shr-indentation ?\s) + (propertize " " + 'display + `(space :width (,shr-indentation))))))) (defun shr-fontize-dom (dom &rest types) - (let (shr-start) + (let ((start (point))) (shr-generic dom) (dolist (type types) - (shr-add-font (or shr-start (point)) (point) type)))) + (shr-add-font start (point) type)))) ;; Add face to the region, but avoid putting the font properties on ;; blank text at the start of the line, and the newline at the end, to @@ -948,44 +1052,6 @@ ones, in case fg and bg are nil." t))) new-colors))) -(defun shr-expand-newlines (start end color) - (save-restriction - ;; Skip past all white space at the start and ends. - (goto-char start) - (skip-chars-forward " \t\n") - (beginning-of-line) - (setq start (point)) - (goto-char end) - (skip-chars-backward " \t\n") - (forward-line 1) - (setq end (point)) - (narrow-to-region start end) - (let ((width (shr-buffer-width)) - column) - (goto-char (point-min)) - (while (not (eobp)) - (end-of-line) - (when (and (< (setq column (current-column)) width) - (< (setq column (shr-previous-newline-padding-width column)) - width)) - (let ((overlay (make-overlay (point) (1+ (point))))) - (overlay-put overlay 'before-string - (concat - (mapconcat - (lambda (overlay) - (let ((string (plist-get - (overlay-properties overlay) - 'before-string))) - (if (not string) - "" - (overlay-put overlay 'before-string "") - string))) - (overlays-at (point)) - "") - (propertize (make-string (- width column) ? ) - 'face (list :background color)))))) - (forward-line 1))))) - (defun shr-previous-newline-padding-width (width) (let ((overlays (overlays-at (point))) (previous-width 0)) @@ -1070,13 +1136,11 @@ ones, in case fg and bg are nil." (defun shr-tag-p (dom) (shr-ensure-paragraph) - (shr-indent) (shr-generic dom) (shr-ensure-paragraph)) (defun shr-tag-div (dom) (shr-ensure-newline) - (shr-indent) (shr-generic dom) (shr-ensure-newline)) @@ -1101,6 +1165,10 @@ ones, in case fg and bg are nil." (defun shr-tag-u (dom) (shr-fontize-dom dom 'underline)) +(defun shr-tag-tt (dom) + (let ((shr-current-font 'default)) + (shr-generic dom))) + (defun shr-parse-style (style) (when style (save-match-data @@ -1116,9 +1184,10 @@ ones, in case fg and bg are nil." (value (replace-regexp-in-string "^ +\\| +$" "" (cadr elem)))) (when (string-match " *!important\\'" value) (setq value (substring value 0 (match-beginning 0)))) - (push (cons (intern name obarray) - value) - plist))))) + (unless (equal value "inherit") + (push (cons (intern name obarray) + value) + plist)))))) plist))) (defun shr-tag-base (dom) @@ -1245,8 +1314,7 @@ The preference is a float determined from `shr-prefer-media-type'." (when (or url (and dom (> (length (dom-attr dom 'src)) 0))) - (when (and (> (current-column) 0) - (not (eq shr-state 'image))) + (when (> (current-column) 0) (insert "\n")) (let ((alt (dom-attr dom 'alt)) (url (shr-expand-url (or url (dom-attr dom 'src))))) @@ -1276,10 +1344,9 @@ The preference is a float determined from `shr-prefer-media-type'." (and shr-blocked-images (string-match shr-blocked-images url))) (setq shr-start (point)) - (let ((shr-state 'space)) - (if (> (string-width alt) 8) - (shr-insert (truncate-string-to-width alt 8)) - (shr-insert alt)))) + (if (> (string-width alt) 8) + (shr-insert (truncate-string-to-width alt 8)) + (shr-insert alt))) ((and (not shr-ignore-cache) (url-is-cached (shr-encode-url url))) (funcall shr-put-image-function (shr-get-image-data url) alt)) @@ -1301,22 +1368,24 @@ The preference is a float determined from `shr-prefer-media-type'." (put-text-property start (point) 'image-displayer (shr-image-displayer shr-content-function)) (put-text-property start (point) 'help-echo - (shr-fold-text (or (dom-attr dom 'title) alt)))) - (setq shr-state 'image))))) + (shr-fill-text + (or (dom-attr dom 'title) alt)))))))) (defun shr-tag-pre (dom) - (let ((shr-folding-mode 'none)) + (let ((shr-folding-mode 'none) + (shr-current-font 'default)) (shr-ensure-newline) - (shr-indent) (shr-generic dom) (shr-ensure-newline))) (defun shr-tag-blockquote (dom) (shr-ensure-paragraph) - (shr-indent) - (let ((shr-indentation (+ shr-indentation 4))) - (shr-generic dom)) - (shr-ensure-paragraph)) + (let ((start (point)) + (shr-indentation (+ shr-indentation + (* 4 shr-table-separator-pixel-width)))) + (shr-generic dom) + (shr-ensure-paragraph) + (shr-mark-fill start))) (defun shr-tag-dl (dom) (shr-ensure-paragraph) @@ -1330,7 +1399,8 @@ The preference is a float determined from `shr-prefer-media-type'." (defun shr-tag-dd (dom) (shr-ensure-newline) - (let ((shr-indentation (+ shr-indentation 4))) + (let ((shr-indentation (+ shr-indentation + (* 4 shr-table-separator-pixel-width)))) (shr-generic dom))) (defun shr-tag-ul (dom) @@ -1347,16 +1417,29 @@ The preference is a float determined from `shr-prefer-media-type'." (defun shr-tag-li (dom) (shr-ensure-newline) - (shr-indent) - (let* ((bullet - (if (numberp shr-list-mode) - (prog1 - (format "%d " shr-list-mode) - (setq shr-list-mode (1+ shr-list-mode))) - shr-bullet)) - (shr-indentation (+ shr-indentation (length bullet)))) - (insert bullet) - (shr-generic dom))) + (let ((start (point))) + (let* ((bullet + (if (numberp shr-list-mode) + (prog1 + (format "%d " shr-list-mode) + (setq shr-list-mode (1+ shr-list-mode))) + (car shr-internal-bullet))) + (width (if (numberp shr-list-mode) + (shr-string-pixel-width bullet) + (cdr shr-internal-bullet)))) + (insert bullet) + (shr-mark-fill start) + (let ((shr-indentation (+ shr-indentation width))) + (put-text-property start (1+ start) + 'shr-continuation-indentation shr-indentation) + (put-text-property start (1+ start) 'shr-prefix-length (length bullet)) + (shr-generic dom))))) + +(defun shr-mark-fill (start) + ;; We may not have inserted any text to fill. + (unless (= start (point)) + (put-text-property start (1+ start) + 'shr-indentation shr-indentation))) (defun shr-tag-br (dom) (when (and (not (bobp)) @@ -1365,15 +1448,16 @@ The preference is a float determined from `shr-prefer-media-type'." (or (not (bolp)) (and (> (- (point) 2) (point-min)) (not (= (char-after (- (point) 2)) ?\n))))) - (insert "\n") - (shr-indent)) + (insert "\n")) (shr-generic dom)) (defun shr-tag-span (dom) (shr-generic dom)) (defun shr-tag-h1 (dom) - (shr-heading dom 'bold 'underline)) + (shr-heading dom (if shr-use-fonts + '(variable-pitch (:height 1.3 :weight bold)) + 'bold))) (defun shr-tag-h2 (dom) (shr-heading dom 'bold)) @@ -1392,7 +1476,12 @@ The preference is a float determined from `shr-prefer-media-type'." (defun shr-tag-hr (_dom) (shr-ensure-newline) - (insert (make-string shr-internal-width shr-hr-line) "\n")) + (insert (make-string (if (not shr-use-fonts) + shr-internal-width + (1+ (/ shr-internal-width + shr-table-separator-pixel-width))) + shr-hr-line) + "\n")) (defun shr-tag-title (dom) (shr-heading dom 'bold 'underline)) @@ -1424,20 +1513,23 @@ The preference is a float determined from `shr-prefer-media-type'." (shr-kinsoku-shorten t) ;; Find all suggested widths. (columns (shr-column-specs dom)) - ;; Compute how many characters wide each TD should be. + ;; Compute how many pixels wide each TD should be. (suggested-widths (shr-pro-rate-columns columns)) ;; Do a "test rendering" to see how big each TD is (this can ;; be smaller (if there's little text) or bigger (if there's ;; unbreakable text). - (sketch (shr-make-table dom suggested-widths)) - ;; Compute the "natural" width by setting each column to 500 - ;; characters and see how wide they really render. - (natural (shr-make-table dom (make-vector (length columns) 500))) + (elems (or (dom-attr dom 'shr-suggested-widths) + (shr-make-table dom suggested-widths nil + 'shr-suggested-widths))) + (sketch (loop for line in elems + collect (mapcar #'car line))) + (natural (loop for line in elems + collect (mapcar #'cdr line))) (sketch-widths (shr-table-widths sketch natural suggested-widths))) ;; This probably won't work very well. (when (> (+ (loop for width across sketch-widths summing (1+ width)) - shr-indentation 1) + shr-indentation shr-table-separator-pixel-width) (frame-width)) (setq truncate-lines t)) ;; Then render the table again with these new "hard" widths. @@ -1466,64 +1558,71 @@ The preference is a float determined from `shr-prefer-media-type'." ;; Try to output it anyway. (shr-generic dom) ;; It's a real table, so render it. - (shr-tag-table-1 - (nconc - (list 'table nil) - (if caption `((tr nil (td nil ,@caption)))) - (cond (header - (if footer - ;; header + body + footer - (if (= nheader nbody) - (if (= nbody nfooter) - `((tr nil (td nil (table nil - (tbody nil ,@header - ,@body ,@footer))))) - (nconc `((tr nil (td nil (table nil - (tbody nil ,@header - ,@body))))) - (if (= nfooter 1) - footer - `((tr nil (td nil (table - nil (tbody - nil ,@footer)))))))) - (nconc `((tr nil (td nil (table nil (tbody - nil ,@header))))) - (if (= nbody nfooter) - `((tr nil (td nil (table - nil (tbody nil ,@body - ,@footer))))) - (nconc `((tr nil (td nil (table - nil (tbody nil + (if (dom-attr dom 'shr-fixed-table) + (shr-tag-table-1 dom) + ;; Only fix up the table once. + (let ((table + (nconc + (list 'table nil) + (if caption `((tr nil (td nil ,@caption)))) + (cond + (header + (if footer + ;; header + body + footer + (if (= nheader nbody) + (if (= nbody nfooter) + `((tr nil (td nil (table nil + (tbody nil ,@header + ,@body ,@footer))))) + (nconc `((tr nil (td nil (table nil + (tbody nil ,@header ,@body))))) - (if (= nfooter 1) - footer - `((tr nil (td nil (table - nil - (tbody - nil - ,@footer)))))))))) - ;; header + body - (if (= nheader nbody) - `((tr nil (td nil (table nil (tbody nil ,@header - ,@body))))) - (if (= nheader 1) - `(,@header (tr nil (td nil (table - nil (tbody nil ,@body))))) - `((tr nil (td nil (table nil (tbody nil ,@header)))) - (tr nil (td nil (table nil (tbody nil ,@body))))))))) - (footer - ;; body + footer - (if (= nbody nfooter) - `((tr nil (td nil (table - nil (tbody nil ,@body ,@footer))))) - (nconc `((tr nil (td nil (table nil (tbody nil ,@body))))) - (if (= nfooter 1) - footer - `((tr nil (td nil (table - nil (tbody nil ,@footer))))))))) - (caption - `((tr nil (td nil (table nil (tbody nil ,@body)))))) - (body))))) + (if (= nfooter 1) + footer + `((tr nil (td nil (table + nil (tbody + nil ,@footer)))))))) + (nconc `((tr nil (td nil (table nil (tbody + nil ,@header))))) + (if (= nbody nfooter) + `((tr nil (td nil (table + nil (tbody nil ,@body + ,@footer))))) + (nconc `((tr nil (td nil (table + nil (tbody nil + ,@body))))) + (if (= nfooter 1) + footer + `((tr nil (td nil (table + nil + (tbody + nil + ,@footer)))))))))) + ;; header + body + (if (= nheader nbody) + `((tr nil (td nil (table nil (tbody nil ,@header + ,@body))))) + (if (= nheader 1) + `(,@header (tr nil (td nil (table + nil (tbody nil ,@body))))) + `((tr nil (td nil (table nil (tbody nil ,@header)))) + (tr nil (td nil (table nil (tbody nil ,@body))))))))) + (footer + ;; body + footer + (if (= nbody nfooter) + `((tr nil (td nil (table + nil (tbody nil ,@body ,@footer))))) + (nconc `((tr nil (td nil (table nil (tbody nil ,@body))))) + (if (= nfooter 1) + footer + `((tr nil (td nil (table + nil (tbody nil ,@footer))))))))) + (caption + `((tr nil (td nil (table nil (tbody nil ,@body)))))) + (body))))) + (dom-set-attribute table 'shr-fixed-table t) + (setcdr dom (cdr table)) + (shr-tag-table-1 dom)))) (when bgcolor (shr-colorize-region start (point) (cdr (assq 'color shr-stylesheet)) bgcolor)) @@ -1531,6 +1630,8 @@ The preference is a float determined from `shr-prefer-media-type'." ;; model isn't strong enough to allow us to put the images actually ;; into the tables. (when (zerop shr-table-depth) + (save-excursion + (shr-expand-alignments start (point))) (dolist (elem (dom-by-tag dom 'object)) (shr-tag-object elem)) (dolist (elem (dom-by-tag dom 'img)) @@ -1540,38 +1641,102 @@ The preference is a float determined from `shr-prefer-media-type'." (let* ((collapse (equal (cdr (assq 'border-collapse shr-stylesheet)) "collapse")) (shr-table-separator-length (if collapse 0 1)) - (shr-table-vertical-line (if collapse "" shr-table-vertical-line))) + (shr-table-vertical-line (if collapse "" shr-table-vertical-line)) + (start (point))) + (setq shr-table-id (1+ shr-table-id)) (unless collapse (shr-insert-table-ruler widths)) (dolist (row table) (let ((start (point)) + (align 0) + (column-number 0) (height (let ((max 0)) (dolist (column row) - (setq max (max max (cadr column)))) + (setq max (max max (nth 2 column)))) max))) - (dotimes (i height) + (dotimes (i (max height 1)) (shr-indent) (insert shr-table-vertical-line "\n")) (dolist (column row) - (goto-char start) - (let ((lines (nth 2 column))) - (dolist (line lines) - (end-of-line) - (insert line shr-table-vertical-line) - (forward-line 1)) - ;; Add blank lines at padding at the bottom of the TD, - ;; possibly. - (dotimes (i (- height (length lines))) - (end-of-line) - (let ((start (point))) - (insert (make-string (string-width (car lines)) ? ) - shr-table-vertical-line) - (when (nth 4 column) - (shr-add-font start (1- (point)) - (list :background (nth 4 column))))) - (forward-line 1))))) + (when (> (nth 2 column) -1) + (goto-char start) + ;; Sum up all the widths from the column. (There may be + ;; more than one if this is a "colspan" column.) + (dotimes (i (nth 4 column)) + ;; The colspan directive may be wrong and there may not be + ;; that number of columns. + (when (<= column-number (1- (length widths))) + (setq align (+ align + (aref widths column-number) + (* 2 shr-table-separator-pixel-width)))) + (setq column-number (1+ column-number))) + (let ((lines (nth 3 column)) + (pixel-align (if (not shr-use-fonts) + (* align (frame-char-width)) + align))) + (dolist (line lines) + (end-of-line) + (let ((start (point))) + (insert + line + (propertize " " + 'display `(space :align-to (,pixel-align)) + 'face (and (> (length line) 0) + (shr-face-background + (get-text-property + (1- (length line)) 'face line))) + 'shr-table-indent shr-table-id) + shr-table-vertical-line) + (shr-colorize-region + start (1- (point)) (nth 5 column) (nth 6 column))) + (forward-line 1)) + ;; Add blank lines at padding at the bottom of the TD, + ;; possibly. + (dotimes (i (- height (length lines))) + (end-of-line) + (let ((start (point))) + (insert (propertize " " + 'display `(space :align-to (,pixel-align)) + 'shr-table-indent shr-table-id) + shr-table-vertical-line) + (shr-colorize-region + start (1- (point)) (nth 5 column) (nth 6 column))) + (forward-line 1)))))) (unless collapse - (shr-insert-table-ruler widths))))) + (shr-insert-table-ruler widths))) + (unless (= start (point)) + (put-text-property start (1+ start) 'shr-table-id shr-table-id)))) + +(defun shr-face-background (face) + (and (consp face) + (let ((background nil)) + (dolist (elem face) + (when (and (consp elem) + (eq (car elem) :background)) + (setq background (cadr elem)))) + (and background + (list :background background))))) + +(defun shr-expand-alignments (start end) + (while (< (setq start (next-single-property-change + start 'shr-table-id nil end)) + end) + (goto-char start) + (let* ((shr-use-fonts t) + (id (get-text-property (point) 'shr-table-id)) + (base (shr-pixel-column)) + elem) + (when id + (save-excursion + (while (setq elem (text-property-any + (point) end 'shr-table-indent id)) + (goto-char elem) + (let ((align (get-text-property (point) 'display))) + (put-text-property (point) (1+ (point)) 'display + `(space :align-to (,(+ (car (nth 2 align)) + base))))) + (forward-char 1))))) + (setq start (1+ start)))) (defun shr-insert-table-ruler (widths) (when shr-table-horizontal-line @@ -1579,9 +1744,17 @@ The preference is a float determined from `shr-prefer-media-type'." (> shr-indentation 0)) (shr-indent)) (insert shr-table-corner) - (dotimes (i (length widths)) - (insert (make-string (aref widths i) shr-table-horizontal-line) - shr-table-corner)) + (let ((total-width 0)) + (dotimes (i (length widths)) + (setq total-width (+ total-width (aref widths i) + (* shr-table-separator-pixel-width 2))) + (insert (make-string (1+ (/ (aref widths i) + shr-table-separator-pixel-width)) + shr-table-horizontal-line) + (propertize " " + 'display `(space :align-to (,total-width)) + 'shr-table-indent shr-table-id) + shr-table-corner))) (insert "\n"))) (defun shr-table-widths (table natural-table suggested-widths) @@ -1599,7 +1772,8 @@ The preference is a float determined from `shr-prefer-media-type'." (aset natural-widths i (max (aref natural-widths i) column)) (setq i (1+ i))))) (let ((extra (- (apply '+ (append suggested-widths nil)) - (apply '+ (append widths nil)))) + (apply '+ (append widths nil)) + (* shr-table-separator-pixel-width (1+ (length widths))))) (expanded-columns 0)) ;; We have extra, unused space, so divide this space amongst the ;; columns. @@ -1617,11 +1791,13 @@ The preference is a float determined from `shr-prefer-media-type'." (aref widths i)))))))) widths)) -(defun shr-make-table (dom widths &optional fill) +(defun shr-make-table (dom widths &optional fill storage-attribute) (or (cadr (assoc (list dom widths fill) shr-content-cache)) (let ((data (shr-make-table-1 dom widths fill))) (push (list (list dom widths fill) data) shr-content-cache) + (when storage-attribute + (dom-set-attribute dom storage-attribute data)) data))) (defun shr-make-table-1 (dom widths &optional fill) @@ -1634,7 +1810,7 @@ The preference is a float determined from `shr-prefer-media-type'." (dolist (row (dom-non-text-children dom)) (when (eq (dom-tag row) 'tr) (let ((tds nil) - (columns (dom-children row)) + (columns (dom-non-text-children row)) (i 0) (width-column 0) column) @@ -1660,7 +1836,7 @@ The preference is a float determined from `shr-prefer-media-type'." (setq width (if column (aref widths width-column) - 10)) + (* 10 shr-table-separator-pixel-width))) (when (setq colspan (dom-attr column 'colspan)) (setq colspan (min (string-to-number colspan) ;; The colspan may be wrong, so @@ -1682,35 +1858,80 @@ The preference is a float determined from `shr-prefer-media-type'." (setq width-column (+ width-column (1- colspan)) colspan-count colspan colspan-remaining colspan)) - (when (or column - (not fill)) + (when column (let ((data (shr-render-td column width fill))) (if (and (not fill) (> colspan-remaining 0)) (progn - (when (= colspan-count colspan-remaining) - (setq colspan-width data)) + (setq colspan-width (car data)) (let ((this-width (/ colspan-width colspan-count))) - (push this-width tds) + (push (cons this-width (cadr data)) tds) (setq colspan-remaining (1- colspan-remaining)))) - (push data tds)))) + (if (not fill) + (push (cons (car data) (cadr data)) tds) + (push data tds))))) + (when (and colspan + (> colspan 1)) + (dotimes (c (1- colspan)) + (setq i (1+ i)) + (push + (if fill + (list 0 0 -1 nil 1 nil nil) + '(0 . 0)) + tds))) (setq i (1+ i) width-column (1+ width-column)))) (push (nreverse tds) trs)))) (nreverse trs))) +(defun shr-pixel-buffer-width () + (if (not shr-use-fonts) + (save-excursion + (goto-char (point-min)) + (let ((max 0)) + (while (not (eobp)) + (end-of-line) + (setq max (max max (current-column))) + (forward-line 1)) + max)) + (if (get-buffer-window) + (car (window-text-pixel-size nil (point-min) (point-max))) + (save-window-excursion + (set-window-buffer nil (current-buffer)) + (car (window-text-pixel-size nil (point-min) (point-max))))))) + (defun shr-render-td (dom width fill) + (let ((cache (intern (format "shr-td-cache-%s-%s" width fill)))) + (or (dom-attr dom cache) + (and fill + (let (result) + (dolist (attr (dom-attributes dom)) + (let ((name (symbol-name (car attr)))) + (when (string-match "shr-td-cache-\\([0-9]+\\)-nil" name) + (let ((cache-width (string-to-number + (match-string 1 name)))) + (when (and (>= cache-width width) + (<= (car (cdr attr)) width)) + (setq result (cdr attr))))))) + result)) + (let ((result (shr-render-td-1 dom width fill))) + (dom-set-attribute dom cache result) + result)))) + +(defun shr-render-td-1 (dom width fill) (with-temp-buffer (let ((bgcolor (dom-attr dom 'bgcolor)) (fgcolor (dom-attr dom 'fgcolor)) (style (dom-attr dom 'style)) (shr-stylesheet shr-stylesheet) - actual-colors) + (max-width 0) + natural-width) (when style (setq style (and (string-match "color" style) (shr-parse-style style)))) (when bgcolor - (setq style (nconc (list (cons 'background-color bgcolor)) style))) + (setq style (nconc (list (cons 'background-color bgcolor)) + style))) (when fgcolor (setq style (nconc (list (cons 'color fgcolor)) style))) (when style @@ -1718,6 +1939,22 @@ The preference is a float determined from `shr-prefer-media-type'." (let ((shr-internal-width width) (shr-indentation 0)) (shr-descend dom)) + (save-window-excursion + (set-window-buffer nil (current-buffer)) + (unless fill + (setq natural-width + (or (dom-attr dom 'shr-td-cache-natural) + (let ((natural (max (shr-pixel-buffer-width) + (shr-dom-max-natural-width dom 0)))) + (dom-set-attribute dom 'shr-td-cache-natural natural) + natural)))) + (if (and natural-width + (<= natural-width width)) + (setq max-width natural-width) + (let ((shr-internal-width width)) + (shr-fill-lines (point-min) (point-max)) + (setq max-width (shr-pixel-buffer-width))))) + (goto-char (point-max)) ;; Delete padding at the bottom of the TDs. (delete-region (point) @@ -1726,48 +1963,31 @@ The preference is a float determined from `shr-prefer-media-type'." (end-of-line) (point))) (goto-char (point-min)) - (let ((max 0)) - (while (not (eobp)) - (end-of-line) - (setq max (max max (current-column))) - (forward-line 1)) - (when fill - (goto-char (point-min)) - ;; If the buffer is totally empty, then put a single blank - ;; line here. - (if (zerop (buffer-size)) - (insert (make-string width ? )) - ;; Otherwise, fill the buffer. - (let ((align (dom-attr dom 'align)) - length) - (while (not (eobp)) - (end-of-line) - (setq length (- width (current-column))) - (when (> length 0) - (cond - ((equal align "right") - (beginning-of-line) - (insert (make-string length ? ))) - ((equal align "center") - (insert (make-string (/ length 2) ? )) - (beginning-of-line) - (insert (make-string (- length (/ length 2)) ? ))) - (t - (insert (make-string length ? ))))) - (forward-line 1)))) - (when style - (setq actual-colors - (shr-colorize-region - (point-min) (point-max) - (cdr (assq 'color shr-stylesheet)) - (cdr (assq 'background-color shr-stylesheet)))))) - (if fill - (list max - (count-lines (point-min) (point-max)) - (split-string (buffer-string) "\n") - nil - (car actual-colors)) - max))))) + (list max-width + natural-width + (count-lines (point-min) (point-max)) + (split-string (buffer-string) "\n") + (if (dom-attr dom 'colspan) + (string-to-number (dom-attr dom 'colspan)) + 1) + (cdr (assq 'color shr-stylesheet)) + (cdr (assq 'background-color shr-stylesheet)))))) + +(defun shr-dom-max-natural-width (dom max) + (if (eq (dom-tag dom) 'table) + (max max (or + (loop for line in (dom-attr dom 'shr-suggested-widths) + maximize (+ + shr-table-separator-length + (loop for elem in line + summing + (+ (cdr elem) + (* 2 shr-table-separator-length))))) + 0)) + (dolist (child (dom-children dom)) + (unless (stringp child) + (setq max (max (shr-dom-max-natural-width child max))))) + max)) (defun shr-buffer-width () (goto-char (point-min)) @@ -1788,7 +2008,8 @@ The preference is a float determined from `shr-prefer-media-type'." (aset widths i (max (truncate (* (aref columns i) total-percentage (- shr-internal-width - (1+ (length columns))))) + (* (1+ (length columns)) + shr-table-separator-pixel-width)))) 10))) widths)) @@ -1798,9 +2019,8 @@ The preference is a float determined from `shr-prefer-media-type'." (dolist (row (dom-non-text-children dom)) (when (eq (dom-tag row) 'tr) (let ((i 0)) - (dolist (column (dom-children row)) - (when (and (not (stringp column)) - (memq (dom-tag column) '(td th))) + (dolist (column (dom-non-text-children row)) + (when (memq (dom-tag column) '(td th)) (let ((width (dom-attr column 'width))) (when (and width (string-match "\\([0-9]+\\)%" width) diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index f5e201985f..a92ca4df51 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -38,16 +38,26 @@ ;; Pacify byte-compiler. (defvar directory-sep-char) +;;;###tramp-autoload (defcustom tramp-adb-program "adb" "Name of the Android Debug Bridge program." :group 'tramp :version "24.4" :type 'string) +;;;###tramp-autoload +(defcustom tramp-adb-connect-if-not-connected nil + "Try to run `adb connect' if provided device is not connected currently. +It is used for TCP/IP devices." + :group 'tramp + :version "25.1" + :type 'boolean) + ;;;###tramp-autoload (defconst tramp-adb-method "adb" "*When this method name is used, forward all calls to Android Debug Bridge.") +;;;###tramp-autoload (defcustom tramp-adb-prompt "^\\(?:[[:digit:]]*|?\\)?\\(?:[[:alnum:]]*@[[:alnum:]]*[^#\\$]*\\)?[#\\$][[:space:]]" "Regexp used as prompt in almquist shell." @@ -65,12 +75,13 @@ "[[:space:]]+\\([^[:space:]]+\\)" ; \3 group "[[:space:]]+\\([[:digit:]]+\\)" ; \4 size "[[:space:]]+\\([-[:digit:]]+[[:space:]][:[:digit:]]+\\)" ; \5 date - "[[:space:]]+\\(.*\\)$")) ; \6 filename + "[[:space:]]\\(.*\\)$")) ; \6 filename ;;;###tramp-autoload (add-to-list 'tramp-methods `(,tramp-adb-method - (tramp-tmpdir "/data/local/tmp"))) + (tramp-tmpdir "/data/local/tmp") + (tramp-default-port 5555))) ;;;###tramp-autoload (add-to-list 'tramp-default-host-alist `(,tramp-adb-method nil "")) @@ -182,14 +193,27 @@ pass to the OPERATION." ;; That's why we use `start-process'. (let ((p (start-process tramp-adb-program (current-buffer) tramp-adb-program "devices")) + (v (vector tramp-adb-method tramp-current-user + tramp-current-host nil nil)) result) + (tramp-message v 6 "%s" (mapconcat 'identity (process-command p) " ")) (tramp-compat-set-process-query-on-exit-flag p nil) (while (eq 'run (process-status p)) (accept-process-output p 0.1)) (accept-process-output p 0.1) + (tramp-message v 6 "\n%s" (buffer-string)) (goto-char (point-min)) (while (search-forward-regexp "^\\(\\S-+\\)[[:space:]]+device$" nil t) (add-to-list 'result (list nil (match-string 1)))) + + ;; Replace ":" by "#". + (mapc + (lambda (elt) + (setcar + (cdr elt) + (replace-regexp-in-string + ":" tramp-prefix-port-format (car (cdr elt))))) + result) result)))) (defun tramp-adb-handle-expand-file-name (name &optional dir) @@ -383,8 +407,10 @@ pass to the OPERATION." (tramp-adb-send-command v (format "%s -d -a -l %s %s" (tramp-adb-get-ls-command v) - (concat (file-name-as-directory localname) ".") - (concat (file-name-as-directory localname) ".."))) + (tramp-shell-quote-argument + (concat (file-name-as-directory localname) ".")) + (tramp-shell-quote-argument + (concat (file-name-as-directory localname) "..")))) (widen)) (tramp-adb-sh-fix-ls-output) (let ((result (tramp-do-parse-file-attributes-with-ls @@ -989,12 +1015,51 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (tramp-set-connection-property v "process-name" nil) (tramp-set-connection-property v "process-buffer" nil)))))) -;; Helper functions. +(defun tramp-adb-get-device (vec) + "Return full host name from VEC to be used in shell execution. +E.g. a host name \"192.168.1.1#5555\" returns \"192.168.1.1:5555\" + a host name \"R38273882DE\" returns \"R38273882DE\"." + ;; Sometimes this is called before there is a connection process + ;; yet. In order to work with the connection cache, we flush all + ;; unwanted entries first. + (tramp-flush-connection-property nil) + (with-tramp-connection-property (tramp-get-connection-process vec) "device" + (let* ((method (tramp-file-name-method vec)) + (host (tramp-file-name-host vec)) + (port (tramp-file-name-port vec)) + (devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))) + (replace-regexp-in-string + tramp-prefix-port-format ":" + (cond ((member host devices) host) + ;; This is the case when the host is connected to the default port. + ((member (format "%s%s%d" host tramp-prefix-port-format port) + devices) + (format "%s:%d" host port)) + ;; An empty host name shall be mapped as well, when there + ;; is exactly one entry in `devices'. + ((and (zerop (length host)) (= (length devices) 1)) + (car devices)) + ;; Try to connect device. + ((and tramp-adb-connect-if-not-connected + (not (zerop (length host))) + (not (tramp-adb-execute-adb-command + vec "connect" + (replace-regexp-in-string + tramp-prefix-port-format ":" host)))) + ;; When new device connected, running other adb command (e.g. + ;; adb shell) immediately will fail. To get around this + ;; problem, add sleep 0.1 second here. + (sleep-for 0.1) + host) + (t (tramp-error + vec 'file-error "Could not find device %s" host))))))) (defun tramp-adb-execute-adb-command (vec &rest args) "Returns nil on success error-output on failure." - (when (> (length (tramp-file-name-host vec)) 0) - (setq args (append (list "-s" (tramp-file-name-host vec)) args))) + (when (and (> (length (tramp-file-name-host vec)) 0) + ;; The -s switch is only available for ADB device commands. + (not (member (car args) (list "connect" "disconnect")))) + (setq args (append (list "-s" (tramp-adb-get-device vec)) args))) (with-temp-buffer (prog1 (unless @@ -1097,7 +1162,12 @@ connection if a previous connection has died for some reason." (p (get-buffer-process buf)) (host (tramp-file-name-host vec)) (user (tramp-file-name-user vec)) - devices) + (device (tramp-adb-get-device vec))) + + ;; Set variables for proper tracing in `tramp-adb-parse-device-names'. + (setq tramp-current-method (tramp-file-name-method vec) + tramp-current-user (tramp-file-name-user vec) + tramp-current-host (tramp-file-name-host vec)) ;; Maybe we know already that "su" is not supported. We cannot ;; use a connection property, because we have not checked yet @@ -1109,20 +1179,13 @@ connection if a previous connection has died for some reason." (and p (processp p) (memq (process-status p) '(run open))) (save-match-data (when (and p (processp p)) (delete-process p)) - (setq devices (mapcar 'cadr (tramp-adb-parse-device-names nil))) - (if (not devices) - (tramp-error vec 'file-error "No device connected")) - (if (and (> (length host) 0) (not (member host devices))) + (if (zerop (length device)) (tramp-error vec 'file-error "Device %s not connected" host)) - (if (and (> (length devices) 1) (zerop (length host))) - (tramp-error - vec 'file-error - "Multiple Devices connected: No Host/Device specified")) (with-tramp-progress-reporter vec 3 "Opening adb shell connection" (let* ((coding-system-for-read 'utf-8-dos) ;is this correct? (process-connection-type tramp-process-connection-type) (args (if (> (length host) 0) - (list "-s" host "shell") + (list "-s" device "shell") (list "shell"))) (p (let ((default-directory (tramp-compat-temporary-file-directory))) @@ -1187,4 +1250,5 @@ connection if a previous connection has died for some reason." (unload-feature 'tramp-adb 'force))) (provide 'tramp-adb) + ;;; tramp-adb.el ends here diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index fb9d5e84c9..ba29ef0442 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el @@ -168,14 +168,16 @@ Returns VALUE." ;;;###tramp-autoload (defun tramp-flush-file-property (key file) "Remove all properties of FILE in the cache context of KEY." - ;; Remove file properties of symlinks. - (let ((truename (tramp-get-file-property key file "file-truename" nil))) + (let* ((file (tramp-run-real-handler + 'directory-file-name (list file))) + (truename (tramp-get-file-property key file "file-truename" nil))) + ;; Remove file properties of symlinks. (when (and (stringp truename) - (not (string-equal file truename))) + (not (string-equal file (directory-file-name truename)))) (tramp-flush-file-property key truename))) ;; Unify localname. (setq key (copy-sequence key)) - (aset key 3 (tramp-run-real-handler 'directory-file-name (list file))) + (aset key 3 file) (tramp-message key 8 "%s" file) (remhash key tramp-cache-data)) @@ -188,13 +190,14 @@ Remove also properties of all files in subdirectories." (truename (tramp-get-file-property key directory "file-truename" nil))) ;; Remove file properties of symlinks. (when (and (stringp truename) - (not (string-equal directory truename))) + (not (string-equal directory (directory-file-name truename)))) (tramp-flush-directory-property key truename)) (tramp-message key 8 "%s" directory) (maphash (lambda (key _value) (when (and (stringp (tramp-file-name-localname key)) - (string-match directory (tramp-file-name-localname key))) + (string-match (regexp-quote directory) + (tramp-file-name-localname key))) (remhash key tramp-cache-data))) tramp-cache-data))) @@ -362,7 +365,7 @@ KEY identifies the connection, it is either a process or a vector." (remhash key cache))) cache) ;; Dump it. - (with-temp-buffer + (with-temp-file tramp-persistency-file-name (insert ";; -*- emacs-lisp -*-" ;; `time-stamp-string' might not exist in all (X)Emacs flavors. @@ -376,9 +379,7 @@ KEY identifies the connection, it is either a process or a vector." ";; Tramp connection history. Don't change this file.\n" ";; You can delete it, forcing Tramp to reapply the checks.\n\n" (with-output-to-string - (pp (read (format "(%s)" (tramp-cache-print cache)))))) - (write-region - (point-min) (point-max) tramp-persistency-file-name)))))) + (pp (read (format "(%s)" (tramp-cache-print cache))))))))))) (unless noninteractive (add-hook 'kill-emacs-hook 'tramp-dump-connection-properties)) diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 1ea52eb670..5988a284c6 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -127,6 +127,7 @@ ;;;###tramp-autoload (add-to-list 'tramp-default-user-alist '("\\`synce\\'" nil nil)) +;;;###tramp-autoload (defcustom tramp-gvfs-zeroconf-domain "local" "Zeroconf domain to be used for discovering services, like host names." :group 'tramp @@ -374,6 +375,7 @@ It has been changed in GVFS 1.14.") ;; ;; +;;;###tramp-autoload (defcustom tramp-bluez-discover-devices-timeout 60 "Defines seconds since last bluetooth device discovery before rescanning. A value of 0 would require an immediate discovery during hostname diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 80a256c8d3..f59c5fbdf6 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -40,6 +40,7 @@ (defvar vc-git-program) (defvar vc-hg-program) +;;;###tramp-autoload (defcustom tramp-inline-compress-start-size 4096 "The minimum size of compressing where inline transfer. When inline transfer, compress transferred data of file @@ -48,6 +49,7 @@ If it is nil, no compression at all will be applied." :group 'tramp :type '(choice (const nil) integer)) +;;;###tramp-autoload (defcustom tramp-copy-size-limit 10240 "The maximum file size where inline copying is preferred over an \ out-of-the-band copy. @@ -65,19 +67,21 @@ files conditionalize this setup based on the TERM environment variable." :type 'string) ;;;###tramp-autoload -(defcustom tramp-histfile-override "/dev/null" +(defcustom tramp-histfile-override t "When invoking a shell, override the HISTFILE with this value. -By default, the HISTFILE is set to the \"/dev/null\" value, which -is special on Unix systems and indicates the shell history should -not be logged (this avoids clutter due to Tramp commands). - -If you set this variable to nil, however, the *override* is -disabled, so the history will go to the default storage -location, e.g. \"$HOME/.sh_history\"." +When setting to a string, it redirects the shell history to that +file. Be careful when setting to \"/dev/null\"; this might +result in undesired results when using \"bash\" as shell. + +The value t, the default value, unsets any setting of HISTFILE, +and sets both HISTFILESIZE and HISTSIZE to 0. If you set this +variable to nil, however, the *override* is disabled, so the +history will go to the default storage location, +e.g. \"$HOME/.sh_history\"." :group 'tramp :version "25.1" :type '(choice (const :tag "Do not override HISTFILE" nil) - (const :tag "Empty the history (/dev/null)" "/dev/null") + (const :tag "Unset HISTFILE" t) (string :tag "Redirect to a file"))) ;;;###tramp-autoload @@ -103,6 +107,27 @@ detected as prompt when being sent on echoing hosts, therefore.") (defconst tramp-end-of-heredoc (md5 tramp-end-of-output) "String used to recognize end of heredoc strings.") +;;;###tramp-autoload +(defcustom tramp-use-ssh-controlmaster-options t + "Whether to use `tramp-ssh-controlmaster-options'." + :group 'tramp + :version "24.4" + :type 'boolean) + +(defvar tramp-ssh-controlmaster-options nil + "Which ssh Control* arguments to use. + +If it is a string, it should have the form +\"-o ControlMaster=auto -o ControlPath='tramp.%%r@%%h:%%p' +-o ControlPersist=no\". Percent characters in the ControlPath +spec must be doubled, because the string is used as format string. + +Otherwise, it will be auto-detected by Tramp, if +`tramp-use-ssh-controlmaster-options' is non-nil. The value +depends on the installed local ssh version. + +The string is used in `tramp-methods'.") + ;; Initialize `tramp-methods' with the supported methods. ;;;###tramp-autoload (add-to-list 'tramp-methods @@ -473,7 +498,7 @@ as given in your `~/.profile'." ,(format "TERM=%s" tramp-terminal-type) "EMACS=t" ;; Deprecated. ,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version) - "CDPATH=" "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH=" "PAGER=\"\"" + "CDPATH=" "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH=" "PAGER=cat" "autocorrect=" "correct=") "List of environment variables to be set on the remote host. @@ -487,6 +512,7 @@ not be set here. Instead, it should be set via `tramp-remote-path'." :version "24.4" :type '(repeat string)) +;;;###tramp-autoload (defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile")) "Alist specifying extra arguments to pass to the remote shell. Entries are (REGEXP . ARGS) where REGEXP is a regular expression @@ -629,6 +655,7 @@ if (!@stat) { if (($stat[2] & 0170000) == 0120000) { $type = readlink($ARGV[0]); + $type =~ s/\"/\\\\\"/g; $type = \"\\\"$type\\\"\"; } elsif (($stat[2] & 0170000) == 040000) @@ -678,6 +705,7 @@ for($i = 0; $i < $n; $i++) if (($stat[2] & 0170000) == 0120000) { $type = readlink($filename); + $type =~ s/\"/\\\\\"/g; $type = \"\\\"$type\\\"\"; } elsif (($stat[2] & 0170000) == 040000) @@ -690,6 +718,7 @@ for($i = 0; $i < $n; $i++) }; $uid = ($ARGV[1] eq \"integer\") ? $stat[4] : \"\\\"\" . getpwuid($stat[4]) . \"\\\"\"; $gid = ($ARGV[1] eq \"integer\") ? $stat[5] : \"\\\"\" . getgrgid($stat[5]) . \"\\\"\"; + $filename =~ s/\"/\\\\\"/g; printf( \"(\\\"%%s\\\" %%s %%u %%s %%s (%%u %%u) (%%u %%u) (%%u %%u) %%u.0 %%u t (%%u . %%u) (%%u . %%u))\\n\", $filename, @@ -1146,15 +1175,19 @@ target of the symlink differ." (tramp-message vec 5 "file attributes with ls: %s" localname) (tramp-send-command vec - (format "(%s %s || %s -h %s) && %s %s %s" + (format "(%s %s || %s -h %s) && %s %s %s %s" (tramp-get-file-exists-command vec) (tramp-shell-quote-argument localname) (tramp-get-test-command vec) (tramp-shell-quote-argument localname) (tramp-get-ls-command vec) + ;; On systems which have no quoting style, file names + ;; with special characters could fail. + (if (tramp-get-ls-command-with-quoting-style vec) + "--quoting-style=c" "") (if (eq id-format 'integer) "-ildn" "-ild") (tramp-shell-quote-argument localname))) - ;; parse `ls -l' output ... + ;; Parse `ls -l' output ... (with-current-buffer (tramp-get-buffer vec) (when (> (buffer-size) 0) (goto-char (point-min)) @@ -1193,11 +1226,14 @@ target of the symlink differ." ;; From the file modes, figure out other stuff. (setq symlinkp (eq ?l (aref res-filemodes 0))) (setq dirp (eq ?d (aref res-filemodes 0))) - ;; if symlink, find out file name pointed to + ;; If symlink, find out file name pointed to. (when symlinkp (search-forward "-> ") - (setq res-symlink-target (buffer-substring (point) (point-at-eol)))) - ;; return data gathered + (setq res-symlink-target + (if (tramp-get-ls-command-with-quoting-style vec) + (read (current-buffer)) + (buffer-substring (point) (point-at-eol))))) + ;; Return data gathered. (list ;; 0. t for directory, string (name linked to) for symbolic ;; link, or nil. @@ -1220,9 +1256,9 @@ target of the symlink differ." ;; 8. File modes, as a string of ten letters or dashes as in ls -l. res-filemodes ;; 9. t if file's gid would change if file were deleted and - ;; recreated. Will be set in `tramp-convert-file-attributes' + ;; recreated. Will be set in `tramp-convert-file-attributes'. t - ;; 10. inode number. + ;; 10. Inode number. res-inode ;; 11. Device number. Will be replaced by a virtual device number. -1 @@ -1246,16 +1282,21 @@ target of the symlink differ." (tramp-send-command-and-read vec (format - ;; On Opsware, pdksh (which is the true name of ksh there) doesn't - ;; parse correctly the sequence "((". Therefore, we add a space. - "( (%s %s || %s -h %s) && %s -c '((\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t %%ie0 -1)' %s || echo nil)" + (concat + ;; On Opsware, pdksh (which is the true name of ksh there) + ;; doesn't parse correctly the sequence "((". Therefore, we add + ;; a space. Apostrophes in the stat output are masked as "//", + ;; in order to make a proper shell escape of them in file names. + "( (%s %s || %s -h %s) && (%s -c " + "'((//%%N//) %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 //%%A// t %%ie0 -1)' " + "%s | sed -e 's/\"/\\\\\"/g' -e 's/\\/\\//\"/g') || echo nil)") (tramp-get-file-exists-command vec) (tramp-shell-quote-argument localname) (tramp-get-test-command vec) (tramp-shell-quote-argument localname) (tramp-get-remote-stat vec) - (if (eq id-format 'integer) "%ue0" "\"%U\"") - (if (eq id-format 'integer) "%ge0" "\"%G\"") + (if (eq id-format 'integer) "%ue0" "//%U//") + (if (eq id-format 'integer) "%ge0" "//%G//") (tramp-shell-quote-argument localname)))) (defun tramp-sh-handle-set-visited-file-modtime (&optional time-list) @@ -1624,45 +1665,44 @@ be non-negative integers." (defun tramp-sh-handle-directory-files-and-attributes (directory &optional full match nosort id-format) "Like `directory-files-and-attributes' for Tramp files." - (if (with-parsed-tramp-file-name directory nil - (not (or (tramp-get-remote-stat v) (tramp-get-remote-perl v)))) - (tramp-handle-directory-files-and-attributes - directory full match nosort id-format) - - ;; Do it directly. - (unless id-format (setq id-format 'integer)) - (when (file-directory-p directory) - (setq directory (expand-file-name directory)) - (let* ((temp - (copy-tree - (with-parsed-tramp-file-name directory nil - (with-tramp-file-property - v localname - (format "directory-files-and-attributes-%s" id-format) - (save-excursion - (mapcar - (lambda (x) - (cons (car x) - (tramp-convert-file-attributes v (cdr x)))) - (cond - ((tramp-get-remote-stat v) - (tramp-do-directory-files-and-attributes-with-stat - v localname id-format)) - ((tramp-get-remote-perl v) - (tramp-do-directory-files-and-attributes-with-perl - v localname id-format))))))))) - result item) - - (while temp - (setq item (pop temp)) - (when (or (null match) (string-match match (car item))) - (when full - (setcar item (expand-file-name (car item) directory))) - (push item result))) - - (if nosort - result - (sort result (lambda (x y) (string< (car x) (car y))))))))) + (unless id-format (setq id-format 'integer)) + (when (file-directory-p directory) + (setq directory (expand-file-name directory)) + (let* ((temp + (copy-tree + (with-parsed-tramp-file-name directory nil + (with-tramp-file-property + v localname + (format "directory-files-and-attributes-%s" id-format) + (save-excursion + (mapcar + (lambda (x) + (cons (car x) + (tramp-convert-file-attributes v (cdr x)))) + (or + (cond + ((tramp-get-remote-stat v) + (tramp-do-directory-files-and-attributes-with-stat + v localname id-format)) + ((tramp-get-remote-perl v) + (tramp-do-directory-files-and-attributes-with-perl + v localname id-format)) + (t nil))))))))) + result item) + + (while temp + (setq item (pop temp)) + (when (or (null match) (string-match match (car item))) + (when full + (setcar item (expand-file-name (car item) directory))) + (push item result))) + + (or (if nosort + result + (sort result (lambda (x y) (string< (car x) (car y))))) + ;; The scripts could fail, for example with huge file size. + (tramp-handle-directory-files-and-attributes + directory full match nosort id-format))))) (defun tramp-do-directory-files-and-attributes-with-perl (vec localname &optional id-format) @@ -1689,17 +1729,22 @@ be non-negative integers." (concat ;; We must care about file names with spaces, or starting with ;; "-"; this would confuse xargs. "ls -aQ" might be a solution, - ;; but it does not work on all remote systems. Therefore, we - ;; quote the file names via sed. - "cd %s; echo \"(\"; (%s -a | sed -e s/\\$/\\\"/g -e s/^/\\\"/g | " + ;; but it does not work on all remote systems. Apostrophes in + ;; the stat output are masked as "//", in order to make a proper + ;; shell escape of them in file names. + "cd %s && echo \"(\"; (%s %s -a | " "xargs %s -c " - "'(\"%%n\" (\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t %%ie0 -1)'" - " 2>/dev/null); echo \")\"") + "'(//%%n// (//%%N//) %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 //%%A// t %%ie0 -1)' " + "-- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/\\/\\//\"/g'); echo \")\"") (tramp-shell-quote-argument localname) (tramp-get-ls-command vec) + ;; On systems which have no quoting style, file names with + ;; special characters could fail. + (if (tramp-get-ls-command-with-quoting-style vec) + "--quoting-style=shell" "") (tramp-get-remote-stat vec) - (if (eq id-format 'integer) "%ue0" "\"%U\"") - (if (eq id-format 'integer) "%ge0" "\"%G\"")))) + (if (eq id-format 'integer) "%ue0" "//%U//") + (if (eq id-format 'integer) "%ge0" "//%G//")))) ;; This function should return "foo/" for directories and "bar" for ;; files. @@ -1770,7 +1815,7 @@ be non-negative integers." 1 0))) (format (concat - "(\\cd %s 2>&1 && (%s %s -a 2>/dev/null" + "(cd %s 2>&1 && (%s -a %s 2>/dev/null" ;; `ls' with wildcard might fail with `Argument ;; list too long' error in some corner cases; if ;; `ls' fails after `cd' succeeded, chances are @@ -1794,7 +1839,7 @@ be non-negative integers." ;; sub-directories. (if (zerop (length filename)) "." - (concat (tramp-shell-quote-argument filename) "* -d")) + (format "-d %s*" (tramp-shell-quote-argument filename))) (tramp-get-ls-command v) (tramp-get-test-command v)))) @@ -2076,23 +2121,20 @@ file names." First arg OP is either `copy' or `rename' and indicates the operation. FILENAME is the source file, NEWNAME the target file. KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME." - (with-temp-buffer - ;; We must disable multibyte, because binary data shall not be - ;; converted. We remove `tramp-file-name-handler' from - ;; `inhibit-file-name-handlers'; otherwise the file name handler - ;; for `insert-file-contents' might be deactivated in some corner - ;; cases. - (set-buffer-multibyte nil) - (let ((coding-system-for-read 'binary) - (jka-compr-inhibit t) - (inhibit-file-name-handlers - (remq 'tramp-file-name-handler inhibit-file-name-handlers))) - (insert-file-contents-literally filename)) - ;; We don't want the target file to be compressed, so we let-bind - ;; `jka-compr-inhibit' to t. - (let ((coding-system-for-write 'binary) - (jka-compr-inhibit t)) - (write-region (point-min) (point-max) newname nil 'no-message))) + ;; We must disable multibyte, because binary data shall not be + ;; converted. We don't want the target file to be compressed, so we + ;; let-bind `jka-compr-inhibit' to t. + ;; We remove `tramp-file-name-handler' from + ;; `inhibit-file-name-handlers'; otherwise the file name handler for + ;; `insert-file-contents' might be deactivated in some corner cases. + (let ((coding-system-for-read 'binary) + (coding-system-for-write 'binary) + (jka-compr-inhibit t) + (inhibit-file-name-handlers + (remq 'tramp-file-name-handler inhibit-file-name-handlers))) + (with-temp-file newname + (set-buffer-multibyte nil) + (insert-file-contents-literally filename))) ;; KEEP-DATE handling. (when keep-date (set-file-times newname (nth 5 (file-attributes filename)))) ;; Set the mode. @@ -2347,10 +2389,7 @@ The method used must be an out-of-band method." spec (format-spec-make ?t (tramp-get-connection-property (tramp-get-connection-process v) "temp-file" "")) - options (format-spec - (if tramp-use-ssh-controlmaster-options - tramp-ssh-controlmaster-options "") - spec) + options (format-spec (tramp-ssh-controlmaster-options v) spec) spec (format-spec-make ?h host ?u user ?p port ?r listener ?c options ?k (if keep-date " " "")) @@ -2539,7 +2578,7 @@ The method used must be an out-of-band method." (tramp-flush-file-property v (file-name-directory localname)) (tramp-flush-directory-property v localname) (tramp-barf-unless-okay - v (format "%s %s" + v (format "cd / && %s %s" (if recursive "rm -rf" "rmdir") (tramp-shell-quote-argument localname)) "Couldn't delete %s" directory))) @@ -2797,7 +2836,7 @@ the result will be a local, non-Tramp, file name." (setq uname (with-tramp-connection-property v uname (tramp-send-command - v (format "cd %s; pwd" (tramp-shell-quote-argument uname))) + v (format "cd %s && pwd" (tramp-shell-quote-argument uname))) (with-current-buffer (tramp-get-buffer v) (goto-char (point-min)) (buffer-substring (point) (point-at-eol))))) @@ -3035,7 +3074,7 @@ the result will be a local, non-Tramp, file name." (unwind-protect (setq ret (if (tramp-send-command-and-check - v (format "\\cd %s; %s" + v (format "cd %s && %s" (tramp-shell-quote-argument localname) command) t t) @@ -3114,17 +3153,14 @@ the result will be a local, non-Tramp, file name." ;; If local decoding is a function, we call it. ;; We must disable multibyte, because ;; `uudecode-decode-region' doesn't handle it - ;; correctly. - (with-temp-buffer - (set-buffer-multibyte nil) - (insert-buffer-substring (tramp-get-buffer v)) - (funcall loc-dec (point-min) (point-max)) - ;; Unset `file-name-handler-alist'. Otherwise, - ;; epa-file gets confused. - (let (file-name-handler-alist - (coding-system-for-write 'binary)) - (write-region - (point-min) (point-max) tmpfile nil 'no-message))) + ;; correctly. Unset `file-name-handler-alist'. + ;; Otherwise, epa-file gets confused. + (let (file-name-handler-alist + (coding-system-for-write 'binary)) + (with-temp-file tmpfile + (set-buffer-multibyte nil) + (insert-buffer-substring (tramp-get-buffer v)) + (funcall loc-dec (point-min) (point-max)))) ;; If tramp-decoding-function is not defined for this ;; method, we invoke tramp-decoding-command instead. @@ -3700,14 +3736,18 @@ Only send the definition if it has not already been done." (tramp-get-connection-process vec) "scripts" nil))) (unless (member name scripts) (with-tramp-progress-reporter vec 5 (format "Sending script `%s'" name) + ;; In bash, leading TABs like in `tramp-vc-registered-read-file-names' + ;; could result in unwanted command expansion. Avoid this. + (setq script (tramp-compat-replace-regexp-in-string + (make-string 1 ?\t) (make-string 8 ? ) script)) ;; The script could contain a call of Perl. This is masked with `%s'. (when (and (string-match "%s" script) (not (tramp-get-remote-perl vec))) (tramp-error vec 'file-error "No Perl available on remote host")) (tramp-barf-unless-okay vec - (format "%s () {\n%s\n}" name - (format script (tramp-get-remote-perl vec))) + (format "%s () {\n%s\n}" + name (format script (tramp-get-remote-perl vec))) "Script %s sending failed" name) (tramp-set-connection-property (tramp-get-connection-process vec) "scripts" (cons name scripts)))))) @@ -3794,7 +3834,7 @@ This function expects to be in the right *tramp* buffer." (tramp-send-command vec (format (concat "while read d; " - "do if test -x $d/%s -a -f $d/%s; " + "do if test -x $d/%s && test -f $d/%s; " "then echo tramp_executable $d/%s; " "break; fi; done <<'%s'\n" "%s\n%s") @@ -3900,12 +3940,16 @@ file exists and nonzero exit status otherwise." ;; when called as sh) on startup; this way, we avoid the startup ;; file clobbering $PS1. $PROMPT_COMMAND is another way to set ;; the prompt in /bin/bash, it must be discarded as well. + ;; $HISTFILE is set according to `tramp-histfile-override'. (tramp-send-command vec (format - "exec env ENV=''%s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s" - (if tramp-histfile-override - (concat " HISTFILE=" tramp-histfile-override) - "") + "exec env ENV='' %s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s" + (if (stringp tramp-histfile-override) + (format "HISTFILE=%s" + (tramp-shell-quote-argument tramp-histfile-override)) + (if tramp-histfile-override + "HISTFILE='' HISTFILESIZE=0 HISTSIZE=0" + "")) (tramp-shell-quote-argument tramp-end-of-output) shell (or extra-args "")) t)) @@ -4536,7 +4580,7 @@ Gateway hops are already opened." ;; In case the host name is not used for the remote shell ;; command, the user could be misguided by applying a random - ;; hostname. + ;; host name. (let* ((v (car target-alist)) (method (tramp-file-name-method v)) (host (tramp-file-name-host v))) @@ -4558,6 +4602,53 @@ Gateway hops are already opened." ;; Result. target-alist)) +(defun tramp-ssh-controlmaster-options (vec) + "Return the Control* arguments of the local ssh." + (cond + ;; No options to be computed. + ((or (null tramp-use-ssh-controlmaster-options) + (null (assoc "%c" (tramp-get-method-parameter + (tramp-file-name-method vec) 'tramp-login-args)))) + "") + + ;; There is already a value to be used. + ((stringp tramp-ssh-controlmaster-options) tramp-ssh-controlmaster-options) + + ;; Determine the options. + (t (setq tramp-ssh-controlmaster-options "") + (let ((case-fold-search t)) + (ignore-errors + (when (executable-find "ssh") + (with-temp-buffer + (tramp-call-process vec "ssh" nil t nil "-o" "ControlMaster") + (goto-char (point-min)) + (when (search-forward-regexp "missing.+argument" nil t) + (setq tramp-ssh-controlmaster-options "-o ControlMaster=auto"))) + (unless (zerop (length tramp-ssh-controlmaster-options)) + (with-temp-buffer + ;; When we use a non-existing host name, we could run + ;; into DNS timeouts. So we use "localhost" with an + ;; improper port, expecting nobody runs sshd on the + ;; telnet port. + (tramp-call-process + vec "ssh" nil t nil + "-p" "23" "-o" "ControlPath=%C" "localhost") + (goto-char (point-min)) + (setq tramp-ssh-controlmaster-options + (if (search-forward-regexp "unknown.+key" nil t) + (concat tramp-ssh-controlmaster-options + " -o ControlPath='tramp.%%r@%%h:%%p'") + (concat tramp-ssh-controlmaster-options + " -o ControlPath='tramp.%%C'")))) + (with-temp-buffer + (tramp-call-process vec "ssh" nil t nil "-o" "ControlPersist") + (goto-char (point-min)) + (when (search-forward-regexp "missing.+argument" nil t) + (setq tramp-ssh-controlmaster-options + (concat tramp-ssh-controlmaster-options + " -o ControlPersist=no")))))))) + tramp-ssh-controlmaster-options))) + (defun tramp-maybe-open-connection (vec) "Maybe open a connection VEC. Does not do anything if a connection is already open, but re-opens the @@ -4627,15 +4718,19 @@ connection if a previous connection has died for some reason." (delete-process p)) (setenv "TERM" tramp-terminal-type) (setenv "LC_ALL" "en_US.utf8") - (when tramp-histfile-override - (setenv "HISTFILE" tramp-histfile-override)) + (if (stringp tramp-histfile-override) + (setenv "HISTFILE" tramp-histfile-override) + (if tramp-histfile-override + (progn + (setenv "HISTFILE") + (setenv "HISTFILESIZE" "0") + (setenv "HISTSIZE" "0")))) (setenv "PROMPT_COMMAND") (setenv "PS1" tramp-initial-end-of-output) (let* ((target-alist (tramp-compute-multi-hops vec)) ;; We will apply `tramp-ssh-controlmaster-options' ;; only for the first hop. - (options (if tramp-use-ssh-controlmaster-options - tramp-ssh-controlmaster-options "")) + (options (tramp-ssh-controlmaster-options vec)) (process-connection-type tramp-process-connection-type) (process-adaptive-read-buffering nil) (coding-system-for-read nil) @@ -5146,7 +5241,8 @@ Return ATTR." (with-current-buffer (tramp-get-connection-buffer vec) (while candidates (goto-char (point-min)) - (if (string-match (concat "^" (car candidates) "$") (buffer-string)) + (if (string-match (format "^%s\r?$" (regexp-quote (car candidates))) + (buffer-string)) (setq locale (car candidates) candidates nil) (setq candidates (cdr candidates))))) @@ -5188,6 +5284,17 @@ Return ATTR." (tramp-send-command-and-check vec (format "%s --dired -al /dev/null" (tramp-get-ls-command vec)))))) +(defun tramp-get-ls-command-with-quoting-style (vec) + (save-match-data + (with-tramp-connection-property vec "ls-quoting-style" + (tramp-message vec 5 "Checking, whether `ls --quoting-style=shell' works") + ;; Some "ls" versions are sensible wrt the order of arguments, + ;; they fail when "-al" is after the "--dired" argument (for + ;; example on FreeBSD). + (tramp-send-command-and-check + vec (format "%s --quoting-style=shell -al /dev/null" + (tramp-get-ls-command vec)))))) + (defun tramp-get-test-command (vec) (with-tramp-connection-property vec "test" (tramp-message vec 5 "Finding a suitable `test' command") @@ -5475,14 +5582,18 @@ function cell is returned to be applied on a buffer." `(lambda (beg end) (,coding beg end) (let ((coding-system-for-write 'binary) - (coding-system-for-read 'binary)) + (coding-system-for-read 'binary) + (default-directory + (tramp-compat-temporary-file-directory))) (apply 'call-process-region (point-min) (point-max) (car (split-string ,compress)) t t nil (cdr (split-string ,compress))))) `(lambda (beg end) (let ((coding-system-for-write 'binary) - (coding-system-for-read 'binary)) + (coding-system-for-read 'binary) + (default-directory + (tramp-compat-temporary-file-directory))) (apply 'call-process-region beg end (car (split-string ,compress)) t t nil diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index d5fe17f093..14360b96fe 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -70,17 +70,20 @@ tramp-smb-method '((tramp-parse-netrc "~/.netrc")))) +;;;###tramp-autoload (defcustom tramp-smb-program "smbclient" "Name of SMB client to run." :group 'tramp :type 'string) +;;;###tramp-autoload (defcustom tramp-smb-acl-program "smbcacls" "Name of SMB acls to run." :group 'tramp :type 'string :version "24.4") +;;;###tramp-autoload (defcustom tramp-smb-conf "/dev/null" "Path of the smb.conf file. If it is nil, no smb.conf will be added to the `tramp-smb-program' @@ -280,6 +283,7 @@ See `tramp-actions-before-shell' for more info.") Operations not mentioned here will be handled by the default Emacs primitives.") ;; Options for remote processes via winexe. +;;;###tramp-autoload (defcustom tramp-smb-winexe-program "winexe" "Name of winexe client to run. If it isn't found in the local $PATH, the absolute path of winexe @@ -288,6 +292,7 @@ shall be given. This is needed for remote processes." :type 'string :version "24.3") +;;;###tramp-autoload (defcustom tramp-smb-winexe-shell-command "powershell.exe" "Shell to be used for processes on remote machines. This must be Powershell V2 compatible." @@ -295,6 +300,7 @@ This must be Powershell V2 compatible." :type 'string :version "24.3") +;;;###tramp-autoload (defcustom tramp-smb-winexe-shell-command-switch "-file -" "Command switch used together with `tramp-smb-winexe-shell-command'. This can be used to disable echo etc." diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index ba0d13eab8..10bb76983a 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -73,6 +73,7 @@ "Edit remote files with a combination of ssh, scp, etc." :group 'files :group 'comm + :link '(custom-manual "(tramp)Top") :version "22.1") ;; Maybe we need once a real Tramp mode, with key bindings etc. @@ -306,34 +307,6 @@ started on the local host. You should specify a remote host `localhost' or the name of the local host. Another host name is useful only in combination with `tramp-default-proxies-alist'.") -;;;###tramp-autoload -(defconst tramp-ssh-controlmaster-options - (let ((result "") - (case-fold-search t)) - (ignore-errors - (with-temp-buffer - (call-process "ssh" nil t nil "-o" "ControlMaster") - (goto-char (point-min)) - (when (search-forward-regexp "missing.+argument" nil t) - (setq result "-o ControlPath=%t.%%r@%%h:%%p -o ControlMaster=auto"))) - (unless (zerop (length result)) - (with-temp-buffer - (call-process "ssh" nil t nil "-o" "ControlPersist") - (goto-char (point-min)) - (when (search-forward-regexp "missing.+argument" nil t) - (setq result (concat result " -o ControlPersist=no")))))) - result) - "Call ssh to detect whether it supports the Control* arguments. -Return a string to be used in `tramp-methods'.") - -;;;###tramp-autoload -(defcustom tramp-use-ssh-controlmaster-options - (not (zerop (length tramp-ssh-controlmaster-options))) - "Whether to use `tramp-ssh-controlmaster-options'." - :group 'tramp - :version "24.4" - :type 'boolean) - (defcustom tramp-default-method ;; An external copy method seems to be preferred, because it performs ;; much better for large files, and it hasn't too serious delays @@ -364,9 +337,7 @@ Return a string to be used in `tramp-methods'.") (fboundp 'auth-source-search) ;; ssh-agent is running. (getenv "SSH_AUTH_SOCK") - (getenv "SSH_AGENT_PID") - ;; We could reuse the connection. - (> (length tramp-ssh-controlmaster-options) 0)) + (getenv "SSH_AGENT_PID")) "scp" "ssh")) ;; Fallback. @@ -548,7 +519,7 @@ if you need to change this." :type 'string) (defcustom tramp-login-prompt-regexp - ".*ogin\\( .*\\)?: *" + ".*\\(user\\|login\\)\\( .*\\)?: *" "Regexp matching login-like prompts. The regexp should match at end of buffer. @@ -2254,7 +2225,7 @@ Falls back to normal file name handler if no Tramp file name handler exists." "Load Tramp file name handler, and perform OPERATION." ;; Avoid recursive loading of tramp.el. `temporary-file-directory' ;; does not exist in XEmacs, so we must use something else. - (let ((default-directory (or (symbol-value 'temporary-file-directory) "/"))) + (let ((default-directory "/")) (load "tramp" nil t)) (apply operation args))) @@ -3343,10 +3314,11 @@ User is always nil." (defun tramp-handle-unhandled-file-name-directory (_filename) "Like `unhandled-file-name-directory' for Tramp files." - ;; With Emacs 23, we could simply return `nil'. But we must keep it - ;; for backward compatibility. "~/" cannot be returned, because - ;; there might be machines without a HOME directory (like hydra). - "/") + ;; Starting with Emacs 23, we must simply return `nil'. But we must + ;; keep backward compatibility, also with XEmacs. "~/" cannot be + ;; returned, because there might be machines without a HOME + ;; directory (like hydra). + (and (< emacs-major-version 23) "/")) (defun tramp-handle-set-visited-file-modtime (&optional time-list) "Like `set-visited-file-modtime' for Tramp files." diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 70092d2120..226ec9f194 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -31,7 +31,7 @@ ;; should be changed only there. ;;;###tramp-autoload -(defconst tramp-version "2.2.11-24.5" +(defconst tramp-version "2.2.12-pre" "This version of Tramp.") ;;;###tramp-autoload @@ -44,7 +44,7 @@ (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" - (format "Tramp 2.2.11-24.5 is not fit for %s" + (format "Tramp 2.2.12-pre is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) (unless (string-match "\\`ok\\'" x) (error "%s" x))) diff --git a/lisp/newcomment.el b/lisp/newcomment.el index e307eac94e..172a5634a5 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -1451,6 +1451,38 @@ unless optional argument SOFT is non-nil." (end-of-line 0) (insert comend)))))))))))) +;;;###autoload +(defun comment-line (n) + "Comment or uncomment current line and leave point after it. +With positive prefix, apply to N lines including current one. +With negative prefix, apply to -N lines above. Also, further +consecutive invocations of this command will inherit the negative +argument. + +If region is active, comment lines in active region instead. +Unlike `comment-dwim', this always comments whole lines." + (interactive "p") + (if (use-region-p) + (comment-or-uncomment-region + (save-excursion + (goto-char (region-beginning)) + (line-beginning-position)) + (save-excursion + (goto-char (region-end)) + (line-end-position))) + (when (and (eq last-command 'comment-line-backward) + (natnump n)) + (setq n (- n))) + (let ((range + (list (line-beginning-position) + (goto-char (line-end-position n))))) + (comment-or-uncomment-region + (apply #'min range) + (apply #'max range))) + (forward-line 1) + (back-to-indentation) + (unless (natnump n) (setq this-command 'comment-line-backward)))) + (provide 'newcomment) ;;; newcomment.el ends here diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el index 6b1e5347e2..111de8537d 100644 --- a/lisp/obsolete/iswitchb.el +++ b/lisp/obsolete/iswitchb.el @@ -175,10 +175,10 @@ ;; iswitchb-read-buffer has been written to be a drop in replacement ;; for the normal buffer selection routine `read-buffer'. To use ;; iswitch for all buffer selections in Emacs, add: -;; (setq read-buffer-function 'iswitchb-read-buffer) +;; (setq read-buffer-function #'iswitchb-read-buffer) ;; (This variable was introduced in Emacs 20.3.) ;; XEmacs users can get the same behavior by doing: -;; (defalias 'read-buffer 'iswitchb-read-buffer) +;; (defalias 'read-buffer #'iswitchb-read-buffer) ;; since `read-buffer' is defined in lisp. ;; Using iswitchb for other completion tasks. @@ -586,7 +586,7 @@ in a separate window. )))) (defun iswitchb-read-buffer (prompt &optional default require-match - start matches-set) + _predicate start matches-set) "Replacement for the built-in `read-buffer'. Return the name of a buffer selected. PROMPT is the prompt to give to the user. diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 081da5db73..35e6ef1ecc 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -852,7 +852,7 @@ in a table.el table last. * org.el (org-delete-property): Don't suggest to delete the - CATEGORY property when the category is not explicitely set in the + CATEGORY property when the category is not explicitly set in the property drawer. Also enforce matching when completing. (org-insert-heading): Fix regression: with two universal prefixes, insert heading at the end of the subtree. @@ -13109,7 +13109,7 @@ 2012-01-03 Nicolas Goaziou * org.el (org-fontify-meta-lines-and-blocks-1): - Recognize "name" as a valid keyword that can preceed a block. + Recognize "name" as a valid keyword that can precede a block. 2012-01-03 Eric Schulte diff --git a/lisp/outline.el b/lisp/outline.el index ae31b8088f..059ca62658 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -777,7 +777,12 @@ Show the heading too, if it is currently invisible." (save-excursion (outline-back-to-heading t) (outline-flag-region (1- (point)) - (progn (outline-next-preface) (point)) nil))) + (progn + (outline-next-preface) + (if (= 1 (- (point-max) (point))) + (point-max) + (point))) + nil))) (define-obsolete-function-alias 'show-entry 'outline-show-entry "25.1") diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el index 3598cd64b4..7be57e9c93 100644 --- a/lisp/pcmpl-unix.el +++ b/lisp/pcmpl-unix.el @@ -157,7 +157,7 @@ documentation), this function returns nil." (while (re-search-forward (concat "^ *" host-re) nil t) (add-to-list 'ssh-hosts-list (concat (match-string 1) (match-string 2))) - (while (and (looking-back ",") + (while (and (eq (char-before) ?,) (re-search-forward host-re (line-end-position) t)) (add-to-list 'ssh-hosts-list (concat (match-string 1) (match-string 2))))) diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index b4c3c59473..df06d5a6ab 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el @@ -462,22 +462,22 @@ FILE is created there." ;; `gamegrid-add-score' was supposed to be used in the past and ;; is covered here for backward-compatibility. ;; -;; 2. The helper program "update-game-score" is setuid and the -;; file FILE does already exist in a system wide shared game -;; directory. This should be the normal case on POSIX systems, -;; if the game was installed system wide. Use +;; 2. The helper program "update-game-score" is setgid or setuid +;; and the file FILE does already exist in a system wide shared +;; game directory. This should be the normal case on POSIX +;; systems, if the game was installed system wide. Use ;; "update-game-score" to add the score to the file in the ;; shared game directory. ;; -;; 3. "update-game-score" is setuid, but the file FILE does *not* -;; exist in the system wide shared game directory. Use +;; 3. "update-game-score" is setgid/setuid, but the file FILE does +;; *not* exist in the system wide shared game directory. Use ;; `gamegrid-add-score-insecure' to create--if necessary--and ;; update FILE. This is for the case that a user has installed ;; a game on her own. ;; -;; 4. "update-game-score" is not setuid. Use it to create/update -;; FILE in the user's home directory. There is presumably no -;; shared game directory. +;; 4. "update-game-score" is not setgid/setuid. Use it to +;; create/update FILE in the user's home directory. There is +;; presumably no shared game directory. (defvar gamegrid-shared-game-dir) @@ -491,7 +491,7 @@ FILE is created there." (gamegrid-add-score-insecure file score)) ((and gamegrid-shared-game-dir (file-exists-p (expand-file-name file shared-game-score-directory))) - ;; Use the setuid (or setgid) "update-game-score" program + ;; Use the setgid (or setuid) "update-game-score" program ;; to update a system-wide score file. (gamegrid-add-score-with-update-game-score-1 file (expand-file-name file shared-game-score-directory) score)) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 328e0f79a1..823d795b6d 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -2277,7 +2277,9 @@ comment at the start of cc-engine.el for more info." (while ;; Add an element to `c-state-nonlit-pos-cache' each iteration. (and - (<= (setq npos (+ pos c-state-nonlit-pos-interval)) here) + (setq npos + (when (<= (+ pos c-state-nonlit-pos-interval) here) + (+ pos c-state-nonlit-pos-interval))) ;; Test for being in a literal. If so, go to after it. (progn @@ -2304,7 +2306,9 @@ comment at the start of cc-engine.el for more info." ;; Add one extra element above HERE so as to to avoid the previous ;; expensive calculation when the next call is close to the current ;; one. This is especially useful when inside a large macro. - (setq c-state-nonlit-pos-cache (cons npos c-state-nonlit-pos-cache))) + (when npos + (setq c-state-nonlit-pos-cache + (cons npos c-state-nonlit-pos-cache)))) (if (> pos c-state-nonlit-pos-cache-limit) (setq c-state-nonlit-pos-cache-limit pos)) @@ -3069,7 +3073,7 @@ comment at the start of cc-engine.el for more info." (setq dropped-cons (consp (car c-state-cache))) (setq c-state-cache (cdr c-state-cache)) (setq pos pa)) - ;; At this stage, (> pos here); + ;; At this stage, (>= pos here); ;; (< (c-state-cache-top-lparen) here) (or is nil). (cond diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 4d16a9b9d3..ee5a5a6503 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -495,9 +495,9 @@ parameters \(point-min) and \(point-max).") (c-lang-defconst c-before-font-lock-functions ;; For documentation see the following c-lang-defvar of the same name. ;; The value here may be a list of functions or a single function. - t 'c-change-set-fl-decl-start + t 'c-change-expand-fl-region (c c++ objc) '(c-neutralize-syntax-in-and-mark-CPP - c-change-set-fl-decl-start) + c-change-expand-fl-region) awk 'c-awk-extend-and-syntax-tablify-region) (c-lang-defvar c-before-font-lock-functions (let ((fs (c-lang-const c-before-font-lock-functions))) @@ -524,7 +524,7 @@ parameters \(point-min), \(point-max) and .") (c-lang-defconst c-before-context-fontification-functions awk nil - t 'c-context-set-fl-decl-start) + t 'c-context-expand-fl-region) ;; For documentation see the following c-lang-defvar of the same name. ;; The value here may be a list of functions or a single function. (c-lang-defvar c-before-context-fontification-functions diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 01e93b3f20..42ee14072d 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -968,12 +968,17 @@ Note that the style variables are always made local to the buffer." (let ((pps-position (point)) pps-state mbeg) (while (and (< (point) c-new-END) (search-forward-regexp c-anchored-cpp-prefix c-new-END t)) - ;; If we've found a "#" inside a string/comment, ignore it. - (setq pps-state - (parse-partial-sexp pps-position (point) nil nil pps-state) - pps-position (point)) - (unless (or (nth 3 pps-state) ; in a string? - (nth 4 pps-state)) ; in a comment? + ;; If we've found a "#" inside a macro/string/comment, ignore it. + (unless + (or (save-excursion + (goto-char (match-beginning 0)) + (c-beginning-of-macro)) + (progn + (setq pps-state + (parse-partial-sexp pps-position (point) nil nil pps-state) + pps-position (point)) + (or (nth 3 pps-state) ; in a string? + (nth 4 pps-state)))) ; in a comment? (goto-char (match-beginning 1)) (setq mbeg (point)) (if (> (c-syntactic-end-of-macro) mbeg) @@ -1143,11 +1148,11 @@ Note that the style variables are always made local to the buffer." (funcall fn beg end old-len)) c-before-font-lock-functions)))))) -(defun c-set-fl-decl-start (pos) +(defun c-fl-decl-start (pos) ;; If the beginning of the line containing POS is in the middle of a "local" ;; declaration (i.e. one which does not start outside of braces enclosing ;; POS, such as a struct), return the beginning of that declaration. - ;; Otherwise return POS. Note that declarations, in this sense, can be + ;; Otherwise return nil. Note that declarations, in this sense, can be ;; nested. ;; ;; This function is called indirectly from font locking stuff - either from @@ -1184,29 +1189,50 @@ Note that the style variables are always made local to the buffer." (1- (point)) 'syntax-table) c-<-as-paren-syntax))))) (not (bobp))) - (backward-char)) - new-pos)) ; back over (, [, <. - -(defun c-change-set-fl-decl-start (_beg _end _old-len) - ;; Set c-new-BEG to the beginning of a "local" declaration if it('s BOL) is - ;; inside one. This is called from an after-change-function, but the - ;; parameters BEG END and OLD-LEN are ignored. See `c-set-fl-decl-start' - ;; for the detailed functionality. - (if font-lock-mode - (setq c-new-BEG (c-set-fl-decl-start c-new-BEG)))) - -(defun c-context-set-fl-decl-start (beg end) - ;; Return a cons (NEW-BEG . END), where NEW-BEG is the beginning of a - ;; "local" declaration (BOL at) NEW is inside or BEG. See - ;; `c-set-fl-decl-start' for the detailed functionality. - (cons (c-set-fl-decl-start beg) end)) + (backward-char)) ; back over (, [, <. + (and (/= new-pos pos) new-pos))) + +(defun c-change-expand-fl-region (beg end old-len) + ;; Expand the region (c-new-BEG c-new-END) to an after-change font-lock + ;; region. This will usually be the smallest sequence of whole lines + ;; containing `c-new-BEG' and `c-new-END', but if `c-new-BEG' is in a + ;; "local" declaration (see `c-fl-decl-start') the beginning of this is used + ;; as the lower bound. + ;; + ;; This is called from an after-change-function, but the parameters BEG END + ;; and OLD-LEN are not used. + (if font-lock-mode + (setq c-new-BEG + (or (c-fl-decl-start c-new-BEG) (c-point 'bol c-new-BEG)) + c-new-END (c-point 'bonl c-new-END)))) + +(defun c-context-expand-fl-region (beg end) + ;; Return a cons (NEW-BEG . NEW-END), where NEW-BEG is the beginning of a + ;; "local" declaration containing BEG (see `c-fl-decl-start') or BOL BEG is + ;; in. NEW-END is beginning of the line after the one END is in. + (cons (or (c-fl-decl-start beg) (c-point 'bol beg)) + (c-point 'bonl end))) + +(defun c-before-context-fl-expand-region (beg end) + ;; Expand the region (BEG END) as specified by + ;; `c-before-context-fontification-functions'. Return a cons of the bounds + ;; of the new region. + (save-restriction + (widen) + (save-excursion + (let ((new-beg beg) (new-end end) new-region) + (mapc (lambda (fn) + (setq new-region (funcall fn new-beg new-end)) + (setq new-beg (car new-region) new-end (cdr new-region))) + c-before-context-fontification-functions) + new-region)))) (defun c-font-lock-fontify-region (beg end &optional verbose) ;; Effectively advice around `font-lock-fontify-region' which extends the ;; region (BEG END), for example, to avoid context fontification chopping - ;; off the start of the context. Do not do anything if it's already been - ;; done (i.e. from an after-change fontification. An example (C++) where - ;; this used to happen is this: + ;; off the start of the context. Do not extend the region if it's already + ;; been done (i.e. from an after-change fontification. An example (C++) + ;; where the chopping off used to happen is this: ;; ;; template ;; @@ -1215,17 +1241,39 @@ Note that the style variables are always made local to the buffer." ;; ;; Type a space in the first blank line, and the fontification of the next ;; line was fouled up by context fontification. - (let ((new-beg beg) (new-end end) new-region case-fold-search - open-paren-in-column-0-is-defun-start) - (if c-in-after-change-fontification - (setq c-in-after-change-fontification nil) - (save-restriction - (widen) - (save-excursion - (mapc (lambda (fn) - (setq new-region (funcall fn new-beg new-end)) - (setq new-beg (car new-region) new-end (cdr new-region))) - c-before-context-fontification-functions)))) + (let (new-beg new-end new-region case-fold-search + open-paren-in-column-0-is-defun-start) + (if (and c-in-after-change-fontification + (< beg c-new-END) (> end c-new-BEG)) + ;; Region and the latest after-change fontification region overlap. + ;; Determine the upper and lower bounds of our adjusted region + ;; separately. + (progn + (if (<= beg c-new-BEG) + (setq c-in-after-change-fontification nil)) + (setq new-beg + (if (and (>= beg (c-point 'bol c-new-BEG)) + (<= beg c-new-BEG)) + ;; Either jit-lock has accepted `c-new-BEG', or has + ;; (probably) extended the change region spuriously to + ;; BOL, which position likely has a syntactically + ;; different position. To ensure correct fontification, + ;; we start at `c-new-BEG', assuming any characters to the + ;; left of `c-new-BEG' on the line do not require + ;; fontification. + c-new-BEG + (setq new-region (c-before-context-fl-expand-region beg end) + new-end (cdr new-region)) + (car new-region))) + (setq new-end + (if (and (>= end (c-point 'bol c-new-END)) + (<= end c-new-END)) + c-new-END + (or new-end + (cdr (c-before-context-fl-expand-region beg end)))))) + ;; Context (etc.) fontification. + (setq new-region (c-before-context-fl-expand-region beg end) + new-beg (car new-region) new-end (cdr new-region))) (funcall (default-value 'font-lock-fontify-region-function) new-beg new-end verbose))) @@ -1264,7 +1312,7 @@ This function is called from `c-common-init', once per mode initialization." ;; Emacs 22 and later. (defun c-extend-after-change-region (_beg _end _old-len) "Extend the region to be fontified, if necessary." - ;; Note: the parameters are ignored here. This somewhat indirect + ;; Note: the parameter OLD-LEN is ignored here. This somewhat indirect ;; implementation exists because it is minimally different from the ;; stand-alone CC Mode which, lacking ;; font-lock-extend-after-change-region-function, is forced to use advice @@ -1273,6 +1321,13 @@ This function is called from `c-common-init', once per mode initialization." ;; Of the seven CC Mode languages, currently (2009-05) only C, C++, Objc ;; (the languages with #define) and AWK Mode make non-null use of this ;; function. + (when (eq font-lock-support-mode 'jit-lock-mode) + (save-restriction + (widen) + (if (< c-new-BEG beg) + (put-text-property c-new-BEG beg 'fontified nil)) + (if (> c-new-END end) + (put-text-property end c-new-END 'fontified nil)))) (cons c-new-BEG c-new-END)) ;; Emacs < 22 and XEmacs diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 3b8742ee84..2acfc104cf 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -2281,8 +2281,8 @@ to nil." (search-backward ")") (if (eq last-command-event ?\() (progn ; Avoid "if (())" - (delete-backward-char 1) - (delete-backward-char -1)))) + (delete-char -1) + (delete-char 1)))) (if delete (cperl-putback-char cperl-del-back-ch)) (if cperl-message-electric-keyword @@ -2588,7 +2588,7 @@ Will untabify if `cperl-electric-backspace-untabify' is non-nil." (delete-region (point) p)) (if cperl-electric-backspace-untabify (backward-delete-char-untabify arg) - (delete-backward-char arg))))) + (call-interactively 'delete-backward-char))))) (put 'cperl-electric-backspace 'delete-selection 'supersede) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index b2c5fbfe60..29f1ee9a98 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -883,10 +883,11 @@ If CHAR is not a character, return nil." (defun elisp--eval-last-sexp (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area. -With argument, print output into current buffer. -With a zero prefix arg, print output with no limit on the length -and level of lists, and include additional formats for integers -\(octal, hexadecimal, and character)." +If EVAL-LAST-SEXP-ARG-INTERNAL is non-nil, print output into +current buffer. If EVAL-LAST-SEXP-ARG-INTERNAL is `0', print +output with no limit on the length and level of lists, and +include additional formats for integers \(octal, hexadecimal, and +character)." (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t))) ;; Setup the lexical environment if lexical-binding is enabled. (elisp--eval-last-sexp-print-value diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index aeb4ddee9e..6264d3b7b8 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -342,8 +342,10 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil." "final" "generic" "import" "non_intrinsic" "non_overridable" "nopass" "pass" "protected" "same_type_as" "value" "volatile" ;; F2008. + ;; FIXME f90-change-keywords does not work right if + ;; there are spaces. "contiguous" "submodule" "concurrent" "codimension" - "sync all" "sync memory" "critical" "image_index" + "sync all" "sync memory" "critical" "image_index" "error stop" )) "\\_>") "Regexp used by the function `f90-change-keywords'.") @@ -417,6 +419,8 @@ The options are 'downcase-word, 'upcase-word, 'capitalize-word and nil." "norm2" "parity" "findloc" "is_contiguous" "sync images" "lock" "unlock" "image_index" "lcobound" "ucobound" "num_images" "this_image" + "acosh" "asinh" "atanh" + "atomic_define" "atomic_ref" "execute_command_line" ;; F2008 iso_fortran_env module. "compiler_options" "compiler_version" ;; F2008 iso_c_binding module. @@ -649,7 +653,8 @@ logical\\|double[ \t]*precision\\|type[ \t]*(\\(?:\\sw\\|\\s_\\)+)\\|none\\)[ \t (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) "\\_" '("\\(&\\)[ \t]*\\(!\\|$\\)" (1 font-lock-keyword-face)) - "\\_<\\(then\\|continue\\|format\\|include\\|stop\\|return\\)\\_>" + "\\_<\\(then\\|continue\\|format\\|include\\|\\(?:error[ \t]+\\)?stop\\|\ +return\\)\\_>" '("\\_<\\(exit\\|cycle\\)[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>" (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) '("\\_<\\(case\\)[ \t]*\\(default\\|(\\)" . 1) @@ -1629,7 +1634,10 @@ Return (TYPE NAME), or nil if not found." (re-search-backward f90-program-block-re nil 'move)) (beginning-of-line) (skip-chars-forward " \t0-9") - (cond ((setq matching-beg (f90-looking-at-program-block-start)) + ;; Check if in string in case using non-standard feature where + ;; continued strings do not need "&" at start of continuations. + (cond ((f90-in-string)) + ((setq matching-beg (f90-looking-at-program-block-start)) (setq count (1- count))) ((f90-looking-at-program-block-end) (setq count (1+ count))))) @@ -1654,7 +1662,8 @@ Return (TYPE NAME), or nil if not found." (re-search-forward f90-program-block-re nil 'move)) (beginning-of-line) (skip-chars-forward " \t0-9") - (cond ((f90-looking-at-program-block-start) + (cond ((f90-in-string)) + ((f90-looking-at-program-block-start) (setq count (1+ count))) ((setq matching-end (f90-looking-at-program-block-end)) (setq count (1- count)))) @@ -2194,8 +2203,12 @@ Leave point at the end of line." (end-point (point)) (case-fold-search t) matching-beg beg-name end-name beg-block end-block end-struct) + ;; Check if in string in case using non-standard feature where + ;; continued strings do not need "&" at start of continuations. (when (save-excursion (beginning-of-line) (skip-chars-forward " \t0-9") - (setq end-struct (f90-looking-at-program-block-end))) + (unless (f90-in-string) + (setq end-struct + (f90-looking-at-program-block-end)))) (setq end-block (car end-struct) end-name (cadr end-struct)) (save-excursion @@ -2338,6 +2351,8 @@ CHANGE-WORD should be one of 'upcase-word, 'downcase-word, 'capitalize-word." (skip-chars-forward " \t0-9") (looking-at "#")))) (setq ref-point (point) + ;; FIXME this does not work for constructs with + ;; embedded space, eg "sync all". back-point (save-excursion (backward-word 1) (point)) saveword (buffer-substring back-point ref-point)) (funcall change-word -1) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 27846ede33..486d67297a 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1629,9 +1629,19 @@ this trigger is subscribed to `gdb-buf-publisher' and called with :syntax-table nil :abbrev-table nil (make-comint-in-buffer "gdb-inferior" (current-buffer) nil)) +(defcustom gdb-display-io-nopopup nil + "When non-nil, and the 'gdb-inferior-io buffer is buried, don't pop it up." + :type 'boolean + :group 'gdb + :version "25.1") + (defun gdb-inferior-filter (proc string) (unless (string-equal string "") - (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io))) + (let (buf) + (unless (and gdb-display-io-nopopup + (setq buf (gdb-get-buffer 'gdb-inferior-io)) + (null (get-buffer-window buf))) + (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io))))) (with-current-buffer (gdb-get-buffer-create 'gdb-inferior-io) (comint-output-filter proc string))) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 42c5b20a7b..9ab0667b5b 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -1,4 +1,4 @@ -;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers +;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers -*- lexical-binding:t -*- ;; Copyright (C) 1992-1996, 1998, 2000-2015 Free Software Foundation, ;; Inc. @@ -2813,7 +2813,7 @@ Obeying it means displaying in another window the specified file and line." (gud-find-file true-file))) (window (and buffer (or (get-buffer-window buffer) - (display-buffer buffer)))) + (display-buffer buffer '(nil (inhibit-same-window . t)))))) (pos)) (when buffer (with-current-buffer buffer diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index c25e52cdc6..62f19f42df 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -509,6 +509,48 @@ getting timeout messages." :type 'integer :group 'js) +(defcustom js-indent-first-init nil + "Non-nil means specially indent the first variable declaration's initializer. +Normally, the first declaration's initializer is unindented, and +subsequent declarations have their identifiers aligned with it: + + var o = { + foo: 3 + }; + + var o = { + foo: 3 + }, + bar = 2; + +If this option has the value t, indent the first declaration's +initializer by an additional level: + + var o = { + foo: 3 + }; + + var o = { + foo: 3 + }, + bar = 2; + +If this option has the value `dynamic', if there is only one declaration, +don't indent the first one's initializer; otherwise, indent it. + + var o = { + foo: 3 + }; + + var o = { + foo: 3 + }, + bar = 2;" + :version "25.1" + :type '(choice (const nil) (const t) (const dynamic)) + :safe 'symbolp + :group 'js) + ;;; KeyMap (defvar js-mode-map @@ -534,6 +576,7 @@ getting timeout messages." (let ((table (make-syntax-table))) (c-populate-syntax-table table) (modify-syntax-entry ?$ "_" table) + (modify-syntax-entry ?` "\"" table) table) "Syntax table for `js-mode'.") @@ -1857,6 +1900,36 @@ In particular, return the buffer position of the first `for' kwd." (goto-char for-kwd) (current-column)))) +(defun js--maybe-goto-declaration-keyword-end (parse-status) + "Helper function for `js--proper-indentation'. +Depending on the value of `js-indent-first-init', move +point to the end of a variable declaration keyword so that +indentation is aligned to that column." + (cond + ((eq js-indent-first-init t) + (when (looking-at js--declaration-keyword-re) + (goto-char (1+ (match-end 0))))) + ((eq js-indent-first-init 'dynamic) + (let ((bracket (nth 1 parse-status)) + declaration-keyword-end + at-closing-bracket-p + comma-p) + (when (looking-at js--declaration-keyword-re) + (setq declaration-keyword-end (match-end 0)) + (save-excursion + (goto-char bracket) + (setq at-closing-bracket-p + (condition-case nil + (progn + (forward-sexp) + t) + (error nil))) + (when at-closing-bracket-p + (while (forward-comment 1)) + (setq comma-p (looking-at-p ",")))) + (when comma-p + (goto-char (1+ declaration-keyword-end)))))))) + (defun js--proper-indentation (parse-status) "Return the proper indentation for the current line." (save-excursion @@ -1890,6 +1963,7 @@ In particular, return the buffer position of the first `for' kwd." (skip-syntax-backward " ") (when (eq (char-before) ?\)) (backward-list)) (back-to-indentation) + (js--maybe-goto-declaration-keyword-end parse-status) (let* ((in-switch-p (unless same-indent-p (looking-at "\\_"))) (same-indent-p (or same-indent-p @@ -1928,8 +2002,9 @@ In particular, return the buffer position of the first `for' kwd." (let* ((parse-status (save-excursion (syntax-ppss (point-at-bol)))) (offset (- (point) (save-excursion (back-to-indentation) (point))))) - (indent-line-to (js--proper-indentation parse-status)) - (when (> offset 0) (forward-char offset)))) + (unless (nth 3 parse-status) + (indent-line-to (js--proper-indentation parse-status)) + (when (> offset 0) (forward-char offset))))) ;;; Filling diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index d340550a01..67b44aa1bb 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4,7 +4,7 @@ ;; Author: Fabián E. Gallina ;; URL: https://github.com/fgallina/python.el -;; Version: 0.24.4 +;; Version: 0.24.5 ;; Maintainer: emacs-devel@gnu.org ;; Created: Jul 2010 ;; Keywords: languages @@ -696,6 +696,12 @@ It makes underscores and dots word constituent chars.") :group 'python :safe 'booleanp) +(defcustom python-indent-guess-indent-offset-verbose t + "Non-nil means to emit a warning when indentation guessing fails." + :type 'boolean + :group 'python + :safe' booleanp) + (defcustom python-indent-trigger-commands '(indent-for-tab-command yas-expand yas/expand) "Commands that might trigger a `python-indent-line' call." @@ -766,8 +772,9 @@ work on `python-indent-calculate-indentation' instead." (current-indentation)))) (if (and indentation (not (zerop indentation))) (set (make-local-variable 'python-indent-offset) indentation) - (message "Can't guess python-indent-offset, using defaults: %s" - python-indent-offset))))))) + (when python-indent-guess-indent-offset-verbose + (message "Can't guess python-indent-offset, using defaults: %s" + python-indent-offset)))))))) (defun python-indent-context () "Get information about the current indentation context. @@ -843,15 +850,6 @@ keyword ;; Beginning of buffer. ((= (line-number-at-pos) 1) (cons :no-indent 0)) - ;; Comment continuation (maybe). - ((save-excursion - (when (and - (or - (python-info-current-line-comment-p) - (python-info-current-line-empty-p)) - (forward-comment -1) - (python-info-current-line-comment-p)) - (cons :after-comment (point))))) ;; Inside a string. ((let ((start (python-syntax-context 'string ppss))) (when start @@ -963,28 +961,29 @@ keyword ((let ((start (python-info-dedenter-statement-p))) (when start (cons :at-dedenter-block-start start)))) - ;; After normal line. - ((let ((start (save-excursion - (back-to-indentation) - (skip-chars-backward " \t\n") - (python-nav-beginning-of-statement) - (point)))) - (when start - (if (save-excursion - (python-util-forward-comment -1) - (python-nav-beginning-of-statement) - (looking-at (python-rx block-ender))) - (cons :after-block-end start) - (cons :after-line start))))) - ;; Default case: do not indent. - (t (cons :no-indent 0)))))) + ;; After normal line, comment or ender (default case). + ((save-excursion + (back-to-indentation) + (skip-chars-backward " \t\n") + (python-nav-beginning-of-statement) + (cons + (cond ((python-info-current-line-comment-p) + :after-comment) + ((save-excursion + (goto-char (line-end-position)) + (python-util-forward-comment -1) + (python-nav-beginning-of-statement) + (looking-at (python-rx block-ender))) + :after-block-end) + (t :after-line)) + (point)))))))) (defun python-indent--calculate-indentation () "Internal implementation of `python-indent-calculate-indentation'. May return an integer for the maximum possible indentation at current context or a list of integers. The latter case is only happening for :at-dedenter-block-start context since the -possibilities can be narrowed to especific indentation points." +possibilities can be narrowed to specific indentation points." (save-restriction (widen) (save-excursion @@ -1068,12 +1067,14 @@ minimum." (levels (python-indent--calculate-levels indentation))) (if previous (python-indent--previous-level levels (current-indentation)) - (apply #'max levels)))) + (if levels + (apply #'max levels) + 0)))) (defun python-indent-line (&optional previous) "Internal implementation of `python-indent-line-function'. Use the PREVIOUS level when argument is non-nil, otherwise indent -to the maxium available level. When indentation is the minimum +to the maximum available level. When indentation is the minimum possible and PREVIOUS is non-nil, cycle back to the maximum level." (let ((follow-indentation-p @@ -1108,9 +1109,7 @@ indentation levels from right to left." (interactive "*") (when (and (not (bolp)) (not (python-syntax-comment-or-string-p)) - (= (+ (line-beginning-position) - (current-indentation)) - (point))) + (= (current-indentation) (current-column))) (python-indent-line t) t)) @@ -2295,16 +2294,15 @@ Signals an error if no shell buffer is available for current buffer." (let ((process-name (process-name (get-buffer-process (current-buffer))))) (generate-new-buffer - (format "*%s-font-lock*" process-name)))))) + (format " *%s-font-lock*" process-name)))))) (defun python-shell-font-lock-kill-buffer () "Kill the font-lock buffer safely." - (python-shell-with-shell-buffer - (when (and python-shell--font-lock-buffer - (buffer-live-p python-shell--font-lock-buffer)) - (kill-buffer python-shell--font-lock-buffer) - (when (derived-mode-p 'inferior-python-mode) - (setq python-shell--font-lock-buffer nil))))) + (when (and python-shell--font-lock-buffer + (buffer-live-p python-shell--font-lock-buffer)) + (kill-buffer python-shell--font-lock-buffer) + (when (derived-mode-p 'inferior-python-mode) + (setq python-shell--font-lock-buffer nil)))) (defmacro python-shell-font-lock-with-font-lock-buffer (&rest body) "Execute the forms in BODY in the font-lock buffer. @@ -2318,6 +2316,8 @@ also `with-current-buffer'." (setq python-shell--font-lock-buffer (python-shell-font-lock-get-or-create-buffer))) (set-buffer python-shell--font-lock-buffer) + (when (not font-lock-mode) + (font-lock-mode 1)) (set (make-local-variable 'delay-mode-hooks) t) (let ((python-indent-guess-indent-offset nil)) (when (not (derived-mode-p 'python-mode)) @@ -2331,57 +2331,66 @@ goes wrong and syntax highlighting in the shell gets messed up." (interactive) (python-shell-with-shell-buffer (python-shell-font-lock-with-font-lock-buffer - (delete-region (point-min) (point-max))))) + (erase-buffer)))) (defun python-shell-font-lock-comint-output-filter-function (output) "Clean up the font-lock buffer after any OUTPUT." - (when (and (not (string= "" output)) - ;; Is end of output and is not just a prompt. - (not (member - (python-shell-comint-end-of-output-p - (ansi-color-filter-apply output)) - '(nil 0)))) - ;; If output is other than an input prompt then "real" output has - ;; been received and the font-lock buffer must be cleaned up. - (python-shell-font-lock-cleanup-buffer)) + (if (and (not (string= "" output)) + ;; Is end of output and is not just a prompt. + (not (member + (python-shell-comint-end-of-output-p + (ansi-color-filter-apply output)) + '(nil 0)))) + ;; If output is other than an input prompt then "real" output has + ;; been received and the font-lock buffer must be cleaned up. + (python-shell-font-lock-cleanup-buffer) + ;; Otherwise just add a newline. + (python-shell-font-lock-with-font-lock-buffer + (goto-char (point-max)) + (newline))) output) (defun python-shell-font-lock-post-command-hook () "Fontifies current line in shell buffer." - (if (eq this-command 'comint-send-input) - ;; Add a newline when user sends input as this may be a block. - (python-shell-font-lock-with-font-lock-buffer - (goto-char (line-end-position)) - (newline)) - (when (and (python-util-comint-last-prompt) - (> (point) (cdr (python-util-comint-last-prompt)))) - (let ((input (buffer-substring-no-properties - (cdr (python-util-comint-last-prompt)) (point-max))) - (old-input (python-shell-font-lock-with-font-lock-buffer - (buffer-substring-no-properties - (line-beginning-position) (point-max)))) - (current-point (point)) - (buffer-undo-list t)) - ;; When input hasn't changed, do nothing. - (when (not (string= input old-input)) - (delete-region (cdr (python-util-comint-last-prompt)) (point-max)) - (insert - (python-shell-font-lock-with-font-lock-buffer - (delete-region (line-beginning-position) - (line-end-position)) - (insert input) - ;; Ensure buffer is fontified, keeping it - ;; compatible with Emacs < 24.4. - (if (fboundp 'font-lock-ensure) - (funcall 'font-lock-ensure) - (font-lock-default-fontify-buffer)) - ;; Replace FACE text properties with FONT-LOCK-FACE so - ;; they are not overwritten by comint buffer's font lock. - (python-util-text-properties-replace-name - 'face 'font-lock-face) - (buffer-substring (line-beginning-position) - (line-end-position)))) - (goto-char current-point)))))) + (let ((prompt-end (cdr (python-util-comint-last-prompt)))) + (when (and prompt-end (> (point) prompt-end) + (process-live-p (get-buffer-process (current-buffer)))) + (let* ((input (buffer-substring-no-properties + prompt-end (point-max))) + (deactivate-mark nil) + (start-pos prompt-end) + (buffer-undo-list t) + (font-lock-buffer-pos nil) + (replacement + (python-shell-font-lock-with-font-lock-buffer + (delete-region (line-beginning-position) + (point-max)) + (setq font-lock-buffer-pos (point)) + (insert input) + ;; Ensure buffer is fontified, keeping it + ;; compatible with Emacs < 24.4. + (if (fboundp 'font-lock-ensure) + (funcall 'font-lock-ensure) + (font-lock-default-fontify-buffer)) + (buffer-substring font-lock-buffer-pos + (point-max)))) + (replacement-length (length replacement)) + (i 0)) + ;; Inject text properties to get input fontified. + (while (not (= i replacement-length)) + (let* ((plist (text-properties-at i replacement)) + (next-change (or (next-property-change i replacement) + replacement-length)) + (plist (let ((face (plist-get plist 'face))) + (if (not face) + plist + ;; Replace FACE text properties with + ;; FONT-LOCK-FACE so input is fontified. + (plist-put plist 'face nil) + (plist-put plist 'font-lock-face face))))) + (set-text-properties + (+ start-pos i) (+ start-pos next-change) plist) + (setq i next-change))))))) (defun python-shell-font-lock-turn-on (&optional msg) "Turn on shell font-lock. @@ -2414,7 +2423,7 @@ With argument MSG show deactivation message." '(face nil font-lock-face nil))) (set (make-local-variable 'python-shell--font-lock-buffer) nil) (remove-hook 'post-command-hook - #'python-shell-font-lock-post-command-hook'local) + #'python-shell-font-lock-post-command-hook 'local) (remove-hook 'kill-buffer-hook #'python-shell-font-lock-kill-buffer 'local) (remove-hook 'comint-output-filter-functions @@ -3148,67 +3157,68 @@ With argument MSG show activation/deactivation message." "Get completions using native readline for PROCESS. When IMPORT is non-nil takes precedence over INPUT for completion." - (when (and python-shell-completion-native-enable - (python-util-comint-last-prompt) - (>= (point) (cdr (python-util-comint-last-prompt)))) - (let* ((input (or import input)) - (original-filter-fn (process-filter process)) - (redirect-buffer (get-buffer-create - python-shell-completion-native-redirect-buffer)) - (separators (python-rx - (or whitespace open-paren close-paren))) - (trigger "\t\t\t") - (new-input (concat input trigger)) - (input-length - (save-excursion - (+ (- (point-max) (comint-bol)) (length new-input)))) - (delete-line-command (make-string input-length ?\b)) - (input-to-send (concat new-input delete-line-command))) - ;; Ensure restoring the process filter, even if the user quits - ;; or there's some other error. - (unwind-protect - (with-current-buffer redirect-buffer - ;; Cleanup the redirect buffer - (delete-region (point-min) (point-max)) - ;; Mimic `comint-redirect-send-command', unfortunately it - ;; can't be used here because it expects a newline in the - ;; command and that's exactly what we are trying to avoid. - (let ((comint-redirect-echo-input nil) - (comint-redirect-verbose nil) - (comint-redirect-perform-sanity-check nil) - (comint-redirect-insert-matching-regexp nil) - ;; Feed it some regex that will never match. - (comint-redirect-finished-regexp "^\\'$") - (comint-redirect-output-buffer redirect-buffer)) - ;; Compatibility with Emacs 24.x. Comint changed and - ;; now `comint-redirect-filter' gets 3 args. This - ;; checks which version of `comint-redirect-filter' is - ;; in use based on its args and uses `apply-partially' - ;; to make it up for the 3 args case. - (if (= (length - (help-function-arglist 'comint-redirect-filter)) 3) - (set-process-filter - process (apply-partially - #'comint-redirect-filter original-filter-fn)) - (set-process-filter process #'comint-redirect-filter)) - (process-send-string process input-to-send) - (accept-process-output - process - python-shell-completion-native-output-timeout) - ;; XXX: can't use `python-shell-accept-process-output' - ;; here because there are no guarantees on how output - ;; ends. The workaround here is to call - ;; `accept-process-output' until we don't find anything - ;; else to accept. - (while (accept-process-output - process - python-shell-completion-native-output-timeout)) - (cl-remove-duplicates - (split-string - (buffer-substring-no-properties - (point-min) (point-max)) - separators t)))) - (set-process-filter process original-filter-fn))))) + (with-current-buffer (process-buffer process) + (when (and python-shell-completion-native-enable + (python-util-comint-last-prompt) + (>= (point) (cdr (python-util-comint-last-prompt)))) + (let* ((input (or import input)) + (original-filter-fn (process-filter process)) + (redirect-buffer (get-buffer-create + python-shell-completion-native-redirect-buffer)) + (separators (python-rx + (or whitespace open-paren close-paren))) + (trigger "\t\t\t") + (new-input (concat input trigger)) + (input-length + (save-excursion + (+ (- (point-max) (comint-bol)) (length new-input)))) + (delete-line-command (make-string input-length ?\b)) + (input-to-send (concat new-input delete-line-command))) + ;; Ensure restoring the process filter, even if the user quits + ;; or there's some other error. + (unwind-protect + (with-current-buffer redirect-buffer + ;; Cleanup the redirect buffer + (delete-region (point-min) (point-max)) + ;; Mimic `comint-redirect-send-command', unfortunately it + ;; can't be used here because it expects a newline in the + ;; command and that's exactly what we are trying to avoid. + (let ((comint-redirect-echo-input nil) + (comint-redirect-verbose nil) + (comint-redirect-perform-sanity-check nil) + (comint-redirect-insert-matching-regexp nil) + ;; Feed it some regex that will never match. + (comint-redirect-finished-regexp "^\\'$") + (comint-redirect-output-buffer redirect-buffer)) + ;; Compatibility with Emacs 24.x. Comint changed and + ;; now `comint-redirect-filter' gets 3 args. This + ;; checks which version of `comint-redirect-filter' is + ;; in use based on its args and uses `apply-partially' + ;; to make it up for the 3 args case. + (if (= (length + (help-function-arglist 'comint-redirect-filter)) 3) + (set-process-filter + process (apply-partially + #'comint-redirect-filter original-filter-fn)) + (set-process-filter process #'comint-redirect-filter)) + (process-send-string process input-to-send) + (accept-process-output + process + python-shell-completion-native-output-timeout) + ;; XXX: can't use `python-shell-accept-process-output' + ;; here because there are no guarantees on how output + ;; ends. The workaround here is to call + ;; `accept-process-output' until we don't find anything + ;; else to accept. + (while (accept-process-output + process + python-shell-completion-native-output-timeout)) + (cl-remove-duplicates + (split-string + (buffer-substring-no-properties + (point-min) (point-max)) + separators t)))) + (set-process-filter process original-filter-fn)))))) (defun python-shell-completion-get-completions (process import input) "Do completion at point using PROCESS for IMPORT or INPUT. @@ -3251,20 +3261,23 @@ completion." Optional argument PROCESS forces completions to be retrieved using that one instead of current buffer's process." (setq process (or process (get-buffer-process (current-buffer)))) - (let* ((last-prompt-end (cdr (python-util-comint-last-prompt))) + (let* ((line-start (if (derived-mode-p 'inferior-python-mode) + ;; Working on a shell buffer: use prompt end. + (cdr (python-util-comint-last-prompt)) + (line-beginning-position))) (import-statement (when (string-match-p (rx (* space) word-start (or "from" "import") word-end space) - (buffer-substring-no-properties last-prompt-end (point))) - (buffer-substring-no-properties last-prompt-end (point)))) + (buffer-substring-no-properties line-start (point))) + (buffer-substring-no-properties line-start (point)))) (start (save-excursion (if (not (re-search-backward (python-rx (or whitespace open-paren close-paren string-delimiter)) - last-prompt-end + line-start t 1)) - last-prompt-end + line-start (forward-char (length (match-string-no-properties 0))) (point)))) (end (point)) @@ -3847,8 +3860,10 @@ The skeleton will be bound to python-skeleton-NAME." :type 'string :group 'python) -(defvar-local python-check-custom-command nil +(defvar python-check-custom-command nil "Internal use.") +;; XXX: Avoid `defvar-local' for compat with Emacs<24.3 +(make-variable-buffer-local 'python-check-custom-command) (defun python-check (command) "Check a Python file (default current buffer's file). @@ -3917,15 +3932,29 @@ See `python-check-command' for the default." :type 'string :group 'python) +(defun python-eldoc--get-symbol-at-point () + "Get the current symbol for eldoc. +Returns the current symbol handling point within arguments." + (save-excursion + (let ((start (python-syntax-context 'paren))) + (when start + (goto-char start)) + (when (or start + (eobp) + (memq (char-syntax (char-after)) '(?\ ?-))) + ;; Try to adjust to closest symbol if not in one. + (python-util-forward-comment -1))) + (python-info-current-symbol t))) + (defun python-eldoc--get-doc-at-point (&optional force-input force-process) "Internal implementation to get documentation at point. -If not FORCE-INPUT is passed then what `python-info-current-symbol' +If not FORCE-INPUT is passed then what `python-eldoc--get-symbol-at-point' returns will be used. If not FORCE-PROCESS is passed what `python-shell-get-process' returns is used." (let ((process (or force-process (python-shell-get-process)))) (when process (let ((input (or force-input - (python-info-current-symbol t)))) + (python-eldoc--get-symbol-at-point)))) (and input ;; Prevent resizing the echo area when iPython is ;; enabled. Bug#18794. @@ -3945,7 +3974,7 @@ inferior Python process is updated properly." "Get help on SYMBOL using `help'. Interactively, prompt for symbol." (interactive - (let ((symbol (python-info-current-symbol t)) + (let ((symbol (python-eldoc--get-symbol-at-point)) (enable-recursive-minibuffers t)) (list (read-string (if symbol (format "Describe symbol (default %s): " symbol) @@ -3953,6 +3982,17 @@ Interactively, prompt for symbol." nil nil symbol)))) (message (python-eldoc--get-doc-at-point symbol))) + +;;; Hideshow + +(defun python-hideshow-forward-sexp-function (arg) + "Python specific `forward-sexp' function for `hs-minor-mode'. +Argument ARG is ignored." + arg ; Shut up, byte compiler. + (python-nav-end-of-defun) + (unless (python-info-current-line-empty-p) + (backward-char))) + ;;; Imenu @@ -4573,23 +4613,6 @@ returned as is." n (1- n))) (reverse acc)))) -(defun python-util-text-properties-replace-name - (from to &optional start end) - "Replace properties named FROM to TO, keeping its value. -Arguments START and END narrow the buffer region to work on." - (save-excursion - (goto-char (or start (point-min))) - (while (not (eobp)) - (let ((plist (text-properties-at (point))) - (next-change (or (next-property-change (point) (current-buffer)) - (or end (point-max))))) - (when (plist-get plist from) - (let* ((face (plist-get plist from)) - (plist (plist-put plist from nil)) - (plist (plist-put plist to face))) - (set-text-properties (point) next-change plist (current-buffer)))) - (goto-char next-change))))) - (defun python-util-strip-string (string) "Strip STRING whitespace and newlines from end and beginning." (replace-regexp-in-string @@ -4682,14 +4705,23 @@ Arguments START and END narrow the buffer region to work on." (current-column)))) (^ '(- (1+ (current-indentation)))))) - (add-function :before-until (local 'eldoc-documentation-function) - #'python-eldoc-function) - - (add-to-list 'hs-special-modes-alist - `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#" - ,(lambda (_arg) - (python-nav-end-of-defun)) - nil)) + (if (null eldoc-documentation-function) + ;; Emacs<25 + (set (make-local-variable 'eldoc-documentation-function) + #'python-eldoc-function) + (add-function :before-until (local 'eldoc-documentation-function) + #'python-eldoc-function)) + + (add-to-list + 'hs-special-modes-alist + `(python-mode + "\\s-*\\(?:def\\|class\\)\\>" + ;; Use the empty string as end regexp so it doesn't default to + ;; "\\s)". This way parens at end of defun are properly hidden. + "" + "#" + python-hideshow-forward-sexp-function + nil)) (set (make-local-variable 'outline-regexp) (python-rx (* space) block-start)) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index d1e42ca344..f2fb95ce59 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1817,7 +1817,7 @@ It will be properly highlighted even when the call omits parens.") (defvar ruby-syntax-before-regexp-re (concat ;; Special tokens that can't be followed by a division operator. - "\\(^\\|[[=(,~;<>]" + "\\(^\\|[[{|=(,~;<>!]" ;; Distinguish ternary operator tokens. ;; FIXME: They don't really have to be separated with spaces. "\\|[?:] " @@ -2053,8 +2053,9 @@ See `font-lock-syntax-table'.") "rescue" "retry" "return" - "then" + "self" "super" + "then" "unless" "undef" "until" @@ -2071,10 +2072,10 @@ See `font-lock-syntax-table'.") "at_exit" "autoload" "autoload?" + "callcc" "catch" "eval" "exec" - "fork" "format" "lambda" "load" @@ -2092,7 +2093,10 @@ See `font-lock-syntax-table'.") "sprintf" "syscall" "system" + "throw" + "trace_var" "trap" + "untrace_var" "warn" ;; keyword-like private methods on Module "alias_method" @@ -2122,13 +2126,15 @@ See `font-lock-syntax-table'.") "__dir__" "__method__" "abort" - "at_exit" "binding" "block_given?" "caller" "exit" "exit!" "fail" + "fork" + "global_variables" + "local_variables" "private" "protected" "public" @@ -2137,8 +2143,7 @@ See `font-lock-syntax-table'.") "readline" "readlines" "sleep" - "srand" - "throw") + "srand") 'symbols)) (1 font-lock-builtin-face)) ;; Here-doc beginnings. @@ -2149,13 +2154,21 @@ See `font-lock-syntax-table'.") "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$" ;; Variables. (,(concat ruby-font-lock-keyword-beg-re - "\\_<\\(nil\\|self\\|true\\|false\\)\\_>") - 1 font-lock-variable-name-face) + "\\_<\\(nil\\|true\\|false\\)\\_>") + 1 font-lock-constant-face) ;; Keywords that evaluate to certain values. ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" (0 font-lock-builtin-face)) - ;; Symbols. - ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" + ;; Symbols with symbol characters. + ("\\(^\\|[^:]\\)\\(:@?\\(?:\\w\\|_\\)+\\)\\([!?=]\\)?" + (2 font-lock-constant-face) + (3 (unless (and (eq (char-before (match-end 3)) ?=) + (eq (char-after (match-end 3)) ?>)) + ;; bug#18466 + font-lock-constant-face) + nil t)) + ;; Symbols with special characters. + ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" 2 font-lock-constant-face) ;; Special globals. (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|" diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 2ed3a745bb..3800cfb6b1 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -4,7 +4,7 @@ ;; Author: Alex Schroeder ;; Maintainer: Michael Mauger -;; Version: 3.4 +;; Version: 3.5 ;; Keywords: comm languages processes ;; URL: http://savannah.gnu.org/projects/emacs/ @@ -3296,13 +3296,13 @@ Allows the suppression of continuation prompts.") (defun sql-starts-with-prompt-re () "Anchor the prompt expression at the beginning of the output line. Remove the start of line regexp." - (replace-regexp-in-string "\\^" "\\\\`" comint-prompt-regexp)) + (concat "\\`" comint-prompt-regexp)) (defun sql-ends-with-prompt-re () "Anchor the prompt expression at the end of the output line. -Remove the start of line regexp from the prompt expression since -it may not follow newline characters in the output line." - (concat (replace-regexp-in-string "\\^" "" sql-prompt-regexp) "\\'")) +Match a SQL prompt or a password prompt." + (concat "\\(?:\\(?:" sql-prompt-regexp "\\)\\|" + "\\(?:" comint-password-prompt-regexp "\\)\\)\\'")) (defun sql-interactive-remove-continuation-prompt (oline) "Strip out continuation prompts out of the OLINE. @@ -3321,7 +3321,17 @@ to the next chunk to properly match the broken-up prompt. If the filter gets confused, it should reset and stop filtering to avoid deleting non-prompt output." - (when comint-prompt-regexp + ;; continue gathering lines of text iff + ;; + we know what a prompt looks like, and + ;; + there is held text, or + ;; + there are continuation prompt yet to come, or + ;; + not just a prompt string + (when (and comint-prompt-regexp + (or (> (length (or sql-preoutput-hold "")) 0) + (> (or sql-output-newline-count 0) 0) + (not (or (string-match sql-prompt-regexp oline) + (string-match sql-prompt-cont-regexp oline))))) + (save-match-data (let (prompt-found last-nl) @@ -3357,16 +3367,19 @@ to avoid deleting non-prompt output." sql-preoutput-hold "")) ;; Break up output by physical lines if we haven't hit the final prompt - (unless (and (not (string= oline "")) - (string-match (sql-ends-with-prompt-re) oline) - (>= (match-end 0) (length oline))) - (setq last-nl 0) - (while (string-match "\n" oline last-nl) - (setq last-nl (match-end 0))) - (setq sql-preoutput-hold (concat (substring oline last-nl) - sql-preoutput-hold) - oline (substring oline 0 last-nl)))))) - oline) + (let ((end-re (sql-ends-with-prompt-re))) + (unless (and (not (string= oline "")) + (string-match end-re oline) + (>= (match-end 0) (length oline))) + ;; Find everything upto the last nl + (setq last-nl 0) + (while (string-match "\n" oline last-nl) + (setq last-nl (match-end 0))) + ;; Hold after the last nl, return upto last nl + (setq sql-preoutput-hold (concat (substring oline last-nl) + sql-preoutput-hold) + oline (substring oline 0 last-nl))))))) + oline) ;;; Sending the region to the SQLi buffer. diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 7b6f2d3a81..57206544b9 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -123,7 +123,7 @@ ;;; Code: ;; This variable will always hold the version number of the mode -(defconst verilog-mode-version "2014-11-12-aa4b777-vpo" +(defconst verilog-mode-version "2015-02-20-0d6420b-vpo" "Version of this Verilog mode.") (defconst verilog-mode-release-emacs t "If non-nil, this version of Verilog mode was released with Emacs itself.") @@ -8419,7 +8419,6 @@ Return an array of [outputs inouts inputs wire reg assign const]." (defvar sigs-temp) ;; These are known to be from other packages and may not be defined (defvar diff-command nil) - (defvar vector-skip-list) ;; There are known to be from newer versions of Emacs (defvar create-lockfiles)) @@ -10884,7 +10883,7 @@ See the example in `verilog-auto-inout-modport'." (defvar vl-bits nil "See `verilog-auto-inst'.") ; Prevent compile warning (defvar vl-mbits nil "See `verilog-auto-inst'.") ; Prevent compile warning -(defun verilog-auto-inst-port (port-st indent-pt tpl-list tpl-num for-star par-values) +(defun verilog-auto-inst-port (port-st indent-pt moddecls tpl-list tpl-num for-star par-values) "Print out an instantiation connection for this PORT-ST. Insert to INDENT-PT, use template TPL-LIST. @ are instantiation numbers, replaced with TPL-NUM. @@ -10901,9 +10900,10 @@ If PAR-VALUES replace final strings with these parameter values." (vl-mbits (if (verilog-sig-multidim port-st) (verilog-sig-multidim-string port-st) "")) (vl-bits (if (or verilog-auto-inst-vector - (not (assoc port vector-skip-list)) + (not (assoc port (verilog-decls-get-signals moddecls))) (not (equal (verilog-sig-bits port-st) - (verilog-sig-bits (assoc port vector-skip-list))))) + (verilog-sig-bits + (assoc port (verilog-decls-get-signals moddecls)))))) (or (verilog-sig-bits port-st) "") "")) (case-fold-search nil) @@ -10932,7 +10932,12 @@ If PAR-VALUES replace final strings with these parameter values." (concat "/*" vl-mbits vl-bits "*/") (concat vl-bits)) tpl-net (concat port - (if vl-modport (concat "." vl-modport) "") + (if (and vl-modport + ;; .modport cannot be added if attachment is + ;; already declared as modport, VCS croaks + (let ((sig (assoc port (verilog-decls-get-interfaces moddecls)))) + (not (and sig (verilog-sig-modport sig))))) + (concat "." vl-modport) "") dflt-bits)) ;; Find template (cond (tpl-ass ; Template of exact port name @@ -11002,12 +11007,12 @@ If PAR-VALUES replace final strings with these parameter values." ;;(x "incom[@\"(+ (* 8 @) 7)\":@\"(* 8 @)\"]") ;;(x ".out (outgo[@\"(concat (+ (* 8 @) 7) \\\":\\\" ( * 8 @))\"]));") -(defun verilog-auto-inst-port-list (sig-list indent-pt tpl-list tpl-num for-star par-values) +(defun verilog-auto-inst-port-list (sig-list indent-pt moddecls tpl-list tpl-num for-star par-values) "For `verilog-auto-inst' print a list of ports using `verilog-auto-inst-port'." (when verilog-auto-inst-sort (setq sig-list (sort (copy-alist sig-list) `verilog-signals-sort-compare))) (mapc (lambda (port) - (verilog-auto-inst-port port indent-pt + (verilog-auto-inst-port port indent-pt moddecls tpl-list tpl-num for-star par-values)) sig-list)) @@ -11366,8 +11371,6 @@ For more information see the \\[verilog-faq] and forums at URL (+ 16 (* 8 (/ (+ indent-pt 7) 8))))) (modi (verilog-modi-current)) (moddecls (verilog-modi-get-decls modi)) - (vector-skip-list (unless verilog-auto-inst-vector - (verilog-decls-get-signals moddecls))) submod submodi submoddecls inst skip-pins tpl-list tpl-num did-first par-values) @@ -11409,7 +11412,7 @@ For more information see the \\[verilog-faq] and forums at URL (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) ;; Note these are searched for in verilog-read-sub-decls. (verilog-insert-indent "// Interfaced\n") - (verilog-auto-inst-port-list sig-list indent-pt + (verilog-auto-inst-port-list sig-list indent-pt moddecls tpl-list tpl-num for-star par-values))) (let ((sig-list (verilog-signals-not-in (verilog-decls-get-interfaces submoddecls) @@ -11419,7 +11422,7 @@ For more information see the \\[verilog-faq] and forums at URL (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) ;; Note these are searched for in verilog-read-sub-decls. (verilog-insert-indent "// Interfaces\n") - (verilog-auto-inst-port-list sig-list indent-pt + (verilog-auto-inst-port-list sig-list indent-pt moddecls tpl-list tpl-num for-star par-values))) (let ((sig-list (verilog-signals-not-in (verilog-decls-get-outputs submoddecls) @@ -11428,7 +11431,7 @@ For more information see the \\[verilog-faq] and forums at URL (when sig-list (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) (verilog-insert-indent "// Outputs\n") - (verilog-auto-inst-port-list sig-list indent-pt + (verilog-auto-inst-port-list sig-list indent-pt moddecls tpl-list tpl-num for-star par-values))) (let ((sig-list (verilog-signals-not-in (verilog-decls-get-inouts submoddecls) @@ -11437,7 +11440,7 @@ For more information see the \\[verilog-faq] and forums at URL (when sig-list (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) (verilog-insert-indent "// Inouts\n") - (verilog-auto-inst-port-list sig-list indent-pt + (verilog-auto-inst-port-list sig-list indent-pt moddecls tpl-list tpl-num for-star par-values))) (let ((sig-list (verilog-signals-not-in (verilog-decls-get-inputs submoddecls) @@ -11446,7 +11449,7 @@ For more information see the \\[verilog-faq] and forums at URL (when sig-list (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) (verilog-insert-indent "// Inputs\n") - (verilog-auto-inst-port-list sig-list indent-pt + (verilog-auto-inst-port-list sig-list indent-pt moddecls tpl-list tpl-num for-star par-values))) ;; Kill extra semi (save-excursion @@ -11509,8 +11512,6 @@ Templates: (+ 16 (* 8 (/ (+ indent-pt 7) 8))))) (modi (verilog-modi-current)) (moddecls (verilog-modi-get-decls modi)) - (vector-skip-list (unless verilog-auto-inst-vector - (verilog-decls-get-signals moddecls))) submod submodi submoddecls inst skip-pins tpl-list tpl-num did-first) ;; Find module name that is instantiated @@ -11550,7 +11551,7 @@ Templates: (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) ;; Note these are searched for in verilog-read-sub-decls. (verilog-insert-indent "// Parameters\n") - (verilog-auto-inst-port-list sig-list indent-pt + (verilog-auto-inst-port-list sig-list indent-pt moddecls tpl-list tpl-num nil nil))) ;; Kill extra semi (save-excursion diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 875de3b865..8d6d2a2929 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -13,10 +13,10 @@ ;; filed in the Emacs bug reporting system against this file, a copy ;; of the bug report be sent to the maintainer's email address. -(defconst vhdl-version "3.36.1" +(defconst vhdl-version "3.37.1" "VHDL Mode version number.") -(defconst vhdl-time-stamp "2014-11-27" +(defconst vhdl-time-stamp "2015-01-15" "VHDL Mode time stamp for last update.") ;; This file is part of GNU Emacs. @@ -59,7 +59,7 @@ ;; - Block commenting ;; - Code fixing/alignment/beautification ;; - PostScript printing -;; - VHDL'87/'93 and VHDL-AMS supported +;; - VHDL'87/'93/'02/'08 and VHDL-AMS supported ;; - Comprehensive menu ;; - Fully customizable ;; - Works under GNU Emacs (recommended) and XEmacs @@ -716,6 +716,7 @@ A project setup file can be obtained by exporting a project (see menu). Basic standard: VHDL'87 : IEEE Std 1076-1987 VHDL'93/02 : IEEE Std 1076-1993/2002 + VHDL'08 : IEEE Std 1076-2008 Additional standards: VHDL-AMS : IEEE Std 1076.1 (analog-mixed-signal) Math packages: IEEE Std 1076.2 (`math_real', `math_complex') @@ -724,7 +725,8 @@ NOTE: Activate the new setting in a VHDL buffer by using the menu entry \"Activate Options\"." :type '(list (choice :tag "Basic standard" (const :tag "VHDL'87" 87) - (const :tag "VHDL'93/02" 93)) + (const :tag "VHDL'93/02" 93) + (const :tag "VHDL'08" 08)) (set :tag "Additional standards" :indent 2 (const :tag "VHDL-AMS" ams) (const :tag "Math packages" math))) @@ -942,6 +944,12 @@ If nil, only a list of actual parameters is entered." :type 'boolean :group 'vhdl-template) +(defcustom vhdl-sensitivity-list-all t + "Non-nil means use 'all' keyword in sensitivity list." + :version "25.1" + :type 'boolean + :group 'vhdl-template) + (defcustom vhdl-zero-string "'0'" "String to use for a logic zero." :type 'string @@ -1728,7 +1736,7 @@ NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu 'vhdl-words-init 'vhdl-font-lock-init)) :group 'vhdl-highlight) -(defcustom vhdl-directive-keywords '("pragma" "synopsys") +(defcustom vhdl-directive-keywords '("psl" "pragma" "synopsys") "List of compiler directive keywords recognized for highlighting. NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu @@ -2001,6 +2009,8 @@ reported and the syntactic symbol is ignored.") (package . 0) (architecture . 0) (package-body . 0) + (context . 0) + (directive . 0) ) "Default settings for offsets of syntactic elements. Do not change this constant! See the variable `vhdl-offsets-alist' for @@ -2065,7 +2075,8 @@ Here is the current list of valid syntactic element symbols: configuration -- inside a configuration declaration package -- inside a package declaration architecture -- inside an architecture body - package-body -- inside a package body") + package-body -- inside a package body + context -- inside a context declaration") (defvar vhdl-comment-only-line-offset 0 "Extra offset for line which contains only the start of a comment. @@ -2684,6 +2695,7 @@ elements > `vhdl-menu-max-size'." (define-key vhdl-template-map "Cd" 'vhdl-template-configuration-decl) (define-key vhdl-template-map "Cs" 'vhdl-template-configuration-spec) (define-key vhdl-template-map "co" 'vhdl-template-constant) + (define-key vhdl-template-map "ct" 'vhdl-template-context) (define-key vhdl-template-map "di" 'vhdl-template-disconnect) (define-key vhdl-template-map "el" 'vhdl-template-else) (define-key vhdl-template-map "ei" 'vhdl-template-elsif) @@ -2963,7 +2975,7 @@ STRING are replaced by `-' and substrings are converted to lower case." (modify-syntax-entry ?\* "." st) (modify-syntax-entry ?\+ "." st) (modify-syntax-entry ?\. "." st) - (modify-syntax-entry ?\/ "." st) +;;; (modify-syntax-entry ?\/ "." st) (modify-syntax-entry ?\: "." st) (modify-syntax-entry ?\; "." st) (modify-syntax-entry ?\< "." st) @@ -2975,11 +2987,13 @@ STRING are replaced by `-' and substrings are converted to lower case." (modify-syntax-entry ?\" "\"" st) ;; define underscore (modify-syntax-entry ?\_ (if vhdl-underscore-is-part-of-word "w" "_") st) - ;; a single hyphen is punctuation, but a double hyphen starts a comment - (modify-syntax-entry ?\- ". 12" st) - ;; and \n and \^M end a comment - (modify-syntax-entry ?\n ">" st) - (modify-syntax-entry ?\^M ">" st) + ;; single-line comments + (modify-syntax-entry ?\- ". 12b" st) + ;; multi-line comments + (modify-syntax-entry ?\/ ". 14b" st) + (modify-syntax-entry ?* ". 23" st) + (modify-syntax-entry ?\n "> b" st) + (modify-syntax-entry ?\^M "> b" st) ;; define parentheses to match (modify-syntax-entry ?\( "()" st) (modify-syntax-entry ?\) ")(" st) @@ -3044,6 +3058,7 @@ STRING are replaced by `-' and substrings are converted to lower case." ("configuration" . vhdl-template-configuration-hook) ("cons" . vhdl-template-constant-hook) ("constant" . vhdl-template-constant-hook) + ("context" . vhdl-template-context-hook) ("disconnect" . vhdl-template-disconnect-hook) ("downto" . vhdl-template-default-hook) ("else" . vhdl-template-else-hook) @@ -3191,6 +3206,7 @@ STRING are replaced by `-' and substrings are converted to lower case." ("configuration declaration" vhdl-template-configuration-decl) ("configuration specification" vhdl-template-configuration-spec) ("constant declaration" vhdl-template-constant) + ("context declaration" vhdl-template-context) ("disconnection specification" vhdl-template-disconnect) ("entity declaration" vhdl-template-entity) ("exit statement" vhdl-template-exit) @@ -3367,6 +3383,7 @@ STRING are replaced by `-' and substrings are converted to lower case." ["Configuration (Decl)" vhdl-template-configuration-decl t] ["Configuration (Spec)" vhdl-template-configuration-spec t] ["Constant" vhdl-template-constant t] + ["Context" vhdl-template-context t] ["Disconnect" vhdl-template-disconnect t] ["Else" vhdl-template-else t] ["Elsif" vhdl-template-elsif t] @@ -3708,6 +3725,11 @@ STRING are replaced by `-' and substrings are converted to lower case." (list '93 (cadr vhdl-standard))) (vhdl-activate-customizations)) :style radio :selected (eq '93 (car vhdl-standard))] + ["VHDL'08" + (progn (customize-set-variable 'vhdl-standard + (list '08 (cadr vhdl-standard))) + (vhdl-activate-customizations)) + :style radio :selected (eq '08 (car vhdl-standard))] "--" ["VHDL-AMS" (progn (customize-set-variable @@ -3830,6 +3852,10 @@ STRING are replaced by `-' and substrings are converted to lower case." (customize-set-variable 'vhdl-conditions-in-parenthesis (not vhdl-conditions-in-parenthesis)) :style toggle :selected vhdl-conditions-in-parenthesis] + ["Sensitivity List uses 'all'" + (customize-set-variable 'vhdl-sensitivity-list-all + (not vhdl-sensitivity-list-all)) + :style toggle :selected vhdl-sensitivity-list-all] ["Zero String..." (customize-option 'vhdl-zero-string) t] ["One String..." (customize-option 'vhdl-one-string) t] ("File Header" @@ -4224,6 +4250,9 @@ STRING are replaced by `-' and substrings are converted to lower case." ("Entity" "^\\s-*\\(entity\\)\\s-+\\(\\(\\w\\|\\s_\\)+\\)" 2) + ("Context" + "^\\s-*\\(context\\)\\s-+\\(\\(\\w\\|\\s_\\)+\\)" + 2) ) "Imenu generic expression for VHDL Mode. See `imenu-generic-expression'.") @@ -4677,7 +4706,7 @@ Usage: VHDL STANDARDS: The VHDL standards to be used are specified in option `vhdl-standard'. - Available standards are: VHDL'87/'93(02), VHDL-AMS, and Math Packages. + Available standards are: VHDL'87/'93(02)/'08, VHDL-AMS, and Math Packages. KEYWORD CASE: @@ -4987,6 +5016,12 @@ Key bindings: ) "List of VHDL'02 keywords.") +(defconst vhdl-08-keywords + '( + "context" "force" "property" "release" "sequence" + ) + "List of VHDL'08 keywords.") + (defconst vhdl-ams-keywords '( "across" "break" "limit" "nature" "noise" "procedural" "quantity" @@ -5028,6 +5063,12 @@ Key bindings: ) "List of VHDL'02 standardized types.") +(defconst vhdl-08-types + '( + "boolean_vector" "integer_vector" "real_vector" "time_vector" + ) + "List of VHDL'08 standardized types.") + (defconst vhdl-ams-types ;; standards: IEEE Std 1076.1-2007, IEEE Std 1076.1.1-2004 '( @@ -5103,6 +5144,12 @@ Key bindings: ) "List of VHDL'02 standardized attributes.") +(defconst vhdl-08-attributes + '( + "instance_name" "path_name" + ) + "List of VHDL'08 standardized attributes.") + (defconst vhdl-ams-attributes '( "across" "through" @@ -5174,6 +5221,15 @@ Key bindings: ) "List of VHDL'02 standardized functions.") +(defconst vhdl-08-functions + '( + "finish" "flush" "justify" "maximum" "minimum" + "resolution_limit" "rising_edge" "stop" "swrite" + "tee" "to_binarystring" "to_bstring" "to_hexstring" "to_hstring" + "to_octalstring" "to_ostring" "to_string" + ) + "List of VHDL'08 standardized functions.") + (defconst vhdl-ams-functions '( ;; package `standard' @@ -5202,6 +5258,13 @@ Key bindings: ) "List of VHDL'02 standardized packages and libraries.") +(defconst vhdl-08-packages + '( + "env" "numeric_std_signed" "numeric_std_unsigned" + "ieee_bit_context" "ieee_std_context" ;; contexts + ) + "List of VHDL'08 standardized packages and libraries.") + (defconst vhdl-ams-packages '( "fundamental_constants" "material_constants" "energy_systems" @@ -5216,6 +5279,18 @@ Key bindings: ) "List of Math Packages standardized packages and libraries.") +(defconst vhdl-08-directives + '( + "author" "author_info" "begin" "begin_protected" "comment" + "data_block" "data_keyname" "data_keyowner" "data_method" + "decrypt_license" "digest_block" "digest_key_method" "digest_keyname" + "digest_keyowner" "digest_method" + "encoding" "encrypt_agent" "encrypt_agent_info" "end" "end_protected" + "key_block" "key_keyname" "key_keyowner" "key_method" + "runtime_license" "viewport" + ) + "List of VHDL'08 standardized tool directives.") + (defvar vhdl-keywords nil "List of VHDL keywords.") @@ -5237,6 +5312,9 @@ Key bindings: (defvar vhdl-packages nil "List of VHDL standardized packages and libraries.") +(defvar vhdl-directives nil + "List of VHDL standardized packages and libraries.") + (defvar vhdl-reserved-words nil "List of additional reserved words.") @@ -5282,17 +5360,20 @@ Key bindings: (vhdl-upcase-list (and vhdl-highlight-case-sensitive vhdl-upper-case-keywords) (append vhdl-02-keywords + (when (vhdl-standard-p '08) vhdl-08-keywords) (when (vhdl-standard-p 'ams) vhdl-ams-keywords)))) (setq vhdl-types (vhdl-upcase-list (and vhdl-highlight-case-sensitive vhdl-upper-case-types) (append vhdl-02-types + (when (vhdl-standard-p '08) vhdl-08-types) (when (vhdl-standard-p 'ams) vhdl-ams-types) (when (vhdl-standard-p 'math) vhdl-math-types)))) (setq vhdl-attributes (vhdl-upcase-list (and vhdl-highlight-case-sensitive vhdl-upper-case-attributes) (append vhdl-02-attributes + (when (vhdl-standard-p '08) vhdl-08-attributes) (when (vhdl-standard-p 'ams) vhdl-ams-attributes)))) (setq vhdl-enum-values (vhdl-upcase-list @@ -5307,12 +5388,16 @@ Key bindings: '("")))) (setq vhdl-functions (append vhdl-02-functions + (when (vhdl-standard-p '08) vhdl-08-functions) (when (vhdl-standard-p 'ams) vhdl-ams-functions) (when (vhdl-standard-p 'math) vhdl-math-functions))) (setq vhdl-packages (append vhdl-02-packages + (when (vhdl-standard-p '08) vhdl-08-packages) (when (vhdl-standard-p 'ams) vhdl-ams-packages) (when (vhdl-standard-p 'math) vhdl-math-packages))) + (setq vhdl-directives + (append (when (vhdl-standard-p '08) vhdl-08-directives))) (setq vhdl-reserved-words (append (when vhdl-highlight-forbidden-words vhdl-forbidden-words) (when vhdl-highlight-verilog-keywords vhdl-verilog-keywords) @@ -5357,7 +5442,8 @@ Key bindings: (list vhdl-upper-case-enum-values) vhdl-enum-values (list vhdl-upper-case-constants) vhdl-constants (list nil) vhdl-functions - (list nil) vhdl-packages))) + (list nil) vhdl-packages + (list nil) vhdl-directives))) ;; initialize reserved words for VHDL Mode (vhdl-words-init) @@ -5598,9 +5684,24 @@ the offset is simply returned." ;; Syntactic support functions: -(defun vhdl-in-comment-p () - "Check if point is in a comment." - (eq (vhdl-in-literal) 'comment)) +(defun vhdl-in-comment-p (&optional pos) + "Check if point is in a comment (include multi-line comments)." + (let ((parse (lambda (p) + (let ((c (char-after p))) + (or (and c (eq (char-syntax c) ?<)) + (nth 4 (parse-partial-sexp + (save-excursion + (beginning-of-defun) + (point)) p))))))) + (save-excursion + (goto-char (or pos (point))) + (or (funcall parse (point)) + ;; `parse-partial-sexp's notion of comments doesn't span lines + (progn + (back-to-indentation) + (unless (eolp) + (forward-char) + (funcall parse (point)))))))) (defun vhdl-in-string-p () "Check if point is in a string." @@ -5625,6 +5726,9 @@ the offset is simply returned." ((nth 3 state) 'string) ((nth 4 state) 'comment) ((vhdl-beginning-of-macro) 'pound) + ((vhdl-beginning-of-directive) 'directive) + ;; for multi-line comments + ((and (vhdl-standard-p '08) (vhdl-in-comment-p)) 'comment) (t nil))))) (defun vhdl-in-extended-identifier-p () @@ -5675,7 +5779,7 @@ negative, skip forward otherwise." (goto-char lim ) (while (< (point) here) (setq match - (and (re-search-forward "--\\|[\"']" + (and (re-search-forward "--\\|[\"']\\|`" here 'move) (buffer-substring (match-beginning 0) (match-end 0)))) (setq state @@ -5685,6 +5789,9 @@ negative, skip forward otherwise." ;; looking at the opening of a VHDL style comment ((string= "--" match) (if (<= here (progn (end-of-line) (point))) 'comment)) + ;; looking at a directive + ((string= "`" match) + (if (<= here (progn (end-of-line) (point))) 'directive)) ;; looking at the opening of a double quote string ((string= "\"" match) (if (not (save-restriction @@ -5729,7 +5836,7 @@ negative, skip forward otherwise." (setq here (point)) (vhdl-forward-comment hugenum) ;; skip preprocessor directives - (when (and (eq (char-after) ?#) + (when (and (or (eq (char-after) ?#) (eq (char-after) ?`)) (= (vhdl-point 'boi) (point))) (while (and (eq (char-before (vhdl-point 'eol)) ?\\) (= (forward-line 1) 0))) @@ -5766,6 +5873,19 @@ negative, skip forward otherwise." (goto-char here) nil))) +(defun vhdl-beginning-of-directive (&optional lim) + "Go to the beginning of a directive (nicked from `cc-engine')." + (let ((here (point))) + (beginning-of-line) + (while (eq (char-before (1- (point))) ?\\) + (forward-line -1)) + (back-to-indentation) + (if (and (<= (point) here) + (eq (char-after) ?`)) + t + (goto-char here) + nil))) + (defun vhdl-backward-syntactic-ws (&optional lim) "Backward skip over syntactic whitespace." (let* ((here (point-min)) @@ -5822,7 +5942,7 @@ that point, else nil." ;; Core syntactic evaluation functions: (defconst vhdl-libunit-re - "\\b\\(architecture\\|configuration\\|entity\\|package\\)\\b[^_]") + "\\b\\(architecture\\|configuration\\|context\\|entity\\|package\\)\\b[^_]") (defun vhdl-libunit-p () (and @@ -5840,7 +5960,7 @@ that point, else nil." )) (defconst vhdl-defun-re - "\\b\\(architecture\\|block\\|configuration\\|entity\\|package\\|process\\|procedural\\|procedure\\|function\\)\\b[^_]") + "\\b\\(architecture\\|block\\|configuration\\|context\\|entity\\|package\\|process\\|procedural\\|procedure\\|function\\)\\b[^_]") (defun vhdl-defun-p () (save-excursion @@ -5849,7 +5969,7 @@ that point, else nil." (save-excursion (backward-sexp) (not (looking-at "end\\s-+\\w"))) - ;; "architecture", "configuration", "entity", + ;; "architecture", "configuration", "context", "entity", ;; "package", "procedure", "function": t))) @@ -5863,7 +5983,7 @@ corresponding \"begin\" keyword, else return nil." (if (looking-at "block\\|process\\|procedural") ;; "block", "process". "procedural: (buffer-substring (match-beginning 0) (match-end 0)) - ;; "architecture", "configuration", "entity", "package", + ;; "architecture", "configuration", "context", "entity", "package", ;; "procedure", "function": "is")))) @@ -5884,7 +6004,7 @@ vhdl-begin-fwd-re, and are not inside a literal, and that we are not in the middle of an identifier that just happens to contain a \"begin\" keyword." (cond - ;; "[architecture|case|configuration|entity|package| + ;; "[architecture|case|configuration|context|entity|package| ;; procedure|function] ... is": ((and (looking-at "i") (save-excursion @@ -5897,7 +6017,7 @@ keyword." (let (foundp) (while (and (not foundp) (re-search-backward - ";\\|\\b\\(architecture\\|case\\|configuration\\|entity\\|package\\|procedure\\|return\\|is\\|begin\\|process\\|procedural\\|block\\)\\b[^_]" + ";\\|\\b\\(architecture\\|case\\|configuration\\|context\\|entity\\|package\\|procedure\\|return\\|is\\|begin\\|process\\|procedural\\|block\\)\\b[^_]" lim 'move)) (if (or (= (preceding-char) ?_) (vhdl-in-literal)) @@ -6092,7 +6212,7 @@ of an identifier that just happens to contain an \"end\" keyword." (vector "for" (vhdl-first-word pos) nil nil)) ;; "end [id]": (t - (vector "begin\\|architecture\\|configuration\\|entity\\|package\\|procedure\\|function" + (vector "begin\\|architecture\\|configuration\\|context\\|entity\\|package\\|procedure\\|function" (vhdl-first-word pos) ;; return an alist of (statement . keyword) mappings '( @@ -6102,6 +6222,8 @@ of an identifier that just happens to contain an \"end\" keyword." ("architecture" . "is") ;; "configuration ... is ... end [id]": ("configuration" . "is") + ;; "context ... is ... end [id]": + ("context" . "is") ;; "entity ... is ... end [id]": ("entity" . "is") ;; "package ... is ... end [id]": @@ -6716,7 +6838,8 @@ keyword at PLACEHOLDER, then return the library unit type." (cond ((looking-at "e") 'entity) ((looking-at "a") 'architecture) - ((looking-at "c") 'configuration) + ((looking-at "conf") 'configuration) + ((looking-at "cont") 'context) ((looking-at "p") (save-excursion (goto-char bod) @@ -6992,7 +7115,7 @@ is not moved." (goto-char (1+ containing-sexp)) (skip-chars-forward " \t") (not (eolp)) - (not (looking-at "--"))) + (not (looking-at "--\\|`"))) (save-excursion (vhdl-beginning-of-statement-1 containing-sexp) (skip-chars-backward " \t(") @@ -7141,8 +7264,10 @@ is not moved." ;; now we need to look at any modifiers (goto-char indent-point) (skip-chars-forward " \t") - (if (looking-at "--") + (if (or (looking-at "--") (looking-at "/\\*")) (vhdl-add-syntax 'comment)) + (if (looking-at "`") + (vhdl-add-syntax 'directive)) (if (eq literal 'pound) (vhdl-add-syntax 'cpp-macro)) ;; return the syntax @@ -7216,8 +7341,12 @@ only-lines." (vhdl-comment-indent) ;; otherwise, indent as specified by vhdl-comment-only-line-offset (if (not (bolp)) + ;; inside multi-line comment + (if (looking-at "\\*") + 1 + ;; otherwise (or (car-safe vhdl-comment-only-line-offset) - vhdl-comment-only-line-offset) + vhdl-comment-only-line-offset)) (or (cdr-safe vhdl-comment-only-line-offset) (car-safe vhdl-comment-only-line-offset) -1000 ;jam it against the left side @@ -7457,7 +7586,7 @@ ENDPOS is encountered." (mapc (function (lambda (elt) - (if (memq (car elt) '(entity configuration package + (if (memq (car elt) '(entity configuration context package package-body architecture)) nil (setq expurgated (append expurgated (list elt)))))) @@ -7787,7 +7916,7 @@ the token in MATCH." (vhdl-prepare-search-2 (save-excursion ;; search for declarative part - (when (and (re-search-backward "^\\(architecture\\|begin\\|configuration\\|end\\|entity\\|package\\)\\>" nil t) + (when (and (re-search-backward "^\\(architecture\\|begin\\|configuration\\|context\\|end\\|entity\\|package\\)\\>" nil t) (not (member (upcase (match-string 1)) '("BEGIN" "END")))) (setq beg (point)) (re-search-forward "^\\(begin\\|end\\)\\>" nil t) @@ -9137,6 +9266,27 @@ a configuration declaration if not within a design unit." (insert ";") (vhdl-comment-insert-inline)))))) +(defun vhdl-template-context () + "Insert a context declaration." + (interactive) + (let ((margin (current-indentation)) + (start (point)) + entity-exists string name position) + (vhdl-insert-keyword "CONTEXT ") + (when (setq name (vhdl-template-field "name" nil t start (point))) + (vhdl-insert-keyword " IS\n") + (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n")) + (indent-to (+ margin vhdl-basic-offset)) + (setq position (point)) + (insert "\n") + (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n")) + (indent-to margin) + (vhdl-insert-keyword "END ") + (unless (vhdl-standard-p '87) + (vhdl-insert-keyword "CONTEXT ")) + (insert name ";") + (goto-char position)))) + (defun vhdl-template-default () "Insert nothing." (interactive) @@ -9798,8 +9948,10 @@ otherwise." (forward-char 1)) (insert "(") (if (not seq) - (unless (setq input-signals - (vhdl-template-field "[sensitivity list]" ")" t)) + (unless (or (and (vhdl-standard-p '08) vhdl-sensitivity-list-all + (progn (insert "all)") (setq input-signals "all"))) + (setq input-signals + (vhdl-template-field "[sensitivity list]" ")" t))) (setq input-signals "") (delete-char -2)) (setq clock (or (and (not (equal "" vhdl-clock-name)) @@ -10533,7 +10685,8 @@ specification, if not already there." (while (search-forward "" end t) (replace-match (concat "VHDL" (cond ((vhdl-standard-p '87) "'87") - ((vhdl-standard-p '93) "'93/02")) + ((vhdl-standard-p '93) "'93/02") + ((vhdl-standard-p '08) "'08")) (when (vhdl-standard-p 'ams) ", VHDL-AMS") (when (vhdl-standard-p 'math) ", Math Packages")) t t)) (goto-char beg) @@ -11071,7 +11224,7 @@ else insert tab (used for word completion in VHDL minibuffer)." (save-excursion (beginning-of-line) ;; search backward for block beginning or end - (while (or (while (and (setq pos (re-search-backward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\(\\s-+body\\)?\\|type[ \t\n\r\f]+\\w+[ \t\n\r\f]+is[ \t\n\r\f]+\\(record\\|protected\\(\\s-+body\\)?\\)\\|units\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(postponed[ \t\n\r\f]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\|loop\\)\\)\\>" nil t)) + (while (or (while (and (setq pos (re-search-backward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|context\\|entity\\|package\\(\\s-+body\\)?\\|type[ \t\n\r\f]+\\w+[ \t\n\r\f]+is[ \t\n\r\f]+\\(record\\|protected\\(\\s-+body\\)?\\)\\|units\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(postponed[ \t\n\r\f]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\|loop\\)\\)\\>" nil t)) ;; not consider subprogram declarations (or (and (match-string 5) (save-match-data @@ -11102,7 +11255,7 @@ else insert tab (used for word completion in VHDL minibuffer)." (save-excursion (end-of-line) ;; search forward for block beginning or end - (while (or (while (and (setq pos (re-search-forward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\(\\s-+body\\)?\\|type[ \t\n\r\f]+\\w+[ \t\n\r\f]+is[ \t\n\r\f]+\\(record\\|protected\\(\\s-+body\\)?\\)\\|units\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(postponed[ \t\n\r\f]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\|loop\\)\\)\\>" nil t)) + (while (or (while (and (setq pos (re-search-forward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|context\\|entity\\|package\\(\\s-+body\\)?\\|type[ \t\n\r\f]+\\w+[ \t\n\r\f]+is[ \t\n\r\f]+\\(record\\|protected\\(\\s-+body\\)?\\)\\|units\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(postponed[ \t\n\r\f]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\|loop\\)\\)\\>" nil t)) ;; not consider subprogram declarations (or (and (match-string 5) (save-match-data @@ -11203,6 +11356,8 @@ but not if inside a comment or quote." (vhdl-hooked-abbrev 'vhdl-template-configuration)) (defun vhdl-template-constant-hook () (vhdl-hooked-abbrev 'vhdl-template-constant)) +(defun vhdl-template-context-hook () + (vhdl-hooked-abbrev 'vhdl-template-context)) (defun vhdl-template-disconnect-hook () (vhdl-hooked-abbrev 'vhdl-template-disconnect)) (defun vhdl-template-display-comment-hook () @@ -13190,7 +13345,8 @@ This does highlighting of keywords and standard identifiers.") (list (concat "^\\s-*\\(" - "architecture\\|configuration\\|entity\\|package\\(\\s-+body\\)?\\|" + "architecture\\|configuration\\|context\\|entity\\|package" + "\\(\\s-+body\\)?\\|" "\\(\\(impure\\|pure\\)\\s-+\\)?function\\|procedure\\|component" "\\)\\s-+\\(\\w+\\)") 5 'font-lock-function-name-face) @@ -13232,9 +13388,9 @@ This does highlighting of keywords and standard identifiers.") (list (concat "^\\s-*end\\s-+\\(\\(" - "architecture\\|block\\|case\\|component\\|configuration\\|entity\\|" - "for\\|function\\|generate\\|if\\|loop\\|package\\(\\s-+body\\)?\\|" - "procedure\\|\\(postponed\\s-+\\)?process\\|" + "architecture\\|block\\|case\\|component\\|configuration\\|context\\|" + "entity\\|for\\|function\\|generate\\|if\\|loop\\|package" + "\\(\\s-+body\\)?\\|procedure\\|\\(postponed\\s-+\\)?process\\|" (when (vhdl-standard-p 'ams) "procedural\\|") "units" "\\)\\s-+\\)?\\(\\w*\\)") @@ -13266,10 +13422,10 @@ This does highlighting of keywords and standard identifiers.") ;; highlight names in use clauses (list (concat - "\\" nil 1) + (while (and (re-search-forward "^[ \t]*\\(architecture\\|configuration\\|context\\|entity\\|package\\)\\>" nil 1) (save-excursion (goto-char (match-beginning 0)) (vhdl-backward-syntactic-ws) @@ -13682,7 +13844,7 @@ hierarchy otherwise.") "Scan the context clause that precedes a design unit." (let (lib-alist) (save-excursion - (when (re-search-backward "^[ \t]*\\(architecture\\|configuration\\|entity\\|package\\)\\>" nil t) + (when (re-search-backward "^[ \t]*\\(architecture\\|configuration\\|context\\|entity\\|package\\)\\>" nil t) (while (and (re-search-backward "^[ \t]*\\(end\\|use\\)\\>" nil t) (equal "USE" (upcase (match-string 1)))) (when (looking-at "^[ \t]*use[ \t\n\r\f]*\\(\\w+\\)\\.\\(\\w+\\)\\.\\w+") @@ -17502,6 +17664,7 @@ specified by a target." 'vhdl-argument-list-indent 'vhdl-association-list-with-formals 'vhdl-conditions-in-parenthesis + 'vhdl-sensitivity-list-all 'vhdl-zero-string 'vhdl-one-string 'vhdl-file-header @@ -17606,6 +17769,17 @@ specified by a target." (defconst vhdl-doc-release-notes nil "\ +Release Notes for VHDL Mode 3.37 +================================ + +- Added support for VHDL'08: + - New keywords, types, functions, attributes, operators, packages + - Context declaration + - Block comments + - Directives + - 'all' keyword in sensitivity list + + Release Notes for VHDL Mode 3.34 ================================ @@ -17667,6 +17841,13 @@ User Options Reserved words in VHDL ---------------------- +VHDL'08 (IEEE Std 1076-2008): + `vhdl-08-keywords' : keywords + `vhdl-08-types' : standardized types + `vhdl-08-attributes' : standardized attributes + `vhdl-08-functions' : standardized functions + `vhdl-08-packages' : standardized packages and libraries + VHDL'93/02 (IEEE Std 1076-1993/2002): `vhdl-02-keywords' : keywords `vhdl-02-types' : standardized types diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 55405b63fe..fe72b3f778 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -627,6 +627,29 @@ The argument has the same meaning as in `apropos'." ;;;###autoload (define-key ctl-x-4-map "." #'xref-find-definitions-other-window) ;;;###autoload (define-key ctl-x-5-map "." #'xref-find-definitions-other-frame) + +;;; Helper functions + +(defvar xref-etags-mode--saved nil) + +(define-minor-mode xref-etags-mode + "Minor mode to make xref use etags again. + +Certain major modes install their own mechanisms for listing +identifiers and navigation. Turn this on to undo those settings +and just use etags." + :lighter "" + (if xref-etags-mode + (progn + (setq xref-etags-mode--saved + (cons xref-find-function + xref-identifier-completion-table-function)) + (kill-local-variable 'xref-find-function) + (kill-local-variable 'xref-identifier-completion-table-function)) + (setq-local xref-find-function (car xref-etags-mode--saved)) + (setq-local xref-identifier-completion-table-function + (cdr xref-etags-mode--saved)))) + (provide 'xref) diff --git a/lisp/rect.el b/lisp/rect.el index c5a548647f..75585d2f08 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -586,8 +586,7 @@ Activates the region if needed. Only lasts until the region is deactivated." (add-hook 'deactivate-mark-hook (lambda () (rectangle-mark-mode -1))) (unless (region-active-p) - (push-mark) - (activate-mark) + (push-mark (point) t t) (message "Mark set (rectangle mode)")))) (defun rectangle-exchange-point-and-mark (&optional arg) diff --git a/lisp/register.el b/lisp/register.el index a60181e43c..7afbc06c7f 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -252,19 +252,22 @@ Interactively, reads the register using `register-read-with-preview'." (goto-char (cadr val))) ((markerp val) (or (marker-buffer val) - (error "That register's buffer no longer exists")) + (user-error "That register's buffer no longer exists")) (switch-to-buffer (marker-buffer val)) + (unless (or (= (point) (marker-position val)) + (eq last-command 'jump-to-register)) + (push-mark)) (goto-char val)) ((and (consp val) (eq (car val) 'file)) (find-file (cdr val))) ((and (consp val) (eq (car val) 'file-query)) (or (find-buffer-visiting (nth 1 val)) (y-or-n-p (format "Visit file %s again? " (nth 1 val))) - (error "Register access aborted")) + (user-error "Register access aborted")) (find-file (nth 1 val)) (goto-char (nth 2 val))) (t - (error "Register doesn't contain a buffer position or configuration"))))) + (user-error "Register doesn't contain a buffer position or configuration"))))) (defun register-swap-out () "Turn markers into file-query references when a buffer is killed." @@ -316,7 +319,7 @@ Interactively, reads the register using `register-read-with-preview'." (set-register register (+ number register-val)))) ((or (not register-val) (stringp register-val)) (append-to-register register (region-beginning) (region-end) prefix)) - (t (error "Register does not contain a number or text"))))) + (t (user-error "Register does not contain a number or text"))))) (defun view-register (register) "Display what is contained in register named REGISTER. @@ -449,7 +452,7 @@ Interactively, reads the register using `register-read-with-preview'." ((and (markerp val) (marker-position val)) (princ (marker-position val) (current-buffer))) (t - (error "Register does not contain text")))) + (user-error "Register does not contain text")))) (if (not arg) (exchange-point-and-mark))) (defun copy-to-register (register start end &optional delete-flag region) @@ -492,7 +495,7 @@ Interactively, reads the register using `register-read-with-preview'." (set-register register (cond ((not reg) text) ((stringp reg) (concat reg separator text)) - (t (error "Register does not contain text"))))) + (t (user-error "Register does not contain text"))))) (setq deactivate-mark t) (cond (delete-flag (delete-region start end)) @@ -516,7 +519,7 @@ Interactively, reads the register using `register-read-with-preview'." (set-register register (cond ((not reg) text) ((stringp reg) (concat text separator reg)) - (t (error "Register does not contain text"))))) + (t (user-error "Register does not contain text"))))) (setq deactivate-mark t) (cond (delete-flag (delete-region start end)) diff --git a/lisp/replace.el b/lisp/replace.el index e0636e0728..70b86dd201 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1369,7 +1369,7 @@ See also `multi-occur-in-matching-buffers'." (ido-ignore-item-temp-list bufs)) (while (not (string-equal (setq buf (read-buffer - (if (eq read-buffer-function 'ido-read-buffer) + (if (eq read-buffer-function #'ido-read-buffer) "Next buffer to search (C-j to end): " "Next buffer to search (RET to end): ") nil t)) diff --git a/lisp/server.el b/lisp/server.el index 166cd44bb2..9585b1755c 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1139,9 +1139,12 @@ The following commands are accepted by the client: ;; frame. If running a GUI server, force the frame ;; type to GUI. (Cygwin is perfectly happy with ;; multi-tty support, so don't override the user's - ;; choice there.) + ;; choice there.) In daemon mode on Windows, we can't + ;; make tty frames, so force the frame type to GUI + ;; there too. (when (and (eq system-type 'windows-nt) - (eq window-system 'w32)) + (or (daemonp) + (eq window-system 'w32))) (push "-window-system" args-left))) ;; -position LINE[:COLUMN]: Set point to the given @@ -1215,7 +1218,10 @@ The following commands are accepted by the client: terminal-frame))))) (setq tty-name nil tty-type nil) (if display (server-select-display display))) - ((eq tty-name 'window-system) + ((or (and (eq system-type 'windows-nt) + (daemonp) + (setq display "w32")) + (eq tty-name 'window-system)) (server-create-window-system-frame display nowait proc parent-id frame-parameters)) diff --git a/lisp/simple.el b/lisp/simple.el index 967fbc69cb..5185607043 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1940,7 +1940,9 @@ The argument NABS specifies the absolute history position." (user-error (if minibuffer-default "End of defaults; no next item" "End of history; no default available"))) - (if (> nabs (length (symbol-value minibuffer-history-variable))) + (if (> nabs (if (listp (symbol-value minibuffer-history-variable)) + (length (symbol-value minibuffer-history-variable)) + 0)) (user-error "Beginning of history; no preceding item")) (unless (memq last-command '(next-history-element previous-history-element)) @@ -1990,7 +1992,14 @@ When point moves over the bottom line of multi-line minibuffer, puts ARGth next element of the minibuffer history in the minibuffer." (interactive "^p") (or arg (setq arg 1)) - (let ((old-point (point))) + (let* ((old-point (point)) + ;; Remember the original goal column of possibly multi-line input + ;; excluding the length of the prompt on the first line. + (prompt-end (minibuffer-prompt-end)) + (old-column (unless (and (eolp) (> (point) prompt-end)) + (if (= (line-number-at-pos) 1) + (max (- (current-column) (1- prompt-end)) 0) + (current-column))))) (condition-case nil (with-no-warnings (next-line arg)) @@ -1998,7 +2007,14 @@ next element of the minibuffer history in the minibuffer." ;; Restore old position since `line-move-visual' moves point to ;; the end of the line when it fails to go to the next line. (goto-char old-point) - (next-history-element arg))))) + (next-history-element arg) + ;; Restore the original goal column on the last line + ;; of possibly multi-line input. + (goto-char (point-max)) + (when old-column + (if (= (line-number-at-pos) 1) + (move-to-column (+ old-column (1- (minibuffer-prompt-end)))) + (move-to-column old-column))))))) (defun previous-line-or-history-element (&optional arg) "Move cursor vertically up ARG lines, or to the previous history element. @@ -2006,7 +2022,14 @@ When point moves over the top line of multi-line minibuffer, puts ARGth previous element of the minibuffer history in the minibuffer." (interactive "^p") (or arg (setq arg 1)) - (let ((old-point (point))) + (let* ((old-point (point)) + ;; Remember the original goal column of possibly multi-line input + ;; excluding the length of the prompt on the first line. + (prompt-end (minibuffer-prompt-end)) + (old-column (unless (and (eolp) (> (point) prompt-end)) + (if (= (line-number-at-pos) 1) + (max (- (current-column) (1- prompt-end)) 0) + (current-column))))) (condition-case nil (with-no-warnings (previous-line arg)) @@ -2014,7 +2037,15 @@ previous element of the minibuffer history in the minibuffer." ;; Restore old position since `line-move-visual' moves point to ;; the beginning of the line when it fails to go to the previous line. (goto-char old-point) - (previous-history-element arg))))) + (previous-history-element arg) + ;; Restore the original goal column on the first line + ;; of possibly multi-line input. + (goto-char (minibuffer-prompt-end)) + (if old-column + (if (= (line-number-at-pos) 1) + (move-to-column (+ old-column (1- (minibuffer-prompt-end)))) + (move-to-column old-column)) + (goto-char (line-end-position))))))) (defun next-complete-history-element (n) "Get next history element which completes the minibuffer before the point. @@ -4326,7 +4357,7 @@ When this command inserts killed text into the buffer, it honors doc string for `insert-for-yank-1', which see." (interactive "*p") (if (not (eq last-command 'yank)) - (error "Previous command was not a yank")) + (user-error "Previous command was not a yank")) (setq this-command 'yank) (unless arg (setq arg 1)) (let ((inhibit-read-only t) @@ -4776,7 +4807,8 @@ run `deactivate-mark-hook'." ;; the region prior to the last command modifying the buffer. ;; Set the selection to that, or to the current region. (cond (saved-region-selection - (gui-set-selection 'PRIMARY saved-region-selection) + (if (gui-call gui-selection-owner-p 'PRIMARY) + (gui-set-selection 'PRIMARY saved-region-selection)) (setq saved-region-selection nil)) ;; If another program has acquired the selection, region ;; deactivation should not clobber it (Bug#11772). @@ -4865,7 +4897,7 @@ For some commands, it may be appropriate to ignore the value of (or use-empty-active-region (> (region-end) (region-beginning))))) (defun region-active-p () - "Return t if Transient Mark mode is enabled and the mark is active. + "Return non-nil if Transient Mark mode is enabled and the mark is active. Some commands act specially on the region when Transient Mark mode is enabled. Usually, such commands should use @@ -4958,7 +4990,7 @@ Start discarding off end if gets this big." \(Does not affect global mark ring)." (interactive) (if (null (mark t)) - (error "No mark set in this buffer") + (user-error "No mark set in this buffer") (if (= (point) (mark t)) (message "Mark popped")) (goto-char (mark t)) @@ -5107,7 +5139,7 @@ mode temporarily." (let ((omark (mark t)) (temp-highlight (eq (car-safe transient-mark-mode) 'only))) (if (null omark) - (error "No mark set in this buffer")) + (user-error "No mark set in this buffer")) (set-mark (point)) (goto-char omark) (cond (temp-highlight @@ -5168,10 +5200,11 @@ positive, and disable it otherwise. If called from Lisp, enable Transient Mark mode if ARG is omitted or nil. Transient Mark mode is a global minor mode. When enabled, the -region is highlighted whenever the mark is active. The mark is -\"deactivated\" by changing the buffer, and after certain other -operations that set the mark but whose main purpose is something -else--for example, incremental search, \\[beginning-of-buffer], and \\[end-of-buffer]. +region is highlighted with the `region' face whenever the mark +is active. The mark is \"deactivated\" by changing the buffer, +and after certain other operations that set the mark but whose +main purpose is something else--for example, incremental search, +\\[beginning-of-buffer], and \\[end-of-buffer]. You can also deactivate the mark by typing \\[keyboard-quit] or \\[keyboard-escape-quit]. @@ -5377,7 +5410,10 @@ lines." (declare-function font-info "font.c" (name &optional frame)) (defun default-font-height () - "Return the height in pixels of the current buffer's default face font." + "Return the height in pixels of the current buffer's default face font. + +If the default font is remapped (see `face-remapping-alist'), the +function returns the height of the remapped face." (let ((default-font (face-font 'default))) (cond ((and (display-multi-font-p) @@ -5388,6 +5424,25 @@ lines." (aref (font-info default-font) 3)) (t (frame-char-height))))) +(defun default-font-width () + "Return the width in pixels of the current buffer's default face font. + +If the default font is remapped (see `face-remapping-alist'), the +function returns the width of the remapped face." + (let ((default-font (face-font 'default))) + (cond + ((and (display-multi-font-p) + ;; Avoid calling font-info if the frame's default font was + ;; not changed since the frame was created. That's because + ;; font-info is expensive for some fonts, see bug #14838. + (not (string= (frame-parameter nil 'font) default-font))) + (let* ((info (font-info (face-font 'default))) + (width (aref info 11))) + (if (> width 0) + width + (aref info 10)))) + (t (frame-char-width))))) + (defun default-line-height () "Return the pixel height of current buffer's default-face text line. diff --git a/lisp/startup.el b/lisp/startup.el index 999e53e56d..7fa929a659 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -875,7 +875,8 @@ please check its value") ;; processed. This is consistent with the way main in emacs.c ;; does things. (while (and (not done) args) - (let* ((longopts '(("--no-init-file") ("--no-site-file") ("--debug-init") + (let* ((longopts '(("--no-init-file") ("--no-site-file") + ("--no-x-resources") ("--debug-init") ("--user") ("--iconic") ("--icon-type") ("--quick") ("--no-blinking-cursor") ("--basic-display"))) (argi (pop args)) @@ -906,7 +907,9 @@ please check its value") ((member argi '("-Q" "-quick")) (setq init-file-user nil site-run-file nil - inhibit-x-resources t)) + inhibit-x-resources t)) + ((member argi '("-no-x-resources")) + (setq inhibit-x-resources t)) ((member argi '("-D" "-basic-display")) (setq no-blinking-cursor t emacs-basic-display t) diff --git a/lisp/subr.el b/lisp/subr.el index 68cd230c5e..163a1c419d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -136,8 +136,8 @@ ARGS is a list of the first N arguments to pass to FUN. The result is a new function which does the same as FUN, except that the first N arguments are fixed at the values with which this function was called." - `(closure (t) (&rest args) - (apply ',fun ,@(mapcar (lambda (arg) `',arg) args) args))) + (lambda (&rest args2) + (apply fun (append args args2)))) (defmacro push (newelt place) "Add NEWELT to the list stored in the generalized variable PLACE. @@ -316,7 +316,7 @@ Defaults to `error'." (unless parent (setq parent 'error)) (let ((conditions (if (consp parent) - (apply #'nconc + (apply #'append (mapcar (lambda (parent) (cons parent (or (get parent 'error-conditions) @@ -1274,6 +1274,7 @@ is converted into a string by expressing it in decimal." (set-advertised-calling-convention 'all-completions '(string collection &optional predicate) "23.1") (set-advertised-calling-convention 'unintern '(name obarray) "23.3") +(set-advertised-calling-convention 'indirect-function '(object) "25.1") (set-advertised-calling-convention 'redirect-frame-focus '(frame focus-frame) "24.3") (set-advertised-calling-convention 'decode-char '(ch charset) "21.4") (set-advertised-calling-convention 'encode-char '(ch charset) "21.4") @@ -1900,6 +1901,30 @@ and the file name is displayed in the echo area." ;;;; Process stuff. +(defun start-process (name buffer program &rest program-args) + "Start a program in a subprocess. Return the process object for it. +NAME is name for process. It is modified if necessary to make it unique. +BUFFER is the buffer (or buffer name) to associate with the process. + +Process output (both standard output and standard error streams) goes +at end of BUFFER, unless you specify an output stream or filter +function to handle the output. BUFFER may also be nil, meaning that +this process is not associated with any buffer. + +PROGRAM is the program file name. It is searched for in `exec-path' +\(which see). If nil, just associate a pty with the buffer. Remaining +arguments are strings to give program as arguments. + +If you want to separate standard output from standard error, invoke +the command through a shell and redirect one of them using the shell +syntax." + (unless (fboundp 'make-process) + (error "Emacs was compiled without subprocess support")) + (apply #'make-process + (append (list :name name :buffer buffer) + (if program + (list :command (cons program program-args)))))) + (defun process-lines (program &rest args) "Execute PROGRAM with ARGS, returning its output as a list of lines. Signal an error if the program returns with a non-zero exit status." diff --git a/lisp/term.el b/lisp/term.el index a629af90d3..43138fa6dd 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1145,7 +1145,7 @@ Entry to this mode runs the hooks on `term-mode-hook'." (make-local-variable 'term-scroll-show-maximum-output) (make-local-variable 'term-ptyp) (make-local-variable 'term-exec-hook) - (make-local-variable 'term-vertical-motion) + (set (make-local-variable 'term-vertical-motion) 'vertical-motion) (set (make-local-variable 'term-pending-delete-marker) (make-marker)) (make-local-variable 'term-current-face) (term-ansi-reset) @@ -1155,6 +1155,13 @@ Entry to this mode runs the hooks on `term-mode-hook'." (set (make-local-variable 'font-lock-defaults) '(nil t)) + (add-function :filter-return + (local 'window-adjust-process-window-size-function) + (lambda (size) + (when size + (term-reset-size (cdr size) (car size))) + size)) + (easy-menu-add term-terminal-menu) (easy-menu-add term-signals-menu) (or term-input-ring @@ -1197,12 +1204,6 @@ Entry to this mode runs the hooks on `term-mode-hook'." (goto-char save-point))) found)) -(defun term-check-size (process) - (when (or (/= term-height (window-text-height)) - (/= term-width (term-window-width))) - (term-reset-size (window-text-height) (term-window-width)) - (set-process-window-size process term-height term-width))) - (defun term-send-raw-string (chars) (deactivate-mark) (let ((proc (get-buffer-process (current-buffer)))) @@ -2772,15 +2773,11 @@ See `term-prompt-regexp'." (when (/= (point) (process-mark proc)) (setq save-point (point-marker))) - ;; Note if the window size has changed. We used to reset - ;; point too, but that gives incorrect results (Bug#4635). - (if (eq (window-buffer) (current-buffer)) - (progn - (setq term-vertical-motion (symbol-function 'vertical-motion)) - (term-check-size proc)) - (setq term-vertical-motion - (symbol-function 'term-buffer-vertical-motion))) - (setq save-marker (copy-marker (process-mark proc))) + (setf term-vertical-motion + (if (eq (window-buffer) (current-buffer)) + 'vertical-motion + 'term-buffer-vertical-motion)) + (setq save-marker (copy-marker (process-mark proc))) (goto-char (process-mark proc)) (save-restriction @@ -3082,9 +3079,7 @@ See `term-prompt-regexp'." (eq (window-buffer selected) (current-buffer))) (term-display-line (car term-pending-frame) (cdr term-pending-frame)) - (setq term-pending-frame nil) - ;; We have created a new window, so check the window size. - (term-check-size proc)) + (setq term-pending-frame nil)) ;; Scroll each window displaying the buffer but (by default) ;; only if the point matches the process-mark we started with. diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 85d9410868..930c39c82c 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -3372,7 +3372,7 @@ The POINT-LIST is expected to cover the first quadrant." ;; Create the other half by mirroring the first half. (setq both-halves (append first-half - (mapc + (mapcar (lambda (i) (artist-new-fill-item (artist-fill-item-get-x i) (- (artist-fill-item-get-y i)) diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index c171bd50f6..72800808e6 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -1,8 +1,9 @@ -;;; css-mode.el --- Major mode to edit CSS files -*- lexical-binding: t -*- +;;; css-mode.el --- Major mode to edit CSS files -*- lexical-binding: t -*- ;; Copyright (C) 2006-2015 Free Software Foundation, Inc. ;; Author: Stefan Monnier +;; Maintainer: Simen Heggestøyl ;; Keywords: hypermedia ;; This file is part of GNU Emacs. @@ -28,7 +29,7 @@ ;; - electric ; and } ;; - filling code with auto-fill-mode -;; - completion +;; - attribute value completion ;; - fix font-lock errors with multi-line selectors ;;; Code: @@ -37,96 +38,20 @@ "Cascading Style Sheets (CSS) editing mode." :group 'languages) +(defconst css-pseudo-class-ids + '("active" "checked" "disabled" "empty" "enabled" "first" + "first-child" "first-of-type" "focus" "hover" "indeterminate" "lang" + "last-child" "last-of-type" "left" "link" "nth-child" + "nth-last-child" "nth-last-of-type" "nth-of-type" "only-child" + "only-of-type" "right" "root" "target" "visited") + "Identifiers for pseudo-classes.") -(defun css-extract-keyword-list (res) - (with-temp-buffer - (url-insert-file-contents "http://www.w3.org/TR/REC-CSS2/css2.txt") - (goto-char (point-max)) - (search-backward "Appendix H. Index") - (forward-line) - (delete-region (point-min) (point)) - (let ((result nil) - keys) - (dolist (re res) - (goto-char (point-min)) - (setq keys nil) - (while (re-search-forward (cdr re) nil t) - (push (match-string 1) keys)) - (push (cons (car re) (sort keys 'string-lessp)) result)) - (nreverse result)))) - -(defun css-extract-parse-val-grammar (string env) - (let ((start 0) - (elems ()) - name) - (while (string-match - (concat "\\(?:" - (concat "]+>]+>\\(?:" - "<\\([^&]+\\)>\\|'\\([^']+\\)'" - "\\)") - "\\|" "\\(\\[\\)" - "\\|" "\\(]\\)" - "\\|" "\\(||\\)" - "\\|" "\\(|\\)" - "\\|" "\\([*+?]\\)" - "\\|" "\\({[^}]+}\\)" - "\\|" "\\(\\w+\\(?:-\\w+\\)*\\)" - "\\)[ \t\n]*") - string start) - ;; (assert (eq start (match-beginning 0))) - (setq start (match-end 0)) - (cond - ;; Reference to a type of value. - ((setq name (match-string-no-properties 1 string)) - (push (intern name) elems)) - ;; Reference to another property's values. - ((setq name (match-string-no-properties 2 string)) - (setq elems (delete-dups (append (cdr (assoc name env)) elems)))) - ;; A literal - ((setq name (match-string-no-properties 9 string)) - (push name elems)) - ;; We just ignore the rest. I.e. we ignore the structure because - ;; it's too difficult to exploit anyway (it would allow us to only - ;; complete top/center/bottom after one of left/center/right and - ;; vice-versa). - (t nil))) - elems)) - - -(defun css-extract-props-and-vals () - (with-temp-buffer - (url-insert-file-contents "http://www.w3.org/TR/CSS21/propidx.html") - (goto-char (point-min)) - (let ((props ())) - (while (re-search-forward "#propdef-\\([^\"]+\\)\">'\\1'" nil t) - (let ((prop (match-string-no-properties 1))) - (save-excursion - (goto-char (match-end 0)) - (search-forward "") - (let ((vals-string (buffer-substring (point) - (progn - (re-search-forward "[ \t\n]+|[ \t\n]+inherit") - (match-beginning 0))))) - ;; - (push (cons prop (css-extract-parse-val-grammar vals-string props)) - props))))) - props))) - -;; Extraction was done with: -;; (css-extract-keyword-list -;; '((pseudo . "^ +\\* :\\([^ \n,]+\\)") -;; (at . "^ +\\* @\\([^ \n,]+\\)") -;; (descriptor . "^ +\\* '\\([^ '\n]+\\)' (descriptor)") -;; (media . "^ +\\* '\\([^ '\n]+\\)' media group") -;; (property . "^ +\\* '\\([^ '\n]+\\)',"))) - -(defconst css-pseudo-ids - '("active" "after" "before" "first" "first-child" "first-letter" "first-line" - "focus" "hover" "lang" "left" "link" "right" "visited") - "Identifiers for pseudo-elements and pseudo-classes.") +(defconst css-pseudo-element-ids + '("after" "before" "first-letter" "first-line") + "Identifiers for pseudo-elements.") (defconst css-at-ids - '("charset" "font-face" "import" "media" "page") + '("charset" "font-face" "import" "media" "namespace" "page") "Identifiers that appear in the form @foo.") (defconst css-descriptor-ids @@ -142,36 +67,103 @@ "Identifiers for types of media.") (defconst css-property-ids - '("azimuth" "background" "background-attachment" "background-color" - "background-image" "background-position" "background-repeat" "block" - "border" "border-bottom" "border-bottom-color" "border-bottom-style" - "border-bottom-width" "border-collapse" "border-color" "border-left" - "border-left-color" "border-left-style" "border-left-width" "border-right" + '(;; CSS 2.1 properties (http://www.w3.org/TR/CSS21/propidx.html). + ;; + ;; Properties duplicated by any of the CSS3 modules below have + ;; been removed. + "azimuth" "border-collapse" "border-spacing" "bottom" + "caption-side" "clear" "clip" "content" "counter-increment" + "counter-reset" "cue" "cue-after" "cue-before" "direction" "display" + "elevation" "empty-cells" "float" "height" "left" "line-height" + "list-style" "list-style-image" "list-style-position" + "list-style-type" "margin" "margin-bottom" "margin-left" + "margin-right" "margin-top" "max-height" "max-width" "min-height" + "min-width" "orphans" "overflow" "padding" "padding-bottom" + "padding-left" "padding-right" "padding-top" "page-break-after" + "page-break-before" "page-break-inside" "pause" "pause-after" + "pause-before" "pitch" "pitch-range" "play-during" "position" + "quotes" "richness" "right" "speak" "speak-header" "speak-numeral" + "speak-punctuation" "speech-rate" "stress" "table-layout" "top" + "unicode-bidi" "vertical-align" "visibility" "voice-family" "volume" + "widows" "width" "z-index" + + ;; CSS Animations + ;; (http://www.w3.org/TR/css3-animations/#property-index) + "animation" "animation-delay" "animation-direction" + "animation-duration" "animation-fill-mode" + "animation-iteration-count" "animation-name" + "animation-play-state" "animation-timing-function" + + ;; CSS Backgrounds and Borders Module Level 3 + ;; (http://www.w3.org/TR/css3-background/#property-index) + "background" "background-attachment" "background-clip" + "background-color" "background-image" "background-origin" + "background-position" "background-repeat" "background-size" + "border" "border-bottom" "border-bottom-color" + "border-bottom-left-radius" "border-bottom-right-radius" + "border-bottom-style" "border-bottom-width" "border-color" + "border-image" "border-image-outset" "border-image-repeat" + "border-image-slice" "border-image-source" "border-image-width" + "border-left" "border-left-color" "border-left-style" + "border-left-width" "border-radius" "border-right" "border-right-color" "border-right-style" "border-right-width" - "border-spacing" "border-style" "border-top" "border-top-color" - "border-top-style" "border-top-width" "border-width" "bottom" - "caption-side" "clear" "clip" "color" "compact" "content" - "counter-increment" "counter-reset" "cue" "cue-after" "cue-before" - "cursor" "dashed" "direction" "display" "dotted" "double" "elevation" - "empty-cells" "float" "font" "font-family" "font-size" "font-size-adjust" - "font-stretch" "font-style" "font-variant" "font-weight" "groove" "height" - "hidden" "inline" "inline-table" "inset" "left" "letter-spacing" - "line-height" "list-item" "list-style" "list-style-image" - "list-style-position" "list-style-type" "margin" "margin-bottom" - "margin-left" "margin-right" "margin-top" "marker-offset" "marks" - "max-height" "max-width" "min-height" "min-width" "orphans" "outline" - "outline-color" "outline-style" "outline-width" "outset" "overflow" - "padding" "padding-bottom" "padding-left" "padding-right" "padding-top" - "page" "page-break-after" "page-break-before" "page-break-inside" "pause" - "pause-after" "pause-before" "pitch" "pitch-range" "play-during" "position" - "quotes" "richness" "ridge" "right" "run-in" "size" "solid" "speak" - "speak-header" "speak-numeral" "speak-punctuation" "speech-rate" "stress" - "table" "table-caption" "table-cell" "table-column" "table-column-group" - "table-footer-group" "table-header-group" "table-layout" "table-row" - "table-row-group" "text-align" "text-decoration" "text-indent" - "text-shadow" "text-transform" "top" "unicode-bidi" "vertical-align" - "visibility" "voice-family" "volume" "white-space" "widows" "width" - "word-spacing" "z-index") + "border-style" "border-top" "border-top-color" + "border-top-left-radius" "border-top-right-radius" + "border-top-style" "border-top-width" "border-width" "box-shadow" + + ;; CSS Basic User Interface Module Level 3 (CSS3 UI) + ;; (http://www.w3.org/TR/css3-ui/#property-index) + "box-sizing" "caret-color" "cursor" "nav-down" "nav-left" + "nav-right" "nav-up" "outline" "outline-color" "outline-offset" + "outline-style" "outline-width" "resize" "text-overflow" + + ;; CSS Color Module Level 3 + ;; (http://www.w3.org/TR/css3-color/#property) + "color" "opacity" + + ;; CSS Flexible Box Layout Module Level 1 + ;; (http://www.w3.org/TR/css-flexbox-1/#property-index) + "align-content" "align-items" "align-self" "flex" "flex-basis" + "flex-direction" "flex-flow" "flex-grow" "flex-shrink" "flex-wrap" + "justify-content" "order" + + ;; CSS Fonts Module Level 3 + ;; (http://www.w3.org/TR/css3-fonts/#property-index) + "font" "font-family" "font-feature-settings" "font-kerning" + "font-language-override" "font-size" "font-size-adjust" + "font-stretch" "font-style" "font-synthesis" "font-variant" + "font-variant-alternates" "font-variant-caps" + "font-variant-east-asian" "font-variant-ligatures" + "font-variant-numeric" "font-variant-position" "font-weight" + + ;; CSS Text Decoration Module Level 3 + ;; (http://dev.w3.org/csswg/css-text-decor-3/#property-index) + "text-decoration" "text-decoration-color" "text-decoration-line" + "text-decoration-skip" "text-decoration-style" "text-emphasis" + "text-emphasis-color" "text-emphasis-position" "text-emphasis-style" + "text-shadow" "text-underline-position" + + ;; CSS Text Module Level 3 + ;; (http://www.w3.org/TR/css3-text/#property-index) + "hanging-punctuation" "hyphens" "letter-spacing" "line-break" + "overflow-wrap" "tab-size" "text-align" "text-align-last" + "text-indent" "text-justify" "text-transform" "white-space" + "word-break" "word-spacing" "word-wrap" + + ;; CSS Transforms Module Level 1 + ;; (http://www.w3.org/TR/css3-2d-transforms/#property-index) + "backface-visibility" "perspective" "perspective-origin" + "transform" "transform-origin" "transform-style" + + ;; CSS Transitions + ;; (http://www.w3.org/TR/css3-transitions/#property-index) + "transition" "transition-delay" "transition-duration" + "transition-property" "transition-timing-function" + + ;; Filter Effects Module Level 1 + ;; (http://www.w3.org/TR/filter-effects/#property-index) + "color-interpolation-filters" "filter" "flood-color" + "flood-opacity" "lighting-color") "Identifiers for properties.") (defcustom css-electric-keys '(?\} ?\;) ;; '() @@ -258,7 +250,11 @@ (concat "\\(?:" scss--hash-re "\\|[^@/:{} \t\n#]\\)" "[^:{}#]*\\(?:" scss--hash-re "[^:{}#]*\\)*")) - "\\(?::" (regexp-opt css-pseudo-ids t) + ;; Even though pseudo-elements should be prefixed by ::, a + ;; single colon is accepted for backward compatibility. + "\\(?:\\(:" (regexp-opt (append css-pseudo-class-ids + css-pseudo-element-ids) t) + "\\|\\::" (regexp-opt css-pseudo-element-ids t) "\\)" "\\(?:([^\)]+)\\)?" (if (not sassy) "[^:{}\n]*" @@ -331,25 +327,65 @@ (`(:elem . basic) css-indent-offset) (`(:elem . arg) 0) (`(:list-intro . ,(or `";" `"")) t) ;"" stands for BOB (bug#15467). - (`(:before . "{") (if (smie-rule-hanging-p) - (smie-rule-parent 0))))) + (`(:before . ,(or "{" "(")) + (if (smie-rule-hanging-p) (smie-rule-parent 0))))) + +;;; Completion + +(defun css--complete-property () + "Complete property at point." + (save-excursion + (let ((pos (point))) + (skip-chars-backward "-[:alnum:]") + (let ((start (point))) + (skip-chars-backward " \t\r\n") + (when (memq (char-before) '(?\{ ?\;)) + (list start pos css-property-ids)))))) + +(defun css--complete-pseudo-element-or-class () + "Complete pseudo-element or pseudo-class at point." + (save-excursion + (let ((pos (point))) + (skip-chars-backward "-[:alnum:]") + (when (eq (char-before) ?\:) + (list (point) pos + (if (eq (char-before (- (point) 1)) ?\:) + css-pseudo-element-ids + css-pseudo-class-ids)))))) + +(defun css--complete-at-rule () + "Complete at-rule (statement beginning with `@') at point." + (save-excursion + (let ((pos (point))) + (skip-chars-backward "-[:alnum:]") + (when (eq (char-before) ?\@) + (list (point) pos css-at-ids))))) + +(defun css-completion-at-point () + "Complete current symbol at point. +Currently supports completion of CSS properties, pseudo-elements, +pseudo-classes, and at-rules." + (or (css--complete-property) + (css--complete-pseudo-element-or-class) + (css--complete-at-rule))) ;;;###autoload -(define-derived-mode css-mode fundamental-mode "CSS" +(define-derived-mode css-mode prog-mode "CSS" "Major mode to edit Cascading Style Sheets." (setq-local font-lock-defaults css-font-lock-defaults) (setq-local comment-start "/*") (setq-local comment-start-skip "/\\*+[ \t]*") (setq-local comment-end "*/") (setq-local comment-end-skip "[ \t]*\\*+/") - (setq-local parse-sexp-ignore-comments t) (setq-local fill-paragraph-function 'css-fill-paragraph) (setq-local add-log-current-defun-function #'css-current-defun-name) (smie-setup css-smie-grammar #'css-smie-rules :forward-token #'css-smie--forward-token :backward-token #'css-smie--backward-token) (setq-local electric-indent-chars - (append css-electric-keys electric-indent-chars))) + (append css-electric-keys electric-indent-chars)) + (add-hook 'completion-at-point-functions + #'css-completion-at-point nil 'local)) (defvar comment-continue) @@ -401,11 +437,16 @@ (cond ;; This is a false positive inside a string or comment. ((nth 8 (syntax-ppss)) nil) + ;; This is a false positive when encountering an + ;; interpolated variable (bug#19751). + ((eq (char-before (- (point) 1)) ?#) nil) ((eq (char-before) ?\}) (save-excursion (forward-char -1) (skip-chars-backward " \t") - (unless (bolp) (newline)))) + (when (and (not (bolp)) + (scss-smie--not-interpolation-p)) + (newline)))) (t (while (progn @@ -450,7 +491,7 @@ (defun scss-smie--not-interpolation-p () (save-excursion (forward-char -1) - (or (zerop (skip-chars-backward "[:alnum:]")) + (or (zerop (skip-chars-backward "-[:alnum:]")) (not (looking-back "#{\\$" (- (point) 3)))))) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.scss\\'" . scss-mode)) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 66243b4210..8aadf51871 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1,4 +1,4 @@ -;;; flyspell.el --- on-the-fly spell checker +;;; flyspell.el --- On-the-fly spell checker -*- lexical-binding:t -*- ;; Copyright (C) 1998, 2000-2015 Free Software Foundation, Inc. @@ -39,6 +39,7 @@ ;;; Code: (require 'ispell) +(eval-when-compile (require 'cl-lib)) ;;*---------------------------------------------------------------------*/ ;;* Group ... */ @@ -92,7 +93,7 @@ downcased before comparing with these exceptions." :version "21.1" :type 'boolean) -(defcustom flyspell-duplicate-distance -1 +(defcustom flyspell-duplicate-distance 400000 "The maximum distance for finding duplicates of unrecognized words. This applies to the feature that when a word is not found in the dictionary, if the same spelling occurs elsewhere in the buffer, @@ -101,7 +102,7 @@ This variable specifies how far to search to find such a duplicate. -1 means no limit (search the whole buffer). 0 means do not search for duplicate unrecognized spellings." :group 'flyspell - :version "21.1" + :version "24.5" ; -1 -> 400000 :type '(choice (const :tag "no limit" -1) number)) @@ -303,8 +304,8 @@ Returns t to continue checking, nil otherwise. Flyspell mode sets this variable to whatever is the `flyspell-mode-predicate' property of the major mode name.") (make-variable-buffer-local 'flyspell-generic-check-word-predicate) -(defvaralias 'flyspell-generic-check-word-p - 'flyspell-generic-check-word-predicate) +(define-obsolete-variable-alias 'flyspell-generic-check-word-p + 'flyspell-generic-check-word-predicate "25.1") ;;*--- mail mode -------------------------------------------------------*/ (put 'mail-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify) @@ -312,21 +313,22 @@ property of the major mode name.") (defvar message-signature-separator) (defun mail-mode-flyspell-verify () "Function used for `flyspell-generic-check-word-predicate' in Mail mode." - (let ((header-end (save-excursion - (goto-char (point-min)) - (re-search-forward - (concat "^" - (regexp-quote mail-header-separator) - "$") - nil t) - (point))) - (signature-begin - (if (not (boundp 'message-signature-separator)) - (point-max) - (save-excursion - (goto-char (point-max)) - (re-search-backward message-signature-separator nil t) - (point))))) + (let* ((header-end (save-excursion + (goto-char (point-min)) + (re-search-forward + (concat "^\\(?:" + (regexp-quote mail-header-separator) + "\\)?$") + nil t) + (point))) + (signature-begin + (if (not (boundp 'message-signature-separator)) + (point-max) + (save-excursion + (goto-char (point-max)) + (re-search-backward message-signature-separator + (max header-end (- (point) 4000)) t) + (point))))) (cond ((< (point) header-end) (and (save-excursion (beginning-of-line) (looking-at "^Subject:")) @@ -396,7 +398,7 @@ like \"Some." "Turn on `flyspell-mode' for comments and strings." (interactive) (setq flyspell-generic-check-word-predicate - 'flyspell-generic-progmode-verify) + #'flyspell-generic-progmode-verify) (flyspell-mode 1) (run-hooks 'flyspell-prog-mode-hook)) @@ -791,7 +793,7 @@ before the current command." ;;*---------------------------------------------------------------------*/ ;;* flyspell-after-change-function ... */ ;;*---------------------------------------------------------------------*/ -(defun flyspell-after-change-function (start stop len) +(defun flyspell-after-change-function (start stop _len) "Save the current buffer and point for Flyspell's post-command hook." (push (cons start stop) flyspell-changes)) @@ -1010,17 +1012,33 @@ Mostly we check word delimiters." ;;*---------------------------------------------------------------------*/ (defun flyspell-word-search-backward (word bound &optional ignore-case) (save-excursion - (let ((r '()) - (inhibit-point-motion-hooks t) - p) - (while (and (not r) (setq p (search-backward word bound t))) - (let ((lw (flyspell-get-word))) - (if (and (consp lw) - (if ignore-case - (string-equal (downcase (car lw)) (downcase word)) - (string-equal (car lw) word))) - (setq r p) - (goto-char p)))) + (let* ((r '()) + (inhibit-point-motion-hooks t) + (flyspell-not-casechars (flyspell-get-not-casechars)) + (bound (if (and bound + (> bound (point-min))) + (- bound 1))) + (word-re (concat + "\\(?:" flyspell-not-casechars "\\|\\`\\)" + (regexp-quote word) + flyspell-not-casechars)) + p) + (while + (and (not r) + (setq p + (and + (re-search-backward word-re bound t) + (if (bobp) + (point) + (forward-char) + (point))))) + (let ((lw (flyspell-get-word))) + (if (and (consp lw) + (if ignore-case + (string-equal (downcase (car lw)) (downcase word)) + (string-equal (car lw) word))) + (setq r p) + (goto-char p)))) r))) ;;*---------------------------------------------------------------------*/ @@ -1028,16 +1046,32 @@ Mostly we check word delimiters." ;;*---------------------------------------------------------------------*/ (defun flyspell-word-search-forward (word bound) (save-excursion - (let ((r '()) - (inhibit-point-motion-hooks t) - p) - (while (and (not r) (setq p (search-forward word bound t))) - (let ((lw (flyspell-get-word))) - (if (and (consp lw) (string-equal (car lw) word)) - (setq r p) - (goto-char (1+ p))))) + (let* ((r '()) + (inhibit-point-motion-hooks t) + (flyspell-not-casechars (flyspell-get-not-casechars)) + (bound (if (and bound + (< bound (point-max))) + (+ bound 1))) + (word-re (concat flyspell-not-casechars + (regexp-quote word) + "\\(?:" flyspell-not-casechars "\\|\\'\\)")) + p) + (while + (and (not r) + (setq p (and + (re-search-forward word-re bound t) + (if (eobp) + (point) + (backward-char) + (point))))) + (let ((lw (flyspell-get-word))) + (if (and (consp lw) (string-equal (car lw) word)) + (setq r p) + (goto-char (1+ p))))) r))) +(defvar flyspell-word) ;Backward compatibility; some predicates made use of it! + ;;*---------------------------------------------------------------------*/ ;;* flyspell-word ... */ ;;*---------------------------------------------------------------------*/ @@ -1420,9 +1454,9 @@ The buffer to mark them in is `flyspell-large-region-buffer'." ;; end of last validated match. (setq buffer-scan-pos (point)))) ;; Record if misspelling is not found and try new one - (add-to-list 'words-not-found - (concat " -> " word " - " - (int-to-string wordpos))) + (cl-pushnew (concat " -> " word " - " + (int-to-string wordpos)) + words-not-found :test #'equal) (setq keep nil))))))) ;; we are done (if flyspell-issue-message-flag (message "Spell Checking completed."))) @@ -1528,7 +1562,8 @@ The buffer to mark them in is `flyspell-large-region-buffer'." (let ((extended-char-mode (ispell-get-extended-character-mode))) (and extended-char-mode ; ~ extended character mode (string-match "[^~]+$" extended-char-mode) - (add-to-list 'args (concat "-T" (match-string 0 extended-char-mode))))) + (cl-pushnew (concat "-T" (match-string 0 extended-char-mode)) + args :test #'equal))) ;; Add ispell-extra-args (setq args (append args ispell-extra-args)) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 82a09a0f89..498def0b96 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -775,7 +775,7 @@ here just for backwards compatibility.") (make-obsolete-variable 'ispell-aspell-supports-utf8 'ispell-encoding8-command "23.1") -(defvar ispell-hunspell-dictionary-equivs-alist +(defvar ispell-dicts-name2locale-equivs-alist '(("american" "en_US") ("brasileiro" "pt_BR") ("british" "en_GB") @@ -807,7 +807,7 @@ here just for backwards compatibility.") ("slovenian" "sl_SI") ("svenska" "sv_SE") ("hebrew" "he_IL")) - "Alist with matching hunspell dict names for standard dict names in + "Alist with known matching locales for standard dict names in `ispell-dictionary-base-alist'.") (defvar ispell-emacs-alpha-regexp @@ -1056,27 +1056,35 @@ Assumes that value contains no whitespace." "For aspell dictionary DICT-NAME, return a list of parameters if an associated data file is found or nil otherwise. List format is that of `ispell-dictionary-base-alist' elements." + + ;; Make sure `ispell-aspell-dict-dir' is defined + (or ispell-aspell-dict-dir + (setq ispell-aspell-dict-dir + (ispell-get-aspell-config-value "dict-dir"))) + ;; Make sure `ispell-aspell-data-dir' is defined (or ispell-aspell-data-dir (setq ispell-aspell-data-dir (ispell-get-aspell-config-value "data-dir"))) - ;; Try finding associated datafile - (let* ((datafile1 - (concat ispell-aspell-data-dir "/" - ;; Strip out variant, country code, etc. - (and (string-match "^[[:alpha:]]+" dict-name) - (match-string 0 dict-name)) ".dat")) - (datafile2 - (concat ispell-aspell-data-dir "/" - ;; Strip out anything but xx_YY. - (and (string-match "^[[:alpha:]_]+" dict-name) - (match-string 0 dict-name)) ".dat")) - (data-file - (if (file-readable-p datafile1) - datafile1 - (if (file-readable-p datafile2) - datafile2))) - otherchars) + + ;; Try finding associated datafile. aspell will look for master .dat + ;; file in `dict-dir' and `data-dir'. Associated .dat files must be + ;; in the same directory as master file. + (let ((data-file + (catch 'datafile + (dolist ( tmp-path (list ispell-aspell-dict-dir + ispell-aspell-data-dir )) + ;; Try xx.dat first, strip out variant, country code, etc, + ;; then try xx_YY.dat (without stripping country code). + (dolist (tmp-regexp (list "^[[:alpha:]]+" + "^[[:alpha:]_]+")) + (let ((fullpath + (concat tmp-path "/" + (and (string-match tmp-regexp dict-name) + (match-string 0 dict-name)) ".dat"))) + (if (file-readable-p fullpath) + (throw 'datafile fullpath))))))) + otherchars) (if data-file (with-temp-buffer @@ -1128,6 +1136,13 @@ Return the new dictionary alist." (realdict (assoc realname alist))) (when (and realdict (not already-exists-p)) (push (cons aliasname (cdr realdict)) alist)))))) + ;; Add entries for standard dict-names with found locale-matching entry + (dolist (dict-map-entry ispell-dicts-name2locale-equivs-alist) + (let ((name (car dict-map-entry)) + (locale (cadr dict-map-entry))) + (unless (assoc name alist) ;; skip if already present + (if (assoc locale alist) + (push (cons name (cdr (assoc locale alist))) alist))))) alist)) ;; Make ispell.el work better with hunspell. @@ -1151,12 +1166,12 @@ all uninitialized dicts using that affix file." (if (cadr (assoc dict ispell-dictionary-alist)) (message "ispell-hfde: Non void entry for %s. Skipping.\n" dict) (let ((dict-alias - (cadr (assoc dict ispell-hunspell-dictionary-equivs-alist))) + (cadr (assoc dict ispell-dicts-name2locale-equivs-alist))) (use-for-dicts (list dict)) (dict-args-cdr (cdr (ispell-parse-hunspell-affix-file dict))) newlist) ;; Get a list of uninitialized dicts using the same affix file. - (dolist (dict-equiv-alist-entry ispell-hunspell-dictionary-equivs-alist) + (dolist (dict-equiv-alist-entry ispell-dicts-name2locale-equivs-alist) (let ((dict-equiv-key (car dict-equiv-alist-entry)) (dict-equiv-value (cadr dict-equiv-alist-entry))) (if (or (member dict dict-equiv-alist-entry) @@ -1221,7 +1236,7 @@ Return a list in `ispell-dictionary-alist' format." "Look for installed hunspell dictionaries. Will initialize `ispell-hunspell-dictionary-alist' and `ispell-hunspell-dictionary-alist' after values found -and remove `ispell-hunspell-dictionary-equivs-alist' +and remove `ispell-dicts-name2locale-equivs-alist' entries if a specific dict was found." (let ((hunspell-found-dicts (split-string @@ -1260,15 +1275,15 @@ entries if a specific dict was found." "-- ispell-fhd: Skipping entry: %s\n" dict))))) ;; Remove entry from aliases alist if explicit dict was found. (let (newlist) - (dolist (dict ispell-hunspell-dictionary-equivs-alist) + (dolist (dict ispell-dicts-name2locale-equivs-alist) (if (assoc (car dict) ispell-hunspell-dict-paths-alist) (ispell-print-if-debug "-- ispell-fhd: Excluding %s alias. Standalone dict found.\n" (car dict)) (add-to-list 'newlist dict))) - (setq ispell-hunspell-dictionary-equivs-alist newlist)) + (setq ispell-dicts-name2locale-equivs-alist newlist)) ;; Add known hunspell aliases - (dolist (dict-equiv ispell-hunspell-dictionary-equivs-alist) + (dolist (dict-equiv ispell-dicts-name2locale-equivs-alist) (let ((dict-equiv-key (car dict-equiv)) (dict-equiv-value (cadr dict-equiv)) (exclude-aliases (list ;; Exclude TeX aliases @@ -1365,7 +1380,7 @@ aspell is used along with Emacs).") (let* ((dict-name (nth 0 adict)) (dict-equiv (cadr (assoc dict-name - ispell-hunspell-dictionary-equivs-alist))) + ispell-dicts-name2locale-equivs-alist))) (ispell-args (nth 5 adict)) (ispell-args-has-d (member "-d" ispell-args)) skip-dict) diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 115c1e0cde..7f050e9fd9 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -263,6 +263,7 @@ distribution. Mixed-case symbols are convenience aliases.") The file name is expected after the command, either in braces or separated by whitespace." :group 'reftex-table-of-contents-browser + :set 'reftex-set-dirty :type '(repeat string)) (defcustom reftex-max-section-depth 12 @@ -866,13 +867,17 @@ DOWNCASE t: Downcase words before using them." (string :tag "")) (option (boolean :tag "Downcase words ")))) -(defcustom reftex-label-regexps - '(;; Normal \\label{foo} labels - "\\\\label{\\(?1:[^}]*\\)}" - ;; keyvals [..., label = {foo}, ...] forms used by ctable, - ;; listings, minted, ... - "\\[[^]]*\\ + + +When 2, attribute indentation looks like this: + + + " + :version "25.1" + :type 'integer + :safe 'integerp + :group 'sgml) + (defcustom sgml-xml-mode nil "When non-nil, tag insertion functions will be XML-compliant. It is set to be buffer-local when the file has @@ -1510,13 +1529,13 @@ LCON is the lexical context, if any." (`pi nil) (`tag - (goto-char (1+ (cdr lcon))) + (goto-char (+ (cdr lcon) sgml-attribute-offset)) (skip-chars-forward "^ \t\n") ;Skip tag name. (skip-chars-forward " \t") (if (not (eolp)) (current-column) ;; This is the first attribute: indent. - (goto-char (1+ (cdr lcon))) + (goto-char (+ (cdr lcon) sgml-attribute-offset)) (+ (current-column) sgml-basic-offset))) (`text diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el index 5f2f671993..84b578b505 100644 --- a/lisp/textmodes/text-mode.el +++ b/lisp/textmodes/text-mode.el @@ -45,6 +45,23 @@ Use (derived-mode-p 'text-mode) instead.") (modify-syntax-entry ?\\ ". " st) ;; We add `p' so that M-c on 'hello' leads to 'Hello' rather than 'hello'. (modify-syntax-entry ?' "w p" st) + ;; UAX #29 says HEBREW PUNCTUATION GERESH behaves like a letter + ;; for the purposes of finding word boundaries. + (modify-syntax-entry #x5f3 "w ") ; GERESH + ;; UAX #29 says HEBREW PUNCTUATION GERSHAYIM should not be a word + ;; boundary when surrounded by letters. Our infrastructure for + ;; finding a word boundary doesn't support 3-character + ;; definitions, so for now simply make this a word-constituent + ;; character. This leaves a problem of having GERSHAYIM at the + ;; beginning or end of a word, where it should be a boundary; + ;; FIXME. + (modify-syntax-entry #x5f4 "w ") ; GERSHAYIM + ;; These all should not be a word boundary when between letters, + ;; according to UAX #29, so they again are prone to the same + ;; problem as GERSHAYIM; FIXME. + (modify-syntax-entry #xb7 "w ") ; MIDDLE DOT + (modify-syntax-entry #x2027 "w ") ; HYPHENATION POINT + (modify-syntax-entry #xff1a "w ") ; FULLWIDTH COLON st) "Syntax table used while in `text-mode'.") diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 920d692d31..8733614387 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,9 +1,20 @@ +2015-03-15 Stefan Monnier + + * url-handlers.el (url-insert-file-contents): Call + after-insert-file-set-coding like insert-file-contents, to set + buffer-file-coding-system (bug#20010). + 2015-01-22 Paul Eggert Don't downcase system diagnostics' first letters * url-dav.el (url-dav-delete-directory, url-dav-delete-file) (url-dav-directory-files): Keep diagnostics consistent with system's. +2015-01-17 Ivan Shmakov + + * url-cookie.el (url-cookie-write-file): Let-bind print-length + and print-level to nil to avoid writing a garbled list. (Bug#16805) + 2014-12-12 Lars Magne Ingebrigtsen * url-http.el (url-http-parse-headers): `gnutls-available-p' is diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 23006e1e08..ff3eafd19d 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -1,4 +1,4 @@ -;;; url-handlers.el --- file-name-handler stuff for URL loading +;;; url-handlers.el --- file-name-handler stuff for URL loading -*- lexical-binding:t -*- ;; Copyright (C) 1996-1999, 2004-2015 Free Software Foundation, Inc. @@ -228,7 +228,7 @@ the arguments that would have been passed to OPERATION." ;; a local process. nil))) -(defun url-handler-file-remote-p (filename &optional identification connected) +(defun url-handler-file-remote-p (filename &optional identification _connected) (let ((url (url-generic-parse-url filename))) (if (and (url-type url) (not (equal (url-type url) "file"))) ;; Maybe we can find a suitable check for CONNECTED. For now, @@ -250,7 +250,7 @@ the arguments that would have been passed to OPERATION." ;; The actual implementation ;;;###autoload (defun url-copy-file (url newname &optional ok-if-already-exists - keep-time preserve-uid-gid) + _keep-time _preserve-uid-gid) "Copy URL to NEWNAME. Both args must be strings. Signals a `file-already-exists' error if file NEWNAME already exists, unless a third argument OK-IF-ALREADY-EXISTS is supplied and non-nil. @@ -334,8 +334,13 @@ They count bytes from the beginning of the body." (unless (cadr size-and-charset) ;; If the headers don't specify any particular charset, use the ;; usual heuristic/rules that we apply to files. - (decode-coding-inserted-region start (point) url visit beg end replace)) - (list url (car size-and-charset)))))) + (decode-coding-inserted-region start (point) url + visit beg end replace)) + (let ((inserted (car size-and-charset))) + (when (fboundp 'after-insert-file-set-coding) + (let ((insval (after-insert-file-set-coding inserted visit))) + (if insval (setq inserted insval)))) + (list url inserted)))))) (put 'insert-file-contents 'url-file-handlers 'url-insert-file-contents) diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 96d6d1da48..811f9e80b0 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -73,6 +73,16 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (repeat :tag "Argument List" :value ("") string)) :group 'vc-bzr) +(defcustom vc-bzr-annotate-switches nil + "String or list of strings specifying switches for bzr annotate under VC. +If nil, use the value of `vc-annotate-switches'. If t, use no switches." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "25.1" + :group 'vc-bzr) + (defcustom vc-bzr-log-switches nil "String or list of strings specifying switches for bzr log under VC." :type '(choice (const :tag "None" nil) @@ -826,7 +836,8 @@ If LIMIT is non-nil, show no more than this many entries." Each line is tagged with the revision number, which has a `help-echo' property containing author and date information." (apply #'vc-bzr-command "annotate" buffer 'async file "--long" "--all" - (if revision (list "-r" revision))) + (append (vc-switches 'bzr 'annotate) + (if revision (list "-r" revision)))) (let ((table (make-hash-table :test 'equal))) (set-process-filter (get-buffer-process buffer) diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index d803c16d7c..232dcc2185 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -96,6 +96,17 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :version "21.1" :group 'vc-cvs) +(defcustom vc-cvs-annotate-switches nil + "String or list of strings specifying switches for cvs annotate under VC. +If nil, use the value of `vc-annotate-switches'. If t, use no +switches." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "25.1" + :group 'vc-cvs) + (defcustom vc-cvs-header '("\$Id\$") "Header keywords to be inserted by `vc-insert-headers'." :version "24.1" ; no longer consult the obsolete vc-header-alist @@ -623,11 +634,12 @@ Remaining arguments are ignored." (defun vc-cvs-annotate-command (file buffer &optional revision) "Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER. Optional arg REVISION is a revision to annotate from." - (vc-cvs-command buffer - (if (vc-cvs-stay-local-p file) - 'async 0) - file "annotate" - (if revision (concat "-r" revision))) + (apply #'vc-cvs-command buffer + (if (vc-cvs-stay-local-p file) + 'async 0) + file "annotate" + (append (vc-switches 'cvs 'annotate) + (if revision (list (concat "-r" revision))))) ;; Strip the leading few lines. (let ((proc (get-buffer-process buffer))) (if proc @@ -1076,7 +1088,7 @@ Query all files in DIR if files is nil." (if (and (not files) local (not (eq local 'only-file))) (vc-cvs-dir-status-heuristic dir update-function) (if (not files) (setq files (vc-expand-dirs (list dir) 'CVS))) - (vc-cvs-command (current-buffer) 'async dir "-f" "status" files) + (vc-cvs-command (current-buffer) 'async files "-f" "status") ;; Alternative implementation: use the "update" command instead of ;; the "status" command. ;; (vc-cvs-command (current-buffer) 'async diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index a31c121b89..48e22c8264 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -120,6 +120,16 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :version "23.1" :group 'vc-git) +(defcustom vc-git-annotate-switches nil + "String or list of strings specifying switches for Git blame under VC. +If nil, use the value of `vc-annotate-switches'. If t, use no switches." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "25.1" + :group 'vc-git) + (defcustom vc-git-program "git" "Name of the Git executable (excluding any arguments)." :version "24.1" @@ -1013,7 +1023,9 @@ or BRANCH^ (where \"^\" can be repeated)." (defun vc-git-annotate-command (file buf &optional rev) (let ((name (file-relative-name file))) - (vc-git-command buf 'async nil "blame" "--date=iso" "-C" "-C" rev "--" name))) + (apply #'vc-git-command buf 'async nil "blame" "--date=iso" + (append (vc-switches 'git 'annotate) + (list rev "--" name))))) (declare-function vc-annotate-convert-time "vc-annotate" (time)) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 8b4067f536..c841dfcdf5 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -131,6 +131,17 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :version "23.1" :group 'vc-hg) +(defcustom vc-hg-annotate-switches nil + "String or list of strings specifying switches for hg annotate under VC. +If nil, use the value of `vc-annotate-switches'. If t, use no +switches." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "25.1" + :group 'vc-hg) + (defcustom vc-hg-program "hg" "Name of the Mercurial executable (excluding any arguments)." :type 'string @@ -358,8 +369,9 @@ If LIMIT is non-nil, show no more than this many entries." (defun vc-hg-annotate-command (file buffer &optional revision) "Execute \"hg annotate\" on FILE, inserting the contents in BUFFER. Optional arg REVISION is a revision to annotate from." - (vc-hg-command buffer 0 file "annotate" "-d" "-n" "--follow" - (when revision (concat "-r" revision)))) + (apply #'vc-hg-command buffer 0 file "annotate" "-d" "-n" "--follow" + (append (vc-switches 'hg 'annotate) + (if revision (list (concat "-r" revision)))))) (declare-function vc-annotate-convert-time "vc-annotate" (time)) diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 7801f4f8ed..251fecb49c 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -476,7 +476,7 @@ status of this file. Otherwise, the value returned is one of: ;; - `copied' and `moved' (might be handled by `removed' and `added') (or (vc-file-getprop file 'vc-state) (when (> (length file) 0) ;Why?? --Stef - (setq backend (or backend (vc-backend file))) + (setq backend (or backend (vc-responsible-backend file))) (when backend (vc-state-refresh file backend))))) @@ -495,7 +495,7 @@ status of this file. Otherwise, the value returned is one of: If FILE is not registered, this function always returns nil." (or (vc-file-getprop file 'vc-working-revision) (progn - (setq backend (or backend (vc-backend file))) + (setq backend (or backend (vc-responsible-backend file))) (when backend (vc-file-setprop file 'vc-working-revision (vc-call-backend backend 'working-revision file)))))) diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index d783572678..cd84ebe7af 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el @@ -49,6 +49,17 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :version "23.1" :group 'vc-mtn) +(defcustom vc-mtn-annotate-switches nil + "String or list of strings specifying switches for mtn annotate under VC. +If nil, use the value of `vc-annotate-switches'. If t, use no +switches." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "25.1" + :group 'vc-mtn) + (define-obsolete-variable-alias 'vc-mtn-command 'vc-mtn-program "23.1") (defcustom vc-mtn-program "mtn" "Name of the monotone executable." @@ -246,8 +257,9 @@ If LIMIT is non-nil, show no more than this many entries." (if rev1 (list "-r" rev1)) (if rev2 (list "-r" rev2))))) (defun vc-mtn-annotate-command (file buf &optional rev) - (apply 'vc-mtn-command buf 'async file "annotate" - (if rev (list "-r" rev)))) + (apply #'vc-mtn-command buf 'async file "annotate" + (append (vc-switches 'mtn 'annotate) + (if rev (list "-r" rev))))) (declare-function vc-annotate-convert-time "vc-annotate" (time)) diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index d575530c98..8aedc00269 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -288,20 +288,21 @@ to the RCS command." "Unregister FILE from RCS. If this leaves the RCS subdirectory empty, ask the user whether to remove it." - (let* ((master (vc-master-name file)) - (dir (file-name-directory master)) - (backup-info (find-backup-file-name master))) - (if (not backup-info) - (delete-file master) - (rename-file master (car backup-info) 'ok-if-already-exists) - (dolist (f (cdr backup-info)) (ignore-errors (delete-file f)))) - (and (string= (file-name-nondirectory (directory-file-name dir)) "RCS") - ;; check whether RCS dir is empty, i.e. it does not - ;; contain any files except "." and ".." - (not (directory-files dir nil - "^\\([^.]\\|\\.[^.]\\|\\.\\.[^.]\\).*")) - (yes-or-no-p (format "Directory %s is empty; remove it? " dir)) - (delete-directory dir)))) + (unless (memq (vc-state file) '(nil unregistered)) + (let* ((master (vc-master-name file)) + (dir (file-name-directory master)) + (backup-info (find-backup-file-name master))) + (if (not backup-info) + (delete-file master) + (rename-file master (car backup-info) 'ok-if-already-exists) + (dolist (f (cdr backup-info)) (ignore-errors (delete-file f)))) + (and (string= (file-name-nondirectory (directory-file-name dir)) "RCS") + ;; check whether RCS dir is empty, i.e. it does not + ;; contain any files except "." and ".." + (not (directory-files dir nil + "^\\([^.]\\|\\.[^.]\\|\\.\\.[^.]\\).*")) + (yes-or-no-p (format "Directory %s is empty; remove it? " dir)) + (delete-directory dir))))) ;; It used to be possible to pass in a value for the variable rev, but ;; nothing in the rest of VC used this capability. Removing it makes the @@ -971,74 +972,75 @@ otherwise determine the workfile version based on the master file. This function sets the properties `vc-working-revision' and `vc-checkout-model' to their correct values, based on the master file." - (with-temp-buffer - (if (or (not (vc-insert-file (vc-master-name file) "^[0-9]")) - (progn (goto-char (point-min)) - (not (looking-at "^head[ \t\n]+[^;]+;$")))) - (error "File %s is not an RCS master file" (vc-master-name file))) - (let ((workfile-is-latest nil) - (default-branch (vc-parse-buffer "^branch[ \t\n]+\\([^;]*\\);" 1))) - (vc-file-setprop file 'vc-rcs-default-branch default-branch) - (unless working-revision - ;; Workfile version not known yet. Determine that first. It - ;; is either the head of the trunk, the head of the default - ;; branch, or the "default branch" itself, if that is a full - ;; revision number. - (cond - ;; no default branch - ((or (not default-branch) (string= "" default-branch)) - (setq working-revision - (vc-parse-buffer "^head[ \t\n]+\\([^;]+\\);" 1)) - (setq workfile-is-latest t)) - ;; default branch is actually a revision - ((string-match "^[0-9]+\\.[0-9]+\\(\\.[0-9]+\\.[0-9]+\\)*$" - default-branch) - (setq working-revision default-branch)) - ;; else, search for the head of the default branch - (t (vc-insert-file (vc-master-name file) "^desc") + (when (and (file-regular-p file) (vc-master-name file)) + (with-temp-buffer + (if (or (not (vc-insert-file (vc-master-name file) "^[0-9]")) + (progn (goto-char (point-min)) + (not (looking-at "^head[ \t\n]+[^;]+;$")))) + (error "File %s is not an RCS master file" (vc-master-name file))) + (let ((workfile-is-latest nil) + (default-branch (vc-parse-buffer "^branch[ \t\n]+\\([^;]*\\);" 1))) + (vc-file-setprop file 'vc-rcs-default-branch default-branch) + (unless working-revision + ;; Workfile version not known yet. Determine that first. It + ;; is either the head of the trunk, the head of the default + ;; branch, or the "default branch" itself, if that is a full + ;; revision number. + (cond + ;; no default branch + ((or (not default-branch) (string= "" default-branch)) (setq working-revision - (vc-rcs-find-most-recent-rev default-branch)) - (setq workfile-is-latest t))) - (vc-file-setprop file 'vc-working-revision working-revision)) - ;; Check strict locking - (goto-char (point-min)) - (vc-file-setprop file 'vc-checkout-model - (if (re-search-forward ";[ \t\n]*strict;" nil t) - 'locking 'implicit)) - ;; Compute state of workfile version - (goto-char (point-min)) - (let ((locking-user - (vc-parse-buffer (concat "^locks[ \t\n]+[^;]*[ \t\n]+\\([^:]+\\):" - (regexp-quote working-revision) - "[^0-9.]") - 1))) - (cond - ;; not locked - ((not locking-user) - (if (or workfile-is-latest - (vc-rcs-latest-on-branch-p file working-revision)) - ;; workfile version is latest on branch - 'up-to-date - ;; workfile version is not latest on branch - 'needs-update)) - ;; locked by the calling user - ((and (stringp locking-user) - (string= locking-user (vc-user-login-name file))) - ;; Don't call `vc-rcs-checkout-model' to avoid inf-looping. - (if (or (eq (vc-file-getprop file 'vc-checkout-model) 'locking) - workfile-is-latest - (vc-rcs-latest-on-branch-p file working-revision)) - 'edited - ;; Locking is not used for the file, but the owner does - ;; have a lock, and there is a higher version on the current - ;; branch. Not sure if this can occur, and if it is right - ;; to use `needs-merge' in this case. - 'needs-merge)) - ;; locked by somebody else - ((stringp locking-user) - locking-user) - (t - (error "Error getting state of RCS file"))))))) + (vc-parse-buffer "^head[ \t\n]+\\([^;]+\\);" 1)) + (setq workfile-is-latest t)) + ;; default branch is actually a revision + ((string-match "^[0-9]+\\.[0-9]+\\(\\.[0-9]+\\.[0-9]+\\)*$" + default-branch) + (setq working-revision default-branch)) + ;; else, search for the head of the default branch + (t (vc-insert-file (vc-master-name file) "^desc") + (setq working-revision + (vc-rcs-find-most-recent-rev default-branch)) + (setq workfile-is-latest t))) + (vc-file-setprop file 'vc-working-revision working-revision)) + ;; Check strict locking + (goto-char (point-min)) + (vc-file-setprop file 'vc-checkout-model + (if (re-search-forward ";[ \t\n]*strict;" nil t) + 'locking 'implicit)) + ;; Compute state of workfile version + (goto-char (point-min)) + (let ((locking-user + (vc-parse-buffer (concat "^locks[ \t\n]+[^;]*[ \t\n]+\\([^:]+\\):" + (regexp-quote working-revision) + "[^0-9.]") + 1))) + (cond + ;; not locked + ((not locking-user) + (if (or workfile-is-latest + (vc-rcs-latest-on-branch-p file working-revision)) + ;; workfile version is latest on branch + 'up-to-date + ;; workfile version is not latest on branch + 'needs-update)) + ;; locked by the calling user + ((and (stringp locking-user) + (string= locking-user (vc-user-login-name file))) + ;; Don't call `vc-rcs-checkout-model' to avoid inf-looping. + (if (or (eq (vc-file-getprop file 'vc-checkout-model) 'locking) + workfile-is-latest + (vc-rcs-latest-on-branch-p file working-revision)) + 'edited + ;; Locking is not used for the file, but the owner does + ;; have a lock, and there is a higher version on the current + ;; branch. Not sure if this can occur, and if it is right + ;; to use `needs-merge' in this case. + 'needs-merge)) + ;; locked by somebody else + ((stringp locking-user) + locking-user) + (t + (error "Error getting state of RCS file")))))))) (defun vc-rcs-consult-headers (file) "Search for RCS headers in FILE, and set properties accordingly. diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el index 1b959e22e2..8d8d9e844e 100644 --- a/lisp/vc/vc-sccs.el +++ b/lisp/vc/vc-sccs.el @@ -149,13 +149,14 @@ For a description of possible values, see `vc-check-master-templates'." (defun vc-sccs-working-revision (file) "SCCS-specific version of `vc-working-revision'." - (with-temp-buffer - ;; The working revision is always the latest revision number. - ;; To find this number, search the entire delta table, - ;; rather than just the first entry, because the - ;; first entry might be a deleted ("R") revision. - (vc-insert-file (vc-master-name file) "^\001e\n\001[^s]") - (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1))) + (when (and (file-regular-p file) (vc-master-name file)) + (with-temp-buffer + ;; The working revision is always the latest revision number. + ;; To find this number, search the entire delta table, + ;; rather than just the first entry, because the + ;; first entry might be a deleted ("R") revision. + (vc-insert-file (vc-master-name file) "^\001e\n\001[^s]") + (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1)))) ;; Cf vc-sccs-find-revision. (defun vc-sccs-write-revision (file outfile &optional rev) diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el index f497f95100..d9aa1b13e8 100644 --- a/lisp/vc/vc-src.el +++ b/lisp/vc/vc-src.el @@ -200,10 +200,10 @@ This function differs from vc-do-command in that it invokes `vc-src-program'." (defun vc-src-working-revision (file) "SRC-specific version of `vc-working-revision'." - (or (ignore-errors - (with-output-to-string - (vc-src-command standard-output file "list" "-f{1}" "@"))) - "0")) + (let ((result (ignore-errors + (with-output-to-string + (vc-src-command standard-output file "list" "-f{1}" "@"))))) + (if (zerop (length result)) "0" result))) ;;; ;;; State-changing functions diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index d74daf9c36..5ce9afa02c 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -95,6 +95,17 @@ If you want to force an empty list of arguments, use t." :version "22.1" :group 'vc-svn) +(defcustom vc-svn-annotate-switches nil + "String or list of strings specifying switches for svn annotate under VC. +If nil, use the value of `vc-annotate-switches'. If t, use no +switches." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :version "25.1" + :group 'vc-svn) + (defcustom vc-svn-header '("\$Id\$") "Header keywords to be inserted by `vc-insert-headers'." :version "24.1" ; no longer consult the obsolete vc-header-alist @@ -736,7 +747,9 @@ Set file properties accordingly. If FILENAME is non-nil, return its status." ;; Support for `svn annotate' (defun vc-svn-annotate-command (file buf &optional rev) - (vc-svn-command buf 'async file "annotate" (if rev (concat "-r" rev)))) + (apply #'vc-svn-command buf 'async file "annotate" + (append (vc-switches 'svn 'annotate) + (if rev (list (concat "-r" rev)))))) (defun vc-svn-annotate-time-of-rev (rev) ;; Arbitrarily assume 10 commits per day. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 54b221428a..bb4dd607bd 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -780,6 +780,26 @@ not specific to any particular backend." :group 'vc :version "21.1") +(defcustom vc-annotate-switches nil + "A string or list of strings specifying switches for annotate under VC. +When running annotate under a given BACKEND, VC uses the first +non-nil value of `vc-BACKEND-annotate-switches', `vc-annotate-switches', +and `annotate-switches', in that order. Since nil means to check the +next variable in the sequence, either of the first two may use +the value t to mean no switches at all. `vc-annotate-switches' +should contain switches that are specific to version control, but +not specific to any particular backend. + +As very few switches (if any) are used across different VC tools, +please consider using the specific `vc-BACKEND-annotate-switches' +for the backend you use." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :group 'vc + :version "25.1") + (defcustom vc-log-show-limit 2000 "Limit the number of items shown by the VC log commands. Zero means unlimited. @@ -930,6 +950,7 @@ use." (vc-call-backend bk 'create-repo)) (throw 'found bk)))) +;;;###autoload (defun vc-responsible-backend (file) "Return the name of a backend system that is responsible for FILE. diff --git a/lisp/w32-vars.el b/lisp/w32-vars.el index ae42ee7ecd..f9212be406 100644 --- a/lisp/w32-vars.el +++ b/lisp/w32-vars.el @@ -34,10 +34,17 @@ ;; Redefine the font selection to use the standard W32 dialog (defcustom w32-use-w32-font-dialog t - "Use the standard font dialog. + "If non-nil, use the standard Windows font dialog for font selection. If nil, pop up a menu of a fixed set of fonts including fontsets, like -X does. See `w32-fixed-font-alist' for the font menu definition." +X does. See `w32-fixed-font-alist' for the fonts to appear in the menu. + +Setting this variable directly does not have any effect; +use either \\[customize] or set `mouse-appearance-menu-map' to nil +after changing the value of this variable." :type 'boolean + :set (lambda (symbol value) + (set symbol value) + (setq mouse-appearance-menu-map nil)) :group 'w32) (defvar w32-list-proportional-fonts nil @@ -104,11 +111,11 @@ X does. See `w32-fixed-font-alist' for the font menu definition." "-*-Lucida Sans Typewriter-semibold-r-*-*-16-*-*-*-c-*-iso8859-1")) ("Courier" ("Courier 10x8" - "-*-Courier-*normal-r-*-*-*-97-*-*-c-80-iso8859-1") + "-*-Courier New-normal-r-*-*-*-97-*-*-c-80-iso8859-1") ("Courier 12x9" - "-*-Courier-*normal-r-*-*-*-120-*-*-c-90-iso8859-1") + "-*-Courier New-normal-r-*-*-*-120-*-*-c-90-iso8859-1") ("Courier 15x12" - "-*-Courier-*normal-r-*-*-*-150-*-*-c-120-iso8859-1") + "-*-Courier New-normal-r-*-*-*-150-*-*-c-120-iso8859-1") ;; For these, we specify the point height. ("") ("8" "-*-Courier New-normal-r-*-*-11-*-*-*-c-*-iso8859-1") diff --git a/lisp/widget.el b/lisp/widget.el index f8faa0f379..539f91e63a 100644 --- a/lisp/widget.el +++ b/lisp/widget.el @@ -83,6 +83,9 @@ create identical widgets: * (apply 'widget-create CLASS ARGS) The third argument DOC is a documentation string for the widget." + ;; + (unless (or (null doc) (stringp doc)) + (error "widget documentation must be `nil' or a string.")) (put name 'widget-type (cons class args)) (put name 'widget-documentation (purecopy doc)) name) diff --git a/lisp/windmove.el b/lisp/windmove.el index d857dfc98d..c461a00740 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -479,10 +479,10 @@ DIR, ARG, and WINDOW are handled as by `windmove-other-window-loc'. If no window is at direction DIR, an error is signaled." (let ((other-window (windmove-find-other-window dir arg window))) (cond ((null other-window) - (error "No window %s from selected window" dir)) + (user-error "No window %s from selected window" dir)) ((and (window-minibuffer-p other-window) (not (minibuffer-window-active-p other-window))) - (error "Minibuffer is inactive")) + (user-error "Minibuffer is inactive")) (t (select-window other-window))))) diff --git a/lisp/window.el b/lisp/window.el index abc60063ab..46a7dd0827 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -1160,7 +1160,7 @@ dumping to it." (insert (format "frame pixel: %s x %s cols/lines: %s x %s units: %s x %s\n" (frame-pixel-width frame) (frame-pixel-height frame) - (frame-total-cols frame) (frame-text-lines frame) ; (frame-total-lines frame) + (frame-total-cols frame) (frame-total-lines frame) (frame-char-width frame) (frame-char-height frame)) (format "frame text pixel: %s x %s cols/lines: %s x %s\n" (frame-text-width frame) (frame-text-height frame) @@ -1835,6 +1835,61 @@ optional argument PIXELWISE is passed to the functions." (window-body-width window pixelwise) (window-body-height window pixelwise))) +(defun window-font-width (&optional window face) + "Return average character width for the font of FACE used in WINDOW. +WINDOW must be a live window and defaults to the selected one. + +If FACE is nil or omitted, the default face is used. If FACE is +remapped (see `face-remapping-alist'), the function returns the +information for the remapped face." + (with-selected-window (window-normalize-window window t) + (if (display-multi-font-p) + (let* ((face (if face face 'default)) + (info (font-info (face-font face))) + (width (aref info 11))) + (if (> width 0) + width + (aref info 10))) + (frame-char-width)))) + +(defun window-font-height (&optional window face) + "Return character height for the font of FACE used in WINDOW. +WINDOW must be a live window and defaults to the selected one. + +If FACE is nil or omitted, the default face is used. If FACE is +remapped (see `face-remapping-alist'), the function returns the +information for the remapped face." + (with-selected-window (window-normalize-window window t) + (if (display-multi-font-p) + (let* ((face (if face face 'default)) + (info (font-info (face-font face)))) + (aref info 3)) + (frame-char-height)))) + +(defun window-max-chars-per-line (&optional window face) + "Return the number of characters that can be displayed on one line in WINDOW. +WINDOW must be a live window and defaults to the selected one. + +The character width of FACE is used for the calculation. If FACE +is nil or omitted, the default face is used. If FACE is +remapped (see `face-remapping-alist'), the function uses the +remapped face. + +This function is different from `window-body-width' in two +ways. First, it accounts for the portions of the line reserved +for the continuation glyph. Second, it accounts for the size of +the font." + (with-selected-window (window-normalize-window window t) + (let* ((window-width (window-body-width window t)) + (font-width (window-font-width window face)) + (ncols (/ window-width font-width))) + (if (and (display-graphic-p) + overflow-newline-into-fringe + (/= (frame-parameter nil 'left-fringe) 0) + (/= (frame-parameter nil 'right-fringe) 0)) + ncols + (1- ncols))))) + (defun window-current-scroll-bars (&optional window) "Return the current scroll bar types for WINDOW. WINDOW must be a live window and defaults to the selected one. @@ -7974,7 +8029,107 @@ Otherwise, consult the value of `truncate-partial-width-windows' (window-buffer window)))) (if (integerp t-p-w-w) (< (window-width window) t-p-w-w) - t-p-w-w)))) + t-p-w-w)))) + + +;; Automatically inform subprocesses of changes to window size. + +(defcustom window-adjust-process-window-size-function + 'window-adjust-process-window-size-smallest + "Control how Emacs chooses inferior process window sizes. +Emacs uses this function to tell processes the space they have +available for displaying their output. After each window +configuration change, Emacs calls the value of +`window-adjust-process-window-size-function' for each process +with a buffer being displayed in at least one window. +This function is responsible for combining the sizes of the +displayed windows and returning a cons (WIDTH . HEIGHT) +describing the width and height with which Emacs will call +`set-process-window-size' for that process. If the function +returns `nil', Emacs does not call `set-process-window-size'. + +This function is called with the process buffer as the current +buffer and with two arguments: the process and a list of windows +displaying process. Modes can make this variable buffer-local; +additionally, the `adjust-window-size-function' process property +overrides the global or buffer-local value of +`window-adjust-process-window-size-function'." + :type '(choice + (const :tag "Minimum area of any window" + window-adjust-process-window-size-smallest) + (const :tag "Maximum area of any window" + window-adjust-process-window-size-largest) + (const :tag "Do not adjust process window sizes" ignore) + function) + :group 'windows + :version "25.1") + +(defun window-adjust-process-window-size (reducer process windows) + "Adjust the process window size of PROCESS. +WINDOWS is a list of windows associated with PROCESS. REDUCER is +a two-argument function used to combine the widths and heights of +the given windows." + (when windows + (let ((width (window-body-width (car windows))) + (height (window-body-height (car windows)))) + (dolist (window (cdr windows)) + (setf width (funcall reducer width (window-body-width window))) + (setf height (funcall reducer height (window-body-height window)))) + (cons width height)))) + +(defun window-adjust-process-window-size-smallest (process windows) + "Adjust the process window size of PROCESS. +WINDOWS is a list of windows associated with PROCESS. Choose the +smallest area available for displaying PROCESS's output." + (window-adjust-process-window-size #'min process windows)) + +(defun window-adjust-process-window-size-largest (process windows) + "Adjust the process window size of PROCESS. +WINDOWS is a list of windows associated with PROCESS. Choose the +largest area available for displaying PROCESS's output." + (window-adjust-process-window-size #'max process windows)) + +(defun window--process-window-list () + "Return an alist mapping processes to associated windows. +A window is associated with a process if that window is +displaying that processes's buffer." + (let ((processes (process-list)) + (process-windows nil)) + (walk-windows + (lambda (window) + (let ((buffer (window-buffer window)) + (iter processes)) + (while (let ((process (car iter))) + (if (and (process-live-p process) + (eq buffer (process-buffer process))) + (let ((procwin (assq process process-windows))) + ;; Add this window to the list of windows + ;; displaying process. + (if procwin + (push window (cdr procwin)) + (push (list process window) process-windows)) + ;; We found our process for this window, so + ;; stop iterating over the process list. + nil) + (setf iter (cdr iter))))))) + 1 t) + process-windows)) + +(defun window--adjust-process-windows () + "Update process window sizes to match the current window configuration." + (dolist (procwin (window--process-window-list)) + (let ((process (car procwin))) + (with-demoted-errors "Error adjusting window size: %S" + (with-current-buffer (process-buffer process) + (let ((size (funcall + (or (process-get process 'adjust-window-size-function) + window-adjust-process-window-size-function) + process (cdr procwin)))) + (when size + (set-process-window-size process (cdr size) (car size))))))))) + +(add-hook 'window-configuration-change-hook 'window--adjust-process-windows) + ;; Some of these are in tutorial--default-keys, so update that if you ;; change these. diff --git a/lisp/winner.el b/lisp/winner.el index f244003b06..fdf6213751 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -415,7 +415,7 @@ In other words, \"undo\" changes in window configuration." (ring-ref winner-pending-undo-ring 0))) (unless (eq (selected-window) (minibuffer-window)) (message "Winner undid undo"))) - (t (error "Previous command was not a `winner-undo'")))) + (t (user-error "Previous command was not a `winner-undo'")))) (provide 'winner) ;;; winner.el ends here diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index 526301327a..b99db489a9 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el @@ -217,10 +217,10 @@ WINDOW is the window where the drop happened. ACTION is ignored. DATA is the moz-url, which is formatted as two strings separated by \\r\\n. The first string is the URL, the second string is the title of that URL. DATA is encoded in utf-16. Decode the URL and call `x-dnd-handle-uri-list'." - ;; Mozilla and applications based on it (Galeon for example) uses - ;; text/unicode, but it is impossible to tell if it is le or be. Use what - ;; the machine Emacs runs on use. This loses if dropping between machines - ;; with different endian, but it is the best we can do. + ;; Mozilla and applications based on it use text/unicode, but it is + ;; impossible to tell if it is le or be. Use what the machine Emacs + ;; runs on uses. This loses if dropping between machines + ;; with different endian-ness, but it is the best we can do. (let* ((coding (if (eq (byteorder) ?B) 'utf-16be 'utf-16le)) (string (decode-coding-string data coding)) (strings (split-string string "[\r\n]" t)) diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index b87c1a2893..f8ae73c7b7 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -60,6 +60,7 @@ http://invisible-island.net/xterm/ctlseqs/ctlseqs.html)." (ev-data (nth 1 event)) (ev-where (nth 1 ev-data)) (vec (vector event)) + (is-move (eq 'mouse-movement ev-command)) (is-down (string-match "down-" (symbol-name ev-command)))) ;; Mouse events symbols must have an 'event-kind property with @@ -71,6 +72,7 @@ http://invisible-island.net/xterm/ctlseqs/ctlseqs.html)." (is-down (setf (terminal-parameter nil 'xterm-mouse-last-down) event) vec) + (is-move vec) (t (let* ((down (terminal-parameter nil 'xterm-mouse-last-down)) (down-data (nth 1 down)) @@ -132,65 +134,89 @@ http://invisible-island.net/xterm/ctlseqs/ctlseqs.html)." (fdiff (- f (* 1.0 maxwrap dbig)))) (+ (truncate fdiff) (* maxwrap dbig)))))) -;; Normal terminal mouse click reporting: expect three bytes, of the -;; form . Return a list (EVENT-TYPE X Y). -(defun xterm-mouse--read-event-sequence-1000 () - (let* ((code (- (read-event) 32)) - (type - ;; For buttons > 3, the release-event looks differently - ;; (see xc/programs/xterm/button.c, function EditorButton), - ;; and come in a release-event only, no down-event. - (cond ((>= code 64) - (format "mouse-%d" (- code 60))) - ((memq code '(8 9 10)) - (format "M-down-mouse-%d" (- code 7))) - ((memq code '(3 11)) - (let ((down (car (terminal-parameter - nil 'xterm-mouse-last-down)))) - (when (and down (string-match "[0-9]" (symbol-name down))) - (format (if (eq code 3) "mouse-%s" "M-mouse-%s") - (match-string 0 (symbol-name down)))))) - ((memq code '(0 1 2)) - (format "down-mouse-%d" (+ 1 code))))) - (x (- (read-event) 33)) - (y (- (read-event) 33))) - (and type (wholenump x) (wholenump y) - (list (intern type) x y)))) - -;; XTerm's 1006-mode terminal mouse click reporting has the form -;;