+2011-08-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mail/smtpmail.el (auth-source): Require to avoid problems with
+ binding variables (bug#9298). Also clean up some unused
+ autoloads.
+
+ * net/network-stream.el (network-stream-open-starttls): Support
+ using starttls.el without using gnutls-cli.
+
+2011-08-17 Juri Linkov <juri@jurta.org>
+
+ * progmodes/grep.el (rgrep): Handle the case when
+ `grep-find-command' is a cons cell (bug#9278).
+
+2011-08-17 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (display-buffer-pop-up-frame): Run frame creation
+ function with BUFFER current (as special-display-popup-frame
+ does). Reported by Drew Adams.
+
+2011-08-17 Daiki Ueno <ueno@unixuser.org>
+
+ * epa-mail.el: Simplify GnuPG group expansion using
+ epg-expand-group.
+ (epa-mail-group-alist, epa-mail-group-modtime)
+ (epa-mail-gnupg-conf-file, epa-mail-parse-groups)
+ (epa-mail-sync-groups, epa-mail-expand-recipient-1)
+ (epa-mail-expand-recipients-2, epa-mail-expand-recipients):
+ Remove.
+
+2011-08-16 Feng Li <fengli@gmail.com> (tiny change)
+
+ * calc/calc-ext.el (math-defintegral-2): Remove nested backquote.
+
+2011-08-16 Alan Mackenzie <acm@muc.de>
+
+ * progmodes/cc-engine.el (c-state-cache-non-literal-place):
+ Correct, to avoid the inside of macros.
+
2011-08-16 Richard Stallman <rms@gnu.org>
* epa-mail.el: Handle GnuPG group definitions.
(cons 'progn
(mapcar #'(lambda (func)
`(put ',func 'math-integral-2
- `(nconc
+ (nconc
(get ',func 'math-integral-2)
(list #'(lambda (u v) ,@code)))))
(if (symbolp funcs) (list funcs) funcs))))
"A minor-mode for composing encrypted/clearsigned mails."
nil " epa-mail" epa-mail-mode-map)
-;;; ??? Could someone please clarify this doc string?
-;;; In particular, what does USAGE look like
-;;; and what does it mean? -- rms
(defun epa-mail--find-usable-key (keys usage)
- "Find a usable key from KEYS for USAGE."
+ "Find a usable key from KEYS for USAGE.
+USAGE would be `sign' or `encrypt'."
(catch 'found
(while keys
(let ((pointer (epg-key-sub-key-list (car keys))))
(setq pointer (cdr pointer))))
(setq keys (cdr keys)))))
-(defvar epa-mail-group-alist nil
- "Alist of GnuPG mail groups (`group' commands in `.gnupg/gpg.conf').
-Each element has the form (GROUPNAME ADDRESSES...).
-t means the list is not yet read in.")
-
-(defvar epa-mail-group-modtime nil
- "The modification time of `~/.gnupg/gpg.conf' file when last examined.")
-
-(defvar epa-mail-gnupg-conf-file "~/.gnupg/gpg.conf"
- "File name of GnuPG configuration file that specifies recipient groups.")
-
-(defun epa-mail-parse-groups ()
- "Parse `~/.gnupg/gpg.conf' and set `epa-mail-group-alist' from it."
- (let (aliases)
- (with-temp-buffer
- (insert-file-contents-literally epa-mail-gnupg-conf-file)
-
- (while (re-search-forward "^[ \t]*group[ \t]*" nil t)
- (if (looking-at "\\([^= \t]+\\)[ \t]*=[ \t]*\\([^ \t\n]+\\)")
- (push (cons (match-string-no-properties 1)
- (split-string (match-string-no-properties 2)))
- aliases))))
- (setq epa-mail-group-alist aliases)))
-
-(defun epa-mail-sync-groups ()
- "Update GnuPG groups from file if necessary."
- (if (file-exists-p epa-mail-gnupg-conf-file)
- (let ((modtime (nth 5 (file-attributes epa-mail-gnupg-conf-file))))
- (if (not (equal epa-mail-group-modtime modtime))
- (progn
- (setq epa-mail-group-modtime modtime)
- (epa-mail-parse-groups))))
- (setq epa-mail-group-alist nil)))
-
-(defun epa-mail-expand-recipient-1 (recipient)
- "Expand RECIPIENT once thru `epa-mail-group-alist'.
-Returns the list of names it stands for, or nil if it isn't a group."
- ;; Load the alias list if not loaded before.
- (let (alist-elt)
- (setq alist-elt (assoc recipient epa-mail-group-alist))
- (cdr alist-elt)))
-
-(defun epa-mail-expand-recipients-2 (recipients)
- "Expand list RECIPIENTS once thru `epa-mail-group-alist'.
-Returns the list of names they stand for."
- ;; Load the alias list if not loaded before.
- (let (output)
- (dolist (r recipients)
- (let ((expanded (epa-mail-expand-recipient-1 r)))
- (if expanded
- (dolist (xr expanded)
- (unless (member xr output)
- (push xr output)))
- (unless (member r output)
- (push r output)))))
- (nreverse output)))
-
-(defun epa-mail-expand-recipients (recipients)
- "Expand RECIPIENTS thru `epa-mail-group-alist' until it stops changing."
- (epa-mail-sync-groups)
- (while (not (equal recipients
- (setq recipients
- (epa-mail-expand-recipients-2 recipients)))))
- recipients)
-
;;;###autoload
(defun epa-mail-decrypt ()
"Decrypt OpenPGP armors in the current buffer.
(interactive
(save-excursion
(let ((verbose current-prefix-arg)
+ (config (epg-configuration))
(context (epg-make-context epa-protocol))
recipients-string recipients recipient-key sign)
(goto-char (point-min))
;; Process all the recipients thru the list of GnuPG groups.
;; Expand GnuPG group names to what they stand for.
- ;; The code below, and elsewhere, that checks that names have keys
- ;; does not know about these group names.
- (setq recipients (epa-mail-expand-recipients recipients))
+ (setq recipients
+ (apply #'nconc
+ (mapcar
+ (lambda (recipient)
+ (or (epg-expand-group config recipient)
+ (list recipient)))
+ recipients)))
(goto-char (point-min))
(if (search-forward mail-header-separator nil t)
+2011-08-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * message.el (message-is-yours-p): Allow disabling canlock checking
+ (bug#9295).
+ (message-shoot-gnksa-feet): Add `canlock-verify'.
+ (message-auto-save-directory): Use ~/ as the auto-save directory if the
+ message directory isn't writable (bug#9304).
+
+ * auth-source.el (auth-source-netrc-saver): Make the .authinfo file
+ non-world-readable.
+
+2011-08-17 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nndraft.el (nndraft-update-unread-articles): Don't send delayed
+ articles.
+
2011-08-13 Andreas Schwab <schwab@linux-m68k.org>
* gnus-score.el (gnus-all-score-files): Use copy-sequence instead of
(insert "\n"))
(insert add "\n")
(write-region (point-min) (point-max) file nil 'silent)
+ ;; Make the .authinfo file non-world-readable.
+ (set-file-modes file #o600)
(auth-source-do-debug
"auth-source-netrc-create: wrote 1 new line to %s"
file)
:type '(repeat function))
(defcustom message-auto-save-directory
- (if (file-exists-p message-directory)
+ (if (file-writable-p message-directory)
(file-name-as-directory (expand-file-name "drafts" message-directory))
"~/")
"*Directory where Message auto-saves buffers if Gnus isn't running.
`quoted-text-only' Allow you to post quoted text only;
`multiple-copies' Allow you to post multiple copies;
`cancel-messages' Allow you to cancel or supersede messages from
- your other email addresses.")
+ your other email addresses;
+`canlock-verify' Allow you to cancel messages without verifying canlock.")
(defsubst message-gnksa-enable-p (feature)
(or (not (listp message-shoot-gnksa-feet))
(save-excursion
(save-restriction
(message-narrow-to-head-1)
- (if (message-fetch-field "Cancel-Lock")
+ (if (and (message-fetch-field "Cancel-Lock")
+ (message-gnksa-enable-p 'canlock-verify))
(if (null (canlock-verify))
t
(error "Failed to verify Cancel-lock: This article is not yours"))
(list 'nndraft "")))
(nnmail-get-active)))
(gnus-group-marked (copy-sequence groups))
+ ;; Don't send delayed articles.
+ (gnus-get-new-news-hook nil)
(inhibit-read-only t))
(gnus-group-get-new-news-this-group nil t)
(dolist (group groups)
;;; Code:
(require 'sendmail)
+(require 'auth-source)
(autoload 'mail-strip-quoted-names "mail-utils")
(autoload 'message-make-date "message")
(autoload 'message-make-message-id "message")
(autoload 'rfc2104-hash "rfc2104")
-(autoload 'netrc-parse "netrc")
-(autoload 'netrc-machine "netrc")
-(autoload 'netrc-get "netrc")
(autoload 'password-read "password-cache")
-(autoload 'auth-source-search "auth-source")
;;;
(defgroup smtpmail nil
(unless builtin-starttls
(delete-process stream)
(setq start (with-current-buffer buffer (point-max)))
- (let* ((starttls-use-gnutls t)
- (starttls-extra-arguments
+ (let* ((starttls-extra-arguments
(if require-tls
starttls-extra-arguments
;; For opportunistic TLS upgrades, we don't really
;; care about the identity of the peer.
(cons "--insecure" starttls-extra-arguments)))
+ (starttls-extra-args starttls-extra-args)
(cert (network-stream-certificate host service parameters)))
;; There are client certificates requested, so add them to
;; the command line.
(setq starttls-extra-arguments
(nconc (list "--x509keyfile" (expand-file-name (nth 0 cert))
"--x509certfile" (expand-file-name (nth 1 cert)))
- starttls-extra-arguments)))
+ starttls-extra-arguments)
+ starttls-extra-args
+ (nconc (list "--key-file" (expand-file-name (nth 0 cert))
+ "--cert-file" (expand-file-name (nth 1 cert)))
+ starttls-extra-args)))
(setq stream (starttls-open-stream name buffer host service)))
(network-stream-get-response stream start eoc)
;; Requery capabilities for protocols that require it; i.e.,
pos))
(defsubst c-state-cache-non-literal-place (pos state)
- ;; Return a position outside of a string/comment at or before POS.
+ ;; Return a position outside of a string/comment/macro at or before POS.
;; STATE is the parse-partial-sexp state at POS.
- (if (or (nth 3 state) ; in a string?
- (nth 4 state)) ; in a comment?
- (nth 8 state)
- pos))
-
+ (let ((res (if (or (nth 3 state) ; in a string?
+ (nth 4 state)) ; in a comment?
+ (nth 8 state)
+ pos)))
+ (save-excursion
+ (goto-char res)
+ (if (c-beginning-of-macro)
+ (point)
+ res))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Stuff to do with point-min, and coping with any literal there.
(unless (and dir (file-directory-p dir) (file-readable-p dir))
(setq dir default-directory))
(if (null files)
- (if (not (string= regexp grep-find-command))
+ (if (not (string= regexp (if (consp grep-find-command)
+ (car grep-find-command)
+ grep-find-command)))
(compilation-start regexp 'grep-mode))
(setq dir (file-name-as-directory (expand-file-name dir)))
(require 'find-dired) ; for `find-name-arg'
(when (symbolp function)
(cdr (assq 'pop-up-frame-alist specifiers))))
(frame
- (if (symbolp function)
- (funcall function parameters)
- (funcall function))))
+ (with-current-buffer buffer
+ (if (symbolp function)
+ (funcall function parameters)
+ (funcall function)))))
(when frame
(let ((window (frame-selected-window frame)))
(set-window-parameter
-2011-08-16 Paul Eggert <eggert@cs.ucla.edu>
+2011-08-18 Paul Eggert <eggert@cs.ucla.edu>
Integer and memory overflow issues (Bug#9196).
(gs_load): Use printmax_t to print the widest integers possible.
Check for integer overflow when computing image height and width.
+2011-08-17 Chong Yidong <cyd@stupidchicken.com>
+
+ * eval.c (internal_condition_case, internal_condition_case_1)
+ (internal_condition_case_2, internal_condition_case_n): Remove
+ unnecessary aborts (Bug#9081).
+
+2011-08-17 Eli Zaretskii <eliz@gnu.org>
+
+ * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
+ has no `load' handler, try opening the file locally. (Bug#9311)
+
+2011-08-16 Ken Brown <kbrown@cornell.edu>
+
+ * gmalloc.c: Expand comment.
+
2011-08-16 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (set_cursor_from_row): Don't accept a previous candidate
2011-08-14 Kenichi Handa <handa@m17n.org>
* process.c (create_process): Call setup_process_coding_systems
- after the pid of the process is set to -1.
+ after the pid of the process is set to -1 (Bug#8162).
2011-08-14 Eli Zaretskii <eliz@gnu.org>
struct catchtag c;
struct handler h;
- /* Since Fsignal will close off all calls to x_catch_errors,
- we will get the wrong results if some are not closed now. */
-#if HAVE_X_WINDOWS
- if (x_catching_errors ())
- abort ();
-#endif
-
c.tag = Qnil;
c.val = Qnil;
c.backlist = backtrace_list;
struct catchtag c;
struct handler h;
- /* Since Fsignal will close off all calls to x_catch_errors,
- we will get the wrong results if some are not closed now. */
-#if HAVE_X_WINDOWS
- if (x_catching_errors ())
- abort ();
-#endif
-
c.tag = Qnil;
c.val = Qnil;
c.backlist = backtrace_list;
struct catchtag c;
struct handler h;
- /* Since Fsignal will close off all calls to x_catch_errors,
- we will get the wrong results if some are not closed now. */
-#if HAVE_X_WINDOWS
- if (x_catching_errors ())
- abort ();
-#endif
-
c.tag = Qnil;
c.val = Qnil;
c.backlist = backtrace_list;
struct catchtag c;
struct handler h;
- /* Since Fsignal will close off all calls to x_catch_errors,
- we will get the wrong results if some are not closed now. */
-#if HAVE_X_WINDOWS
- if (x_catching_errors ())
- abort ();
-#endif
-
c.tag = Qnil;
c.val = Qnil;
c.backlist = backtrace_list;
emacs uses the Cygwin heap (managed with sbrk). When emacs starts
on Cygwin, it reinitializes malloc, and we save the old info for
use by free and realloc if they're called with a pointer into the
- static heap. */
+ static heap.
+
+ Currently (2011-08-16) the Cygwin build doesn't use ralloc.c; if
+ this is changed in the future, we'll have to similarly deal with
+ reinitializing ralloc. */
#ifdef CYGWIN
extern __ptr_t bss_sbrk PP ((ptrdiff_t __size));
extern int bss_sbrk_did_unexec;
handler = Ffind_file_name_handler (found, Qload);
if (! NILP (handler))
return call5 (handler, Qload, found, noerror, nomessage, Qt);
+#ifdef DOS_NT
+ /* Tramp has to deal with semi-broken packages that prepend
+ drive letters to remote files. For that reason, Tramp
+ catches file operations that test for file existence, which
+ makes openp think X:/foo.elc files are remote. However,
+ Tramp does not catch `load' operations for such files, so we
+ end up with a nil as the `load' handler above. If we would
+ continue with fd = -2, we will behave wrongly, and in
+ particular try reading a .elc file in the "rt" mode instead
+ of "rb". See bug #9311 for the results. To work around
+ this, we try to open the file locally, and go with that if it
+ succeeds. */
+ fd = emacs_open (SSDATA (ENCODE_FILE (found)), O_RDONLY, 0);
+ if (fd == -1)
+ fd = -2;
+#endif
}
/* Check if we're stuck in a recursive load cycle.
GCPRO3 (file, found, hist_file_name);
#ifdef WINDOWSNT
- emacs_close (fd);
efound = ENCODE_FILE (found);
- stream = fopen (SSDATA (efound), fmode);
+ /* If we somehow got here with fd == -2, meaning the file is deemed
+ to be remote, don't even try to reopen the file locally; just
+ force a failure instead. */
+ if (fd >= 0)
+ {
+ emacs_close (fd);
+ stream = fopen (SSDATA (efound), fmode);
+ }
+ else
+ stream = NULL;
#else /* not WINDOWSNT */
stream = fdopen (fd, fmode);
#endif /* not WINDOWSNT */