Merge from trunk.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 17 Apr 2012 21:38:34 +0000 (14:38 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 17 Apr 2012 21:38:34 +0000 (14:38 -0700)
46 files changed:
ChangeLog
autogen/config.in
autogen/configure
configure.in
etc/NEWS
lib-src/ChangeLog
lisp/ChangeLog
lisp/calendar/cal-tex.el
lisp/dired-aux.el
lisp/dired.el
lisp/emacs-lisp/cl-extra.el
lisp/emacs-lisp/cl-loaddefs.el
lisp/emacs-lisp/eieio-opt.el
lisp/emacs-lisp/ert-x.el
lisp/emacs-lisp/smie.el
lisp/frame.el
lisp/gnus/ChangeLog
lisp/gnus/nndraft.el
lisp/mail/feedmail.el
lisp/mouse.el
lisp/mpc.el
lisp/newcomment.el
lisp/play/cookie1.el
lisp/play/yow.el
lisp/progmodes/perl-mode.el
lisp/progmodes/python.el
lisp/server.el
lisp/ses.el
lisp/speedbar.el
lisp/tar-mode.el
lisp/textmodes/ispell.el
lisp/textmodes/picture.el
lisp/textmodes/tex-mode.el
lisp/textmodes/two-column.el
lisp/vc/pcvs-util.el
lisp/vc/pcvs.el
lisp/vc/vc-dir.el
lisp/vc/vc-dispatcher.el
lisp/vc/vc-hg.el
lisp/vc/vc.el
lisp/woman.el
lwlib/ChangeLog
msdos/ChangeLog
oldXMenu/ChangeLog
src/ChangeLog
src/dired.c

index 99ce37a..6020d15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-2012-04-14  Paul Eggert  <eggert@cs.ucla.edu>
+2012-04-17  Paul Eggert  <eggert@cs.ucla.edu>
 
        configure: new option --enable-gcc-warnings (Bug#11207)
        I have been using this change for many months in my private copy
        * lib/Makefile.am (AM_CFLAGS): New macro.
        * m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib.
 
+2012-04-17  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * configure.in (AC_CHECK_FUNCS):
+       Add getpwent, endpwent, getgrent, endgrent. (Bug#7900)
+
+2012-04-16  Glenn Morris  <rgm@gnu.org>
+
+       * configure.in (NS_HAVE_NSINTEGER): Remove unnecessary variable.
+
+       * configure.in: Remove X libs workaround for old autoconf.
+
 2012-04-12  Ken Brown  <kbrown@cornell.edu>
 
        * configure.in: Warn that Cygwin 1.5 is unsupported.  (Bug#10398)
index e93bd7f..c64b048 100644 (file)
@@ -203,6 +203,12 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* Define to 1 if you have the 'dup2' function. */
 #undef HAVE_DUP2
 
+/* Define to 1 if you have the `endgrent' function. */
+#undef HAVE_ENDGRENT
+
+/* Define to 1 if you have the `endpwent' function. */
+#undef HAVE_ENDPWENT
+
 /* Define to 1 if you have the `euidaccess' function. */
 #undef HAVE_EUIDACCESS
 
@@ -254,6 +260,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* Define to 1 if you have the `getdomainname' function. */
 #undef HAVE_GETDOMAINNAME
 
+/* Define to 1 if you have the `getgrent' function. */
+#undef HAVE_GETGRENT
+
 /* Define to 1 if you have the `gethostname' function. */
 #undef HAVE_GETHOSTNAME
 
@@ -278,6 +287,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* Define to 1 if you have the `getpt' function. */
 #undef HAVE_GETPT
 
+/* Define to 1 if you have the `getpwent' function. */
+#undef HAVE_GETPWENT
+
 /* Define to 1 if you have the `getrlimit' function. */
 #undef HAVE_GETRLIMIT
 
index de24a15..dd88948 100755 (executable)
@@ -9656,15 +9656,6 @@ else
   window_system=x11
 fi
 
-## Workaround for bug in autoconf <= 2.62.
-## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
-## No need to do anything special for these standard directories.
-if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
-
-   x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
-
-fi
-
 LD_SWITCH_X_SITE_AUX=
 LD_SWITCH_X_SITE_AUX_RPATH=
 if test "${x_libraries}" != NONE; then
@@ -9803,7 +9794,6 @@ else
 fi
 
 
-  NS_HAVE_NSINTEGER=yes
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <Foundation/NSObjCRuntime.h>
@@ -9821,8 +9811,10 @@ else
   ns_have_nsinteger=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  if test $ns_have_nsinteger = no; then
-    NS_HAVE_NSINTEGER=no
+  if test $ns_have_nsinteger = yes; then
+
+$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
+
   fi
 fi
 
@@ -13434,11 +13426,6 @@ $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
     ## Extra CFLAGS applied to src/*.m files.
     GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
   fi
-  if test "${NS_HAVE_NSINTEGER}" = "yes"; then
-
-$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
-
-  fi
   # We also have mouse menus.
   HAVE_MENUS=yes
   OTHER_FILES=ns-app
@@ -13967,6 +13954,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
 sendto recvfrom getsockopt setsockopt getsockname getpeername \
 gai_strerror mkstemp getline getdelim mremap fsync sync \
 difftime mempcpy mblen mbrlen posix_memalign \
+getpwent endpwent getgrent endgrent \
 cfmakeraw cfsetspeed copysign __executable_start
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
index 8be0da2..6b60e22 100644 (file)
@@ -1500,15 +1500,6 @@ else
   window_system=x11
 fi
 
-## Workaround for bug in autoconf <= 2.62.
-## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
-## No need to do anything special for these standard directories.
-if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
-
-   x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
-
-fi
-
 LD_SWITCH_X_SITE_AUX=
 LD_SWITCH_X_SITE_AUX_RPATH=
 if test "${x_libraries}" != NONE; then
@@ -1629,13 +1620,12 @@ fail;
   AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes],
                  [AC_MSG_ERROR([`--with-ns' was specified, but the include
   files are missing or cannot be compiled.])])
-  NS_HAVE_NSINTEGER=yes
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Foundation/NSObjCRuntime.h>],
                                      [NSInteger i;])],
                    ns_have_nsinteger=yes,
                    ns_have_nsinteger=no)
-  if test $ns_have_nsinteger = no; then
-    NS_HAVE_NSINTEGER=no
+  if test $ns_have_nsinteger = yes; then
+    AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
   fi
 fi
 AC_SUBST(TEMACS_LDFLAGS2)
@@ -2683,9 +2673,6 @@ if test "${HAVE_NS}" = "yes"; then
     ## Extra CFLAGS applied to src/*.m files.
     GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
   fi
-  if test "${NS_HAVE_NSINTEGER}" = "yes"; then
-    AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
-  fi
   # We also have mouse menus.
   HAVE_MENUS=yes
   OTHER_FILES=ns-app
@@ -2828,6 +2815,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
 sendto recvfrom getsockopt setsockopt getsockname getpeername \
 gai_strerror mkstemp getline getdelim mremap fsync sync \
 difftime mempcpy mblen mbrlen posix_memalign \
+getpwent endpwent getgrent endgrent \
 cfmakeraw cfsetspeed copysign __executable_start)
 
 dnl Cannot use AC_CHECK_FUNCS
index 27b5406..16b9f75 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -27,7 +27,7 @@ so we will look at it and add it to the manual.
 If building with GCC, this enables compile-time checks that warn about
 possibly-questionable C code.  On a recent GNU system there should be
 no warnings; on older and on non-GNU systems the generated warnings
-may or may not be useful.  By default, these warnings are not generated.
+may be useful.
 
 \f
 * Startup Changes in Emacs 24.2
@@ -39,6 +39,9 @@ been adding them there, put them somewhere else, eg site-lisp.
 \f
 * Changes in Emacs 24.2
 
+** New functions `system-users', `system-groups' return lists of the user
+name, group names known to the system (where possible).
+
 ** If your Emacs was built from a bzr checkout, the new variable
 `emacs-bzr-version' contains information about which bzr revision was used.
 
@@ -74,7 +77,12 @@ channel keys found, if any.
 
 ** The `server-auth-key' variable can be used to set a permanent
 shared key for Emacs Server.
-   
+
+** In Perl mode, new option `perl-indent-parens-as-block' causes non-block
+closing brackets to be aligned with the line of the opening bracket.
+
+** FIXME something happened to ses.el, 2012-04-17.
+
 ** Obsolete packages:
 
 *** mailpost.el
index 55e76c0..161d713 100644 (file)
@@ -1,4 +1,4 @@
-2012-04-16  Paul Eggert  <eggert@cs.ucla.edu>
+2012-04-17  Paul Eggert  <eggert@cs.ucla.edu>
 
        configure: new option --enable-gcc-warnings (Bug#11207)
        * Makefile.in (C_WARNINGS_SWITCH): Remove.
index 7ebeea0..d9aadbe 100644 (file)
@@ -1,7 +1,115 @@
+2012-04-17  Juanma Barranquero  <lekktu@gmail.com>
+
+       * server.el (server-ensure-safe-dir): Simplify.
+
+2012-04-17  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/smie.el: Provide smarter auto-filling.
+       (smie-auto-fill): New function.
+       (smie-setup): Use it.
+
+       * newcomment.el (comment-choose-indent): Obey comment-inline-offset.
+
+2012-04-17  Philipp Haselwarter  <philipp.haselwarter@gmx.de>  (tiny change)
+
+       * newcomment.el (comment-inline-offset): New custom var (bug#11090).
+       (comment-indent): Use it.
+
+2012-04-17  Vincent Belaïche  <vincentb1@users.sourceforge.net>
+
+       * ses.el: The overall change is to add cell renaming, that is
+       setting fancy names for cell symbols other than name matching
+       "\\`[A-Z]+[0-9]+\\'" regexp .
+       (ses-localvars): Add ses--renamed-cell-symb-list.
+       (ses-create-cell-variable): New defun.
+       (ses-destroy-cell-variable-range): Respect ses--numrows, ses--numcols.
+       (ses-relocate-formula): Relocate formulas only for cells the
+       symbols of which are not renamed, i.e. symbols whose names do not
+       match regexp "\\`[A-Z]+[0-9]+\\'".
+       (ses-relocate-all): Relocate values only for cells the symbols of
+       which are not renamed.
+       (ses-load): Create cells variables as the (ses-cell ...) are read,
+       in order to check row col consistency with cell symbol name only
+       for cells that are not renamed.
+       (ses-replace-name-in-formula): New defun.
+       (ses-rename-cell): New defun.
+
+2012-04-17  Peter Oliver  <bzr@mavit.org.uk>  (tiny change)
+
+       * progmodes/perl-mode.el (perl-indent-parens-as-block):
+       New option (bug#11118).
+       (perl-calculate-indent): Respect it.
+
+2012-04-17  Glenn Morris  <rgm@gnu.org>
+
+       * dired-aux.el (dired-mark-read-string): Doc fix.
+
+2012-04-17  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * dired-aux.el (dired-mark-read-string): Offer optional completion.
+       (dired-do-chxxx): Complete chown, chgrp over users, groups.  (Bug#7900)
+
+2012-04-17  Glenn Morris  <rgm@gnu.org>
+
+       * mouse.el (mouse-drag-track):
+       * speedbar.el (speedbar-frame-mode):
+       Use auto-hscroll-mode rather than the alias automatic-hscrolling.
+
+2012-04-16  Leo Liu  <sdl.web@gmail.com>
+
+       * progmodes/python.el: Trivial cleanup.
+
+2012-04-16  Glenn Morris  <rgm@gnu.org>
+
+       * vc/vc.el (vc-string-prefix-p):
+       * vc/pcvs-util.el (cvs-string-prefix-p):
+       * textmodes/tex-mode.el (latex-string-prefix-p, tex-string-prefix-p):
+       * mpc.el (mpc-string-prefix-p):
+       Make all of these into obsolete aliases for string-prefix-p.
+       Update callers.
+       * vc/pcvs.el, vc/vc-dispatcher.el, vc/vc-dir.el: Update callers.
+
+       * textmodes/two-column.el: Move custom options to the start.
+       (frame-width): Remove compat definition.
+       (2C-associate-buffer, 2C-dissociate):
+       Use with-current-buffer rather than save-excursion.
+       (2C-dissociate): Force a mode-line update.
+       (2C-autoscroll): Use ignore-errors.
+
+       * emacs-lisp/eieio-opt.el (describe-class, describe-generic):
+       Autoload trivia.
+
+       * emacs-lisp/cl-extra.el (*random-state*):
+       Remove unnecessary declaration.
+
+       * calendar/cal-tex.el (cal-tex-end-document): Trivial clarification.
+
+       * play/cookie1.el (cookie-snarf):
+       Give an explicit error if input file cannot be read.
+
+       * play/yow.el (yow-file): Use expand-file-name rather than concat.
+
+       * progmodes/perl-mode.el (c-macro-expand):
+       Remove unnecessary autoload (it is in loaddefs.el).
+
+       * textmodes/picture.el (picture-desired-column)
+       (picture-update-desired-column): Convert comments to doc-strings.
+       (picture-substitute): Remove function.
+       (picture-mode-map): Initialize in the defvar.
+
+       * woman.el: Remove eval-after-load for tar-mode.
+       * tar-mode.el (tar-mode-map): Add woman binding and menu entry.
+       (woman-tar-extract-file): Autoload it.
+
+       * frame.el (automatic-hscrolling): Make this alias obsolete.
+
 2012-04-12  Agustín Martín Domingo  <agustin.martin@hispalinux.es>
 
        * ispell.el (ispell-set-spellchecker-params): Post-process
-       `ispell-dictionary-alist' to use [:alpha:] if possible.
+       `ispell-dictionary-alist' to use [:alpha:] and utf-8 if possible.
+       (ispell-dictionary-base-alist): Revert to original XEmacs
+       friendly version for default.  [:alpha:] will be added in
+       `ispell-set-spellchecker-params' if needed
 
 2012-04-16  Chong Yidong  <cyd@gnu.org>
 
        * term/x-win.el (x-initialize-window-system): Reduce default for
        x-selection-timeout to 5 seconds (Bug#8869).
 
-2012-02-24  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
-
-       * files.el (file-subdir-of-p): Fix typo.
-
 2012-02-24  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 
        * files.el (files-equal-p, file-subdir-of-p): New functions.
index 1489943..0ae2b38 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cal-tex.el --- calendar functions for printing calendars with LaTeX
 
-;; Copyright (C) 1995, 2001-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc.
 
 ;; Author: Steve Fisk <fisk@bowdoin.edu>
 ;;         Edward M. Reingold <reingold@cs.uiuc.edu>
@@ -1588,8 +1588,7 @@ informative header, and run HOOK."
   (cal-tex-e-document)
   (or (and cal-tex-preamble-extra
            (string-match "inputenc" cal-tex-preamble-extra))
-      (not (re-search-backward "[^[:ascii:]]" nil 'move))
-      (progn
+      (when (re-search-backward "[^[:ascii:]]" nil 'move)
         (goto-char (point-min))
         (when (search-forward "documentclass" nil t)
           (forward-line 1)
index 0795b01..8a499c4 100644 (file)
@@ -245,7 +245,11 @@ List has a form of (file-name full-file-name (attribute-list))."
                             " (default now): "
                           ": ")))
         (new-attribute (dired-mark-read-string prompt nil op-symbol
-                                               arg files default))
+                                               arg files default
+                                               (cond ((eq op-symbol 'chown)
+                                                      (system-users))
+                                                     ((eq op-symbol 'chgrp)
+                                                      (system-groups)))))
         (operation (concat program " " new-attribute))
         failures)
     (setq failures
@@ -385,7 +389,7 @@ Uses the shell command coming from variables `lpr-command' and
     (dired-run-shell-command (dired-shell-stuff-it command file-list nil))))
 
 (defun dired-mark-read-string (prompt initial op-symbol arg files
-                              &optional default-value)
+                              &optional default-value collection)
   "Read args for a Dired marked-files command, prompting with PROMPT.
 Return the user input (a string).
 
@@ -397,11 +401,14 @@ FILES should be a list of file names.
 DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list
 of such values, available via history commands.  Note that if the
 user enters empty input, this function returns the empty string,
-not DEFAULT-VALUE."
+not DEFAULT-VALUE.
+
+Optional argument COLLECTION is a collection of possible completions,
+suitable for use by `completing-read'."
   (dired-mark-pop-up nil op-symbol files
-                    'read-from-minibuffer
+                    'completing-read
                     (format prompt (dired-mark-prompt arg files))
-                    initial nil nil nil default-value))
+                    collection nil nil initial nil default-value nil))
 \f
 ;;; Cleaning a directory: flagging some backups for deletion.
 
index d322752..77fe9cb 100644 (file)
@@ -3736,7 +3736,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
 ;;;;;;  dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
 ;;;;;;  dired-clean-directory dired-do-print dired-do-touch dired-do-chown
 ;;;;;;  dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
-;;;;;;  dired-diff) "dired-aux" "dired-aux.el" "58d623eb8e68e472e6164a1bcae83360")
+;;;;;;  dired-diff) "dired-aux" "dired-aux.el" "de7e4c64718c8ba8438a6397a460bf23")
 ;;; Generated autoloads from dired-aux.el
 
 (autoload 'dired-diff "dired-aux" "\
index 9ac5ce7..9a3d8cf 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cl-extra.el --- Common Lisp features, part 2
 
-;; Copyright (C) 1993, 2000-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2000-2012 Free Software Foundation, Inc.
 
 ;; Author: Dave Gillespie <daveg@synaptics.com>
 ;; Keywords: extensions
@@ -430,7 +430,6 @@ With two arguments, return rounding and remainder of their quotient."
 
 ;; Random numbers.
 
-(defvar *random-state*)
 ;;;###autoload
 (defun random* (lim &optional state)
   "Return a random nonnegative number less than LIM, an integer or float.
index 5bb8662..9e0099b 100644 (file)
@@ -10,7 +10,7 @@
 ;;;;;;  ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p
 ;;;;;;  cl-map-overlays cl-map-intervals cl-map-keymap-recursively
 ;;;;;;  notevery notany every some mapcon mapcan mapl maplist map
-;;;;;;  cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "c172dda6770ce18b556561481bfefbb2")
+;;;;;;  cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "5a8a7f7ec2dc453113b8cbda577f2acb")
 ;;; Generated autoloads from cl-extra.el
 
 (autoload 'coerce "cl-extra" "\
index 10816aa..a899839 100644 (file)
@@ -72,8 +72,7 @@ Argument CH-PREFIX is another character prefix to display."
 
 ;;; CLASS COMPLETION / DOCUMENTATION
 
-;;;###autoload
-(defalias 'describe-class 'eieio-describe-class)
+;;;###autoload(defalias 'describe-class 'eieio-describe-class)
 
 ;;;###autoload
 (defun eieio-describe-class (class &optional headerfcn)
@@ -305,8 +304,7 @@ are not abstract."
 ;;; METHOD COMPLETION / DOC
 
 (defalias 'describe-method 'eieio-describe-generic)
-;;;###autoload
-(defalias 'describe-generic 'eieio-describe-generic)
+;;;###autoload(defalias 'describe-generic 'eieio-describe-generic)
 (defalias 'eieio-describe-method 'eieio-describe-generic)
 
 ;;;###autoload
index 257d052..a791635 100644 (file)
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc.
 
 ;; Author: Lennart Borgman (lennart O borgman A gmail O com)
-;; Author: Christian Ohler <ohler@gnu.org>
+;;         Christian Ohler <ohler@gnu.org>
 
 ;; This file is part of GNU Emacs.
 
index 2a12f03..5382e60 100644 (file)
@@ -1602,6 +1602,38 @@ to which that point should be aligned, if we were to reindent it.")
           (save-excursion (indent-line-to indent))
         (indent-line-to indent)))))
 
+(defun smie-auto-fill ()
+  (let ((fc (current-fill-column))
+        (try-again nil))
+    (while (and fc (> (current-column) fc))
+      (cond
+       ((not (or (nth 8 (save-excursion
+                          (syntax-ppss (line-beginning-position))))
+                 (nth 8 (syntax-ppss))))
+        (save-excursion
+          (beginning-of-line)
+          (smie-indent-forward-token)
+          (let ((bsf (point))
+                (gain 0)
+                curcol)
+            (while (<= (setq curcol (current-column)) fc)
+              ;; FIXME?  `smie-indent-calculate' can (and often will)
+              ;; return a result that actually depends on the presence/absence
+              ;; of a newline, so the gain computed here may not be accurate,
+              ;; but in practice it seems to works well enough.
+              (let* ((newcol (smie-indent-calculate))
+                     (newgain (- curcol newcol)))
+                (when (> newgain gain)
+                  (setq gain newgain)
+                  (setq bsf (point))))
+              (smie-indent-forward-token))
+            (when (> gain 0)
+              (setq try-again)
+              (goto-char bsf)
+              (newline-and-indent)))))
+       (t (do-auto-fill))))))
+
+
 (defun smie-setup (grammar rules-function &rest keywords)
   "Setup SMIE navigation and indentation.
 GRAMMAR is a grammar table generated by `smie-prec2->grammar'.
@@ -1612,6 +1644,7 @@ KEYWORDS are additional arguments, which can use the following keywords:
   (set (make-local-variable 'smie-rules-function) rules-function)
   (set (make-local-variable 'smie-grammar) grammar)
   (set (make-local-variable 'indent-line-function) 'smie-indent-line)
+  (set (make-local-variable 'normal-auto-fill-function) 'smie-auto-fill)
   (set (make-local-variable 'forward-sexp-function)
        'smie-forward-sexp-command)
   (while keywords
index 79e1243..1ee9d96 100644 (file)
@@ -1651,7 +1651,8 @@ terminals, cursor blinking is controlled by the terminal."
 \f
 ;; Misc.
 
-(defvaralias 'automatic-hscrolling 'auto-hscroll-mode)
+;; Only marked as obsolete in 24.2.
+(define-obsolete-variable-alias 'automatic-hscrolling 'auto-hscroll-mode "22.1")
 
 (make-variable-buffer-local 'show-trailing-whitespace)
 
index 23e800e..52f140d 100644 (file)
@@ -1,3 +1,7 @@
+2012-04-16  Glenn Morris  <rgm@gnu.org>
+
+       * nndraft.el (nndraft-request-list): Fix declaration.
+
 2012-04-14  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-msg.el (gnus-inews-insert-gcc): Don't do the alist stuff when we
index 1800d0c..da50720 100644 (file)
@@ -37,7 +37,8 @@
 (require 'mm-util)
 (eval-when-compile (require 'cl))
 
-(declare-function nndraft-request-list "nnmh" (&rest args))
+;; The nnoo-import at the end, I think.
+(declare-function nndraft-request-list "nndraft" (&rest args) t)
 
 (nnoo-declare nndraft
   nnmh)
index 4e76e5c..f355608 100644 (file)
@@ -1586,7 +1586,7 @@ messages to make sure it works as expected."
 
 
 ;; feedmail-buffer-to-binmail, feedmail-buffer-to-sendmail, and
-;; feedmail-buffer-to-smptmail are the only things provided for values
+;; feedmail-buffer-to-smtpmail are the only things provided for values
 ;; for the variable feedmail-buffer-eating-function.  It's pretty easy
 ;; to write your own, though.
 (defun feedmail-buffer-to-binmail (prepped errors-to addr-listoid)
index 2e11948..3344bbe 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mouse.el --- window system-independent mouse support
 
-;; Copyright (C) 1993-1995, 1999-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 1999-2012 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: hardware, mouse
@@ -805,8 +805,8 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
                                  (= click-count 1)))
         ;; Suppress automatic hscrolling, because that is a nuisance
         ;; when setting point near the right fringe (but see below).
-        (automatic-hscrolling-saved automatic-hscrolling)
-        (automatic-hscrolling nil)
+        (auto-hscroll-mode-saved auto-hscroll-mode)
+        (auto-hscroll-mode nil)
         event end end-point)
 
     (setq mouse-selection-click-count click-count)
@@ -838,7 +838,7 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
          ;; Automatic hscrolling did not occur during the call to
          ;; `read-event'; but if the user subsequently drags the
          ;; mouse, go ahead and hscroll.
-         (let ((automatic-hscrolling automatic-hscrolling-saved))
+         (let ((auto-hscroll-mode auto-hscroll-mode-saved))
            (redisplay))
          (setq end (event-end event)
                end-point (posn-point end))
index 614f2bd..d2203a4 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mpc.el --- A client for the Music Player Daemon   -*- coding: utf-8; lexical-binding: t -*-
 
-;; Copyright (C) 2006-2012  Free Software Foundation, Inc.
+;; Copyright (C) 2006-2012 Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
 ;; Keywords: multimedia
@@ -184,10 +184,7 @@ numerically rather than lexicographically."
                     (abs res))
                 res))))))))
 
-(defun mpc-string-prefix-p (str1 str2)
-  ;; FIXME: copied from pcvs-util.el.
-  "Tell whether STR1 is a prefix of STR2."
-  (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
+(define-obsolete-function-alias 'mpc-string-prefix-p 'string-prefix-p "24.2")
 
 ;; This can speed up mpc--song-search significantly.  The table may grow
 ;; very large, tho.  It's only bounded by the fact that it gets flushed
@@ -1690,7 +1687,7 @@ Return non-nil if a selection was deactivated."
         (process-put (mpc-proc) prop
                      (delq nil
                            (mapcar (lambda (x)
-                                     (if (mpc-string-prefix-p name x)
+                                     (if (string-prefix-p name x)
                                          nil x))
                                    new)))))
     (mpc-tagbrowser-refresh)))
index 37a76e0..0862427 100644 (file)
@@ -269,6 +269,19 @@ makes the comment easier to read.  Default is 1.  nil means 0."
   :type '(choice string integer (const nil))
   :group 'comment)
 
+(defcustom comment-inline-offset 1
+  "Inline comments have to be preceded by at least this many spaces.
+This is useful when style-conventions require a certain minimal offset.
+Python's PEP8 for example recommends two spaces, so you could do:
+
+\(add-hook 'python-mode-hook
+   (lambda () (set (make-local-variable 'comment-inline-offset) 2)))
+
+See `comment-padding' for whole-line comments."
+  :version "24.2"
+  :type 'integer
+  :group 'comment)
+
 ;;;###autoload
 (defcustom comment-multi-line nil
   "Non-nil means `comment-indent-new-line' continues comments.
@@ -587,7 +600,7 @@ Point is expected to be at the start of the comment."
                    (save-excursion (end-of-line) (current-column)))))
         (other nil)
         (min (save-excursion (skip-chars-backward " \t")
-                             (if (bolp) 0 (1+ (current-column))))))
+                             (if (bolp) 0 (+ comment-inline-offset (current-column))))))
     ;; Fix up the range.
     (if (< max min) (setq max min))
     ;; Don't move past the fill column.
@@ -687,7 +700,8 @@ If CONTINUE is non-nil, use the `comment-continue' markers if any."
          (save-excursion
            (skip-chars-backward " \t")
            (unless (bolp)
-             (setq indent (max indent (1+ (current-column))))))
+             (setq indent (max indent
+                                (+ (current-column) comment-inline-offset)))))
          ;; If that's different from comment's current position, change it.
          (unless (= (current-column) indent)
            (delete-region (point) (progn (skip-chars-backward " \t") (point)))
index 06bd962..cbf29a2 100644 (file)
@@ -96,6 +96,8 @@ of load, ENDMSG at the end."
   "Reads in the PHRASE-FILE, returns it as a vector of strings.
 Emit STARTMSG and ENDMSG before and after.  Caches the result; second
 and subsequent calls on the same file won't go to disk."
+  (or (file-readable-p phrase-file)
+      (error "Cannot read file `%s'" phrase-file))
   (let ((sym (intern-soft phrase-file cookie-cache)))
     (and sym (not (equal (symbol-function sym)
                         (nth 5 (file-attributes phrase-file))))
index fa32fdf..cb02a83 100644 (file)
@@ -1,6 +1,6 @@
 ;;; yow.el --- quote random zippyisms
 
-;; Copyright (C) 1993-1995, 2000-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Author: Richard Mlynarik
 ;;; Commentary:
 
 ;; Important pinheadery for GNU Emacs.
-;;
-;; See cookie1.el for implementation.  Note --- the `n' argument of yow
-;; from the 18.xx implementation is no longer; we only support *random*
-;; random access now.
 
 ;;; Code:
 
@@ -38,7 +34,7 @@
   :prefix "yow-"
   :group 'games)
 
-(defcustom yow-file (concat data-directory "yow.lines")
+(defcustom yow-file (expand-file-name "yow.lines" data-directory)
    "File containing pertinent pinhead phrases."
   :type 'file
   :group 'yow)
index aab5f8f..9df9943 100644 (file)
@@ -1,6 +1,6 @@
 ;;; perl-mode.el --- Perl code editing commands for GNU Emacs
 
-;; Copyright (C) 1990, 1994, 2001-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1994, 2001-2012 Free Software Foundation, Inc.
 
 ;; Author: William F. Mann
 ;; Maintainer: FSF
     map)
   "Keymap used in Perl mode.")
 
-(autoload 'c-macro-expand "cmacexp"
-  "Display the result of expanding all C macros occurring in the region.
-The expansion is entirely correct because it uses the C preprocessor."
-  t)
-
 (defvar perl-mode-syntax-table
   (let ((st (make-syntax-table (standard-syntax-table))))
     (modify-syntax-entry ?\n ">" st)
@@ -511,6 +506,14 @@ If nil, continued arguments are aligned with the first argument."
   :type '(choice integer (const nil))
   :group 'perl)
 
+(defcustom perl-indent-parens-as-block nil
+  "Non-nil means that non-block ()-, {}- and []-groups are indented as blocks.
+The closing bracket is aligned with the line of the opening bracket,
+not the contents of the brackets."
+  :version "24.2"
+  :type 'boolean
+  :group 'perl)
+
 (defcustom perl-tab-always-indent tab-always-indent
   "Non-nil means TAB in Perl mode always indents the current line.
 Otherwise it inserts a tab character if you type it past the first
@@ -853,7 +856,8 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'."
       (cond ((nth 3 state) 'noindent)  ; In a quoted string?
            ((null containing-sexp)     ; Line is at top level.
             (skip-chars-forward " \t\f")
-            (if (= (following-char) ?{)
+            (if (memq (following-char)
+                      (if perl-indent-parens-as-block '(?\{ ?\( ?\[) '(?\{)))
                 0  ; move to beginning of line if it starts a function body
               ;; indent a little if this is a continuation line
               (perl-backward-to-noncomment)
@@ -897,7 +901,9 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'."
                          0 perl-continued-statement-offset)
                      (current-column)
                      (if (save-excursion (goto-char indent-point)
-                                         (looking-at "[ \t]*{"))
+                                         (looking-at
+                                          (if perl-indent-parens-as-block
+                                              "[ \t]*[{(\[]" "[ \t]*{")))
                          perl-continued-brace-offset 0)))
               ;; This line starts a new statement.
               ;; Position at last unclosed open.
index 09b8999..6f8758e 100644 (file)
 (require 'comint)
 (require 'ansi-color)
 
-(eval-when-compile
-  (require 'compile)
-  (require 'hippie-exp))
-
-(autoload 'comint-mode "comint")
+(eval-when-compile (require 'compile))
 
 (defgroup python nil
   "Silly walks in the Python language."
@@ -1488,8 +1484,6 @@ Don't save anything for STR matching `inferior-python-filter-regexp'."
            res)
           (t (concat res s)))))
 
-(autoload 'comint-check-proc "comint")
-
 (defvar python-version-checked nil)
 (defun python-check-version (cmd)
   "Check that CMD runs a suitable version of Python."
@@ -1684,8 +1678,6 @@ value to determine defaults."
   "Caches (directory . file) pair used in the last `python-load-file' command.
 Used for determining the default in the next one.")
 
-(autoload 'comint-get-source "comint")
-
 (defun python-load-file (file-name)
   "Load a Python file FILE-NAME into the inferior Python process.
 If the file has extension `.py' import or reload it as a module.
index 058bc55..c82a639 100644 (file)
@@ -520,31 +520,27 @@ Creates the directory if necessary and makes sure:
     ;; Check that it's safe for use.
     (let* ((uid (nth 2 attrs))
           (w32 (eq system-type 'windows-nt))
-          (safe (catch :safe
-                  (unless (eq t (car attrs))   ; is a dir?
-                    (throw :safe nil))
-                  (when (and w32 (zerop uid))  ; on FAT32?
-                    (display-warning
-                     'server
-                     (format "Using `%s' to store Emacs-server authentication files.
+          (safe (cond
+                 ((not (eq t (car attrs))) nil)  ; is a dir?
+                 ((and w32 (zerop uid))          ; on FAT32?
+                  (display-warning
+                   'server
+                   (format "Using `%s' to store Emacs-server authentication files.
 Directories on FAT32 filesystems are NOT secure against tampering.
 See variable `server-auth-dir' for details."
-                             (file-name-as-directory dir))
-                     :warning)
-                    (throw :safe t))
-                  (unless (or (= uid (user-uid)) ; is the dir ours?
-                              (and w32
-                                   ;; Files created on Windows by
-                                   ;; Administrator (RID=500) have
-                                   ;; the Administrators (RID=544)
-                                   ;; group recorded as the owner.
-                                   (= uid 544) (= (user-uid) 500)))
-                    (throw :safe nil))
-                  (when w32                    ; on NTFS?
-                    (throw :safe t))
-                  (unless (zerop (logand ?\077 (file-modes dir)))
-                    (throw :safe nil))
-                  t)))
+                           (file-name-as-directory dir))
+                   :warning)
+                  t)
+                 ((and (/= uid (user-uid))       ; is the dir ours?
+                       (or (not w32)
+                           ;; Files created on Windows by Administrator
+                           ;; (RID=500) have the Administrators (RID=544)
+                           ;; group recorded as the owner.
+                           (/= uid 544) (/= (user-uid) 500)))
+                  nil)
+                 (w32 t)                         ; on NTFS?
+                 (t                              ; else, check permissions
+                  (zerop (logand ?\077 (file-modes dir)))))))
       (unless safe
        (error "The directory `%s' is unsafe" dir)))))
 
index 0638fc3..da18046 100644 (file)
@@ -282,6 +282,9 @@ default printer and then modify its output.")
       ses--numcols ses--numrows ses--symbolic-formulas
       ses--data-marker ses--params-marker (ses--Dijkstra-attempt-nb . 0)
       ses--Dijkstra-weight-bound
+      ;; This list is useful to speed-up clean-up of symbols when
+      ;; an area containing renamed cell is deleted.
+      ses--renamed-cell-symb-list
       ;; Global variables that we override
       mode-line-process next-line-add-newlines transient-mark-mode)
     "Buffer-local variables used by SES.")
@@ -674,6 +677,17 @@ for this spreadsheet."
        (put sym 'ses-cell (cons xrow xcol))
        (make-local-variable sym)))))
 
+(defun ses-create-cell-variable (sym row col)
+  "Create a buffer-local variable `SYM' for cell at position (ROW, COL).
+
+SYM is the symbol for that variable, ROW and COL are integers for
+row and column of the cell, with numbering starting from 0.
+
+Return nil in case of failure."
+  (unless (local-variable-p sym)
+    (make-local-variable  sym)
+    (put sym 'ses-cell (cons row col))))
+
 ;; We do not delete the ses-cell properties for the cell-variables, in
 ;; case a formula that refers to this cell is in the kill-ring and is
 ;; later pasted back in.
@@ -682,7 +696,10 @@ for this spreadsheet."
   (let (sym)
     (dotimes (row (1+ (- maxrow minrow)))
       (dotimes (col (1+ (- maxcol mincol)))
-       (setq sym (ses-create-cell-symbol (+ row minrow) (+ col mincol)))
+       (let ((xrow  (+ row minrow)) (xcol (+ col mincol)))
+         (setq sym (if (and (< xrow ses--numrows) (< xcol ses--numcols))
+                       (ses-cell-symbol xrow xcol)
+                       (ses-create-cell-symbol xrow xcol))))
        (if (boundp sym)
            (push `(apply ses-set-with-undo ,sym ,(symbol-value sym))
                  buffer-undo-list))
@@ -1400,7 +1417,8 @@ removed.  Example:
 Sets `ses-relocate-return' to 'delete if cell-references were removed."
   (let (rowcol result)
     (if (or (atom formula) (eq (car formula) 'quote))
-       (if (setq rowcol (ses-sym-rowcol formula))
+       (if (and (setq rowcol (ses-sym-rowcol formula))
+                (string-match "\\`[A-Z]+[0-9]+\\'" (symbol-name formula)))
            (ses-relocate-symbol formula rowcol
                                 startrow startcol rowincr colincr)
          formula) ; Pass through as-is.
@@ -1508,14 +1526,15 @@ if the range was altered."
 the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR
 to each symbol."
   (let (reform)
-    (let (mycell newval)
+    (let (mycell newval xrow)
       (dotimes-with-progress-reporter
          (row ses--numrows) "Relocating formulas..."
        (dotimes (col ses--numcols)
          (setq ses-relocate-return nil
                mycell (ses-get-cell row col)
                newval (ses-relocate-formula (ses-cell-formula mycell)
-                                            minrow mincol rowincr colincr))
+                                            minrow mincol rowincr colincr)
+               xrow  (- row rowincr))
          (ses-set-cell row col 'formula newval)
          (if (eq ses-relocate-return 'range)
              ;; This cell contains a (ses-range X Y) where a cell has been
@@ -1531,8 +1550,22 @@ to each symbol."
                                             minrow mincol rowincr colincr))
          (ses-set-cell row col 'references newval)
          (and (>= row minrow) (>= col mincol)
-              (ses-set-cell row col 'symbol
-                            (ses-create-cell-symbol row col))))))
+              (let ((sym (ses-cell-symbol row col))
+                    (xcol (- col colincr)))
+                (if (and
+                     sym
+                     (>= xrow 0)
+                     (>= xcol 0)
+                     (null (eq sym
+                               (ses-create-cell-symbol xrow xcol))))
+                    ;; This is a renamed cell, do not update the cell
+                    ;; name, but just update the coordinate property.
+                    (put sym 'ses-cell (cons row col))
+                  (ses-set-cell row col 'symbol
+                                (setq sym (ses-create-cell-symbol row col)))
+                  (unless (and (boundp sym) (local-variable-p sym))
+                    (set (make-local-variable sym) nil)
+                    (put sym 'ses-cell (cons row col)))))) )))
     ;; Relocate the cell values.
     (let (oldval myrow mycol xrow xcol)
       (cond
@@ -1545,11 +1578,17 @@ to each symbol."
            (setq mycol  (+ col mincol)
                  xrow   (- myrow rowincr)
                  xcol   (- mycol colincr))
-           (if (and (< xrow ses--numrows) (< xcol ses--numcols))
-               (setq oldval (ses-cell-value xrow xcol))
-             ;; Cell is off the end of the array.
-             (setq oldval (symbol-value (ses-create-cell-symbol xrow xcol))))
-           (ses-set-cell myrow mycol 'value oldval))))
+           (let ((sym (ses-cell-symbol myrow mycol))
+                 (xsym (ses-create-cell-symbol xrow xcol)))
+             ;; Make the value relocation only when if the cell is not
+             ;; a renamed cell.  Otherwise this is not needed.
+             (and (eq sym xsym)
+                 (ses-set-cell myrow mycol 'value
+                   (if (and (< xrow ses--numrows) (< xcol ses--numcols))
+                       (ses-cell-value xrow xcol)
+                     ;;Cell is off the end of the array
+                     (symbol-value xsym))))))))
+
        ((and (wholenump rowincr) (wholenump colincr))
        ;; Insertion of rows and/or columns.  Run the loop backwards.
        (let ((disty (1- ses--numrows))
@@ -1659,7 +1698,6 @@ Does not execute cell formulas or print functions."
        (message "Upgrading from SES-1 file format")))
     (or (= ses--file-format 2)
        (error "This file needs a newer version of the SES library code"))
-    (ses-create-cell-variable-range 0 (1- ses--numrows) 0 (1- ses--numcols))
     ;; Initialize cell array.
     (setq ses--cells (make-vector ses--numrows nil))
     (dotimes (row ses--numrows)
@@ -1679,11 +1717,10 @@ Does not execute cell formulas or print functions."
   (dotimes (row ses--numrows)
     (dotimes (col ses--numcols)
       (let* ((x      (read (current-buffer)))
-            (rowcol (ses-sym-rowcol (car-safe (cdr-safe x)))))
+            (sym  (car-safe (cdr-safe x))))
        (or (and (looking-at "\n")
                 (eq (car-safe x) 'ses-cell)
-                (eq row (car rowcol))
-                (eq col (cdr rowcol)))
+                (ses-create-cell-variable sym row col))
            (error "Cell-def error"))
        (eval x)))
     (or (looking-at "\n\n")
@@ -3140,6 +3177,63 @@ highlighted range in the spreadsheet."
   (mouse-set-point event)
   (ses-insert-ses-range))
 
+(defun ses-replace-name-in-formula (formula old-name new-name)
+  (let ((new-formula formula))
+    (unless (and (consp formula)
+                (eq (car-safe formula) 'quote))
+      (while formula
+       (let ((elt (car-safe formula)))
+         (cond
+          ((consp elt)
+           (setcar formula (ses-replace-name-in-formula elt old-name new-name)))
+          ((and (symbolp elt)
+                (eq (car-safe formula) old-name))
+           (setcar formula new-name))))
+       (setq formula (cdr formula))))
+    new-formula))
+
+(defun ses-rename-cell (new-name)
+  "Rename current cell."
+  (interactive "*SEnter new name: ")
+  (ses-check-curcell)
+  (or
+   (and  (local-variable-p new-name)
+        (ses-sym-rowcol new-name)
+        ;; this test is needed because ses-cell property of deleted cells
+        ;; is not deleted in case of subsequent undo
+        (memq new-name ses--renamed-cell-symb-list)
+        (error "Already a cell name"))
+   (and (boundp new-name)
+       (null (yes-or-no-p (format "`%S' is already bound outside this buffer, continue? "
+                                  new-name)))
+       (error "Already a bound cell name")))
+  (let* ((rowcol (ses-sym-rowcol ses--curcell))
+        (cell (ses-get-cell (car rowcol) (cdr rowcol))))
+    (put new-name 'ses-cell rowcol)
+    (dolist (reference (ses-cell-references (car rowcol) (cdr rowcol)))
+      (let* ((rowcol (ses-sym-rowcol reference))
+            (cell  (ses-get-cell (car rowcol) (cdr rowcol))))
+       (ses-cell-set-formula (car rowcol)
+                             (cdr rowcol)
+                             (ses-replace-name-in-formula
+                              (ses-cell-formula cell)
+                              ses--curcell
+                              new-name))))
+    (push new-name ses--renamed-cell-symb-list)
+    (set new-name (symbol-value ses--curcell))
+    (aset cell 0 new-name)
+    (put ses--curcell 'ses-cell nil)
+    (makunbound ses--curcell)
+    (setq ses--curcell new-name)
+    (let* ((pos (point))
+          (inhibit-read-only t)
+          (col (current-column))
+          (end (save-excursion
+                 (move-to-column (1+ col))
+                 (if (eolp)
+                     (+ pos (ses-col-width col) 1)
+                   (point)))))
+      (put-text-property pos end 'intangible new-name))) )
 
 ;;----------------------------------------------------------------------------
 ;; Checking formulas for safety
index bb1debb..9065d9e 100644 (file)
@@ -1,6 +1,6 @@
 ;;; speedbar --- quick access to files and tags in a frame
 
-;; Copyright (C) 1996-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1996-2012 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Keywords: file, tags, tools
@@ -1022,7 +1022,7 @@ supported at a time.
   (set (make-local-variable 'dframe-delete-frame-function)
        'speedbar-handle-delete-frame)
   ;; hscroll
-  (set (make-local-variable 'automatic-hscrolling) nil) ; Emacs 21
+  (set (make-local-variable 'auto-hscroll-mode) nil)
   ;; reset the selection variable
   (setq speedbar-last-selected-file nil))
 
index 3eb2be1..7c95f47 100644 (file)
@@ -549,6 +549,7 @@ MODE should be an integer which is a file mode value."
     (define-key map "R" 'tar-rename-entry)
     (define-key map "u" 'tar-unflag)
     (define-key map "v" 'tar-view)
+    (define-key map "w" 'woman-tar-extract-file)
     (define-key map "x" 'tar-expunge)
     (define-key map "\177" 'tar-unflag-backwards)
     (define-key map "E" 'tar-extract-other-window)
@@ -566,6 +567,8 @@ MODE should be an integer which is a file mode value."
     (define-key map [menu-bar immediate]
       (cons "Immediate" (make-sparse-keymap "Immediate")))
 
+    (define-key map [menu-bar immediate woman]
+      '("Read Man Page (WoMan)" . woman-tar-extract-file))
     (define-key map [menu-bar immediate view]
       '("View This File" . tar-view))
     (define-key map [menu-bar immediate display]
@@ -677,6 +680,8 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'.
      (fundamental-mode)
      (signal (car err) (cdr err)))))
 
+(autoload 'woman-tar-extract-file "woman"
+  "In tar mode, run the WoMan man-page browser on this file." t)
 
 (define-minor-mode tar-subfile-mode
   "Minor mode for editing an element of a tar-file.
index cfb1a2b..5382269 100644 (file)
@@ -574,12 +574,12 @@ re-start Emacs."
 
 
 (defvar ispell-dictionary-base-alist
-  '((nil
+  '((nil                                ; default
      ;; The default dictionary.  It may be English.aff, or any other
      ;; dictionary depending on locale and such things.  We should probably
      ;; ask ispell what dictionary it's using, but until we do that, let's
-     ;; just use an approximate regexp.
-     "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-B") nil iso-8859-1)
+     ;; just use a minimal regexp. [:alpha:] will later be set if possible.
+     "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
     ("american"                                ; Yankee English
      "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
     ("brasileiro"                      ; Brazilian mode
index 9e8cbb2..3e2ab78 100644 (file)
 
 ;; Picture Movement Commands
 
-;; When a cursor is on a wide-column character (e.g. Chinese,
-;; Japanese, Korean), this variable tells the desired current column
-;; which may be different from (current-column).
-(defvar picture-desired-column 0)
-
-;; If the value of picture-desired-column is far from the current
-;; column, or if the arg ADJUST-TO-CURRENT is non-nil, set it to the
-;; current column.   Return the current column.
+(defvar picture-desired-column 0
+  "Desired current column for Picture mode.
+When a cursor is on a wide-column character (e.g. Chinese,
+Japanese, Korean), this may may be different from `current-column'.")
+
+
 (defun picture-update-desired-column (adjust-to-current)
+  "Maybe update `picture-desired-column'.
+If the value of `picture-desired-column' is more than one column
+from `current-column', or if the argument ADJUST-TO-CURRENT is
+non-nil, set it to the current column.  Return `current-column'."
   (let ((current-column (current-column)))
     (if (or adjust-to-current
            (< picture-desired-column (1- current-column))
@@ -606,64 +608,61 @@ Leaves the region surrounding the rectangle."
 
 (defalias 'picture-delete-char 'delete-char)
 
-(defvar picture-mode-map nil)
-
-(defun picture-substitute (oldfun newfun)
-  (define-key picture-mode-map (vector 'remap oldfun) newfun))
-
-(if (not picture-mode-map)
-    (progn
-      (setq picture-mode-map (make-keymap))
-      (picture-substitute 'self-insert-command 'picture-self-insert)
-      (picture-substitute 'completion-separator-self-insert-command
-                         'picture-self-insert)
-      (picture-substitute 'completion-separator-self-insert-autofilling
-                         'picture-self-insert)
-      (picture-substitute 'forward-char 'picture-forward-column)
-      (picture-substitute 'backward-char 'picture-backward-column)
-      (picture-substitute 'delete-char 'picture-clear-column)
-      ;; There are two possibilities for what is normally on DEL.
-      (picture-substitute 'backward-delete-char-untabify 'picture-backward-clear-column)
-      (picture-substitute 'delete-backward-char 'picture-backward-clear-column)
-      (picture-substitute 'kill-line 'picture-clear-line)
-      (picture-substitute 'open-line 'picture-open-line)
-      (picture-substitute 'newline 'picture-newline)
-      (picture-substitute 'newline-and-indent 'picture-duplicate-line)
-      (picture-substitute 'next-line 'picture-move-down)
-      (picture-substitute 'previous-line 'picture-move-up)
-      (picture-substitute 'move-beginning-of-line 'picture-beginning-of-line)
-      (picture-substitute 'move-end-of-line 'picture-end-of-line)
-      (picture-substitute 'mouse-set-point 'picture-mouse-set-point)
-
-      (define-key picture-mode-map "\C-c\C-d" 'picture-delete-char)
-      (define-key picture-mode-map "\e\t" 'picture-toggle-tab-state)
-      (define-key picture-mode-map "\t" 'picture-tab)
-      (define-key picture-mode-map "\e\t" 'picture-tab-search)
-      (define-key picture-mode-map "\C-c\t" 'picture-set-tab-stops)
-      (define-key picture-mode-map "\C-c\C-k" 'picture-clear-rectangle)
-      (define-key picture-mode-map "\C-c\C-w" 'picture-clear-rectangle-to-register)
-      (define-key picture-mode-map "\C-c\C-y" 'picture-yank-rectangle)
-      (define-key picture-mode-map "\C-c\C-x" 'picture-yank-rectangle-from-register)
-      (define-key picture-mode-map "\C-c\C-r" 'picture-draw-rectangle)
-      (define-key picture-mode-map "\C-c\C-c" 'picture-mode-exit)
-      (define-key picture-mode-map "\C-c\C-f" 'picture-motion)
-      (define-key picture-mode-map "\C-c\C-b" 'picture-motion-reverse)
-      (define-key picture-mode-map "\C-c<" 'picture-movement-left)
-      (define-key picture-mode-map "\C-c>" 'picture-movement-right)
-      (define-key picture-mode-map "\C-c^" 'picture-movement-up)
-      (define-key picture-mode-map "\C-c." 'picture-movement-down)
-      (define-key picture-mode-map "\C-c`" 'picture-movement-nw)
-      (define-key picture-mode-map "\C-c'" 'picture-movement-ne)
-      (define-key picture-mode-map "\C-c/" 'picture-movement-sw)
-      (define-key picture-mode-map "\C-c\\" 'picture-movement-se)
-      (define-key picture-mode-map [(control ?c) left]  'picture-movement-left)
-      (define-key picture-mode-map [(control ?c) right] 'picture-movement-right)
-      (define-key picture-mode-map [(control ?c) up]    'picture-movement-up)
-      (define-key picture-mode-map [(control ?c) down]  'picture-movement-down)
-      (define-key picture-mode-map [(control ?c) home]  'picture-movement-nw)
-      (define-key picture-mode-map [(control ?c) prior] 'picture-movement-ne)
-      (define-key picture-mode-map [(control ?c) end]   'picture-movement-sw)
-      (define-key picture-mode-map [(control ?c) next]  'picture-movement-se)))
+(defvar picture-mode-map
+  (let ((map (make-keymap)))
+    (define-key map [remap self-insert-command] 'picture-self-insert)
+    (define-key map [remap self-insert-command] 'picture-self-insert)
+    (define-key map [remap completion-separator-self-insert-command]
+      'picture-self-insert)
+    (define-key map [remap completion-separator-self-insert-autofilling]
+      'picture-self-insert)
+    (define-key map [remap forward-char] 'picture-forward-column)
+    (define-key map [remap backward-char] 'picture-backward-column)
+    (define-key map [remap delete-char] 'picture-clear-column)
+    ;; There are two possibilities for what is normally on DEL.
+    (define-key map [remap backward-delete-char-untabify]
+      'picture-backward-clear-column)
+    (define-key map [remap delete-backward-char] 'picture-backward-clear-column)
+    (define-key map [remap kill-line] 'picture-clear-line)
+    (define-key map [remap open-line] 'picture-open-line)
+    (define-key map [remap newline] 'picture-newline)
+    (define-key map [remap newline-and-indent] 'picture-duplicate-line)
+    (define-key map [remap next-line] 'picture-move-down)
+    (define-key map [remap previous-line] 'picture-move-up)
+    (define-key map [remap move-beginning-of-line] 'picture-beginning-of-line)
+    (define-key map [remap move-end-of-line] 'picture-end-of-line)
+    (define-key map [remap mouse-set-point] 'picture-mouse-set-point)
+    (define-key map "\C-c\C-d" 'picture-delete-char)
+    (define-key map "\e\t" 'picture-toggle-tab-state)
+    (define-key map "\t" 'picture-tab)
+    (define-key map "\e\t" 'picture-tab-search)
+    (define-key map "\C-c\t" 'picture-set-tab-stops)
+    (define-key map "\C-c\C-k" 'picture-clear-rectangle)
+    (define-key map "\C-c\C-w" 'picture-clear-rectangle-to-register)
+    (define-key map "\C-c\C-y" 'picture-yank-rectangle)
+    (define-key map "\C-c\C-x" 'picture-yank-rectangle-from-register)
+    (define-key map "\C-c\C-r" 'picture-draw-rectangle)
+    (define-key map "\C-c\C-c" 'picture-mode-exit)
+    (define-key map "\C-c\C-f" 'picture-motion)
+    (define-key map "\C-c\C-b" 'picture-motion-reverse)
+    (define-key map "\C-c<" 'picture-movement-left)
+    (define-key map "\C-c>" 'picture-movement-right)
+    (define-key map "\C-c^" 'picture-movement-up)
+    (define-key map "\C-c." 'picture-movement-down)
+    (define-key map "\C-c`" 'picture-movement-nw)
+    (define-key map "\C-c'" 'picture-movement-ne)
+    (define-key map "\C-c/" 'picture-movement-sw)
+    (define-key map "\C-c\\" 'picture-movement-se)
+    (define-key map [(control ?c) left]  'picture-movement-left)
+    (define-key map [(control ?c) right] 'picture-movement-right)
+    (define-key map [(control ?c) up]    'picture-movement-up)
+    (define-key map [(control ?c) down]  'picture-movement-down)
+    (define-key map [(control ?c) home]  'picture-movement-nw)
+    (define-key map [(control ?c) prior] 'picture-movement-ne)
+    (define-key map [(control ?c) end]   'picture-movement-sw)
+    (define-key map [(control ?c) next]  'picture-movement-se)
+    map)
+  "Keymap used in `picture-mode'.")
 
 (defcustom picture-mode-hook nil
   "If non-nil, its value is called on entry to Picture mode.
index 9472d7d..af00531 100644 (file)
@@ -1492,8 +1492,8 @@ Puts point on a blank line between them."
 
 (defvar latex-complete-bibtex-cache nil)
 
-(defun latex-string-prefix-p (str1 str2)
-  (eq t (compare-strings str1 nil nil str2 0 (length str1))))
+(define-obsolete-function-alias 'latex-string-prefix-p
+  'string-prefix-p "24.2")
 
 (defvar bibtex-reference-key)
 (declare-function reftex-get-bibfile-list "reftex-cite.el" ())
@@ -1507,7 +1507,7 @@ Puts point on a blank line between them."
             keys)
         (if (and (eq (car latex-complete-bibtex-cache)
                      (reftex-get-bibfile-list))
-                 (latex-string-prefix-p (nth 1 latex-complete-bibtex-cache)
+                 (string-prefix-p (nth 1 latex-complete-bibtex-cache)
                                         key))
             ;; Use the cache.
             (setq keys (nth 2 latex-complete-bibtex-cache))
@@ -2051,10 +2051,7 @@ IN can be either a string (with the same % escapes in it) indicating
 OUT describes the output file and is either a %-escaped string
   or nil to indicate that there is no output file.")
 
-;; defsubst* gives better byte-code than defsubst.
-(defsubst* tex-string-prefix-p (str1 str2)
-  "Return non-nil if STR1 is a prefix of STR2"
-  (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
+(define-obsolete-function-alias 'tex-string-prefix-p 'string-prefix-p "24.2")
 
 (defun tex-guess-main-file (&optional all)
   "Find a likely `tex-main-file'.
@@ -2069,7 +2066,7 @@ of the current buffer."
        (with-current-buffer buf
          (when (and (cond
                      ((null all) (equal dir default-directory))
-                     ((eq all 'sub) (tex-string-prefix-p default-directory dir))
+                     ((eq all 'sub) (string-prefix-p default-directory dir))
                      (t))
                     (stringp tex-main-file))
            (throw 'found (expand-file-name tex-main-file)))))
@@ -2078,7 +2075,7 @@ of the current buffer."
        (with-current-buffer buf
          (when (and (cond
                      ((null all) (equal dir default-directory))
-                     ((eq all 'sub) (tex-string-prefix-p default-directory dir))
+                     ((eq all 'sub) (string-prefix-p default-directory dir))
                      (t))
                     buffer-file-name
                     ;; (or (easy-mmode-derived-mode-p 'latex-mode)
index 40cbbc5..8a4fe4f 100644 (file)
 
 
 ;;; Code:
-\f
+(defgroup two-column nil
+  "Minor mode for editing of two-column text."
+  :prefix "2C-"
+  :group 'frames)
+
+(defcustom 2C-mode-line-format
+       '("-%*- %15b --"  (-3 . "%p")  "--%[("  mode-name
+         minor-mode-alist  "%n"  mode-line-process  ")%]%-")
+  "Value of `mode-line-format' for a buffer in two-column minor mode."
+  :type 'sexp
+  :group 'two-column)
+
+(defcustom 2C-other-buffer-hook 'text-mode
+  "Hook run in new buffer when it is associated with current one."
+  :type 'function
+  :group 'two-column)
 
-;; Lucid patch
-(or (fboundp 'frame-width)
-    (fset 'frame-width 'screen-width))
+(defcustom 2C-separator ""
+  "A string inserted between the two columns when merging.
+This gets set locally by \\[2C-split]."
+  :type 'string
+  :group 'two-column)
+(put '2C-separator 'permanent-local t)
+
+(defcustom 2C-window-width 40
+  "The width of the first column.  (Must be at least `window-min-width'.)
+This value is local for every buffer that sets it."
+  :type 'integer
+  :group 'two-column)
+(make-variable-buffer-local '2C-window-width)
+(put '2C-window-width 'permanent-local t)
 
+(defcustom 2C-beyond-fill-column 4
+  "Base for calculating `fill-column' for a buffer in two-column minor mode.
+The value of `fill-column' becomes `2C-window-width' for this buffer
+minus this value."
+  :type 'integer
+  :group 'two-column)
 
-;;;;; Set up keymap ;;;;;
+(defcustom 2C-autoscroll t
+  "If non-nil, Emacs attempts to keep the two column's buffers aligned."
+  :type 'boolean
+  :group 'two-column)
 
+\f
 (defvar 2C-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map "2" '2C-two-columns)
     map)
   "Keymap for commands for setting up two-column mode.")
 
-
-
 ;;;###autoload (autoload '2C-command "two-column" () t 'keymap)
 (fset '2C-command 2C-mode-map)
 
 
 ;;;###autoload (global-set-key [f2] '2C-command)
 
-
 (defvar 2C-minor-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map "1" '2C-merge)
     map)
   "Keymap for commands for use in two-column mode.")
 
-
 (setq minor-mode-map-alist
       (cons (cons '2C-mode
                  (let ((map (make-sparse-keymap)))
                                               map (current-global-map))
                    map))
            minor-mode-map-alist))
-\f
-;;;;; variable declarations ;;;;;
-
-(defgroup two-column nil
-  "Minor mode for editing of two-column text."
-  :prefix "2C-"
-  :group 'frames)
-
 
+\f
 ;; Markers seem to be the only buffer-id not affected by renaming a buffer.
 ;; This nevertheless loses when a buffer is killed.  The variable-name is
 ;; required by `describe-mode'.
 (make-variable-buffer-local '2C-mode)
 (put '2C-mode 'permanent-local t)
 
-
-
 (setq minor-mode-alist (cons '(2C-mode " 2C") minor-mode-alist))
 
-
-
-;; rearranged, so that the pertinent info will show in 40 columns
-(defcustom 2C-mode-line-format
-       '("-%*- %15b --"  (-3 . "%p")  "--%[("  mode-name
-         minor-mode-alist  "%n"  mode-line-process  ")%]%-")
-  "Value of `mode-line-format' for a buffer in two-column minor mode."
-  :type 'sexp
-  :group 'two-column)
-
-
-(defcustom 2C-other-buffer-hook 'text-mode
-  "Hook run in new buffer when it is associated with current one."
-  :type 'function
-  :group 'two-column)
-
-
-(defcustom 2C-separator ""
-  "A string inserted between the two columns when merging.
-This gets set locally by \\[2C-split]."
-  :type 'string
-  :group 'two-column)
-(put '2C-separator 'permanent-local t)
-
-
-
-(defcustom 2C-window-width 40
-  "The width of the first column.  (Must be at least `window-min-width')
-This value is local for every buffer that sets it."
-  :type 'integer
-  :group 'two-column)
-(make-variable-buffer-local '2C-window-width)
-(put '2C-window-width 'permanent-local t)
-
-
-
-(defcustom 2C-beyond-fill-column 4
-  "Base for calculating `fill-column' for a buffer in two-column minor mode.
-The value of `fill-column' becomes `2C-window-width' for this buffer
-minus this value."
-  :type 'integer
-  :group 'two-column)
-
-
-
-(defcustom 2C-autoscroll t
-  "If non-nil, Emacs attempts to keep the two column's buffers aligned."
-  :type 'boolean
-  :group 'two-column)
-
-
-
 (defvar 2C-autoscroll-start nil)
 (make-variable-buffer-local '2C-autoscroll-start)
 \f
@@ -276,7 +247,6 @@ minus this value."
       (if req (error "You must first set two-column minor mode"))))
 
 
-
 ;; function for setting up two-column minor mode in a buffer associated
 ;; with the buffer pointed to by the marker other.
 (defun 2C-mode (other)
@@ -320,7 +290,6 @@ The appearance of the screen can be customized by the variables
   (run-hooks '2C-mode-hook))
 
 
-
 ;;;###autoload
 (defun 2C-two-columns (&optional buffer)
   "Split current window vertically for two-column editing.
@@ -356,7 +325,6 @@ first and the associated buffer to its right."
               (other-window -1)))))
 
 
-
 ;;;###autoload
 (defun 2C-associate-buffer ()
   "Associate another buffer with this one in two-column minor mode.
@@ -368,9 +336,8 @@ accepting the proposed default buffer.
   (let ((b1 (current-buffer))
        (b2 (or (2C-other)
                (read-buffer "Associate buffer: " (other-buffer)))))
-    (save-excursion
-      (setq 2C-mode nil)
-      (set-buffer b2)
+    (setq 2C-mode nil)
+    (with-current-buffer b2
       (and (2C-other)
           (not (eq b1 (2C-other)))
           (error "Buffer already associated with buffer `%s'"
@@ -382,7 +349,6 @@ accepting the proposed default buffer.
     (2C-two-columns b2)))
 
 
-
 ;;;###autoload
 (defun 2C-split (arg)
   "Split a two-column text at point, into two buffers in two-column minor mode.
@@ -454,32 +420,28 @@ First column's text    sSs  Second column's text
        (move-to-column column)))))
 
 
-
-
 (defun 2C-dissociate ()
   "Turn off two-column minor mode in current and associated buffer.
 If the associated buffer is unmodified and empty, it is killed."
   (interactive)
-  (let ((buffer (current-buffer)))
-    (save-excursion
-      (and (2C-other)
-          (set-buffer (2C-other))
-          (or (not (2C-other))
-              (eq buffer (2C-other)))
-          (if (and (not (buffer-modified-p))
-                   (eobp) (bobp))
-              (kill-buffer nil)
-            (kill-local-variable '2C-mode)
-            (kill-local-variable '2C-window-width)
-            (kill-local-variable '2C-separator)
-            (kill-local-variable 'mode-line-format)
-            (kill-local-variable 'fill-column))))
-    (kill-local-variable '2C-mode)
-    (kill-local-variable '2C-window-width)
-    (kill-local-variable '2C-separator)
-    (kill-local-variable 'mode-line-format)
-    (kill-local-variable 'fill-column)))
-
+  (let ((buffer (current-buffer))
+       (other (2C-other)))
+    (if other
+       (with-current-buffer other
+         (when (or (not (2C-other)) (eq buffer (2C-other)))
+           (if (and (not (buffer-modified-p)) (zerop (buffer-size)))
+               (kill-buffer)
+             (kill-local-variable '2C-mode)
+             (kill-local-variable '2C-window-width)
+             (kill-local-variable '2C-separator)
+             (kill-local-variable 'mode-line-format)
+             (kill-local-variable 'fill-column))))))
+  (kill-local-variable '2C-mode)
+  (kill-local-variable '2C-window-width)
+  (kill-local-variable '2C-separator)
+  (kill-local-variable 'mode-line-format)
+  (kill-local-variable 'fill-column)
+  (force-mode-line-update))
 
 
 ;; this doesn't use yank-rectangle, so that the first column can
@@ -578,7 +540,6 @@ on, this also realigns the two buffers."
     (message "Autoscrolling is off.")))
 
 
-
 (defun 2C-autoscroll ()
   (if 2C-autoscroll
       ;; catch a mouse scroll on non-selected scrollbar
@@ -590,27 +551,25 @@ on, this also realigns the two buffers."
              (select-window (car (car (cdr last-command-event)))))
         ;; In some cases scrolling causes an error, but post-command-hook
         ;; shouldn't, and should always stay in the original window
-        (condition-case ()
-            (and (or 2C-autoscroll-start (2C-toggle-autoscroll t) nil)
-                 (/= (window-start) 2C-autoscroll-start)
-                 (2C-other)
-                 (get-buffer-window (2C-other))
-                 (let ((lines (count-lines (window-start)
-                                           2C-autoscroll-start)))
-                   (if (< (window-start) 2C-autoscroll-start)
-                       (setq lines (- lines)))
-                   (setq 2C-autoscroll-start (window-start))
-                   (select-window (get-buffer-window (2C-other)))
-                   ;; make sure that other buffer has enough lines
-                   (save-excursion
-                     (insert-char
-                      ?\n (- lines (count-lines (window-start)
-                                                (goto-char (point-max)))
-                             -1)))
-                   (scroll-up lines)
-                   (setq 2C-autoscroll-start (window-start))))
-          (error))))))
-
+        (ignore-errors
+          (and (or 2C-autoscroll-start (2C-toggle-autoscroll t) nil)
+               (/= (window-start) 2C-autoscroll-start)
+               (2C-other)
+               (get-buffer-window (2C-other))
+               (let ((lines (count-lines (window-start)
+                                         2C-autoscroll-start)))
+                 (if (< (window-start) 2C-autoscroll-start)
+                     (setq lines (- lines)))
+                 (setq 2C-autoscroll-start (window-start))
+                 (select-window (get-buffer-window (2C-other)))
+                 ;; make sure that other buffer has enough lines
+                 (save-excursion
+                   (insert-char
+                    ?\n (- lines (count-lines (window-start)
+                                              (goto-char (point-max)))
+                           -1)))
+                 (scroll-up lines)
+                 (setq 2C-autoscroll-start (window-start)))))))))
 
 
 (defun 2C-enlarge-window-horizontally (arg)
@@ -628,7 +587,6 @@ on, this also realigns the two buffers."
   (2C-enlarge-window-horizontally (- arg)))
 
 
-
 (provide 'two-column)
 
 ;;; two-column.el ends here
index b300247..a3c525c 100644 (file)
@@ -182,9 +182,7 @@ arguments.  If ARGS is not a list, no argument will be passed."
                          (if oneline (line-end-position) (point-max))))
     (file-error nil)))
 
-(defun cvs-string-prefix-p (str1 str2)
-  "Tell whether STR1 is a prefix of STR2."
-  (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
+(define-obsolete-function-alias 'cvs-string-prefix-p 'string-prefix-p "24.2")
 
 ;;;;
 ;;;; file names
index 9ba65cd..6aec247 100644 (file)
@@ -432,8 +432,8 @@ If non-nil, NEW means to create a new buffer no matter what."
                         (case cvs-reuse-cvs-buffer
                           (always t)
                           (subdir
-                           (or (cvs-string-prefix-p default-directory dir)
-                               (cvs-string-prefix-p dir default-directory)))
+                           (or (string-prefix-p default-directory dir)
+                               (string-prefix-p dir default-directory)))
                           (samedir (string= default-directory dir)))
                         (return buffer)))))
              ;; we really have to create a new buffer:
@@ -887,7 +887,7 @@ RM-MSGS if non-nil means remove messages."
                        (eq (cvs-fileinfo->type last-fi) 'DIRCHANGE)
                        (not (when first-dir (setq first-dir nil) t))
                        (or (eq rm-dirs 'all)
-                           (not (cvs-string-prefix-p
+                           (not (string-prefix-p
                                  (cvs-fileinfo->dir last-fi)
                                  (cvs-fileinfo->dir fi)))
                            (and (eq type 'DIRCHANGE) (eq rm-dirs 'empty))
@@ -1839,7 +1839,7 @@ Signal an error if there is no backup file."
     (setq buffer-file-name (expand-file-name buffer-file-name))
     (let (ret)
       (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." ""))))
-       (when (cvs-string-prefix-p
+       (when (string-prefix-p
               (expand-file-name (cvs-fileinfo->full-name fi) dir)
               buffer-file-name)
          (setq ret t)))
@@ -2261,7 +2261,7 @@ With prefix argument, prompt for cvs flags."
 (defun cvs-dir-member-p (fileinfo dir)
   "Return true if FILEINFO represents a file in directory DIR."
   (and (not (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE))
-       (cvs-string-prefix-p dir (cvs-fileinfo->dir fileinfo))))
+       (string-prefix-p dir (cvs-fileinfo->dir fileinfo))))
 
 (defun cvs-execute-single-file (fi extractor program constant-args)
   "Internal function for `cvs-execute-single-file-list'."
@@ -2392,7 +2392,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'."
          (set-buffer cvs-buf)
          ;; look for a corresponding pcl-cvs buffer
          (when (and (eq major-mode 'cvs-mode)
-                    (cvs-string-prefix-p default-directory dir))
+                    (string-prefix-p default-directory dir))
            (let ((subdir (substring dir (length default-directory))))
              (set-buffer buffer)
              (set (make-local-variable 'cvs-buffer) cvs-buf)
@@ -2423,7 +2423,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'."
          (set-buffer cvs-buf)
          ;; look for a corresponding pcl-cvs buffer
          (when (and (eq major-mode 'cvs-mode)
-                    (cvs-string-prefix-p default-directory file))
+                    (string-prefix-p default-directory file))
            (let* ((file (substring file (length default-directory)))
                   (fi (cvs-create-fileinfo
                        (if (string= "0" version)
index 33611b4..4c32eea 100644 (file)
@@ -1,6 +1,6 @@
 ;;; vc-dir.el --- Directory status display under VC
 
-;; Copyright (C) 2007-2012  Free Software Foundation, Inc.
+;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
 
 ;; Author:   Dan Nicolaescu <dann@ics.uci.edu>
 ;; Keywords: vc tools
@@ -556,7 +556,7 @@ If a prefix argument is given, move by that many lines."
       (let ((data (ewoc-data crt))
            (dir (vc-dir-node-directory crt)))
        (and (vc-dir-fileinfo->directory data)
-            (vc-string-prefix-p dir argdir)
+            (string-prefix-p dir argdir)
             (vc-dir-fileinfo->marked data)
             (setq found data))))
     found))
@@ -818,7 +818,7 @@ child files."
                       data)
                  (while
                      (and (setq crt (ewoc-next vc-ewoc crt))
-                          (vc-string-prefix-p dir
+                          (string-prefix-p dir
                                                (progn
                                                  (setq data (ewoc-data crt))
                                                  (vc-dir-node-directory crt))))
@@ -846,7 +846,7 @@ If it is a file, return the corresponding cons for the file itself."
               data)
          (while
              (and (setq crt (ewoc-next vc-ewoc crt))
-                   (vc-string-prefix-p dir (progn
+                   (string-prefix-p dir (progn
                                              (setq data (ewoc-data crt))
                                              (vc-dir-node-directory crt))))
            (unless (vc-dir-fileinfo->directory data)
@@ -878,10 +878,10 @@ If it is a file, return the corresponding cons for the file itself."
        children
        dname)
     ;; Find DIR
-    (while (and crt (not (vc-string-prefix-p
+    (while (and crt (not (string-prefix-p
                          dirname (vc-dir-node-directory crt))))
       (setq crt (ewoc-next vc-ewoc crt)))
-    (while (and crt (vc-string-prefix-p
+    (while (and crt (string-prefix-p
                     dirname
                     (setq dname (vc-dir-node-directory crt))))
       (let ((data (ewoc-data crt)))
@@ -915,7 +915,7 @@ If it is a file, return the corresponding cons for the file itself."
           (if (not (derived-mode-p 'vc-dir-mode))
               (push status-buf drop)
             (let ((ddir default-directory))
-              (when (vc-string-prefix-p ddir file)
+              (when (string-prefix-p ddir file)
                 (if (file-directory-p file)
                    (progn
                      (vc-dir-resync-directory-files file)
index ec1b127..95c1503 100644 (file)
@@ -537,13 +537,12 @@ editing!"
         (kill-buffer (current-buffer)))))
 
 (declare-function vc-dir-resynch-file "vc-dir" (&optional fname))
-(declare-function vc-string-prefix-p "vc" (prefix string))
 
 (defun vc-resynch-buffers-in-directory (directory &optional keep noquery reset-vc-info)
   "Resync all buffers that visit files in DIRECTORY."
   (dolist (buffer (buffer-list))
     (let ((fname (buffer-file-name buffer)))
-      (when (and fname (vc-string-prefix-p directory fname))
+      (when (and fname (string-prefix-p directory fname))
        (with-current-buffer buffer
          (vc-resynch-buffer fname keep noquery reset-vc-info))))))
 
index 52e8051..a272826 100644 (file)
@@ -3,6 +3,7 @@
 ;; Copyright (C) 2006-2012 Free Software Foundation, Inc.
 
 ;; Author: Ivan Kanis
+;; Maintainer: FSF
 ;; Keywords: vc tools
 ;; Package: vc
 
index 4cbbf47..ab7e587 100644 (file)
@@ -1,6 +1,6 @@
 ;;; vc.el --- drive a version-control system from within Emacs
 
-;; Copyright (C) 1992-1998, 2000-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc.
 
 ;; Author:     FSF (see below for full credits)
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
@@ -847,7 +847,7 @@ been updated to their corresponding values."
        (if (file-directory-p file)
           (dolist (buffer (buffer-list))
             (let ((fname (buffer-file-name buffer)))
-              (when (and fname (vc-string-prefix-p file fname))
+              (when (and fname (string-prefix-p file fname))
                 (push fname flist))))
         (push file flist)))
      ,form
@@ -900,7 +900,7 @@ use."
               (lambda (arg)
                 (message "arg %s" arg)
                 (and (file-directory-p arg)
-                     (vc-string-prefix-p (expand-file-name arg) def-dir)))))))
+                     (string-prefix-p (expand-file-name arg) def-dir)))))))
           (let ((default-directory repo-dir))
        (vc-call-backend bk 'create-repo))
       (throw 'found bk))))
@@ -2809,11 +2809,7 @@ to provide the `find-revision' operation instead."
 \f
 
 ;; These things should probably be generally available
-
-(defun vc-string-prefix-p (prefix string)
-  (let ((lpref (length prefix)))
-    (and (>= (length string) lpref)
-        (eq t (compare-strings prefix nil nil string nil lpref)))))
+(define-obsolete-function-alias 'vc-string-prefix-p 'string-prefix-p "24.2")
 
 (defun vc-file-tree-walk (dirname func &rest args)
   "Walk recursively through DIRNAME.
index c76399a..98ab277 100644 (file)
@@ -1,6 +1,6 @@
 ;;; woman.el --- browse UN*X manual pages `wo (without) man'
 
-;; Copyright (C) 2000-2012  Free Software Foundation, Inc.
+;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
 
 ;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk>
 ;; Maintainer: FSF
@@ -1595,14 +1595,6 @@ Also make each path-info component into a list.
       (woman-process-buffer)
       (goto-char (point-min)))))
 
-;; There is currently no `tar-mode-hook' so use ...
-(eval-after-load "tar-mode"
-  '(progn
-    (define-key tar-mode-map "w" 'woman-tar-extract-file)
-    (define-key-after (lookup-key tar-mode-map [menu-bar immediate])
-      [woman] '("Read Man Page (WoMan)" . woman-tar-extract-file) 'view)))
-
-
 (defvar woman-last-file-name nil
   "The full pathname of the last file formatted by WoMan.")
 
index 85b69f4..f6ffede 100644 (file)
@@ -1,4 +1,4 @@
-2012-04-14  Paul Eggert  <eggert@cs.ucla.edu>
+2012-04-17  Paul Eggert  <eggert@cs.ucla.edu>
 
        configure: new option --enable-gcc-warnings (Bug#11207)
        * Makefile.in (C_WARNINGS_SWITCH): Remove.
index fa7dc23..bf3a11d 100644 (file)
@@ -1,4 +1,4 @@
-2012-04-14  Paul Eggert  <eggert@cs.ucla.edu>
+2012-04-17  Paul Eggert  <eggert@cs.ucla.edu>
 
        configure: new option --enable-gcc-warnings (Bug#11207)
        * sed1v2.inp, sed3v2.inp, sedlibmk.inp: GNULIB_WARN_CFLAGS,
index a76ea61..243899e 100644 (file)
@@ -1,4 +1,4 @@
-2012-04-14  Paul Eggert  <eggert@cs.ucla.edu>
+2012-04-17  Paul Eggert  <eggert@cs.ucla.edu>
 
        configure: new option --enable-gcc-warnings (Bug#11207)
        * Makefile.in (C_WARNINGS_SWITCH): Remove.
index 7362bf4..78fa3b5 100644 (file)
@@ -1,3 +1,25 @@
+2012-04-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       configure: new option --enable-gcc-warnings (Bug#11207)
+       * Makefile.in (C_WARNINGS_SWITCH): Remove.
+       (WARN_CFLAGS, WERROR_CFLAGS): New macros.
+       (ALL_CFLAGS): Use new macros rather than old.
+       * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
+       * regex.c: Ignore -Wstrict-overflow.  If !emacs, also ignore
+       -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
+       -Wunused-result, -Wunused-variable.  This should go away once
+       the Emacs and Gnulib regex code is merged.
+       (xmalloc, xrealloc): Now static.
+
+2012-04-17  Glenn Morris  <rgm@gnu.org>
+
+       * dired.c (Fsystem_users): Doc fix.
+
+2012-04-17  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * dired.c (Fsystem_users, Fsystem_groups): New functions.  (Bug#7900)
+       (syms_of_dired): Add them.
+
 2012-04-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix minor alloc.c problems found by static checking.
        aligned_Lisp_Misc instead of union Lisp_Misc.
        (Fmake_symbol, allocate_misc, gc_sweep): Adjust
 
-2012-04-14  Paul Eggert  <eggert@cs.ucla.edu>
-
-       configure: new option --enable-gcc-warnings (Bug#11207)
-       * Makefile.in (C_WARNINGS_SWITCH): Remove.
-       (WARN_CFLAGS, WERROR_CFLAGS): New macros.
-       (ALL_CFLAGS): Use new macros rather than old.
-       * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
-       * regex.c: Ignore -Wstrict-overflow.  If !emacs, also ignore
-       -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
-       -Wunused-result, -Wunused-variable.  This should go away once
-       the Emacs and Gnulib regex code is merged.
-       (xmalloc, xrealloc): Now static.
-
 2012-04-14  Paul Eggert  <eggert@cs.ucla.edu>
 
        Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
index 9b0f94a..eeae59d 100644 (file)
@@ -1015,6 +1015,46 @@ Comparison is in lexicographic order and case is significant.  */)
   return Fstring_lessp (Fcar (f1), Fcar (f2));
 }
 \f
+
+DEFUN ("system-users", Fsystem_users, Ssystem_users, 0, 0, 0,
+       doc: /* Return a list of user names currently registered in the system.
+If we don't know how to determine that on this platform, just
+return a list with one element, taken from `user-real-login-name'.  */)
+     (void)
+{
+  Lisp_Object users = Qnil;
+#if defined(HAVE_GETPWENT) && defined(HAVE_ENDPWENT)
+  struct passwd *pw;
+
+  while ((pw = getpwent ()))
+    users = Fcons (DECODE_SYSTEM (build_string (pw->pw_name)), users);
+
+  endpwent ();
+#endif
+  if (EQ (users, Qnil))
+    /* At least current user is always known. */
+    users = Fcons (Vuser_real_login_name, Qnil);
+  return users;
+}
+
+DEFUN ("system-groups", Fsystem_groups, Ssystem_groups, 0, 0, 0,
+       doc: /* Return a list of user group names currently registered in the system.
+The value may be nil if not supported on this platform.  */)
+     (void)
+{
+  Lisp_Object groups = Qnil;
+#if defined(HAVE_GETGRENT) && defined(HAVE_ENDGRENT)
+  struct group *gr;
+  int length;
+
+  while ((gr = getgrent ()))
+    groups = Fcons (DECODE_SYSTEM (build_string (gr->gr_name)), groups);
+
+  endgrent ();
+#endif
+  return groups;
+}
+
 void
 syms_of_dired (void)
 {
@@ -1032,6 +1072,8 @@ syms_of_dired (void)
   defsubr (&Sfile_name_all_completions);
   defsubr (&Sfile_attributes);
   defsubr (&Sfile_attributes_lessp);
+  defsubr (&Ssystem_users);
+  defsubr (&Ssystem_groups);
 
   DEFVAR_LISP ("completion-ignored-extensions", Vcompletion_ignored_extensions,
               doc: /* Completion ignores file names ending in any string in this list.