]> code.delx.au - gnu-emacs/commitdiff
Improve quality of tests for time stamp overflow.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 13 Mar 2011 06:43:00 +0000 (22:43 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 13 Mar 2011 06:43:00 +0000 (22:43 -0800)
29 files changed:
admin/admin.el
admin/notes/elpa
doc/emacs/ChangeLog
doc/emacs/msdog.texi
doc/misc/ChangeLog
doc/misc/Makefile.in
doc/misc/auth.texi
doc/misc/trampver.texi
lisp/ChangeLog
lisp/ebuff-menu.el
lisp/emacs-lisp/bytecomp.el
lisp/files.el
lisp/gnus/ChangeLog
lisp/gnus/auth-source.el
lisp/gnus/gnus-sync.el
lisp/gnus/mm-uu.el
lisp/help.el
lisp/net/tramp-sh.el
lisp/net/trampver.el
lisp/progmodes/compile.el
lisp/server.el
lisp/vc/vc-bzr.el
src/ChangeLog
src/deps.mk
src/fringe.c
src/msdos.c
src/msdos.h
src/termcap.c
src/unexmacosx.c

index 717bfee702d5d3737147174830456d3cb194cc0f..70958ce1a76fa2ba086b2190d7fc4f8b3395ef42 100644 (file)
@@ -212,6 +212,236 @@ Root must be the root of an Emacs source tree."
                    "\\\\def\\\\year{")
                  "\\([0-9]\\{4\\}\\)}.+%.+copyright year"))))))
 
+;;; Various bits of magic for generating the web manuals
+
+(defun make-manuals (root)
+  "Generate the web manuals for the Emacs webpage."
+  (interactive "DEmacs root directory: ")
+  (let* ((dest (expand-file-name "manual" root))
+        (html-node-dir (expand-file-name "html_node" dest))
+        (html-mono-dir (expand-file-name "html_mono" dest))
+        (txt-dir (expand-file-name "text" dest))
+        (dvi-dir (expand-file-name "dvi" dest))
+        (ps-dir (expand-file-name "ps" dest)))
+    (when (file-directory-p dest)
+      (if (y-or-n-p (format "Directory %s exists, delete it first?" dest))
+         (delete-directory dest t)
+       (error "Aborted")))
+    (make-directory dest)
+    (make-directory html-node-dir)
+    (make-directory html-mono-dir)
+    (make-directory txt-dir)
+    (make-directory dvi-dir)
+    (make-directory ps-dir)
+    ;; Emacs manual
+    (let ((texi (expand-file-name "doc/emacs/emacs.texi" root)))
+      (manual-html-node texi (expand-file-name "emacs" html-node-dir))
+      (manual-html-mono texi (expand-file-name "emacs.html" html-mono-dir))
+      (manual-txt texi (expand-file-name "emacs.txt" txt-dir))
+      (manual-pdf texi (expand-file-name "emacs.pdf" dest))
+      (manual-dvi texi (expand-file-name "emacs.dvi" dvi-dir)
+                 (expand-file-name "emacs.ps" ps-dir)))
+    ;; Lisp manual
+    (let ((texi (expand-file-name "doc/lispref/elisp.texi" root)))
+      (manual-html-node texi (expand-file-name "elisp" html-node-dir))
+      (manual-html-mono texi (expand-file-name "elisp.html" html-mono-dir))
+      (manual-txt texi (expand-file-name "elisp.txt" txt-dir))
+      (manual-pdf texi (expand-file-name "elisp.pdf" dest))
+      (manual-dvi texi (expand-file-name "elisp.dvi" dvi-dir)
+                 (expand-file-name "elisp.ps" ps-dir)))
+    (message "Manuals created in %s" dest)))
+
+(defconst manual-doctype-string
+  "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
+\"http://www.w3.org/TR/html4/loose.dtd\">\n\n")
+
+(defconst manual-meta-string
+  "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
+<link rev=\"made\" href=\"mailto:webmasters@gnu.org\">
+<link rel=\"icon\" type=\"image/png\" href=\"/graphics/gnu-head-mini.png\">
+<meta name=\"ICBM\" content=\"42.256233,-71.006581\">
+<meta name=\"DC.title\" content=\"gnu.org\">\n\n")
+
+(defconst manual-style-string "<style type=\"text/css\">
+@import url('/style.css');\n</style>\n")
+
+(defun manual-html-mono (texi-file dest)
+  "Run Makeinfo on TEXI-FILE, emitting mono HTML output to DEST.
+This function also edits the HTML files so that they validate as
+HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
+the @import directive."
+  (call-process "makeinfo" nil nil nil
+               "--html" "--no-split" texi-file "-o" dest)
+  (with-temp-buffer
+    (insert-file-contents dest)
+    (setq buffer-file-name dest)
+    (manual-html-fix-headers)
+    (manual-html-fix-index-1)
+    (manual-html-fix-index-2 t)
+    (manual-html-fix-node-div)
+    (goto-char (point-max))
+    (re-search-backward "</body>[\n \t]*</html>")
+    (insert "</div>\n\n")
+    (save-buffer)))
+
+(defun manual-html-node (texi-file dir)
+  "Run Makeinfo on TEXI-FILE, emitting per-node HTML output to DIR.
+This function also edits the HTML files so that they validate as
+HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using
+the @import directive."
+  (unless (file-exists-p texi-file)
+    (error "Manual file %s not found" texi-file))
+  (call-process "makeinfo" nil nil nil
+               "--html" texi-file "-o" dir)
+  ;; Loop through the node files, fixing them up.
+  (dolist (f (directory-files dir nil "\\.html\\'"))
+    (let (opoint)
+      (with-temp-buffer
+       (insert-file-contents (expand-file-name f dir))
+       (setq buffer-file-name (expand-file-name f dir))
+       (if (looking-at "<meta http-equiv")
+           ;; Ignore those HTML files that are just redirects.
+           (set-buffer-modified-p nil)
+         (manual-html-fix-headers)
+         (if (equal f "index.html")
+             (let (copyright-text)
+               (manual-html-fix-index-1)
+               ;; Move copyright notice to the end.
+               (re-search-forward "[ \t]*<p>Copyright &copy;")
+               (setq opoint (match-beginning 0))
+               (re-search-forward "</blockquote>")
+               (setq copyright-text (buffer-substring opoint (point)))
+               (delete-region opoint (point))
+               (manual-html-fix-index-2)
+               (insert copyright-text "\n</div>\n"))
+           ;; For normal nodes, give the header div a blue bg.
+           (manual-html-fix-node-div))
+         (save-buffer))))))
+
+(defun manual-txt (texi-file dest)
+  "Run Makeinfo on TEXI-FILE, emitting plaintext output to DEST."
+  (call-process "makeinfo" nil nil nil
+               "--plaintext" "--no-split" texi-file "-o" dest)
+  (shell-command (concat "gzip -c " dest " > " (concat dest ".gz"))))
+
+(defun manual-pdf (texi-file dest)
+  "Run texi2pdf on TEXI-FILE, emitting plaintext output to DEST."
+  (call-process "texi2pdf" nil nil nil texi-file "-o" dest))
+
+(defun manual-dvi (texi-file dest ps-dest)
+  "Run texi2dvi on TEXI-FILE, emitting dvi output to DEST.
+Also generate postscript output in PS-DEST."
+  (call-process "texi2dvi" nil nil nil texi-file "-o" dest)
+  (call-process "dvips" nil nil nil dest "-o" ps-dest)
+  (call-process "gzip" nil nil nil dest)
+  (call-process "gzip" nil nil nil ps-dest))
+
+(defun manual-html-fix-headers ()
+  "Fix up HTML headers for the Emacs manual in the current buffer."
+  (let (opoint)
+    (insert manual-doctype-string)
+    (search-forward "<head>\n")
+    (insert manual-meta-string)
+    (search-forward "<meta")
+    (setq opoint (match-beginning 0))
+    (re-search-forward "<!--")
+    (goto-char (match-beginning 0))
+    (delete-region opoint (point))
+    (insert manual-style-string)
+    (search-forward "<meta http-equiv=\"Content-Style")
+    (setq opoint (match-beginning 0))
+    (search-forward "</head>")
+    (delete-region opoint (match-beginning 0))))
+
+(defun manual-html-fix-node-div ()
+  "Fix up HTML \"node\" divs in the current buffer."
+  (let (opoint div-end)
+    (while (search-forward "<div class=\"node\">" nil t)
+      (replace-match
+       "<div class=\"node\" style=\"background-color:#DDDDFF\">"
+       t t)
+      (setq opoint (point))
+      (re-search-forward "</div>")
+      (setq div-end (match-beginning 0))
+      (goto-char opoint)
+      (if (search-forward "<hr>" div-end 'move)
+         (replace-match "" t t)))))
+
+(defun manual-html-fix-index-1 ()
+  (let (opoint)
+    (re-search-forward "<body>\n\\(<h1 class=\"settitle\\)")
+    (setq opoint (match-beginning 1))
+    (search-forward "<h2 class=\"unnumbered")
+    (goto-char (match-beginning 0))
+    (delete-region opoint (point))
+    (insert "<div id=\"content\" class=\"inner\">\n\n")))
+
+(defun manual-html-fix-index-2 (&optional table-workaround)
+  "Replace the index list in the current buffer with a HTML table."
+  (let (done open-td tag desc)
+    ;; Convert the list that Makeinfo made into a table.
+    (search-forward "<ul class=\"menu\">")
+    (replace-match "<table style=\"float:left\" width=\"100%\">")
+    (forward-line 1)
+    (while (not done)
+      (cond
+       ((or (looking-at "<li>\\(<a.+</a>\\):[ \t]+\\(.*\\)$")
+           (looking-at "<li>\\(<a.+</a>\\)$"))
+       (setq tag (match-string 1))
+       (setq desc (match-string 2))
+       (replace-match "" t t)
+       (when open-td
+         (save-excursion
+           (forward-char -1)
+           (skip-chars-backward " ")
+           (delete-region (point) (line-end-position))
+           (insert "</td>\n  </tr>")))
+       (insert "  <tr>\n    ")
+       (if table-workaround
+           ;; This works around a Firefox bug in the mono file.
+           (insert "<td bgcolor=\"white\">")
+         (insert "<td>"))
+       (insert tag "</td>\n    <td>" (or desc ""))
+       (setq open-td t))
+       ((eq (char-after) ?\n)
+       (delete-char 1)
+       ;; Negate the following `forward-line'.
+       (forward-line -1))
+       ((looking-at "<!-- ")
+       (search-forward "-->"))
+       ((looking-at "<p>[- ]*The Detailed Node Listing[- \n]*")
+       (replace-match "  </td></tr></table>\n
+<h3>Detailed Node Listing</h3>\n\n" t t)
+       (search-forward "<p>")
+       (search-forward "<p>")
+       (goto-char (match-beginning 0))
+       (skip-chars-backward "\n ")
+       (setq open-td nil)
+       (insert "</p>\n\n<table  style=\"float:left\" width=\"100%\">"))
+       ((looking-at "</li></ul>")
+       (replace-match "" t t))
+       ((looking-at "<p>")
+       (replace-match "" t t)
+       (when open-td
+         (insert "  </td></tr>")
+         (setq open-td nil))
+       (insert "  <tr>
+    <th colspan=\"2\" align=\"left\" style=\"text-align:left\">")
+       (re-search-forward "</p>[ \t\n]*<ul class=\"menu\">")
+       (replace-match "  </th></tr>"))
+       ((looking-at "[ \t]*</ul>[ \t]*$")
+       (replace-match
+        (if open-td
+            "  </td></tr>\n</table>"
+          "</table>") t t)
+       (setq done t))
+       (t
+       (if (eobp)
+           (error "Parse error in %s" f))
+       (unless open-td
+         (setq done t))))
+      (forward-line 1))))
+
 (provide 'admin)
 
 ;;; admin.el ends here
index cbea8cc1dfafaf8deb52b89e7b4d3a269954e698..db14456fe32df7727a40a27b7eb690a1a70d3d95 100644 (file)
@@ -1,24 +1,24 @@
 NOTES ON THE EMACS PACKAGE ARCHIVE
 
-The GNU Emacs package archive, at elpa.gnu.org, is managed using Bzr.
-The Bzr branch is hosted on Savannah, and you can check it out with
+The GNU Emacs package archive, at elpa.gnu.org, is managed using a Bzr
+branch named "elpa", hosted on Savannah.  To check it out:
 
   bzr branch bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa elpa
+  cd elpa
+  echo "public_branch = bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa" >> .bzr/branch/branch.conf
+  bzr bind bzr+ssh://USERNAME@bzr.savannah.gnu.org/emacs/elpa
+  [create task branch for edits, etc.]
 
-Changes made to this branch propagate to elpa.gnu.org as follows.
+Changes to this branch propagate to elpa.gnu.org in a semi-manual way.
 There exists a copy of the elpa branch on that machine.  Someone with
-access must log in, pull the latest changes from Savannah, and run a
-"deployment" script that generates the content at the web-visible
-location http://elpa.gnu.org/packages.
+access logs in, pulls the latest changes from Savannah, and runs a
+"deployment" script.  This script (which is itself kept in the Bzr
+branch) generates the content visible at http://elpa.gnu.org/packages.
 
-The reason things are set up this way, instead of using the package
-upload utilities in package-x.el, is so that Emacs hackers can easily
-edit the contents of the Savannah "elpa" branch, with the aid of
-version control.  (For instance, multi-file packages are stored on the
-Bzr branch in source form, not as tarfiles.)  Because deployment is a
-semi-manual process, this allows us some flexibility in making changes
-to the branch on Savannah.  Furthermore, one can use the elpa branch
-to deploy a "local" copy of the package archive, for testing.
+The reason we set things up this way, instead of using the package
+upload commands in package-x.el, is to let Emacs hackers conveniently
+edit the contents of the "elpa" branch.  (In particular, multi-file
+packages are stored on the branch in source form, not as tarfiles.)
 
-For details on how to use the elpa branch, see that README file in
-that branch.
+It is easy to use the elpa branch to deploy a "local" copy of the
+package archive.  For details, see the README file in the elpa branch.
index a53aa095cc2be2a55d871e07c7966dd4e16bb9a6..a30ffc07971c88e6db0659ba1dd8ff6d14de9e77 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * msdog.texi (Windows HOME): Fix the wording to clarify how Emacs sets
+       HOME on Windows and where it looks for init files.  (Bug#8221)
+
 2011-03-10  Eli Zaretskii  <eliz@gnu.org>
 
        * search.texi (Regexp Example):
index 7358773485d45f3e691afb97aded8a8283fbd877..0a454db86bb7d96ac0128ce12966b64c83f1c99d 100644 (file)
@@ -404,36 +404,45 @@ names, which might cause misalignment of columns in Dired display.
 @dfn{user-specific application data directory}.  The actual location
 depends on your Windows version and system configuration; typical values
 are @file{C:\Documents and Settings\@var{username}\Application Data} on
-Windows 2K/XP and later, and either @file{C:\WINDOWS\Application Data}
+Windows 2K/XP/2K3, @file{C:\Users\@var{username}\AppData\Roaming} on
+Windows Vista/7/2K8, and either @file{C:\WINDOWS\Application Data}
 or @file{C:\WINDOWS\Profiles\@var{username}\Application Data} on the
-older Windows 9X/ME systems.
-
-  @code{HOME} can also be set in the system registry, for details see
+older Windows 9X/ME systems.  If this directory does not exist or
+cannot be accessed, Emacs falls back to @file{C:\} as the default
+value of @code{HOME}.
+
+  You can override this default value of @code{HOME} by explicitly
+setting the environment variable @env{HOME} to point to any directory
+on your system.  @env{HOME} can be set either from the command shell
+prompt or from the @samp{My Computer}s @samp{Properties} dialog.
+@code{HOME} can also be set in the system registry, for details see
 @ref{MS-Windows Registry}.
 
-@cindex init file @file{.emacs} on MS-Windows
-  The home directory is where your init file @file{.emacs} is stored.
-When Emacs starts, it first checks whether the environment variable
-@env{HOME} is set.  If it is, it looks for the init file in the
-directory pointed by @env{HOME}.  If @env{HOME} is not defined, Emacs
-checks for an existing @file{.emacs} file in @file{C:\}, the root
-directory of drive @file{C:}@footnote{
-The check in @file{C:\} is for compatibility with older versions of Emacs,
-which didn't check the application data directory.
-}.  If there's no such file in @file{C:\}, Emacs next uses the Windows
-system calls to find out the exact location of your application data
-directory.  If that system call fails, Emacs falls back to @file{C:\}.
-
-  Whatever the final place is, Emacs sets the value of the @env{HOME}
-environment variable to point to it, and it will use that location for
-other files and directories it normally creates in the user's home
-directory.
+  For compatibility with older versions of Emacs@footnote{
+Older versions of Emacs didn't check the application data directory.
+}, if there is a file named @file{.emacs} in @file{C:\}, the root
+directory of drive @file{C:}, and @env{HOME} is set neither in the
+environment nor in the Registry, Emacs will treat @file{C:\} as the
+default @code{HOME} location, and will not look in the application
+data directory, even if it exists.  Note that only @file{.emacs} is
+looked for in @file{C:\}; the older name @file{_emacs} (see below) is
+not.  This use of @file{C:\.emacs} to define @code{HOME} is
+deprecated.
+
+  Whatever the final place is, Emacs sets the internal value of the
+@env{HOME} environment variable to point to it, and it will use that
+location for other files and directories it normally looks for or
+creates in the user's home directory.
 
   You can always find out where Emacs thinks is your home directory's
 location by typing @kbd{C-x d ~/ @key{RET}}.  This should present the
 list of files in the home directory, and show its full name on the
 first line.  Likewise, to visit your init file, type @kbd{C-x C-f
-~/.emacs @key{RET}}.
+~/.emacs @key{RET}} (assuming the file's name is @file{.emacs}).
+
+@cindex init file @file{.emacs} on MS-Windows
+  The home directory is where your init file is stored.  It can have
+any name mentioned in @ref{Init File}.
 
 @cindex @file{_emacs} init file, MS-Windows
   Because MS-DOS does not allow file names with leading dots, and
index 59ad3076684512337a73ae12d7fb551577d159ce..db3a944c160abd7f3498f8b2a951f3adfed2a14c 100644 (file)
@@ -1,3 +1,20 @@
+2011-03-12  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * auth.texi (Help for developers): Update docs to explain that the
+       :save-function will only run the first time.
+
+2011-03-12  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (emacs-faq.html): Fix some more cross-refs.
+       (emacs-faq.text): New target.
+       (clean): Add emacs-faq.
+
+2011-03-12  Michael Albinus  <michael.albinus@gmx.de>
+
+       Sync with Tramp 2.2.1.
+
+       * trampver.texi: Update release number.
+
 2011-03-11  Glenn Morris  <rgm@gnu.org>
 
        * Makefile.in (HTML_TARGETS): New.
index 6ecf6bc02f8c53f6945ede365fae1b61ae6691ac..450199a33c51b0b56b0b339f4afbad5d1d878f7a 100644 (file)
@@ -408,7 +408,10 @@ faq.pdf: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
 emacs-faq.html: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
        $(MAKEINFO) $(MAKEINFO_OPTS) --no-split \
          --css-ref='/layout.css' --html -o $@ $<
-       sed -i 's|a href="emacs.html#\([^"]*\)"|a href="manual/html_node/emacs/\1.html"|g' $@
+       sed -i -e 's|a href="\([a-z]*\)\.html#\([^"]*\)"|a href="manual/html_node/\1/\2.html"|g' \
+         -e 's|/Top\.html|/|g' $@
+emacs-faq.text: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
+       $(MAKEINFO) $(MAKEINFO_OPTS) --plaintext -o $@ $<
 
 flymake : $(infodir)/flymake
 $(infodir)/flymake: flymake.texi
@@ -692,7 +695,7 @@ mostlyclean:
        rm -f gnustmp.*
 
 clean: mostlyclean
-       rm -f $(DVI_TARGETS) $(PDF_TARGETS) $(HTML_TARGETS)
+       rm -f $(DVI_TARGETS) $(PDF_TARGETS) $(HTML_TARGETS) emacs-faq.text
 
 distclean: clean
 #      rm -f Makefile
index 85a3f098131e729ce97328ddeaeac54f9aaebb43..a16da92343ec32194ab6c2fb2790c772aa39f263 100644 (file)
@@ -289,11 +289,21 @@ Later, after a successful login, @code{nnimal.el} calls the
    (funcall (nth 2 credentials)))
 @end example
 
-Which will work whether the @code{:save-function} was provided or not.
+This will work whether the @code{:save-function} was provided or not.
 @code{:save-function} will be provided only when a new entry was
 created, so this effectively says ``after a successful login, save the
 authentication information we just used, if it was newly created.''
 
+After the first time it's called, the @code{:save-function} will not
+run again (but it will log something if you have set
+@code{auth-source-debug} to @code{'trivia}).  This is so it won't ask
+the same question again, which is annoying.  This is so it won't ask
+the same question again, which is annoying.  This is so it won't ask
+the same question again, which is annoying.
+
+So the responsibility of the API user that specified @code{:create t}
+is to call the @code{:save-function} if it's provided.
+
 @defun auth-source-delete SPEC
 
 TODO: how to include docstring?
index 437b1372c11d1c061e9edecd157940bd2f6dc3da..e4c444980c8300dc25edc0535e1f28c039d4e9cf 100644 (file)
@@ -8,7 +8,7 @@
 @c In the Tramp CVS, the version number is auto-frobbed from
 @c configure.ac, so you should edit that file and run
 @c "autoconf && ./configure" to change the version number.
-@set trampver 2.2.1-pre
+@set trampver 2.2.1
 
 @c Other flags from configuration
 @set instprefix /usr/local
index 9456644a7a84537a726bed624e3270936c65ac29..1f50ee9ebe61588b7dcd064a18c46ca8bf7db4a2 100644 (file)
@@ -1,11 +1,53 @@
+2011-03-13  Juanma Barranquero  <lekktu@gmail.com>
+
+       * help.el (describe-mode): Link to the mode's definition (bug#8185).
+
+2011-03-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * ebuff-menu.el (electric-buffer-menu-mode-map): Move initialization
+       into declaration.  Remove redundant and harmful binding.
+
+2011-03-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * files.el (file-ownership-preserved-p): Pass `integer' as an
+       explicit 2nd argument to `file-attributes'.  If the file's owner
+       is the Administrators group on Windows, and the current user is
+       Administrator, consider that a match.
+
+       * server.el (server-ensure-safe-dir): Consider server directory
+       safe on MS-Windows if its owner is the Administrators group while
+       the current Emacs user is Administrator.  Use `=' to compare
+       numerical UIDs, since they could be integers or floats.
+
+2011-03-12  Juanma Barranquero  <lekktu@gmail.com>
+
+       * vc/vc-bzr.el (vc-bzr-state): Handle bzr 2.3.0 (follow-up to bug#8170).
+
+2011-03-12  Michael Albinus  <michael.albinus@gmx.de>
+
+       Sync with Tramp 2.2.1.
+
+       * net/tramp-sh.el (tramp-methods): Exchange "%k" marker with options.
+
+       * net/trampver.el: Update release number.
+
+2011-03-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/compile.el (compilation--previous-directory): Fix up
+       various nil/dead-marker mismatches (bug#8014).
+       (compilation-directory-properties, compilation-error-properties):
+       Don't call it at a position past the one we're about to change.
+
+       * emacs-lisp/bytecomp.el (byte-compile-make-obsolete-variable):
+       Disable obsolescence warnings in the file that declares it.
+
 2011-03-11  Ken Manheimer  <ken.manheimer@gmail.com>
 
-       * allout-widgets.el (allout-widgets-tally) Initialize
+       * allout-widgets.el (allout-widgets-tally): Initialize
        allout-widgets-tally as a hash table rather than nil to prevent
        mode-line redisplay warnings.
        Also, clarify the module description and fix a comment typo.
 
-
 2011-03-11  Juanma Barranquero  <lekktu@gmail.com>
 
        * help-fns.el (describe-variable): Don't complete keywords.
@@ -55,7 +97,7 @@
        preserves the existing header prefix, rebulleting it if necessary,
        rather than replacing it.  This is necessary for proper operation
        of cooperative addons like allout-widgets.
-       (allout-make-topic-prefix) (allout-rebullet-heading): Change
+       (allout-make-topic-prefixallout-rebullet-heading): Change
        SOLICIT arg to INSTEAD, and interpret additionally a string value
        as alternate bullet to be used, instead of prompting the user for
        a bullet character.
 2011-02-17  Ken Manheimer  <ken.manheimer@gmail.com>
 
        * lisp/allout-widgets.el (allout-widgets-icons-light-subdir)
-       (allout-widgets-icons-dark-subdir): Track relocations of icons
+       (allout-widgets-icons-dark-subdir): Track relocations of icons.
        * lisp/allout.el: Remove commentary about remove encryption
        passphrase mnemonic support and verification.
        (allout-encrypt-string): Recognize epg failure to decrypt gpg2
 
        (allout-auto-activation-helper, allout-setup): New autoloads
        implement new custom set procedure for allout-auto-activation.
-       Also, explicitly invoke
-       (allout-setup) after allout-auto-activation is custom-defined, to
-       effect the settings in emacs sessions besides the few where
-       allout-auto-activation customization is donea.
+       Also, explicitly invoke (allout-setup) after allout-auto-activation
+       is custom-defined, to affect the settings in emacs sessions besides
+       the few where allout-auto-activation customization is done.
        (allout-auto-activation): Use allout-auto-activation-helper to
        :set.  Revise the docstring.
        (allout-init): Reduce functionality to just customizing
index dd589cb58f70260aa7d59c27dc02379cf4be22e2..a906cf8516a76f2c1e567d5c18580a04b85bfe63 100644 (file)
 ;; this depends on the format of list-buffers (from src/buffer.c) and
 ;; on stuff in lisp/buff-menu.el
 
-(defvar electric-buffer-menu-mode-map nil)
+(defvar electric-buffer-menu-mode-map
+  (let ((map (make-keymap)))
+    (fillarray (car (cdr map)) 'Electric-buffer-menu-undefined)
+    (define-key map "\e" nil)
+    (define-key map "\C-z" 'suspend-frame)
+    (define-key map "v" 'Electric-buffer-menu-mode-view-buffer)
+    (define-key map (char-to-string help-char) 'Helper-help)
+    (define-key map "?" 'Helper-describe-bindings)
+    (define-key map "\C-c" nil)
+    (define-key map "\C-c\C-c" 'Electric-buffer-menu-quit)
+    (define-key map "\C-]" 'Electric-buffer-menu-quit)
+    (define-key map "q" 'Electric-buffer-menu-quit)
+    (define-key map " " 'Electric-buffer-menu-select)
+    (define-key map "\C-m" 'Electric-buffer-menu-select)
+    (define-key map "\C-l" 'recenter)
+    (define-key map "s" 'Buffer-menu-save)
+    (define-key map "d" 'Buffer-menu-delete)
+    (define-key map "k" 'Buffer-menu-delete)
+    (define-key map "\C-d" 'Buffer-menu-delete-backwards)
+    ;; (define-key map "\C-k" 'Buffer-menu-delete)
+    (define-key map "\177" 'Buffer-menu-backup-unmark)
+    (define-key map "~" 'Buffer-menu-not-modified)
+    (define-key map "u" 'Buffer-menu-unmark)
+    (let ((i ?0))
+      (while (<= i ?9)
+       (define-key map (char-to-string i) 'digit-argument)
+       (define-key map (concat "\e" (char-to-string i)) 'digit-argument)
+       (setq i (1+ i))))
+    (define-key map "-" 'negative-argument)
+    (define-key map "\e-" 'negative-argument)
+    (define-key map "m" 'Buffer-menu-mark)
+    (define-key map "\C-u" 'universal-argument)
+    (define-key map "\C-p" 'previous-line)
+    (define-key map "\C-n" 'next-line)
+    (define-key map "p" 'previous-line)
+    (define-key map "n" 'next-line)
+    (define-key map "\C-v" 'scroll-up)
+    (define-key map "\ev" 'scroll-down)
+    (define-key map ">" 'scroll-right)
+    (define-key map "<" 'scroll-left)
+    (define-key map "\e\C-v" 'scroll-other-window)
+    (define-key map "\e>" 'end-of-buffer)
+    (define-key map "\e<" 'beginning-of-buffer)
+    (define-key map "\e\e" nil)
+    (define-key map "\e\e\e" 'Electric-buffer-menu-quit)
+    ;; This binding prevents the "escape => ESC" function-key-map mapping from
+    ;; kicking in!
+    ;; (define-key map [escape escape escape] 'Electric-buffer-menu-quit)
+    (define-key map [mouse-2] 'Electric-buffer-menu-mouse-select)
+    map))
 
 (defvar electric-buffer-menu-mode-hook nil
   "Normal hook run by `electric-buffer-list'.")
@@ -167,55 +216,7 @@ Entry to this mode via command `electric-buffer-list' calls the value of
 ;; generally the same as Buffer-menu-mode-map
 ;;  (except we don't indirect to global-map)
 (put 'Electric-buffer-menu-undefined 'suppress-keymap t)
-(if electric-buffer-menu-mode-map
-    nil
-  (let ((map (make-keymap)))
-    (fillarray (car (cdr map)) 'Electric-buffer-menu-undefined)
-    (define-key map "\e" nil)
-    (define-key map "\C-z" 'suspend-frame)
-    (define-key map "v" 'Electric-buffer-menu-mode-view-buffer)
-    (define-key map (char-to-string help-char) 'Helper-help)
-    (define-key map "?" 'Helper-describe-bindings)
-    (define-key map "\C-c" nil)
-    (define-key map "\C-c\C-c" 'Electric-buffer-menu-quit)
-    (define-key map "\C-]" 'Electric-buffer-menu-quit)
-    (define-key map "q" 'Electric-buffer-menu-quit)
-    (define-key map " " 'Electric-buffer-menu-select)
-    (define-key map "\C-m" 'Electric-buffer-menu-select)
-    (define-key map "\C-l" 'recenter)
-    (define-key map "s" 'Buffer-menu-save)
-    (define-key map "d" 'Buffer-menu-delete)
-    (define-key map "k" 'Buffer-menu-delete)
-    (define-key map "\C-d" 'Buffer-menu-delete-backwards)
-    ;(define-key map "\C-k" 'Buffer-menu-delete)
-    (define-key map "\177" 'Buffer-menu-backup-unmark)
-    (define-key map "~" 'Buffer-menu-not-modified)
-    (define-key map "u" 'Buffer-menu-unmark)
-    (let ((i ?0))
-      (while (<= i ?9)
-       (define-key map (char-to-string i) 'digit-argument)
-       (define-key map (concat "\e" (char-to-string i)) 'digit-argument)
-       (setq i (1+ i))))
-    (define-key map "-" 'negative-argument)
-    (define-key map "\e-" 'negative-argument)
-    (define-key map "m" 'Buffer-menu-mark)
-    (define-key map "\C-u" 'universal-argument)
-    (define-key map "\C-p" 'previous-line)
-    (define-key map "\C-n" 'next-line)
-    (define-key map "p" 'previous-line)
-    (define-key map "n" 'next-line)
-    (define-key map "\C-v" 'scroll-up)
-    (define-key map "\ev" 'scroll-down)
-    (define-key map ">" 'scroll-right)
-    (define-key map "<" 'scroll-left)
-    (define-key map "\e\C-v" 'scroll-other-window)
-    (define-key map "\e>" 'end-of-buffer)
-    (define-key map "\e<" 'beginning-of-buffer)
-    (define-key map "\e\e" nil)
-    (define-key map "\e\e\e" 'Electric-buffer-menu-quit)
-    (define-key map [escape escape escape] 'Electric-buffer-menu-quit)
-    (define-key map [mouse-2] 'Electric-buffer-menu-mouse-select)
-    (setq electric-buffer-menu-mode-map map)))
+
 
 (defun Electric-buffer-menu-exit ()
   (interactive)
index 2f113dfb4795c518556ace470dd928823264ac1e..5e24b80ac5a1e8364590e93ee8362444d5737a91 100644 (file)
@@ -3840,6 +3840,17 @@ that suppresses all warnings during execution of BODY."
        ,@decls
        ',(nth 1 form)))))
 
+;; If foo.el declares `toto' as obsolete, it is likely that foo.el will
+;; actually use `toto' in order for this obsolete variable to still work
+;; correctly, so paradoxically, while byte-compiling foo.el, the presence
+;; of a make-obsolete-variable call for `toto' is an indication that `toto'
+;; should not trigger obsolete-warnings in foo.el.
+(byte-defop-compiler-1 make-obsolete-variable)
+(defun byte-compile-make-obsolete-variable (form)
+  (when (eq 'quote (car-safe (nth 1 form)))
+    (push (nth 1 (nth 1 form)) byte-compile-not-obsolete-vars))
+  (byte-compile-normal-call form))
+
 (defun byte-compile-defvar (form)
   ;; This is not used for file-level defvar/consts with doc strings.
   (when (and (symbolp (nth 1 form))
index ffc0b33119f2af7810103ceb93daa50c158cee0f..198d5ca87ded82d2ec6744b69438c6321cf995f3 100644 (file)
@@ -3895,11 +3895,17 @@ See also `file-name-version-regexp'."
   (let ((handler (find-file-name-handler file 'file-ownership-preserved-p)))
     (if handler
        (funcall handler 'file-ownership-preserved-p file)
-      (let ((attributes (file-attributes file)))
+      (let ((attributes (file-attributes file 'integer)))
        ;; Return t if the file doesn't exist, since it's true that no
        ;; information would be lost by an (attempted) delete and create.
        (or (null attributes)
-           (= (nth 2 attributes) (user-uid)))))))
+           (= (nth 2 attributes) (user-uid))
+           ;; Files created on Windows by Administrator (RID=500)
+           ;; have the Administrators group (RID=544) recorded as
+           ;; their owner.  Rewriting them will still preserve the
+           ;; owner.
+           (and (eq system-type 'windows-nt)
+                (= (user-uid) 500) (= (nth 2 attributes) 544)))))))
 
 (defun file-name-sans-extension (filename)
   "Return FILENAME sans final \"extension\".
index dbd52c5fece03e1809443bfbd3d5f11eafcf06ec..ec12faada982036a811492df8c82a5be6ad05cf5 100644 (file)
@@ -1,3 +1,25 @@
+2011-03-12  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * auth-source.el (auth-source-format-prompt): Always convert the value
+       to a string to avoid evaluating non-string arguments.
+       (auth-source-netrc-create): Offer default properly, not as initial
+       content in `read-string'.
+       (auth-source-netrc-saver): Use a cache keyed by file name and MD5 hash
+       of line to determine if we've been run before.  If so, don't run again,
+       but print a trivial message to indicate the cache was hit instead.
+
+2011-03-11  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus-sync.el (gnus-sync-install-hooks, gnus-sync-unload-hook): Don't
+       install `gnus-sync-read' to any hooks by default.  It's buggy.  The
+       user will have to run `gnus-sync-read' manually and wait for Cloudy
+       Gnus.
+
+2011-03-11  Julien Danjou  <julien@danjou.info>
+
+       * mm-uu.el (mm-uu-type-alist): Add support for diff starting with "===
+       modified file".
+
 2011-03-09  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * auth-source.el (auth-source-read-char-choice): New function to read a
index b7e0c97ce50048cb719bc90c8bc92bd35727987f..0fb153ad09b7a51f3ec27c8d325a3f525d6c7e85 100644 (file)
@@ -54,6 +54,8 @@
 (autoload 'secrets-list-collections "secrets")
 (autoload 'secrets-search-items "secrets")
 
+(autoload 'rfc2104-hash "rfc2104")
+
 (defvar secrets-enabled)
 
 (defgroup auth-source nil
@@ -770,7 +772,9 @@ while \(:host t) would find all host entries."
     (let ((c (nth 0 cell))
           (v (nth 1 cell)))
       (when (and c v)
-        (setq prompt (replace-regexp-in-string (format "%%%c" c) v prompt)))))
+        (setq prompt (replace-regexp-in-string (format "%%%c" c)
+                                               (format "%s" v)
+                                               prompt)))))
   prompt)
 
 (defun auth-source-ensure-strings (values)
@@ -1096,7 +1100,7 @@ See `auth-source-search' for details on SPEC."
                 ;; special case prompt for passwords
                 (read-passwd prompt))
                ((null data)
-                (read-string prompt default))
+                (read-string prompt nil nil default))
                (t (or data default))))
 
         (when data
@@ -1138,70 +1142,79 @@ See `auth-source-search' for details on SPEC."
 
     (list artificial)))
 
-;;(funcall (plist-get (nth 0 (auth-source-search :host '("nonesuch") :user "tzz" :port "imap" :create t :max 1)) :save-function))
+;;(funcall (plist-get (nth 0 (auth-source-search :host '("nonesuch2") :user "tzz" :port "imap" :create t :max 1)) :save-function))
 (defun auth-source-netrc-saver (file add)
   "Save a line ADD in FILE, prompting along the way.
-Respects `auth-source-save-behavior'."
-  (with-temp-buffer
-    (when (file-exists-p file)
-      (insert-file-contents file))
-    (when auth-source-gpg-encrypt-to
-      ;; (see bug#7487) making `epa-file-encrypt-to' local to
-      ;; this buffer lets epa-file skip the key selection query
-      ;; (see the `local-variable-p' check in
-      ;; `epa-file-write-region').
-      (unless (local-variable-p 'epa-file-encrypt-to (current-buffer))
-        (make-local-variable 'epa-file-encrypt-to))
-      (if (listp auth-source-gpg-encrypt-to)
-          (setq epa-file-encrypt-to auth-source-gpg-encrypt-to)))
-    ;; we want the new data to be found first, so insert at beginning
-    (goto-char (point-min))
-
-    ;; ask AFTER we've successfully opened the file
-    (let ((prompt (format "Save auth info to file %s? " file))
-          (done (not (eq auth-source-save-behavior 'ask)))
-          (bufname "*auth-source Help*")
-          k)
-      (while (not done)
-        (setq k (auth-source-read-char-choice prompt '(?y ?n ?N ?e ??)))
-        (case k
-          (?y (setq done t))
-          (?? (save-excursion
-                (with-output-to-temp-buffer bufname
-                  (princ
-                   (concat "(y)es, save\n"
-                           "(n)o but use the info\n"
-                           "(N)o and don't ask to save again\n"
-                           "(e)dit the line\n"
-                           "(?) for help as you can see.\n"))
-                  (set-buffer standard-output)
-                  (help-mode))))
-          (?n (setq add ""
-                    done t))
-          (?N (setq add ""
-                    done t
-                    auth-source-save-behavior nil))
-          (?e (setq add (read-string "Line to add: " add)))
-          (t nil)))
-
-      (when (get-buffer-window bufname)
-        (delete-window (get-buffer-window bufname)))
-
-      ;; make sure the info is not saved
-      (when (null auth-source-save-behavior)
-        (setq add ""))
-
-      (when (< 0 (length add))
-        (progn
-          (unless (bolp)
-            (insert "\n"))
-          (insert add "\n")
-          (write-region (point-min) (point-max) file nil 'silent)
-          (auth-source-do-debug
-           "auth-source-netrc-create: wrote 1 new line to %s"
-           file)
-          (message "Saved new authentication information to %s" file)
-          nil)))))
+Respects `auth-source-save-behavior'.  Uses
+`auth-source-netrc-cache' to avoid prompting more than once."
+  (let* ((key (format "%s %s" file (rfc2104-hash 'md5 64 16 file add)))
+         (cached (assoc key auth-source-netrc-cache)))
+
+    (if cached
+        (auth-source-do-trivia
+         "auth-source-netrc-saver: found previous run for key %s, returning"
+         key)
+      (with-temp-buffer
+        (when (file-exists-p file)
+          (insert-file-contents file))
+        (when auth-source-gpg-encrypt-to
+          ;; (see bug#7487) making `epa-file-encrypt-to' local to
+          ;; this buffer lets epa-file skip the key selection query
+          ;; (see the `local-variable-p' check in
+          ;; `epa-file-write-region').
+          (unless (local-variable-p 'epa-file-encrypt-to (current-buffer))
+            (make-local-variable 'epa-file-encrypt-to))
+          (if (listp auth-source-gpg-encrypt-to)
+              (setq epa-file-encrypt-to auth-source-gpg-encrypt-to)))
+        ;; we want the new data to be found first, so insert at beginning
+        (goto-char (point-min))
+
+        ;; ask AFTER we've successfully opened the file
+        (let ((prompt (format "Save auth info to file %s? " file))
+              (done (not (eq auth-source-save-behavior 'ask)))
+              (bufname "*auth-source Help*")
+              k)
+          (while (not done)
+            (setq k (auth-source-read-char-choice prompt '(?y ?n ?N ?e ??)))
+            (case k
+              (?y (setq done t))
+              (?? (save-excursion
+                    (with-output-to-temp-buffer bufname
+                      (princ
+                       (concat "(y)es, save\n"
+                               "(n)o but use the info\n"
+                               "(N)o and don't ask to save again\n"
+                               "(e)dit the line\n"
+                               "(?) for help as you can see.\n"))
+                      (set-buffer standard-output)
+                      (help-mode))))
+              (?n (setq add ""
+                        done t))
+              (?N (setq add ""
+                        done t
+                        auth-source-save-behavior nil))
+              (?e (setq add (read-string "Line to add: " add)))
+              (t nil)))
+
+          (when (get-buffer-window bufname)
+            (delete-window (get-buffer-window bufname)))
+
+          ;; make sure the info is not saved
+          (when (null auth-source-save-behavior)
+            (setq add ""))
+
+          (when (< 0 (length add))
+            (progn
+              (unless (bolp)
+                (insert "\n"))
+              (insert add "\n")
+              (write-region (point-min) (point-max) file nil 'silent)
+              (auth-source-do-debug
+               "auth-source-netrc-create: wrote 1 new line to %s"
+               file)
+              (message "Saved new authentication information to %s" file)
+              nil))))
+      (aput 'auth-source-netrc-cache key "ran"))))
 
 ;;; Backend specific parsing: Secrets API backend
 
index 892b10a0d0e8ceb6ef1d38f7baf39fe49ee00c1d..fbdacdd2fbe1960797fbbea54fc4ac945bdca7ce 100644 (file)
@@ -25,7 +25,8 @@
 ;; This is the gnus-sync.el package.
 
 ;; It's due for a rewrite using gnus-after-set-mark-hook and
-;; gnus-before-update-mark-hook.  Until then please consider it
+;; gnus-before-update-mark-hook, and my plan is to do this once No
+;; Gnus development is done.  Until then please consider it
 ;; experimental.
 
 ;; Put this in your startup file (~/.gnus.el for instance)
@@ -42,7 +43,8 @@
 
 ;; TODO:
 
-;; - after gnus-sync-read, the message counts are wrong
+;; - after gnus-sync-read, the message counts are wrong.  So it's not
+;;   run automatically, you have to call it with M-x gnus-sync-read
 
 ;; - use gnus-after-set-mark-hook and gnus-before-update-mark-hook to
 ;;   catch the mark updates
@@ -220,13 +222,13 @@ synchronized, I believe).  Also see `gnus-variable-list'."
   "Install the sync hooks."
   (interactive)
   ;; (add-hook 'gnus-get-new-news-hook 'gnus-sync-read)
-  (add-hook 'gnus-save-newsrc-hook 'gnus-sync-save)
-  (add-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read))
+  ;; (add-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read)
+  (add-hook 'gnus-save-newsrc-hook 'gnus-sync-save))
 
 (defun gnus-sync-unload-hook ()
   "Uninstall the sync hooks."
   (interactive)
-  ;; (remove-hook 'gnus-get-new-news-hook 'gnus-sync-read)
+  (remove-hook 'gnus-get-new-news-hook 'gnus-sync-read)
   (remove-hook 'gnus-save-newsrc-hook 'gnus-sync-save)
   (remove-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read))
 
index 14b44198303874cc17ee6c3d70ab43a14e3adeef..96dce48a774ffadbd9046b5dffec36d422201334 100644 (file)
@@ -158,6 +158,12 @@ This can be either \"inline\" or \"attachment\".")
      mm-uu-diff-extract
      nil
      mm-uu-diff-test)
+    (diff
+     "^=== modified file "
+     nil
+     mm-uu-diff-extract
+     nil
+     mm-uu-diff-test)
     (git-format-patch
      "^diff --git "
      "^-- "
index 9fcb06c559f3d1fcd429f6db82be66e2a9e5dc73..e148e5ef6abba5be4edbfff0218259f3bb3befb4 100644 (file)
@@ -871,7 +871,17 @@ whose documentation describes the minor mode."
             (let ((start (point)))
               (insert (format-mode-line mode nil nil buffer))
               (add-text-properties start (point) '(face bold)))))
-       (princ " mode:\n")
+       (princ " mode")
+       (let* ((mode major-mode)
+              (file-name (find-lisp-object-file-name mode nil)))
+         (when file-name
+           (princ (concat " defined in `" (file-name-nondirectory file-name) "'"))
+           ;; Make a hyperlink to the library.
+           (with-current-buffer standard-output
+             (save-excursion
+               (re-search-backward "`\\([^`']+\\)'" nil t)
+               (help-xref-button 1 'help-function-def mode file-name)))))
+       (princ ":\n")
        (princ (documentation major-mode)))))
   ;; For the sake of IELM and maybe others
   nil)
index ec75ea78fe1c960881d04b1c012af2ee223f18f7..ec5c46b2897b6c58289a03f121a8a6101ec1c19f 100644 (file)
@@ -90,7 +90,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-login-args           (("%h") ("-l" "%u")))
     (tramp-remote-sh            "/bin/sh")
     (tramp-copy-program         "rcp")
-    (tramp-copy-args            (("%k" "-p") ("-r")))
+    (tramp-copy-args            (("-p" "%k") ("-r")))
     (tramp-copy-keep-date       t)
     (tramp-copy-recursive       t)))
 ;;;###tramp-autoload
@@ -100,7 +100,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-login-args           (("%h") ("-l" "%u")))
     (tramp-remote-sh            "/bin/sh")
     (tramp-copy-program         "rcp")
-    (tramp-copy-args            (("%k" "-p")))
+    (tramp-copy-args            (("-p" "%k")))
     (tramp-copy-keep-date       t)))
 ;;;###tramp-autoload
 (add-to-list 'tramp-methods
@@ -110,7 +110,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
    (tramp-async-args           (("-q")))
    (tramp-remote-sh            "/bin/sh")
    (tramp-copy-program         "scp")
-   (tramp-copy-args            (("-P" "%p") ("%k" "-p")        ("-q") ("-r")))
+   (tramp-copy-args            (("-P" "%p") ("-p" "%k")        ("-q") ("-r")))
    (tramp-copy-keep-date       t)
    (tramp-copy-recursive       t)
    (tramp-gw-args              (("-o" "GlobalKnownHostsFile=/dev/null")
@@ -126,7 +126,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-async-args           (("-q")))
     (tramp-remote-sh            "/bin/sh")
     (tramp-copy-program         "scp")
-    (tramp-copy-args            (("-1") ("-P" "%p") ("%k" "-p") ("-q") ("-r")))
+    (tramp-copy-args            (("-1") ("-P" "%p") ("-p" "%k") ("-q") ("-r")))
     (tramp-copy-keep-date       t)
     (tramp-copy-recursive       t)
     (tramp-gw-args              (("-o" "GlobalKnownHostsFile=/dev/null")
@@ -142,7 +142,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-async-args           (("-q")))
     (tramp-remote-sh            "/bin/sh")
     (tramp-copy-program         "scp")
-    (tramp-copy-args            (("-2") ("-P" "%p") ("%k" "-p") ("-q") ("-r")))
+    (tramp-copy-args            (("-2") ("-P" "%p") ("-p" "%k") ("-q") ("-r")))
     (tramp-copy-keep-date       t)
     (tramp-copy-recursive       t)
     (tramp-gw-args              (("-o" "GlobalKnownHostsFile=/dev/null")
@@ -160,7 +160,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-async-args           (("-q")))
     (tramp-remote-sh            "/bin/sh")
     (tramp-copy-program         "scp")
-    (tramp-copy-args            (("-P" "%p") ("%k" "-p") ("-q") ("-r")
+    (tramp-copy-args            (("-P" "%p") ("-p" "%k") ("-q") ("-r")
                                 ("-o" "ControlPath=%t.%%r@%%h:%%p")
                                 ("-o" "ControlMaster=auto")))
     (tramp-copy-keep-date       t)
@@ -179,7 +179,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-async-args           (("-q")))
     (tramp-remote-sh            "/bin/sh")
     (tramp-copy-program         "scp")
-    (tramp-copy-args            (("-P" "%p") ("%k" "-p") ("-q") ("-r")))
+    (tramp-copy-args            (("-P" "%p") ("-p" "%k") ("-q") ("-r")))
     (tramp-copy-keep-date       t)
     (tramp-copy-recursive       t)
     (tramp-gw-args              (("-o" "GlobalKnownHostsFile=/dev/null")
@@ -202,7 +202,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-async-args           (("-q")))
     (tramp-remote-sh            "/bin/sh")
     (tramp-copy-program         "rsync")
-    (tramp-copy-args            (("-e" "ssh") ("%k" "-t") ("-r")))
+    (tramp-copy-args            (("-e" "ssh") ("-t" "%k") ("-r")))
     (tramp-copy-keep-date       t)
     (tramp-copy-keep-tmpfile    t)
     (tramp-copy-recursive       t)))
@@ -217,7 +217,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-async-args           (("-q")))
     (tramp-remote-sh            "/bin/sh")
     (tramp-copy-program         "rsync")
-    (tramp-copy-args            (("%k" "-t") ("-r")))
+    (tramp-copy-args            (("-t" "%k") ("-r")))
     (tramp-copy-env             (("RSYNC_RSH")
                                 (,(concat
                                    "ssh"
@@ -353,7 +353,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh") ("%h")))
     (tramp-remote-sh            "/bin/sh")
     (tramp-copy-program         "pscp")
-    (tramp-copy-args            (("-P" "%p") ("-scp") ("%k" "-p")
+    (tramp-copy-args            (("-P" "%p") ("-scp") ("-p" "%k")
                                 ("-q") ("-r")))
     (tramp-copy-keep-date       t)
     (tramp-copy-recursive       t)
@@ -366,7 +366,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh") ("%h")))
     (tramp-remote-sh            "/bin/sh")
     (tramp-copy-program         "pscp")
-    (tramp-copy-args            (("-P" "%p") ("-sftp") ("%k" "-p")
+    (tramp-copy-args            (("-P" "%p") ("-sftp") ("-p" "%k")
                                 ("-q") ("-r")))
     (tramp-copy-keep-date       t)
     (tramp-copy-recursive       t)
@@ -378,7 +378,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-login-args           (("%h") ("-l" "%u") ("sh" "-i")))
     (tramp-remote-sh            "/bin/sh -i")
     (tramp-copy-program         "fcp")
-    (tramp-copy-args            (("%k" "-p")))
+    (tramp-copy-args            (("-p" "%k")))
     (tramp-copy-keep-date       t)))
 
 ;;;###tramp-autoload
index 1f3064c7066f9d6c5995f0f86436c432d2298b6d..462b8f11397dfad3871b48986d9ce01a94bfb401 100644 (file)
@@ -31,7 +31,7 @@
 ;; should be changed only there.
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.2.1-pre"
+(defconst tramp-version "2.2.1"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
@@ -44,7 +44,7 @@
                      (= emacs-major-version 21)
                      (>= emacs-minor-version 4)))
             "ok"
-          (format "Tramp 2.2.1-pre is not fit for %s"
+          (format "Tramp 2.2.1 is not fit for %s"
                   (when (string-match "^.*$" (emacs-version))
                     (match-string 0 (emacs-version)))))))
   (unless (string-match "\\`ok\\'" x) (error "%s" x)))
index 88f418f934a42a3ee9d06b28c8ab8958aa49111b..40383c6bc31def148a482c0d4a65df0f66c8306d 100644 (file)
@@ -860,27 +860,29 @@ POS and RES.")
                        (car compilation--previous-directory-cache)))
            (prev
             (previous-single-property-change
-             pos 'compilation-directory nil cache)))
-      (cond
-       ((null cache)
-        (setq compilation--previous-directory-cache
-              (cons (copy-marker pos) (copy-marker prev)))
-        prev)
-       ((eq prev cache)
-        (if cache
-            (set-marker (car compilation--previous-directory-cache) pos)
-          (setq compilation--previous-directory-cache
-                (cons (copy-marker pos) nil)))
-        (cdr compilation--previous-directory-cache))
-       (t
-        (if cache
-            (progn
-              (set-marker (car compilation--previous-directory-cache) pos)
-              (setcdr compilation--previous-directory-cache
-                      (copy-marker prev)))
-          (setq compilation--previous-directory-cache
-                (cons (copy-marker pos) (copy-marker prev))))
-        prev)))))
+             pos 'compilation-directory nil cache))
+           (res
+            (cond
+             ((null cache)
+              (setq compilation--previous-directory-cache
+                    (cons (copy-marker pos) (if prev (copy-marker prev))))
+              prev)
+             ((and prev (= prev cache))
+              (if cache
+                  (set-marker (car compilation--previous-directory-cache) pos)
+                (setq compilation--previous-directory-cache
+                      (cons (copy-marker pos) nil)))
+              (cdr compilation--previous-directory-cache))
+             (t
+              (if cache
+                  (progn
+                    (set-marker cache pos)
+                    (setcdr compilation--previous-directory-cache
+                            (copy-marker prev)))
+                (setq compilation--previous-directory-cache
+                      (cons (copy-marker pos) (if prev (copy-marker prev)))))
+              prev))))
+      (if (markerp res) (marker-position res) res))))
 
 ;; Internal function for calculating the text properties of a directory
 ;; change message.  The compilation-directory property is important, because it
@@ -889,7 +891,7 @@ POS and RES.")
 (defun compilation-directory-properties (idx leave)
   (if leave (setq leave (match-end leave)))
   ;; find previous stack, and push onto it, or if `leave' pop it
-  (let ((dir (compilation--previous-directory (point))))
+  (let ((dir (compilation--previous-directory (match-beginning 0))))
     (setq dir (if dir (or (get-text-property (1- dir) 'compilation-directory)
                          (get-text-property dir 'compilation-directory))))
     `(font-lock-face ,(if leave
@@ -948,7 +950,8 @@ POS and RES.")
                             (match-string-no-properties file))))
          (let ((dir
            (unless (file-name-absolute-p file)
-                   (let ((pos (compilation--previous-directory (point))))
+                   (let ((pos (compilation--previous-directory
+                               (match-beginning 0))))
                      (when pos
                        (or (get-text-property (1- pos) 'compilation-directory)
                            (get-text-property pos 'compilation-directory)))))))
index df8cae0a6afd8eda7ef48e42c8a8b3a4d32288b8..cb1903ad96c74896b9bba763612b69c7dcd951a5 100644 (file)
@@ -485,7 +485,13 @@ See variable `server-auth-dir' for details."
                              (file-name-as-directory dir))
                      :warning)
                     (throw :safe t))
-                  (unless (eql uid (user-uid)) ; is the dir ours?
+                  (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))
index a0a16601ed7bfee77e8e00c66830f7cf29d9a4d3..21cb86a984088ebf56f899f875c8d0b288edb1fa 100644 (file)
@@ -435,8 +435,13 @@ If any error occurred in running `bzr status', then return nil."
 (defun vc-bzr-state (file)
   (lexical-let ((result (vc-bzr-status file)))
     (when (consp result)
-      (when (cdr result)
-       (message "Warnings in `bzr' output: %s" (cdr result)))
+      (let ((warnings (cdr result)))
+        (when warnings
+          ;; bzr 2.3.0 returns info about shelves, which is not really a warning
+          (when (string-match "[1-9]+ shel\\(f\\|ves\\) exists?\\..*?\n" warnings)
+            (setq warnings (replace-match "" nil nil warnings)))
+          (unless (string= warnings "")
+            (message "Warnings in `bzr' output: %s" warnings))))
       (cdr (assq (car result)
                  '((added . added)
                    (kindchanged . edited)
index 546b02d2a96107326c8eb6b491018572fa02689b..1bc1e113846a6c9fa7bd5b9dac2c92f6ac5b8972 100644 (file)
@@ -1,13 +1,11 @@
 2011-03-13  Paul Eggert  <eggert@cs.ucla.edu>
 
-       * editfns.c (lisp_time_argument): Check for time stamp overflow.
-
-2011-03-12  Paul Eggert  <eggert@cs.ucla.edu>
-
-       Improve quality of tests for time stamp overflow.  For example,
-       without this patch (encode-time 0 0 0 1 1 1152921504606846976)
-       returns the obviously-bogus value (-948597 62170) on my RHEL 5.5
-       x86-64 host.  With it, it reports time overflow.
+       Improve quality of tests for time stamp overflow.
+       For example, without this patch (encode-time 0 0 0 1 1
+       1152921504606846976) returns the obviously-bogus value (-948597
+       62170) on my RHEL 5.5 x86-64 host.  With the patch, it correctly
+       reports time overflow.  See
+       <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
        * deps.mk (editfns.o): Depend on ../lib/intprops.h.
        * editfns.c: Include limits.h and intprops.h.
        (TIME_T_MIN, TIME_T_MAX): New macros.
@@ -20,8 +18,8 @@
        (Fdecode_time): More accurate test for out-of-range times.
        (check_tm_member): New function.
        (Fencode_time): Use it, to test for out-of-range times.
-
-2011-03-11  Paul Eggert  <eggert@cs.ucla.edu>
+       (lisp_time_argument): Don't rely on undefined left-shift and
+       right-shift behavior when checking for time stamp overflow.
 
        * editfns.c (time_overflow): New function, refactoring common code.
        (Fformat_time_string, Fdecode_time, Fencode_time):
        * editfns.c (make_time): ... here.
        * systime.h: Note the move.
 
+2011-03-12  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * fringe.c (update_window_fringes): Remove unused variables.
+
+       * unexmacosx.c (copy_data_segment): Also copy __got section.
+       (Bug#8223)
+
+2011-03-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * termcap.c [MSDOS]: Include "msdos.h.
+       (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
+       Constify `char *' arguments and their references according to
+       prototypes in tparam.h.
+
+       * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
+
+       * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
+       Adapt all references accordingly.
+
+       * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
+
 2011-03-11  Tom Tromey  <tromey@redhat.com>
 
        * buffer.c (syms_of_buffer): Remove obsolete comment.
index fba856c1be3be9d08c3cade03e8f873f8c332adc..80a5721cf3953c21b63864b0bc2f943c7d11ae76 100644 (file)
@@ -192,7 +192,7 @@ term.o: term.c termchar.h termhooks.h termopts.h lisp.h globals.h $(config_h) \
    cm.h frame.h disptab.h keyboard.h character.h charset.h coding.h ccl.h \
    xterm.h msdos.h window.h keymap.h blockinput.h atimer.h systime.h \
    systty.h syssignal.h tparam.h $(INTERVALS_H) buffer.h ../lib/unistd.h
-termcap.o: termcap.c lisp.h $(config_h)
+termcap.o: termcap.c lisp.h tparam.h msdos.h $(config_h)
 terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \
    keyboard.h lisp.h globals.h $(config_h) dispextern.h composite.h systime.h \
    msdos.h
index 82fc38aee8ae0ac99728fb57d5e97a7e4aa6e90c..ce75df766ee722fdee381f3a973e6fb48ba49100 100644 (file)
@@ -954,18 +954,10 @@ update_window_fringes (struct window *w, int keep_current_p)
           y < yb && rn < nrows;
           y += row->height, ++rn)
        {
-         unsigned indicate_bob_p, indicate_top_line_p;
-         unsigned indicate_eob_p, indicate_bottom_line_p;
-
          row = w->desired_matrix->rows + rn;
          if (!row->enabled_p)
            row = w->current_matrix->rows + rn;
 
-         indicate_bob_p = row->indicate_bob_p;
-         indicate_top_line_p = row->indicate_top_line_p;
-         indicate_eob_p = row->indicate_eob_p;
-         indicate_bottom_line_p = row->indicate_bottom_line_p;
-
          row->indicate_bob_p = row->indicate_top_line_p = 0;
          row->indicate_eob_p = row->indicate_bottom_line_p = 0;
 
index 5d50749cb7ebbc42552ca700b52d606073440fe3..b0bf5c4fdd9e719c11347f45fbbe9112fe830ca2 100644 (file)
@@ -2999,17 +2999,17 @@ XMenuCreate (Display *foo1, Window foo2, char *foo3)
    to do.  */
 
 int
-XMenuAddPane (Display *foo, XMenu *menu, char *txt, int enable)
+XMenuAddPane (Display *foo, XMenu *menu, const char *txt, int enable)
 {
   int len;
-  char *p;
+  const char *p;
 
   if (!enable)
     abort ();
 
   IT_menu_make_room (menu);
   menu->submenu[menu->count] = IT_menu_create ();
-  menu->text[menu->count] = txt;
+  menu->text[menu->count] = (char *)txt;
   menu->panenumber[menu->count] = ++menu->panecount;
   menu->help_text[menu->count] = NULL;
   menu->count++;
index 4bbe9b134de33e00ee79d76dc613373a1d4df57e..5051f2f38378b59c8fefbd3c2cec10e44b847ece 100644 (file)
@@ -105,7 +105,7 @@ typedef struct x_menu_struct
 } XMenu;
 
 XMenu *XMenuCreate (Display *, Window, char *);
-int XMenuAddPane (Display *, XMenu *, char *, int);
+int XMenuAddPane (Display *, XMenu *, const char *, int);
 int XMenuAddSelection (Display *, XMenu *, int, int, char *, int, char *);
 void XMenuLocate (Display *, XMenu *, int, int, int, int,
                  int *, int *, int *, int *);
index 69ce56d93b3d1e3fe3f4d30e77d4d7a32bd5e4fa..27a20a67ae113e803475e9c290b9f0b3a0f8baeb 100644 (file)
@@ -25,6 +25,10 @@ Boston, MA 02110-1301, USA.  */
 #include <unistd.h>
 
 #include "lisp.h"
+#include "tparam.h"
+#ifdef MSDOS
+#include "msdos.h"
+#endif
 
 #ifndef NULL
 #define NULL (char *) 0
@@ -65,7 +69,7 @@ static char *tgetst1 (char *ptr, char **area);
    0 if not found.  */
 
 static char *
-find_capability (register char *bp, register char *cap)
+find_capability (register char *bp, register const char *cap)
 {
   for (; *bp; bp++)
     if (bp[0] == ':'
@@ -76,7 +80,7 @@ find_capability (register char *bp, register char *cap)
 }
 
 int
-tgetnum (char *cap)
+tgetnum (const char *cap)
 {
   register char *ptr = find_capability (term_entry, cap);
   if (!ptr || ptr[-1] != '#')
@@ -85,7 +89,7 @@ tgetnum (char *cap)
 }
 
 int
-tgetflag (char *cap)
+tgetflag (const char *cap)
 {
   register char *ptr = find_capability (term_entry, cap);
   return ptr && ptr[-1] == ':';
@@ -97,7 +101,7 @@ tgetflag (char *cap)
    If AREA is null, space is allocated with `malloc'.  */
 
 char *
-tgetstr (char *cap, char **area)
+tgetstr (const char *cap, char **area)
 {
   register char *ptr = find_capability (term_entry, cap);
   if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~'))
@@ -263,7 +267,7 @@ tgetst1 (char *ptr, char **area)
 char PC;
 
 void
-tputs (register char *str, int nlines, register int (*outfun) (/* ??? */))
+tputs (register const char *str, int nlines, int (*outfun) (int))
 {
   register int padcount = 0;
   register int speed;
@@ -355,7 +359,7 @@ valid_filename_p (fn)
    in it, and some other value otherwise.  */
 
 int
-tgetent (char *bp, char *name)
+tgetent (char *bp, const char *name)
 {
   register char *termcap_name;
   register int fd;
@@ -442,7 +446,7 @@ tgetent (char *bp, char *name)
   buf.size = BUFSIZE;
   /* Add 1 to size to ensure room for terminating null.  */
   buf.beg = (char *) xmalloc (buf.size + 1);
-  term = indirect ? indirect : name;
+  term = indirect ? indirect : (char *)name;
 
   if (!bp)
     {
index 7a55498085dbd2719e4bdfc1ef59766afca4bc1c..2e46c063e952516df2d60d42f651b7300999b540 100644 (file)
@@ -828,6 +828,7 @@ copy_data_segment (struct load_command *lc)
        }
       else if (strncmp (sectp->sectname, "__la_symbol_ptr", 16) == 0
               || strncmp (sectp->sectname, "__nl_symbol_ptr", 16) == 0
+              || strncmp (sectp->sectname, "__got", 16) == 0
               || strncmp (sectp->sectname, "__la_sym_ptr2", 16) == 0
               || strncmp (sectp->sectname, "__dyld", 16) == 0
               || strncmp (sectp->sectname, "__const", 16) == 0