emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100492: Merge from emacs-23


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100492: Merge from emacs-23
Date: Mon, 31 May 2010 22:34:49 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100492 [merge]
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2010-05-31 22:34:49 -0400
message:
  Merge from emacs-23
modified:
  ChangeLog
  doc/lispref/ChangeLog
  doc/lispref/minibuf.texi
  etc/TODO
  lisp/ChangeLog
  lisp/cedet/ede/cpp-root.el
  lisp/epa.el
  lisp/man.el
  lisp/vc-bzr.el
  src/ChangeLog
  src/config.in
  src/keymap.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2010-05-28 03:52:19 +0000
+++ b/ChangeLog 2010-06-01 02:34:49 +0000
@@ -1,3 +1,8 @@
+2010-05-30  Stefan Monnier  <address@hidden>
+
+       * .bzrignore: Ignore new files from trunk, which appear if you use
+       colocated branches (i.e. "bzr switch").
+
 2010-05-28  Glenn Morris  <address@hidden>
 
        * configure.in: Simplify some of the $canonical tests.

=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2010-05-22 17:16:35 +0000
+++ b/doc/lispref/ChangeLog     2010-06-01 02:34:49 +0000
@@ -1,3 +1,12 @@
+2010-05-30  Juanma Barranquero  <address@hidden>
+
+       * minibuf.texi (Basic Completion): Add missing "@end defun".
+
+2010-05-30  Stefan Monnier  <address@hidden>
+
+       * minibuf.texi (Basic Completion): Document completion-boundaries.
+       (Programmed Completion): Document the new fourth method for boundaries.
+
 2010-05-22  Chong Yidong  <address@hidden>
 
        * display.texi (Image Cache): Update documentation about image

=== modified file 'doc/lispref/minibuf.texi'
--- a/doc/lispref/minibuf.texi  2010-05-03 22:01:23 +0000
+++ b/doc/lispref/minibuf.texi  2010-05-30 22:50:31 +0000
@@ -814,6 +814,25 @@
 it returns, @code{test-completion} returns in turn.
 @end defun
 
address@hidden completion-boundaries string collection predicate suffix
+This function returns the boundaries of the field on which @var{collection}
+will operate, assuming that @var{string} holds the text before point
+and @var{suffix} holds the text after point.
+
+Normally completion operates on the whole string, so for all normal
+collections, this will always return @code{(0 . (length
address@hidden))}.  But more complex completion such as completion on
+files is done one field at a time.  For example, completion of
address@hidden"/usr/sh"} will include @code{"/usr/share/"} but not
address@hidden"/usr/share/doc"} even if @code{"/usr/share/doc"} exists.
+Also @code{all-completions} on @code{"/usr/sh"} will not include
address@hidden"/usr/share/"} but only @code{"share/"}.  So if @var{string} is
address@hidden"/usr/sh"} and @var{suffix} is @code{"e/doc"},
address@hidden will return @code{(5 . 1)} which tells us
+that the @var{collection} will only return completion information that
+pertains to the area after @code{"/usr/"} and before @code{"/doc"}.
address@hidden defun
+
 If you store a completion alist in a variable, you should mark the
 variable as ``risky'' with a address@hidden
 @code{risky-local-variable} property.  @xref{File Local Variables}.
@@ -1618,13 +1637,14 @@
 can supply your own function to compute the completion of a given
 string.  This is called @dfn{programmed completion}.  Emacs uses
 programmed completion when completing file names (@pxref{File Name
-Completion}).
+Completion}), among many other cases.
 
-  To use this feature, pass a symbol with a function definition as the
address@hidden argument to @code{completing-read}.  The function
+  To use this feature, pass a function as the @var{collection}
+argument to @code{completing-read}.  The function
 @code{completing-read} arranges to pass your completion function along
-to @code{try-completion} and @code{all-completions}, which will then let
-your function do all the work.
+to @code{try-completion}, @code{all-completions}, and other basic
+completion functions, which will then let your function do all
+the work.
 
   The completion function should accept three arguments:
 
@@ -1638,10 +1658,14 @@
 and ignore the possible match if the predicate returns @code{nil}.
 
 @item
-A flag specifying the type of operation.
+A flag specifying the type of operation.  The best way to think about
+it is that the function stands for an object (in the
+``object-oriented'' sense of the word), and this third argument
+specifies which method to run.
 @end itemize
 
-  There are three flag values for three operations:
+  There are currently four methods, i.e. four flag values, one for
+  each of the four different basic operations:
 
 @itemize @bullet
 @item
@@ -1663,6 +1687,13 @@
 @code{lambda} specifies @code{test-completion}.  The completion
 function should return @code{t} if the specified string is an exact
 match for some possibility; @code{nil} otherwise.
+
address@hidden
address@hidden(boundaries . SUFFIX)} specifies @code{completion-boundaries}.
+The function should return a value of the form @code{(boundaries
+START . END)} where START is the position of the beginning boundary in
+in the string to complete, and END is the position of the end boundary
+in SUFFIX.
 @end itemize
 
   It would be consistent and clean for completion functions to allow

=== modified file 'etc/TODO'
--- a/etc/TODO  2010-05-24 20:48:46 +0000
+++ b/etc/TODO  2010-06-01 02:34:49 +0000
@@ -410,7 +410,7 @@
   the whole menu bar.  In the mean time, it should process other messages.
 
 ** Get some major packages installed: W3 (development version needs
-  significant work), PSGML, _possibly_ Cedet and ECB.
+  significant work), PSGML, _possibly_ ECB.
   http://lists.gnu.org/archive/html/emacs-devel/2007-05/msg01493.html
   Check the assignments file for other packages which might go in and
   have been missed.

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-05-31 15:15:20 +0000
+++ b/lisp/ChangeLog    2010-06-01 02:34:49 +0000
@@ -1,3 +1,17 @@
+2010-06-01  Stefan Monnier  <address@hidden>
+
+       * vc-bzr.el (vc-bzr-revision-completion-table): Apply
+       `file-directory-p' to the filename part rather than to the whole text.
+
+2010-05-31  Jonathan Marchand  <address@hidden>  (tiny change)
+
+       * cedet/ede/cpp-root.el (ede-set-project-variables): Fix feature name
+       (bug#6231).
+
+2010-05-31  Stefan Monnier  <address@hidden>
+
+       * man.el (Man-completion-table): Let the user type "-k " (bug#6319).
+
 2010-05-31  Drew Adams  <address@hidden>
 
        * files.el (directory-files-no-dot-files-regexp): Doc fix (bug#6298).
@@ -66,6 +80,14 @@
        (ls-lisp-classify): Call ls-lisp-classify-file.
        (insert-directory): Remove blanks from switches.
 
+2010-05-29  Chong Yidong  <address@hidden>
+
+       * ansi-color.el: Delete unused escape sequences (Bug#6085).
+       (ansi-color-drop-regexp): New constant.
+       (ansi-color-apply, ansi-color-filter-region)
+       (ansi-color-apply-on-region): Delete unrecognized control sequences.
+       (ansi-color-apply): Build string list before calling concat.
+
 2010-05-28  Juri Linkov  <address@hidden>
 
        * image-dired.el (image-dired-dired-toggle-marked-thumbs):
@@ -212,6 +234,16 @@
        (smie-next-sexp): Handle nil results from next-token.
        (smie-indent-calculate): Add a new case for special `fixindent' 
comments.
 
+2010-05-27  Chong Yidong  <address@hidden>
+
+       * progmodes/verilog-mode.el (verilog-type-font-keywords):
+       Use font-lock-constant-face, not obsolete font-lock-reference-face.
+
+2010-05-27  Masatake YAMATO  <address@hidden>
+
+       * htmlfontify.el (hfy-face-resolve-face): New function.
+       (hfy-face-to-style): Use it (Bug#6279).
+
 2010-05-26  Stefan Monnier  <address@hidden>
 
        * progmodes/ada-xref.el (ada-gnat-parse-gpr):
@@ -316,7 +348,13 @@
        Register it in composition-function-table for all Hebrew combining
        characters.
 
+2010-05-25  Stefan Monnier  <address@hidden>
+
+       * epa.el (epa--select-keys): Don't explicitly delete the window since
+       that can fail (e.g. sole window in frame).  Use dedication instead.
+
 2010-05-24  Uday S Reddy  <address@hidden>  (tiny change)
+2010-05-19  Uday S Reddy  <address@hidden>  (tiny change)
 
        * textmodes/fill.el (fill-region): Don't fill past the end (bug#6201).
 

=== modified file 'lisp/cedet/ede/cpp-root.el'
--- a/lisp/cedet/ede/cpp-root.el        2010-01-16 02:51:50 +0000
+++ b/lisp/cedet/ede/cpp-root.el        2010-05-31 20:26:56 +0000
@@ -467,7 +467,7 @@
   "Set variables local to PROJECT in BUFFER.
 Also set up the lexical preprocessor map."
   (call-next-method)
-  (when (and (featurep 'semantic/c) (featurep 'semantic/lex-spp))
+  (when (and (featurep 'semantic/bovine/c) (featurep 'semantic/lex-spp))
     (setq semantic-lex-spp-project-macro-symbol-obarray
          (semantic-lex-make-spp-table (oref project spp-table)))
     ))

=== modified file 'lisp/epa.el'
--- a/lisp/epa.el       2010-01-13 08:35:10 +0000
+++ b/lisp/epa.el       2010-05-25 17:53:37 +0000
@@ -508,13 +508,12 @@
       (set-keymap-parent (current-local-map) widget-keymap)
       (setq epa-exit-buffer-function #'abort-recursive-edit)
       (goto-char (point-min))
-      (pop-to-buffer (current-buffer)))
+      (let ((display-buffer-mark-dedicated 'soft))
+        (pop-to-buffer (current-buffer))))
     (unwind-protect
        (progn
          (recursive-edit)
          (epa--marked-keys))
-      (if (get-buffer-window epa-keys-buffer)
-         (delete-window (get-buffer-window epa-keys-buffer)))
       (kill-buffer epa-keys-buffer))))
 
 ;;;###autoload

=== modified file 'lisp/man.el'
--- a/lisp/man.el       2010-04-14 15:07:53 +0000
+++ b/lisp/man.el       2010-06-01 02:34:49 +0000
@@ -759,6 +759,9 @@
   (cond
    ((eq action 'lambda)
     (not (string-match "([^)]*\\'" string)))
+   ((equal string "-k")
+    ;; Let SPC (minibuffer-complete-word) insert the space.
+    (complete-with-action action '("-k ") string pred))
    (t
     (let ((table (cdr Man-completion-cache))
           (section nil)

=== modified file 'lisp/vc-bzr.el'
--- a/lisp/vc-bzr.el    2010-04-21 02:10:50 +0000
+++ b/lisp/vc-bzr.el    2010-06-01 02:34:49 +0000
@@ -999,10 +999,12 @@
        ((string-match "\\`\\(ancestor\\|branch\\|\\(revno:\\)?[-0-9]+:\\):"
                       string)
         (completion-table-with-context (substring string 0 (match-end 0))
-                                       'completion-file-name-table
+                                       (apply-partially
+                                        'completion-table-with-predicate
+                                        'completion-file-name-table
+                                        'file-directory-p t)
                                        (substring string (match-end 0))
-                                       ;; Dropping `pred' for no good reason.
-                                       'file-directory-p
+                                       pred
                                        action))
        ((string-match "\\`\\(before\\):" string)
         (completion-table-with-context (substring string 0 (match-end 0))

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-06-01 01:49:15 +0000
+++ b/src/ChangeLog     2010-06-01 02:34:49 +0000
@@ -3,6 +3,11 @@
        * sysdep.c (child_setup_tty): Move the non-canonical initialization to
        the HAVE_TERMIO where it belongs (bug#6149).
 
+2010-05-31  Stefan Monnier  <address@hidden>
+
+       * keymap.c (Fwhere_is_internal): Fix handling of remapping (in thread
+       of bug#6305).
+
 2010-05-30  Eli Zaretskii  <address@hidden>
 
        * bidi.c (bidi_move_to_visually_next): Make sure the sentinel
@@ -123,6 +128,11 @@
 
        * dispextern.h (init_iterator): Sync prototype with changed definition.
 
+2010-05-20  enami tsugutomo  <address@hidden>
+
+       * s/netbsd.h: If terminfo is found, use it in preference to
+       termcap.  (Bug#6190)  [Backport from trunk]
+
 2010-05-19  Eli Zaretskii  <address@hidden>
 
        Redesign and reimplement bidi-aware edge positions of glyph rows.
@@ -2270,7 +2280,7 @@
        (xg_toggle_notify_cb, xg_set_toolkit_scroll_bar_thumb)
        (xg_create_tool_bar): Remove unused variables.
        (x_wm_set_size_hint): Move declarations before statements.
-       (xg_create_frame_widgets): Remove variable grav,
+       (xg_create_frame_widgets): Remove variable grav.
 
 2010-02-21  Chong Yidong  <address@hidden>
 
@@ -2388,7 +2398,7 @@
 
        * xfns.c (Fx_create_frame): Remove window size matching code from
        2010-01-15.
-       (x_get_current_desktop, x_get_desktop_workarea): Remove
+       (x_get_current_desktop, x_get_desktop_workarea): Remove.
 
 2010-01-27  Jason Rumney  <address@hidden>
 
@@ -3225,7 +3235,7 @@
        fontconfig settings like hinting.
        (font_load_for_lface): If spec had a name in it, store it in entity.
 
-       * emacs.c (main): Call syms_of_xsettings
+       * emacs.c (main): Call syms_of_xsettings.
 
        * config.in: HAVE_GCONF is new.
 
@@ -8810,7 +8820,7 @@
        (composition_adjust_point, Fcomposition_get_gstring): New functions.
        (syms_of_composite): Initialize gstring_hash_table, gstrint_work,
        and gstring_work_headers.  DEFVAR_LISP composition-function-table.
-       Defsubr compostion_get_gstring.
+       Defsubr composition_get_gstring.
 
        * dispextern.h (struct glyph): New union u.cmp.  Delete the member
        cmp_id.

=== modified file 'src/config.in'
--- a/src/config.in     2010-05-20 06:15:26 +0000
+++ b/src/config.in     2010-06-01 02:34:49 +0000
@@ -312,10 +312,10 @@
 /* Define to 1 if you have the <kerberos/krb.h> header file. */
 #undef HAVE_KERBEROS_KRB_H
 
-/* Define to 1 if `e_text' is member of `krb5_error'. */
+/* Define to 1 if `e_text' is a member of `krb5_error'. */
 #undef HAVE_KRB5_ERROR_E_TEXT
 
-/* Define to 1 if `text' is member of `krb5_error'. */
+/* Define to 1 if `text' is a member of `krb5_error'. */
 #undef HAVE_KRB5_ERROR_TEXT
 
 /* Define to 1 if you have the <krb5.h> header file. */
@@ -606,25 +606,25 @@
 /* Define to 1 if you have the `strsignal' function. */
 #undef HAVE_STRSIGNAL
 
-/* Define to 1 if `ifr_addr' is member of `struct ifreq'. */
+/* Define to 1 if `ifr_addr' is a member of `struct ifreq'. */
 #undef HAVE_STRUCT_IFREQ_IFR_ADDR
 
-/* Define to 1 if `ifr_broadaddr' is member of `struct ifreq'. */
+/* Define to 1 if `ifr_broadaddr' is a member of `struct ifreq'. */
 #undef HAVE_STRUCT_IFREQ_IFR_BROADADDR
 
-/* Define to 1 if `ifr_flags' is member of `struct ifreq'. */
+/* Define to 1 if `ifr_flags' is a member of `struct ifreq'. */
 #undef HAVE_STRUCT_IFREQ_IFR_FLAGS
 
-/* Define to 1 if `ifr_hwaddr' is member of `struct ifreq'. */
+/* Define to 1 if `ifr_hwaddr' is a member of `struct ifreq'. */
 #undef HAVE_STRUCT_IFREQ_IFR_HWADDR
 
-/* Define to 1 if `ifr_netmask' is member of `struct ifreq'. */
+/* Define to 1 if `ifr_netmask' is a member of `struct ifreq'. */
 #undef HAVE_STRUCT_IFREQ_IFR_NETMASK
 
-/* Define to 1 if `n_un.n_name' is member of `struct nlist'. */
+/* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */
 #undef HAVE_STRUCT_NLIST_N_UN_N_NAME
 
-/* Define to 1 if `tm_zone' is member of `struct tm'. */
+/* Define to 1 if `tm_zone' is a member of `struct tm'. */
 #undef HAVE_STRUCT_TM_TM_ZONE
 
 /* Define to 1 if `struct utimbuf' is declared by <utime.h>. */
@@ -853,6 +853,9 @@
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
@@ -912,6 +915,28 @@
 /* Define to 1 if using the Motif X toolkit. */
 #undef USE_MOTIF
 
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
 /* Define to 1 if we should use toolkit scroll bars. */
 #undef USE_TOOLKIT_SCROLL_BARS
 
@@ -947,28 +972,6 @@
 /* Define to 1 if you need to in order for `stat' and other things to work. */
 #undef _POSIX_SOURCE
 
-/* Enable extensions on AIX 3, Interix.  */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-/* Enable threading extensions on Solaris.  */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-/* Enable extensions on HP NonStop.  */
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-
-
 /* Define to rpl_ if the getopt replacement functions and variables should be
    used. */
 #undef __GETOPT_PREFIX

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2010-03-03 17:31:50 +0000
+++ b/src/keymap.c      2010-05-31 19:35:04 +0000
@@ -2829,16 +2829,16 @@
   Lisp_Object found = Qnil;
   /* 1 means ignore all menu bindings entirely.  */
   int nomenus = !NILP (firstonly) && !EQ (firstonly, Qnon_ascii);
-  struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
+  struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
   /* List of sequences found via remapping.  Keep them in a separate
      variable, so as to push them later, since we prefer
      non-remapped binding.  */
   Lisp_Object remapped_sequences = Qnil;
   /* Whether or not we're handling remapped sequences.  This is needed
      because remapping is not done recursively by Fcommand_remapping: you
-     can't remap and remapped command.  */
+     can't remap a remapped command.  */
   int remapped = 0;
-  Lisp_Object tem;
+  Lisp_Object tem = Qnil;
 
   /* Refresh the C version of the modifier preference.  */
   where_is_preferred_modifier
@@ -2852,17 +2852,25 @@
   else
     keymaps = Fcurrent_active_maps (Qnil, Qnil);
 
-  GCPRO5 (definition, keymaps, found, sequences, remapped_sequences);
+  GCPRO6 (definition, keymaps, found, sequences, remapped_sequences, tem);
 
-  /* If this command is remapped, then it has no key bindings of its own.
-     FIXME: Actually, this is not quite right: if A is remapped to
-     `definition', then bindings to A will actually bind the key to
-     `definition' despite the remapping from `definition' to something else.
-     Another corner case is if `definition' is remapped to itself.  */
-  if (NILP (no_remap)
-      && SYMBOLP (definition)
-      && !NILP (Fcommand_remapping (definition, Qnil, keymaps)))
-    RETURN_UNGCPRO (Qnil);
+  tem = Fcommand_remapping (definition, Qnil, keymaps);
+  /* If `definition' is remapped to tem', then OT1H no key will run
+     that command (since they will run `tem' instead), so we should
+     return nil; but OTOH all keys bound to `definition' (or to `tem')
+     will run the same command.
+     So for menu-shortcut purposes, we want to find all the keys bound (maybe
+     via remapping) to `tem'.  But for the purpose of finding the keys that
+     run `definition', then we'd want to just return nil.
+     We choose to make it work right for menu-shortcuts, since it's the most
+     common use.
+     Known bugs: if you remap switch-to-buffer to toto, C-h f switch-to-buffer
+     will tell you that switch-to-buffer is bound to C-x b even though C-x b
+     will run toto instead.  And if `toto' is itself remapped to forward-char,
+     then C-h f toto will tell you that it's bound to C-f even though C-f does
+     not run toto and it won't tell you that C-x b does run toto.  */
+  if (NILP (no_remap) && !NILP (tem))
+    definition = tem;
 
   if (SYMBOLP (definition)
       && !NILP (firstonly)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]