commit c0abae57f6115346f0d2e38d897c95de61fcbc85 (HEAD, refs/remotes/origin/master) Author: Lars Ingebrigtsen Date: Mon Feb 8 18:28:00 2016 +1100 Skip TLS tests if we don't have openssl * test/lisp/net/network-stream-tests.el (connect-to-tls): Skip TLS tests if we don't have openssl and GnuTLS. diff --git a/test/lisp/net/network-stream-tests.el b/test/lisp/net/network-stream-tests.el index 478b824..ad7c1fc 100644 --- a/test/lisp/net/network-stream-tests.el +++ b/test/lisp/net/network-stream-tests.el @@ -163,6 +163,8 @@ "-www")) (ert-deftest connect-to-tls () + (skip-unless (executable-find "openssl")) + (skip-unless (gnutls-available-p)) (let ((server (make-tls-server)) (times 0) proc status) commit 857c5c24d6e57ac593e000198b644a0a88f54915 Author: Lars Ingebrigtsen Date: Mon Feb 8 18:22:53 2016 +1100 Automatically scale images up on high-density screens * doc/lispref/display.texi (ImageMagick Images): Mention :scale. (Defining Images): Mention image-scaling-factor. * lisp/image.el (image-compute-scaling-factor): New function (bug#22172). (create-image): Use it. (image-scaling-factor): New variable. * src/image.c (compute_image_size): Take :scale into account. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 3238959..c8e7e4f 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -5198,6 +5198,14 @@ and if @code{:height} is set it will have precedence over wish. @code{:max-width} and @code{:max-height} will always preserve the aspect ratio. +@item :scale @var{scale} +This should be a number, where values higher than 1 means to increase +the size, and lower means to decrease the size. For instance, a value +of 0.25 will make the image a quarter size of what it originally was. +If the scaling makes the image larger than specified by +@code{:max-width} or @code{:max-height}, the resulting size will not +exceed those two values. + @item :format @var{type} The value, @var{type}, should be a symbol specifying the type of the image data, as found in @code{image-format-suffixes}. This is used @@ -5384,6 +5392,13 @@ Here is an example of using @code{image-load-path-for-library}: @end example @end defun +@vindex image-scaling-factor +Images are automatically scaled when created based on the +@code{image-scaling-factor} variable. The value is either a floating +point number (where numbers higher than 1 means to increase the size +and lower means to shrink the size), or the symbol @code{auto}, which +will compute a scaling factor based on the font pixel size. + @node Showing Images @subsection Showing Images @cindex show image diff --git a/etc/NEWS b/etc/NEWS index ad9a50c..fd56f0c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -769,6 +769,11 @@ longer warn about sending emails to top-level domains it hasn't heard about. +++ +** Images are automatically scaled before displaying based on the +`image-scaling-factor' variable (if Emacs supports scaling the images +in question). + ++++ ** In Show Paren Mode, a parenthesis can be highlighted when point stands inside it, and certain parens can be highlighted when point is at BOL or EOL, or in whitespace there. To enable these, customize, diff --git a/lisp/image.el b/lisp/image.el index 663afa7..82a10a3 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -126,6 +126,18 @@ Subdirectories are not automatically included in the search." :type '(repeat (choice directory variable)) :initialize 'custom-initialize-delay) +(defcustom image-scaling-factor 'auto + "When displaying images, apply this scaling factor before displaying. +This is not supported for all image types, and is mostly useful +when you have a high-resolution monitor. +The value is either a floating point number (where numbers higher +than 1 means to increase the size and lower means to shrink the +size), or the symbol `auto', which will compute a scaling factor +based on the font pixel size." + :type '(choice number + (const :tag "Automatically compute" auto)) + :group 'image + :version "25.2") (defun image-load-path-for-library (library image &optional path no-error) "Return a suitable search path for images used by LIBRARY. @@ -409,8 +421,25 @@ Image file names that are not absolute are searched for in the (setq type (image-type file-or-data type data-p)) (when (image-type-available-p type) (append (list 'image :type type (if data-p :data :file) file-or-data) + (and (not (plist-get props :scale)) + (list :scale + (image-compute-scaling-factor image-scaling-factor))) props))) +(defun image-compute-scaling-factor (scaling) + (cond + ((numberp image-scaling-factor) + image-scaling-factor) + ((eq image-scaling-factor 'auto) + (let ((width (/ (float (window-width nil t)) (window-width)))) + ;; If we assume that a typical character is 10 pixels in width, + ;; then we should scale all images according to how wide they + ;; are. But don't scale images down. + (if (< width 10) + 1 + (/ (float width) 10)))) + (t + (error "Invalid scaling factor %s" image-scaling-factor)))) ;;;###autoload (defun put-image (image pos &optional string area) diff --git a/src/image.c b/src/image.c index 144fe30..bc5863f 100644 --- a/src/image.c +++ b/src/image.c @@ -8073,6 +8073,7 @@ compute_image_size (size_t width, size_t height, { Lisp_Object value; int desired_width, desired_height; + double scale = 1; /* If width and/or height is set in the display spec assume we want to scale to those values. If either h or w is unspecified, the @@ -8083,6 +8084,12 @@ compute_image_size (size_t width, size_t height, value = image_spec_value (spec, QCheight, NULL); desired_height = NATNUMP (value) ? min (XFASTINT (value), INT_MAX) : -1; + value = image_spec_value (spec, QCscale, NULL); + if (NATNUMP (value)) + scale = extract_float (value); + width = width * scale; + height = height * scale; + if (desired_width == -1) { value = image_spec_value (spec, QCmax_width, NULL); @@ -8132,6 +8139,13 @@ compute_image_size (size_t width, size_t height, /* h known, calculate w. */ desired_width = scale_image_size (desired_height, height, width); + /* We have no width/height settings, so just apply the scale. */ + if (desired_width == -1 && desired_height == -1) + { + desired_width = width; + desired_height = height; + } + *d_width = desired_width; *d_height = desired_height; } @@ -9795,6 +9809,7 @@ non-numeric, there is no explicit limit on the size of images. */); DEFSYM (QCcrop, ":crop"); DEFSYM (QCrotation, ":rotation"); DEFSYM (QCmatrix, ":matrix"); + DEFSYM (QCscale, ":scale"); DEFSYM (QCcolor_adjustment, ":color-adjustment"); DEFSYM (QCmask, ":mask"); commit da66e5585083c2c357e960144fd4ae0e75310f74 Author: Lars Ingebrigtsen Date: Mon Feb 8 17:13:01 2016 +1100 Ensure progress when fetching from the queue * lisp/url/url-queue.el (url-queue-check-progress): Ensure that we have progress when fetching queued requests (bug#22576). diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el index 0ff4ad1..8972d0b 100644 --- a/lisp/url/url-queue.el +++ b/lisp/url/url-queue.el @@ -1,4 +1,4 @@ -;;; url-queue.el --- Fetching web pages in parallel +;;; url-queue.el --- Fetching web pages in parallel -*- lexical-binding: t -*- ;; Copyright (C) 2011-2016 Free Software Foundation, Inc. @@ -47,6 +47,7 @@ ;;; Internal variables. (defvar url-queue nil) +(defvar url-queue-progress-timer nil) (cl-defstruct url-queue url callback cbargs silentp @@ -90,7 +91,13 @@ The variable `url-queue-timeout' sets a timeout." (when (and waiting (< running url-queue-parallel-processes)) (setf (url-queue-pre-triggered waiting) t) - (run-with-idle-timer 0.01 nil 'url-queue-run-queue)))) + ;; We start fetching from this idle timer... + (run-with-idle-timer 0.01 nil #'url-queue-run-queue) + ;; And then we set up a separate timer to ensure progress when a + ;; web server is unresponsive. + (unless url-queue-progress-timer + (setq url-queue-progress-timer + (run-with-idle-timer 1 1 #'url-queue-check-progress)))))) (defun url-queue-run-queue () (url-queue-prune-old-entries) @@ -107,6 +114,13 @@ The variable `url-queue-timeout' sets a timeout." (setf (url-queue-start-time waiting) (float-time)) (url-queue-start-retrieve waiting)))) +(defun url-queue-check-progress () + (when url-queue-progress-timer + (if url-queue + (url-queue-run-queue) + (cancel-timer url-queue-progress-timer) + (setq url-queue-progress-timer nil)))) + (defun url-queue-callback-function (status job) (setq url-queue (delq job url-queue)) (when (and (eq (car status) :error) commit 8b50ae8b2284b5652c2843a9d0d076f4f657be28 Author: Lars Ingebrigtsen Date: Mon Feb 8 16:44:56 2016 +1100 Make mail-extract-address-components return the user name more * lisp/mail/mail-extr.el (mail-extract-address-components): Return the name even if it's the same as the mailbox name (if `mail-extr-ignore-single-names' isn't set) (bug#22594). diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el index 6384967..9dc3af6 100644 --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el @@ -1406,25 +1406,26 @@ consing a string.)" (insert (upcase mi) ". "))) ;; Nuke name if it is the same as mailbox name. - (let ((buffer-length (- (point-max) (point-min))) - (i 0) - (names-match-flag t)) - (when (and (> buffer-length 0) - (eq buffer-length (- mbox-end mbox-beg))) - (goto-char (point-max)) - (insert-buffer-substring canonicalization-buffer - mbox-beg mbox-end) - (while (and names-match-flag - (< i buffer-length)) - (or (eq (downcase (char-after (+ i (point-min)))) - (downcase - (char-after (+ i buffer-length (point-min))))) - (setq names-match-flag nil)) - (setq i (1+ i))) - (delete-region (+ (point-min) buffer-length) (point-max)) - (and names-match-flag - mail-extr-ignore-realname-equals-mailbox-name - (narrow-to-region (point) (point))))) + (when mail-extr-ignore-single-names + (let ((buffer-length (- (point-max) (point-min))) + (i 0) + (names-match-flag t)) + (when (and (> buffer-length 0) + (eq buffer-length (- mbox-end mbox-beg))) + (goto-char (point-max)) + (insert-buffer-substring canonicalization-buffer + mbox-beg mbox-end) + (while (and names-match-flag + (< i buffer-length)) + (or (eq (downcase (char-after (+ i (point-min)))) + (downcase + (char-after (+ i buffer-length (point-min))))) + (setq names-match-flag nil)) + (setq i (1+ i))) + (delete-region (+ (point-min) buffer-length) (point-max)) + (and names-match-flag + mail-extr-ignore-realname-equals-mailbox-name + (narrow-to-region (point) (point)))))) ;; Nuke name if it's just one word. (goto-char (point-min)) commit 94d9396a4b6d6b4870127f9dabb4d454ea50a9c1 Author: Lars Ingebrigtsen Date: Mon Feb 8 16:06:59 2016 +1100 Message no longer warns about unknown top level domains diff --git a/etc/NEWS b/etc/NEWS index 95ade41..ad9a50c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -762,6 +762,12 @@ invalid certificates are marked in red. *** text/html messages that contain inline image parts will be transformed into multipart/related messages before sending. +--- +*** The `message-valid-fqdn-regexp' variable has been removed, since +there are now top-level domains added all the time. Message will no +longer warn about sending emails to top-level domains it hasn't heard +about. + +++ ** In Show Paren Mode, a parenthesis can be highlighted when point stands inside it, and certain parens can be highlighted when point is commit f7b0ca9dfabc16cb286265de44a3fbfc3b5e73fa Author: Jarno Malmari Date: Mon Feb 8 15:56:21 2016 +1100 Add tests for url-auth * test/lisp/url/url-auth-tests.el: New file. diff --git a/test/lisp/url/url-auth-tests.el b/test/lisp/url/url-auth-tests.el new file mode 100644 index 0000000..36c177f --- /dev/null +++ b/test/lisp/url/url-auth-tests.el @@ -0,0 +1,249 @@ +;;; url-auth-tests.el --- Test suite for url-auth. + +;; Copyright (C) 2015 Free Software Foundation, Inc. + +;; Author: Jarno Malmari + +;; 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 . + +;;; Commentary: + +;; Test HTTP authentication methods. + +;;; Code: + +(require 'ert) +(require 'url-auth) + +(defvar url-auth-test-challenges nil + "List of challenges for testing. +Each challenge is a plist. Values are as presented by the +server's WWW-Authenticate header field.") + +;; Set explicitly for easier modification for re-runs. +(setq url-auth-test-challenges + (list + (list :qop "auth" + :nonce "uBr3+qkQBybTr/dKWkmpUqVO7SaEwWYzyTKO7g==$" + :uri "/random/path" + :method "GET" + :realm "Some test realm" + :cnonce "YWU4NDcxYWMxMDAxMjlkMjAwMDE4MjI5MDAwMGY4NGQ=" + :nc "00000001" + :username "jytky" + :password "xi5Ac2HEfKt1lKKO05DCSqsK0u7hqqtsT" + :expected-ha1 "af521db3a83abd91262fead04fa31892" + :expected-ha2 "e490a6a147c79404b365d1f6059ddda5" + :expected-response "ecb6396e93b9e09e31f19264cfd8f854") + (list :nonce "a1be8a3065e00c5bf190ad499299aea5" + :opaque "d7c2a27230fc8c74bb6e06be8c9cd189" + :realm "The Test Realm" + :username "user" + :password "passwd" + :uri "/digest-auth/auth/user/passwd" + :method "GET" + :expected-ha1 "19c41161a8720edaeb7922ef8531137d" + :expected-ha2 "b44272ea65ee4af7fb26c5dba58f6863" + :expected-response "46c47a6d8e1fa95a3efcf49724af3fe7") + (list :nonce "servernonce" + :username "user" + :password "passwd" + :realm "The Test Realm 1" + :uri "/digest-auth/auth/user/passwd" + :method "GET" + :expected-ha1 "00f848f943c9a05dd06c932a7334f120" + :expected-ha2 "b44272ea65ee4af7fb26c5dba58f6863" + :expected-response "b8a48cdc9aa9e514509a5a5c53d4e8cf") + (list :nonce "servernonce" + :username "user" + :password "passwd" + :realm "The Test Realm 2" + :uri "/digest-auth/auth/user/passwd" + :method "GET" + :expected-ha1 "74d6abd3651d6b8260733d8a4c37ec1a" + :expected-ha2 "b44272ea65ee4af7fb26c5dba58f6863" + :expected-response "0d84884d967e04440efc77e9e2b5b561"))) + +(ert-deftest url-auth-test-digest-create-key () + "Check user credentials in their hashed form." + (dolist (challenge url-auth-test-challenges) + (let ((key (url-digest-auth-create-key (plist-get challenge :username) + (plist-get challenge :password) + (plist-get challenge :realm) + (plist-get challenge :method) + (plist-get challenge :uri)))) + (should (= (length key) 2)) + (should (string= (nth 0 key) (plist-get challenge :expected-ha1))) + (should (string= (nth 1 key) (plist-get challenge :expected-ha2))) + ))) + +(ert-deftest url-auth-test-digest-auth-retrieve-cache () + "Check how the entry point retrieves cached authentication. +Essential is how realms and paths are matched." + + (let* ((url-digest-auth-storage + '(("example.org:80" + ("/path/auth1" "auth1user" "key") + ("/path" "pathuser" "key") + ("/" "rootuser" "key") + ("realm1" "realm1user" "key") + ("realm2" "realm2user" "key") + ("/path/auth2" "auth2user" "key")) + ("example.org:443" + ("realm" "secure_user" "key")) + ("rootless.org:80" ; no "/" entry for this on purpose + ("/path" "pathuser" "key") + ("realm" "realmuser" "key")))) + (attrs (list (cons "nonce" "servernonce"))) + auth) + + (dolist (row (list + ;; If :expected-user is `nil' it indicates + ;; authentication information shouldn't be found. + + ;; non-existent server + (list :url "http://other.com/path" :realm nil :expected-user nil) + + ;; unmatched port + (list :url "http://example.org:444/path" :realm nil :expected-user +il) + + ;; root, no realm + (list :url "http://example.org/" + :realm nil :expected-user "rootuser") + + ;; root, no realm, explicit port + (list :url "http://example.org:80/" + :realm nil :expected-user "rootuser") + + (list :url "http://example.org/unknown" + :realm nil :expected-user "rootuser") + + ;; realm specified, overrides any path + (list :url "http://example.org/" + :realm "realm1" :expected-user "realm1user") + + ;; realm specified, overrides any path + (list :url "http://example.org/" + :realm "realm2" :expected-user "realm2user") + + ;; authentication determined by path + (list :url "http://example.org/path/auth1/query" + :realm nil :expected-user "auth1user") + + ;; /path shadows /path/auth2, hence pathuser is expected + (list :url "http://example.org/path/auth2/query" + :realm nil :expected-user "pathuser") + + (list :url "https://example.org/path" + :realm nil :expected-user "secure_user") + + ;; not really secure user but using the same port + (list :url "http://example.org:443/path" + :realm nil :expected-user "secure_user") + + ;; preferring realm user over path, even though no + ;; realm specified (not sure why) + (list :url "http://rootless.org/" + :realm nil :expected-user "realmuser") + ;; second variant for the same case + (list :url "http://rootless.org/unknown/path" + :realm nil :expected-user "realmuser") + + ;; path match + (list :url "http://rootless.org/path/query?q=a" + :realm nil :expected-user "pathuser") + + ;; path match, realm match, prefer realm + (list :url "http://rootless.org/path/query?q=a" + :realm "realm" :expected-user "realmuser") + )) + (setq auth (url-digest-auth (plist-get row :url) + nil nil + (plist-get row :realm) attrs)) + (if (plist-get row :expected-user) + (progn (should auth) + (should (string-match ".*username=\"\\(.*?\\)\".*" auth)) + (should (string= (match-string 1 auth) + (plist-get row :expected-user)))) + (should-not auth))))) + +(ert-deftest url-auth-test-digest-auth () + "Check common authorization string contents. +Challenges with qop are not checked for response since a unique +cnonce is used for generating them which is not mocked by the +test and cannot be passed by arguments to `url-digest-auth'." + (dolist (challenge url-auth-test-challenges) + (let* ((attrs (append + (list (cons "nonce" (plist-get challenge :nonce))) + (if (plist-get challenge :qop) + (list (cons "qop" (plist-get challenge :qop)))))) + (url (concat "http://example.org" (plist-get challenge :uri))) + url-digest-auth-storage + auth) + ;; Add authentication info to cache so `url-digest-auth' can + ;; complete without prompting minibuffer input. + (setq url-digest-auth-storage + (list + (list "example.org:80" + (cons (or (plist-get challenge :realm) "/") + (cons (plist-get challenge :username) + (url-digest-auth-create-key (plist-get challenge :username) + (plist-get challenge :password) + (plist-get challenge :realm) + (plist-get challenge :method) + (plist-get challenge :uri))))))) + (setq auth (url-digest-auth (url-generic-parse-url url) nil nil + (plist-get challenge :realm) attrs)) + (should auth) + (should (string-prefix-p "Digest " auth)) + (should (string-match ".*username=\"\\(.*?\\)\".*" auth)) + (should (string= (match-string 1 auth) + (plist-get challenge :username))) + (should (string-match ".*realm=\"\\(.*?\\)\".*" auth)) + (should (string= (match-string 1 auth) + (plist-get challenge :realm))) + + (if (plist-member challenge :qop) + (progn + ;; We don't know these, just check that they exists. + (should (string-match-p ".*response=\".*?\".*" auth)) + (should (string-match-p ".*nc=\".*?\".*" auth)) + (should (string-match-p ".*cnonce=\".*?\".*" auth))) + (should (string-match ".*response=\"\\(.*?\\)\".*" auth)) + (should (string= (match-string 1 auth) + (plist-get challenge :expected-response)))) + ))) + +(ert-deftest url-auth-test-digest-auth-opaque () + "Check that `opaque' value is added to result when presented by +the server." + (let* ((url-digest-auth-storage + '(("example.org:80" ("/" "user" "key")))) + (attrs (list (cons "nonce" "anynonce"))) + auth) + ;; Get authentication info from cache without `opaque'. + (setq auth (url-digest-auth "http://example.org/path" nil nil nil attrs)) + (should auth) + (should-not (string-match-p "opaque=" auth)) + + ;; Add `opaque' to attributes. + (push (cons "opaque" "opaque-value") attrs) + (setq auth (url-digest-auth "http://example.org/path" nil nil nil attrs)) + (should auth) + (should (string-match ".*opaque=\"\\(.*?\\)\".*" auth)) + (should (string= (match-string 1 auth) "opaque-value")))) + +(provide 'url-auth-tests) +;;; url-auth-tests.el ends here commit f29b6cf37964859f40586e218abc37c3232f8480 Author: Lars Ingebrigtsen Date: Mon Feb 8 15:28:50 2016 +1100 Add a TLS connection test * test/lisp/net/network-stream-tests.el (connect-to-tls): Add a TLS connection test. diff --git a/test/lisp/net/cert.pem b/test/lisp/net/cert.pem new file mode 100644 index 0000000..4df4e92 --- /dev/null +++ b/test/lisp/net/cert.pem @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIELTCCAxWgAwIBAgIJAI6LqlFyaPRkMA0GCSqGSIb3DQEBCwUAMIGsMQswCQYD +VQQGEwJBVTEYMBYGA1UECAwPTmV3IFNvdXRoIFdhbGVzMQ8wDQYDVQQHDAZTeWRu +ZXkxITAfBgNVBAoMGEVtYWNzIFRlc3QgU2VydmljZXNzIExMQzESMBAGA1UECwwJ +QXV0b21hdGVkMRcwFQYDVQQDDA50ZXN0LmVtYWNzLnpvdDEiMCAGCSqGSIb3DQEJ +ARYTZW1hY3MtZGV2ZWxAZnNmLm9yZzAeFw0xNjAyMDgwNDA0MzJaFw0xNjAzMDkw +NDA0MzJaMIGsMQswCQYDVQQGEwJBVTEYMBYGA1UECAwPTmV3IFNvdXRoIFdhbGVz +MQ8wDQYDVQQHDAZTeWRuZXkxITAfBgNVBAoMGEVtYWNzIFRlc3QgU2VydmljZXNz +IExMQzESMBAGA1UECwwJQXV0b21hdGVkMRcwFQYDVQQDDA50ZXN0LmVtYWNzLnpv +dDEiMCAGCSqGSIb3DQEJARYTZW1hY3MtZGV2ZWxAZnNmLm9yZzCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAM52lP7k1rBpctBX1irRVgDerxqlFSTkvg8L +WmRCfwm3XY8EZWqM/8Eex5soH7myRlWfUH/cKxbqScZqXotj0hlPxdRkM6gWgHS9 +Mml7wnz2LZGvD5PfMfs+yBHKAMrqortFXCKksHsYIJ66l9gJMm1G5XjWha6CaEr/ +k2bE5Ovw0fB2B4vH0OqhJzGyenJOspXZz1ttn3h3UC5fbDXS8fUM9k/FbgJKypWr +zB3P12GcMR939FsR5sqa8nNoCMw+WBzs4XuM5Ad+s/UtEaZvmtwvLwmdB7cgCEyM +x5gaM969SlpOmuy7dDTCCK3lBl6B5dgFKvVcChYwSW+xJz5tfL0CAwEAAaNQME4w +HQYDVR0OBBYEFG3YhH7ZzEdOGstkT67uUh1RylNjMB8GA1UdIwQYMBaAFG3YhH7Z +zEdOGstkT67uUh1RylNjMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB +ADnJL2tBMnPepywA57yDfJz54FvrqRd+UAjSiB7/QySDpHnTM3b3sXWfwAkXPTjM +c+jRW2kfdnL6OQW2tpcpPZANGnwK8MJrtGcbHhtPXjgDRhVZp64hsB7ayS+l0Dm7 +2ZBbi2SF8FgZVcQy0WD01ir2raSODo124dMrq+3aHP77YLbiNEKj+wFoDbndQ1FQ +gtIJBE80FADoqc7LnBrpA20aVlfqhKZqe+leYDSZ+CE1iwlPdvD+RTUxVDs5EfpB +qVOHDlzEfVmcMnddKTV8pNYuo93AG4s0KdrGG9RwSvtLaOoHd2i6RmIs+Yiumbau +mXodMxxAEW/cM7Ita/2QVmk= +-----END CERTIFICATE----- diff --git a/test/lisp/net/key.pem b/test/lisp/net/key.pem new file mode 100644 index 0000000..5db58f5 --- /dev/null +++ b/test/lisp/net/key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDOdpT+5NawaXLQ +V9Yq0VYA3q8apRUk5L4PC1pkQn8Jt12PBGVqjP/BHsebKB+5skZVn1B/3CsW6knG +al6LY9IZT8XUZDOoFoB0vTJpe8J89i2Rrw+T3zH7PsgRygDK6qK7RVwipLB7GCCe +upfYCTJtRuV41oWugmhK/5NmxOTr8NHwdgeLx9DqoScxsnpyTrKV2c9bbZ94d1Au +X2w10vH1DPZPxW4CSsqVq8wdz9dhnDEfd/RbEebKmvJzaAjMPlgc7OF7jOQHfrP1 +LRGmb5rcLy8JnQe3IAhMjMeYGjPevUpaTprsu3Q0wgit5QZegeXYBSr1XAoWMElv +sSc+bXy9AgMBAAECggEAaqHkIiGeoE5V9jTncAXeHWTlmyVX3k4luy9p6A5P/nyt +3YevuXBJRzzWatQ2Tno8yUwXD3Ju7s7ie4/EdMmBYYFJ84AtDctRXPm6Z7B7qn6a +2ntH2F+WOOUb/9QMxMCae44/H8VfQLQdZN2KPxHA8Z+ENPzW3mKL6vBE+PcIJLK2 +kTXQdCEIuUb1v4kxKYfjyyHAQ9yHvocUvZdodGHrpmWOr/2QCrqCjwiKnXyvdJMi +JQ4a3dU+JG5Zwr2hScyeLgS4p+M3A2NY+oIACn2rCcsIKC6uvBK3wAbhssaY8z9c +5kap862oMBNmPCxPuQTIIO7ptla0EWHktpFxnu7GIQKBgQDvKyXt82zGHiOZ9acx +4fV7t3NF2MNd9fOn59NYWYRSs2gaEjit6BnsCgiKZOJJ2YFsggBiQMiWuEzwqIdW +bOH8W5AubTxnE2OjeIpH5r8AXI6I/pKdOedM86oeElbL0p53OZqSqBK6vA5SnE76 +fZwC505h/mqH2E6AdKpcyL7sJwKBgQDc/jc4MkVnqF7xcYoJrYEbnkhwqRxIM+0Y +HY2qXszWQPgjae3NK1rw/PEOATzWrHLvRS/utQ8yeLUAZIGsFY8+c1kjvkvl4ZK2 +OnsEOVLmEwjDqqnq3JFYCVSkXfLBGRD3wGldzkCQljOiGuJ/Co1rGHk7CfBmxX2p +kxdts5OKewKBgQDTRsSc7Zs7cMh2a0GlmTyoa6iTHSeIy4rQ2sQimgGApSfjUBFt +30l28G4XA4O7RT9FwZnhMeWA75JYTigwOsNvkNtPiAQB8mjksclGNxqnkRwA/RI7 +fjlMCzxOkFjIeWivXd2kjIDvIM1uQNKsCWZWUks12e/1zSmb5HPSvyuZpQKBgQDQ +qVgKP604ysmav9HOgXy+Tx2nAoYpxp2/f2gbzZcrVfz1szdN2fnsQWh6CMEhEYMU +WQeBJIRM65w72qp1iYXPOaqZDT0suWiFl4I/4sBbbO2BkssNb2Xs8iJxcCOeH8Td +qVfTssNTwf7OuQPTYGtXC6ysCh5ra13Tl4cvlbdhsQKBgFHXP+919wSncLS+2ySD +waBzG6GyVOgV+FE3DrM3Xp4S6fldWYAndKHQ1HjJVDY8SkC2Tk1D7QSQnmS+ZzYs +YqzcnkPCTHLb6wCErs4ZiW0gn9xJnfxyv6wPujsayL4TMsmsqkj/IAB61UjwaA/a +Z+rUw/WkcNPD59AD1J0eeSZu +-----END PRIVATE KEY----- diff --git a/test/lisp/net/network-stream-tests.el b/test/lisp/net/network-stream-tests.el index f52a69e..478b824 100644 --- a/test/lisp/net/network-stream-tests.el +++ b/test/lisp/net/network-stream-tests.el @@ -22,6 +22,8 @@ ;;; Code: +(require 'gnutls) + (ert-deftest make-local-unix-server () (let* ((file (make-temp-name "/tmp/server-test")) (server @@ -101,7 +103,7 @@ :buffer (generate-new-buffer "*foo*") :host (system-name) :service port))) - (with-current-buffer "*foo*" + (with-current-buffer (process-buffer proc) (process-send-string proc "echo foo") (sleep-for 0.1) (should (equal (buffer-string) "foo\n"))) @@ -114,7 +116,7 @@ :buffer (generate-new-buffer "*foo*") :host "localhost" :service port))) - (with-current-buffer "*foo*" + (with-current-buffer (process-buffer proc) (process-send-string proc "echo foo") (sleep-for 0.1) (should (equal (buffer-string) "foo\n"))) @@ -127,7 +129,7 @@ :buffer (generate-new-buffer "*foo*") :host "127.0.0.1" :service port))) - (with-current-buffer "*foo*" + (with-current-buffer (process-buffer proc) (process-send-string proc "echo foo") (sleep-for 0.1) (should (equal (buffer-string) "foo\n"))) @@ -147,10 +149,47 @@ t))) (while (eq (process-status proc) 'connect) (sit-for 0.1)) - (with-current-buffer "*foo*" + (with-current-buffer (process-buffer proc) (process-send-string proc "echo foo") (sleep-for 0.1) (should (equal (buffer-string) "foo\n"))) (delete-process server))) +(defun make-tls-server () + (start-process "openssl" (generate-new-buffer "*tls*") "openssl" + "s_server" "-key" "lisp/net/key.pem" + "-cert" "lisp/net/cert.pem" + "-accept" "44330" + "-www")) + +(ert-deftest connect-to-tls () + (let ((server (make-tls-server)) + (times 0) + proc status) + (sleep-for 1) + (with-current-buffer (process-buffer server) + (message "openssl: %s" (buffer-string))) + + ;; It takes a while for openssl to start. + (while (and (null (ignore-errors + (setq proc (make-network-process + :name "bar" + :buffer (generate-new-buffer "*foo*") + :host "localhost" + :service 44330)))) + (< (setq times (1+ times)) 10)) + (sit-for 0.1)) + (should proc) + (gnutls-negotiate :process proc + :type 'gnutls-x509pki + :hostname "localhost") + (delete-process server) + (setq status (gnutls-peer-status proc)) + (should (consp status)) + (delete-process proc) + (let ((issuer (plist-get (plist-get status :certificate) :issuer))) + (should (stringp issuer)) + (setq issuer (split-string issuer ",")) + (should (equal (nth 3 issuer) "O=Emacs Test Servicess LLC"))))) + ;;; network-stream-tests.el ends here commit 4f50d8db8c54ca3fb80cd52c34099c4c0a8fb7dd Author: Lars Ingebrigtsen Date: Mon Feb 8 14:35:07 2016 +1100 Add more network tests * test/lisp/net/network-stream-tests.el (echo-server-nowait): New test. diff --git a/test/lisp/net/network-stream-tests.el b/test/lisp/net/network-stream-tests.el index 3e0821a..f52a69e 100644 --- a/test/lisp/net/network-stream-tests.el +++ b/test/lisp/net/network-stream-tests.el @@ -75,7 +75,7 @@ :filter 'server-process-filter :host host)) -(defun server-sentinel (proc msg) +(defun server-sentinel (_proc _msg) ) (defun server-process-filter (proc string) @@ -95,7 +95,7 @@ )))) (ert-deftest echo-server-with-dns () - (let* ((server (make-server "mouse")) + (let* ((server (make-server (system-name))) (port (aref (process-contact server :local) 4)) (proc (make-network-process :name "foo" :buffer (generate-new-buffer "*foo*") @@ -104,7 +104,8 @@ (with-current-buffer "*foo*" (process-send-string proc "echo foo") (sleep-for 0.1) - (should (equal (buffer-string) "foo\n"))))) + (should (equal (buffer-string) "foo\n"))) + (delete-process server))) (ert-deftest echo-server-with-localhost () (let* ((server (make-server 'local)) @@ -116,7 +117,8 @@ (with-current-buffer "*foo*" (process-send-string proc "echo foo") (sleep-for 0.1) - (should (equal (buffer-string) "foo\n"))))) + (should (equal (buffer-string) "foo\n"))) + (delete-process server))) (ert-deftest echo-server-with-ip () (let* ((server (make-server 'local)) @@ -128,6 +130,27 @@ (with-current-buffer "*foo*" (process-send-string proc "echo foo") (sleep-for 0.1) - (should (equal (buffer-string) "foo\n"))))) + (should (equal (buffer-string) "foo\n"))) + (delete-process server))) + +(ert-deftest echo-server-nowait () + (let* ((server (make-server 'local)) + (port (aref (process-contact server :local) 4)) + (proc (make-network-process :name "foo" + :buffer (generate-new-buffer "*foo*") + :host "localhost" + :nowait t + :service port))) + (should (eq (process-status proc) 'connect)) + (should (null (ignore-errors + (process-send-string proc "echo bar") + t))) + (while (eq (process-status proc) 'connect) + (sit-for 0.1)) + (with-current-buffer "*foo*" + (process-send-string proc "echo foo") + (sleep-for 0.1) + (should (equal (buffer-string) "foo\n"))) + (delete-process server))) ;;; network-stream-tests.el ends here commit 0cc907100cbf6b730935cf5beeb943943ab518e3 Author: Lars Ingebrigtsen Date: Mon Feb 8 14:24:25 2016 +1100 Add network tests * test/lisp/net/network-stream-tests.el: New suite of network tests. diff --git a/test/lisp/net/network-stream-tests.el b/test/lisp/net/network-stream-tests.el new file mode 100644 index 0000000..3e0821a --- /dev/null +++ b/test/lisp/net/network-stream-tests.el @@ -0,0 +1,133 @@ +;;; network-stream-tests.el --- tests for network processes -*- lexical-binding: t; -*- + +;; Copyright (C) 2016 Free Software Foundation, Inc. + +;; Author: Lars Ingebrigtsen + +;; GNU Emacs 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. + +;; GNU Emacs 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 GNU Emacs. If not, see . + +;;; Commentary: + + +;;; Code: + +(ert-deftest make-local-unix-server () + (let* ((file (make-temp-name "/tmp/server-test")) + (server + (make-network-process + :name "server" + :server t + :buffer (get-buffer-create "*server*") + :noquery t + :family 'local + :service file))) + (should (equal (process-contact server :local) file)) + (delete-file (process-contact server :local)))) + +(ert-deftest make-local-tcp-server-with-unspecified-port () + (let ((server + (make-network-process + :name "server" + :server t + :noquery t + :family 'ipv4 + :service t + :host 'local))) + (should (and (arrayp (process-contact server :local)) + (numberp (aref (process-contact server :local) 4)) + (> (aref (process-contact server :local) 4) 0))) + (delete-process server))) + +(ert-deftest make-local-tcp-server-with-specified-port () + (let ((server + (make-network-process + :name "server" + :server t + :noquery t + :family 'ipv4 + :service 57869 + :host 'local))) + (should (and (arrayp (process-contact server :local)) + (= (aref (process-contact server :local) 4) 57869))) + (delete-process server))) + +(defun make-server (host) + (make-network-process + :name "server" + :server t + :noquery t + :family 'ipv4 + :coding 'raw-text-unix + :buffer (get-buffer-create "*server*") + :service t + :sentinel 'server-sentinel + :filter 'server-process-filter + :host host)) + +(defun server-sentinel (proc msg) + ) + +(defun server-process-filter (proc string) + (message "Received %s" string) + (let ((prev (process-get proc 'previous-string))) + (when prev + (setq string (concat prev string)) + (process-put proc 'previous-string nil))) + (if (and (not (string-match "\n" string)) + (> (length string) 0)) + (process-put proc 'previous-string string)) + (let ((command (split-string string))) + (cond + ((equal (car command) "echo") + (process-send-string proc (concat (cadr command) "\n"))) + (t + )))) + +(ert-deftest echo-server-with-dns () + (let* ((server (make-server "mouse")) + (port (aref (process-contact server :local) 4)) + (proc (make-network-process :name "foo" + :buffer (generate-new-buffer "*foo*") + :host (system-name) + :service port))) + (with-current-buffer "*foo*" + (process-send-string proc "echo foo") + (sleep-for 0.1) + (should (equal (buffer-string) "foo\n"))))) + +(ert-deftest echo-server-with-localhost () + (let* ((server (make-server 'local)) + (port (aref (process-contact server :local) 4)) + (proc (make-network-process :name "foo" + :buffer (generate-new-buffer "*foo*") + :host "localhost" + :service port))) + (with-current-buffer "*foo*" + (process-send-string proc "echo foo") + (sleep-for 0.1) + (should (equal (buffer-string) "foo\n"))))) + +(ert-deftest echo-server-with-ip () + (let* ((server (make-server 'local)) + (port (aref (process-contact server :local) 4)) + (proc (make-network-process :name "foo" + :buffer (generate-new-buffer "*foo*") + :host "127.0.0.1" + :service port))) + (with-current-buffer "*foo*" + (process-send-string proc "echo foo") + (sleep-for 0.1) + (should (equal (buffer-string) "foo\n"))))) + +;;; network-stream-tests.el ends here commit 357ae5dba5faac5ff48ebb971cb29500f87f02a6 Author: Foo Date: Mon Feb 8 13:28:37 2016 +1100 Allow various Gnus and Message address variables to be functions * doc/misc/gnus.texi (To From Newsgroups): gnus-ignored-from-addresses can be a function. * doc/misc/message.texi (Wide Reply): message-dont-reply-to-names can be a function. * lisp/gnus/gnus-icalendar.el (gnus-icalendar-identities): message-alternative-emails can be a function. * lisp/gnus/gnus-notifications.el (gnus-notifications): message-alternative-emails can be a function (bug#22315). * lisp/gnus/gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): gnus-ignored-from-addresses can be a function (bug#22315). diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 8dd0c1b..e6e3e76 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -5042,11 +5042,12 @@ access the @code{X-Newsreader} header: @item @vindex gnus-ignored-from-addresses -The @code{gnus-ignored-from-addresses} variable says when the @samp{%f} -summary line spec returns the @code{To}, @code{Newsreader} or -@code{From} header. If this regexp matches the contents of the -@code{From} header, the value of the @code{To} or @code{Newsreader} -headers are used instead. +The @code{gnus-ignored-from-addresses} variable says when the +@samp{%f} summary line spec returns the @code{To}, @code{Newsreader} +or @code{From} header. The variable may be a regexp or a predicate +function. If this matches the contents of the @code{From} +header, the value of the @code{To} or @code{Newsreader} headers are +used instead. To distinguish regular articles from those where the @code{From} field has been swapped, a string is prefixed to the @code{To} or diff --git a/doc/misc/message.texi b/doc/misc/message.texi index 761fb77..fa4fa43 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -185,8 +185,9 @@ but you can change the behavior to suit your needs by fiddling with the @vindex message-dont-reply-to-names Addresses that match the @code{message-dont-reply-to-names} regular -expression (or list of regular expressions) will be removed from the -@code{Cc} header. A value of @code{nil} means exclude your name only. +expression (or list of regular expressions or a predicate function) +will be removed from the @code{Cc} header. A value of @code{nil} means +exclude your name only. @vindex message-prune-recipient-rules @code{message-prune-recipient-rules} is used to prune the addresses @@ -1672,10 +1673,10 @@ trailing old subject. In this case, @item message-alternative-emails @vindex message-alternative-emails -Regexp matching alternative email addresses. The first address in the -To, Cc or From headers of the original article matching this variable is -used as the From field of outgoing messages, replacing the default From -value. +Regexp or predicate function matching alternative email addresses. +The first address in the To, Cc or From headers of the original +article matching this variable is used as the From field of outgoing +messages, replacing the default From value. For example, if you have two secondary email addresses john@@home.net and john.doe@@work.com and want to use them in the From field when diff --git a/etc/GNUS-NEWS b/etc/GNUS-NEWS index 4efb53e..c1a5bd7 100644 --- a/etc/GNUS-NEWS +++ b/etc/GNUS-NEWS @@ -9,6 +9,8 @@ For older news, see Gnus info node "New Features". * New features +** message-alternative-emails can take a function as a value. + ** nnimap can request and use the Gmail "X-GM-LABELS". ** New package `gnus-notifications.el' can send notifications when you diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 4faef06..050478b 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -702,12 +702,14 @@ only makes sense to define names or email addresses." These will be used to retrieve the RSVP information from ical events." (apply #'append - (mapcar (lambda (x) (if (listp x) x (list x))) - (list user-full-name (regexp-quote user-mail-address) - ; NOTE: these can be lists - gnus-ignored-from-addresses ; already regexp-quoted - message-alternative-emails ; - (mapcar #'regexp-quote gnus-icalendar-additional-identities))))) + (mapcar + (lambda (x) (if (listp x) x (list x))) + (list user-full-name (regexp-quote user-mail-address) + ;; NOTE: these can be lists + gnus-ignored-from-addresses ; already regexp-quoted + (unless (functionp message-alternative-emails) ; String or function. + message-alternative-emails) + (mapcar #'regexp-quote gnus-icalendar-additional-identities))))) ;; TODO: make the template customizable (defmethod gnus-icalendar-event->gnus-calendar ((event gnus-icalendar-event) &optional reply-status) diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el index 54a75b6..5a116cc 100644 --- a/lisp/gnus/gnus-notifications.el +++ b/lisp/gnus/gnus-notifications.el @@ -180,8 +180,10 @@ This is typically a function to add in ;; Ignore mails from ourselves (unless (and gnus-ignored-from-addresses address - (gnus-string-match-p gnus-ignored-from-addresses - address)) + (cond ((functionp gnus-ignored-from-addresses) + (funcall gnus-ignored-from-addresses address)) + (t (gnus-string-match-p (gnus-ignored-from-addresses) + address)))) (let* ((photo-file (gnus-notifications-get-photo-file address)) (notification-id (gnus-notifications-notify (or (car address-components) address) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index f2b2782..bc31ce9 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -1171,14 +1171,19 @@ which it may alter in any way." (not (string= user-mail-address "")) (regexp-quote user-mail-address)) "*From headers that may be suppressed in favor of To headers. -This can be a regexp or a list of regexps." +This can be a regexp, a list of regexps or a function. + +If a function, an email string is passed as the argument." :version "21.1" :group 'gnus-summary :type '(choice regexp - (repeat :tag "Regexp List" regexp))) + (repeat :tag "Regexp List" regexp) + function)) (defsubst gnus-ignored-from-addresses () - (gmm-regexp-concat gnus-ignored-from-addresses)) + (cond ((functionp gnus-ignored-from-addresses) + gnus-ignored-from-addresses) + (t (gmm-regexp-concat gnus-ignored-from-addresses)))) (defcustom gnus-summary-to-prefix "-> " "*String prefixed to the To field in the summary line when @@ -3686,15 +3691,17 @@ buffer that was in action when the last article was fetched." (defun gnus-summary-from-or-to-or-newsgroups (header gnus-tmp-from) (let ((mail-parse-charset gnus-newsgroup-charset) - (ignored-from-addresses (gnus-ignored-from-addresses)) ;; Is it really necessary to do this next part for each summary line? ;; Luckily, doesn't seem to slow things down much. (mail-parse-ignored-charsets (with-current-buffer gnus-summary-buffer gnus-newsgroup-ignored-charsets))) (or - (and ignored-from-addresses - (string-match ignored-from-addresses gnus-tmp-from) + (and gnus-ignored-from-addresses + (cond ((functionp gnus-ignored-from-addresses) + (funcall gnus-ignored-from-addresses + (mail-strip-quoted-names gnus-tmp-from))) + (t (string-match (gnus-ignored-from-addresses) gnus-tmp-from))) (let ((extra-headers (mail-header-extra header)) to newsgroups) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 77e471f..8a7ed4f 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1358,8 +1358,10 @@ If nil, you might be asked to input the charset." (defcustom message-dont-reply-to-names (and (boundp 'mail-dont-reply-to-names) mail-dont-reply-to-names) "*Addresses to prune when doing wide replies. -This can be a regexp or a list of regexps. Also, a value of nil means -exclude your own user name only." +This can be a regexp, a list of regexps or a predicate function. +Also, a value of nil means exclude your own user name only. + +If a function email is passed as the argument." :version "24.3" :group 'message :link '(custom-manual "(message)Wide Reply") @@ -1368,7 +1370,10 @@ exclude your own user name only." (repeat :tag "Regexp List" regexp))) (defsubst message-dont-reply-to-names () - (gmm-regexp-concat message-dont-reply-to-names)) + (cond ((functionp message-dont-reply-to-names) + message-dont-reply-to-names) + ((stringp message-dont-reply-to-names) + (gmm-regexp-concat message-dont-reply-to-names)))) (defvar message-shoot-gnksa-feet nil "*A list of GNKSA feet you are allowed to shoot. @@ -1694,17 +1699,20 @@ should be sent in several parts. If it is nil, the size is unlimited." (integer 1000000))) (defcustom message-alternative-emails nil - "*Regexp matching alternative email addresses. + "*Regexp or predicate function matching alternative email addresses. The first address in the To, Cc or From headers of the original article matching this variable is used as the From field of outgoing messages. +If a function, an email string is passed as the argument. + This variable has precedence over posting styles and anything that runs off `message-setup-hook'." :group 'message-headers :link '(custom-manual "(message)Message Headers") :type '(choice (const :tag "Always use primary" nil) - regexp)) + regexp + function)) (defcustom message-hierarchical-addresses nil "A list of hierarchical mail address definitions. @@ -6867,9 +6875,20 @@ want to get rid of this query permanently."))) ;; Squeeze whitespace. (while (string-match "[ \t][ \t]+" recipients) (setq recipients (replace-match " " t t recipients))) - ;; Remove addresses that match `mail-dont-reply-to-names'. - (let ((mail-dont-reply-to-names (message-dont-reply-to-names))) - (setq recipients (mail-dont-reply-to recipients))) + ;; Remove addresses that match `message-dont-reply-to-names'. + (setq recipients + (cond ((functionp message-dont-reply-to-names) + (mapconcat + 'identity + (delq nil + (mapcar (lambda (mail) + (unless (funcall message-dont-reply-to-names + (mail-strip-quoted-names mail)) + mail)) + (message-tokenize-header recipients))) + ", ")) + (t (let ((mail-dont-reply-to-names (message-dont-reply-to-names))) + (mail-dont-reply-to recipients))))) ;; Perhaps "Mail-Copies-To: never" removed the only address? (if (string-equal recipients "") (setq recipients author)) @@ -7151,7 +7170,7 @@ want to get rid of this query permanently.")) If you have added `cancel-messages' to `message-shoot-gnksa-feet', all articles are yours except those that have Cancel-Lock header not belonging to you. Instead of shooting GNKSA feet, you should modify `message-alternative-emails' -regexp to match all of yours addresses." +to match all of yours addresses." ;; Canlock-logic as suggested by Per Abrahamsen ;; ;; @@ -7183,12 +7202,14 @@ regexp to match all of yours addresses." (downcase (car (mail-header-parse-address (message-make-from)))))) ;; Email address in From field matches - ;; 'message-alternative-emails' regexp + ;; 'message-alternative-emails' regexp or function. (and from message-alternative-emails - (string-match - message-alternative-emails - (car (mail-header-parse-address from)))))))))) + (cond ((functionp message-alternative-emails) + (funcall message-alternative-emails + (mail-header-parse-address from))) + (t (string-match message-alternative-emails + (car (mail-header-parse-address from)))))))))))) ;;;###autoload (defun message-cancel-news (&optional arg) @@ -8214,16 +8235,14 @@ From headers in the original article." (require 'mail-utils) (let* ((fields '("To" "Cc" "From")) (emails - (split-string + (message-tokenize-header (mail-strip-quoted-names - (mapconcat 'message-fetch-reply-field fields ",")) - "[ \f\t\n\r\v,]+")) - email) - (while emails - (if (string-match message-alternative-emails (car emails)) - (setq email (car emails) - emails nil)) - (pop emails)) + (mapconcat 'message-fetch-reply-field fields ",")))) + (email (cond ((functionp message-alternative-emails) + (car (cl-remove-if-not message-alternative-emails emails))) + (t (loop for email in emails + if (string-match-p message-alternative-emails email) + return email))))) (unless (or (not email) (equal email user-mail-address)) (message-remove-header "From") (goto-char (point-max)) commit d0c29576099b02ba75c2458f4c3ac175d1ba9250 Author: Lars Ingebrigtsen Date: Mon Feb 8 13:12:17 2016 +1100 Fix typo in Gnus regexp * lisp/gnus/gnus-art.el (gnus-button-valid-fqdn-regexp): Fix typo in last change to this regexp (bug#22592). diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index e9c2921..f36fdd2 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -7452,7 +7452,7 @@ groups." :group 'gnus-article-buttons :type 'regexp) -(defcustom gnus-button-valid-fqdn-regexp "\\([-A-Za-z0-9]+\\.\\a)+[A-Za-z]+" +(defcustom gnus-button-valid-fqdn-regexp "\\([-A-Za-z0-9]+\\.\\)+[A-Za-z]+" "Regular expression that matches a valid FQDN." :version "25.2" :group 'gnus-article-buttons commit eb52f7015a26a5baac36430269ed2725d04ef41d Author: Paul Eggert Date: Sun Feb 7 13:33:01 2016 -0800 Port to FreeBSD x86 Reported by Herbert J. Skuhra in: http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00336.html * src/lisp.h (NONPOINTER_BITS) [__FreeBSD__]: Zero in this case too, since malloc always returns a multiple of 8 in FreeBSD. diff --git a/src/lisp.h b/src/lisp.h index c8363be..2130170 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -73,8 +73,9 @@ DEFINE_GDB_SYMBOL_END (GCTYPEBITS) 2. We know malloc returns a multiple of 8. */ #if (defined alignas \ && (defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ \ - || defined DARWIN_OS || defined __sun || defined __MINGW32__ \ - || defined CYGWIN)) + || defined CYGWIN || defined __MINGW32__ \ + || defined DARWIN_OS || defined __FreeBSD__ \ + || defined __sun)) # define NONPOINTER_BITS 0 #else # define NONPOINTER_BITS GCTYPEBITS commit 7149cc54e7e8bb2266f44221d7f4b4bed70579f3 Author: Alan Mackenzie Date: Sun Feb 7 15:06:43 2016 +0000 On leaving CC Mode, clean up by removing character properties. * lisp/progmodes/cc-mode.el (c-leave-cc-mode-mode): Remove from the buffer all instances of the text properties/extents category, syntax-table, c-is-sws, c-in-sws, c-type, and c-awk-NL-prop. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 738870b..58aebf8 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -141,7 +141,18 @@ ;; derived-mode-ex.el>. (defun c-leave-cc-mode-mode () - (setq c-buffer-is-cc-mode nil)) + (when c-buffer-is-cc-mode + (save-restriction + (widen) + (c-save-buffer-state () + (c-clear-char-properties (point-min) (point-max) 'category) + (c-clear-char-properties (point-min) (point-max) 'syntax-table) + (c-clear-char-properties (point-min) (point-max) 'c-is-sws) + (c-clear-char-properties (point-min) (point-max) 'c-in-sws) + (c-clear-char-properties (point-min) (point-max) 'c-type) + (if (c-major-mode-is 'awk-mode) + (c-clear-char-properties (point-min) (point-max) 'c-awk-NL-prop)))) + (setq c-buffer-is-cc-mode nil))) (defun c-init-language-vars-for (mode) "Initialize the language variables for one of the language modes commit 90c647b97f0e62ca8bc2fc1d27f0170136277fb7 Author: Glenn Morris Date: Sun Feb 7 06:30:00 2016 -0500 ; Auto-commit of ChangeLog files. diff --git a/ChangeLog.2 b/ChangeLog.2 index dbb56ab..58284d0 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1,3 +1,1058 @@ +2016-02-06 Lars Ingebrigtsen + + message-valid-fqdn-regexp no longer exists + + * lisp/gnus/gnus-art.el (gnus-button-valid-fqdn-regexp): Don't use + the no-longer-existing message-valid-fqdn-regexp variable. + +2016-02-06 Lars Ingebrigtsen + + Remove message-valid-fqdn-regexp, since it changes too much now + + * lisp/gnus/message.el (message-valid-fqdn-regexp): Remove. + (message-bogus-recipient-p): Don't use it any more. + (message-make-fqdn): Ditto. Suggested by Lars-Johan Liman. + +2016-02-06 Paul van der Walt + + Match "Re :" as a "Re:" prefix + + * lisp/gnus/message.el (message-subject-re-regexp): Also match + "Re :" as a "Re:" prefix (commonly used in France). + +2016-02-06 Adam Sjøgren + + lisp/net/shr.el (shr-tag-del, shr-tag-ins): New functions. + + * lisp/net/shr.el (shr-tag-del, shr-tag-ins): New functions. + +2016-02-06 David Edmondson + + src/process.c Correctly convert AF_INET6 addresses + + * src/process.c (conv_lisp_to_sockaddr): AF_INET6 addresses are + converted to a list of 16 bit quantities by + conv_sockaddr_to_lisp(). conv_lisp_to_sockaddr() should follow the + same scheme rather than expecting a (longer) list of 8 bit + quantities. + +2016-02-06 Martin Jesper Low Madsen + + Search for host/port combinations in auth-source on OS X + + * lisp/gnus/auth-source.el (auth-source-macos-keychain-search): + Search for all host/port (or protocol) combinations for a match in + the OS X keychain. + +2016-02-06 Lars Ingebrigtsen + + Remove nonsensical setting of gnus-newsgroup-unseen + + * lisp/gnus/gnus-sum.el (gnus-update-marks): Remove nonsensical + setting of gnus-newsgroup-unseen. + +2016-02-05 Lars Ingebrigtsen + + Use underline on all terminals that support it + + * lisp/subr.el (read-multiple-choice): Use + display-supports-face-attributes-p instead of + display-graphic-p to determine whether we can use underlining. + +2016-02-05 Lars Ingebrigtsen + + Make the nsm query say what it did after the user interaction + + * lisp/net/nsm.el (nsm-query): Issue a message about + aborting/accepting messages (suggested by N. Jackson) + (bug#22531). + +2016-02-05 Paul Eggert + + Omit XLI (init) == 0 optimization in make-vector + + * src/alloc.c (Fmake_vector): Simplify by omitting the (XLI (init) + == 0) case, as this optimization is probably not worth the hassle. + Just for the record, the test for that case could have been + (XLI (init) % ((EMACS_UINT) -1 / UCHAR_MAX) == 0) (!), + assuming the typical platform with no padding bits and where + conversion to int omits the most significant bits. + +2016-02-05 Paul Eggert + + * autogen.sh: Port to dash (Bug#22556). + +2016-02-05 Michael Albinus + + Minor cleanup for Tramp "doas". + + * doc/misc/tramp.texi (Inline methods): Add "doas" method. + + * etc/NEWS: Add Tramp connection method "doas". + + * lisp/net/tramp-sh.el (tramp-methods) : + Add `tramp-remote-shell-args'. + +2016-02-05 Xi Lu + + * lisp/net/tramp-sh.el (tramp-methods) : Add. (Bug#22542) + + (tramp-default-user-alist): Add rule for "doas". + (top): Completion function for "doas" is + `tramp-completion-function-alist-su'. + +2016-02-05 Lars Ingebrigtsen + + Restore the window configuration + + * lisp/net/nsm.el (nsm-query-user): Restore the window + configuration (bug#22532). + +2016-02-04 Lars Ingebrigtsen + + Use an X popup in read-multiple-choice if running from a mouse command + + * lisp/subr.el (read-multiple-choice): Use an X popup if + called from a mouse action (bug#19368). + +2016-02-04 Lars Ingebrigtsen + + Display cursor in echo area when prompting + + * lisp/subr.el (read-multiple-choice): Display the cursor in + the echo area when prompting (bug#19368). + +2016-02-04 Lars Ingebrigtsen + + Make NSM prompting clearer + + * lisp/net/nsm.el (nsm-query-user): Use read-multiple-choice + to prompt in a nicer way (bug#19368). + +2016-02-04 Lars Ingebrigtsen + + Underline read-multiple-choice-face + + * lisp/faces.el (read-multiple-choice-face): Also underline + the choice. + +2016-02-04 Lars Ingebrigtsen + + Make the read-multiple-choice prompt a bit prettier + + * doc/lispref/commands.texi (Reading One Event): Mention + read-multiple-choice-face. + + * lisp/subr.el (read-multiple-choice): Make the prompting a bit + prettier. + +2016-02-04 Paul Eggert + + Prefer memcpy and memset to doing it by hand + + * src/alloc.c (Fmake_vector): + * src/ccl.c (setup_ccl_program): + Use memset to clear array. + * src/alloc.c (Fvector, Fmake_byte_code): + * src/charset.c (Fdefine_charset_internal): + Use memcpy to copy array. + +2016-02-04 Nicolas Petton + + Do not ignore redirections of 301, 302 and 307 status codes + + The current version of HTTP/1.1 (RFC 7231) no longer requires + confirmation on 301, 302 or 307 status codes, therefore we do not have + to ignore redirects for other requests than GET and HEAD. + + * lisp/url/url-http.el (url-http-parse-headers): Do not ignore 301, 302 + and 307 redirects for other requests than GET and HEAD. + +2016-02-04 Mark Oteiza + + * lisp/net/eww.el (eww-switch-to-buffer): Use pop-to-buffer-same-window instead. + +2016-02-04 Paul Eggert + + Simplify USE_ALIGNED_ALLOC + + * src/alloc.c (USE_ALIGNED_ALLOC): Simplify, now that we’ve merged + in the emacs-25 changes. Omit no-longer-needed decl for aligned_alloc. + +2016-02-04 Eric Abrahamsen + + Honor docstring of gnus-group-get-new-news + + * lisp/gnus/gnus-start.el (gnus-get-unread-articles): If the prefix arg + is t, but non-numeric, unconditionally consider all groups to need + updating. + +2016-02-04 Lars Ingebrigtsen + + New function read-multiple-choice + + * doc/lispref/commands.texi (Reading One Event): Document + read-multiple-choice. + + * lisp/faces.el (read-multiple-choice-face): New face. + + * lisp/subr.el (read-multiple-choice): New function. + +2016-02-04 John Wiegley + + Merge from origin/emacs-25 + + ee73997 Make erc work better when encountering unknown prefix chars + b99141d Make erc completion case-insensitive again + 66c4620 Make complection in erc use consistent casing + 8c562b2 Make /QUIT in erc more robust + d93d2c5 Make tracking faces in Emacs work more reliably + af6ab7e Make shr not bug out on images on non-graphical displays + 3311f40 Fix bookmark display widths + d90ab1e Fix typo in eww-make-unique-file-name + 7f81825 Make it possible to TAB to input fields + a43a1dc Insert complete alt texts when images are disabled + 56ed4e1 Allow eww text fields to grow + 66b315c Make erc work when subword-mode is switched on + 255b68f Fix IMAP doc example + 91557f5 Quoting fixes in doc strings and diagnostics + 2c0dc9f Fix warning message in hack-local-variables + 504696d Etags: yet another improvement in Ruby tags + 8784ebf Fix x-popup-menu on TTYs without a mouse + 8b87ecb * lisp/emacs-lisp/map.el: Improvements to the docstring of the + pcase macro + 6191003 Use pop-to-buffer-same-window in eww + fe321fd * autogen.sh: Revert all recent changes. + 74ebd4a * make-dist: Updates related to nt/. + 737193a * make-dist: Add modules/. + 3696bf2 * make-dist: Update for super-special file that can't live in etc/. + a4278e2 Fix failure to compile ns-win.el in parallel builds + 860da4d Fix names of tags generated for Ruby accessors + f6213ce Fix file-name recognition in 'etags' + e42e662 Change Ruby file names and extensions recognized by 'etags' + 58bfb6a More improvements for Ruby support in 'etags' + c04e911 Add --git-config option to autogen.sh + 5713466 Fix editing undo changes in eww fields + 51362d6 Allow the user more control of popping up the eww window + ee0fbd8 Make eww-browse-url with new-window parameter work again + 9c3142d Clean up eww code slightly + cb035f3 Don't insert nil faces in shr + 4c3fae3 ; * lisp/progmodes/prolog.el: Remove some obsolete commentary. + 93f2153 Improve the custom type of some user options. + 9f60d7e Mark some risky calendar variables. + 1d07dcd Highlight two additional SCSS keywords + ee8b466 Recommend enabling integrity-checking in git + e639e10 Some corrections in Elisp manual + d766ca8 Chatter when autogen.sh changes Git configuration + 3b734e1 * org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399) + 43cb9f8 Omit unnecessary history from Lisp intro + 2fbd1da * etc/HISTORY: Add some more history, plus git tags. + c90e1b4 Improve elisp “Security Considerations” doc + cedd7ca autogen.sh now arranges for git to check hashes + 86ce76b ; Fix ChangeLog.2 commit ID. + 7b1d2b1 Fix (c & 040) typo in emergency escapes + a8273da Fix display of overlay strings with 'display' and 'box' property + fc48106 Fix imap-starttls-open + cdecbed Fix return value of imap-starttls-open + 20c7e34 ; * etc/NEWS: Fix renamed command name + 98bdbdb Correct reference to DARWIN_OS preprocessor symbol + b250d29 Spelling fix + b920a0e Spelling fixes + 93b144b Pacify GCC on C library without glibc API + +2016-02-04 John Wiegley + + Merge from origin/emacs-25 + + ea26c8a * lisp/net/browse-url.el (browse-url-default-browser): Lower + priority of non-free Chrome. + 0fac75f Improve the custom type of some user options. + 2df0e04 Highlight CSS variables with variable name face + 3cf5e81 * lisp/gnus/gnus-kill.el (gnus-winconf-kill-file): Not + user-serviceable. + 2a5233c Mark some user options that can get evalled as risky. + 39b166f Disable DebPrint in sys_read on MS-Windows + 9fd0189 ;Fix ChangeLog entry + 4bb7233 Fix typos in Introduction to Emacs Lisp manual + +2016-02-04 Vasilij Schneidermann (tiny change) + + Allow sending empty hidden values in eww + + * lisp/net/eww.el (eww-tag-input): Allow sending empty hidden + values (bug#22388). + + (cherry picked from commit 5898da8210af7953e638ddf7821c05260979c3f0) + + Backport: + +2016-02-04 David Edmondson + + Make erc work better when encountering unknown prefix chars + + * lisp/erc/erc.el (erc-channel-receive-names): Output a warning + instead of erroring out on unknown prefix chars (bug#22380). + +2016-02-04 Mark Oteiza + + Add a new command to switch between erc buffers + + * doc/misc/eww.texi: Document eww-switch-to-buffer and its keybinding + * etc/NEWS: Mention new command + * lisp/net/eww.el (eww-mode-map): Bind eww-switch-to-buffer to "s" + (eww-mode-map): Add menu item + (eww-switch-to-buffer): New command + +2016-02-04 David Edmondson + + Make erc work better when encountering unknown prefix chars + + * lisp/erc/erc.el (erc-channel-receive-names): Output a warning + instead of erroring out on unknown prefix chars (bug#22380). + +2016-02-04 Vasilij Schneidermann (tiny change) + + Allow sending empty hidden values in eww + + * lisp/net/eww.el (eww-tag-input): Allow sending empty hidden + values (bug#22388). + +2016-02-04 Lars Ingebrigtsen + + Make erc completion case-insensitive again + + * lisp/erc/erc.el (erc-completion-at-point): Make erc completion + case-insensitive again (bug#11360). + +2016-02-04 Carlos Pita (tiny change) + + Make complection in erc use consistent casing + + * lisp/erc/erc-pcomplete.el (pcomplete-erc-all-nicks): Make + case in the complection consistent (bug#18509). + +2016-02-04 Francis Litterio + + Make /QUIT in erc more robust + + * lisp/erc/erc.el (erc-kill-query-buffers): Don't bug out if we're + issuing /QUIT to disconnected servers (bug#22099). + +2016-02-04 Kevin Brubeck Unhammer (tiny change) + + Make tracking faces in Emacs work more reliably + + * lisp/erc/erc-track.el (erc-faces-in): Always return lists of + faces to avoid later ambiguity (bug#22424). + +2016-02-04 Lars Ingebrigtsen + + Make shr not bug out on images on non-graphical displays + + * lisp/net/shr.el (shr-put-image): Don't bug out on alt-less + images on non-graphical displays (bug#22327). + +2016-02-04 Andrew Hyatt + + Remove packages obsoleted before Emacs 24. + + In accordance with the policy discussed in the emacs-devel list, + packages that have been obsoleted for a full major release cycle are up + for deletion. + + This removes almost all packages that are now eligible for deletion, + with the exception of "cl-compat", which seems it is likely to still be + used, and "optional", which offers some functionality that doesn't have + a replacement yet. + +2016-02-04 Lars Ingebrigtsen + + Fix bookmark display widths + + * lisp/net/eww.el (eww-list-bookmarks): Pop to the buffer before + preparing it so that the widths are computed correctly (bug#22328). + +2016-02-04 Lars Ingebrigtsen + + Fix typo in eww-make-unique-file-name + + * lisp/net/eww.el (eww-make-unique-file-name): Make this function + actually work. + +2016-02-03 Lars Ingebrigtsen + + Make it possible to TAB to input fields + + * lisp/net/eww.el (eww-tag-input): Make it possible to TAB to + input fields (bug#22540). + +2016-02-03 Lars Ingebrigtsen + + Insert complete alt texts when images are disabled + + * lisp/net/shr.el (shr-tag-img): When images are disabled, insert + the complete alt/title string (bug#22293). + +2016-02-03 Lars Ingebrigtsen + + Allow eww text fields to grow + + * lisp/net/eww.el (eww-process-text-input): Allow text fields to + grow when typing in stuff that's longer than the original width. + +2016-02-03 Dima Kogan + + Make erc work when subword-mode is switched on + + * lisp/erc/erc-backend.el (erc-forward-word, erc-word-at-arg-p) + (erc-bounds-of-word-at-point): New functions to do word-based + things when subword-mode is switched on. + + * lisp/erc/erc-button.el (erc-button-add-nickname-buttons): Use them + (bug#17558). + +2016-02-03 Teemu Likonen + + Fix IMAP doc example + + * doc/misc/gnus.texi (Client-Side IMAP Splitting): Fix example. + +2016-02-03 Paul Eggert + + Quoting fixes in doc strings and diagnostics + + * lisp/emacs-lisp/bytecomp.el (byte-compile-setq, byte-compile-funcall): + * lisp/gnus/mml-smime.el (mml-smime-get-dns-cert) + (mml-smime-get-ldap-cert): + Follow user style preference when quoting diagnostics. + +2016-02-03 Paul Eggert + + Mention context when resume from emergency escape + + That way, if the user has been doing something else for a while, + they are reminded of the situation when restarting Emacs, + and are more likely to understand the two questions. + * doc/emacs/trouble.texi (Emergency Escape): Document this. + * src/keyboard.c (handle_interrupt): Implement this. + +2016-02-03 Noam Postavsky + + Fix warning message in hack-local-variables + + * lisp/files.el (hack-local-variables): use 'thisbuf' to reference + the original buffer name in the warning message. (Bug#21681) + +2016-02-03 Eli Zaretskii + + Etags: yet another improvement in Ruby tags + + * lib-src/etags.c (Ruby_functions): Handle continuation lines in + Ruby accessor definitions. (Bug#22241) + + * test/etags/ruby-src/test1.ru (A::B#X): Add some more tests for + accessors and multiline definitions. + * test/etags/ETAGS.good_1: + * test/etags/ETAGS.good_2: + * test/etags/ETAGS.good_3: + * test/etags/ETAGS.good_4: + * test/etags/ETAGS.good_5: + * test/etags/ETAGS.good_6: + * test/etags/CTAGS.good: Adapt to changes in Ruby tags. + +2016-02-03 Eli Zaretskii + + Fix x-popup-menu on TTYs without a mouse + + * src/menu.c (Fx_popup_menu): Be sure to initialize 'x' and 'y' + for the TTY case without a mouse. (Bug#22538) + +2016-02-03 Nicolas Petton + + * lisp/emacs-lisp/map.el: Improvements to the docstring of the pcase macro + +2016-02-03 Paul Eggert + + Port aligned_alloc decl to Cygwin. + + Problem reported by Ken Brown (Bug#22522#38). + * configure.ac (aligned_alloc): Check for decl too. + * src/lisp.h (aligned_alloc): Declare if not already declared. + +2016-02-03 Paul Eggert + + autogen.sh now configures git only on request + + * autogen.sh (do_autoconf, do_git): New vars. + Support new arguments --help, all, autoconf, git. + By default, just do autoconf-related configuration, not git. + Prefer 'echo' to 'cat < + + Use pop-to-buffer-same-window in eww + + * lisp/net/eww.el: pop-to-buffer-same-window throughout instead of + switch-to-buffer (bug#22244). + +2016-02-02 Paul Eggert + + * autogen.sh: Revert all recent changes. + +2016-02-02 Paul Eggert + + Build with C11 if available + + * admin/merge-gnulib (GNULIB_MODULES): Add std-gnu11. + * m4/std-gnu11.m4: New file, from gnulib. + * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. + +2016-02-02 Paul Eggert + + Update gnulib copy + + * doc/misc/texinfo.tex: Copy from gnulib. + +2016-02-02 Glenn Morris + + * make-dist: Updates related to nt/. + + * make-dist: Add modules/. + + * make-dist: Update for super-special file that can't live in etc/. + +2016-02-02 Eli Zaretskii + + Fix failure to compile ns-win.el in parallel builds + + * src/Makefile.in ($(lispsource)/term/ns-win.elc): Add order-only + dependency on $(lispsource)/international/charprop.el. + (Bug#22501) + +2016-02-02 Eli Zaretskii + + Fix names of tags generated for Ruby accessors + + * lib-src/etags.c (Ruby_functions): Don't include the leading + colon ':' in tags for Ruby accessors and aliases. (Bug#22241) + + * test/etags/ETAGS.good_1: + * test/etags/ETAGS.good_2: + * test/etags/ETAGS.good_3: + * test/etags/ETAGS.good_4: + * test/etags/ETAGS.good_5: + * test/etags/ETAGS.good_6: + * test/etags/CTAGS.good: Adapt to changes in Ruby tags. + +2016-02-02 Glenn Morris + + * lisp/vc/add-log.el (change-log-directory-files, find-change-log): + Doc tweaks. + +2016-02-02 Eli Zaretskii + + Fix file-name recognition in 'etags' + + * lib-src/etags.c (get_language_from_filename): If FILE includes a + leading directory, compare only its basename to the known file + names in lang_names[]. + + * test/etags/Makefile (RBSRC): Adapt to recent test1.ruby + renaming. + * test/etags/ETAGS.good_1: + * test/etags/ETAGS.good_2: + * test/etags/ETAGS.good_3: + * test/etags/ETAGS.good_4: + * test/etags/ETAGS.good_5: + * test/etags/ETAGS.good_6: + * test/etags/CTAGS.good: Adapt to changes in Ruby file names and + to the results in Makefile due to the above etags.c fix. + +2016-02-02 Eli Zaretskii + + Change Ruby file names and extensions recognized by 'etags' + + * lib-src/etags.c : New variable, holds names + of Ruby files. + : Treat .rb, .ru, and .rbw as Ruby extensions. + : Add Ruby_filenames to the Ruby entry. + * test/etags/ruby-src/test1.ru: Renamed from test1.ruby. + (Bug#22241) + +2016-02-02 Paul Eggert + + Port better to platforms lacking aligned_alloc + + Problem reported by Ken Brown (Bug#22522). + * src/lisp.h (hybrid_aligned_alloc) + [HYBRID_MALLOC && !HAVE_ALIGNED_ALLOC]: New decl. + +2016-02-02 Paul Eggert + + Port malloc.h hygiene fix to LTO + + * src/alloc.c (__malloc_initialize_hook): + Make it externally visible (Bug#22522). + +2016-02-02 Eli Zaretskii + + More improvements for Ruby support in 'etags' + + * lib-src/etags.c (Ruby_functions): Tag Ruby accessors and + alias_method. Identify constants even if the assignment is not + followed by whitespace. (Bug#22241) + + * test/etags/ruby-src/test1.ruby: Add tests for constants, + accessors, and alias_method. + * test/etags/ETAGS.good_1: + * test/etags/ETAGS.good_2: + * test/etags/ETAGS.good_3: + * test/etags/ETAGS.good_4: + * test/etags/ETAGS.good_5: + * test/etags/ETAGS.good_6: + * test/etags/CTAGS.good: Adapt to changes in Ruby tests. + +2016-02-02 Paul Eggert + + Add --git-config option to autogen.sh + + * autogen.sh: New options --git-config, --help. + (git_config): New shell var. Alter function to respect this var. + +2016-02-02 Lars Ingebrigtsen + + Fix editing undo changes in eww fields + + * eww.el (eww-tag-form): Don't overwrite initial form data in text + fields. + (eww-process-text-input): Make `M-t' at the end of text fields work + better (bug#19085). + +2016-02-01 Lars Ingebrigtsen + + Allow the user more control of popping up the eww window + + * eww.el (eww): Use pop-to-buffer-same-window (suggested by + Michael Heerdegen) (bug#22244). + +2016-02-01 Lars Ingebrigtsen + + Make eww-browse-url with new-window parameter work again + + * eww.el (eww-browse-url): Stay in the same buffer if we're + already in a eww mode buffer so that eww-browse-url with a + new-window parameter works (bug#22244). + +2016-02-01 Lars Ingebrigtsen + + Clean up eww code slightly + + * eww.el (eww-browse-url): Clean up code slightly. + +2016-02-01 Lars Ingebrigtsen + + Don't insert nil faces in shr + + * shr.el (shr-insert-table): Don't add nil faces, because that + will show up in *Messages* as "Invalid face reference: nil [32 + times]". + +2016-02-01 Glenn Morris + + Make find-change-log prefer a VCS root, if no ChangeLog exists. + + * lisp/vc/add-log.el (change-log-directory-files): New option. + (find-change-log): Respect change-log-directory-files. + * doc/emacs/maintaining.texi (Change Log Commands): + Mention change-log-directory-files. + +2016-02-01 Glenn Morris + + Improve the custom type of some user options. + + * lisp/autoinsert.el (auto-insert-alist): + * lisp/replace.el (query-replace-from-to-separator): + * lisp/gnus/gnus-art.el (gnus-hidden-properties): + * lisp/gnus/gnus-gravatar.el (gnus-gravatar-properties): + * lisp/gnus/gnus-picon.el (gnus-picon-properties): + * lisp/progmodes/prolog.el (prolog-keywords, prolog-types) + (prolog-mode-specificators, prolog-determinism-specificators) + (prolog-directives, prolog-program-name, prolog-program-switches) + (prolog-consult-string, prolog-compile-string, prolog-eof-string) + (prolog-prompt-regexp): Improve custom type. + +2016-02-01 Glenn Morris + + Mark some risky calendar variables. + + * lisp/calendar/cal-china.el (chinese-calendar-time-zone): + Remove risky setting for deleted obsolete alias. + (calendar-chinese-standard-time-zone-name) + (calendar-chinese-daylight-saving-start) + (calendar-chinese-daylight-saving-end): + * lisp/calendar/calendar.el (calendar-iso-date-display-form) + (calendar-european-date-display-form) + (calendar-american-date-display-form, calendar-date-display-form): + * lisp/calendar/diary-lib.el (diary-remind-message) + (diary-header-line-format): + * lisp/calendar/solar.el (calendar-time-display-form) + (calendar-location-name): Mark as risky. + +2016-02-01 Simen Heggestøyl + + Highlight two additional SCSS keywords + + * lisp/textmodes/css-mode.el (css-bang-ids): New defconst holding CSS + identifiers on the form !foo. + (scss-bang-ids): New defconst holding SCSS identifiers on the form + !foo. + (css--font-lock-keywords): Highlight the new SCSS bang identifiers in + `font-lock-builtin-face'. + + * test/indent/css-mode.css: Add bang rule test case. + + * test/indent/scss-mode.css: Add test cases for the introduced bang + rules. + +2016-02-01 Karl Fogel + + Recommend enabling integrity-checking in git + + * admin/notes/git-workflow: Recommend setting transfer.fsckObjects. + + This is related to the autogen.sh changes made by Paul Eggert in + commit d766ca8f (2016-02-01) and commit cedd7cad (2016-02-01), and to + my edits today to http://www.emacswiki.org/emacs/GitForEmacsDevs and + to emacswiki.org/emacs/GitQuickStartForEmacsDevs. See also the thread + "Recommend these .gitconfig settings for git integrity." at + https://lists.gnu.org/archive/html/emacs-devel/2016-01/threads.html#01802. + +2016-02-01 Martin Rudalics + + Some corrections in Elisp manual + + * doc/lispref/buffers.texi (Read Only Buffers): Describe optional + argument POSITION. + * doc/lispref/debugging.texi (Error Debugging): `debug-on-signal' + is an option. + * doc/lispref/display.texi (Refresh Screen): Describe optional + argument FRAME of `redraw-frame'. + (Attribute Functions): Describe optional argument CHARACTER of + `face-font'. + (Defining Images): `image-load-path' is an option. + (Beeping): `ring-bell-function' is an option. + * doc/lispref/frames.texi (Size and Position): The PIXELWISE + argument of `set-frame-size' is optional. + (Raising and Lowering): The TERMINAL argument of `tty-top-frame' + is optional. + * doc/lispref/keymaps.texi (Controlling Active Maps): Fix doc of + `set-transient-map'. + * doc/lispref/minibuf.texi (Text from Minibuffer): + `read-regexp-defaults-function' is an option. + (Minibuffer Contents): `delete-minibuffer-contents' is a command. + * doc/lispref/modes.texi (Mode Line Variables): + `mode-line-position' and `mode-line-modes' are variables, not + options. + * doc/lispref/strings.texi (Creating Strings): The START argument + of `substring' is optional. + * doc/lispref/text.texi (Buffer Contents): Describe optional + argument NO-PROPERTIES of `thing-at-point'. + (User-Level Deletion): Both arguments of + `delete-trailing-whitespace' are optional. + (Margins): Use @key{RET} instead of @kbd{RET}. + * doc/lispref/windows.texi (Display Action Functions): Write + non-@code{nil} instead of non-nil. + (Choosing Window Options): The WINDOW arg of + `split-window-sensibly' is optional. + (Choosing Window Options): Write non-@code{nil} instead of + non-nil. + (Window Start and End): Both args of `window-group-end' are + optional. + + * src/buffer.c (Fbarf_if_buffer_read_only): Rename argument POS + to POSITION to keep consisteny with doc-string. + +2016-02-01 Paul Eggert + + Double static heap size. + + * src/sheap.h (STATIC_HEAP_SIZE): Double it, since it was too + small on FreeBSD (Bug#22086). + +2016-02-01 Paul Eggert + + Chatter when autogen.sh changes Git configuration + + * autogen.sh (git_config): New function. Use it instead of ‘git config’. + +2016-02-01 Kyle Meyer + + * org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399) + +2016-02-01 Michael Albinus + + Fix Bug#20821 + + * lisp/net/tramp.el (tramp-file-name-handler): + * lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name): + Use `tramp-drop-volume-letter'. (Bug#20821) + +2016-01-31 Paul Eggert + + Omit unnecessary history from Lisp intro + + * doc/lispintro/emacs-lisp-intro.texi (Review, Digression into C) + (Conclusion): Reword so as not to talk about earlier versions + of Emacs in what should be an intro. + +2016-01-31 Paul Eggert + + * etc/HISTORY: Add some more history, plus git tags. + +2016-01-31 Paul Eggert + + Improve elisp “Security Considerations” doc + + * doc/lispref/os.texi (Security Considerations): + Mention call-process and rename-file as opposed to shell commands. + Add some more cross-references. + +2016-01-31 Paul Eggert + + autogen.sh now arranges for git to check hashes + + Suggested by Karl Fogel in: + http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01802.html + * autogen.sh: Do "git config transfer.fsckObjects true". + +2016-01-31 Dave Barker + + Add ability to give rcirc servers an alias name + + * lisp/net/rcirc.el (rcirc-server-alist): Add :server-alias + customization option. + (rcirc, rcirc-connect): Take server alias into account. + +2016-01-31 Paul Eggert + + Fix (c & 040) typo in emergency escapes + + * src/keyboard.c (handle_interrupt): Fix recently-introduced + typo (040 should have been ~040) that silently suppressed + auto-saves after emergency escapes. Redo comparison to avoid + similar problems. + +2016-01-31 Paul Eggert + + Port new hybrid malloc to FreeBSD + + Problem reported by Wolfgang Jenkner in: http://bugs.gnu.org/22086#118 + * src/gmalloc.c (__malloc_initialize_hook, __after_morecore_hook) + (__morecore) [HYBRID_MALLOC]: Define in this case too. + +2016-01-31 Wolfgang Jenkner + + * configure.ac: Stop using mmap for buffers for FreeBSD. + +2016-01-31 Eli Zaretskii + + Fix display of overlay strings with 'display' and 'box' property + + * src/xdisp.c (get_next_display_element): Take the box face from + display stack level that comes from a buffer, not an overlay + string. (Bug#22499) + +2016-01-31 Andreas Schwab + + Fix imap-starttls-open + + * lisp/net/imap.el (imap-starttls-open): Log imap process + output. Call imap-parse-greeting. (Bug#22500) + +2016-01-31 Michael Albinus + + Merge changes from Tramp repository + + * doc/misc/Makefile.in (${buildinfodir}/tramp.info tramp.html): + No EXTRA_OPTS needed. + + * doc/misc/tramp.texi: Merge changes from Emacsemacs-25 + branch, especially for @trampfn{}. + (Top): Move @ifnottex down. + (History): XEmacs support has been removed. + (GVFS based methods, Remote processes): Do not use emacsgvfs flag. + (Auto-save and Backup): Use both syntax versions. + (File name Syntax): Remark on IPv6 adresses is valid for + unified syntax only. + + * doc/misc/trampver.texi: Do not set emacsgvfs flag. + +2016-01-31 Andreas Schwab + + Fix return value of imap-starttls-open + + * lisp/net/imap.el (imap-starttls-open): Fix return value. + +2016-01-31 John Wiegley + + Correct reference to DARWIN_OS preprocessor symbol + + * src/alloc.c: Correct a preprocessor reference to DARWIN_OS, which may + not be defined. + +2016-01-30 Paul Eggert + + Spelling fixes + + Spelling fix + + Spelling fixes + +2016-01-30 Glenn Morris + + * lisp/vc/add-log.el (find-change-log): Use locate-dominating-file. + +2016-01-30 Matthew Carter + + Quote table names for postgres listings (sql-mode) + + * lisp/progmodes/sql.el (sql-postgres-completion-object): Avoid passing + unquoted table names to the completion list. + +2016-01-30 Glenn Morris + + Change Smerge "Mine" and "Other" for "Upper" and "Lower. (Bug#20878) + + * lisp/vc/smerge-mode.el (smerge-diff-switches) + (smerge-context-menu, smerge-match-conflict, smerge-swap): Doc fixes. + (smerge-upper, smerge-upper-face, smerge-keep-upper) + (smerge-diff-base-upper): Rename from smerge-mine, smerge-mine-face, + smerge-keep-mine, smerge-diff-base-mine. Update all uses. + (smerge-mine-face, smerge-other-face): Remove obsolete face aliases. + (smerge-lower, smerge-lower-face, smerge-lower-re, smerge-keep-lower) + (smerge-diff-base-lower): Rename from smerge-other, smerge-other-face, + smerge-other-re, smerge-keep-other, smerge-diff-base-lower. + Update all uses. + (smerge-basic-map): Add "l" and "u" bindings. + (smerge-mode-menu): Update menu bindings for renaming. + (smerge-font-lock-keywords): Update face names. + (smerge-match-names): Update names. + (smerge-diff-upper-lower): Rename from smerge-diff-mine-other. + (smerge-match-conflict, smerge-ediff): Rename local variables. + (smerge-makeup-conflict): Relabel markers. + (smerge-parsep-re): Use renamed variables. + +2016-01-30 Paul Eggert + + Port recent my_edata change to MS-Windows + + * src/lastfile.c (my_edata): Also define if WINDOWSNT. + +2016-01-30 Paul Eggert + + Pacify GCC on C library without glibc API + + Without this change, with --enable-gcc-warnings GCC would complain + “error: redundant redeclaration of ‘aligned_alloc’”. + * configure.ac: Simplify aligned_alloc testing. + * src/alloc.c (aligned_alloc): Don’t use if DARWIN_OS, + since the simplified configure.ac no longer checks for that. + Don’t declare if HAVE_ALIGNED_ALLOC. + Correct misspelling of HAVE_ALIGNED_ALLOC in ifdef. + +2016-01-30 Paul Eggert + + Tell Automake the new lib/Makefile.am is OK + + * lib/Makefile.am (AUTOMAKE_OPTIONS): Add -Wno-portability. + +2016-01-30 Paul Eggert + + Make it easy to override preferred-branch test + + * Makefile.in (preferred-branch-is-current): + Rename from emacs-25-branch-is-current. All uses changed. + (PREFERRED_BRANCH): New macro. + +2016-01-30 Glenn Morris + + * lisp/net/browse-url.el (browse-url-default-browser): + Lower priority of non-free Chrome. + +2016-01-30 Glenn Morris + + Improve the custom type of some user options. + + * lisp/desktop.el (desktop-minor-mode-table): + * lisp/man.el (Man-frame-parameters): + * lisp/midnight.el (midnight-delay): + * lisp/speedbar.el (speedbar-select-frame-method): + * lisp/tooltip.el (tooltip-frame-parameters): + * lisp/tree-widget.el (tree-widget-space-width): + * lisp/type-break.el (type-break-keystroke-threshold): + * lisp/woman.el (woman-imenu-generic-expression): + * lisp/cedet/ede.el (ede-debug-program-function): + * lisp/cedet/ede/project-am.el (project-am-debug-target-function): + * lisp/emulation/viper-keym.el (viper-toggle-key): + * lisp/erc/erc-networks.el (erc-server-alist): + * lisp/gnus/message.el (message-deletable-headers, message-signature): + * lisp/mail/mailalias.el (mail-directory-stream): + * lisp/play/tetris.el (tetris-x-colors): + * lisp/progmodes/gud.el (gud-tooltip-modes): Improve custom type. + +2016-01-30 Simen Heggestøyl + + Highlight CSS variables with variable name face + + * lisp/textmodes/css-mode.el (css-nmstart-re): Don't match variables. + (css--font-lock-keywords): Highlight variables in + `font-lock-variable-name-face'. + +2016-01-30 Glenn Morris + + * lisp/gnus/gnus-kill.el (gnus-winconf-kill-file): Not user-serviceable. + +2016-01-30 Glenn Morris + + Mark some user options that can get evalled as risky. + + * lisp/allout.el (allout-title): + * lisp/emacs-lisp/edebug.el (edebug-global-break-condition): + * lisp/gnus/message.el (message-mailer-swallows-blank-line): + * lisp/progmodes/gud.el (gud-tooltip-display): + * lisp/vc/ediff-mult.el (ediff-default-filtering-regexp): + Mark as risky. + +2016-01-30 Eli Zaretskii + + Disable DebPrint in sys_read on MS-Windows + + * src/w32.c (sys_read): Disable a debugging print that is normal + when non-blocking reads are retried. + +2016-01-30 Martin Rudalics + + ;Fix ChangeLog entry + +2016-01-30 Eli Zaretskii + + Fix typos in Introduction to Emacs Lisp manual + + * doc/lispintro/emacs-lisp-intro.texi (Emacs Initialization) + (kill-new function, Digression into C) + (Complete forward-sentence, Divide and Conquer, Find a File) + (lengths-list-many-files, Columns of a graph, defcustom) + (recursive-count-words): Fix typos. Reported by Daniel Bastos + . + 2016-01-30 Paul Eggert Shrink static heap a bit @@ -28564,7 +29619,7 @@ This file records repository revisions from commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to 2016-02-04b6d89ff9288a49099f041752908b5eb9613e (inclusive). -commit ffbf163ab5ced1bc464a0034e6abc9a41f5e09c4 (inclusive). +commit 3a2b6aa33109dc40b2c1bcc621a624d38fe814fc (inclusive). See ChangeLog.1 for earlier changes. ;; Local Variables: