Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 104013. ------------------------------------------------------------ revno: 104013 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-04-25 21:50:33 -0700 message: * admin/notes/bzr: Small updates. diff: === modified file 'admin/notes/bzr' --- admin/notes/bzr 2011-03-23 02:57:57 +0000 +++ admin/notes/bzr 2011-04-26 04:50:33 +0000 @@ -12,10 +12,17 @@ http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01124.html +The exception is, if you know that the change will be difficult to +merge to the trunk (eg because the trunk code has changed a lot). +In that case, it's helpful if you can apply the change to both trunk +and branch yourself (when committing the branch change, indicate +in the commit log that it should not be merged to the trunk; see below). + * Backporting a bug-fix from the trunk to a branch (e.g. "emacs-23"). -Label the commit as a backport, e.g. by starting the commit message with -"Backport:". This is helpful for the person merging the release branch -to the trunk. +Indicate in the commit log that there is no need to merge the commit +to the trunk. Anything that matches `bzrmerge-skip-regexp' will do; +eg start the commit message with "Backport:". This is helpful for the +person merging the release branch to the trunk. http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00262.html ------------------------------------------------------------ revno: 104012 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-04-25 21:45:37 -0700 message: * admin/notes/years: Small updates. diff: === modified file 'admin/notes/years' --- admin/notes/years 2009-01-12 06:35:57 +0000 +++ admin/notes/years 2011-04-26 04:45:37 +0000 @@ -6,6 +6,14 @@ There's no need to worry about whether an individual file has changed in a given year - it's sufficient that Emacs as a whole has changed. +Therefore the years are updated en-masse near the start of each year, +so basically there is no need for most people to do any updating of them. + +The current (in 2011) version of "Information for Maintainers of GNU +Software" (see that document for more details) says that it is OK to use +ranges in copyright years, so in early 2011 the years were changed to use +ranges, which occupy less space and do not grow in length every year. + For more detailed information on maintaining copyright, see the file "copyright" in this directory. ------------------------------------------------------------ revno: 104011 committer: Dan Nicolaescu branch nick: trunk timestamp: Mon 2011-04-25 14:36:06 -0700 message: Convert some function definitions to standard C. * src/alloc.c (check_sblock, check_string_bytes) (check_string_free_list): Convert to standard C. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-25 12:48:24 +0000 +++ src/ChangeLog 2011-04-25 21:36:06 +0000 @@ -1,3 +1,8 @@ +2011-04-25 Dan Nicolaescu + + * alloc.c (check_sblock, check_string_bytes) + (check_string_free_list): Convert to standard C. + 2011-04-25 Teodor Zlatanov * w32.c (emacs_gnutls_push): Fix typo. === modified file 'src/alloc.c' --- src/alloc.c 2011-04-16 21:47:57 +0000 +++ src/alloc.c 2011-04-25 21:36:06 +0000 @@ -1706,8 +1706,7 @@ /* Check validity of Lisp strings' string_bytes member in B. */ static void -check_sblock (b) - struct sblock *b; +check_sblock (struct sblock *b) { struct sdata *from, *end, *from_end; @@ -1740,8 +1739,7 @@ recently allocated strings. Used for hunting a bug. */ static void -check_string_bytes (all_p) - int all_p; +check_string_bytes (int all_p) { if (all_p) { @@ -1769,7 +1767,7 @@ This may catch buffer overrun from a previous string. */ static void -check_string_free_list () +check_string_free_list (void) { struct Lisp_String *s; ------------------------------------------------------------ revno: 104010 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-04-25 15:17:17 -0300 message: * lisp/emulation/cua-base.el (cua-selection-mode): Make it toggle again. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-25 18:10:17 +0000 +++ lisp/ChangeLog 2011-04-25 18:17:17 +0000 @@ -1,10 +1,14 @@ +2011-04-25 Stefan Monnier + + * emulation/cua-base.el (cua-selection-mode): Make it toggle again. + 2011-04-25 Michael Albinus - * net/tramp.el (tramp-process-actions): Add POS argument. Delete - region between POS and (pos). + * net/tramp.el (tramp-process-actions): Add POS argument. + Delete region between POS and (pos). - * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use - `nil' position in `tramp-process-actions' call. + * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): + Use `nil' position in `tramp-process-actions' call. (tramp-maybe-open-connection): Call `tramp-process-actions' with pos. * net/tramp-smb.el (tramp-smb-maybe-open-connection): Use `nil' === modified file 'lisp/emulation/cua-base.el' --- lisp/emulation/cua-base.el 2011-02-18 08:17:20 +0000 +++ lisp/emulation/cua-base.el 2011-04-25 18:17:17 +0000 @@ -1627,7 +1627,11 @@ "Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings." (interactive "P") (setq-default cua-enable-cua-keys nil) - (cua-mode arg)) + (if (not (called-interactively-p 'any)) + (cua-mode arg) + ;; Use call-interactive to turn a nil prefix arg into `toggle'. + (call-interactively 'cua-mode) + (customize-mark-as-set 'cua-enable-cua-keys))) (defun cua-debug () ------------------------------------------------------------ revno: 104009 committer: Michael Albinus branch nick: trunk timestamp: Mon 2011-04-25 20:14:38 +0200 message: * trampver.texi: Update release number. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-04-14 19:04:08 +0000 +++ doc/misc/ChangeLog 2011-04-25 18:14:38 +0000 @@ -1,3 +1,7 @@ +2011-04-25 Michael Albinus + + * trampver.texi: Update release number. + 2011-04-14 Michael Albinus * tramp.texi (Frequently Asked Questions): New item for disabling === modified file 'doc/misc/trampver.texi' --- doc/misc/trampver.texi 2011-03-12 19:19:47 +0000 +++ doc/misc/trampver.texi 2011-04-25 18:14:38 +0000 @@ -8,7 +8,7 @@ @c In the Tramp CVS, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.2.1 +@set trampver 2.2.2-pre @c Other flags from configuration @set instprefix /usr/local ------------------------------------------------------------ revno: 104008 committer: Michael Albinus branch nick: trunk timestamp: Mon 2011-04-25 20:10:17 +0200 message: * net/tramp.el (tramp-process-actions): Add POS argument. Delete region between POS and (pos). * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use `nil' position in `tramp-process-actions' call. (tramp-maybe-open-connection): Call `tramp-process-actions' with pos. * net/tramp-smb.el (tramp-smb-maybe-open-connection): Use `nil' position in `tramp-process-actions' call. * net/trampver.el: Update release number. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-25 16:52:51 +0000 +++ lisp/ChangeLog 2011-04-25 18:10:17 +0000 @@ -1,3 +1,17 @@ +2011-04-25 Michael Albinus + + * net/tramp.el (tramp-process-actions): Add POS argument. Delete + region between POS and (pos). + + * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use + `nil' position in `tramp-process-actions' call. + (tramp-maybe-open-connection): Call `tramp-process-actions' with pos. + + * net/tramp-smb.el (tramp-smb-maybe-open-connection): Use `nil' + position in `tramp-process-actions' call. + + * net/trampver.el: Update release number. + 2011-04-25 Stefan Monnier * custom.el (defcustom): Obey lexical-binding. === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2011-04-14 18:58:45 +0000 +++ lisp/net/tramp-sh.el 2011-04-25 18:10:17 +0000 @@ -2336,7 +2336,8 @@ orig-vec 6 "%s" (mapconcat 'identity (process-command p) " ")) (tramp-compat-set-process-query-on-exit-flag p nil) - (tramp-process-actions p v tramp-actions-copy-out-of-band))) + (tramp-process-actions + p v nil tramp-actions-copy-out-of-band))) ;; Reset the transfer process properties. (tramp-message orig-vec 6 "%s" (buffer-string)) @@ -4212,7 +4213,8 @@ (catch 'uname-changed (let ((p (tramp-get-connection-process vec)) (process-name (tramp-get-connection-property vec "process-name" nil)) - (process-environment (copy-sequence process-environment))) + (process-environment (copy-sequence process-environment)) + (pos (with-current-buffer (tramp-get-connection-buffer vec) (point)))) ;; If too much time has passed since last command was sent, look ;; whether process is still alive. If it isn't, kill it. When @@ -4366,7 +4368,7 @@ ;; Send the command. (tramp-message vec 3 "Sending command `%s'" command) (tramp-send-command vec command t t) - (tramp-process-actions p vec tramp-actions-before-shell 60) + (tramp-process-actions p vec pos tramp-actions-before-shell 60) (tramp-message vec 3 "Found remote shell prompt on `%s'" l-host)) ;; Next hop. === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2011-04-14 18:58:45 +0000 +++ lisp/net/tramp-smb.el 2011-04-25 18:10:17 +0000 @@ -1314,7 +1314,7 @@ ;; Play login scenario. (tramp-process-actions - p vec + p vec nil (if share tramp-smb-actions-with-share tramp-smb-actions-without-share)) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2011-03-12 19:19:47 +0000 +++ lisp/net/tramp.el 2011-04-25 18:10:17 +0000 @@ -3098,8 +3098,11 @@ (setq found (funcall action proc vec))))) found)) -(defun tramp-process-actions (proc vec actions &optional timeout) - "Perform actions until success or TIMEOUT." +(defun tramp-process-actions (proc vec pos actions &optional timeout) + "Perform ACTIONS until success or TIMEOUT. +PROC and VEC indicate the remote connection to be used. POS, if +set, is the starting point of the region to be deleted in the +connection buffer." ;; Preserve message for `progress-reporter'. (tramp-compat-with-temp-message "" ;; Enable auth-source and password-cache. @@ -3124,7 +3127,10 @@ (cond ((eq exit 'permission-denied) "Permission denied") ((eq exit 'process-died) "Process died") - (t "Login failed")))))))) + (t "Login failed")))) + (when (numberp pos) + (with-current-buffer (tramp-get-connection-buffer vec) + (let (buffer-read-only) (delete-region pos (point))))))))) :;; Utility functions: === modified file 'lisp/net/trampver.el' --- lisp/net/trampver.el 2011-03-12 19:19:47 +0000 +++ lisp/net/trampver.el 2011-04-25 18:10:17 +0000 @@ -31,7 +31,7 @@ ;; should be changed only there. ;;;###tramp-autoload -(defconst tramp-version "2.2.1" +(defconst tramp-version "2.2.2-pre" "This version of Tramp.") ;;;###tramp-autoload @@ -44,7 +44,7 @@ (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" - (format "Tramp 2.2.1 is not fit for %s" + (format "Tramp 2.2.2-pre is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) (unless (string-match "\\`ok\\'" x) (error "%s" x))) ------------------------------------------------------------ revno: 104007 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-04-25 13:52:51 -0300 message: * lisp/custom.el (defcustom): Obey lexical-binding. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-25 16:29:31 +0000 +++ lisp/ChangeLog 2011-04-25 16:52:51 +0000 @@ -1,5 +1,7 @@ 2011-04-25 Stefan Monnier + * custom.el (defcustom): Obey lexical-binding. + Fix octave-inf completion problems reported by Alexander Klimov. * progmodes/octave-inf.el (inferior-octave-mode-syntax-table): Inherit from octave-mode-syntax-table. === modified file 'lisp/custom.el' --- lisp/custom.el 2011-04-19 13:44:55 +0000 +++ lisp/custom.el 2011-04-25 16:52:51 +0000 @@ -313,11 +313,19 @@ ;; It is better not to use backquote in this file, ;; because that makes a bootstrapping problem ;; if you need to recompile all the Lisp files using interpreted code. - (nconc (list 'custom-declare-variable - (list 'quote symbol) - (list 'quote value) - doc) - args)) + `(custom-declare-variable + ',symbol + ,(if lexical-binding ;FIXME: This is not reliable, but is all we have. + ;; The `default' arg should be an expression that evaluates to + ;; the value to use. The use of `eval' for it is spread over + ;; many different places and hence difficult to eliminate, yet + ;; we want to make sure that the `value' expression is checked by the + ;; byte-compiler, and that lexical-binding is obeyed, so quote the + ;; expression with `lambda' rather than with `quote'. + `(list (lambda () ,value)) + `',value) + ,doc + ,@args)) ;;; The `defface' Macro. ------------------------------------------------------------ revno: 104006 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-04-25 13:29:31 -0300 message: Fix octave-inf completion problems reported by Alexander Klimov. * lisp/progmodes/octave-inf.el (inferior-octave-mode-syntax-table): Inherit from octave-mode-syntax-table. (inferior-octave-mode): Set info-lookup-mode. (inferior-octave-completion-at-point): New function. (inferior-octave-complete): Use it and completion-in-region. (inferior-octave-dynamic-complete-functions): Use it as well, and use comint-filename-completion. * lisp/progmodes/octave-mod.el (octave-mode-syntax-table): Use _ syntax for symbol elements which shouldn't be word elements. (octave-font-lock-keywords, octave-beginning-of-defun) (octave-function-header-regexp): Adjust regexps accordingly. (octave-mode-map): Also use info-lookup-symbol for C-c C-h. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-25 13:47:23 +0000 +++ lisp/ChangeLog 2011-04-25 16:29:31 +0000 @@ -1,3 +1,19 @@ +2011-04-25 Stefan Monnier + + Fix octave-inf completion problems reported by Alexander Klimov. + * progmodes/octave-inf.el (inferior-octave-mode-syntax-table): + Inherit from octave-mode-syntax-table. + (inferior-octave-mode): Set info-lookup-mode. + (inferior-octave-completion-at-point): New function. + (inferior-octave-complete): Use it and completion-in-region. + (inferior-octave-dynamic-complete-functions): Use it as well, and use + comint-filename-completion. + * progmodes/octave-mod.el (octave-mode-syntax-table): Use _ syntax for + symbol elements which shouldn't be word elements. + (octave-font-lock-keywords, octave-beginning-of-defun) + (octave-function-header-regexp): Adjust regexps accordingly. + (octave-mode-map): Also use info-lookup-symbol for C-c C-h. + 2011-04-25 Juanma Barranquero * net/gnutls.el (gnutls-errorp): Declare before first use. @@ -32,8 +48,8 @@ * finder.el (finder-list-matches): Use package-show-package-list instead of deleted package--list-packages. - * vc/vc-annotate.el (vc-annotate-goto-line): New command. Based - on a previous implementation by Juanma Barranquero (Bug#8366). + * vc/vc-annotate.el (vc-annotate-goto-line): New command. + Based on a previous implementation by Juanma Barranquero (Bug#8366). (vc-annotate-mode-map): Bind it to RET. 2011-04-24 Uday S Reddy (tiny change) === modified file 'lisp/progmodes/octave-inf.el' --- lisp/progmodes/octave-inf.el 2011-04-22 18:44:26 +0000 +++ lisp/progmodes/octave-inf.el 2011-04-25 16:29:31 +0000 @@ -73,10 +73,7 @@ "Keymap used in Inferior Octave mode.") (defvar inferior-octave-mode-syntax-table - (let ((table (make-syntax-table))) - (modify-syntax-entry ?\` "w" table) - (modify-syntax-entry ?\# "<" table) - (modify-syntax-entry ?\n ">" table) + (let ((table (make-syntax-table octave-mode-syntax-table))) table) "Syntax table in use in inferior-octave-mode buffers.") @@ -115,11 +112,13 @@ "Non-nil means that Octave has built-in variables.") (defvar inferior-octave-dynamic-complete-functions - '(inferior-octave-complete comint-dynamic-complete-filename) + '(inferior-octave-completion-at-point comint-filename-completion) "List of functions called to perform completion for inferior Octave. This variable is used to initialize `comint-dynamic-complete-functions' in the Inferior Octave buffer.") +(defvar info-lookup-mode) + (define-derived-mode inferior-octave-mode comint-mode "Inferior Octave" "Major mode for interacting with an inferior Octave process. Runs Octave as a subprocess of Emacs, with Octave I/O through an Emacs @@ -139,6 +138,8 @@ (set (make-local-variable 'font-lock-defaults) '(inferior-octave-font-lock-keywords nil nil)) + (set (make-local-variable 'info-lookup-mode) 'octave-mode) + (setq comint-input-ring-file-name (or (getenv "OCTAVE_HISTFILE") "~/.octave_hist") comint-input-ring-size (or (getenv "OCTAVE_HISTSIZE") 1024)) @@ -259,39 +260,38 @@ (inferior-octave-resync-dirs))) +(defun inferior-octave-completion-at-point () + "Return the data to complete the Octave symbol at point." + (let* ((end (point)) + (start + (save-excursion + (skip-syntax-backward "w_" (comint-line-beginning-position)) + (point)))) + (cond (inferior-octave-complete-impossible nil) + ((eq start end) nil) + (t + (list + start end + (completion-table-dynamic + (lambda (command) + (inferior-octave-send-list-and-digest + (list (concat "completion_matches (\"" command "\");\n"))) + (sort (delete-dups inferior-octave-output-list) + 'string-lessp)))))))) + (defun inferior-octave-complete () "Perform completion on the Octave symbol preceding point. This is implemented using the Octave command `completion_matches' which is NOT available with versions of Octave prior to 2.0." (interactive) - (let* ((end (point)) - (command - (save-excursion - (skip-syntax-backward "w_" (comint-line-beginning-position)) - (buffer-substring-no-properties (point) end)))) - (cond (inferior-octave-complete-impossible - (error (concat - "Your Octave does not have `completion_matches'. " - "Please upgrade to version 2.X."))) - ((string-equal command "") - (message "Cannot complete an empty string")) - (t - (inferior-octave-send-list-and-digest - (list (concat "completion_matches (\"" command "\");\n"))) - ;; Sort the list - (setq inferior-octave-output-list - (sort inferior-octave-output-list 'string-lessp)) - ;; Remove duplicates - (let* ((x inferior-octave-output-list) - (y (cdr x))) - (while y - (if (string-equal (car x) (car y)) - (setcdr x (setq y (cdr y))) - (setq x y - y (cdr y))))) - ;; And let comint handle the rest - (comint-dynamic-simple-complete - command inferior-octave-output-list))))) + (if inferior-octave-complete-impossible + (error (concat + "Your Octave does not have `completion_matches'. " + "Please upgrade to version 2.X.")) + (let ((data (inferior-octave-completion-at-point))) + (if (null data) + (message "Cannot complete an empty string") + (apply #'completion-in-region data))))) (defun inferior-octave-dynamic-list-input-ring () "List the buffer's input history in a help buffer." === modified file 'lisp/progmodes/octave-mod.el' --- lisp/progmodes/octave-mod.el 2011-04-22 18:44:26 +0000 +++ lisp/progmodes/octave-mod.el 2011-04-25 16:29:31 +0000 @@ -150,8 +150,8 @@ "Builtin variables in Octave.") (defvar octave-function-header-regexp - (concat "^\\s-*\\<\\(function\\)\\>" - "\\([^=;\n]*=[ \t]*\\|[ \t]*\\)\\(\\w+\\)\\>") + (concat "^\\s-*\\_<\\(function\\)\\_>" + "\\([^=;\n]*=[ \t]*\\|[ \t]*\\)\\(\\(?:\\w\\|\\s_\\)+\\)\\_>") "Regexp to match an Octave function header. The string `function' and its name are given by the first and third parenthetical grouping.") @@ -159,10 +159,10 @@ (defvar octave-font-lock-keywords (list ;; Fontify all builtin keywords. - (cons (concat "\\<\\(" + (cons (concat "\\_<\\(" (regexp-opt (append octave-reserved-words octave-text-functions)) - "\\)\\>") + "\\)\\_>") 'font-lock-keyword-face) ;; Fontify all builtin operators. (cons "\\(&\\||\\|<=\\|>=\\|==\\|<\\|>\\|!=\\|!\\)" @@ -170,7 +170,7 @@ 'font-lock-builtin-face 'font-lock-preprocessor-face)) ;; Fontify all builtin variables. - (cons (concat "\\<" (regexp-opt octave-variables) "\\>") + (cons (concat "\\_<" (regexp-opt octave-variables) "\\_>") 'font-lock-variable-name-face) ;; Fontify all function declarations. (list octave-function-header-regexp @@ -223,7 +223,7 @@ (define-key map "\C-c]" 'smie-close-block) (define-key map "\C-c/" 'smie-close-block) (define-key map "\C-c\C-f" 'octave-insert-defun) - (define-key map "\C-c\C-h" 'octave-help) + (define-key map "\C-c\C-h" 'info-lookup-symbol) (define-key map "\C-c\C-il" 'octave-send-line) (define-key map "\C-c\C-ib" 'octave-send-block) (define-key map "\C-c\C-if" 'octave-send-defun) @@ -299,8 +299,8 @@ ;; Was "w" for abbrevs, but now that it's not necessary any more, (modify-syntax-entry ?\` "." table) (modify-syntax-entry ?\" "\"" table) - (modify-syntax-entry ?. "w" table) - (modify-syntax-entry ?_ "w" table) + (modify-syntax-entry ?. "_" table) + (modify-syntax-entry ?_ "_" table) ;; The "b" flag only applies to the second letter of the comstart ;; and the first letter of the comend, i.e. the "4b" below is ineffective. ;; If we try to put `b' on the single-line comments, we get a similar @@ -818,11 +818,11 @@ (found nil) (case-fold-search nil)) (and (not (eobp)) - (not (and (> arg 0) (looking-at "\\"))) + (not (and (> arg 0) (looking-at "\\_"))) (skip-syntax-forward "w")) (while (and (/= arg 0) (setq found - (re-search-backward "\\" inc))) + (re-search-backward "\\_" inc))) (if (octave-not-in-string-or-comment-p) (setq arg (- arg inc)))) (if found @@ -975,12 +975,12 @@ (defun octave-completion-at-point-function () "Find the text to complete and the corresponding table." - (let* ((beg (save-excursion (backward-sexp 1) (point))) + (let* ((beg (save-excursion (skip-syntax-backward "w_") (point))) (end (point))) (if (< beg (point)) ;; Extend region past point, if applicable. - (save-excursion (goto-char beg) (forward-sexp 1) - (setq end (max end (point))))) + (save-excursion (skip-syntax-forward "w_") + (setq end (point)))) (list beg end octave-completion-alist))) (defun octave-complete-symbol () ------------------------------------------------------------ revno: 104005 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2011-04-25 15:47:23 +0200 message: lisp/net/gnutls.el (gnutls-errorp): Declare before first use. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-25 01:31:45 +0000 +++ lisp/ChangeLog 2011-04-25 13:47:23 +0000 @@ -1,9 +1,13 @@ +2011-04-25 Juanma Barranquero + + * net/gnutls.el (gnutls-errorp): Declare before first use. + 2011-04-24 Teodor Zlatanov * net/gnutls.el (gnutls-negotiate): Add hostname, verify-flags, verify-error, and verify-hostname-error parameters. Check whether - default trustfile exists before going to use it. Add missing - argument to gnutls-message-maybe call. Return return value. + default trustfile exists before going to use it. Add missing + argument to gnutls-message-maybe call. Return return value. Reported by Claudio Bley . (open-gnutls-stream): Add usage example. @@ -13,8 +17,8 @@ 2011-04-24 Daniel Colascione - * progmodes/cc-engine.el (c-forward-decl-or-cast-1): Use - correct match group (bug#8438). + * progmodes/cc-engine.el (c-forward-decl-or-cast-1): + Use correct match group (bug#8438). 2011-04-24 Chong Yidong === modified file 'lisp/net/gnutls.el' --- lisp/net/gnutls.el 2011-04-25 01:31:45 +0000 +++ lisp/net/gnutls.el 2011-04-25 13:47:23 +0000 @@ -83,6 +83,7 @@ 'error-message "GnuTLS error") (declare-function gnutls-boot "gnutls.c" (proc type proplist)) +(declare-function gnutls-errorp "gnutls.c" (error)) (defun gnutls-negotiate (proc type hostname &optional priority-string trustfiles keyfiles verify-flags @@ -157,7 +158,6 @@ proc)) -(declare-function gnutls-errorp "gnutls.c" (error)) (declare-function gnutls-error-string "gnutls.c" (error)) (defun gnutls-message-maybe (doit format &rest params) ------------------------------------------------------------ revno: 104004 committer: Ted Zlatanov branch nick: quickfixes timestamp: Mon 2011-04-25 07:48:24 -0500 message: Fix typo in GnuTLS W32 support. * w32.c (emacs_gnutls_push): Fix typo. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-25 10:42:57 +0000 +++ src/ChangeLog 2011-04-25 12:48:24 +0000 @@ -1,3 +1,7 @@ +2011-04-25 Teodor Zlatanov + + * w32.c (emacs_gnutls_push): Fix typo. + 2011-04-25 Eli Zaretskii * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about === modified file 'src/w32.c' --- src/w32.c 2011-04-25 01:30:51 +0000 +++ src/w32.c 2011-04-25 12:48:24 +0000 @@ -6176,7 +6176,7 @@ emacs_gnutls_push (gnutls_transport_ptr_t p, const void* buf, size_t sz) { struct Lisp_Process *process = (struct Lisp_Process *)p; - int fd = proc->outfd; + int fd = process->outfd; ssize_t n = sys_write(fd, buf, sz); /* 0 or more bytes written means everything went fine. */ ------------------------------------------------------------ revno: 104003 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2011-04-25 13:42:57 +0300 message: Avoid compilation warnings in gnutls.c on 64-bit hosts. src/gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about "cast to pointer from integer of different size". diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-25 08:04:22 +0000 +++ src/ChangeLog 2011-04-25 10:42:57 +0000 @@ -1,5 +1,8 @@ 2011-04-25 Eli Zaretskii + * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about + "cast to pointer from integer of different size". + Improve doprnt and its use in verror. (Bug#8545) * doprnt.c (doprnt): Document the set of format control sequences supported by the function. Use SAFE_ALLOCA instead of always === modified file 'src/gnutls.c' --- src/gnutls.c 2011-04-25 01:30:51 +0000 +++ src/gnutls.c 2011-04-25 10:42:57 +0000 @@ -101,8 +101,8 @@ 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) proc->infd, - (gnutls_transport_ptr_t) proc->outfd); + (gnutls_transport_ptr_t) (long) proc->infd, + (gnutls_transport_ptr_t) (long) proc->outfd); #endif proc->gnutls_initstage = GNUTLS_STAGE_TRANSPORT_POINTERS_SET; ------------------------------------------------------------ revno: 104002 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-04-25 06:18:22 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2011-04-08 18:53:26 +0000 +++ autogen/config.in 2011-04-25 10:18:22 +0000 @@ -279,6 +279,13 @@ /* Define if using GnuTLS. */ #undef HAVE_GNUTLS +/* Define if using GnuTLS certificate verification callbacks. */ +#undef HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY + +/* Define to 1 if you have the `gnutls_certificate_set_verify_function' + function. */ +#undef HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION + /* Define to 1 if you have the gpm library (-lgpm). */ #undef HAVE_GPM === modified file 'autogen/configure' --- autogen/configure 2011-04-20 10:18:10 +0000 +++ autogen/configure 2011-04-25 10:18:22 +0000 @@ -10813,6 +10813,7 @@ HAVE_GNUTLS=no +HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no if test "${with_gnutls}" = "yes" ; then succeeded=no @@ -10913,7 +10914,28 @@ $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h fi -fi + + CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" + LIBS="$LIBGNUTLS_LIBS $LIBS" + for ac_func in gnutls_certificate_set_verify_function +do : + ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function" +if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1 +_ACEOF + HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes +fi +done + + + if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then + +$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h + + fi +fi + ------------------------------------------------------------ revno: 104001 fixes bug(s): http://debbugs.gnu.org/8545 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2011-04-25 11:04:22 +0300 message: Improve doprnt and its use in verror. (Bug#8545) src/doprnt.c (doprnt): Document the set of format control sequences supported by the function. Use SAFE_ALLOCA instead of always using `alloca'. src/eval.c (verror): Don't limit the buffer size at size_max-1, that is one byte too soon. Don't use xrealloc; instead xfree and xmalloc anew. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-04-25 01:30:51 +0000 +++ src/ChangeLog 2011-04-25 08:04:22 +0000 @@ -1,3 +1,14 @@ +2011-04-25 Eli Zaretskii + + Improve doprnt and its use in verror. (Bug#8545) + * doprnt.c (doprnt): Document the set of format control sequences + supported by the function. Use SAFE_ALLOCA instead of always + using `alloca'. + + * eval.c (verror): Don't limit the buffer size at size_max-1, that + is one byte too soon. Don't use xrealloc; instead xfree and + xmalloc anew. + 2011-04-24 Teodor Zlatanov * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the === modified file 'src/doprnt.c' --- src/doprnt.c 2011-04-24 09:00:03 +0000 +++ src/doprnt.c 2011-04-25 08:04:22 +0000 @@ -43,10 +43,54 @@ OTOH, this function supports only a small subset of the standard C formatted output facilities. E.g., %u and %ll are not supported, and precision is - largely ignored except for converting floating-point values. However, this - is okay, as this function is supposed to be called from `error' and similar - functions, and thus does not need to support features beyond those in - `Fformat', which is used by `error' on the Lisp level. */ + ignored %s and %c conversions. (See below for the detailed documentation of + what is supported.) However, this is okay, as this function is supposed to + be called from `error' and similar functions, and thus does not need to + support features beyond those in `Fformat', which is used by `error' on the + Lisp level. */ + +/* This function supports the following %-sequences in the `format' + argument: + + %s means print a string argument. + %S is silently treated as %s, for loose compatibility with `Fformat'. + %d means print a `signed int' argument in decimal. + %l means print a `long int' argument in decimal. + %o means print an `unsigned int' argument in octal. + %x means print an `unsigned int' argument in hex. + %e means print a `double' argument in exponential notation. + %f means print a `double' argument in decimal-point notation. + %g means print a `double' argument in exponential notation + or in decimal-point notation, whichever uses fewer characters. + %c means print a `signed int' argument as a single character. + %% means produce a literal % character. + + A %-sequence may contain optional flag, width, and precision specifiers, as + follows: + + %character + + where flags is [+ -0l], width is [0-9]+, and precision is .[0-9]+ + + The + flag character inserts a + before any positive number, while a space + inserts a space before any positive number; these flags only affect %d, %l, + %o, %x, %e, %f, and %g sequences. The - and 0 flags affect the width + specifier, as described below. + + The l (lower-case letter ell) flag is a `long' data type modifier: it is + supported for %d, %o, and %x conversions of integral arguments, and means + that the respective argument is to be treated as `long int' or `unsigned + long int'. The EMACS_INT data type should use this modifier. + + The width specifier supplies a lower limit for the length of the printed + representation. The padding, if any, normally goes on the left, but it goes + on the right if the - flag is present. The padding character is normally a + space, but (for numerical arguments only) it is 0 if the 0 flag is present. + The - flag takes precedence over the 0 flag. + + For %e, %f, and %g sequences, the number after the "." in the precision + specifier says how many decimal places to show; if zero, the decimal point + itself is omitted. For %s and %S, the precision specifier is ignored. */ #include #include @@ -79,9 +123,8 @@ terminated at position FORMAT_END. Output goes in BUFFER, which has room for BUFSIZE chars. If the output does not fit, truncate it to fit. - Returns the number of bytes stored into BUFFER. - ARGS points to the vector of arguments, and NARGS says how many. - A double counts as two arguments. + Returns the number of bytes stored into BUFFER, excluding + the terminating null byte. Output is always null-terminated. String arguments are passed as C strings. Integers are passed as C integers. */ @@ -110,6 +153,7 @@ char *fmtcpy; int minlen; char charbuf[MAX_MULTIBYTE_LENGTH + 1]; /* Used for %c. */ + USE_SAFE_ALLOCA; if (format_end == 0) format_end = format + strlen (format); @@ -117,7 +161,7 @@ if ((format_end - format + 1) < sizeof (fixed_buffer)) fmtcpy = fixed_buffer; else - fmtcpy = (char *) alloca (format_end - format + 1); + SAFE_ALLOCA (fmtcpy, char *, format_end - format + 1); bufsize--; @@ -342,5 +386,7 @@ xfree (big_buffer); *bufptr = 0; /* Make sure our string ends with a '\0' */ + + SAFE_FREE (); return bufptr - buffer; } === modified file 'src/eval.c' --- src/eval.c 2011-04-23 10:33:28 +0000 +++ src/eval.c 2011-04-25 08:04:22 +0000 @@ -2012,15 +2012,14 @@ break; if (size <= size_max / 2) size *= 2; - else if (size < size_max - 1) - size = size_max - 1; + else if (size < size_max) + size = size_max; else break; /* and leave the message truncated */ - if (buffer == buf) - buffer = (char *) xmalloc (size); - else - buffer = (char *) xrealloc (buffer, size); + if (buffer != buf) + xfree (buffer); + buffer = (char *) xmalloc (size); } string = make_string (buffer, used); ------------------------------------------------------------ revno: 104000 author: Teodor Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2011-04-25 04:32:07 +0000 message: gnus-registry.el (gnus-registry-ignore-group-p): Don't call `gnus-parameter-registry-ignore' if the *Group* buffer doesn't exist. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-04-24 22:12:21 +0000 +++ lisp/gnus/ChangeLog 2011-04-25 04:32:07 +0000 @@ -1,3 +1,8 @@ +2011-04-25 Teodor Zlatanov + + * gnus-registry.el (gnus-registry-ignore-group-p): Don't call + `gnus-parameter-registry-ignore' if the *Group* buffer doesn't exist. + 2011-04-23 Glenn Morris * gnus-sum.el (gnus-extra-headers): Bump :version. === modified file 'lisp/gnus/gnus-registry.el' --- lisp/gnus/gnus-registry.el 2011-04-23 00:08:28 +0000 +++ lisp/gnus/gnus-registry.el 2011-04-25 04:32:07 +0000 @@ -678,6 +678,7 @@ ;; `gnus-registry-ignored-groups' is a list of lists ;; (it can be a list of regexes) (and (listp (nth 0 gnus-registry-ignored-groups)) + (get-buffer "*Group*") ; in automatic tests this is false (gnus-parameter-registry-ignore group)) (gnus-grep-in-list group