Now on revision 111823. ------------------------------------------------------------ revno: 111823 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8345 author: Michael Heerdegen committer: Stefan Monnier branch nick: trunk timestamp: Sun 2013-02-17 20:30:27 -0500 message: * lisp/emacs-lisp/eldoc.el (eldoc-highlight-function-argument): Use font-lock-keyword-face for macros and special forms. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-17 19:01:46 +0000 +++ lisp/ChangeLog 2013-02-18 01:30:27 +0000 @@ -1,3 +1,8 @@ +2013-02-18 Michael Heerdegen + + * emacs-lisp/eldoc.el (eldoc-highlight-function-argument): + Use font-lock-keyword-face for macros and special forms (bug#8345). + 2013-02-17 Didier Verna * net/network-stream.el (network-stream-open-starttls): === modified file 'lisp/emacs-lisp/eldoc.el' --- lisp/emacs-lisp/eldoc.el 2013-01-01 09:11:05 +0000 +++ lisp/emacs-lisp/eldoc.el 2013-02-18 01:30:27 +0000 @@ -356,7 +356,8 @@ (setq doc (copy-sequence args)) (add-text-properties start end (list 'face argument-face) doc)) (setq doc (eldoc-docstring-format-sym-doc - sym doc 'font-lock-function-name-face)) + sym doc (if (functionp sym) 'font-lock-function-name-face + 'font-lock-keyword-face))) doc))) ;; Return a string containing a brief (one-line) documentation string for ------------------------------------------------------------ revno: 111822 [merge] committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-02-17 11:01:46 -0800 message: Merge from emacs-24; up to r111274 diff: === modified file 'etc/CONTRIBUTE' --- etc/CONTRIBUTE 2013-01-01 09:11:05 +0000 +++ etc/CONTRIBUTE 2013-02-16 20:24:50 +0000 @@ -22,7 +22,8 @@ If you don't feel up to hacking Emacs, there are many other ways to help. You can answer questions on the mailing lists, write -documentation, find and report bugs, contribute to the Emacs web +documentation, find and report bugs, check if existing bug reports +are fixed in newer versions of Emacs, contribute to the Emacs web pages, or develop a package that works with Emacs. Here are some style and legal conventions for contributors to Emacs: === modified file 'etc/TODO' --- etc/TODO 2013-02-10 01:56:25 +0000 +++ etc/TODO 2013-02-17 19:01:46 +0000 @@ -7,9 +7,24 @@ If you are ready to start working on any of these TODO items, we appreciate your help; please write to emacs-devel@gnu.org so we can be aware that the problem is being addressed, and talk with you how to do -it best. Since Emacs is an FSF-copyrighted package, please be -prepared to sign legal papers to transfer the copyright on your work -to the FSF. +it best. Also to check that it hasn't been done already, since we +don't always remember to update this file! It is best to consult +the latest version of this file in the Emacs source code repository. + +Since Emacs is an FSF-copyrighted package, please be prepared to sign +legal papers to transfer the copyright on your work to the FSF. +For more details on this, see the section "Copyright Assignment" +in etc/CONTRIBUTE. That file also contains some more practical +details about getting involved. + +As well as the issues listed here, there are bug reports at +. Bugs tagged "easy" ought to be suitable for +beginners to work on, but unfortunately we are not very good at using +this tag. Bugs tagged "help" are ones where assistance is required, +but may be difficult to fix. Bugs with severity "important" or higher +are the ones we consider more important, but these also may be +difficult to fix. Bugs with severity "minor" may be simpler, but this +is not always true. * Tentative plan for Emacs-24 @@ -61,7 +76,7 @@ ** Convert all defvars with leading `*' in the doc-strings into defcustoms of appropriate :type and :group. -** Remove any leading `*'s from defcustom doc-strings. +** Remove any leading `*'s from defcustom doc-strings. [done?] ** Remove unnecessary autoload cookies from defcustoms. This needs a bit of care, since often people have become used to @@ -267,6 +282,9 @@ ** Remove the limitation that window and frame widths and heights can be only full columns/lines. +** The GNUstep port needs some serious attention, ideally from someone +familiar with GNUstep and Objective C. + * Other features we would like: ** Allow frames(terminals) created by emacsclient to inherit their environment === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-17 16:58:12 +0000 +++ lisp/ChangeLog 2013-02-17 19:01:46 +0000 @@ -1,3 +1,8 @@ +2013-02-17 Didier Verna + + * net/network-stream.el (network-stream-open-starttls): + Check that response to the starttls-command is non-nil. (Bug#13706) + 2013-02-17 Stefan Monnier * font-lock.el (lisp-font-lock-keywords-1, lisp-font-lock-keywords-2): === modified file 'lisp/net/network-stream.el' --- lisp/net/network-stream.el 2013-01-01 09:11:05 +0000 +++ lisp/net/network-stream.el 2013-02-16 02:45:24 +0000 @@ -262,8 +262,9 @@ ;; EHLO for SMTP. (when (plist-get parameters :always-query-capabilities) (network-stream-command stream capability-command eo-capa))) - (when (string-match success-string - (network-stream-command stream starttls-command eoc)) + (when (let ((response + (network-stream-command stream starttls-command eoc))) + (and response (string-match success-string response))) ;; The server said it was OK to begin STARTTLS negotiations. (if builtin-starttls (let ((cert (network-stream-certificate host service parameters))) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-02-17 16:49:27 +0000 +++ src/ChangeLog 2013-02-17 19:01:46 +0000 @@ -1,3 +1,9 @@ +2013-02-17 Eli Zaretskii + + * xdisp.c (x_draw_vertical_border): For a window that is neither + the leftmost nor the rightmost, redraw both the left and the right + vertical borders. (Bug#13723) + 2013-02-17 Stefan Monnier * xml.c (init_libxml2_functions): === modified file 'src/xdisp.c' --- src/xdisp.c 2013-02-15 12:26:42 +0000 +++ src/xdisp.c 2013-02-17 19:01:46 +0000 @@ -28244,6 +28244,9 @@ if (FRAME_HAS_VERTICAL_SCROLL_BARS (XFRAME (w->frame))) return; + /* Note: It is necessary to redraw bot the left and the right + borders, for when only this single window W is being + redisplayed. */ if (!WINDOW_RIGHTMOST_P (w) && !WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) { @@ -28257,8 +28260,8 @@ FRAME_RIF (f)->draw_vertical_window_border (w, x1, y0, y1); } - else if (!WINDOW_LEFTMOST_P (w) - && !WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) + if (!WINDOW_LEFTMOST_P (w) + && !WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) { int x0, x1, y0, y1; ------------------------------------------------------------ revno: 111821 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2013-02-17 11:58:12 -0500 message: Don't use font-lock-syntax-table in lisp modes. * lisp/font-lock.el (lisp-font-lock-keywords-1, lisp-font-lock-keywords-2): Don't assume all identifier chars have syntax word. * lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Remove bar-not-symbol. Adjust callers. (lisp-mode-variables): Don't set a font-lock-syntax-table. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-17 16:26:38 +0000 +++ lisp/ChangeLog 2013-02-17 16:58:12 +0000 @@ -1,3 +1,11 @@ +2013-02-17 Stefan Monnier + + * font-lock.el (lisp-font-lock-keywords-1, lisp-font-lock-keywords-2): + Don't assume all identifier chars have syntax word. + * emacs-lisp/lisp-mode.el (lisp-mode-variables): + Remove bar-not-symbol. Adjust callers. + (lisp-mode-variables): Don't set a font-lock-syntax-table. + 2013-02-17 Leo Liu * net/rcirc.el (rcirc-keepalive): Fix invalid timer error. @@ -32,8 +40,8 @@ * net/tramp-compat.el (top): Require 'trampver. - * net/tramp-sh.el (tramp-remote-process-environment): Set - tramp-autoload cookie. + * net/tramp-sh.el (tramp-remote-process-environment): + Set tramp-autoload cookie. 2013-02-16 Kevin Ryde === modified file 'lisp/emacs-lisp/lisp-mode.el' --- lisp/emacs-lisp/lisp-mode.el 2013-01-26 15:13:09 +0000 +++ lisp/emacs-lisp/lisp-mode.el 2013-02-17 16:58:12 +0000 @@ -187,14 +187,12 @@ font-lock-string-face)))) font-lock-comment-face)) -(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive - bar-not-symbol) +(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive) "Common initialization routine for lisp modes. The LISP-SYNTAX argument is used by code in inf-lisp.el and is \(uselessly) passed from pp.el, chistory.el, gnus-kill.el and score-mode.el. KEYWORDS-CASE-INSENSITIVE non-nil means that for -font-lock keywords will not be case sensitive. BAR-NOT-SYMBOL -non-nil means that | is not a symbol character." +font-lock keywords will not be case sensitive." (when lisp-syntax (set-syntax-table lisp-mode-syntax-table)) (setq-local paragraph-ignore-fill-prefix t) @@ -228,9 +226,7 @@ (setq font-lock-defaults `((lisp-font-lock-keywords lisp-font-lock-keywords-1 lisp-font-lock-keywords-2) - nil ,keywords-case-insensitive - ((,(concat "+-*/.<>=!?$%_&~^:@" (if bar-not-symbol "" "|")) . "w")) - nil + nil ,keywords-case-insensitive nil nil (font-lock-mark-block-function . mark-defun) (font-lock-syntactic-face-function . lisp-font-lock-syntactic-face-function)))) @@ -553,7 +549,7 @@ Entry to this mode calls the value of `lisp-mode-hook' if that value is non-nil." - (lisp-mode-variables nil t t) + (lisp-mode-variables nil t) (setq-local find-tag-default-function 'lisp-find-tag-default) (setq-local comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") === modified file 'lisp/font-lock.el' --- lisp/font-lock.el 2013-02-16 01:55:31 +0000 +++ lisp/font-lock.el 2013-02-17 16:58:12 +0000 @@ -2259,10 +2259,10 @@ "\\(const\\(ant\\)?\\|custom\\|varalias\\|face\\|parameter\\|var\\(?:-local\\)?\\)\\|" ;; Structure declarations. "\\(class\\|group\\|theme\\|package\\|struct\\|type\\)" - "\\)\\)\\>" + "\\)\\)\\_>" ;; Any whitespace and defined object. "[ \t'\(]*" - "\\(setf[ \t]+\\sw+\\|\\sw+\\)?") + "\\(setf[ \t]+\\(?:\\sw\\|\\s_\\)+\\|\\(?:\\sw\\|\\s_\\)+\\)?") (1 font-lock-keyword-face) (9 (cond ((match-beginning 3) font-lock-function-name-face) ((match-beginning 6) font-lock-variable-name-face) @@ -2299,7 +2299,7 @@ "with-silent-modifications" "with-syntax-table" "with-temp-buffer" "with-temp-file" "with-temp-message" "with-timeout" "with-timeout-handler" "with-wrapper-hook") t) - "\\>") + "\\_>") . 1) ;; Control structures. Common Lisp forms. (,(concat @@ -2320,23 +2320,25 @@ "with-open-stream" "with-output-to-string" "with-package-iterator" "with-simple-restart" "with-slots" "with-standard-io-syntax") t) - "\\>") + "\\_>") . 1) ;; Exit/Feature symbols as constants. (,(concat "(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\>" - "[ \t']*\\(\\sw+\\)?") + "[ \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)?") (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) ;; Erroneous structures. ("(\\(abort\\|assert\\|warn\\|check-type\\|cerror\\|error\\|signal\\)\\>" 1 font-lock-warning-face) ;; Words inside \\[] tend to be for `substitute-command-keys'. - ("\\\\\\\\\\[\\(\\sw+\\)\\]" 1 font-lock-constant-face prepend) + ("\\\\\\\\\\[\\(\\(?:\\sw\\|\\s_\\)+\\)\\]" + (1 font-lock-constant-face prepend)) ;; Words inside `' tend to be symbol names. - ("`\\(\\sw\\sw+\\)'" 1 font-lock-constant-face prepend) + ("`\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)'" + (1 font-lock-constant-face prepend)) ;; Constant values. - ("\\<:\\sw+\\>" 0 font-lock-builtin-face) + ("\\<:\\(?:\\sw\\|\\s_\\)+\\>" 0 font-lock-builtin-face) ;; ELisp and CLisp `&' keywords as types. - ("\\<\\&\\sw+\\>" . font-lock-type-face) + ("\\<\\&\\(?:\\sw\\|\\s_\\)+\\>" . font-lock-type-face) ;; ELisp regexp grouping constructs ((lambda (bound) (catch 'found @@ -2353,11 +2355,11 @@ (throw 'found t))))))) (1 'font-lock-regexp-grouping-backslash prepend) (3 'font-lock-regexp-grouping-construct prepend)) -;;; This is too general -- rms. -;;; A user complained that he has functions whose names start with `do' -;;; and that they get the wrong color. -;;; ;; CL `with-' and `do-' constructs -;;; ("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1 font-lock-keyword-face) + ;; This is too general -- rms. + ;; A user complained that he has functions whose names start with `do' + ;; and that they get the wrong color. + ;; ;; CL `with-' and `do-' constructs + ;;("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1 font-lock-keyword-face) ))) "Gaudy level highlighting for Lisp modes.") ------------------------------------------------------------ revno: 111820 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2013-02-17 11:49:27 -0500 message: Prefer `message1' over `message'. * src/xml.c (init_libxml2_functions): * src/sound.c (sound_warning): * src/sheap.c (report_sheap_usage): * src/process.c (wait_reading_process_output): * src/msdos.c (XMenuActivate): * src/macros.c (Fstart_kbd_macro, Fend_kbd_macro): * src/keyboard.c (top_level_1): * src/editfns.c (Fmessage, Fmessage_box): * src/callint.c (Fcall_interactively): * src/fns.c (Fyes_or_no_p): Prefer `message1' over `message'. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-02-17 10:41:33 +0000 +++ src/ChangeLog 2013-02-17 16:49:27 +0000 @@ -1,7 +1,19 @@ +2013-02-17 Stefan Monnier + + * xml.c (init_libxml2_functions): + * sound.c (sound_warning): + * sheap.c (report_sheap_usage): + * process.c (wait_reading_process_output): + * msdos.c (XMenuActivate): + * macros.c (Fstart_kbd_macro, Fend_kbd_macro): + * keyboard.c (top_level_1): + * editfns.c (Fmessage, Fmessage_box): + * callint.c (Fcall_interactively): + * fns.c (Fyes_or_no_p): Prefer `message1' over `message'. + 2013-02-17 Jan Djärv * xterm.c (syms_of_xterm): Move scroll-bar-adjust-thumb-portion ... - * frame.c (syms_of_frame): ... to here. 2013-02-16 Eli Zaretskii === modified file 'src/callint.c' --- src/callint.c 2013-01-23 20:07:28 +0000 +++ src/callint.c 2013-02-17 16:49:27 +0000 @@ -690,7 +690,7 @@ Lisp_Object str; if (! first) { - message ("Please enter a number."); + message1 ("Please enter a number."); sit_for (make_number (1), 0, 0); } first = 0; === modified file 'src/editfns.c' --- src/editfns.c 2013-02-11 23:37:18 +0000 +++ src/editfns.c 2013-02-17 16:49:27 +0000 @@ -3451,7 +3451,7 @@ || (STRINGP (args[0]) && SBYTES (args[0]) == 0)) { - message (0); + message1 (0); return args[0]; } else @@ -3477,7 +3477,7 @@ { if (NILP (args[0])) { - message (0); + message1 (0); return Qnil; } else === modified file 'src/fns.c' --- src/fns.c 2013-02-09 22:42:33 +0000 +++ src/fns.c 2013-02-17 16:49:27 +0000 @@ -2485,7 +2485,7 @@ Fding (Qnil); Fdiscard_input (); - message ("Please answer yes or no."); + message1 ("Please answer yes or no."); Fsleep_for (make_number (2), Qnil); } } === modified file 'src/keyboard.c' --- src/keyboard.c 2013-02-15 18:52:16 +0000 +++ src/keyboard.c 2013-02-17 16:49:27 +0000 @@ -1185,13 +1185,13 @@ static Lisp_Object top_level_1 (Lisp_Object ignore) { - /* On entry to the outer level, run the startup file */ + /* On entry to the outer level, run the startup file. */ if (!NILP (Vtop_level)) internal_condition_case (top_level_2, Qerror, cmd_error); else if (!NILP (Vpurify_flag)) - message ("Bare impure Emacs (standard Lisp code not loaded)"); + message1 ("Bare impure Emacs (standard Lisp code not loaded)"); else - message ("Bare Emacs (standard Lisp code not loaded)"); + message1 ("Bare Emacs (standard Lisp code not loaded)"); return Qnil; } === modified file 'src/macros.c' --- src/macros.c 2013-01-01 09:11:05 +0000 +++ src/macros.c 2013-02-17 16:49:27 +0000 @@ -78,7 +78,7 @@ } current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_buffer; current_kboard->kbd_macro_end = current_kboard->kbd_macro_buffer; - message ("Defining kbd macro..."); + message1 ("Defining kbd macro..."); } else { @@ -125,7 +125,7 @@ Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro), make_number (1), Qnil); - message ("Appending to kbd macro..."); + message1 ("Appending to kbd macro..."); } kset_defining_kbd_macro (current_kboard, Qt); @@ -172,21 +172,21 @@ if (!NILP (KVAR (current_kboard, defining_kbd_macro))) { end_kbd_macro (); - message ("Keyboard macro defined"); + message1 ("Keyboard macro defined"); } if (XFASTINT (repeat) == 0) Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro), repeat, loopfunc); else if (XINT (repeat) > 1) { - XSETINT (repeat, XINT (repeat)-1); + XSETINT (repeat, XINT (repeat) - 1); Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro), repeat, loopfunc); } return Qnil; } -/* Store character c into kbd macro being defined */ +/* Store character c into kbd macro being defined. */ void store_kbd_macro_char (Lisp_Object c) === modified file 'src/msdos.c' --- src/msdos.c 2013-02-09 09:02:17 +0000 +++ src/msdos.c 2013-02-17 16:49:27 +0000 @@ -3281,10 +3281,10 @@ erasing it works correctly... */ if (! NILP (saved_echo_area_message)) message_with_string ("%s", saved_echo_area_message, 0); - message (0); + message1 (0); while (statecount--) xfree (state[statecount].screen_behind); - IT_display_cursor (1); /* turn cursor back on */ + IT_display_cursor (1); /* Turn cursor back on. */ /* Clean up any mouse events that are waiting inside Emacs event queue. These events are likely to be generated before the menu was even displayed, probably because the user pressed and released the button === modified file 'src/process.c' --- src/process.c 2013-02-15 19:08:11 +0000 +++ src/process.c 2013-02-17 16:49:27 +0000 @@ -4218,7 +4218,7 @@ if (time_limit == 0 && nsecs == 0 && wait_proc && !NILP (Vinhibit_quit) && !(CONSP (wait_proc->status) && EQ (XCAR (wait_proc->status), Qexit))) - message ("Blocking call to accept-process-output with quit inhibited!!"); + message1 ("Blocking call to accept-process-output with quit inhibited!!"); /* If wait_proc is a process to watch, set wait_channel accordingly. */ if (wait_proc != NULL) === modified file 'src/sheap.c' --- src/sheap.c 2013-01-01 09:11:05 +0000 +++ src/sheap.c 2013-02-17 16:49:27 +0000 @@ -91,5 +91,5 @@ char buf[200]; sprintf (buf, "Static heap usage: %d of %d bytes", bss_sbrk_ptr - bss_sbrk_buffer, STATIC_HEAP_SIZE); - message ("%s", buf); + message1 (buf); } === modified file 'src/sound.c' --- src/sound.c 2013-01-01 09:11:05 +0000 +++ src/sound.c 2013-02-17 16:49:27 +0000 @@ -334,7 +334,7 @@ static void sound_warning (const char *msg) { - message ("%s", msg); + message1 (msg); } === modified file 'src/xml.c' --- src/xml.c 2013-01-11 13:25:10 +0000 +++ src/xml.c 2013-02-17 16:49:27 +0000 @@ -93,7 +93,7 @@ if (!(library = w32_delayed_load (Qlibxml2_dll))) { - message ("%s", "libxml2 library not found"); + message1 ("libxml2 library not found"); return 0; } ------------------------------------------------------------ revno: 111819 committer: Leo Liu branch nick: trunk timestamp: Mon 2013-02-18 00:26:38 +0800 message: * net/rcirc.el (rcirc-keepalive): Fix invalid timer error. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-17 03:40:38 +0000 +++ lisp/ChangeLog 2013-02-17 16:26:38 +0000 @@ -1,3 +1,7 @@ +2013-02-17 Leo Liu + + * net/rcirc.el (rcirc-keepalive): Fix invalid timer error. + 2013-02-17 Glenn Morris * menu-bar.el (menu-bar-tools-menu): Fix case of EDE entry. === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2013-01-02 16:13:04 +0000 +++ lisp/net/rcirc.el 2013-02-17 16:26:38 +0000 @@ -625,7 +625,8 @@ (rcirc-float-time)))))) (rcirc-process-list)) ;; no processes, clean up timer - (cancel-timer rcirc-keepalive-timer) + (when (timerp rcirc-keepalive-timer) + (cancel-timer rcirc-keepalive-timer)) (setq rcirc-keepalive-timer nil))) (defun rcirc-handler-ctcp-KEEPALIVE (process target sender message) ------------------------------------------------------------ revno: 111818 author: Daiki Ueno committer: Katsumi Yamaoka branch nick: trunk timestamp: Sun 2013-02-17 12:46:28 +0000 message: lisp/gnus/mml2015.el (mml2015-epg-find-usable-key): handle revoked user-id diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-02-17 00:38:03 +0000 +++ lisp/gnus/ChangeLog 2013-02-17 12:46:28 +0000 @@ -1,3 +1,14 @@ +2013-02-17 Daiki Ueno + + * mml2015.el (epg-key-user-id-list, epg-user-id-string) + (epg-user-id-validity): Autoload. + (mml2015-epg-check-user-id): New function. + (mml2015-epg-check-sub-key): New function split from + mml2015-epg-find-usable-key. + (mml2015-epg-find-usable-key): Accept context, name, usage, and + optional name-is-key-id, to handle the case when user-id is unusable. + Reported by Łukasz Stelmach . + 2013-02-17 Glenn Morris * shr.el (shr-put-image): Use image-multi-frame-p if available. === modified file 'lisp/gnus/mml2015.el' --- lisp/gnus/mml2015.el 2013-01-02 16:13:04 +0000 +++ lisp/gnus/mml2015.el 2013-02-17 12:46:28 +0000 @@ -757,6 +757,9 @@ (autoload 'epg-sub-key-fingerprint "epg") (autoload 'epg-signature-key-id "epg") (autoload 'epg-signature-to-string "epg") +(autoload 'epg-key-user-id-list "epg") +(autoload 'epg-user-id-string "epg") +(autoload 'epg-user-id-validity "epg") (autoload 'epg-configuration "epg-config") (autoload 'epg-expand-group "epg-config") (autoload 'epa-select-keys "epa") @@ -786,21 +789,53 @@ (cons password-cache-key-id mml2015-epg-secret-key-id-list)) (copy-sequence passphrase))))) -(defun mml2015-epg-find-usable-key (keys usage) - (catch 'found +(defun mml2015-epg-check-user-id (key recipient) + (let ((pointer (epg-key-user-id-list key)) + result) + (while pointer + (if (and (equal (car (mail-header-parse-address + (epg-user-id-string (car pointer)))) + (car (mail-header-parse-address + recipient))) + (not (memq (epg-user-id-validity (car pointer)) + '(revoked expired)))) + (setq result t + pointer nil) + (setq pointer (cdr pointer)))) + result)) + +(defun mml2015-epg-check-sub-key (key usage) + (let ((pointer (epg-key-sub-key-list key)) + result) + ;; The primary key will be marked as disabled, when the entire + ;; key is disabled (see 12 Field, Format of colon listings, in + ;; gnupg/doc/DETAILS) + (unless (memq 'disabled (epg-sub-key-capability (car pointer))) + (while pointer + (if (and (memq usage (epg-sub-key-capability (car pointer))) + (not (memq (epg-sub-key-validity (car pointer)) + '(revoked expired)))) + (setq result t + pointer nil) + (setq pointer (cdr pointer))))) + result)) + +(defun mml2015-epg-find-usable-key (context name usage + &optional name-is-key-id) + (let ((keys (epg-list-keys context name)) + key) (while keys - (let ((pointer (epg-key-sub-key-list (car keys)))) - ;; The primary key will be marked as disabled, when the entire - ;; key is disabled (see 12 Field, Format of colon listings, in - ;; gnupg/doc/DETAILS) - (unless (memq 'disabled (epg-sub-key-capability (car pointer))) - (while pointer - (if (and (memq usage (epg-sub-key-capability (car pointer))) - (not (memq (epg-sub-key-validity (car pointer)) - '(revoked expired)))) - (throw 'found (car keys))) - (setq pointer (cdr pointer))))) - (setq keys (cdr keys))))) + (if (and (or name-is-key-id + ;; Non email user-id can be supplied through + ;; mml2015-signers if mml2015-encrypt-to-self is set. + ;; Treat it as valid, as it is user's intention. + (not (string-match "\\`<" name)) + (mml2015-epg-check-user-id (car keys) name)) + (mml2015-epg-check-sub-key (car keys) usage)) + (setq key (car keys) + keys nil) + (setq keys (cdr keys)))) + key)) ;; XXX: since gpg --list-secret-keys does not return validity of each ;; key, `mml2015-epg-find-usable-key' defined above is not enough for @@ -811,10 +846,12 @@ secret-key) (while (and (not secret-key) secret-keys) (if (mml2015-epg-find-usable-key - (epg-list-keys context (epg-sub-key-fingerprint - (car (epg-key-sub-key-list - (car secret-keys))))) - usage) + context + (epg-sub-key-fingerprint + (car (epg-key-sub-key-list + (car secret-keys)))) + usage + t) (setq secret-key (car secret-keys) secret-keys nil) (setq secret-keys (cdr secret-keys)))) @@ -1115,8 +1152,7 @@ (mapcar (lambda (recipient) (setq recipient-key (mml2015-epg-find-usable-key - (epg-list-keys context recipient) - 'encrypt)) + context recipient 'encrypt)) (unless (or recipient-key (y-or-n-p (format "No public key for %s; skip it? " ------------------------------------------------------------ revno: 111817 committer: Jan D. branch nick: trunk timestamp: Sun 2013-02-17 11:41:33 +0100 message: Move scroll-bar-adjust-thumb-portion. * xterm.c (syms_of_xterm): Move scroll-bar-adjust-thumb-portion ... * frame.c (syms_of_frame): ... to here. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-02-16 14:16:07 +0000 +++ src/ChangeLog 2013-02-17 10:41:33 +0000 @@ -1,3 +1,9 @@ +2013-02-17 Jan Djärv + + * xterm.c (syms_of_xterm): Move scroll-bar-adjust-thumb-portion ... + + * frame.c (syms_of_frame): ... to here. + 2013-02-16 Eli Zaretskii * w32.c (sys_chown): Remove unused function. === modified file 'src/frame.c' --- src/frame.c 2013-01-24 05:41:28 +0000 +++ src/frame.c 2013-02-17 10:41:33 +0000 @@ -4233,6 +4233,16 @@ Vdefault_frame_scroll_bars = Qnil; #endif + DEFVAR_BOOL ("scroll-bar-adjust-thumb-portion", + scroll_bar_adjust_thumb_portion_p, + doc: /* Adjust thumb for overscrolling for Gtk+ and MOTIF. +Non-nil means adjust the thumb in the scroll bar so it can be dragged downwards +even if the end of the buffer is shown (i.e. overscrolling). +Set to nil if you want the thumb to be at the bottom when the end of the buffer +is shown. Also, the thumb fills the whole scroll bar when the entire buffer +is visible. In this case you can not overscroll. */); + scroll_bar_adjust_thumb_portion_p = 1; + DEFVAR_LISP ("terminal-frame", Vterminal_frame, doc: /* The initial frame-object, which represents Emacs's stdout. */); === modified file 'src/xterm.c' --- src/xterm.c 2013-01-24 05:41:28 +0000 +++ src/xterm.c 2013-02-17 10:41:33 +0000 @@ -10773,16 +10773,6 @@ Vx_toolkit_scroll_bars = Qnil; #endif - DEFVAR_BOOL ("scroll-bar-adjust-thumb-portion", - scroll_bar_adjust_thumb_portion_p, - doc: /* Adjust thumb for overscrolling for Gtk+ and MOTIF. -Non-nil means adjust the thumb in the scroll bar so it can be dragged downwards -even if the end of the buffer is shown (i.e. overscrolling). -Set to nil if you want the thumb to be at the bottom when the end of the buffer -is shown. Also, the thumb fills the whole scroll bar when the entire buffer -is visible. In this case you can not overscroll. */); - scroll_bar_adjust_thumb_portion_p = 1; - staticpro (&last_mouse_motion_frame); last_mouse_motion_frame = Qnil; ------------------------------------------------------------ revno: 111816 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-02-16 19:40:38 -0800 message: * lisp/menu-bar.el (menu-bar-tools-menu): Fix case of EDE entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-17 00:50:41 +0000 +++ lisp/ChangeLog 2013-02-17 03:40:38 +0000 @@ -1,5 +1,7 @@ 2013-02-17 Glenn Morris + * menu-bar.el (menu-bar-tools-menu): Fix case of EDE entry. + * image-mode.el (image-mode-map): Add image-dired menu entry. * image-dired.el (tumme): Make this alias obsolete. === modified file 'lisp/menu-bar.el' --- lisp/menu-bar.el 2013-01-07 22:00:55 +0000 +++ lisp/menu-bar.el 2013-02-17 03:40:38 +0000 @@ -1518,7 +1518,7 @@ :button (:toggle . (bound-and-true-p semantic-mode)))) (bindings--define-key menu [ede] - '(menu-item "Project support (EDE)" + '(menu-item "Project Support (EDE)" global-ede-mode :help "Toggle the Emacs Development Environment (Global EDE mode)" :button (:toggle . (bound-and-true-p global-ede-mode)))) ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.