Merge from mainline.
This commit is contained in:
commit
3eca462920
37 changed files with 833 additions and 268 deletions
230
admin/admin.el
230
admin/admin.el
|
@ -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 ©")
|
||||
(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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -404,36 +404,45 @@ names, which might cause misalignment of columns in Dired display.
|
|||
@dfn{user-specific application data directory}. The actual location
|
||||
depends on your Windows version and system configuration; typical values
|
||||
are @file{C:\Documents and Settings\@var{username}\Application Data} on
|
||||
Windows 2K/XP and later, and either @file{C:\WINDOWS\Application Data}
|
||||
Windows 2K/XP/2K3, @file{C:\Users\@var{username}\AppData\Roaming} on
|
||||
Windows Vista/7/2K8, and either @file{C:\WINDOWS\Application Data}
|
||||
or @file{C:\WINDOWS\Profiles\@var{username}\Application Data} on the
|
||||
older Windows 9X/ME systems.
|
||||
older Windows 9X/ME systems. If this directory does not exist or
|
||||
cannot be accessed, Emacs falls back to @file{C:\} as the default
|
||||
value of @code{HOME}.
|
||||
|
||||
@code{HOME} can also be set in the system registry, for details see
|
||||
You can override this default value of @code{HOME} by explicitly
|
||||
setting the environment variable @env{HOME} to point to any directory
|
||||
on your system. @env{HOME} can be set either from the command shell
|
||||
prompt or from the @samp{My Computer}s @samp{Properties} dialog.
|
||||
@code{HOME} can also be set in the system registry, for details see
|
||||
@ref{MS-Windows Registry}.
|
||||
|
||||
@cindex init file @file{.emacs} on MS-Windows
|
||||
The home directory is where your init file @file{.emacs} is stored.
|
||||
When Emacs starts, it first checks whether the environment variable
|
||||
@env{HOME} is set. If it is, it looks for the init file in the
|
||||
directory pointed by @env{HOME}. If @env{HOME} is not defined, Emacs
|
||||
checks for an existing @file{.emacs} file in @file{C:\}, the root
|
||||
directory of drive @file{C:}@footnote{
|
||||
The check in @file{C:\} is for compatibility with older versions of Emacs,
|
||||
which didn't check the application data directory.
|
||||
}. If there's no such file in @file{C:\}, Emacs next uses the Windows
|
||||
system calls to find out the exact location of your application data
|
||||
directory. If that system call fails, Emacs falls back to @file{C:\}.
|
||||
For compatibility with older versions of Emacs@footnote{
|
||||
Older versions of Emacs didn't check the application data directory.
|
||||
}, if there is a file named @file{.emacs} in @file{C:\}, the root
|
||||
directory of drive @file{C:}, and @env{HOME} is set neither in the
|
||||
environment nor in the Registry, Emacs will treat @file{C:\} as the
|
||||
default @code{HOME} location, and will not look in the application
|
||||
data directory, even if it exists. Note that only @file{.emacs} is
|
||||
looked for in @file{C:\}; the older name @file{_emacs} (see below) is
|
||||
not. This use of @file{C:\.emacs} to define @code{HOME} is
|
||||
deprecated.
|
||||
|
||||
Whatever the final place is, Emacs sets the value of the @env{HOME}
|
||||
environment variable to point to it, and it will use that location for
|
||||
other files and directories it normally creates in the user's home
|
||||
directory.
|
||||
Whatever the final place is, Emacs sets the internal value of the
|
||||
@env{HOME} environment variable to point to it, and it will use that
|
||||
location for other files and directories it normally looks for or
|
||||
creates in the user's home directory.
|
||||
|
||||
You can always find out where Emacs thinks is your home directory's
|
||||
location by typing @kbd{C-x d ~/ @key{RET}}. This should present the
|
||||
list of files in the home directory, and show its full name on the
|
||||
first line. Likewise, to visit your init file, type @kbd{C-x C-f
|
||||
~/.emacs @key{RET}}.
|
||||
~/.emacs @key{RET}} (assuming the file's name is @file{.emacs}).
|
||||
|
||||
@cindex init file @file{.emacs} on MS-Windows
|
||||
The home directory is where your init file is stored. It can have
|
||||
any name mentioned in @ref{Init File}.
|
||||
|
||||
@cindex @file{_emacs} init file, MS-Windows
|
||||
Because MS-DOS does not allow file names with leading dots, and
|
||||
|
|
|
@ -1,3 +1,26 @@
|
|||
2011-03-12 Teodor Zlatanov <tzz@lifelogs.com>
|
||||
|
||||
* auth.texi (Help for developers): Update docs to explain that the
|
||||
:save-function will only run the first time.
|
||||
|
||||
2011-03-12 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (emacs-faq.html): Fix some more cross-refs.
|
||||
(emacs-faq.text): New target.
|
||||
(clean): Add emacs-faq.
|
||||
|
||||
2011-03-12 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
Sync with Tramp 2.2.1.
|
||||
|
||||
* trampver.texi: Update release number.
|
||||
|
||||
2011-03-11 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (HTML_TARGETS): New.
|
||||
(clean): Delete $HTML_TARGETS.
|
||||
(emacs-faq.html): New, for use with the gnu.org Emacs webpage.
|
||||
|
||||
2011-03-08 Teodor Zlatanov <tzz@lifelogs.com>
|
||||
|
||||
* auth.texi (Help for developers): Show example of using
|
||||
|
|
|
@ -197,6 +197,8 @@ PDF_TARGETS = \
|
|||
widget.pdf \
|
||||
woman.pdf
|
||||
|
||||
HTML_TARGETS = emacs-faq.html
|
||||
|
||||
TEXI2DVI = texi2dvi
|
||||
TEXI2PDF = texi2pdf
|
||||
|
||||
|
@ -401,6 +403,15 @@ faq.dvi: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
|
|||
$(ENVADD) $(TEXI2DVI) $<
|
||||
faq.pdf: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
|
||||
$(ENVADD) $(TEXI2PDF) $<
|
||||
## This is the name used on the Emacs web-page.
|
||||
## sed fixes up links to point to split version of the manual.
|
||||
emacs-faq.html: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) --no-split \
|
||||
--css-ref='/layout.css' --html -o $@ $<
|
||||
sed -i -e 's|a href="\([a-z]*\)\.html#\([^"]*\)"|a href="manual/html_node/\1/\2.html"|g' \
|
||||
-e 's|/Top\.html|/|g' $@
|
||||
emacs-faq.text: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
|
||||
$(MAKEINFO) $(MAKEINFO_OPTS) --plaintext -o $@ $<
|
||||
|
||||
flymake : $(infodir)/flymake
|
||||
$(infodir)/flymake: flymake.texi
|
||||
|
@ -684,7 +695,7 @@ mostlyclean:
|
|||
rm -f gnustmp.*
|
||||
|
||||
clean: mostlyclean
|
||||
rm -f $(DVI_TARGETS) $(PDF_TARGETS)
|
||||
rm -f $(DVI_TARGETS) $(PDF_TARGETS) $(HTML_TARGETS) emacs-faq.text
|
||||
|
||||
distclean: clean
|
||||
# rm -f Makefile
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +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-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.
|
||||
|
@ -47,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-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.
|
||||
|
@ -883,7 +933,7 @@
|
|||
2011-02-17 Ken Manheimer <ken.manheimer@gmail.com>
|
||||
|
||||
* lisp/allout-widgets.el (allout-widgets-icons-light-subdir)
|
||||
(allout-widgets-icons-dark-subdir): Track relocations of icons
|
||||
(allout-widgets-icons-dark-subdir): Track relocations of icons.
|
||||
* lisp/allout.el: Remove commentary about remove encryption
|
||||
passphrase mnemonic support and verification.
|
||||
(allout-encrypt-string): Recognize epg failure to decrypt gpg2
|
||||
|
@ -1260,10 +1310,9 @@
|
|||
|
||||
(allout-auto-activation-helper, allout-setup): New autoloads
|
||||
implement new custom set procedure for allout-auto-activation.
|
||||
Also, explicitly invoke
|
||||
(allout-setup) after allout-auto-activation is custom-defined, to
|
||||
effect the settings in emacs sessions besides the few where
|
||||
allout-auto-activation customization is donea.
|
||||
Also, explicitly invoke (allout-setup) after allout-auto-activation
|
||||
is custom-defined, to affect the settings in emacs sessions besides
|
||||
the few where allout-auto-activation customization is done.
|
||||
(allout-auto-activation): Use allout-auto-activation-helper to
|
||||
:set. Revise the docstring.
|
||||
(allout-init): Reduce functionality to just customizing
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; allout-widgets.el --- Show allout outline structure with graphical widgets.
|
||||
;; allout-widgets.el --- Visually highlight allout outline structure.
|
||||
|
||||
;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Ken Manheimer
|
||||
|
||||
|
@ -238,7 +238,7 @@ buffer, and tracking increases as new widgets are added and
|
|||
decreases as obsolete widgets are garbage collected."
|
||||
:type 'boolean
|
||||
:group 'allout-widgets-developer)
|
||||
(defvar allout-widgets-tally nil
|
||||
(defvar allout-widgets-tally (make-hash-table :test 'eq :weakness 'key)
|
||||
"Hash-table of existing allout widgets, for debugging.
|
||||
|
||||
Table is maintained iff `allout-widgets-maintain-tally' is non-nil.
|
||||
|
|
|
@ -34,7 +34,56 @@
|
|||
;; this depends on the format of list-buffers (from src/buffer.c) and
|
||||
;; on stuff in lisp/buff-menu.el
|
||||
|
||||
(defvar electric-buffer-menu-mode-map nil)
|
||||
(defvar electric-buffer-menu-mode-map
|
||||
(let ((map (make-keymap)))
|
||||
(fillarray (car (cdr map)) 'Electric-buffer-menu-undefined)
|
||||
(define-key map "\e" nil)
|
||||
(define-key map "\C-z" 'suspend-frame)
|
||||
(define-key map "v" 'Electric-buffer-menu-mode-view-buffer)
|
||||
(define-key map (char-to-string help-char) 'Helper-help)
|
||||
(define-key map "?" 'Helper-describe-bindings)
|
||||
(define-key map "\C-c" nil)
|
||||
(define-key map "\C-c\C-c" 'Electric-buffer-menu-quit)
|
||||
(define-key map "\C-]" 'Electric-buffer-menu-quit)
|
||||
(define-key map "q" 'Electric-buffer-menu-quit)
|
||||
(define-key map " " 'Electric-buffer-menu-select)
|
||||
(define-key map "\C-m" 'Electric-buffer-menu-select)
|
||||
(define-key map "\C-l" 'recenter)
|
||||
(define-key map "s" 'Buffer-menu-save)
|
||||
(define-key map "d" 'Buffer-menu-delete)
|
||||
(define-key map "k" 'Buffer-menu-delete)
|
||||
(define-key map "\C-d" 'Buffer-menu-delete-backwards)
|
||||
;; (define-key map "\C-k" 'Buffer-menu-delete)
|
||||
(define-key map "\177" 'Buffer-menu-backup-unmark)
|
||||
(define-key map "~" 'Buffer-menu-not-modified)
|
||||
(define-key map "u" 'Buffer-menu-unmark)
|
||||
(let ((i ?0))
|
||||
(while (<= i ?9)
|
||||
(define-key map (char-to-string i) 'digit-argument)
|
||||
(define-key map (concat "\e" (char-to-string i)) 'digit-argument)
|
||||
(setq i (1+ i))))
|
||||
(define-key map "-" 'negative-argument)
|
||||
(define-key map "\e-" 'negative-argument)
|
||||
(define-key map "m" 'Buffer-menu-mark)
|
||||
(define-key map "\C-u" 'universal-argument)
|
||||
(define-key map "\C-p" 'previous-line)
|
||||
(define-key map "\C-n" 'next-line)
|
||||
(define-key map "p" 'previous-line)
|
||||
(define-key map "n" 'next-line)
|
||||
(define-key map "\C-v" 'scroll-up)
|
||||
(define-key map "\ev" 'scroll-down)
|
||||
(define-key map ">" 'scroll-right)
|
||||
(define-key map "<" 'scroll-left)
|
||||
(define-key map "\e\C-v" 'scroll-other-window)
|
||||
(define-key map "\e>" 'end-of-buffer)
|
||||
(define-key map "\e<" 'beginning-of-buffer)
|
||||
(define-key map "\e\e" nil)
|
||||
(define-key map "\e\e\e" 'Electric-buffer-menu-quit)
|
||||
;; This binding prevents the "escape => ESC" function-key-map mapping from
|
||||
;; kicking in!
|
||||
;; (define-key map [escape escape escape] 'Electric-buffer-menu-quit)
|
||||
(define-key map [mouse-2] 'Electric-buffer-menu-mouse-select)
|
||||
map))
|
||||
|
||||
(defvar electric-buffer-menu-mode-hook nil
|
||||
"Normal hook run by `electric-buffer-list'.")
|
||||
|
@ -167,55 +216,7 @@ Entry to this mode via command `electric-buffer-list' calls the value of
|
|||
;; generally the same as Buffer-menu-mode-map
|
||||
;; (except we don't indirect to global-map)
|
||||
(put 'Electric-buffer-menu-undefined 'suppress-keymap t)
|
||||
(if electric-buffer-menu-mode-map
|
||||
nil
|
||||
(let ((map (make-keymap)))
|
||||
(fillarray (car (cdr map)) 'Electric-buffer-menu-undefined)
|
||||
(define-key map "\e" nil)
|
||||
(define-key map "\C-z" 'suspend-frame)
|
||||
(define-key map "v" 'Electric-buffer-menu-mode-view-buffer)
|
||||
(define-key map (char-to-string help-char) 'Helper-help)
|
||||
(define-key map "?" 'Helper-describe-bindings)
|
||||
(define-key map "\C-c" nil)
|
||||
(define-key map "\C-c\C-c" 'Electric-buffer-menu-quit)
|
||||
(define-key map "\C-]" 'Electric-buffer-menu-quit)
|
||||
(define-key map "q" 'Electric-buffer-menu-quit)
|
||||
(define-key map " " 'Electric-buffer-menu-select)
|
||||
(define-key map "\C-m" 'Electric-buffer-menu-select)
|
||||
(define-key map "\C-l" 'recenter)
|
||||
(define-key map "s" 'Buffer-menu-save)
|
||||
(define-key map "d" 'Buffer-menu-delete)
|
||||
(define-key map "k" 'Buffer-menu-delete)
|
||||
(define-key map "\C-d" 'Buffer-menu-delete-backwards)
|
||||
;(define-key map "\C-k" 'Buffer-menu-delete)
|
||||
(define-key map "\177" 'Buffer-menu-backup-unmark)
|
||||
(define-key map "~" 'Buffer-menu-not-modified)
|
||||
(define-key map "u" 'Buffer-menu-unmark)
|
||||
(let ((i ?0))
|
||||
(while (<= i ?9)
|
||||
(define-key map (char-to-string i) 'digit-argument)
|
||||
(define-key map (concat "\e" (char-to-string i)) 'digit-argument)
|
||||
(setq i (1+ i))))
|
||||
(define-key map "-" 'negative-argument)
|
||||
(define-key map "\e-" 'negative-argument)
|
||||
(define-key map "m" 'Buffer-menu-mark)
|
||||
(define-key map "\C-u" 'universal-argument)
|
||||
(define-key map "\C-p" 'previous-line)
|
||||
(define-key map "\C-n" 'next-line)
|
||||
(define-key map "p" 'previous-line)
|
||||
(define-key map "n" 'next-line)
|
||||
(define-key map "\C-v" 'scroll-up)
|
||||
(define-key map "\ev" 'scroll-down)
|
||||
(define-key map ">" 'scroll-right)
|
||||
(define-key map "<" 'scroll-left)
|
||||
(define-key map "\e\C-v" 'scroll-other-window)
|
||||
(define-key map "\e>" 'end-of-buffer)
|
||||
(define-key map "\e<" 'beginning-of-buffer)
|
||||
(define-key map "\e\e" nil)
|
||||
(define-key map "\e\e\e" 'Electric-buffer-menu-quit)
|
||||
(define-key map [escape escape escape] 'Electric-buffer-menu-quit)
|
||||
(define-key map [mouse-2] 'Electric-buffer-menu-mouse-select)
|
||||
(setq electric-buffer-menu-mode-map map)))
|
||||
|
||||
|
||||
(defun Electric-buffer-menu-exit ()
|
||||
(interactive)
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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\".
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
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)))
|
||||
|
||||
;; 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)))
|
||||
(if cached
|
||||
(auth-source-do-trivia
|
||||
"auth-source-netrc-saver: found previous run for key %s, returning"
|
||||
key)
|
||||
(with-temp-buffer
|
||||
(when (file-exists-p file)
|
||||
(insert-file-contents file))
|
||||
(when auth-source-gpg-encrypt-to
|
||||
;; (see bug#7487) making `epa-file-encrypt-to' local to
|
||||
;; this buffer lets epa-file skip the key selection query
|
||||
;; (see the `local-variable-p' check in
|
||||
;; `epa-file-write-region').
|
||||
(unless (local-variable-p 'epa-file-encrypt-to (current-buffer))
|
||||
(make-local-variable 'epa-file-encrypt-to))
|
||||
(if (listp auth-source-gpg-encrypt-to)
|
||||
(setq epa-file-encrypt-to auth-source-gpg-encrypt-to)))
|
||||
;; we want the new data to be found first, so insert at beginning
|
||||
(goto-char (point-min))
|
||||
|
||||
(when (get-buffer-window bufname)
|
||||
(delete-window (get-buffer-window bufname)))
|
||||
;; 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)))
|
||||
|
||||
;; make sure the info is not saved
|
||||
(when (null auth-source-save-behavior)
|
||||
(setq add ""))
|
||||
(when (get-buffer-window bufname)
|
||||
(delete-window (get-buffer-window bufname)))
|
||||
|
||||
(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)))))
|
||||
;; 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
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
|
@ -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 "
|
||||
"^-- "
|
||||
|
|
12
lisp/help.el
12
lisp/help.el
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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)))))))
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Fix more problems found by GCC 4.5.2's static checks.
|
||||
|
||||
* gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
|
||||
to unsigned char * to avoid compiler diagnostic.
|
||||
(xg_free_frame_widgets): Make it clear that a local variable is
|
||||
|
@ -22,8 +24,6 @@
|
|||
Mark another local as initialized.
|
||||
(my_png_error, my_error_exit): Mark with NO_RETURN.
|
||||
|
||||
2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* image.c (clear_image_cache): Now static.
|
||||
(DIM, HAVE_STDLIB_H_1): Remove unused macros.
|
||||
(xpm_load): Redo to avoid "discards qualifiers" gcc warning.
|
||||
|
@ -33,6 +33,75 @@
|
|||
(clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
|
||||
(jpeg_load, gif_load): Rename locals to avoid shadowing.
|
||||
|
||||
2011-03-11 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 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.
|
||||
(time_overflow): Move earlier, to before first use.
|
||||
(hi_time, lo_time): New functions, for an accurate test for
|
||||
out-of-range times.
|
||||
(Fcurrent_time, Fget_internal_run_time, make_time): Use them.
|
||||
(Fget_internal_run_time): Don't assume time_t fits in int.
|
||||
(make_time): Use list2 instead of Fcons twice.
|
||||
(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.
|
||||
(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):
|
||||
(Fcurrent_time_string): Use it.
|
||||
|
||||
Move 'make_time' to be next to its inverse 'lisp_time_argument'.
|
||||
* dired.c (make_time): Move to ...
|
||||
* 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.
|
||||
|
||||
2011-03-11 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* termhooks.h (encode_terminal_code): Declare prototype.
|
||||
|
||||
* msdos.c (encode_terminal_code): Don't declare prototype.
|
||||
|
||||
* term.c (encode_terminal_code): Now external again, used by
|
||||
w32console.c and msdos.c.
|
||||
|
||||
* makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)): Depend
|
||||
on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
|
||||
|
||||
2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Fix some minor problems found by GCC 4.5.2's static checks.
|
||||
|
|
|
@ -5332,9 +5332,6 @@ syms_of_buffer (void)
|
|||
Fput (Qprotected_field, Qerror_message,
|
||||
make_pure_c_string ("Attempt to modify a protected field"));
|
||||
|
||||
/* All these use DEFVAR_LISP_NOPRO because the slots in
|
||||
buffer_defaults will all be marked via Vbuffer_defaults. */
|
||||
|
||||
DEFVAR_BUFFER_DEFAULTS ("default-mode-line-format",
|
||||
mode_line_format,
|
||||
doc: /* Default value of `mode-line-format' for buffers that don't override it.
|
||||
|
|
|
@ -87,7 +87,8 @@ dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \
|
|||
msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \
|
||||
lisp.h $(config_h)
|
||||
editfns.o: editfns.c window.h buffer.h systime.h $(INTERVALS_H) character.h \
|
||||
coding.h frame.h blockinput.h atimer.h ../lib/unistd.h ../lib/strftime.h \
|
||||
coding.h frame.h blockinput.h atimer.h \
|
||||
../lib/intprops.h ../lib/strftime.h ../lib/unistd.h \
|
||||
lisp.h globals.h $(config_h)
|
||||
emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \
|
||||
termhooks.h buffer.h atimer.h systime.h $(INTERVALS_H) lisp.h $(config_h) \
|
||||
|
@ -191,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
|
||||
|
|
|
@ -848,13 +848,6 @@ file_name_completion_stat (Lisp_Object dirname, DIRENTRY *dp, struct stat *st_ad
|
|||
return value;
|
||||
}
|
||||
|
||||
Lisp_Object
|
||||
make_time (time_t time)
|
||||
{
|
||||
return Fcons (make_number (time >> 16),
|
||||
Fcons (make_number (time & 0177777), Qnil));
|
||||
}
|
||||
|
||||
static char *
|
||||
stat_uname (struct stat *st)
|
||||
{
|
||||
|
|
133
src/editfns.c
133
src/editfns.c
|
@ -45,6 +45,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include <intprops.h>
|
||||
#include <strftime.h>
|
||||
|
||||
#include "intervals.h"
|
||||
|
@ -87,6 +89,7 @@ extern char **environ;
|
|||
extern Lisp_Object w32_get_internal_run_time (void);
|
||||
#endif
|
||||
|
||||
static void time_overflow (void) NO_RETURN;
|
||||
static int tm_diff (struct tm *, struct tm *);
|
||||
static void find_field (Lisp_Object, Lisp_Object, Lisp_Object,
|
||||
EMACS_INT *, Lisp_Object, EMACS_INT *);
|
||||
|
@ -1414,6 +1417,49 @@ DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0,
|
|||
return make_number (getpid ());
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifndef TIME_T_MIN
|
||||
# define TIME_T_MIN TYPE_MINIMUM (time_t)
|
||||
#endif
|
||||
#ifndef TIME_T_MAX
|
||||
# define TIME_T_MAX TYPE_MAXIMUM (time_t)
|
||||
#endif
|
||||
|
||||
/* Report that a time value is out of range for Emacs. */
|
||||
static void
|
||||
time_overflow (void)
|
||||
{
|
||||
error ("Specified time is not representable");
|
||||
}
|
||||
|
||||
/* Return the upper part of the time T (everything but the bottom 16 bits),
|
||||
making sure that it is representable. */
|
||||
static EMACS_INT
|
||||
hi_time (time_t t)
|
||||
{
|
||||
time_t hi = t >> 16;
|
||||
|
||||
/* Check for overflow, helping the compiler for common cases where
|
||||
no runtime check is needed, and taking care not to convert
|
||||
negative numbers to unsigned before comparing them. */
|
||||
if (! ((! TYPE_SIGNED (time_t)
|
||||
|| MOST_NEGATIVE_FIXNUM <= TIME_T_MIN >> 16
|
||||
|| MOST_NEGATIVE_FIXNUM <= hi)
|
||||
&& (TIME_T_MAX >> 16 <= MOST_POSITIVE_FIXNUM
|
||||
|| hi <= MOST_POSITIVE_FIXNUM)))
|
||||
time_overflow ();
|
||||
|
||||
return hi;
|
||||
}
|
||||
|
||||
/* Return the bottom 16 bits of the time T. */
|
||||
static EMACS_INT
|
||||
lo_time (time_t t)
|
||||
{
|
||||
return t & ((1 << 16) - 1);
|
||||
}
|
||||
|
||||
DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0,
|
||||
doc: /* Return the current time, as the number of seconds since 1970-01-01 00:00:00.
|
||||
The time is returned as a list of three integers. The first has the
|
||||
|
@ -1428,8 +1474,8 @@ resolution finer than a second. */)
|
|||
EMACS_TIME t;
|
||||
|
||||
EMACS_GET_TIME (t);
|
||||
return list3 (make_number ((EMACS_SECS (t) >> 16) & 0xffff),
|
||||
make_number ((EMACS_SECS (t) >> 0) & 0xffff),
|
||||
return list3 (make_number (hi_time (EMACS_SECS (t))),
|
||||
make_number (lo_time (EMACS_SECS (t))),
|
||||
make_number (EMACS_USECS (t)));
|
||||
}
|
||||
|
||||
|
@ -1448,7 +1494,8 @@ on systems that do not provide resolution finer than a second. */)
|
|||
{
|
||||
#ifdef HAVE_GETRUSAGE
|
||||
struct rusage usage;
|
||||
int secs, usecs;
|
||||
time_t secs;
|
||||
int usecs;
|
||||
|
||||
if (getrusage (RUSAGE_SELF, &usage) < 0)
|
||||
/* This shouldn't happen. What action is appropriate? */
|
||||
|
@ -1463,8 +1510,8 @@ on systems that do not provide resolution finer than a second. */)
|
|||
secs++;
|
||||
}
|
||||
|
||||
return list3 (make_number ((secs >> 16) & 0xffff),
|
||||
make_number ((secs >> 0) & 0xffff),
|
||||
return list3 (make_number (hi_time (secs)),
|
||||
make_number (lo_time (secs)),
|
||||
make_number (usecs));
|
||||
#else /* ! HAVE_GETRUSAGE */
|
||||
#ifdef WINDOWSNT
|
||||
|
@ -1476,6 +1523,19 @@ on systems that do not provide resolution finer than a second. */)
|
|||
}
|
||||
|
||||
|
||||
/* Make a Lisp list that represents the time T. */
|
||||
Lisp_Object
|
||||
make_time (time_t t)
|
||||
{
|
||||
return list2 (make_number (hi_time (t)),
|
||||
make_number (lo_time (t)));
|
||||
}
|
||||
|
||||
/* Decode a Lisp list SPECIFIED_TIME that represents a time.
|
||||
If SPECIFIED_TIME is nil, use the current time.
|
||||
Set *RESULT to seconds since the Epoch.
|
||||
If USEC is not null, set *USEC to the microseconds component.
|
||||
Return nonzero if successful. */
|
||||
int
|
||||
lisp_time_argument (Lisp_Object specified_time, time_t *result, int *usec)
|
||||
{
|
||||
|
@ -1496,6 +1556,7 @@ lisp_time_argument (Lisp_Object specified_time, time_t *result, int *usec)
|
|||
else
|
||||
{
|
||||
Lisp_Object high, low;
|
||||
EMACS_INT hi;
|
||||
high = Fcar (specified_time);
|
||||
CHECK_NUMBER (high);
|
||||
low = Fcdr (specified_time);
|
||||
|
@ -1519,8 +1580,21 @@ lisp_time_argument (Lisp_Object specified_time, time_t *result, int *usec)
|
|||
else if (usec)
|
||||
*usec = 0;
|
||||
CHECK_NUMBER (low);
|
||||
*result = (XINT (high) << 16) + (XINT (low) & 0xffff);
|
||||
return *result >> 16 == XINT (high);
|
||||
hi = XINT (high);
|
||||
|
||||
/* Check for overflow, helping the compiler for common cases
|
||||
where no runtime check is needed, and taking care not to
|
||||
convert negative numbers to unsigned before comparing them. */
|
||||
if (! ((TYPE_SIGNED (time_t)
|
||||
? (TIME_T_MIN >> 16 <= MOST_NEGATIVE_FIXNUM
|
||||
|| TIME_T_MIN >> 16 <= hi)
|
||||
: 0 <= hi)
|
||||
&& (MOST_POSITIVE_FIXNUM <= TIME_T_MAX >> 16
|
||||
|| hi <= TIME_T_MAX >> 16)))
|
||||
return 0;
|
||||
|
||||
*result = (hi << 16) + (XINT (low) & 0xffff);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1674,7 +1748,7 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */)
|
|||
tm = ut ? gmtime (&value) : localtime (&value);
|
||||
UNBLOCK_INPUT;
|
||||
if (! tm)
|
||||
error ("Specified time is not representable");
|
||||
time_overflow ();
|
||||
|
||||
synchronize_system_time_locale ();
|
||||
|
||||
|
@ -1732,8 +1806,10 @@ DOW and ZONE.) */)
|
|||
BLOCK_INPUT;
|
||||
decoded_time = localtime (&time_spec);
|
||||
UNBLOCK_INPUT;
|
||||
if (! decoded_time)
|
||||
error ("Specified time is not representable");
|
||||
if (! (decoded_time
|
||||
&& MOST_NEGATIVE_FIXNUM - TM_YEAR_BASE <= decoded_time->tm_year
|
||||
&& decoded_time->tm_year <= MOST_POSITIVE_FIXNUM - TM_YEAR_BASE))
|
||||
time_overflow ();
|
||||
XSETFASTINT (list_args[0], decoded_time->tm_sec);
|
||||
XSETFASTINT (list_args[1], decoded_time->tm_min);
|
||||
XSETFASTINT (list_args[2], decoded_time->tm_hour);
|
||||
|
@ -1757,6 +1833,20 @@ DOW and ZONE.) */)
|
|||
return Flist (9, list_args);
|
||||
}
|
||||
|
||||
/* Return OBJ - OFFSET, checking that OBJ is a valid fixnum and that
|
||||
the result is representable as an int. Assume OFFSET is small and
|
||||
nonnegative. */
|
||||
static int
|
||||
check_tm_member (Lisp_Object obj, int offset)
|
||||
{
|
||||
EMACS_INT n;
|
||||
CHECK_NUMBER (obj);
|
||||
n = XINT (obj);
|
||||
if (! (INT_MIN + offset <= n && n - offset <= INT_MAX))
|
||||
time_overflow ();
|
||||
return n - offset;
|
||||
}
|
||||
|
||||
DEFUN ("encode-time", Fencode_time, Sencode_time, 6, MANY, 0,
|
||||
doc: /* Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time.
|
||||
This is the reverse operation of `decode-time', which see.
|
||||
|
@ -1785,19 +1875,12 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */)
|
|||
struct tm tm;
|
||||
Lisp_Object zone = (nargs > 6 ? args[nargs - 1] : Qnil);
|
||||
|
||||
CHECK_NUMBER (args[0]); /* second */
|
||||
CHECK_NUMBER (args[1]); /* minute */
|
||||
CHECK_NUMBER (args[2]); /* hour */
|
||||
CHECK_NUMBER (args[3]); /* day */
|
||||
CHECK_NUMBER (args[4]); /* month */
|
||||
CHECK_NUMBER (args[5]); /* year */
|
||||
|
||||
tm.tm_sec = XINT (args[0]);
|
||||
tm.tm_min = XINT (args[1]);
|
||||
tm.tm_hour = XINT (args[2]);
|
||||
tm.tm_mday = XINT (args[3]);
|
||||
tm.tm_mon = XINT (args[4]) - 1;
|
||||
tm.tm_year = XINT (args[5]) - TM_YEAR_BASE;
|
||||
tm.tm_sec = check_tm_member (args[0], 0);
|
||||
tm.tm_min = check_tm_member (args[1], 0);
|
||||
tm.tm_hour = check_tm_member (args[2], 0);
|
||||
tm.tm_mday = check_tm_member (args[3], 0);
|
||||
tm.tm_mon = check_tm_member (args[4], 1);
|
||||
tm.tm_year = check_tm_member (args[5], TM_YEAR_BASE);
|
||||
tm.tm_isdst = -1;
|
||||
|
||||
if (CONSP (zone))
|
||||
|
@ -1846,7 +1929,7 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */)
|
|||
}
|
||||
|
||||
if (time == (time_t) -1)
|
||||
error ("Specified time is not representable");
|
||||
time_overflow ();
|
||||
|
||||
return make_time (time);
|
||||
}
|
||||
|
@ -1881,7 +1964,7 @@ but this is considered obsolete. */)
|
|||
tm = localtime (&value);
|
||||
UNBLOCK_INPUT;
|
||||
if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year) && (tem = asctime (tm))))
|
||||
error ("Specified time is not representable");
|
||||
time_overflow ();
|
||||
|
||||
/* Remove the trailing newline. */
|
||||
tem[strlen (tem) - 1] = '\0';
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -1466,6 +1466,7 @@ $(BLD)/term.$(O) : \
|
|||
$(SRC)/termchar.h \
|
||||
$(SRC)/termhooks.h \
|
||||
$(SRC)/termopts.h \
|
||||
$(SRC)/tparam.h \
|
||||
$(SRC)/w32gui.h \
|
||||
$(SRC)/window.h
|
||||
|
||||
|
@ -1498,6 +1499,7 @@ $(BLD)/textprop.$(O) : \
|
|||
|
||||
$(BLD)/tparam.$(O) : \
|
||||
$(SRC)/tparam.c \
|
||||
$(SRC)/tparam.h \
|
||||
$(CONFIG_H) \
|
||||
$(LISP_H)
|
||||
|
||||
|
|
|
@ -844,6 +844,7 @@ IT_set_face (int face)
|
|||
|
||||
extern unsigned char *encode_terminal_code (struct glyph *, int,
|
||||
struct coding_system *);
|
||||
|
||||
static void
|
||||
IT_write_glyphs (struct frame *f, struct glyph *str, int str_len)
|
||||
{
|
||||
|
@ -2998,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++;
|
||||
|
|
|
@ -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 *);
|
||||
|
|
|
@ -144,10 +144,8 @@ extern void set_waiting_for_input (EMACS_TIME *);
|
|||
happen when this files is used outside the src directory).
|
||||
Use GCPRO1 to determine if lisp.h was included. */
|
||||
#ifdef GCPRO1
|
||||
/* defined in dired.c */
|
||||
extern Lisp_Object make_time (time_t);
|
||||
|
||||
/* defined in editfns.c*/
|
||||
extern Lisp_Object make_time (time_t);
|
||||
extern int lisp_time_argument (Lisp_Object, time_t *, int *);
|
||||
#endif
|
||||
|
||||
|
@ -172,4 +170,3 @@ extern int lisp_time_argument (Lisp_Object, time_t *, int *);
|
|||
#define EMACS_TIME_LE(T1, T2) (EMACS_TIME_CMP (T1, T2) <= 0)
|
||||
|
||||
#endif /* EMACS_SYSTIME_H */
|
||||
|
||||
|
|
|
@ -501,7 +501,7 @@ static int encode_terminal_dst_size;
|
|||
Set CODING->produced to the byte-length of the resulting byte
|
||||
sequence, and return a pointer to that byte sequence. */
|
||||
|
||||
static unsigned char *
|
||||
unsigned char *
|
||||
encode_terminal_code (struct glyph *src, int src_len, struct coding_system *coding)
|
||||
{
|
||||
struct glyph *src_end = src + src_len;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -654,6 +654,9 @@ extern void delete_terminal (struct terminal *);
|
|||
/* The initial terminal device, created by initial_term_init. */
|
||||
extern struct terminal *initial_terminal;
|
||||
|
||||
extern unsigned char *encode_terminal_code (struct glyph *, int,
|
||||
struct coding_system *);
|
||||
|
||||
#ifdef HAVE_GPM
|
||||
extern void close_gpm (int gpm_fd);
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue