changeset 108434:94a1a2dc5ac3

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Wed, 17 Mar 2010 14:41:32 +0000
parents 04339e8c65fc (current diff) ef684a3be0f9 (diff)
children d9d618029804
files
diffstat 19 files changed, 158 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS	Sun Mar 14 00:17:00 2010 +0000
+++ b/etc/NEWS	Wed Mar 17 14:41:32 2010 +0000
@@ -30,7 +30,7 @@
 
 * Changes in Emacs 24.1
 
-** The scroll-bar is now on the right on GNU/Linux and UNIX-like systems.
+** GTK scroll-bars are now placed on the right by default.
 Use `set-scroll-bar-mode' to change this.
 
 
--- a/lisp/ChangeLog	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/ChangeLog	Wed Mar 17 14:41:32 2010 +0000
@@ -1,3 +1,40 @@
+2010-03-16  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/secrets.el (secrets-enabled): New variable.  Use it instead
+	of a subfeature.
+
+2010-03-15  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/secrets.el (top): Register the D-Bus signals only when the
+	service "org.freedesktop.secrets" can be pinged.  Provide
+	subfeature 'enabled.
+
+2010-03-14  Juri Linkov  <juri@jurta.org>
+
+	Add finder unknown keywords.
+
+	* finder.el (finder-unknown-keywords): New function.
+
+	* info.el (Info-finder-find-node): Use `finder-unknown-keywords'
+	to create a Finder node with unknown keywords.
+
+2010-03-14  Juri Linkov  <juri@jurta.org>
+
+	* finder.el (finder-compile-keywords): Replace `princ' with
+	`prin1' on a list of symbols interned from keyword strings.
+
+	* emacs-lisp/lisp-mnt.el (lm-keywords-list): If `keywords' contains
+	a comma, then split keywords using a comma and optional whitespace.
+	Otherwise, split by whitespace.
+
+	* complete.el:
+	* face-remap.el:
+	* log-view.el:
+	* net/hmac-def.el:
+	* net/hmac-md5.el:
+	* net/netrc.el:
+	* progmodes/mixal-mode.el: Fix keywords.
+
 2010-03-13  Michael Albinus  <michael.albinus@gmx.de>
 
 	* Makefile.in (ELCFILES): Add net/secrets.elc.
--- a/lisp/complete.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/complete.el	Wed Mar 17 14:41:32 2010 +0000
@@ -5,6 +5,7 @@
 
 ;; Author: Dave Gillespie <daveg@synaptics.com>
 ;; Keywords: abbrev convenience
+;;
 ;; Special thanks to Hallvard Furuseth for his many ideas and contributions.
 
 ;; This file is part of GNU Emacs.
--- a/lisp/emacs-lisp/lisp-mnt.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/emacs-lisp/lisp-mnt.el	Wed Mar 17 14:41:32 2010 +0000
@@ -458,7 +458,9 @@
   "Return list of keywords given in file FILE."
   (let ((keywords (lm-keywords file)))
     (if keywords
-	(split-string keywords "[, \t\n]+" t))))
+	(if (string-match-p "," keywords)
+	    (split-string keywords ",[ \t\n]*" t)
+	  (split-string keywords "[ \t\n]+" t)))))
 
 (defvar finder-known-keywords)
 (defun lm-keywords-finder-p (&optional file)
--- a/lisp/face-remap.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/face-remap.el	Wed Mar 17 14:41:32 2010 +0000
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 ;;
 ;; Author: Miles Bader <miles@gnu.org>
-;; Keywords: faces face remapping display user commands
+;; Keywords: faces, face remapping, display, user commands
 ;;
 ;; This file is part of GNU Emacs.
 ;;
--- a/lisp/finder.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/finder.el	Wed Mar 17 14:41:32 2010 +0000
@@ -33,7 +33,6 @@
 ;; there doesn't seem to be any way to get completing-read to exit on
 ;; an EOL with no substring pending, which is what we'd want to end the loop.
 ;;    2. Search by string in synopsis line?
-;;    3. Function to check finder-package-info for unknown keywords.
 
 ;;; Code:
 
@@ -182,7 +181,7 @@
                            f)))
                 (prin1 summary (current-buffer))
                 (insert "\n        ")
-                (princ keywords (current-buffer))
+                (prin1 (mapcar 'intern keywords) (current-buffer))
                 (insert ")\n")))
 	    (directory-files d nil
                              ;; Allow compressed files also.  FIXME:
@@ -230,6 +229,29 @@
      '(mouse-face highlight
 		  help-echo finder-help-echo))))
 
+(defun finder-unknown-keywords ()
+  "Return an alist of unknown keywords and number of their occurences.
+Unknown are keywords that are present in `finder-package-info'
+but absent in `finder-known-keywords'."
+  (let ((unknown-keywords-hash (make-hash-table)))
+    ;; Prepare a hash where key is a keyword
+    ;; and value is the number of keyword occurences.
+    (mapc (lambda (package)
+	    (mapc (lambda (keyword)
+		    (unless (assq keyword finder-known-keywords)
+		      (puthash keyword
+			       (1+ (gethash keyword unknown-keywords-hash 0))
+			       unknown-keywords-hash)))
+		  (nth 2 package)))
+	  finder-package-info)
+    ;; Make an alist from the hash and sort by the keyword name.
+    (sort (let (unknown-keywords-list)
+	    (maphash (lambda (key value)
+		       (push (cons key value) unknown-keywords-list))
+		     unknown-keywords-hash)
+	    unknown-keywords-list)
+	  (lambda (a b) (string< (car a) (car b))))))
+
 ;;;###autoload
 (defun finder-list-keywords ()
   "Display descriptions of the keywords in the Finder buffer."
--- a/lisp/gnus/ChangeLog	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/gnus/ChangeLog	Wed Mar 17 14:41:32 2010 +0000
@@ -1,3 +1,14 @@
+2010-03-17  Kevin Ryde  <user42@zip.com.au>
+
+	* mml.el (mml-read-tag): Unquote values with `read' to reverse
+	prin1 in mml-insert-tag (just stripping the quotes gave wrong
+	value if any backslash escapes).
+
+2010-03-15  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-util.el (mm-charset-to-coding-system): Use coding-system-from-name
+	if it is available.  (bug#5647)
+
 2010-02-26  Glenn Morris  <rgm@gnu.org>
 
 	* message.el (message-send-mail-function): Change the default, so that
--- a/lisp/gnus/mm-util.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/gnus/mm-util.el	Wed Mar 17 14:41:32 2010 +0000
@@ -566,6 +566,9 @@
 ;;; 	 (eq charset (coding-system-get charset 'mime-charset))
 	 )
     charset)
+   ;; Use coding system Emacs knows.
+   ((and (fboundp 'coding-system-from-name)
+	 (coding-system-from-name charset)))
    ;; Eval expressions from `mm-charset-eval-alist'
    ((let* ((el (assq charset mm-charset-eval-alist))
 	   (cs (car el))
--- a/lisp/gnus/mml.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/gnus/mml.el	Wed Mar 17 14:41:32 2010 +0000
@@ -392,8 +392,8 @@
       (skip-chars-forward "= \t\n")
       (setq val (buffer-substring-no-properties
 		 (point) (progn (forward-sexp 1) (point))))
-      (when (string-match "^\"\\(.*\\)\"$" val)
-	(setq val (match-string 1 val)))
+      (when (string-match "\\`\"" val)
+	(setq val (read val))) ;; inverse of prin1 in mml-insert-tag
       (push (cons (intern elem) val) contents)
       (skip-chars-forward " \t\n"))
     (goto-char (match-end 0))
--- a/lisp/info.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/info.el	Wed Mar 17 14:41:32 2010 +0000
@@ -3343,6 +3343,7 @@
 (defvar finder-known-keywords)
 (defvar finder-package-info)
 (declare-function find-library-name "find-func" (library))
+(declare-function finder-unknown-keywords "finder" ())
 (declare-function lm-commentary "lisp-mnt" (&optional file))
 
 (defun Info-finder-find-node (filename nodename &optional no-going-back)
@@ -3361,7 +3362,21 @@
 	 (insert (format "* %-14s %s.\n"
 			 (concat (symbol-name keyword) "::")
 			 (cdr assoc)))))
-     finder-known-keywords))
+     (cons '(unknown . "unknown keywords")
+	   finder-known-keywords)))
+   ((equal nodename "unknown")
+    ;; Display unknown keywords
+    (insert (format "\n\^_\nFile: %s,  Node: %s,  Up: Top\n\n"
+		    Info-finder-file nodename))
+    (insert "Finder Unknown Keywords\n")
+    (insert "***********************\n\n")
+    (insert "* Menu:\n\n")
+    (mapc
+     (lambda (assoc)
+       (insert (format "* %-14s %s.\n"
+		       (concat (symbol-name (car assoc)) "::")
+		       (cdr assoc))))
+     (finder-unknown-keywords)))
    ((string-match-p "\\.el\\'" nodename)
     ;; Display commentary section
     (insert (format "\n\^_\nFile: %s,  Node: %s,  Up: Top\n\n"
--- a/lisp/log-view.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/log-view.el	Wed Mar 17 14:41:32 2010 +0000
@@ -4,7 +4,7 @@
 ;;   2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
-;; Keywords: rcs sccs cvs log version-control tools
+;; Keywords: rcs, sccs, cvs, log, version control, tools
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/net/hmac-def.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/net/hmac-def.el	Wed Mar 17 14:41:32 2010 +0000
@@ -3,7 +3,7 @@
 ;; Copyright (C) 1999, 2001, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
-;; Keywords: HMAC, RFC-2104
+;; Keywords: HMAC, RFC2104
 
 ;; This file is part of GNU Emacs.
 
@@ -22,7 +22,7 @@
 
 ;;; Commentary:
 
-;; This program is implemented from RFC 2104,
+;; This program is implemented from RFC2104,
 ;; "HMAC: Keyed-Hashing for Message Authentication".
 
 ;;; Code:
--- a/lisp/net/hmac-md5.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/net/hmac-md5.el	Wed Mar 17 14:41:32 2010 +0000
@@ -3,7 +3,7 @@
 ;; Copyright (C) 1999, 2001, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
-;; Keywords: HMAC, RFC-2104, HMAC-MD5, MD5, KEYED-MD5, CRAM-MD5
+;; Keywords: HMAC, RFC2104, HMAC-MD5, MD5, KEYED-MD5, CRAM-MD5
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/net/netrc.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/net/netrc.el	Wed Mar 17 14:41:32 2010 +0000
@@ -4,6 +4,7 @@
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
+;;
 ;;  Modularized by Ted Zlatanov <tzz@lifelogs.com>
 ;;  when it was part of Gnus.
 
--- a/lisp/net/secrets.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/net/secrets.el	Wed Mar 17 14:41:32 2010 +0000
@@ -32,8 +32,11 @@
 
 ;; In order to activate this package, you must add the following code
 ;; into your .emacs:
-
+;;
 ;;   (require 'secrets)
+;;
+;; Afterwards, the variable `secrets-enabled' is non-nil when there is
+;; a daemon providing this interface.
 
 ;; The atomic objects to be managed by the Secret Service API are
 ;; secret items, which are something an application wishes to store
@@ -145,6 +148,9 @@
 
 (require 'dbus)
 
+(defvar secrets-enabled nil
+  "Whether there is a daemon offering the Secret Service API."
+
 (defvar secrets-debug t
   "Write debug messages")
 
@@ -383,14 +389,6 @@
     (setq secrets-collection-paths
 	  (delete (car args) secrets-collection-paths)))))
 
-(dbus-register-signal
- :session secrets-service secrets-path
- secrets-interface-service "CollectionCreated" 'secrets-collection-handler)
-
-(dbus-register-signal
- :session secrets-service secrets-path
- secrets-interface-service "CollectionDeleted" 'secrets-collection-handler)
-
 (defun secrets-get-collections ()
   "Return the object paths of all available collections."
   (setq secrets-collection-paths
@@ -667,18 +665,35 @@
 	:session secrets-service item-path
 	secrets-interface-item "Delete")))))
 
-;; We must reset all variables, when there is a new instance of the
-;; "org.freedesktop.secrets" service.
+(when (dbus-ping :session secrets-service 100)
+
+  ;; We must reset all variables, when there is a new instance of the
+  ;; "org.freedesktop.secrets" service.
+  (dbus-register-signal
+   :session dbus-service-dbus dbus-path-dbus
+   dbus-interface-dbus "NameOwnerChanged"
+   (lambda (&rest args)
+     (when secrets-debug (message "Secret Service has changed: %S" args))
+     (setq secrets-session-path secrets-empty-path
+	   secrets-prompt-signal nil
+	   secrets-collection-paths nil))
+   secrets-service)
 
-(dbus-register-signal
- :session dbus-service-dbus dbus-path-dbus
- dbus-interface-dbus "NameOwnerChanged"
- (lambda (&rest args)
-   (when secrets-debug (message "Secret Service has changed: %S" args))
-   (setq secrets-session-path secrets-empty-path
-	 secrets-prompt-signal nil
-	 secrets-collection-paths nil))
- secrets-service)
+  ;; We want to refresh our cache, when there is a change in
+  ;; collections.
+  (dbus-register-signal
+   :session secrets-service secrets-path
+   secrets-interface-service "CollectionCreated"
+   'secrets-collection-handler)
+
+  (dbus-register-signal
+   :session secrets-service secrets-path
+   secrets-interface-service "CollectionDeleted"
+   'secrets-collection-handler)
+
+  ;; We shall inform, whether the secret service is enabled on this
+  ;; machine.
+  (setq secrets-enabled t)))
 
 (provide 'secrets)
 
--- a/lisp/progmodes/mixal-mode.el	Sun Mar 14 00:17:00 2010 +0000
+++ b/lisp/progmodes/mixal-mode.el	Wed Mar 17 14:41:32 2010 +0000
@@ -7,7 +7,7 @@
 ;; Maintainer: Pieter E.J. Pareit <pieter.pareit@gmail.com>
 ;; Created: 09 Nov 2002
 ;; Version: 0.1
-;; Keywords: languages Knuth mix mixal asm mixvm "The Art Of Computer Programming"
+;; Keywords: languages, Knuth, mix, mixal, asm, mixvm, The Art Of Computer Programming
 
 ;; This file is part of GNU Emacs.
 
--- a/src/ChangeLog	Sun Mar 14 00:17:00 2010 +0000
+++ b/src/ChangeLog	Wed Mar 17 14:41:32 2010 +0000
@@ -1,3 +1,9 @@
+2010-03-15  Chong Yidong  <cyd@stupidchicken.com>
+
+	* xfns.c (Fx_create_frame):
+	* frame.c (Vdefault_frame_scroll_bars): Put non-GTK X scroll-bars
+	on left.
+
 2010-03-13  Andreas Politz  <politza@fh-trier.de>  (tiny change)
 
 	* editfns.c (Fformat): Account for string precision when computing
--- a/src/frame.c	Sun Mar 14 00:17:00 2010 +0000
+++ b/src/frame.c	Wed Mar 17 14:41:32 2010 +0000
@@ -4584,8 +4584,14 @@
   DEFVAR_LISP ("default-frame-scroll-bars", &Vdefault_frame_scroll_bars,
 	       doc: /* Default position of scroll bars on this window-system.  */);
 #ifdef HAVE_WINDOW_SYSTEM
+#if defined(HAVE_NTGUI) || defined(NS_IMPL_COCOA) || (defined(USE_GTK) && defined(USE_TOOLKIT_SCROLL_BARS))
+  /* MS-Windows, Mac OS X, and GTK have scroll bars on the right by
+     default.  */
   Vdefault_frame_scroll_bars = Qright;
 #else
+  Vdefault_frame_scroll_bars = Qleft;
+#endif
+#else
   Vdefault_frame_scroll_bars = Qnil;
 #endif
 
--- a/src/xfns.c	Sun Mar 14 00:17:00 2010 +0000
+++ b/src/xfns.c	Wed Mar 17 14:41:32 2010 +0000
@@ -3376,7 +3376,12 @@
 #endif
 		       "internalBorderWidth", "internalBorderWidth",
 		       RES_TYPE_NUMBER);
-  x_default_parameter (f, parms, Qvertical_scroll_bars, Qright,
+  x_default_parameter (f, parms, Qvertical_scroll_bars,
+#if defined(USE_GTK) && defined(USE_TOOLKIT_SCROLL_BARS)
+		       Qright,
+#else
+		       Qleft,
+#endif
 		       "verticalScrollBars", "ScrollBars",
 		       RES_TYPE_SYMBOL);