Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 101781. ------------------------------------------------------------ revno: 101781 committer: Glenn Morris branch nick: trunk timestamp: Sun 2010-10-03 18:19:56 -0700 message: Minor appt.el changes. * lisp/calendar/appt.el (appt-add): Ensure reminders are enabled. (appt-activate): Give status messages. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-04 01:16:00 +0000 +++ lisp/ChangeLog 2010-10-04 01:19:56 +0000 @@ -1,3 +1,8 @@ +2010-10-04 Glenn Morris + + * calendar/appt.el (appt-add): Ensure reminders are enabled. + (appt-activate): Give status messages. + 2010-10-03 Teodor Zlatanov * net/gnutls.el: Improve docs. Remove starttls and ssl emulation. === modified file 'lisp/calendar/appt.el' --- lisp/calendar/appt.el 2010-10-03 01:56:11 +0000 +++ lisp/calendar/appt.el 2010-10-04 01:19:56 +0000 @@ -446,6 +446,7 @@ (and warntime (not (integerp warntime)) (error "Argument WARNTIME must be an integer, or nil")) + (or appt-timer (appt-activate)) (let ((time-msg (list (list (appt-convert-time time)) (concat time " " msg) t))) ;; It is presently non-sensical to have multiple warnings about @@ -618,13 +619,16 @@ (when appt-timer (cancel-timer appt-timer) (setq appt-timer nil)) - (when appt-active - (diary-check-diary-file) - (add-hook 'write-file-functions 'appt-update-list) - (setq appt-timer (run-at-time t 60 'appt-check) - global-mode-string - (append global-mode-string '(appt-mode-string))) - (appt-check t)))) + (if appt-active + (progn + (diary-check-diary-file) + (add-hook 'write-file-functions 'appt-update-list) + (setq appt-timer (run-at-time t 60 'appt-check) + global-mode-string + (append global-mode-string '(appt-mode-string))) + (appt-check t) + (message "Appointment reminders enabled")) + (message "Appointment reminders disabled")))) (provide 'appt) ------------------------------------------------------------ revno: 101780 committer: Ted Zlatanov branch nick: quickfixes timestamp: Sun 2010-10-03 20:16:00 -0500 message: Provide GnuTLS API with `gnutls-negotiate' and `open-gnutls-stream'. * net/gnutls.el: Improve docs. Remove starttls and ssl emulation. Provide only `open-gnutls-stream' (formerly `open-ssl-stream') and `gnutls-negotiate' (formerly `starttls-negotiate'). Remove trivial wrapper `starttls-open-stream'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-04 00:26:41 +0000 +++ lisp/ChangeLog 2010-10-04 01:16:00 +0000 @@ -1,3 +1,10 @@ +2010-10-03 Teodor Zlatanov + + * net/gnutls.el: Improve docs. Remove starttls and ssl emulation. + Provide only `open-gnutls-stream' (formerly `open-ssl-stream') and + `gnutls-negotiate' (formerly `starttls-negotiate'). Remove + trivial wrapper `starttls-open-stream'. + 2010-10-03 Dan Nicolaescu Make 'g' (AKA revert-buffer) rerun the VC log, log-incoming and === modified file 'lisp/net/gnutls.el' --- lisp/net/gnutls.el 2010-10-03 22:37:37 +0000 +++ lisp/net/gnutls.el 2010-10-04 01:16:00 +0000 @@ -1,9 +1,10 @@ -;;; gnutls.el --- Support SSL and TLS connections through GnuTLS +;;; gnutls.el --- Support SSL/TLS connections through GnuTLS ;; Copyright (C) 2010 Free Software Foundation, Inc. ;; Author: Ted Zlatanov ;; Keywords: comm, tls, ssl, encryption ;; Originally-By: Simon Josefsson (See http://josefsson.org/emacs-security/) +;; Thanks-To: Lars Magne Ingebrigtsen ;; This file is part of GNU Emacs. @@ -27,8 +28,8 @@ ;; Simple test: ;; -;; (setq jas (open-ssl-stream "ssl" (current-buffer) "www.pdc.kth.se" 443)) -;; (process-send-string jas "GET /\r\n\r\n") +;; (open-gnutls-stream "tls" "tls-buffer" "yourserver.com" "https") +;; (open-gnutls-stream "tls" "tls-buffer" "imap.gmail.com" "imaps") ;;; Code: @@ -42,8 +43,8 @@ :type 'integer :group 'gnutls) -(defun open-ssl-stream (name buffer host service) - "Open a SSL connection for a service to a host. +(defun open-gnutls-stream (name buffer host service) + "Open a SSL/TLS connection for a service to a host. Returns a subprocess-object to represent the connection. Input and output work as for subprocesses; `delete-process' closes it. Args are NAME BUFFER HOST SERVICE. @@ -55,15 +56,18 @@ with any buffer Third arg is name of the host to connect to, or its IP address. Fourth arg SERVICE is name of the service desired, or an integer -specifying a port number to connect to." +specifying a port number to connect to. + +This is a very simple wrapper around `gnutls-negotiate'. See its +documentation for the specific parameters you can use to open a +GnuTLS connection, including specifying the credential type, +trust and key files, and priority string." (let ((proc (open-network-stream name buffer host service))) - (starttls-negotiate proc 'gnutls-x509pki))) + (gnutls-negotiate proc 'gnutls-x509pki))) -;; (open-ssl-stream "tls" "tls-buffer" "yourserver.com" "https") -;; (open-ssl-stream "tls" "tls-buffer" "imap.gmail.com" "imaps") -(defun starttls-negotiate (proc type &optional priority-string - trustfiles keyfiles) - "Negotiate a SSL or TLS connection. +(defun gnutls-negotiate (proc type &optional priority-string + trustfiles keyfiles) + "Negotiate a SSL/TLS connection. TYPE is `gnutls-x509pki' (default) or `gnutls-anon'. Use nil for the default. PROC is a process returned by `open-network-stream'. PRIORITY-STRING is as per the GnuTLS docs, default is \"NORMAL\". @@ -91,22 +95,6 @@ proc)) -(defun starttls-open-stream (name buffer host service) - "Open a TLS connection for a service to a host. -Returns a subprocess-object to represent the connection. -Input and output work as for subprocesses; `delete-process' closes it. -Args are NAME BUFFER HOST SERVICE. -NAME is name for process. It is modified if necessary to make it unique. -BUFFER is the buffer (or `buffer-name') to associate with the process. - Process output goes at end of that buffer, unless you specify - an output stream or filter function to handle the output. - BUFFER may be also nil, meaning that this process is not associated - with any buffer -Third arg is name of the host to connect to, or its IP address. -Fourth arg SERVICE is name of the service desired, or an integer -specifying a port number to connect to." - (open-network-stream name buffer host service)) - (defun gnutls-message-maybe (doit format &rest params) "When DOIT, message with the caller name followed by FORMAT on PARAMS." ;; (apply 'debug format (or params '(nil))) @@ -116,8 +104,6 @@ doit (gnutls-error-string doit) (apply 'format format (or params '(nil)))))) -(provide 'ssl) (provide 'gnutls) -(provide 'starttls) ;;; gnutls.el ends here ------------------------------------------------------------ revno: 101779 committer: Glenn Morris branch nick: trunk timestamp: Sun 2010-10-03 17:55:42 -0700 message: * doc/lispref/Makefile.in ($(infodir)/elisp): Fix -I typo. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2010-10-04 00:49:20 +0000 +++ doc/lispref/ChangeLog 2010-10-04 00:55:42 +0000 @@ -2,6 +2,7 @@ * Makefile.in (dvi, pdf, $(infodir)): New targets. ($(infodir)/elisp): Ensure target directory exists. Use $@. + Fix -I typo. (clean): No 'make.out' or 'core' files. (.PHONY): Declare clean rules. (maintainer-clean): Delete pdf file. Guard against cd failures. === modified file 'doc/lispref/Makefile.in' --- doc/lispref/Makefile.in 2010-10-04 00:49:20 +0000 +++ doc/lispref/Makefile.in 2010-10-04 00:55:42 +0000 @@ -100,9 +100,8 @@ $(infodir): mkdir $@ -## FIXME ? -I$infodir is that right, or should it be texinfodir? $(infodir)/elisp: $(infodir) $(srcs) - cd $(srcdir); $(MAKEINFO) -I. -I$(infodir) elisp.texi -o $@ + cd $(srcdir); $(MAKEINFO) -I. -I$(texinfodir) elisp.texi -o $@ elisp.dvi: $(srcs) $(TEXI2DVI) -I $(srcdir) -I $(texinfodir) $(srcdir)/elisp.texi ------------------------------------------------------------ revno: 101778 committer: Glenn Morris branch nick: trunk timestamp: Sun 2010-10-03 17:49:20 -0700 message: Minor doc Makefile.in clean-up. * doc/emacs/Makefile.in (SHELL): Set it. (INFO_TARGETS, DVI_TARGETS): Remove variables. (info, dvi): Replace above variables with their expansions. (info): Move mkdir from here... ($(infodir)/emacs): ... to here (for parallel builds). (pdf): New target. ($(infodir)/emacs): Pass -o option to makeinfo. (.PHONY): Declare clean rules. (maintainer-clean): Delete dvi and pdf files. Guard against cd failures. Use a more restrictive delete. * doc/lispref/Makefile.in (dvi, pdf, $(infodir)): New targets. ($(infodir)/elisp): Ensure target directory exists. Use $@. (clean): No 'make.out' or 'core' files. (.PHONY): Declare clean rules. (maintainer-clean): Delete pdf file. Guard against cd failures. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2010-10-02 02:46:13 +0000 +++ doc/emacs/ChangeLog 2010-10-04 00:49:20 +0000 @@ -1,3 +1,16 @@ +2010-10-04 Glenn Morris + + * Makefile.in (SHELL): Set it. + (INFO_TARGETS, DVI_TARGETS): Remove variables. + (info, dvi): Replace above variables with their expansions. + (info): Move mkdir from here... + ($(infodir)/emacs): ... to here (for parallel builds). + (pdf): New target. + ($(infodir)/emacs): Pass -o option to makeinfo. + (.PHONY): Declare clean rules. + (maintainer-clean): Delete dvi and pdf files. + Guard against cd failures. Use a more restrictive delete. + 2010-10-02 Glenn Morris * misc.texi (Shell Mode): Remove reference to old function name. === modified file 'doc/emacs/Makefile.in' --- doc/emacs/Makefile.in 2010-09-29 04:25:59 +0000 +++ doc/emacs/Makefile.in 2010-10-04 00:49:20 +0000 @@ -19,6 +19,7 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . +SHELL = /bin/sh # Where to find the source code. $(srcdir) will be the man # subdirectory of the source tree. This is @@ -38,10 +39,6 @@ # Use --force so that it generates output even if there are errors. MAKEINFO = makeinfo --force -INFO_TARGETS = $(infodir)/emacs -DVI_TARGETS = emacs.dvi - - TEXI2DVI = texi2dvi TEXI2PDF = texi2pdf @@ -111,22 +108,22 @@ ${srcdir}/kmacro.texi \ $(EMACS_XTRA) -info: $(infodir) $(INFO_TARGETS) +info: $(infodir)/emacs $(infodir): mkdir $@ -dvi: $(DVI_TARGETS) +dvi: emacs.dvi +pdf: emacs.pdf -# Note that all the Info targets build the Info files -# in srcdir. There is no provision for Info files -# to exist in the build directory. +# Note that all the Info targets build the Info files in srcdir. +# There is no provision for Info files to exist in the build directory. # In a distribution of Emacs, the Info files should be up to date. emacs : $(infodir)/emacs -$(infodir)/emacs: ${EMACSSOURCES} - cd $(srcdir); $(MAKEINFO) emacs.texi +$(infodir)/emacs: $(infodir) ${EMACSSOURCES} + cd $(srcdir); $(MAKEINFO) emacs.texi -o $@ emacs.dvi: ${EMACSSOURCES} $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi @@ -141,6 +138,7 @@ emacs-xtra.pdf: emacs-xtra.texi $(EMACS_XTRA) $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi +.PHONY: mostlyclean clean distclean maintainer-clean mostlyclean: rm -f *.log *.cp *.fn *.ky *.op *.ops *.pg *.vr core *.tp *.core @@ -153,14 +151,7 @@ # rm -f Makefile maintainer-clean: distclean - for file in $(INFO_TARGETS); do rm -f $${file}*; done - - -# Formerly this directory had texindex.c and getopt.c in it -# and this makefile built them to make texindex. -# That caused trouble because this is run entirely in the source directory. -# Since we expect to get texi2dvi from elsewhere, -# it is ok to expect texindex from elsewhere also. - + rm -f emacs.dvi emacs.pdf + -cd $(infodir) && rm -f emacs emacs-[1-9] emacs-[1-9][0-9] ### Makefile ends here === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2010-10-03 21:23:13 +0000 +++ doc/lispref/ChangeLog 2010-10-04 00:49:20 +0000 @@ -1,3 +1,11 @@ +2010-10-04 Glenn Morris + + * Makefile.in (dvi, pdf, $(infodir)): New targets. + ($(infodir)/elisp): Ensure target directory exists. Use $@. + (clean): No 'make.out' or 'core' files. + (.PHONY): Declare clean rules. + (maintainer-clean): Delete pdf file. Guard against cd failures. + 2010-10-03 Glenn Morris * files.texi (File Name Components): Remove ignored section about === modified file 'doc/lispref/Makefile.in' --- doc/lispref/Makefile.in 2010-01-13 08:35:10 +0000 +++ doc/lispref/Makefile.in 2010-10-04 00:49:20 +0000 @@ -92,14 +92,17 @@ $(srcdir)/gpl.texi \ $(srcdir)/doclicense.texi - -.PHONY: clean - # The info file is named `elisp'. info: $(infodir)/elisp - -$(infodir)/elisp: $(srcs) - cd $(srcdir); $(MAKEINFO) -I. -I$(infodir) elisp.texi -o $(infodir)/elisp +dvi: elisp.dvi +pdf: elisp.pdf + +$(infodir): + mkdir $@ + +## FIXME ? -I$infodir is that right, or should it be texinfodir? +$(infodir)/elisp: $(infodir) $(srcs) + cd $(srcdir); $(MAKEINFO) -I. -I$(infodir) elisp.texi -o $@ elisp.dvi: $(srcs) $(TEXI2DVI) -I $(srcdir) -I $(texinfodir) $(srcdir)/elisp.texi @@ -107,13 +110,16 @@ elisp.pdf: $(srcs) $(TEXI2PDF) -I $(srcdir) -I $(texinfodir) $(srcdir)/elisp.texi +.PHONY: clean distclean maintainer-clean + clean: rm -f *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \ *.vr *.vrs *.pg *.pgs *.ky *.kys elisp[12]* - rm -f make.out core distclean: clean maintainer-clean: clean - rm -f elisp.dvi elisp.oaux - cd $(infodir); rm -f elisp elisp-[1-9] elisp-[1-9][0-9] + rm -f elisp.dvi elisp.pdf elisp.oaux + -cd $(infodir) && rm -f elisp elisp-[1-9] elisp-[1-9][0-9] + +### Makefile ends here ------------------------------------------------------------ revno: 101777 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-10-03 17:43:11 -0700 message: Mention the 'g' binding in VC diff,log, etc. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-10-03 21:23:13 +0000 +++ etc/NEWS 2010-10-04 00:43:11 +0000 @@ -318,6 +318,10 @@ *** New key bindings: C-x v I and C-x v O bound to vc-log-incoming and vc-log-outgoing, respectively. +*** The 'g' key in VC diff, log, log-incoming and log-outgoing buffers +reruns the corresponding VC command to compute an up to date version +of the buffer. + *** vc-dir for Bzr supports viewing shelve contents and shelving snapshots. *** Special markup can be added to log-edit buffers. ------------------------------------------------------------ revno: 101776 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-10-03 17:26:41 -0700 message: Make 'g' (AKA revert-buffer) rerun the VC log, log-incoming and log-outgoing commands. * lisp/vc/vc.el (vc-log-internal-common): Add a new argument and use it to create a buffer local revert-buffer-function variable. (vc-print-log-internal, vc-log-incoming, vc-log-outgoing): Pass a revert-buffer-function lambda. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-03 22:37:37 +0000 +++ lisp/ChangeLog 2010-10-04 00:26:41 +0000 @@ -1,3 +1,12 @@ +2010-10-03 Dan Nicolaescu + + Make 'g' (AKA revert-buffer) rerun the VC log, log-incoming and + log-outgoing commands. + * vc/vc.el (vc-log-internal-common): Add a new argument and use it + to create a buffer local revert-buffer-function variable. + (vc-print-log-internal, vc-log-incoming, vc-log-outgoing): Pass a + revert-buffer-function lambda. + 2010-10-03 Teodor Zlatanov * net/gnutls.el (starttls-negotiate): Use the plist interface to === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2010-10-03 21:05:47 +0000 +++ lisp/vc/vc.el 2010-10-04 00:26:41 +0000 @@ -2027,8 +2027,10 @@ (setq type (if vc-short-log 'short 'long)) (lexical-let ((working-revision working-revision) + (backend backend) (limit limit) (shortlog vc-short-log) + (files files) (is-start-revision is-start-revision)) (vc-log-internal-common backend buffer-name files type @@ -2039,7 +2041,9 @@ (vc-print-log-setup-buttons working-revision is-start-revision limit ret)) (lambda (bk) - (vc-call-backend bk 'show-log-entry working-revision)))))) + (vc-call-backend bk 'show-log-entry working-revision)) + (lambda (ignore-auto noconfirm) + (vc-print-log-internal backend files working-revision is-start-revision limit)))))) (defvar vc-log-view-type nil "Set this to differentiate the different types of logs.") @@ -2051,7 +2055,8 @@ type backend-func setup-buttons-func - goto-location-func) + goto-location-func + rev-buff-func) (let (retval) (with-current-buffer (get-buffer-create buffer-name) (set (make-local-variable 'vc-log-view-type) type)) @@ -2062,7 +2067,9 @@ ;; to t, so let's keep doing it, just in case. (vc-call-backend backend 'log-view-mode) (set (make-local-variable 'log-view-vc-backend) backend) - (set (make-local-variable 'log-view-vc-fileset) files)) + (set (make-local-variable 'log-view-vc-fileset) files) + (set (make-local-variable 'revert-buffer-function) + rev-buff-func)) (vc-exec-after `(let ((inhibit-read-only t)) (funcall ',setup-buttons-func ',backend ',files ',retval) @@ -2080,7 +2087,14 @@ (vc-call-backend bk type-arg buf remote-location))) (lambda (bk files-arg ret)) (lambda (bk) - (goto-char (point-min))))) + (goto-char (point-min))) + (lexical-let + ((backend backend) + (remote-location remote-location) + (buffer-name buffer-name) + (type type)) + (lambda (ignore-auto noconfirm) + (vc-incoming-outgoing-internal backend remote-location buffer-name type))))) ;;;###autoload (defun vc-print-log (&optional working-revision limit) @@ -2140,8 +2154,11 @@ ;;;###autoload (defun vc-log-incoming (&optional remote-location) - "Show a log of changes that will be received with a pull operation from REMOTE-LOCATION." - (interactive "sRemote location (empty for default): ") + "Show a log of changes that will be received with a pull operation from REMOTE-LOCATION. +When called interactively with a prefix argument, prompt for REMOTE-LOCATION.." + (interactive + (when current-prefix-arg + (list (read-string "Remote location (empty for default): ")))) (let ((backend (vc-deduce-backend)) rootdir working-revision) (unless backend @@ -2150,8 +2167,11 @@ ;;;###autoload (defun vc-log-outgoing (&optional remote-location) - "Show a log of changes that will be sent with a push operation to REMOTE-LOCATION." - (interactive "sRemote location (empty for default): ") + "Show a log of changes that will be sent with a push operation to REMOTE-LOCATION. +When called interactively with a prefix argument, prompt for REMOTE-LOCATION." + (interactive + (when current-prefix-arg + (list (read-string "Remote location (empty for default): ")))) (let ((backend (vc-deduce-backend)) rootdir working-revision) (unless backend ------------------------------------------------------------ revno: 101775 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-10-04 00:17:16 +0000 message: Merge changes made in Gnus trunk. shr.el: Rename the tag functions a bit, and add some new ones. gnus-sum.el (gnus-summary-select-article-buffer): If the article buffer isn't shown, then select the current article first instead of bugging out. gnus-sum.el (gnus-summary-select-article-buffer): Show both the article and summary buffers again. shr.el (shr-tag-blockquote): Convert name. shr.el (shr-rescale-image): Use the right image-size variant. shr.el (shr-tag-p): Don't insert newlines at the start of the buffer. shr.el: Implement indentation in blockquotes. gnus-sum.el (gnus-summary-select-article-buffer): Really select the article buffer again. shr.el (shr-ensure-paragraph): Don't insert newlines on empty tags at the beginning of the buffer. gnus-ems.el, gnus-util.el, mm-decode.el, mm-view.el: Add resize for large images in mm. gnus-html.el (gnus-html-put-image): Use gnus-rescale-image. shr.el (shr-tag-p): Don't insert newlines on empty tags at the beginning of the buffer. gnus-ems.el, gnus-html.el, gnus-util.el, mm-decode.el, mm-view.el: Support image resizing. shr.el: Add headings. shr.el (shr-ensure-paragraph): Actually work. shr.el (shr-tag-li): Make
    prettier. shr.el (shr-insert): Get white space at the beginning/end of elements right. shr.el (shr-tag-li): Tweak
  • rendering. shr.el (shr-tag-p): Collapse subsequent

    s. shr.el (shr-ensure-paragraph): Don't insert double line feeds after blank lines. shr.el (shr-tag-h6): Add. shr.el (shr-insert): \t is also space. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-10-03 15:09:11 +0000 +++ doc/misc/ChangeLog 2010-10-04 00:17:16 +0000 @@ -1,3 +1,9 @@ +2010-10-03 Julien Danjou + + * emacs-mime.texi (Display Customization): Update + mm-inline-large-images documentation and add documentation for + mm-inline-large-images-proportion. + 2010-10-03 Michael Albinus * tramp.texi (Frequently Asked Questions): Mention === modified file 'doc/misc/emacs-mime.texi' --- doc/misc/emacs-mime.texi 2010-09-20 23:44:05 +0000 +++ doc/misc/emacs-mime.texi 2010-10-04 00:17:16 +0000 @@ -374,12 +374,18 @@ @vindex mm-inline-large-images When displaying inline images that are larger than the window, Emacs does not enable scrolling, which means that you cannot see the whole -image. To prevent this, the library tries to determine the image size +image. To prevent this, the library tries to determine the image size before displaying it inline, and if it doesn't fit the window, the library will display it externally (e.g. with @samp{ImageMagick} or -@samp{xv}). Setting this variable to @code{t} disables this check and +@samp{xv}). Setting this variable to @code{t} disables this check and makes the library display all inline images as inline, regardless of -their size. +their size. If you set this variable to @code{resize}, the image will +be displayed resized to fit in the window, if Emacs has the ability to +resize images. + +@item mm-inline-large-images-proportion +@vindex mm-inline-images-max-proportion +The proportion used when resizing large images. @item mm-inline-override-types @vindex mm-inline-override-types === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-03 19:54:31 +0000 +++ lisp/gnus/ChangeLog 2010-10-04 00:17:16 +0000 @@ -1,3 +1,61 @@ +2010-10-03 Lars Magne Ingebrigtsen + + * shr.el: Add headings. + (shr-ensure-paragraph): Actually work. + (shr-tag-li): Make

      prettier. + (shr-insert): Get white space at the beginning/end of elements right. + (shr-tag-p): Collapse subsequent

      s. + (shr-ensure-paragraph): Don't insert double line feeds after blank + lines. + (shr-insert): \t is also space. + (shr-tag-s): Fix "s" tag name function. + (shr-tag-s): Fix face prop name. + +2010-10-03 Julien Danjou + + * gnus-html.el (gnus-html-put-image): Use gnus-rescale-image. + + * mm-view.el (gnus-window-inside-pixel-edges): Add autoload for + gnus-window-inside-pixel-edges. + + * gnus-ems.el (gnus-window-inside-pixel-edges): Move from gnus-html to + gnus-ems. + + * mm-view.el (mm-inline-image-emacs): Support image resizing. + + * gnus-util.el (gnus-rescale-image): Add generic gnus-rescale-image + function. + + * mm-decode.el (mm-inline-large-images): Enhance defcustom and add + resize choice. + +2010-10-03 Lars Magne Ingebrigtsen + + * shr.el (shr-tag-p): Don't insert newlines on empty tags at the + beginning of the buffer. + + * gnus-sum.el (gnus-summary-select-article-buffer): Really select the + article buffer again. + + * shr.el (shr-tag-p): Don't insert newlines at the start of the + buffer. + + * mm-decode.el (mm-shr): Narrow before inserting, so that shr can know + when it's at the start of the buffer. + + * shr.el (shr-tag-blockquote): Convert name. + (shr-rescale-image): Use the right image-size variant. + + * gnus-sum.el (gnus-summary-select-article-buffer): If the article + buffer isn't shown, then select the current article first instead of + bugging out. + (gnus-summary-select-article-buffer): Show both the article and summary + buffers again. + + * shr.el (shr-fontize-cont): Protect against regions with no text. + Rename tag functions to shr-tag-* for enhanced security. + (shr-tag-ul, shr-tag-ol, shr-tag-li, shr-tag-br): New functions. + 2010-10-03 Chong Yidong * shr.el (shr-insert): === modified file 'lisp/gnus/gnus-ems.el' --- lisp/gnus/gnus-ems.el 2010-09-28 11:47:12 +0000 +++ lisp/gnus/gnus-ems.el 2010-10-04 00:17:16 +0000 @@ -307,6 +307,12 @@ end nil)))))) (eval-and-compile + ;; XEmacs does not have window-inside-pixel-edges + (defalias 'gnus-window-inside-pixel-edges + (if (fboundp 'window-inside-pixel-edges) + 'window-inside-pixel-edges + 'window-pixel-edges)) + (if (fboundp 'set-process-plist) (progn (defalias 'gnus-set-process-plist 'set-process-plist) === modified file 'lisp/gnus/gnus-html.el' --- lisp/gnus/gnus-html.el 2010-10-03 19:54:31 +0000 +++ lisp/gnus/gnus-html.el 2010-10-04 00:17:16 +0000 @@ -105,12 +105,7 @@ (match-string 0 encoded-text))) t t encoded-text) s (1+ s))) - encoded-text)))) - ;; XEmacs does not have window-inside-pixel-edges - (defalias 'gnus-window-inside-pixel-edges - (if (fboundp 'window-inside-pixel-edges) - 'window-inside-pixel-edges - 'window-pixel-edges))) + encoded-text))))) (defun gnus-html-encode-url (url) "Encode URL." @@ -436,7 +431,17 @@ (= (car size) 30) (= (cdr size) 30)))) ;; Good image, add it! - (let ((image (gnus-html-rescale-image image data size))) + (let ((image (gnus-html-rescale-image + image + ;; (width . height) + (cons + ;; Aimed width + (truncate + (* gnus-max-image-proportion + (- (nth 2 edges) (nth 0 edges)))) + ;; Aimed height + (truncate (* gnus-max-image-proportion + (- (nth 3 edges) (nth 1 edges)))))))) (delete-region start end) (gnus-put-image image alt-text 'external) (gnus-put-text-property start (point) 'help-echo alt-text) @@ -459,31 +464,6 @@ (gnus-add-image 'internal image)) nil)))))))) -(defun gnus-html-rescale-image (image data size) - (if (or (not (fboundp 'imagemagick-types)) - (not (get-buffer-window (current-buffer)))) - image - (let* ((width (car size)) - (height (cdr size)) - (edges (gnus-window-inside-pixel-edges - (get-buffer-window (current-buffer)))) - (window-width (truncate (* gnus-max-image-proportion - (- (nth 2 edges) (nth 0 edges))))) - (window-height (truncate (* gnus-max-image-proportion - (- (nth 3 edges) (nth 1 edges))))) - scaled-image) - (when (> height window-height) - (setq image (or (create-image data 'imagemagick t - :height window-height) - image)) - (setq size (image-size image t))) - (when (> (car size) window-width) - (setq image (or - (create-image data 'imagemagick t - :width window-width) - image))) - image))) - (defun gnus-html-image-url-blocked-p (url blocked-images) "Find out if URL is blocked by BLOCKED-IMAGES." (let ((ret (and blocked-images === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-10-01 23:08:25 +0000 +++ lisp/gnus/gnus-sum.el 2010-10-04 00:17:16 +0000 @@ -6933,8 +6933,10 @@ (interactive) (if (not (gnus-buffer-live-p gnus-article-buffer)) (error "There is no article buffer for this summary buffer") - (select-window (get-buffer-window gnus-article-buffer)) - (gnus-configure-windows 'only-article t))) + (unless (get-buffer-window gnus-article-buffer) + (gnus-summary-show-article)) + (gnus-configure-windows 'article t) + (select-window (get-buffer-window gnus-article-buffer)))) (defun gnus-summary-universal-argument (arg) "Perform any operation on all articles that are process/prefixed." === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2010-10-03 02:03:18 +0000 +++ lisp/gnus/gnus-util.el 2010-10-04 00:17:16 +0000 @@ -1932,6 +1932,26 @@ (get-char-table ,character ,display-table))) `(aref ,display-table ,character))) +(defun gnus-rescale-image (image size) + "Rescale IMAGE to SIZE if possible. +SIZE is in format (WIDTH . HEIGHT). Return a new image. +Sizes are in pixels." + (if (or (not (fboundp 'imagemagick-types)) + (not (get-buffer-window (current-buffer)))) + image + (let ((new-width (car size)) + (new-height (cdr size))) + (when (> (cdr (image-size image t)) new-height) + (setq image (or (create-image (plist-get (cdr image) :data) 'imagemagick t + :height new-height) + image))) + (when (> (car (image-size image t)) new-width) + (setq image (or + (create-image (plist-get (cdr image) :data) 'imagemagick t + :width new-width) + image))) + image))) + (provide 'gnus-util) ;;; gnus-util.el ends here === modified file 'lisp/gnus/mm-decode.el' --- lisp/gnus/mm-decode.el 2010-10-03 00:33:27 +0000 +++ lisp/gnus/mm-decode.el 2010-10-04 00:17:16 +0000 @@ -369,8 +369,12 @@ :group 'mime-display) (defcustom mm-inline-large-images nil - "If non-nil, then all images fit in the buffer." - :type 'boolean + "If t, then all images fit in the buffer. +If 'resize, try to resize the images so they fit." + :type '(radio + (const :tag "Inline large images as they are." t) + (const :tag "Resize large images." resize) + (const :tag "Do not inline large images." nil)) :group 'mime-display) (defcustom mm-file-name-rewrite-functions @@ -1679,9 +1683,11 @@ (let ((article-buffer (current-buffer))) (unless handle (setq handle (mm-dissect-buffer t))) - (shr-insert-document - (mm-with-part handle - (libxml-parse-html-region (point-min) (point-max)))))) + (save-restriction + (narrow-to-region (point) (point)) + (shr-insert-document + (mm-with-part handle + (libxml-parse-html-region (point-min) (point-max))))))) (provide 'mm-decode) === modified file 'lisp/gnus/mm-view.el' --- lisp/gnus/mm-view.el 2010-09-30 08:39:23 +0000 +++ lisp/gnus/mm-view.el 2010-10-04 00:17:16 +0000 @@ -32,6 +32,7 @@ (require 'smime) (autoload 'gnus-completing-read "gnus-util") +(autoload 'gnus-window-inside-pixel-edges "gnus-ems") (autoload 'gnus-article-prepare-display "gnus-art") (autoload 'vcard-parse-string "vcard") (autoload 'vcard-format-string "vcard") @@ -76,6 +77,13 @@ :version "22.1" :group 'mime-display) +(defcustom mm-inline-large-images-proportion 0.9 + "Maximum proportion of large image resized when +`mm-inline-large-images' is set to resize." + :type 'float + :version "24.1" + :group 'mime-display) + ;;; Internal variables. ;;; @@ -85,7 +93,18 @@ (defun mm-inline-image-emacs (handle) (let ((b (point-marker)) (inhibit-read-only t)) - (put-image (mm-get-image handle) b) + (put-image + (let ((image (mm-get-image handle))) + (if (eq mm-inline-large-images 'resize) + (gnus-rescale-image image + (let ((edges (gnus-window-inside-pixel-edges + (get-buffer-window (current-buffer))))) + (cons (truncate (* mm-inline-large-images-proportion + (- (nth 2 edges) (nth 0 edges)))) + (truncate (* mm-inline-large-images-proportion + (- (nth 3 edges) (nth 1 edges))))))) + image)) + b) (insert "\n\n") (mm-handle-set-undisplayer handle === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-10-03 19:54:31 +0000 +++ lisp/gnus/shr.el 2010-10-04 00:17:16 +0000 @@ -53,6 +53,7 @@ (defvar shr-folding-mode nil) (defvar shr-state nil) (defvar shr-start nil) +(defvar shr-indentation 0) (defvar shr-width 70) @@ -75,7 +76,7 @@ (shr-descend (shr-transform-dom dom)))) (defun shr-descend (dom) - (let ((function (intern (concat "shr-" (symbol-name (car dom))) obarray))) + (let ((function (intern (concat "shr-tag-" (symbol-name (car dom))) obarray))) (if (fboundp function) (funcall function (cdr dom)) (shr-generic (cdr dom))))) @@ -85,37 +86,48 @@ (cond ((eq (car sub) :text) (shr-insert (cdr sub))) - ((consp (cdr sub)) + ((listp (cdr sub)) (shr-descend sub))))) -(defun shr-p (cont) - (shr-ensure-newline) - (insert "\n") +(defun shr-tag-p (cont) + (shr-ensure-paragraph) (shr-generic cont) - (insert "\n")) - -(defun shr-b (cont) + (shr-ensure-paragraph)) + +(defun shr-ensure-paragraph () + (unless (bobp) + (if (bolp) + (unless (eql (char-after (- (point) 2)) ?\n) + (insert "\n")) + (if (save-excursion + (beginning-of-line) + (looking-at " *")) + (insert "\n") + (insert "\n\n"))))) + +(defun shr-tag-b (cont) (shr-fontize-cont cont 'bold)) -(defun shr-i (cont) +(defun shr-tag-i (cont) (shr-fontize-cont cont 'italic)) -(defun shr-u (cont) +(defun shr-tag-u (cont) (shr-fontize-cont cont 'underline)) -(defun shr-s (cont) - (shr-fontize-cont cont 'strikethru)) +(defun shr-tag-s (cont) + (shr-fontize-cont cont 'strike-through)) -(defun shr-fontize-cont (cont type) +(defun shr-fontize-cont (cont &rest types) (let (shr-start) (shr-generic cont) - (shr-add-font shr-start (point) type))) + (dolist (type types) + (shr-add-font (or shr-start (point)) (point) type)))) (defun shr-add-font (start end type) (let ((overlay (make-overlay start end))) (overlay-put overlay 'face type))) -(defun shr-a (cont) +(defun shr-tag-a (cont) (let ((url (cdr (assq :href cont))) shr-start) (shr-generic cont) @@ -129,7 +141,10 @@ (defun shr-browse-url (widget &rest stuff) (browse-url (widget-get widget :url))) -(defun shr-img (cont) +(defun shr-tag-img (cont) + (when (and (> (current-column) 0) + (not (eq shr-state 'image))) + (insert "\n")) (let ((start (point-marker))) (let ((alt (cdr (assq :alt cont))) (url (cdr (assq :src cont)))) @@ -166,15 +181,17 @@ (defun shr-put-image (data point alt) (if (not (display-graphic-p)) (insert alt) - (let ((image (shr-rescale-image data))) - (put-image image point alt)))) + (let ((image (ignore-errors + (shr-rescale-image data)))) + (when image + (put-image image point alt))))) (defun shr-rescale-image (data) (if (or (not (fboundp 'imagemagick-types)) (not (get-buffer-window (current-buffer)))) (create-image data nil t) (let* ((image (create-image data nil t)) - (size (image-size image)) + (size (image-size image t)) (width (car size)) (height (cdr size)) (edges (window-inside-pixel-edges @@ -196,14 +213,15 @@ image))) image))) -(defun shr-pre (cont) +(defun shr-tag-pre (cont) (let ((shr-folding-mode nil)) (shr-ensure-newline) (shr-generic cont) (shr-ensure-newline))) -(defun shr-blockquote (cont) - (shr-pre cont)) +(defun shr-tag-blockquote (cont) + (let ((shr-indentation (+ shr-indentation 4))) + (shr-tag-pre cont))) (defun shr-ensure-newline () (unless (zerop (current-column)) @@ -217,19 +235,32 @@ ((eq shr-folding-mode 'none) (insert t)) (t - (let (column) + (let ((first t) + column) + (when (and (string-match "^[ \t\n]" text) + (not (bolp))) + (insert " ")) (dolist (elem (split-string text)) (setq column (current-column)) (when (> column 0) - (if (> (+ column (length elem) 1) shr-width) - (insert "\n") - (insert " "))) + (cond + ((> (+ column (length elem) 1) shr-width) + (insert "\n")) + ((not first) + (insert " ")))) + (setq first nil) + (when (and (bolp) + (> shr-indentation 0)) + (insert (make-string shr-indentation ? ))) ;; The shr-start is a special variable that is used to pass ;; upwards the first point in the buffer where the text really ;; starts. (unless shr-start (setq shr-start (point))) - (insert elem)))))) + (insert elem)) + (when (and (string-match "[ \t\n]$" text) + (not (bolp))) + (insert " ")))))) (defun shr-get-image-data (url) "Get image data for URL. @@ -241,6 +272,53 @@ (search-forward "\r\n\r\n" nil t)) (buffer-substring (point) (point-max))))) +(defvar shr-list-mode nil) + +(defun shr-tag-ul (cont) + (shr-ensure-paragraph) + (let ((shr-list-mode 'ul)) + (shr-generic cont))) + +(defun shr-tag-ol (cont) + (let ((shr-list-mode 1)) + (shr-generic cont))) + +(defun shr-tag-li (cont) + (shr-ensure-newline) + (if (numberp shr-list-mode) + (progn + (insert (format "%d " shr-list-mode)) + (setq shr-list-mode (1+ shr-list-mode))) + (insert "* ")) + (shr-generic cont)) + +(defun shr-tag-br (cont) + (shr-ensure-newline) + (shr-generic cont)) + +(defun shr-tag-h1 (cont) + (shr-heading cont 'bold 'underline)) + +(defun shr-tag-h2 (cont) + (shr-heading cont 'bold)) + +(defun shr-tag-h3 (cont) + (shr-heading cont 'italic)) + +(defun shr-tag-h4 (cont) + (shr-heading cont)) + +(defun shr-tag-h5 (cont) + (shr-heading cont)) + +(defun shr-tag-h6 (cont) + (shr-heading cont)) + +(defun shr-heading (cont &rest types) + (shr-ensure-paragraph) + (apply #'shr-fontize-cont cont types) + (shr-ensure-paragraph)) + (provide 'shr) ;;; shr.el ends here ------------------------------------------------------------ revno: 101774 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-10-03 16:35:22 -0700 message: Fix compilation warnings. * lib-src/test-distrib.c (cool_read): * lib-src/movemail.c (main, concat): * lib-src/make-docfile.c (scan_file, write_c_args): * emacsclient.c (get_server_config): Fix -Wconversion warning. (egetenv): Move conditional definition earlier. (progname): Use const. * lib-src/sorted-doc.c (xstrdup): Use const. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2010-10-03 15:46:41 +0000 +++ lib-src/ChangeLog 2010-10-03 23:35:22 +0000 @@ -1,5 +1,13 @@ 2010-10-03 Dan Nicolaescu + * test-distrib.c (cool_read): + * movemail.c (main, concat): + * make-docfile.c (scan_file, write_c_args): + * emacsclient.c (get_server_config): Fix -Wconversion warning. + (egetenv): Move conditional definition earlier. + (progname): Use const. + * sorted-doc.c (xstrdup): Use const. + * Makefile.in: Remove ^L, old makes choke on it. 2010-10-02 Wolfgang Schnerring (tiny change) === modified file 'lib-src/emacsclient.c' --- lib-src/emacsclient.c 2010-10-03 00:00:01 +0000 +++ lib-src/emacsclient.c 2010-10-03 23:35:22 +0000 @@ -39,6 +39,9 @@ # define CLOSE_SOCKET closesocket # define INITIALIZE() (initialize_sockets ()) +char *w32_getenv (char *); +#define egetenv(VAR) w32_getenv(VAR) + #else /* !WINDOWSNT */ # include "syswait.h" @@ -62,6 +65,8 @@ # define WCONTINUED 8 # endif +#define egetenv(VAR) getenv(VAR) + #endif /* !WINDOWSNT */ #undef signal @@ -86,13 +91,6 @@ char *(getcwd) (char *, size_t); #endif -#ifdef WINDOWSNT -char *w32_getenv (char *); -#define egetenv(VAR) w32_getenv(VAR) -#else -#define egetenv(VAR) getenv(VAR) -#endif - #ifndef VERSION #define VERSION "unspecified" #endif @@ -119,7 +117,7 @@ /* Name used to invoke this program. */ -char *progname; +const char *progname; /* The second argument to main. */ char **main_argv; @@ -752,7 +750,7 @@ { while (data) { - int dlen = strlen (data); + size_t dlen = strlen (data); if (dlen + sblen >= SEND_BUFFER_SIZE) { int part = SEND_BUFFER_SIZE - sblen; === modified file 'lib-src/make-docfile.c' --- lib-src/make-docfile.c 2010-08-11 08:20:34 +0000 +++ lib-src/make-docfile.c 2010-10-03 23:35:22 +0000 @@ -204,7 +204,8 @@ int scan_file (char *filename) { - int len = strlen (filename); + + size_t len = strlen (filename); put_filename (filename); if (len > 4 && !strcmp (filename + len - 4, ".elc")) @@ -442,7 +443,7 @@ register char *p; int in_ident = 0; char *ident_start; - int ident_length = 0; + size_t ident_length = 0; fprintf (out, "(fn"); === modified file 'lib-src/movemail.c' --- lib-src/movemail.c 2010-08-11 08:20:34 +0000 +++ lib-src/movemail.c 2010-10-03 23:35:22 +0000 @@ -169,7 +169,7 @@ { char *inname, *outname; int indesc, outdesc; - int nread; + ssize_t nread; int status; int c, preserve_mail = 0; @@ -551,8 +551,7 @@ string-comparing the two paths, because one or both of them might be symbolic links pointing to some other directory. */ static char * -mail_spool_name (inname) - char *inname; +mail_spool_name (char *inname) { struct stat stat1, stat2; char *indir, *fname; @@ -632,7 +631,7 @@ static char * concat (const char *s1, const char *s2, const char *s3) { - int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3); + size_t len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3); char *result = (char *) xmalloc (len1 + len2 + len3 + 1); strcpy (result, s1); === modified file 'lib-src/sorted-doc.c' --- lib-src/sorted-doc.c 2010-08-11 08:20:34 +0000 +++ lib-src/sorted-doc.c 2010-10-03 23:35:22 +0000 @@ -93,7 +93,7 @@ } char * -xstrdup (char *str) +xstrdup (const char *str) { char *buf = xmalloc (strlen (str) + 1); (void) strcpy (buf, str); === modified file 'lib-src/test-distrib.c' --- lib-src/test-distrib.c 2010-07-04 06:05:43 +0000 +++ lib-src/test-distrib.c 2010-10-03 23:35:22 +0000 @@ -52,9 +52,10 @@ /* Like `read' but keeps trying until it gets SIZE bytes or reaches eof. */ int -cool_read (int fd, char *buf, int size) +cool_read (int fd, char *buf, size_t size) { - int num, sofar = 0; + ssize_t num; + size_t sofar = 0; while (1) { ------------------------------------------------------------ revno: 101773 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2010-10-04 00:37:37 +0200 message: Rework the gnutls boot interface. From Teodor Zlatanov. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-03 21:23:13 +0000 +++ lisp/ChangeLog 2010-10-03 22:37:37 +0000 @@ -1,3 +1,10 @@ +2010-10-03 Teodor Zlatanov + + * net/gnutls.el (starttls-negotiate): Use the plist interface to + `gnutls-boot'. Make TYPE the only required parameter. Allow + TRUSTFILES and KEYFILES to be lists. + (open-ssl-stream): Use it. + 2010-10-03 Glenn Morris * subr.el (directory-sep-char): Remove obsolete variable. === modified file 'lisp/net/gnutls.el' --- lisp/net/gnutls.el 2010-09-29 13:25:24 +0000 +++ lisp/net/gnutls.el 2010-10-03 22:37:37 +0000 @@ -57,34 +57,36 @@ Fourth arg SERVICE is name of the service desired, or an integer specifying a port number to connect to." (let ((proc (open-network-stream name buffer host service))) - (starttls-negotiate proc nil 'gnutls-x509pki))) + (starttls-negotiate proc 'gnutls-x509pki))) ;; (open-ssl-stream "tls" "tls-buffer" "yourserver.com" "https") -(defun starttls-negotiate (proc &optional priority-string - credentials credentials-file) +;; (open-ssl-stream "tls" "tls-buffer" "imap.gmail.com" "imaps") +(defun starttls-negotiate (proc type &optional priority-string + trustfiles keyfiles) "Negotiate a SSL or TLS connection. -PROC is the process returned by `starttls-open-stream'. -PRIORITY-STRING is as per the GnuTLS docs. -CREDENTIALS is `gnutls-x509pki' or `gnutls-anon'. -CREDENTIALS-FILE is a filename with meaning dependent on CREDENTIALS." - (let* ((credentials (or credentials 'gnutls-x509pki)) - (credentials-file (or credentials-file - "/etc/ssl/certs/ca-certificates.crt" - ;"/etc/ssl/certs/ca.pem" - )) - +TYPE is `gnutls-x509pki' (default) or `gnutls-anon'. Use nil for the default. +PROC is a process returned by `open-network-stream'. +PRIORITY-STRING is as per the GnuTLS docs, default is \"NORMAL\". +TRUSTFILES is a list of CA bundles. +KEYFILES is a list of client keys." + (let* ((type (or type 'gnutls-x509pki)) + (trusfiles (or trustfiles + '("/etc/ssl/certs/ca-certificates.crt"))) (priority-string (or priority-string (cond - ((eq credentials 'gnutls-anon) + ((eq type 'gnutls-anon) "NORMAL:+ANON-DH:!ARCFOUR-128") - ((eq credentials 'gnutls-x509pki) + ((eq type 'gnutls-x509pki) "NORMAL")))) + (params `(:priority ,priority-string + :loglevel ,gnutls-log-level + :trustfiles ,trustfiles + :keyfiles ,keyfiles + :callbacks nil)) ret) (gnutls-message-maybe - (setq ret (gnutls-boot proc priority-string - credentials credentials-file - nil nil gnutls-log-level)) + (setq ret (gnutls-boot proc type params)) "boot: %s") proc)) === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-03 21:27:04 +0000 +++ src/ChangeLog 2010-10-03 22:37:37 +0000 @@ -1,3 +1,15 @@ +2010-10-03 Teodor Zlatanov + + * gnutls.h (GNUTLS_LOG2): Convenience macro. + + * gnutls.c: Add property list symbol holders. + (emacs_gnutls_handshake): Clarify how sockets are passed to + GnuTLS. + (gnutls_log_function2): Convenience function using GNUTLS_LOG2. + (Fgnutls_boot): Get all parameters from a plist. Require trustfiles + and keyfiles to be a list of file names. Default to "NORMAL" for + the priority string. Improve logging. + 2010-10-03 Glenn Morris * fileio.c (Vdirectory_sep_char): Remove. === modified file 'src/gnutls.c' --- src/gnutls.c 2010-10-03 12:52:04 +0000 +++ src/gnutls.c 2010-10-03 22:37:37 +0000 @@ -32,6 +32,13 @@ Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake; int global_initialized; +/* The following are for the property list of `gnutls-boot'. */ +Lisp_Object Qgnutls_bootprop_priority; +Lisp_Object Qgnutls_bootprop_trustfiles; +Lisp_Object Qgnutls_bootprop_keyfiles; +Lisp_Object Qgnutls_bootprop_callbacks; +Lisp_Object Qgnutls_bootprop_loglevel; + static void emacs_gnutls_handshake (struct Lisp_Process *proc) { @@ -43,6 +50,9 @@ if (proc->gnutls_initstage < GNUTLS_STAGE_TRANSPORT_POINTERS_SET) { + /* This is how GnuTLS takes sockets: as file descriptors passed + in. For an Emacs process socket, infd and outfd are the + same but we use this two-argument version for clarity. */ gnutls_transport_set_ptr2 (state, (gnutls_transport_ptr_t) (long) proc->infd, (gnutls_transport_ptr_t) (long) proc->outfd); @@ -271,20 +281,29 @@ message ("gnutls.c: [%d] %s", level, string); } -DEFUN ("gnutls-boot", Fgnutls_boot, Sgnutls_boot, 3, 7, 0, - doc: /* Initialize client-mode GnuTLS for process PROC. +static void +gnutls_log_function2 (int level, const char* string, const char* extra) +{ + message ("gnutls.c: [%d] %s %s", level, string, extra); +} + +DEFUN ("gnutls-boot", Fgnutls_boot, Sgnutls_boot, 3, 3, 0, + doc: /* Initialize GnuTLS client for process PROC with TYPE+PROPLIST. Currently only client mode is supported. Returns a success/failure value you can check with `gnutls-errorp'. -PRIORITY-STRING is a string describing the priority. -TYPE is either `gnutls-anon' or `gnutls-x509pki'. -TRUSTFILE is a PEM encoded trust file for `gnutls-x509pki'. -KEYFILE is ... for `gnutls-x509pki' (TODO). -CALLBACK is ... for `gnutls-x509pki' (TODO). -LOGLEVEL is the debug level requested from GnuTLS, try 4. - -LOGLEVEL will be set for this process AND globally for GnuTLS. So if -you set it higher or lower at any point, it affects global debugging. +TYPE is a symbol, either `gnutls-anon' or `gnutls-x509pki'. +PROPLIST is a property list with the following keys: + +:priority is a GnuTLS priority string, defaults to "NORMAL". +:trustfiles is a list of PEM-encoded trust files for `gnutls-x509pki'. +:keyfiles is a list of PEM-encoded key files for `gnutls-x509pki'. +:callbacks is an alist of callback functions (TODO). +:loglevel is the debug level requested from GnuTLS, try 4. + +The debug level will be set for this process AND globally for GnuTLS. +So if you set it higher or lower at any point, it affects global +debugging. Note that the priority is set on the client. The server does not use the protocols's priority except for disabling protocols that were not @@ -295,11 +314,9 @@ be deallocated by calling `gnutls-deinit' or by calling it again. Each authentication type may need additional information in order to -work. For X.509 PKI (`gnutls-x509pki'), you need TRUSTFILE and -KEYFILE and optionally CALLBACK. */) - (Lisp_Object proc, Lisp_Object priority_string, Lisp_Object type, - Lisp_Object trustfile, Lisp_Object keyfile, Lisp_Object callback, - Lisp_Object loglevel) +work. For X.509 PKI (`gnutls-x509pki'), you probably need at least +one trustfile (usually a CA bundle). */) + (Lisp_Object proc, Lisp_Object type, Lisp_Object proplist) { int ret = GNUTLS_E_SUCCESS; @@ -312,10 +329,25 @@ gnutls_certificate_credentials_t x509_cred; gnutls_anon_client_credentials_t anon_cred; Lisp_Object global_init; + char* priority_string_ptr = "NORMAL"; /* default priority string. */ + Lisp_Object tail; + + /* Placeholders for the property list elements. */ + Lisp_Object priority_string; + Lisp_Object trustfiles; + Lisp_Object keyfiles; + Lisp_Object callbacks; + Lisp_Object loglevel; CHECK_PROCESS (proc); CHECK_SYMBOL (type); - CHECK_STRING (priority_string); + CHECK_LIST (proplist); + + priority_string = Fplist_get (proplist, Qgnutls_bootprop_priority); + trustfiles = Fplist_get (proplist, Qgnutls_bootprop_trustfiles); + keyfiles = Fplist_get (proplist, Qgnutls_bootprop_keyfiles); + callbacks = Fplist_get (proplist, Qgnutls_bootprop_callbacks); + loglevel = Fplist_get (proplist, Qgnutls_bootprop_loglevel); state = XPROCESS (proc)->gnutls_state; XPROCESS (proc)->gnutls_p = 1; @@ -394,29 +426,49 @@ if (EQ (type, Qgnutls_x509pki)) { - if (STRINGP (trustfile)) - { - GNUTLS_LOG (1, max_log_level, "setting the trustfile"); - ret = gnutls_certificate_set_x509_trust_file - (x509_cred, - SDATA (trustfile), - file_format); - - if (ret < GNUTLS_E_SUCCESS) - return gnutls_make_error (ret); - } - - if (STRINGP (keyfile)) - { - GNUTLS_LOG (1, max_log_level, "setting the keyfile"); - ret = gnutls_certificate_set_x509_crl_file - (x509_cred, - SDATA (keyfile), - file_format); - - if (ret < GNUTLS_E_SUCCESS) - return gnutls_make_error (ret); - } + for (tail = trustfiles; !NILP (tail); tail = Fcdr (tail)) + { + Lisp_Object trustfile = Fcar (tail); + if (STRINGP (trustfile)) + { + GNUTLS_LOG2 (1, max_log_level, "setting the trustfile: ", + SDATA (trustfile)); + ret = gnutls_certificate_set_x509_trust_file + (x509_cred, + SDATA (trustfile), + file_format); + + if (ret < GNUTLS_E_SUCCESS) + return gnutls_make_error (ret); + } + else + { + error ("Sorry, GnuTLS can't use non-string trustfile %s", + trustfile); + } + } + + for (tail = keyfiles; !NILP (tail); tail = Fcdr (tail)) + { + Lisp_Object keyfile = Fcar (tail); + if (STRINGP (keyfile)) + { + GNUTLS_LOG2 (1, max_log_level, "setting the keyfile: ", + SDATA (keyfile)); + ret = gnutls_certificate_set_x509_crl_file + (x509_cred, + SDATA (keyfile), + file_format); + + if (ret < GNUTLS_E_SUCCESS) + return gnutls_make_error (ret); + } + else + { + error ("Sorry, GnuTLS can't use non-string keyfile %s", + keyfile); + } + } } GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_FILES; @@ -432,10 +484,22 @@ GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_INIT; + if (STRINGP (priority_string)) + { + priority_string_ptr = (char*) SDATA (priority_string); + GNUTLS_LOG2 (1, max_log_level, "got non-default priority string:", + priority_string_ptr); + } + else + { + GNUTLS_LOG2 (1, max_log_level, "using default priority string:", + priority_string_ptr); + } + GNUTLS_LOG (1, max_log_level, "setting the priority string"); ret = gnutls_priority_set_direct (state, - (char*) SDATA (priority_string), + priority_string_ptr, NULL); if (ret < GNUTLS_E_SUCCESS) @@ -514,6 +578,21 @@ Qgnutls_x509pki = intern_c_string ("gnutls-x509pki"); staticpro (&Qgnutls_x509pki); + Qgnutls_bootprop_priority = intern_c_string ("priority"); + staticpro (&Qgnutls_bootprop_priority); + + Qgnutls_bootprop_trustfiles = intern_c_string ("trustfiles"); + staticpro (&Qgnutls_bootprop_trustfiles); + + Qgnutls_bootprop_keyfiles = intern_c_string ("keyfiles"); + staticpro (&Qgnutls_bootprop_keyfiles); + + Qgnutls_bootprop_callbacks = intern_c_string ("callbacks"); + staticpro (&Qgnutls_bootprop_callbacks); + + Qgnutls_bootprop_loglevel = intern_c_string ("loglevel"); + staticpro (&Qgnutls_bootprop_loglevel); + Qgnutls_e_interrupted = intern_c_string ("gnutls-e-interrupted"); staticpro (&Qgnutls_e_interrupted); Fput (Qgnutls_e_interrupted, Qgnutls_code, === modified file 'src/gnutls.h' --- src/gnutls.h 2010-09-29 12:48:29 +0000 +++ src/gnutls.h 2010-10-03 22:37:37 +0000 @@ -48,6 +48,8 @@ #define GNUTLS_LOG(level, max, string) if (level <= max) { gnutls_log_function (level, "(Emacs) " string); } +#define GNUTLS_LOG2(level, max, string, extra) if (level <= max) { gnutls_log_function2 (level, "(Emacs) " string, extra); } + int emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf, unsigned int nbyte); ------------------------------------------------------------ revno: 101772 committer: Glenn Morris branch nick: trunk timestamp: Sun 2010-10-03 14:37:41 -0700 message: Cosmetic changes for some lisp/url files. * lisp/url/url-util.el (url-get-url-filename-chars): Don't eval-and-compile. (url-get-url-at-point): Don't use eval-when-compile. * lisp/url/url-cache.el (url-cache-create-filename-human-readable) (url-cache-create-filename-using-md5): * lisp/url/url-util.el (url-file-directory, url-file-nondirectory): Don't use eval-when-compile and regexp-quote. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2010-10-03 12:43:12 +0000 +++ lisp/url/ChangeLog 2010-10-03 21:37:41 +0000 @@ -1,3 +1,13 @@ +2010-10-03 Glenn Morris + + * url-util.el (url-get-url-filename-chars): Don't eval-and-compile. + (url-get-url-at-point): Don't use eval-when-compile. + + * url-cache.el (url-cache-create-filename-human-readable) + (url-cache-create-filename-using-md5): + * url-util.el (url-file-directory, url-file-nondirectory): + Don't use eval-when-compile and regexp-quote. + 2010-10-03 Lars Magne Ingebrigtsen * url-vars.el (url-mime-charset-string): Changed the default to === modified file 'lisp/url/url-cache.el' --- lisp/url/url-cache.el 2010-09-25 20:59:05 +0000 +++ lisp/url/url-cache.el 2010-10-03 21:37:41 +0000 @@ -103,8 +103,7 @@ (user-real-login-name) (cons (or protocol "file") (reverse (split-string (or hostname "localhost") - (eval-when-compile - (regexp-quote "."))))))) + "\\."))))) (fname (url-filename urlobj))) (if (and fname (/= (length fname) 0) (= (aref fname 0) ?/)) (setq fname (substring fname 1 nil))) @@ -164,8 +163,7 @@ (nreverse (delq nil (split-string (or hostname "localhost") - (eval-when-compile - (regexp-quote ".")))))))) + "\\.")))))) (fname (url-filename urlobj))) (and fname (expand-file-name checksum === modified file 'lisp/url/url-util.el' --- lisp/url/url-util.el 2010-10-02 12:34:02 +0000 +++ lisp/url/url-util.el 2010-10-03 21:37:41 +0000 @@ -248,7 +248,7 @@ "Return the directory part of FILE, for a URL." (cond ((null file) "") - ((string-match (eval-when-compile (regexp-quote "?")) file) + ((string-match "\\?" file) (file-name-directory (substring file 0 (match-beginning 0)))) (t (file-name-directory file)))) @@ -257,7 +257,7 @@ "Return the nondirectory part of FILE, for a URL." (cond ((null file) "") - ((string-match (eval-when-compile (regexp-quote "?")) file) + ((string-match "\\?" file) (file-name-nondirectory (substring file 0 (match-beginning 0)))) (t (file-name-nondirectory file)))) @@ -436,10 +436,8 @@ (url-recreate-url url-current-object) (message "%s" (url-recreate-url url-current-object))))) -(eval-and-compile - (defvar url-get-url-filename-chars "-%.?@a-zA-Z0-9()_/:~=&" - "Valid characters in a URL.") - ) +(defvar url-get-url-filename-chars "-%.?@a-zA-Z0-9()_/:~=&" + "Valid characters in a URL.") (defun url-get-url-at-point (&optional pt) "Get the URL closest to point, but don't change position. @@ -457,8 +455,7 @@ (if (not (bobp)) (backward-char 1))))) (if (and (char-after (point)) - (string-match (eval-when-compile - (concat "[" url-get-url-filename-chars "]")) + (string-match (concat "[" url-get-url-filename-chars "]") (char-to-string (char-after (point))))) (progn (skip-chars-backward url-get-url-filename-chars) ------------------------------------------------------------ revno: 101771 committer: Glenn Morris branch nick: trunk timestamp: Sun 2010-10-03 14:27:04 -0700 message: * src/fileio.c (Vdirectory_sep_char): Remove. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-03 16:21:55 +0000 +++ src/ChangeLog 2010-10-03 21:27:04 +0000 @@ -1,3 +1,7 @@ +2010-10-03 Glenn Morris + + * fileio.c (Vdirectory_sep_char): Remove. + 2010-10-03 Dan Nicolaescu * termhooks.h: Remove #ifdef CONSP. === modified file 'src/fileio.c' --- src/fileio.c 2010-10-03 15:19:34 +0000 +++ src/fileio.c 2010-10-03 21:27:04 +0000 @@ -1,7 +1,8 @@ /* File IO for GNU Emacs. - Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, - 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + +Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, + 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, + 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -182,10 +183,6 @@ /* Whether or not to continue auto-saving after a large deletion. */ Lisp_Object Vauto_save_include_big_deletions; -/* On NT, specifies the directory separator character, used (eg.) when - expanding file names. This can be bound to / or \. */ -Lisp_Object Vdirectory_sep_char; - #ifdef HAVE_FSYNC /* Nonzero means skip the call to fsync in Fwrite-region. */ int write_region_inhibit_fsync; ------------------------------------------------------------ revno: 101770 committer: Glenn Morris branch nick: trunk timestamp: Sun 2010-10-03 14:23:13 -0700 message: Remove directory-sep-char, obsolete since 21.1. * lisp/subr.el (directory-sep-char): Remove obsolete variable. * lisp/net/tramp-compat.el: Don't mess about with the byte-compiler unless it is "necessary". * doc/lispref/files.texi (File Name Components): Remove ignored section about deleted variable directory-sep-char. * etc/NEWS: Mention above change. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2010-10-03 15:58:09 +0000 +++ doc/lispref/ChangeLog 2010-10-03 21:23:13 +0000 @@ -1,3 +1,8 @@ +2010-10-03 Glenn Morris + + * files.texi (File Name Components): Remove ignored section about + deleted variable directory-sep-char. + 2010-10-03 Michael Albinus * files.texi (Magic File Names): New defopt === modified file 'doc/lispref/files.texi' --- doc/lispref/files.texi 2010-10-03 15:58:09 +0000 +++ doc/lispref/files.texi 2010-10-03 21:23:13 +0000 @@ -1758,20 +1758,6 @@ not an extension. @end defun -@ignore -Andrew Innes says that this - -@c @defvar directory-sep-char -This variable holds the character that Emacs normally uses to separate -file name components. The default value is @code{?/}, but on MS-Windows -you can set it to @code{?\\}; then the functions that transform file names -use backslashes in their output. - -File names using backslashes work as input to Lisp primitives even on -MS-DOS and MS-Windows, even if @code{directory-sep-char} has its default -value of @code{?/}. -@end defvar -@end ignore @node Relative File Names @subsection Absolute and Relative File Names === modified file 'etc/NEWS' --- etc/NEWS 2010-10-03 21:05:47 +0000 +++ etc/NEWS 2010-10-03 21:23:13 +0000 @@ -559,7 +559,7 @@ ** The following variables and aliases, obsolete since at least Emacs 21.1, have been removed: -checkdoc-minor-keymap, vc-header-alist +checkdoc-minor-keymap, vc-header-alist, directory-sep-char * Lisp changes in Emacs 24.1 === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-03 21:05:47 +0000 +++ lisp/ChangeLog 2010-10-03 21:23:13 +0000 @@ -1,5 +1,9 @@ 2010-10-03 Glenn Morris + * subr.el (directory-sep-char): Remove obsolete variable. + * net/tramp-compat.el: Don't mess about with the byte-compiler unless + it is "necessary". + * vc/vc-hooks.el (vc-header-alist): Remove obsolete variable. * vc/vc.el (vc-static-header-alist): Doc fix. * vc/vc-cvs.el (vc-cvs-header): === modified file 'lisp/net/tramp-compat.el' --- lisp/net/tramp-compat.el 2010-10-02 13:21:43 +0000 +++ lisp/net/tramp-compat.el 2010-10-03 21:23:13 +0000 @@ -88,13 +88,15 @@ ;; `directory-sep-char' is an obsolete variable in Emacs. But it is ;; used in XEmacs, so we set it here and there. The following is ;; needed to pacify Emacs byte-compiler. - (unless (boundp 'byte-compile-not-obsolete-var) - (defvar byte-compile-not-obsolete-var nil)) - (setq byte-compile-not-obsolete-var 'directory-sep-char) - ;; Emacs 23.2. - (unless (boundp 'byte-compile-not-obsolete-vars) - (defvar byte-compile-not-obsolete-vars nil)) - (setq byte-compile-not-obsolete-vars '(directory-sep-char)) + ;; Note that it was removed altogether in Emacs 24.1. + (when (boundp 'directory-sep-char) + (unless (boundp 'byte-compile-not-obsolete-var) + (defvar byte-compile-not-obsolete-var nil)) + (setq byte-compile-not-obsolete-var 'directory-sep-char) + ;; Emacs 23.2. + (unless (boundp 'byte-compile-not-obsolete-vars) + (defvar byte-compile-not-obsolete-vars nil)) + (setq byte-compile-not-obsolete-vars '(directory-sep-char))) ;; `remote-file-name-inhibit-cache' has been introduced with Emacs 24.1. ;; Besides `t', `nil', and integer, we use also timestamps (as === modified file 'lisp/subr.el' --- lisp/subr.el 2010-10-03 01:53:04 +0000 +++ lisp/subr.el 2010-10-03 21:23:13 +0000 @@ -1092,11 +1092,6 @@ (make-obsolete 'process-filter-multibyte-p nil "23.1") (make-obsolete 'set-process-filter-multibyte nil "23.1") -(defconst directory-sep-char ?/ - "Directory separator character for built-in functions that return file names. -The value is always ?/.") -(make-obsolete-variable 'directory-sep-char "do not use it, just use `/'." "21.1") - (make-obsolete-variable 'mode-line-inverse-video "use the appropriate faces instead." ------------------------------------------------------------ revno: 101769 committer: Glenn Morris branch nick: trunk timestamp: Sun 2010-10-03 14:05:47 -0700 message: Remove vc-header-alist, obsolete since 21.1. * lisp/vc/vc-hooks.el (vc-header-alist): Remove obsolete variable. * lisp/vc/vc.el (vc-static-header-alist): Doc fix. * lisp/vc/vc-cvs.el (vc-cvs-header): * lisp/vc/vc-rcs.el (vc-rcs-header): * lisp/vc/vc-sccs.el (vc-sccs-header): * lisp/vc/vc-svn.el (vc-svn-header): Do not consult vc-header-alist. * lisp/obsolete/vc-mcvs.el (vc-mcvs-header): * lisp/progmodes/cperl-mode.el (cperl-mode): Only set vc-header-alist on XEmacs. * etc/NEWS: Mention above change. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-10-03 16:43:22 +0000 +++ etc/NEWS 2010-10-03 21:05:47 +0000 @@ -559,7 +559,7 @@ ** The following variables and aliases, obsolete since at least Emacs 21.1, have been removed: -checkdoc-minor-keymap +checkdoc-minor-keymap, vc-header-alist * Lisp changes in Emacs 24.1 === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-03 04:31:59 +0000 +++ lisp/ChangeLog 2010-10-03 21:05:47 +0000 @@ -1,3 +1,15 @@ +2010-10-03 Glenn Morris + + * vc/vc-hooks.el (vc-header-alist): Remove obsolete variable. + * vc/vc.el (vc-static-header-alist): Doc fix. + * vc/vc-cvs.el (vc-cvs-header): + * vc/vc-rcs.el (vc-rcs-header): + * vc/vc-sccs.el (vc-sccs-header): + * vc/vc-svn.el (vc-svn-header): Do not consult vc-header-alist. + * obsolete/vc-mcvs.el (vc-mcvs-header): + * progmodes/cperl-mode.el (cperl-mode): Only set vc-header-alist + on XEmacs. + 2010-10-03 Chong Yidong * emacs-lisp/bytecomp.el (byte-compile-from-buffer): Remove === modified file 'lisp/obsolete/vc-mcvs.el' --- lisp/obsolete/vc-mcvs.el 2010-01-13 08:35:10 +0000 +++ lisp/obsolete/vc-mcvs.el 2010-10-03 21:05:47 +0000 @@ -102,10 +102,9 @@ :version "22.1" :group 'vc) -(defcustom vc-mcvs-header (or (cdr (assoc 'MCVS vc-header-alist)) - vc-cvs-header) +(defcustom vc-mcvs-header vc-cvs-header "Header keywords to be inserted by `vc-insert-headers'." - :version "22.1" + :version "24.1" ; no longer consult the obsolete vc-header-alist :type '(repeat string) :group 'vc) === modified file 'lisp/progmodes/cperl-mode.el' --- lisp/progmodes/cperl-mode.el 2010-09-10 23:13:42 +0000 +++ lisp/progmodes/cperl-mode.el 2010-10-03 21:05:47 +0000 @@ -1,8 +1,8 @@ ;;; cperl-mode.el --- Perl code editing commands for Emacs ;; Copyright (C) 1985, 1986, 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, -;; 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, +;; 2010 Free Software Foundation, Inc. ;; Author: Ilya Zakharevich ;; Bob Olson @@ -1802,13 +1802,12 @@ (set 'vc-rcs-header cperl-vc-rcs-header) (make-local-variable 'vc-sccs-header) (set 'vc-sccs-header cperl-vc-sccs-header) - ;; This one is obsolete... - (make-local-variable 'vc-header-alist) - (with-no-warnings - (set 'vc-header-alist (or cperl-vc-header-alist ; Avoid warning - `((SCCS ,(car cperl-vc-sccs-header)) - (RCS ,(car cperl-vc-rcs-header))))) - ) + (when (featurep 'xemacs) + ;; This one is obsolete... + (make-local-variable 'vc-header-alist) + (set 'vc-header-alist (or cperl-vc-header-alist ; Avoid warning + `((SCCS ,(car cperl-vc-sccs-header)) + (RCS ,(car cperl-vc-rcs-header)))))) (cond ((boundp 'compilation-error-regexp-alist-alist);; xemacs 20.x (make-local-variable 'compilation-error-regexp-alist-alist) (set 'compilation-error-regexp-alist-alist === modified file 'lisp/vc/vc-cvs.el' --- lisp/vc/vc-cvs.el 2010-08-29 16:17:13 +0000 +++ lisp/vc/vc-cvs.el 2010-10-03 21:05:47 +0000 @@ -92,9 +92,9 @@ :version "21.1" :group 'vc) -(defcustom vc-cvs-header (or (cdr (assoc 'CVS vc-header-alist)) '("\$Id\$")) +(defcustom vc-cvs-header '("\$Id\$") "Header keywords to be inserted by `vc-insert-headers'." - :version "21.1" + :version "24.1" ; no longer consult the obsolete vc-header-alist :type '(repeat string) :group 'vc) === modified file 'lisp/vc/vc-hooks.el' --- lisp/vc/vc-hooks.el 2010-09-30 12:44:25 +0000 +++ lisp/vc/vc-hooks.el 2010-10-03 21:05:47 +0000 @@ -49,9 +49,6 @@ BACKEND, use `vc-handled-backends'." "21.1") -(defvar vc-header-alist ()) -(make-obsolete-variable 'vc-header-alist 'vc-BACKEND-header "21.1") - (defcustom vc-ignore-dir-regexp ;; Stop SMB, automounter, AFS, and DFS host lookups. locate-dominating-stop-dir-regexp === modified file 'lisp/vc/vc-rcs.el' --- lisp/vc/vc-rcs.el 2010-08-29 16:17:13 +0000 +++ lisp/vc/vc-rcs.el 2010-10-03 21:05:47 +0000 @@ -77,10 +77,10 @@ :version "21.1" :group 'vc) -(defcustom vc-rcs-header (or (cdr (assoc 'RCS vc-header-alist)) '("\$Id\$")) +(defcustom vc-rcs-header '("\$Id\$") "Header keywords to be inserted by `vc-insert-headers'." :type '(repeat string) - :version "21.1" + :version "24.1" ; no longer consult the obsolete vc-header-alist :group 'vc) (defcustom vc-rcsdiff-knows-brief nil === modified file 'lisp/vc/vc-sccs.el' --- lisp/vc/vc-sccs.el 2010-08-29 16:17:13 +0000 +++ lisp/vc/vc-sccs.el 2010-10-03 21:05:47 +0000 @@ -71,9 +71,10 @@ :version "21.1" :group 'vc) -(defcustom vc-sccs-header (or (cdr (assoc 'SCCS vc-header-alist)) '("%W%")) +(defcustom vc-sccs-header '("%W%") "Header keywords to be inserted by `vc-insert-headers'." :type '(repeat string) + :version "24.1" ; no longer consult the obsolete vc-header-alist :group 'vc) ;;;###autoload === modified file 'lisp/vc/vc-svn.el' --- lisp/vc/vc-svn.el 2010-08-29 16:17:13 +0000 +++ lisp/vc/vc-svn.el 2010-10-03 21:05:47 +0000 @@ -84,9 +84,9 @@ :version "22.1" :group 'vc) -(defcustom vc-svn-header (or (cdr (assoc 'SVN vc-header-alist)) '("\$Id\$")) +(defcustom vc-svn-header '("\$Id\$") "Header keywords to be inserted by `vc-insert-headers'." - :version "22.1" + :version "24.1" ; no longer consult the obsolete vc-header-alist :type '(repeat string) :group 'vc) === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2010-07-16 15:42:15 +0000 +++ lisp/vc/vc.el 2010-10-03 21:05:47 +0000 @@ -770,7 +770,7 @@ "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n#endif /* lint */\n")) "Associate static header string templates with file types. A \%s in the template is replaced with the first string associated with -the file's version control type in `vc-header-alist'." +the file's version control type in `vc-BACKEND-header'." :type '(repeat (cons :format "%v" (regexp :tag "File Type") (string :tag "Header String"))) ------------------------------------------------------------ revno: 101768 committer: Chong Yidong branch nick: trunk timestamp: Sun 2010-10-03 15:54:31 -0400 message: Avoid using plusp; cl may not be loaded. * lisp/gnus/shr.el (shr-insert): * lisp/gnus/pop3.el (pop3-movemail): * lisp/gnus/gnus-html.el (gnus-html-wash-tags): Don't use plusp. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-10-03 02:12:55 +0000 +++ lisp/gnus/ChangeLog 2010-10-03 19:54:31 +0000 @@ -1,3 +1,10 @@ +2010-10-03 Chong Yidong + + * shr.el (shr-insert): + * pop3.el (pop3-movemail): + * gnus-html.el (gnus-html-wash-tags): Don't use plusp, as cl may not be + loaded. + 2010-10-03 Glenn Morris * nnmairix.el (nnmairix-replace-illegal-chars): Drop Emacs 20 code. === modified file 'lisp/gnus/gnus-html.el' --- lisp/gnus/gnus-html.el 2010-10-03 00:33:27 +0000 +++ lisp/gnus/gnus-html.el 2010-10-03 19:54:31 +0000 @@ -271,7 +271,7 @@ (setq tag (match-string 1) parameters (match-string 2) start (match-beginning 0)) - (when (plusp (length parameters)) + (when (> (length parameters) 0) (set-text-properties 0 (1- (length parameters)) nil parameters)) (delete-region start (point)) (when (search-forward (concat "") nil t) === modified file 'lisp/gnus/pop3.el' --- lisp/gnus/pop3.el 2010-09-30 08:39:23 +0000 +++ lisp/gnus/pop3.el 2010-10-03 19:54:31 +0000 @@ -149,7 +149,7 @@ (let ((size (pop3-stat process))) (setq message-count (car size) message-total-size (cadr size))) - (when (plusp message-count) + (when (> message-count 0) (pop3-send-streaming-command process "RETR" message-count message-total-size) (pop3-write-to-file file) === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2010-10-03 00:33:27 +0000 +++ lisp/gnus/shr.el 2010-10-03 19:54:31 +0000 @@ -220,7 +220,7 @@ (let (column) (dolist (elem (split-string text)) (setq column (current-column)) - (when (plusp column) + (when (> column 0) (if (> (+ column (length elem) 1) shr-width) (insert "\n") (insert " "))) ------------------------------------------------------------ revno: 101767 committer: Michael Albinus branch nick: trunk timestamp: Sun 2010-10-03 18:43:22 +0200 message: Add user option `remote-file-name-inhibit-cache'. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-10-03 01:53:04 +0000 +++ etc/NEWS 2010-10-03 16:43:22 +0000 @@ -195,6 +195,9 @@ `package-enable-at-startup' to nil. To change which packages are loaded, customize `package-load-list'. +** The user option `remote-file-name-inhibit-cache' controls whether +the remote file-name cache is used for read access. + * Editing Changes in Emacs 24.1 ------------------------------------------------------------ revno: 101766 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-10-03 09:21:55 -0700 message: * src/termhooks.h: Remove #ifdef CONSP. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-03 15:39:21 +0000 +++ src/ChangeLog 2010-10-03 16:21:55 +0000 @@ -1,5 +1,7 @@ 2010-10-03 Dan Nicolaescu + * termhooks.h: Remove #ifdef CONSP. + * xterm.c (NO_INLINE, noinline): Move definitions to ../configure.in. Include unconditionally. === modified file 'src/termhooks.h' --- src/termhooks.h 2010-09-25 09:36:36 +0000 +++ src/termhooks.h 2010-10-03 16:21:55 +0000 @@ -44,11 +44,6 @@ /* Input queue declarations and hooks. */ -/* Expedient hack: only provide the below definitions to files that - are prepared to handle lispy things. CONSP is defined if lisp.h - has been included before this file. */ -#ifdef CONSP - enum event_kind { NO_EVENT, /* nothing happened. This should never @@ -317,8 +312,6 @@ extern struct tty_display_info *gpm_tty; #endif -#endif /* CONSP */ - struct ns_display_info; struct x_display_info; ------------------------------------------------------------ revno: 101765 committer: Michael Albinus branch nick: trunk timestamp: Sun 2010-10-03 17:58:09 +0200 message: * files.texi (Magic File Names): New defopt remote-file-name-inhibit-cache. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2010-10-02 02:30:11 +0000 +++ doc/lispref/ChangeLog 2010-10-03 15:58:09 +0000 @@ -1,3 +1,8 @@ +2010-10-03 Michael Albinus + + * files.texi (Magic File Names): New defopt + remote-file-name-inhibit-cache. + 2010-10-02 Glenn Morris * os.texi (Killing Emacs): Hook now runs in batch mode. === modified file 'doc/lispref/files.texi' --- doc/lispref/files.texi 2010-09-05 22:03:56 +0000 +++ doc/lispref/files.texi 2010-10-03 15:58:09 +0000 @@ -2857,6 +2857,34 @@ is a good way to come up with one. @end defun +@defopt remote-file-name-inhibit-cache +Whether to use the remote file-name cache for read access. + +File attributes of remote files are cached for better performance. If +they are changed out of Emacs' control, the cached values become +invalid, and must be reread. + +When set to @code{nil}, cached values are always used. This shall be +set with care. When set to @code{t}, cached values are never used. +ALthough this is the safest value, it could result in performance +degradation. + +A compromise is to set it to a positive number. This means that +cached values are used for that amount of seconds since they were +cached. + +In case a remote file is checked regularly, it might be reasonable to +let-bind this variable to a value less then the time period between +two checks. Example: + +@example +(defun display-time-file-nonempty-p (file) + (let ((remote-file-name-inhibit-cache (- display-time-interval 5))) + (and (file-exists-p file) + (< 0 (nth 7 (file-attributes (file-chase-links file))))))) +@end example +@end defopt + @node Format Conversion @section File Format Conversion ------------------------------------------------------------ revno: 101764 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-10-03 08:46:41 -0700 message: * lib-src/Makefile.in: Remove ^L, old makes choke on it. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2010-10-03 00:00:01 +0000 +++ lib-src/ChangeLog 2010-10-03 15:46:41 +0000 @@ -1,3 +1,7 @@ +2010-10-03 Dan Nicolaescu + + * Makefile.in: Remove ^L, old makes choke on it. + 2010-10-02 Wolfgang Schnerring (tiny change) * emacsclient.c (main): Return EXIT_FAILURE if Emacs sends us an === modified file 'lib-src/Makefile.in' --- lib-src/Makefile.in 2010-07-12 14:16:38 +0000 +++ lib-src/Makefile.in 2010-10-03 15:46:41 +0000 @@ -177,7 +177,6 @@ LOADLIBES=$(LIBS_SYSTEM) - ## This is the default compilation command. ## But we should never rely on it, because some make version failed to ## find it for getopt.o. ------------------------------------------------------------ revno: 101763 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-10-03 08:39:21 -0700 message: * configure.in (NO_INLINE, noinline): Move here from src/xterm.c. * src/xterm.c (NO_INLINE, noinline): Move definitions to ../configure.in. diff: === modified file 'ChangeLog' --- ChangeLog 2010-10-01 13:56:33 +0000 +++ ChangeLog 2010-10-03 15:39:21 +0000 @@ -1,3 +1,7 @@ +2010-10-03 Dan Nicolaescu + + * configure.in (NO_INLINE, noinline): Move here from src/xterm.c. + 2010-10-01 Dan Nicolaescu * configure.in: Include stdlib.h and string.h unconditionally. === modified file 'configure.in' --- configure.in 2010-10-01 13:56:33 +0000 +++ configure.in 2010-10-03 15:39:21 +0000 @@ -3643,6 +3643,17 @@ #define NO_RETURN /* nothing */ #endif +#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ +#define NO_INLINE __attribute__((noinline)) +#else +#define NO_INLINE +#endif + +/* Some versions of GNU/Linux define noinline in their headers. */ +#ifdef noinline +#undef noinline +#endif + /* These won't be used automatically yet. We also need to know, at least, that the stack is continuous. */ #ifdef __GNUC__ === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-03 15:19:34 +0000 +++ src/ChangeLog 2010-10-03 15:39:21 +0000 @@ -1,5 +1,7 @@ 2010-10-03 Dan Nicolaescu + * xterm.c (NO_INLINE, noinline): Move definitions to ../configure.in. + Include unconditionally. * termcap.c: * sysdep.c: === modified file 'src/config.in' --- src/config.in 2010-10-01 13:56:33 +0000 +++ src/config.in 2010-10-03 15:39:21 +0000 @@ -1206,6 +1206,17 @@ #define NO_RETURN /* nothing */ #endif +#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ +#define NO_INLINE __attribute__((noinline)) +#else +#define NO_INLINE +#endif + +/* Some versions of GNU/Linux define noinline in their headers. */ +#ifdef noinline +#undef noinline +#endif + /* These won't be used automatically yet. We also need to know, at least, that the stack is continuous. */ #ifdef __GNUC__ === modified file 'src/xterm.c' --- src/xterm.c 2010-09-20 11:32:26 +0000 +++ src/xterm.c 2010-10-03 15:39:21 +0000 @@ -7729,18 +7729,6 @@ /* .gdbinit puts a breakpoint here, so make sure it is not inlined. */ -#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ -#define NO_INLINE __attribute__((noinline)) -#else -#define NO_INLINE -#endif - -/* Some versions of GNU/Linux define noinline in their headers. */ - -#ifdef noinline -#undef noinline -#endif - /* On older GCC versions, just putting x_error_quitter after x_error_handler prevents inlining into the former. */ ------------------------------------------------------------ revno: 101762 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-10-03 08:19:34 -0700 message: Include unconditionally. * src/termcap.c: * src/sysdep.c: * src/lread.c: * src/keyboard.c: * src/filelock.c: * src/fileio.c: * src/doc.c: * src/callproc.c: * src/alloc.c: Remove include guards for , process.c already does it. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-03 14:48:21 +0000 +++ src/ChangeLog 2010-10-03 15:19:34 +0000 @@ -1,5 +1,17 @@ 2010-10-03 Dan Nicolaescu + Include unconditionally. + * termcap.c: + * sysdep.c: + * lread.c: + * keyboard.c: + * filelock.c: + * fileio.c: + * doc.c: + * callproc.c: + * alloc.c: Remove include guards for , process.c already + does it. + * process.c: Do not include , syswait.h does it. * sysdep.c (flush_pending_output): Remove code, does not do === modified file 'src/alloc.c' --- src/alloc.c 2010-09-23 12:09:12 +0000 +++ src/alloc.c 2010-10-03 15:19:34 +0000 @@ -65,15 +65,12 @@ extern POINTER_TYPE *sbrk (); #endif -#ifdef HAVE_FCNTL_H #include -#endif #ifndef O_WRONLY #define O_WRONLY 1 #endif #ifdef WINDOWSNT -#include #include "w32.h" #endif === modified file 'src/callproc.c' --- src/callproc.c 2010-10-01 13:56:33 +0000 +++ src/callproc.c 2010-10-03 15:19:34 +0000 @@ -31,20 +31,16 @@ #endif #include -#ifdef HAVE_FCNTL_H #include -#endif #ifdef WINDOWSNT #define NOMINMAX #include -#include #include "w32.h" #define _P_NOWAIT 1 /* from process.h */ #endif #ifdef MSDOS /* Demacs 1.1.1 91/10/16 HIRANO Satoshi */ -#include #include #include #endif /* MSDOS */ === modified file 'src/doc.c' --- src/doc.c 2010-09-23 19:53:46 +0000 +++ src/doc.c 2010-10-03 15:19:34 +0000 @@ -25,10 +25,7 @@ #include /* Must be after sys/types.h for USG*/ #include #include - -#ifdef HAVE_FCNTL_H #include -#endif #ifdef HAVE_UNISTD_H #include === modified file 'src/fileio.c' --- src/fileio.c 2010-10-01 13:56:33 +0000 +++ src/fileio.c 2010-10-03 15:19:34 +0000 @@ -20,11 +20,7 @@ #include #include - -#ifdef HAVE_FCNTL_H #include -#endif - #include #include #include === modified file 'src/filelock.c' --- src/filelock.c 2010-10-01 13:56:33 +0000 +++ src/filelock.c 2010-10-03 15:19:34 +0000 @@ -31,9 +31,7 @@ #endif #include -#ifdef HAVE_FCNTL_H #include -#endif #ifdef HAVE_UNISTD_H #include === modified file 'src/keyboard.c' --- src/keyboard.c 2010-10-03 00:59:02 +0000 +++ src/keyboard.c 2010-10-03 15:19:34 +0000 @@ -62,9 +62,7 @@ #include #endif -#ifdef HAVE_FCNTL_H #include -#endif /* This is to get the definitions of the XK_ symbols. */ #ifdef HAVE_X_WINDOWS === modified file 'src/lread.c' --- src/lread.c 2010-09-25 11:55:30 +0000 +++ src/lread.c 2010-10-03 15:19:34 +0000 @@ -54,9 +54,7 @@ #include #endif /* HAVE_SETLOCALE */ -#ifdef HAVE_FCNTL_H #include -#endif #ifndef O_RDONLY #define O_RDONLY 0 #endif === modified file 'src/sysdep.c' --- src/sysdep.c 2010-10-03 14:43:17 +0000 +++ src/sysdep.c 2010-10-03 15:19:34 +0000 @@ -71,10 +71,7 @@ #endif #include - -#ifdef HAVE_FCNTL_H #include -#endif #include "systty.h" #include "syswait.h" === modified file 'src/termcap.c' --- src/termcap.c 2010-07-08 04:55:07 +0000 +++ src/termcap.c 2010-10-03 15:19:34 +0000 @@ -23,9 +23,7 @@ #include /* xmalloc is here */ /* Get the O_* definitions for open et al. */ #include -#ifdef HAVE_FCNTL_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif ------------------------------------------------------------ revno: 101761 committer: Michael Albinus branch nick: trunk timestamp: Sun 2010-10-03 17:09:11 +0200 message: * tramp.texi (Frequently Asked Questions): Mention remote-file-name-inhibit-cache. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-10-03 00:33:27 +0000 +++ doc/misc/ChangeLog 2010-10-03 15:09:11 +0000 @@ -1,3 +1,8 @@ +2010-10-03 Michael Albinus + + * tramp.texi (Frequently Asked Questions): Mention + remote-file-name-inhibit-cache. + 2010-10-02 Lars Magne Ingebrigtsen * gnus.texi (Splitting Mail): Fix @xref syntax. === modified file 'doc/misc/tramp.texi' --- doc/misc/tramp.texi 2010-09-13 15:32:45 +0000 +++ doc/misc/tramp.texi 2010-10-03 15:09:11 +0000 @@ -2753,7 +2753,10 @@ Use caching. This is already enabled by default. Information about the remote host as well as the remote files are cached for reuse. The information about remote hosts is kept in the file specified in -@code{tramp-persistency-file-name}. Keep this file. +@code{tramp-persistency-file-name}. Keep this file. If you are +confident, that files on remote hosts are not changed out of +@value{emacsname}' control, set @code{remote-file-name-inhibit-cache} +to @code{nil}. Disable version control. If you access remote files which are not under version control, a lot of check operations can be avoided by ------------------------------------------------------------ revno: 101760 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-10-03 07:48:21 -0700 message: * src/process.c: Do not include , syswait.h does it. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-03 14:43:17 +0000 +++ src/ChangeLog 2010-10-03 14:48:21 +0000 @@ -1,5 +1,7 @@ 2010-10-03 Dan Nicolaescu + * process.c: Do not include , syswait.h does it. + * sysdep.c (flush_pending_output): Remove code, does not do anything on any platform. === modified file 'src/process.c' --- src/process.c 2010-10-03 14:16:48 +0000 +++ src/process.c 2010-10-03 14:48:21 +0000 @@ -67,10 +67,6 @@ #include #endif -#ifdef HAVE_SYS_WAIT -#include -#endif - #ifdef HAVE_RES_INIT #include #include ------------------------------------------------------------ revno: 101759 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-10-03 07:43:17 -0700 message: * src/sysdep.c (flush_pending_output): Remove code, does not do anything on any platform. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-03 14:16:48 +0000 +++ src/ChangeLog 2010-10-03 14:43:17 +0000 @@ -1,5 +1,8 @@ 2010-10-03 Dan Nicolaescu + * sysdep.c (flush_pending_output): Remove code, does not do + anything on any platform. + Remove unused code. * sysdep.c (select_alarm, sys_select, read_input_waiting): Remove select emulation, all systems support select. === modified file 'src/sysdep.c' --- src/sysdep.c 2010-10-03 14:16:48 +0000 +++ src/sysdep.c 2010-10-03 14:43:17 +0000 @@ -363,22 +363,7 @@ void flush_pending_output (int channel) { -#ifndef DOS_NT - /* If we try this, we get hit with SIGTTIN, because - the child's tty belongs to the child's pgrp. */ -#else -#ifdef TCFLSH - ioctl (channel, TCFLSH, 1); -#else -#ifdef TIOCFLUSH - int zero = 0; - /* 3rd arg should be ignored - but some 4.2 kernels actually want the address of an int - and nonzero means something different. */ - ioctl (channel, TIOCFLUSH, &zero); -#endif -#endif -#endif + /* FIXME: maybe this function should be removed */ } /* Set up the terminal at the other end of a pseudo-terminal that ------------------------------------------------------------ revno: 101758 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-10-03 07:16:48 -0700 message: Remove unused code. * src/sysdep.c (select_alarm, sys_select, read_input_waiting): Remove select emulation, all systems support select. (set_exclusive_use): Remove, the only user is in an #if 0 block. * src/process.c (create_process): Remove #if 0 code. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-03 13:59:56 +0000 +++ src/ChangeLog 2010-10-03 14:16:48 +0000 @@ -1,5 +1,11 @@ 2010-10-03 Dan Nicolaescu + Remove unused code. + * sysdep.c (select_alarm, sys_select, read_input_waiting): Remove + select emulation, all systems support select. + (set_exclusive_use): Remove, the only user is in an #if 0 block. + * process.c (create_process): Remove #if 0 code. + Remove unused arguments for unexec. The third one is never used, and the last two are always passed as zero. * emacs.c (unexec): Add declaration. === modified file 'src/process.c' --- src/process.c 2010-10-01 13:56:33 +0000 +++ src/process.c 2010-10-03 14:16:48 +0000 @@ -118,6 +118,7 @@ #ifdef HAVE_NS #include "nsterm.h" #endif + extern int timers_run; Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; @@ -1870,12 +1871,6 @@ } #endif -#if 0 - /* Replaced by close_process_descs */ - set_exclusive_use (inchannel); - set_exclusive_use (outchannel); -#endif - #ifdef O_NONBLOCK fcntl (inchannel, F_SETFL, O_NONBLOCK); fcntl (outchannel, F_SETFL, O_NONBLOCK); === modified file 'src/sysdep.c' --- src/sysdep.c 2010-08-22 15:14:37 +0000 +++ src/sysdep.c 2010-10-03 14:16:48 +0000 @@ -300,16 +300,6 @@ } -/*ARGSUSED*/ -void -set_exclusive_use (int fd) -{ -#ifdef FIOCLEX - ioctl (fd, FIOCLEX, 0); -#endif - /* Ok to do nothing if this feature does not exist */ -} - int wait_debugging; /* Set nonzero to make following function work under dbx (at least for bsd). */ @@ -483,7 +473,7 @@ EMACS_SET_TTY (out, &s, 0); #endif /* not WINDOWSNT */ } -#endif /* MSDOS */ +#endif /* not MSDOS */ /* Record a signal code and the handler for it. */ @@ -1486,242 +1476,6 @@ } } -#ifndef MSDOS -#if !defined (HAVE_SELECT) - -#include "sysselect.h" -#undef select - -#if defined (HAVE_X_WINDOWS) && !defined (HAVE_SELECT) -/* Cause explanatory error message at compile time, - since the select emulation is not good enough for X. */ -int *x = &x_windows_lose_if_no_select_system_call; -#endif - -/* Emulate as much as select as is possible under 4.1 and needed by Gnu Emacs - * Only checks read descriptors. - */ -/* How long to wait between checking fds in select */ -#define SELECT_PAUSE 1 -int select_alarmed; - -/* For longjmp'ing back to read_input_waiting. */ - -jmp_buf read_alarm_throw; - -/* Nonzero if the alarm signal should throw back to read_input_waiting. - The read_socket_hook function sets this to 1 while it is waiting. */ - -int read_alarm_should_throw; - -void -select_alarm (int ignore) -{ - select_alarmed = 1; - signal (SIGALRM, SIG_IGN); - SIGNAL_THREAD_CHECK (SIGALRM); - if (read_alarm_should_throw) - longjmp (read_alarm_throw, 1); -} - -#ifndef WINDOWSNT -/* Only rfds are checked. */ -int -sys_select (int nfds, - SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, - EMACS_TIME *timeout) -{ - /* XXX This needs to be updated for multi-tty support. Is there - anybody who needs to emulate select these days? */ - int ravail = 0; - SELECT_TYPE orfds; - int timeoutval; - int *local_timeout; - extern int proc_buffered_char[]; - extern int process_tick, update_tick; - unsigned char buf; - -#if defined (HAVE_SELECT) && defined (HAVE_X_WINDOWS) - /* If we're using X, then the native select will work; we only need the - emulation for non-X usage. */ - if (!NILP (Vinitial_window_system)) - return select (nfds, rfds, wfds, efds, timeout); -#endif - timeoutval = timeout ? EMACS_SECS (*timeout) : 100000; - local_timeout = &timeoutval; - FD_ZERO (&orfds); - if (rfds) - { - orfds = *rfds; - FD_ZERO (rfds); - } - if (wfds) - FD_ZERO (wfds); - if (efds) - FD_ZERO (efds); - - /* If we are looking only for the terminal, with no timeout, - just read it and wait -- that's more efficient. */ - if (*local_timeout == 100000 && process_tick == update_tick - && FD_ISSET (0, &orfds)) - { - int fd; - for (fd = 1; fd < nfds; ++fd) - if (FD_ISSET (fd, &orfds)) - goto hardway; - if (! detect_input_pending ()) - read_input_waiting (); - FD_SET (0, rfds); - return 1; - } - - hardway: - /* Once a second, till the timer expires, check all the flagged read - * descriptors to see if any input is available. If there is some then - * set the corresponding bit in the return copy of rfds. - */ - while (1) - { - register int to_check, fd; - - if (rfds) - { - for (to_check = nfds, fd = 0; --to_check >= 0; fd++) - { - if (FD_ISSET (fd, &orfds)) - { - int avail = 0, status = 0; - - if (fd == 0) - avail = detect_input_pending (); /* Special keyboard handler */ - else - { -#ifdef FIONREAD - status = ioctl (fd, FIONREAD, &avail); -#else /* no FIONREAD */ - /* Hoping it will return -1 if nothing available - or 0 if all 0 chars requested are read. */ - if (proc_buffered_char[fd] >= 0) - avail = 1; - else - { - avail = read (fd, &buf, 1); - if (avail > 0) - proc_buffered_char[fd] = buf; - } -#endif /* no FIONREAD */ - } - if (status >= 0 && avail > 0) - { - FD_SET (fd, rfds); - ravail++; - } - } - } - } - if (*local_timeout == 0 || ravail != 0 || process_tick != update_tick) - break; - - turn_on_atimers (0); - signal (SIGALRM, select_alarm); - select_alarmed = 0; - alarm (SELECT_PAUSE); - - /* Wait for a SIGALRM (or maybe a SIGTINT) */ - while (select_alarmed == 0 && *local_timeout != 0 - && process_tick == update_tick) - { - /* If we are interested in terminal input, - wait by reading the terminal. - That makes instant wakeup for terminal input at least. */ - if (FD_ISSET (0, &orfds)) - { - read_input_waiting (); - if (detect_input_pending ()) - select_alarmed = 1; - } - else - pause (); - } - (*local_timeout) -= SELECT_PAUSE; - - /* Reset the old alarm if there was one. */ - turn_on_atimers (1); - - if (*local_timeout == 0) /* Stop on timer being cleared */ - break; - } - return ravail; -} -#endif /* not WINDOWSNT */ - -/* Read keyboard input into the standard buffer, - waiting for at least one character. */ - -void -read_input_waiting (void) -{ - /* XXX This needs to be updated for multi-tty support. Is there - anybody who needs to emulate select these days? */ - int nread, i; - - if (read_socket_hook) - { - struct input_event hold_quit; - - EVENT_INIT (hold_quit); - hold_quit.kind = NO_EVENT; - - read_alarm_should_throw = 0; - if (! setjmp (read_alarm_throw)) - nread = (*read_socket_hook) (0, 1, &hold_quit); - else - nread = -1; - - if (hold_quit.kind != NO_EVENT) - kbd_buffer_store_event (&hold_quit); - } - else - { - struct input_event e; - char buf[3]; - nread = read (fileno (stdin), buf, 1); - EVENT_INIT (e); - - /* Scan the chars for C-g and store them in kbd_buffer. */ - e.kind = ASCII_KEYSTROKE_EVENT; - e.frame_or_window = selected_frame; - e.modifiers = 0; - for (i = 0; i < nread; i++) - { - /* Convert chars > 0177 to meta events if desired. - We do this under the same conditions that read_avail_input does. */ - if (read_socket_hook == 0) - { - /* If the user says she has a meta key, then believe her. */ - if (meta_key == 1 && (buf[i] & 0x80)) - e.modifiers = meta_modifier; - if (meta_key != 2) - buf[i] &= ~0x80; - } - - XSETINT (e.code, buf[i]); - kbd_buffer_store_event (&e); - /* Don't look at input that follows a C-g too closely. - This reduces lossage due to autorepeat on C-g. */ - if (buf[i] == quit_char) - break; - } - } -} - -#if !defined (HAVE_SELECT) -#define select sys_select -#endif - -#endif /* not HAVE_SELECT */ -#endif /* not MSDOS */ - /* POSIX signals support - DJB */ /* Anyone with POSIX signals should have ANSI C declarations */ @@ -2271,7 +2025,6 @@ #ifndef HAVE_GETTIMEOFDAY #ifdef HAVE_TIMEVAL -/* ARGSUSED */ int gettimeofday (struct timeval *tp, struct timezone *tzp) { ------------------------------------------------------------ revno: 101757 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-10-03 06:59:56 -0700 message: Remove unused arguments for unexec. The third one is never used, and the last two are always passed as zero. * src/emacs.c (unexec): Add declaration. (Fdump_emacs): Only pass the first two arguments to unexec. Simplify #ifdef. * src/unexw32.c (unexec): * src/unexsol.c (unexec): * src/unexhp9k800.c (unexec): * src/unexcw.c (unexec): Remove the last 3 arguments, unused. * src/unexelf.c (unexec): Remove the last 3 arguments, unused. (find_section): Use const. * src/unexmacosx.c (unexec): Remove the last 3 arguments, unused. (unexec_error): Declare it NO_RETURN. * src/unexcoff.c (make_hdr): Assume bss_start is always zero, remove it as an argument, remove data_start and entry_address arguments, unused. (unexec): Remove bss_start, data_start and entry_address arguments. * src/unexaix.c (make_hdr): Assume bss_start is always zero, remove it as an argument, remove data_start and entry_address arguments, unused. (unexec): Remove bss_start, data_start and entry_address arguments. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-03 12:36:19 +0000 +++ src/ChangeLog 2010-10-03 13:59:56 +0000 @@ -1,3 +1,27 @@ +2010-10-03 Dan Nicolaescu + + Remove unused arguments for unexec. + The third one is never used, and the last two are always passed as zero. + * emacs.c (unexec): Add declaration. + (Fdump_emacs): Only pass the first two arguments to unexec. + Simplify #ifdef. + * unexw32.c (unexec): + * unexsol.c (unexec): + * unexhp9k800.c (unexec): + * unexcw.c (unexec): Remove the last 3 arguments, unused. + * unexelf.c (unexec): Remove the last 3 arguments, unused. + (find_section): Use const. + * unexmacosx.c (unexec): Remove the last 3 arguments, unused. + (unexec_error): Declare it NO_RETURN. + * unexcoff.c (make_hdr): Assume bss_start is always zero, remove + it as an argument, remove data_start and entry_address arguments, unused. + (unexec): Remove bss_start, data_start and + entry_address arguments. + * unexaix.c (make_hdr): Assume bss_start is always zero, remove + it as an argument, remove data_start and entry_address arguments, unused. + (unexec): Remove bss_start, data_start and + entry_address arguments. + 2010-10-03 Juanma Barranquero * makefile.w32-in (TAGS, TAGS-LISP, TAGS-gmake): Add $(FONTOBJ). === modified file 'src/emacs.c' --- src/emacs.c 2010-10-02 08:24:14 +0000 +++ src/emacs.c 2010-10-03 13:59:56 +0000 @@ -2118,6 +2118,10 @@ #ifndef CANNOT_DUMP +/* FIXME: maybe this should go into header file, config.h seems the + only one appropriate. */ +extern int unexec (const char *, const char *); + DEFUN ("dump-emacs", Fdump_emacs, Sdump_emacs, 2, 2, 0, doc: /* Dump current state of Emacs into executable file FILENAME. Take symbols from SYMFILE (presumably the file you executed to run Emacs). @@ -2185,13 +2189,13 @@ Meanwhile, my_edata is not valid on Windows. */ memory_warnings (my_edata, malloc_warning); #endif /* not WINDOWSNT */ -#endif -#if !defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT +#if defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT /* Pthread may call malloc before main, and then we will get an endless loop, because pthread_self (see alloc.c) calls malloc the first time it is called on some systems. */ reset_malloc_hooks (); #endif +#endif /* not SYSTEM_MALLOC */ #ifdef DOUG_LEA_MALLOC malloc_state_ptr = malloc_get_state (); #endif @@ -2199,8 +2203,7 @@ #ifdef USE_MMAP_FOR_BUFFERS mmap_set_vars (0); #endif - unexec (SDATA (filename), - !NILP (symfile) ? SDATA (symfile) : 0, my_edata, 0, 0); + unexec (SDATA (filename), !NILP (symfile) ? SDATA (symfile) : 0); #ifdef USE_MMAP_FOR_BUFFERS mmap_set_vars (1); #endif === modified file 'src/unexaix.c' --- src/unexaix.c 2010-07-08 03:03:52 +0000 +++ src/unexaix.c 2010-10-03 13:59:56 +0000 @@ -31,24 +31,13 @@ * Mike Sperber * * Synopsis: - * unexec (new_name, a_name, data_start, bss_start, entry_address) - * char *new_name, *a_name; - * unsigned data_start, bss_start, entry_address; + * unexec (const char *new_name, const *old_name); * * Takes a snapshot of the program and makes an a.out format file in the * file named by the string argument new_name. * If a_name is non-NULL, the symbol table will be taken from the given file. * On some machines, an existing a_name file is required. * - * data_start and entry_address are ignored. - * - * bss_start indicates how much of the data segment is to be saved in the - * a.out file and restored when the program is executed. It gives the lowest - * unsaved address, and is rounded up to a page boundary. The default when 0 - * is given assumes that the entire data segment is to be stored, including - * the previous data and bss as well as any additional storage allocated with - * sbrk(2). - * */ #ifndef emacs @@ -143,10 +132,7 @@ * * driving logic. */ -int unexec (char *new_name, char *a_name, - unsigned data_start, - unsigned bss_start, - unsigned entry_address) +int unexec (const char *new_name, const char *a_name) { int new = -1, a_out = -1; @@ -159,8 +145,6 @@ PERROR (new_name); } if (make_hdr (new, a_out, - data_start, bss_start, - entry_address, a_name, new_name) < 0 || copy_text_and_data (new) < 0 || copy_sym (new, a_out, a_name, new_name) < 0 @@ -186,12 +170,11 @@ */ static int make_hdr (int new, int a_out, - unsigned data_start, unsigned bss_start, - unsigned entry_address, char *a_name, char *new_name) { int scns; - unsigned int bss_end; + unsigned int bss_start; + unsigned int data_start; struct scnhdr section[MAX_SECTIONS]; struct scnhdr * f_thdr; /* Text section header */ @@ -211,22 +194,8 @@ data_start = data_start & ~pagemask; /* (Down) to page boundary. */ - bss_end = ADDR_CORRECT (sbrk (0)) + pagemask; - bss_end &= ~ pagemask; - /* Adjust data/bss boundary. */ - if (bss_start != 0) - { - bss_start = (ADDR_CORRECT (bss_start) + pagemask); - /* (Up) to page bdry. */ - bss_start &= ~ pagemask; - if (bss_start > bss_end) - { - ERROR1 ("unexec: Specified bss_start (%u) is past end of program", - bss_start); - } - } - else - bss_start = bss_end; + bss_start = ADDR_CORRECT (sbrk (0)) + pagemask; + bss_start &= ~ pagemask; if (data_start > bss_start) /* Can't have negative data size. */ { @@ -311,7 +280,7 @@ f_hdr.f_flags |= (F_RELFLG | F_EXEC); f_ohdr.dsize = bss_start - f_ohdr.data_start; - f_ohdr.bsize = bss_end - bss_start; + f_ohdr.bsize = 0; f_dhdr->s_size = f_ohdr.dsize; f_bhdr->s_size = f_ohdr.bsize; === modified file 'src/unexcoff.c' --- src/unexcoff.c 2010-08-22 15:37:01 +0000 +++ src/unexcoff.c 2010-10-03 13:59:56 +0000 @@ -34,37 +34,13 @@ * Modified heavily since then. * * Synopsis: - * unexec (new_name, a_name, data_start, bss_start, entry_address) - * char *new_name, *a_name; - * unsigned data_start, bss_start, entry_address; + * unexec (const char *new_name, const char *old_name); * * Takes a snapshot of the program and makes an a.out format file in the * file named by the string argument new_name. * If a_name is non-NULL, the symbol table will be taken from the given file. * On some machines, an existing a_name file is required. * - * The boundaries within the a.out file may be adjusted with the data_start - * and bss_start arguments. Either or both may be given as 0 for defaults. - * - * Data_start gives the boundary between the text segment and the data - * segment of the program. The text segment can contain shared, read-only - * program code and literal data, while the data segment is always unshared - * and unprotected. Data_start gives the lowest unprotected address. - * The value you specify may be rounded down to a suitable boundary - * as required by the machine you are using. - * - * Specifying zero for data_start means the boundary between text and data - * should not be the same as when the program was loaded. - * - * Bss_start indicates how much of the data segment is to be saved in the - * a.out file and restored when the program is executed. It gives the lowest - * unsaved address, and is rounded up to a page boundary. The default when 0 - * is given assumes that the entire data segment is to be stored, including - * the previous data and bss as well as any additional storage allocated with - * break (2). - * - * The new file is set up to start at entry_address. - * * If you make improvements I'd like to get them too. * harpo!utah-cs!thomas, thomas@Utah-20 * @@ -186,15 +162,16 @@ * Modify the text and data sizes. */ static int -make_hdr (int new, int a_out, unsigned data_start, unsigned bss_start, - unsigned entry_address, const char *a_name, const char *new_name) +make_hdr (int new, int a_out, + const char *a_name, const char *new_name) { auto struct scnhdr f_thdr; /* Text section header */ auto struct scnhdr f_dhdr; /* Data section header */ auto struct scnhdr f_bhdr; /* Bss section header */ auto struct scnhdr scntemp; /* Temporary section header */ register int scns; - unsigned int bss_end; + unsigned int bss_start; + unsigned int data_start; pagemask = getpagesize () - 1; @@ -203,23 +180,8 @@ data_start = ADDR_CORRECT (data_start); data_start = data_start & ~pagemask; /* (Down) to page boundary. */ - bss_end = ADDR_CORRECT (sbrk (0)) + pagemask; - bss_end &= ~ pagemask; - - /* Adjust data/bss boundary. */ - if (bss_start != 0) - { - bss_start = (ADDR_CORRECT (bss_start) + pagemask); - /* (Up) to page bdry. */ - bss_start &= ~ pagemask; - if (bss_start > bss_end) - { - ERROR1 ("unexec: Specified bss_start (%u) is past end of program", - bss_start); - } - } - else - bss_start = bss_end; + bss_start = ADDR_CORRECT (sbrk (0)) + pagemask; + bss_start &= ~ pagemask; if (data_start > bss_start) /* Can't have negative data size. */ { @@ -300,7 +262,7 @@ f_hdr.f_flags |= (F_RELFLG | F_EXEC); f_ohdr.dsize = bss_start - f_ohdr.data_start; - f_ohdr.bsize = bss_end - bss_start; + f_ohdr.bsize = 0; f_thdr.s_size = f_ohdr.tsize; f_thdr.s_scnptr = sizeof (f_hdr) + sizeof (f_ohdr); f_thdr.s_scnptr += (f_hdr.f_nscns) * (sizeof (f_thdr)); @@ -571,8 +533,7 @@ * driving logic. */ int -unexec (const char *new_name, const char *a_name, - unsigned data_start, unsigned bss_start, unsigned entry_address) +unexec (const char *new_name, const char *a_name) { int new = -1, a_out = -1; @@ -585,7 +546,7 @@ PERROR (new_name); } - if (make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) < 0 + if (make_hdr (new, a_out, a_name, new_name) < 0 || copy_text_and_data (new, a_out) < 0 || copy_sym (new, a_out, a_name, new_name) < 0 || adjust_lnnoptrs (new, a_out, new_name) < 0 === modified file 'src/unexcw.c' --- src/unexcw.c 2010-01-13 08:35:10 +0000 +++ src/unexcw.c 2010-10-03 13:59:56 +0000 @@ -248,8 +248,7 @@ } int -unexec (char *outfile, char *infile, unsigned start_data, unsigned d1, - unsigned d2) +unexec (const char *outfile, const char *infile) { char infile_buffer[FILENAME_MAX]; char outfile_buffer[FILENAME_MAX]; === modified file 'src/unexelf.c' --- src/unexelf.c 2010-08-09 09:35:21 +0000 +++ src/unexelf.c 2010-10-03 13:59:56 +0000 @@ -33,34 +33,13 @@ * Modified heavily since then. * * Synopsis: - * unexec (new_name, old_name, data_start, bss_start, entry_address) - * char *new_name, *old_name; - * unsigned data_start, bss_start, entry_address; + * unexec (const char *new_name, const char *old_name); * * Takes a snapshot of the program and makes an a.out format file in the * file named by the string argument new_name. * If old_name is non-NULL, the symbol table will be taken from the given file. * On some machines, an existing old_name file is required. * - * The boundaries within the a.out file may be adjusted with the data_start - * and bss_start arguments. Either or both may be given as 0 for defaults. - * - * Data_start gives the boundary between the text segment and the data - * segment of the program. The text segment can contain shared, read-only - * program code and literal data, while the data segment is always unshared - * and unprotected. Data_start gives the lowest unprotected address. - * The value you specify may be rounded down to a suitable boundary - * as required by the machine you are using. - * - * Bss_start indicates how much of the data segment is to be saved in the - * a.out file and restored when the program is executed. It gives the lowest - * unsaved address, and is rounded up to a page boundary. The default when 0 - * is given assumes that the entire data segment is to be stored, including - * the previous data and bss as well as any additional storage allocated with - * break (2). - * - * The new file is set up to start at entry_address. - * */ /* Even more heavily modified by james@bigtex.cactus.org of Dell Computer Co. @@ -610,7 +589,7 @@ if NOERROR is 0; we return -1 if NOERROR is nonzero. */ static int -find_section (const char *name, char *section_names, char *file_name, +find_section (const char *name, const char *section_names, const char *file_name, ElfW(Ehdr) *old_file_h, ElfW(Shdr) *old_section_h, int noerror) { int idx; @@ -646,8 +625,7 @@ * */ void -unexec (char *new_name, char *old_name, unsigned int data_start, - unsigned int bss_start, unsigned int entry_address) +unexec (const char *new_name, const char *old_name) { int new_file, old_file, new_file_size; === modified file 'src/unexhp9k800.c' --- src/unexhp9k800.c 2008-06-26 04:24:54 +0000 +++ src/unexhp9k800.c 2010-10-03 13:59:56 +0000 @@ -79,12 +79,9 @@ /* Create a new a.out file, same as old but with current data space */ - -unexec (new_name, old_name, new_end_of_text, dummy1, dummy2) - char new_name[]; /* name of the new a.out file to be created */ - char old_name[]; /* name of the old a.out file */ - char *new_end_of_text; /* ptr to new edata/etext; NOT USED YET */ - int dummy1, dummy2; /* not used by emacs */ +int +unexec (const char *new_name, /* name of the new a.out file to be created */ + const char *old_name) /* name of the old a.out file */ { int old, new; int old_size, new_size; === modified file 'src/unexmacosx.c' --- src/unexmacosx.c 2010-08-11 08:36:27 +0000 +++ src/unexmacosx.c 2010-10-03 13:59:56 +0000 @@ -190,6 +190,8 @@ static struct segment_command *data_segment_scp; +static void unexec_error (const char *format, ...) NO_RETURN; + /* Read N bytes from infd into memory starting at address DEST. Return true if successful, false otherwise. */ static int @@ -1217,9 +1219,8 @@ from it. The file names of the output and input files are outfile and infile, respectively. The three other parameters are ignored. */ -void -unexec (char *outfile, char *infile, void *start_data, void *start_bss, - void *entry_address) +int +unexec (const char *outfile, const char *infile) { if (in_dumped_exec) unexec_error ("Unexec from a dumped executable is not supported."); @@ -1249,6 +1250,7 @@ dump_it (); close (outfd); + return 0; } === modified file 'src/unexsol.c' --- src/unexsol.c 2010-10-01 13:56:33 +0000 +++ src/unexsol.c 2010-10-03 13:59:56 +0000 @@ -10,8 +10,7 @@ #include "coding.h" int -unexec (char *new_name, char *old_name, unsigned int data_start, - unsigned int bss_start, unsigned int entry_address) +unexec (const char *new_name, const char *old_name) { Lisp_Object data; Lisp_Object errstring; === modified file 'src/unexw32.c' --- src/unexw32.c 2010-01-13 08:35:10 +0000 +++ src/unexw32.c 2010-10-03 13:59:56 +0000 @@ -724,9 +724,8 @@ /* Dump out .data and .bss sections into a new executable. */ -void -unexec (char *new_name, char *old_name, void *start_data, void *start_bss, - void *entry_address) +int +unexec (const char *new_name, const char *old_name) { file_data in_file, out_file; char out_filename[MAX_PATH], in_filename[MAX_PATH]; @@ -821,6 +820,8 @@ close_file_data (&in_file); close_file_data (&out_file); + + return 0; } /* eof */ ------------------------------------------------------------ revno: 101756 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2010-10-03 14:52:04 +0200 message: src/gnutls.c: Fix typo in docstring. diff: === modified file 'src/gnutls.c' --- src/gnutls.c 2010-10-03 04:12:15 +0000 +++ src/gnutls.c 2010-10-03 12:52:04 +0000 @@ -218,7 +218,7 @@ } DEFUN ("gnutls-deinit", Fgnutls_deinit, Sgnutls_deinit, 1, 1, 0, - doc: /* Deallocate GNU TLS resources associated with process PROC. + doc: /* Deallocate GnuTLS resources associated with process PROC. See also `gnutls-init'. */) (Lisp_Object proc) { @@ -236,8 +236,8 @@ return Qt; } -/* Initializes global GNU TLS state to defaults. -Call `gnutls-global-deinit' when GNU TLS usage is no longer needed. +/* Initializes global GnuTLS state to defaults. +Call `gnutls-global-deinit' when GnuTLS usage is no longer needed. Returns zero on success. */ static Lisp_Object gnutls_emacs_global_init (void) @@ -252,7 +252,7 @@ return gnutls_make_error (ret); } -/* Deinitializes global GNU TLS state. +/* Deinitializes global GnuTLS state. See also `gnutls-global-init'. */ static Lisp_Object gnutls_emacs_global_deinit (void) ------------------------------------------------------------ revno: 101755 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Sun 2010-10-03 14:43:12 +0200 message: url-vars.el (url-mime-charset-string): Changed the default to nil to avoid sending 1171 bytes of not very useful data to the HTTP server every request. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2010-10-02 12:34:02 +0000 +++ lisp/url/ChangeLog 2010-10-03 12:43:12 +0000 @@ -1,3 +1,9 @@ +2010-10-03 Lars Magne Ingebrigtsen + + * url-vars.el (url-mime-charset-string): Changed the default to + nil to avoid sending 1171 bytes of not very useful data to the + HTTP server every request. + 2010-10-02 Lars Magne Ingebrigtsen * url-util.el (url-display-percentage): Don't message when the URL === modified file 'lisp/url/url-vars.el' --- lisp/url/url-vars.el 2010-09-18 20:49:25 +0000 +++ lisp/url/url-vars.el 2010-10-03 12:43:12 +0000 @@ -234,7 +234,7 @@ (mapconcat 'symbol-name ordered ";q=0.5, ") ";q=0.5")))) -(defvar url-mime-charset-string (url-mime-charset-string) +(defvar url-mime-charset-string nil "*String to send in the Accept-charset: field in HTTP requests. The MIME charset corresponding to the most preferred coding system is given priority 1 and the rest are given priority 0.5.") ------------------------------------------------------------ revno: 101754 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2010-10-03 14:36:19 +0200 message: src/makefile.w32-in (TAGS, TAGS-LISP, TAGS-gmake): Add $(FONTOBJ). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-10-03 04:12:15 +0000 +++ src/ChangeLog 2010-10-03 12:36:19 +0000 @@ -1,5 +1,7 @@ 2010-10-03 Juanma Barranquero + * makefile.w32-in (TAGS, TAGS-LISP, TAGS-gmake): Add $(FONTOBJ). + * gnutls.c (emacs_gnutls_handshake, gnutls_make_error) (gnutls_emacs_global_init, gnutls_emacs_global_deinit): Make static. (Fgnutls_get_initstage, Fgnutls_deinit, Fgnutls_boot, Fgnutls_bye): === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2010-10-02 12:12:17 +0000 +++ src/makefile.w32-in 2010-10-03 12:36:19 +0000 @@ -298,10 +298,10 @@ ## ## This works only with GNU Make. -TAGS: $(OBJ0) $(OBJ1) $(WIN32OBJ) +TAGS: $(OBJ0) $(OBJ1) $(WIN32OBJ) $(FONTOBJ) $(MAKE) $(MFLAGS) TAGS-$(MAKETYPE) -TAGS-LISP: $(OBJ0) $(OBJ1) $(WIN32OBJ) +TAGS-LISP: $(OBJ0) $(OBJ1) $(WIN32OBJ) $(FONTOBJ) $(MAKE) $(MFLAGS) TAGS-LISP-$(MAKETYPE) TAGS-gmake: @@ -311,7 +311,9 @@ ../lib-src/$(BLD)/etags.exe -a --regex=@../nt/emacs-src.tags \ $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ1)) ../lib-src/$(BLD)/etags.exe -a --regex=@../nt/emacs-src.tags \ - $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(WIN32OBJ)) $(CURDIR)/*.h + $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(WIN32OBJ)) \ + $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(FONTOBJ)) \ + $(CURDIR)/*.h TAGS-nmake: echo This target is not supported with NMake ------------------------------------------------------------ revno: 101753 committer: Chong Yidong branch nick: trunk timestamp: Sun 2010-10-03 00:31:59 -0400 message: Remove obsolete use of binary-overwrite-mode in bytecomp (Bug#7001). * emacs-lisp/bytecomp.el (byte-compile-from-buffer): Remove obsolete use of binary-overwrite-mode (Bug#7001). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-10-03 02:32:03 +0000 +++ lisp/ChangeLog 2010-10-03 04:31:59 +0000 @@ -1,3 +1,8 @@ +2010-10-03 Chong Yidong + + * emacs-lisp/bytecomp.el (byte-compile-from-buffer): Remove + obsolete use of binary-overwrite-mode (Bug#7001). + 2010-10-03 Glenn Morris * obsolete/x-menu.el: Remove file, obsolete since 21.1 === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2010-10-02 23:10:41 +0000 +++ lisp/emacs-lisp/bytecomp.el 2010-10-03 04:31:59 +0000 @@ -1800,15 +1800,7 @@ (set-buffer-multibyte t) (erase-buffer) ;; (emacs-lisp-mode) - (setq case-fold-search nil) - ;; This is a kludge. Some operating systems (OS/2, DOS) need - ;; to write files containing binary information specially. - ;; Under most circumstances, such files will be in binary - ;; overwrite mode, so those OS's use that flag to guess how - ;; they should write their data. Advise them that .elc files - ;; need to be written carefully. (There's no point running the - ;; mode hook, so don't call `binary-overwrite-mode'.) - (setq overwrite-mode 'overwrite-mode-binary)) + (setq case-fold-search nil)) (displaying-byte-compile-warnings (with-current-buffer bytecomp-inbuffer (and bytecomp-filename