"\\\\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 ©")
+ (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
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.
+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):
@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
+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.
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
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
(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?
@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
+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.
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-prefix, allout-rebullet-heading): Change
SOLICIT arg to INSTEAD, and interpret additionally a string value
as alternate bullet to be used, instead of prompting the user for
a bullet character.
2011-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
;; 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'.")
;; 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)
,@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))
(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\".
+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
(autoload 'secrets-list-collections "secrets")
(autoload 'secrets-search-items "secrets")
+(autoload 'rfc2104-hash "rfc2104")
+
(defvar secrets-enabled)
(defgroup auth-source nil
(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)
;; 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
(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
;; 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)
;; 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
"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))
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 "
"^-- "
(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)
(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
(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
(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")
(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")
(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")
(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)
(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")
(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)))
(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"
(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)
(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)
(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
;; 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
(= 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)))
(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
(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
(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)))))))
(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))
(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)
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.
(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.
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
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;
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++;
} 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 *);
#include <unistd.h>
#include "lisp.h"
+#include "tparam.h"
+#ifdef MSDOS
+#include "msdos.h"
+#endif
#ifndef NULL
#define NULL (char *) 0
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] == ':'
}
int
-tgetnum (char *cap)
+tgetnum (const char *cap)
{
register char *ptr = find_capability (term_entry, cap);
if (!ptr || ptr[-1] != '#')
}
int
-tgetflag (char *cap)
+tgetflag (const char *cap)
{
register char *ptr = find_capability (term_entry, cap);
return ptr && ptr[-1] == ':';
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] != '~'))
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;
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;
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)
{
}
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