Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103108. ------------------------------------------------------------ revno: 103108 committer: Glenn Morris branch nick: trunk timestamp: Thu 2011-02-03 19:27:18 -0800 message: * lisp/obsolete/spell.el: Undo previous comment change. diff: === modified file 'lisp/obsolete/spell.el' --- lisp/obsolete/spell.el 2011-02-03 07:15:31 +0000 +++ lisp/obsolete/spell.el 2011-02-04 03:27:18 +0000 @@ -4,7 +4,8 @@ ;; Maintainer: FSF ;; Keywords: wp, unix -;; Obsolete-since: 24.1 +;; Obsolete-since: 23.1 +;; (not in obsolete/ directory then, but all functions marked obsolete) ;; This file is part of GNU Emacs. ------------------------------------------------------------ revno: 103107 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2011-02-03 23:43:22 +0000 message: Merge changes made in Gnus trunk. gnus-util.el: change default value of gnus-user-date-format-alist. gnus-art.el (gnus-article-jump-to-part): Remove useless sit-for. gnus-art.el: remove old FIXME. gnus.el (gnus-summary-line-format): Add missing semi-colon for user-date in docstring. message.el (message-setup-1): Always generate References first. (message-mail): Return the return value of message-setup, not always t. gnus-start.el (gnus-read-active-for-groups): This function is never called with a nil `infos', so clean that up. (gnus-get-unread-articles): Request active files from primary/secondary methods that have no groups (yet). (message-setup-1): Insert mail-header-separator with read-only and intangible properties set. gnus-draft.el: Remove progn around gnus-draft-setup. gnus-start.el (gnus-get-unread-articles): Fix the call to methods that have no groups. nnimap.el (nnimap-request-accept-article): Give an error message if the APPEND wasn't successful. diff: === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2011-02-03 05:01:44 +0000 +++ doc/misc/gnus.texi 2011-02-03 23:43:22 +0000 @@ -4941,7 +4941,7 @@ Desired cursor position (instead of after first colon). @item &user-date; Age sensitive date format. Various date format is defined in -@code{gnus-user-date-format-alist}. +@code{gnus-summary-user-date-format-alist}. @item u User defined specifier. The next character in the format string should be a letter. Gnus will call the function === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-02-03 07:25:14 +0000 +++ lisp/gnus/ChangeLog 2011-02-03 23:43:22 +0000 @@ -1,3 +1,43 @@ +2011-02-03 Lars Ingebrigtsen + + * nnimap.el (nnimap-request-accept-article): Give an error message if + the APPEND wasn't successful. + +2011-02-03 Adam Sjøgren + + * gnus-start.el (gnus-get-unread-articles): Fix the call to methods + that have no groups. + +2011-02-03 Julien Danjou + + * gnus-draft.el: Remove progn around gnus-draft-setup. + +2011-02-03 Lars Ingebrigtsen + + * gnus-start.el (gnus-read-active-for-groups): This function is never + called with a nil `infos', so clean that up. + (gnus-get-unread-articles): Request active files from primary/secondary + methods that have no groups (yet). + +2011-02-03 Julien Danjou + + * message.el (message-setup-1): Always generate References first. + (message-mail): Return the return value of message-setup, not always t. + (message-setup-1): Insert mail-header-separator with read-only and + intangible properties set. + + * gnus.el (gnus-summary-line-format): Add missing semi-colon for + user-date in docstring. + + * gnus-art.el (gnus-article-jump-to-part): Remove useless sit-for. + + * gnus.el (gnus-summary-line-format): Mention &user-date format in + docstring. + + * gnus.el (gnus-user-date-format-alist): Change default value. Use + defcustom, with type and group. Move from gnus-util.el. Rename to + gnus-summary-user-date-format-alist. + 2011-02-03 Glenn Morris * nnimap.el (gnus-fetch-headers): Declare. === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2011-02-03 05:21:20 +0000 +++ lisp/gnus/gnus-art.el 2011-02-03 23:43:22 +0000 @@ -4874,8 +4874,6 @@ (when (zerop parts) (error "No such part")) (pop-to-buffer gnus-article-buffer) - ;; FIXME: why is it necessary? - (sit-for 0) (or n (setq n (if (= parts 1) 1 @@ -7338,9 +7336,6 @@ (defvar gnus-button-handle-describe-prefix "^\\(C-h\\|?\\)") -;; FIXME: Maybe we should merge some of the functions that do quite similar -;; stuff? - (defun gnus-button-handle-describe-function (url) "Call `describe-function' when pushing the corresponding URL button." (describe-function === modified file 'lisp/gnus/gnus-draft.el' --- lisp/gnus/gnus-draft.el 2011-01-27 04:04:58 +0000 +++ lisp/gnus/gnus-draft.el 2011-02-03 23:43:22 +0000 @@ -244,55 +244,49 @@ :version "23.1" ;; No Gnus :type 'hook) -;;; Utility functions - -;;;!!!If this is byte-compiled, it fails miserably. -;;;!!!This is because `gnus-setup-message' uses uninterned symbols. -;;;!!!This has been fixed in recent versions of Emacs and XEmacs, -;;;!!!but for the time being, we'll just run this tiny function uncompiled. - -(progn - (defun gnus-draft-setup (narticle group &optional restore) - (let (ga) - (gnus-setup-message 'forward - (let ((article narticle)) - (message-mail) - (erase-buffer) - (if (not (gnus-request-restore-buffer article group)) - (error "Couldn't restore the article") - (when (and restore - (equal group "nndraft:queue")) - (mime-to-mml)) - ;; Insert the separator. - (goto-char (point-min)) - (search-forward "\n\n") - (forward-char -1) - (save-restriction - (narrow-to-region (point-min) (point)) - (setq ga - (message-fetch-field gnus-draft-meta-information-header))) - (insert mail-header-separator) - (forward-line 1) - (message-set-auto-save-file-name)))) - (gnus-backlog-remove-article group narticle) - (when (and ga - (ignore-errors (setq ga (car (read-from-string ga))))) - (setq gnus-newsgroup-name - (if (equal (car ga) "") nil (car ga))) - (gnus-configure-posting-styles) - (setq gnus-message-group-art (cons gnus-newsgroup-name (cadr ga))) - (setq message-post-method - `(lambda (arg) - (gnus-post-method arg ,(car ga)))) - (unless (equal (cadr ga) "") - (dolist (article (cdr ga)) - (message-add-action - `(progn - (gnus-add-mark ,(car ga) 'replied ,article) - (gnus-request-set-mark ,(car ga) (list (list (list ,article) - 'add '(reply))))) - 'send)))) - (run-hooks 'gnus-draft-setup-hook)))) + +(defun gnus-draft-setup (narticle group &optional restore) + (let (ga) + (gnus-setup-message 'forward + (let ((article narticle)) + (message-mail) + (let ((inhibit-read-only t)) + (erase-buffer)) + (if (not (gnus-request-restore-buffer article group)) + (error "Couldn't restore the article") + (when (and restore + (equal group "nndraft:queue")) + (mime-to-mml)) + ;; Insert the separator. + (goto-char (point-min)) + (search-forward "\n\n") + (forward-char -1) + (save-restriction + (narrow-to-region (point-min) (point)) + (setq ga + (message-fetch-field gnus-draft-meta-information-header))) + (insert mail-header-separator) + (forward-line 1) + (message-set-auto-save-file-name)))) + (gnus-backlog-remove-article group narticle) + (when (and ga + (ignore-errors (setq ga (car (read-from-string ga))))) + (setq gnus-newsgroup-name + (if (equal (car ga) "") nil (car ga))) + (gnus-configure-posting-styles) + (setq gnus-message-group-art (cons gnus-newsgroup-name (cadr ga))) + (setq message-post-method + `(lambda (arg) + (gnus-post-method arg ,(car ga)))) + (unless (equal (cadr ga) "") + (dolist (article (cdr ga)) + (message-add-action + `(progn + (gnus-add-mark ,(car ga) 'replied ,article) + (gnus-request-set-mark ,(car ga) (list (list (list ,article) + 'add '(reply))))) + 'send)))) + (run-hooks 'gnus-draft-setup-hook))) (defun gnus-draft-article-sendable-p (article) "Say whether ARTICLE is sendable." === modified file 'lisp/gnus/gnus-start.el' --- lisp/gnus/gnus-start.el 2011-02-01 02:19:04 +0000 +++ lisp/gnus/gnus-start.el 2011-02-03 23:43:22 +0000 @@ -1705,6 +1705,15 @@ (setcar (nthcdr 3 elem) (gnus-retrieve-group-data-early method infos))))))) + ;; If we have primary/secondary select methods, but no groups from + ;; them, we still want to issue a retrieval request from them. + (dolist (method (cons gnus-select-method + gnus-secondary-select-methods)) + (when (and (not (assoc method type-cache)) + (gnus-check-backend-function 'request-list (car method))) + (with-current-buffer nntp-server-buffer + (gnus-read-active-file-1 method nil)))) + ;; Do the rest of the retrieval. (dolist (elem type-cache) (destructuring-bind (method method-type infos early-data) elem @@ -1747,14 +1756,12 @@ ;; methods. ((and (gnus-check-backend-function 'finish-retrieve-group-infos (car method)) - infos (or (not (gnus-agent-method-p method)) (gnus-online method))) (gnus-finish-retrieve-group-infos method infos early-data) (gnus-agent-save-active method)) ;; Most backends have -retrieve-groups. - ((and (gnus-check-backend-function 'retrieve-groups (car method)) - infos) + ((gnus-check-backend-function 'retrieve-groups (car method)) (when (gnus-check-backend-function 'request-scan (car method)) (gnus-request-scan nil method)) (let (groups) === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2011-01-28 23:07:38 +0000 +++ lisp/gnus/gnus-sum.el 2011-02-03 23:43:22 +0000 @@ -1395,7 +1395,7 @@ (?u gnus-tmp-user-defined ?s) (?P (gnus-pick-line-number) ?d) (?B gnus-tmp-thread-tree-header-string ?s) - (user-date (gnus-user-date + (user-date (gnus-summary-user-date ,(macroexpand '(mail-header-date gnus-tmp-header))) ?s)) "An alist of format specifications that can appear in summary lines. These are paired with what variables they correspond with, along with @@ -3852,6 +3852,56 @@ ((< c (* 1000 10000)) (format "%1.1fM" (/ c (* 1024.0 1024)))) (t (format "%dM" (/ c (* 1024.0 1024))))))) +(defcustom gnus-summary-user-date-format-alist + '(((gnus-seconds-today) . "Today, %H:%M") + ((+ 86400 (gnus-seconds-today)) . "Yesterday, %H:%M") + (604800 . "%A %H:%M") ; That's one week + ((gnus-seconds-month) . "%A %d") + ((gnus-seconds-year) . "%B %d") + (t . "%b %d %Y")) ; This one is used when no other + ; does match + "Specifies date format depending on age of article. +This is an alist of items (AGE . FORMAT). AGE can be a number (of +seconds) or a Lisp expression evaluating to a number. When the age of +the article is less than this number, then use `format-time-string' +with the corresponding FORMAT for displaying the date of the article. +If AGE is not a number or a Lisp expression evaluating to a +non-number, then the corresponding FORMAT is used as a default value. + +Note that the list is processed from the beginning, so it should be +sorted by ascending AGE. Also note that items following the first +non-number AGE will be ignored. + +You can use the functions `gnus-seconds-today', `gnus-seconds-month' +and `gnus-seconds-year' in the AGE spec. They return the number of +seconds passed since the start of today, of this month, of this year, +respectively." + :version "24.1" + :group 'gnus-summary-format + :type '(alist :key-type sexp :value-type string)) +(make-obsolete-variable 'gnus-user-date-format-alist + 'gnus-summary-user-date-format-alist "24.1") + +(defun gnus-summary-user-date (messy-date) + "Format the messy-date according to `gnus-summary-user-date-format-alist'. +Returns \" ? \" if there's bad input or if another error occurs. +Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"." + (condition-case () + (let* ((messy-date (gnus-float-time (gnus-date-get-time messy-date))) + (now (gnus-float-time)) + ;;If we don't find something suitable we'll use this one + (my-format "%b %d '%y")) + (let* ((difference (- now messy-date)) + (templist gnus-summary-user-date-format-alist) + (top (eval (caar templist)))) + (while (if (numberp top) (< top difference) (not top)) + (progn + (setq templist (cdr templist)) + (setq top (eval (caar templist))))) + (if (stringp (cdr (car templist))) + (setq my-format (cdr (car templist))))) + (format-time-string (eval my-format) (seconds-to-time messy-date))) + (error " ? "))) (defun gnus-summary-set-local-parameters (group) "Go through the local params of GROUP and set all variable specs in that list." === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2011-01-27 08:38:43 +0000 +++ lisp/gnus/gnus-util.el 2011-02-03 23:43:22 +0000 @@ -477,51 +477,6 @@ (put-text-property 0 1 'gnus-time time d) time))))) -(defvar gnus-user-date-format-alist - '(((gnus-seconds-today) . "%k:%M") - (604800 . "%a %k:%M") ;;that's one week - ((gnus-seconds-month) . "%a %d") - ((gnus-seconds-year) . "%b %d") - (t . "%b %d '%y")) ;;this one is used when no - ;;other does match - "Specifies date format depending on age of article. -This is an alist of items (AGE . FORMAT). AGE can be a number (of -seconds) or a Lisp expression evaluating to a number. When the age of -the article is less than this number, then use `format-time-string' -with the corresponding FORMAT for displaying the date of the article. -If AGE is not a number or a Lisp expression evaluating to a -non-number, then the corresponding FORMAT is used as a default value. - -Note that the list is processed from the beginning, so it should be -sorted by ascending AGE. Also note that items following the first -non-number AGE will be ignored. - -You can use the functions `gnus-seconds-today', `gnus-seconds-month' -and `gnus-seconds-year' in the AGE spec. They return the number of -seconds passed since the start of today, of this month, of this year, -respectively.") - -(defun gnus-user-date (messy-date) - "Format the messy-date according to gnus-user-date-format-alist. -Returns \" ? \" if there's bad input or if another error occurs. -Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"." - (condition-case () - (let* ((messy-date (gnus-float-time (gnus-date-get-time messy-date))) - (now (gnus-float-time)) - ;;If we don't find something suitable we'll use this one - (my-format "%b %d '%y")) - (let* ((difference (- now messy-date)) - (templist gnus-user-date-format-alist) - (top (eval (caar templist)))) - (while (if (numberp top) (< top difference) (not top)) - (progn - (setq templist (cdr templist)) - (setq top (eval (caar templist))))) - (if (stringp (cdr (car templist))) - (setq my-format (cdr (car templist))))) - (format-time-string (eval my-format) (seconds-to-time messy-date))) - (error " ? "))) - (defun gnus-dd-mmm (messy-date) "Return a string like DD-MMM from a big messy string." (condition-case () === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2011-01-26 08:36:39 +0000 +++ lisp/gnus/gnus.el 2011-02-03 23:43:22 +0000 @@ -2908,50 +2908,62 @@ It works along the same lines as a normal formatting string, with some simple extensions. -%N Article number, left padded with spaces (string) -%S Subject (string) -%s Subject if it is at the root of a thread, and \"\" otherwise (string) -%n Name of the poster (string) -%a Extracted name of the poster (string) -%A Extracted address of the poster (string) -%F Contents of the From: header (string) -%f Contents of the From: or To: headers (string) -%x Contents of the Xref: header (string) -%D Date of the article (string) -%d Date of the article (string) in DD-MMM format -%o Date of the article (string) in YYYYMMDD`T'HHMMSS format -%M Message-id of the article (string) -%r References of the article (string) -%c Number of characters in the article (integer) -%k Pretty-printed version of the above (string) - For example, \"1.2k\" or \"0.4M\". -%L Number of lines in the article (integer) -%I Indentation based on thread level (a string of spaces) -%B A complex trn-style thread tree (string) - The variables `gnus-sum-thread-*' can be used for customization. -%T A string with two possible values: 80 spaces if the article - is on thread level two or larger and 0 spaces on level one -%R \"A\" if this article has been replied to, \" \" otherwise (character) -%U Status of this article (character, \"R\", \"K\", \"-\" or \" \") -%[ Opening bracket (character, \"[\" or \"<\") -%] Closing bracket (character, \"]\" or \">\") -%> Spaces of length thread-level (string) -%< Spaces of length (- 20 thread-level) (string) -%i Article score (number) -%z Article zcore (character) -%t Number of articles under the current thread (number). -%e Whether the thread is empty or not (character). -%V Total thread score (number). -%P The line number (number). -%O Download mark (character). -%* If present, indicates desired cursor position - (instead of after first colon). -%u User defined specifier. The next character in the format string should - be a letter. Gnus will call the function gnus-user-format-function-X, - where X is the letter following %u. The function will be passed the - current header as argument. The function should return a string, which - will be inserted into the summary just like information from any other - summary specifier. +%N Article number, left padded with spaces (string) +%S Subject (string) +%s Subject if it is at the root of a thread, and \"\" + otherwise (string) +%n Name of the poster (string) +%a Extracted name of the poster (string) +%A Extracted address of the poster (string) +%F Contents of the From: header (string) +%f Contents of the From: or To: headers (string) +%x Contents of the Xref: header (string) +%D Date of the article (string) +%d Date of the article (string) in DD-MMM format +%o Date of the article (string) in YYYYMMDD`T'HHMMSS + format +%M Message-id of the article (string) +%r References of the article (string) +%c Number of characters in the article (integer) +%k Pretty-printed version of the above (string) + For example, \"1.2k\" or \"0.4M\". +%L Number of lines in the article (integer) +%I Indentation based on thread level (a string of + spaces) +%B A complex trn-style thread tree (string) + The variables `gnus-sum-thread-*' can be used for + customization. +%T A string with two possible values: 80 spaces if the + article is on thread level two or larger and 0 spaces + on level one +%R \"A\" if this article has been replied to, \" \" + otherwise (character) +%U Status of this article (character, \"R\", \"K\", + \"-\" or \" \") +%[ Opening bracket (character, \"[\" or \"<\") +%] Closing bracket (character, \"]\" or \">\") +%> Spaces of length thread-level (string) +%< Spaces of length (- 20 thread-level) (string) +%i Article score (number) +%z Article zcore (character) +%t Number of articles under the current thread (number). +%e Whether the thread is empty or not (character). +%V Total thread score (number). +%P The line number (number). +%O Download mark (character). +%* If present, indicates desired cursor position + (instead of after first colon). +%u User defined specifier. The next character in the + format string should be a letter. Gnus will call the + function gnus-user-format-function-X, where X is the + letter following %u. The function will be passed the + current header as argument. The function should + return a string, which will be inserted into the + summary just like information from any other summary + specifier. +&user-date; Age sensitive date format. Various date format is + defined in `gnus-summary-user-date-format-alist'. + The %U (status), %R (replied) and %z (zcore) specs have to be handled with care. For reasons of efficiency, Gnus will compute what column === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2011-02-03 05:26:36 +0000 +++ lisp/gnus/message.el 2011-02-03 23:43:22 +0000 @@ -869,11 +869,7 @@ ;; create a dependence to `gnus.el'. :type 'sexp) -;; FIXME: This should be a temporary workaround until someone implements a -;; proper solution. If a crash happens while replying, the auto-save file -;; will *not* have a `References:' header if `message-generate-headers-first' -;; is nil. See: http://article.gmane.org/gmane.emacs.gnus.general/51138 -(defcustom message-generate-headers-first '(references) +(defcustom message-generate-headers-first nil "Which headers should be generated before starting to compose a message. If t, generate all required headers. This can also be a list of headers to generate. The variables `message-required-news-headers' and @@ -885,7 +881,6 @@ :group 'message-headers :link '(custom-manual "(message)Message Headers") :type '(choice (const :tag "None" nil) - (const :tag "References" '(references)) (const :tag "All" t) (repeat (sexp :tag "Header")))) @@ -6405,30 +6400,35 @@ (funcall message-default-headers) message-default-headers)) (or (bolp) (insert ?\n))) - (insert mail-header-separator "\n") + (let ((message-forbidden-properties nil)) + (insert (propertize (concat mail-header-separator "\n") + 'read-only t 'rear-nonsticky t 'intangible t))) (forward-line -1) - (when (message-news-p) - (when message-default-news-headers - (insert message-default-news-headers) - (or (bolp) (insert ?\n))) - (when message-generate-headers-first - (message-generate-headers - (message-headers-to-generate - (append message-required-news-headers - message-required-headers) - message-generate-headers-first - '(Lines Subject))))) - (when (message-mail-p) - (when message-default-mail-headers - (insert message-default-mail-headers) - (or (bolp) (insert ?\n))) - (when message-generate-headers-first - (message-generate-headers - (message-headers-to-generate - (append message-required-mail-headers - message-required-headers) - message-generate-headers-first - '(Lines Subject))))) + ;; If a crash happens while replying, the auto-save file would *not* have a + ;; `References:' header if `message-generate-headers-first' was nil. + ;; Therefore, always generate it first. + (let ((message-generate-headers-first + (append message-generate-headers-first '(References)))) + (when (message-news-p) + (when message-default-news-headers + (insert message-default-news-headers) + (or (bolp) (insert ?\n))) + (message-generate-headers + (message-headers-to-generate + (append message-required-news-headers + message-required-headers) + message-generate-headers-first + '(Lines Subject)))) + (when (message-mail-p) + (when message-default-mail-headers + (insert message-default-mail-headers) + (or (bolp) (insert ?\n))) + (message-generate-headers + (message-headers-to-generate + (append message-required-mail-headers + message-required-headers) + message-generate-headers-first + '(Lines Subject))))) (run-hooks 'message-signature-setup-hook) (message-insert-signature) (save-restriction @@ -6540,9 +6540,7 @@ (dolist (h other-headers other-headers) (if (stringp (car h)) (setcar h (intern (capitalize (car h))))))) yank-action send-actions continue switch-function - return-action) - ;; FIXME: Should return nil if failure. - t)) + return-action))) ;;;###autoload (defun message-news (&optional newsgroups subject) === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2011-02-03 07:25:14 +0000 +++ lisp/gnus/nnimap.el 2011-02-03 23:43:22 +0000 @@ -985,15 +985,20 @@ "\n" "\r\n")) (let ((result (nnimap-get-response sequence))) - (if (not (car result)) + (if (not (nnimap-ok-p result)) (progn - (nnheader-message 7 "%s" (nnheader-get-report-string 'nnimap)) + (nnheader-report 'nnimap "%s" result) nil) (cons group (or (nnimap-find-uid-response "APPENDUID" (car result)) (nnimap-find-article-by-message-id group message-id))))))))) +(defun nnimap-ok-p (value) + (and (consp value) + (consp (car value)) + (equal (caar value) "OK"))) + (defun nnimap-find-uid-response (name list) (let ((result (car (last (nnimap-find-response-element name list))))) (and result ------------------------------------------------------------ revno: 103106 [merge] committer: Paul Eggert branch nick: trunk timestamp: Thu 2011-02-03 13:38:34 -0800 message: * lib/ignore-value.h: New file. diff: === modified file 'ChangeLog' --- ChangeLog 2011-02-03 19:29:35 +0000 +++ ChangeLog 2011-02-03 21:38:05 +0000 @@ -3,6 +3,7 @@ allow C code to suppress warnings about ignored return values * Makefile.in (GNULIB_MODULES): Add ignore-value. * configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4: Regenerate. + * lib/ignore-value.h: New file. 2011-01-31 Chong Yidong === added file 'lib/ignore-value.h' --- lib/ignore-value.h 1970-01-01 00:00:00 +0000 +++ lib/ignore-value.h 2011-02-03 21:38:05 +0000 @@ -0,0 +1,62 @@ +/* ignore a function return without a compiler warning + + Copyright (C) 2008-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering, Eric Blake and Pádraig Brady. */ + +/* Use "ignore_value" to avoid a warning when using a function declared with + gcc's warn_unused_result attribute, but for which you really do want to + ignore the result. Traditionally, people have used a "(void)" cast to + indicate that a function's return value is deliberately unused. However, + if the function is declared with __attribute__((warn_unused_result)), + gcc issues a warning even with the cast. + + Caution: most of the time, you really should heed gcc's warning, and + check the return value. However, in those exceptional cases in which + you're sure you know what you're doing, use this function. + + For the record, here's one of the ignorable warnings: + "copy.c:233: warning: ignoring return value of 'fchown', + declared with attribute warn_unused_result". */ + +#ifndef _GL_IGNORE_VALUE_H +# define _GL_IGNORE_VALUE_H + +# ifndef ATTRIBUTE_DEPRECATED +/* The __attribute__((__deprecated__)) feature + is available in gcc versions 3.1 and newer. */ +# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1) +# define ATTRIBUTE_DEPRECATED /* empty */ +# else +# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) +# endif +# endif + +/* The __attribute__((__warn_unused_result__)) feature + is available in gcc versions 3.4 and newer, + while the typeof feature has been available since 2.7 at least. */ +# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) +# define ignore_value(x) ((void) (x)) +# else +# define ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; })) +# endif + +/* ignore_value works for scalars, pointers and aggregates; + deprecate ignore_ptr. */ +static inline void ATTRIBUTE_DEPRECATED +ignore_ptr (void *p) { (void) p; } /* deprecated: use ignore_value */ + +#endif ------------------------------------------------------------ revno: 103105 committer: Sam Steingold branch nick: trunk timestamp: Thu 2011-02-03 14:59:17 -0500 message: * lisp/progmodes/gdb-mi.el (gdb-breakpoints-list-handler-custom): Do not error out when `func' is nil. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-03 11:28:16 +0000 +++ lisp/ChangeLog 2011-02-03 19:59:17 +0000 @@ -1,3 +1,8 @@ +2011-02-03 Sam Steingold + + * progmodes/gdb-mi.el (gdb-breakpoints-list-handler-custom): + Do not error out when `func' is nil. + 2011-02-03 Michael Albinus * net/tramp-sh.el (tramp-remote-path): Add default settings for === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2011-01-25 04:08:28 +0000 +++ lisp/progmodes/gdb-mi.el 2011-02-03 19:59:17 +0000 @@ -2347,7 +2347,8 @@ (bindat-get-field breakpoint 'what) (or pending at (concat "in " - (propertize func 'font-lock-face font-lock-function-name-face) + (propertize (or func "unknown") + 'font-lock-face font-lock-function-name-face) (gdb-frame-location breakpoint))))) ;; Add clickable properties only for breakpoints with file:line ;; information ------------------------------------------------------------ revno: 103104 [merge] committer: Paul Eggert branch nick: trunk timestamp: Thu 2011-02-03 11:30:24 -0800 message: merge: allow C code to suppress warnings about ignored return values diff: === modified file 'ChangeLog' --- ChangeLog 2011-01-31 23:54:50 +0000 +++ ChangeLog 2011-02-03 19:29:35 +0000 @@ -1,3 +1,9 @@ +2011-02-03 Paul Eggert + + allow C code to suppress warnings about ignored return values + * Makefile.in (GNULIB_MODULES): Add ignore-value. + * configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4: Regenerate. + 2011-01-31 Chong Yidong * configure.in: Test existence of xaw3d library, not just the === modified file 'Makefile.in' --- Makefile.in 2011-01-30 23:34:18 +0000 +++ Makefile.in 2011-02-03 19:29:35 +0000 @@ -330,7 +330,7 @@ # Update modules from gnulib, for maintainers, who should have it in # $(gnulib_srcdir) (relative to $(srcdir) and should have build tools # as per $(gnulib_srcdir)/DEPENDENCIES. -GNULIB_MODULES = dtoastr getopt-gnu mktime strftime +GNULIB_MODULES = dtoastr getopt-gnu ignore-value mktime strftime GNULIB_TOOL_FLAGS = \ --import --no-changelog --no-vc-files --makefile-name=gnulib.mk sync-from-gnulib: $(gnulib_srcdir) === modified file 'configure' --- configure 2011-01-31 23:54:50 +0000 +++ configure 2011-02-03 19:29:35 +0000 @@ -5826,6 +5826,7 @@ # Code from module getopt-gnu: # Code from module getopt-posix: # Code from module gettext-h: + # Code from module ignore-value: # Code from module include_next: # Code from module intprops: # Code from module mktime: @@ -10597,7 +10598,7 @@ if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } -if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then : +if ${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10631,7 +10632,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } -if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then : +if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = xyes; then : emacs_cv_xaw3d=yes else emacs_cv_xaw3d=no @@ -14330,6 +14331,48 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + GNULIB_MKTIME=0; GNULIB_NANOSLEEP=0; @@ -14404,48 +14447,6 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : @@ -14888,6 +14889,8 @@ # Code from module gettext-h: + # Code from module ignore-value: + # Code from module include_next: # Code from module intprops: # Code from module mktime: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-02-03 07:37:43 +0000 +++ doc/misc/ChangeLog 2011-02-03 19:29:10 +0000 @@ -1,3 +1,8 @@ +2011-02-03 Paul Eggert + + * texinfo.tex: Update to version 2011-02-01.10 from gnulib, + which in turn is copied from ftp://tug.org/tex/. + 2011-02-03 Glenn Morris * faq.texi (Contacting the FSF): Mainly just refer to the web-site. === modified file 'doc/misc/texinfo.tex' --- doc/misc/texinfo.tex 2011-01-17 19:01:01 +0000 +++ doc/misc/texinfo.tex 2011-02-03 19:29:10 +0000 @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2011-01-15.17} +\def\texinfoversion{2011-02-01.10} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -118,8 +118,8 @@ \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi -\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi -\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi +\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi +\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi @@ -163,10 +163,12 @@ \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! +\chardef\hashChar = `\# \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; +\chardef\slashChar = `\/ \chardef\underChar = `\_ % Ignore a token. @@ -557,7 +559,7 @@ \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else - % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 + % The general wording of \badenverr may not be ideal. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup @@ -2253,12 +2255,14 @@ % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% - \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname + \expandafter\let\expandafter \temp + \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% - \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname + \expandafter\let\expandafter \temp + \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } @@ -2487,6 +2491,22 @@ \codex } } +% Handle @url similarly to \code, but allows line breaks after .#?/ (only). +{ + \catcode`\.=\active \catcode`\#=\active + \catcode`\?=\active \catcode`\/=\active + % + \global\def\urefcode{\begingroup + \setupmarkupstyle{code}% + \catcode\dotChar=\active \catcode\hashChar=\active + \catcode\questChar=\active \catcode\slashChar=\active + \let.\urefcodedot + \let#\urefcodehash + \let?\urefcodequestion + \let/\urefcodeslash + \codex + } +} \def\realdash{-} \def\codedash{-\discretionary{}{}{}} @@ -2501,6 +2521,24 @@ \discretionary{}{}{}}% {\_}% } +% we put a little stretch before and after the breakable chars, to help +% line breaking of long url's. The unequal skips make look better in +% cmtt at least, especially for dots. +\def\urefprestretch{\nobreak \hskip0pt plus.13em } +\def\urefpoststretch{\allowbreak \hskip0pt plus.1em } +\def\urefcodedot{\urefprestretch .\urefpoststretch} +\def\urefcodehash{\urefprestretch \#\urefpoststretch} +\def\urefcodequestion{\urefprestretch ?\urefpoststretch} +\def\urefcodeslash{\futurelet\next\urefcodeslashfinish} +{ + \catcode`\/=\active + \global\def\urefcodeslashfinish{% + \urefprestretch \slashChar + % Allow line break only after the final / in a sequence of + % slashes, to avoid line break between the slashes in http://. + \ifx\next/\else \urefpoststretch \fi + } +} \def\codex #1{\tclose{#1}\endgroup} % An additional complication: the above will allow breaks after, e.g., @@ -2598,6 +2636,30 @@ \endlink \endgroup} +\def\nouref#1,#2,#3,#4\finish{\begingroup % doesn't work in @example + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \ifpdf + \unhbox0 % PDF: 2nd arg given, show only it + \else + % \empty at the end of \scantokens arg gets rid of + % trailing newline (and ultimate spurious whitespace). + \unhbox0\ (\urefcode{\scantokens{#1\empty}})% DVI: 2nd arg given, + % show both it and url + \fi + \else + \urefcode{\scantokens{#1\empty}}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref @@ -3034,8 +3096,9 @@ \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue -\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% - \endgroup\page\hbox{}\page} +\parseargdef\shorttitlepage{% + \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% + \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. @@ -5243,7 +5306,8 @@ \global\let\subsubsection = \appendixsubsubsec } -\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz +% normally unnmhead0 calls unnumberedzzz: +\outer\parseargdef\unnumbered{\unnmhead0{#1}} \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 @@ -5287,40 +5351,47 @@ \let\top\unnumbered % Sections. +% \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } -\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz +% normally calls appendixsectionzzz: +\outer\parseargdef\appendixsection{\apphead1{#1}} \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection -\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz +% normally calls unnumberedseczzz: +\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. -\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz +% +% normally calls numberedsubseczzz: +\outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } -\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz +% normally calls appendixsubseczzz: +\outer\parseargdef\appendixsubsec{\apphead2{#1}} \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } -\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz +% normally calls unnumberedsubseczzz: +\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% @@ -5328,21 +5399,25 @@ } % Subsubsections. -\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz +% +% normally numberedsubsubseczzz: +\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } -\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz +% normally appendixsubsubseczzz: +\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } -\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz +% normally unnumberedsubsubseczzz: +\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% @@ -7237,7 +7312,8 @@ % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} -\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, +\def\inforefzzz #1,#2,#3,#4**{% + \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in @@ -7298,7 +7374,7 @@ \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. - \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout }% \fi } === modified file 'lib/Makefile.in' --- lib/Makefile.in 2011-01-30 23:34:18 +0000 +++ lib/Makefile.in 2011-02-03 19:29:35 +0000 @@ -24,7 +24,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files dtoastr getopt-gnu mktime strftime +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files dtoastr getopt-gnu ignore-value mktime strftime VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -483,7 +483,7 @@ unistd.h-t warn-on-use.h warn-on-use.h-t noinst_LIBRARIES = libgnu.a DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src -libgnu_a_SOURCES = dtoastr.c gettext.h +libgnu_a_SOURCES = dtoastr.c gettext.h ignore-value.h libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) EXTRA_libgnu_a_SOURCES = ftoastr.c getopt.c getopt1.c mktime.c \ === modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2011-01-30 23:34:18 +0000 +++ lib/gnulib.mk 2011-02-03 19:29:35 +0000 @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files dtoastr getopt-gnu mktime strftime +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files dtoastr getopt-gnu ignore-value mktime strftime MOSTLYCLEANFILES += core *.stackdump @@ -111,6 +111,12 @@ ## end gnulib module gettext-h +## begin gnulib module ignore-value + +libgnu_a_SOURCES += ignore-value.h + +## end gnulib module ignore-value + ## begin gnulib module intprops === modified file 'm4/gl-comp.m4' --- m4/gl-comp.m4 2011-01-30 23:34:18 +0000 +++ m4/gl-comp.m4 2011-02-03 19:29:35 +0000 @@ -34,6 +34,7 @@ # Code from module getopt-gnu: # Code from module getopt-posix: # Code from module gettext-h: + # Code from module ignore-value: # Code from module include_next: # Code from module intprops: # Code from module mktime: @@ -76,6 +77,8 @@ # Code from module gettext-h: AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) + # Code from module ignore-value: + AC_REQUIRE([AC_C_INLINE]) # Code from module include_next: # Code from module intprops: # Code from module mktime: @@ -248,6 +251,7 @@ lib/getopt1.c lib/getopt_int.h lib/gettext.h + lib/ignore-value.h lib/intprops.h lib/mktime-internal.h lib/mktime.c === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-03 13:46:03 +0000 +++ src/ChangeLog 2011-02-03 19:29:35 +0000 @@ -1,3 +1,16 @@ +2011-02-03 Paul Eggert + + allow C code to suppress warnings about ignored return values + + We need to go through the code and for each such warning, either + fix the code to pay attention to the returned value, or tell GCC + that we really do want to ignore the returned value. Here is one + example of how to do the latter. + * sysdep.c: Include . + (sys_subshell): Suppress an undesirable warning about not checking + the returned value of 'write', as there's nothing useful one can + do with that returned value. + 2011-02-03 Jan Djärv * xterm.c (x_connection_closed): Remove all calls that calls === modified file 'src/sysdep.c' --- src/sysdep.c 2011-01-25 04:08:28 +0000 +++ src/sysdep.c 2011-02-03 19:29:35 +0000 @@ -31,6 +31,8 @@ #endif /* HAVE_LIMITS_H */ #include +#include + #include "lisp.h" #include "sysselect.h" #include "blockinput.h" @@ -263,7 +265,7 @@ init_baud_rate (int fd) { int emacs_ospeed; - + if (noninteractive) emacs_ospeed = 0; else @@ -578,7 +580,7 @@ write (1, "Can't execute subshell", 22); #else /* not WINDOWSNT */ execlp (sh, sh, (char *) 0); - write (1, "Can't execute subshell", 22); + ignore_value (write (1, "Can't execute subshell", 22)); _exit (1); #endif /* not WINDOWSNT */ #endif /* not MSDOS */ @@ -3058,4 +3060,3 @@ } #endif /* !defined (WINDOWSNT) */ - ------------------------------------------------------------ revno: 103103 committer: Jan D. branch nick: trunk timestamp: Thu 2011-02-03 14:46:03 +0100 message: * xterm.c (x_connection_closed): Remove all calls that calls XSync. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-01 19:46:21 +0000 +++ src/ChangeLog 2011-02-03 13:46:03 +0000 @@ -1,3 +1,8 @@ +2011-02-03 Jan Djärv + + * xterm.c (x_connection_closed): Remove all calls that calls + XSync (Bug#7949). + 2011-02-01 Eli Zaretskii * image.c (tiff_load): Avoid compiler warning in 2nd arg to === modified file 'src/xterm.c' --- src/xterm.c 2011-02-01 08:53:03 +0000 +++ src/xterm.c 2011-02-03 13:46:03 +0000 @@ -7694,12 +7694,6 @@ strcpy (error_msg, error_message); handling_signal = 0; - /* Prevent being called recursively because of an error condition - below. Otherwise, we might end up with printing ``can't find per - display information'' in the recursive call instead of printing - the original message here. */ - x_catch_errors (dpy); - /* Inhibit redisplay while frames are being deleted. */ specbind (Qinhibit_redisplay, Qt); @@ -7742,26 +7736,9 @@ first place, so don't try to close it. */ if (dpyinfo) { -#ifdef USE_X_TOOLKIT - /* We have to close the display to inform Xt that it doesn't - exist anymore. If we don't, Xt will continue to wait for - events from the display. As a consequence, a sequence of - - M-x make-frame-on-display RET :1 RET - ...kill the new frame, so that we get an IO error... - M-x make-frame-on-display RET :1 RET - - will indefinitely wait in Xt for events for display `:1', - opened in the first call to make-frame-on-display. - - Closing the display is reported to lead to a bus error on - OpenWindows in certain situations. I suspect that is a bug - in OpenWindows. I don't know how to circumvent it here. */ - fatal_error_signal_hook = x_fatal_error_signal; - XtCloseDisplay (dpy); - fatal_error_signal_hook = NULL; -#endif /* USE_X_TOOLKIT */ - + /* We can not call XtCloseDisplay here because it calls XSync. + XSync inside the error handler apparently hangs Emacs. On + current Xt versions, this isn't needed either. */ #ifdef USE_GTK /* A long-standing GTK bug prevents proper disconnect handling (https://bugzilla.gnome.org/show_bug.cgi?id=85715). Once, @@ -7792,8 +7769,6 @@ } } - x_uncatch_errors (); - if (terminal_list == 0) { fprintf (stderr, "%s\n", error_msg); ------------------------------------------------------------ revno: 103102 committer: Michael Albinus branch nick: trunk timestamp: Thu 2011-02-03 12:28:16 +0100 message: * net/tramp-sh.el (tramp-remote-path): Add default settings for `tramp-default-remote-path' to the docstring. (tramp-get-remote-path): Suppress error message when `getconf PATH' fails. * net/tramp-smb.el (tramp-smb-errors): Add "NT_STATUS_UNSUCCESSFUL". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-03 07:33:16 +0000 +++ lisp/ChangeLog 2011-02-03 11:28:16 +0000 @@ -1,3 +1,12 @@ +2011-02-03 Michael Albinus + + * net/tramp-sh.el (tramp-remote-path): Add default settings for + `tramp-default-remote-path' to the docstring. + (tramp-get-remote-path): Suppress error message when `getconf + PATH' fails. + + * net/tramp-smb.el (tramp-smb-errors): Add "NT_STATUS_UNSUCCESSFUL". + 2011-02-03 Glenn Morris * vc/vc-hg.el (vc-hg-command): Doc fix. === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2011-01-25 04:08:28 +0000 +++ lisp/net/tramp-sh.el 2011-02-03 11:28:16 +0000 @@ -68,7 +68,7 @@ ;; ksh on OpenBSD 4.5 requires, that $PS1 contains a `#' character for ;; root users. It uses the `$' character for other users. In order -;; to guarantee a proper prompt, we use "#$" for the prompt. +;; to guarantee a proper prompt, we use "#$ " for the prompt. (defvar tramp-end-of-output (format @@ -482,7 +482,9 @@ `Default Directories' represent the list of directories given by the command \"getconf PATH\". It is recommended to use this entry on top of this list, because these are the default -directories for POSIX compatible commands. +directories for POSIX compatible commands. On remote hosts which +do not offer the getconf command (like cygwin), the value +\"/bin:/usr/bin\" is used instead of. `Private Directories' are the settings of the $PATH environment, as given in your `~/.profile'." @@ -4655,11 +4657,12 @@ (elt2 (memq 'tramp-own-remote-path remote-path)) (default-remote-path (when elt1 - (condition-case nil - (tramp-send-command-and-read - vec "echo \\\"`getconf PATH`\\\"") - ;; Default if "getconf" is not available. - (error + (or + (tramp-send-command-and-read + vec + "x=`getconf PATH 2>/dev/null` && echo \\\"$x\\\" || echo nil") + ;; Default if "getconf" is not available. + (progn (tramp-message vec 3 "`getconf PATH' not successful, using default value \"%s\"." @@ -4669,7 +4672,6 @@ (when elt2 (condition-case nil (tramp-send-command-and-read vec "echo \\\"$PATH\\\"") - ;; Default if "getconf" is not available. (error (tramp-message vec 3 "$PATH not set, ignoring `tramp-own-remote-path'.") === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2011-01-25 04:08:28 +0000 +++ lisp/net/tramp-smb.el 2011-02-03 11:28:16 +0000 @@ -114,6 +114,7 @@ "NT_STATUS_OBJECT_NAME_NOT_FOUND" "NT_STATUS_SHARING_VIOLATION" "NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE" + "NT_STATUS_UNSUCCESSFUL" "NT_STATUS_WRONG_PASSWORD") "\\|") "Regexp for possible error strings of SMB servers. ------------------------------------------------------------ revno: 103101 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-02-02 23:37:43 -0800 message: Small faq.texi changes. * doc/misc/faq.texi (Contacting the FSF): Mainly just refer to the web-site. (Binding combinations of modifiers and function keys): Let's assume people reading this are not using Emacs 18. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-02-03 05:01:44 +0000 +++ doc/misc/ChangeLog 2011-02-03 07:37:43 +0000 @@ -1,3 +1,9 @@ +2011-02-03 Glenn Morris + + * faq.texi (Contacting the FSF): Mainly just refer to the web-site. + (Binding combinations of modifiers and function keys): + Let's assume people reading this are not using Emacs 18. + 2011-02-03 Lars Ingebrigtsen * gnus.texi (Article Date): Remove mention of gnus-stop-date-timer, === modified file 'doc/misc/faq.texi' --- doc/misc/faq.texi 2011-01-25 04:08:28 +0000 +++ doc/misc/faq.texi 2011-02-03 07:37:43 +0000 @@ -502,36 +502,13 @@ unsubscribe. @node Contacting the FSF -@section What is the current address of the FSF? -@cindex Snail mail address of the FSF -@cindex Postal address of the FSF +@section How do I contact the FSF? @cindex Contracting the FSF @cindex Free Software Foundation, contacting For up-to-date information, see @uref{http://www.fsf.org/about/contact.html, the FSF contact web-page}. - -@table @asis - -@item E-mail -info@@fsf.org - -@item Telephone -+1-617-542-5942 - -@item Fax -+1-617-542-2652 - -@item World Wide Web -@uref{http://www.fsf.org/} - -@item Postal address -Free Software Foundation@* -51 Franklin Street, Fifth Floor@* -Boston, MA 02110-1301@* -USA@* - -@end table +You can send general correspondence to @email{info@@fsf.org}. @cindex Ordering GNU software For details on how to order items directly from the FSF, see the @@ -3895,9 +3872,9 @@ @cindex Function keys and modifiers @cindex Binding modifiers and function keys -With Emacs 19 and later, you can represent modified function keys in -vector format by adding prefixes to the function key symbol. For -example (from the Emacs documentation): +You can represent modified function keys in vector format by adding +prefixes to the function key symbol. For example (from the Emacs +documentation): @lisp (global-set-key [?\C-x right] 'forward-page) ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.