Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 100492. ------------------------------------------------------------ revno: 100492 [merge] committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-05-31 22:34:49 -0400 message: Merge from emacs-23 diff: === modified file 'ChangeLog' --- ChangeLog 2010-05-28 03:52:19 +0000 +++ ChangeLog 2010-06-01 02:34:49 +0000 @@ -1,3 +1,8 @@ +2010-05-30 Stefan Monnier + + * .bzrignore: Ignore new files from trunk, which appear if you use + colocated branches (i.e. "bzr switch"). + 2010-05-28 Glenn Morris * configure.in: Simplify some of the $canonical tests. === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2010-05-22 17:16:35 +0000 +++ doc/lispref/ChangeLog 2010-06-01 02:34:49 +0000 @@ -1,3 +1,12 @@ +2010-05-30 Juanma Barranquero + + * minibuf.texi (Basic Completion): Add missing "@end defun". + +2010-05-30 Stefan Monnier + + * minibuf.texi (Basic Completion): Document completion-boundaries. + (Programmed Completion): Document the new fourth method for boundaries. + 2010-05-22 Chong Yidong * display.texi (Image Cache): Update documentation about image === modified file 'doc/lispref/minibuf.texi' --- doc/lispref/minibuf.texi 2010-05-03 22:01:23 +0000 +++ 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 +@defun 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 +@var{suffix}))}. But more complex completion such as completion on +files is done one field at a time. For example, completion of +@code{"/usr/sh"} will include @code{"/usr/share/"} but not +@code{"/usr/share/doc"} even if @code{"/usr/share/doc"} exists. +Also @code{all-completions} on @code{"/usr/sh"} will not include +@code{"/usr/share/"} but only @code{"share/"}. So if @var{string} is +@code{"/usr/sh"} and @var{suffix} is @code{"e/doc"}, +@code{completion-boundaries} 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"}. +@end defun + If you store a completion alist in a variable, you should mark the variable as ``risky'' with a non-@code{nil} @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 -@var{collection} 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. + +@item +@code{(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' --- etc/TODO 2010-05-24 20:48:46 +0000 +++ 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' --- lisp/ChangeLog 2010-05-31 15:15:20 +0000 +++ lisp/ChangeLog 2010-06-01 02:34:49 +0000 @@ -1,3 +1,17 @@ +2010-06-01 Stefan Monnier + + * 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 (tiny change) + + * cedet/ede/cpp-root.el (ede-set-project-variables): Fix feature name + (bug#6231). + +2010-05-31 Stefan Monnier + + * man.el (Man-completion-table): Let the user type "-k " (bug#6319). + 2010-05-31 Drew Adams * 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 + + * 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 * 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 + + * progmodes/verilog-mode.el (verilog-type-font-keywords): + Use font-lock-constant-face, not obsolete font-lock-reference-face. + +2010-05-27 Masatake YAMATO + + * htmlfontify.el (hfy-face-resolve-face): New function. + (hfy-face-to-style): Use it (Bug#6279). + 2010-05-26 Stefan Monnier * 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 + + * 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 (tiny change) +2010-05-19 Uday S Reddy (tiny change) * textmodes/fill.el (fill-region): Don't fill past the end (bug#6201). === modified file 'lisp/cedet/ede/cpp-root.el' --- lisp/cedet/ede/cpp-root.el 2010-01-16 02:51:50 +0000 +++ 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' --- lisp/epa.el 2010-01-13 08:35:10 +0000 +++ 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' --- lisp/man.el 2010-04-14 15:07:53 +0000 +++ 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' --- lisp/vc-bzr.el 2010-04-21 02:10:50 +0000 +++ 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' --- src/ChangeLog 2010-06-01 01:49:15 +0000 +++ 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 + + * keymap.c (Fwhere_is_internal): Fix handling of remapping (in thread + of bug#6305). + 2010-05-30 Eli Zaretskii * 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 + + * s/netbsd.h: If terminfo is found, use it in preference to + termcap. (Bug#6190) [Backport from trunk] + 2010-05-19 Eli Zaretskii 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 @@ -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 @@ -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' --- src/config.in 2010-05-20 06:15:26 +0000 +++ src/config.in 2010-06-01 02:34:49 +0000 @@ -312,10 +312,10 @@ /* Define to 1 if you have the 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 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 . */ @@ -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' --- src/keymap.c 2010-03-03 17:31:50 +0000 +++ 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) ------------------------------------------------------------ revno: 100491 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-05-31 21:49:15 -0400 message: * sysdep.c (child_setup_tty): Move the non-canonical initialization to the HAVE_TERMIO where it belongs. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-31 15:30:13 +0000 +++ src/ChangeLog 2010-06-01 01:49:15 +0000 @@ -1,3 +1,8 @@ +2010-06-01 Stefan Monnier + + * sysdep.c (child_setup_tty): Move the non-canonical initialization to + the HAVE_TERMIO where it belongs (bug#6149). + 2010-05-30 Eli Zaretskii * bidi.c (bidi_move_to_visually_next): Make sure the sentinel === modified file 'src/sysdep.c' --- src/sysdep.c 2010-05-04 07:40:53 +0000 +++ src/sysdep.c 2010-06-01 01:49:15 +0000 @@ -537,15 +537,6 @@ s.main.c_cflag = (s.main.c_cflag & ~CBAUD) | B9600; /* baud rate sanity */ #endif /* AIX */ -#else /* not HAVE_TERMIO */ - - s.main.sg_flags &= ~(ECHO | CRMOD | ANYP | ALLDELAY | RAW | LCASE - | CBREAK | TANDEM); - s.main.sg_flags |= LPASS8; - s.main.sg_erase = 0377; - s.main.sg_kill = 0377; - s.lmode = LLITOUT | s.lmode; /* Don't strip 8th bit */ - /* We used to enable ICANON (and set VEOF to 04), but this leads to problems where process.c wants to send EOFs every once in a while to force the output, which leads to weird effects when the @@ -558,6 +549,15 @@ s.main.c_cc[VMIN] = 1; s.main.c_cc[VTIME] = 0; +#else /* not HAVE_TERMIO */ + + s.main.sg_flags &= ~(ECHO | CRMOD | ANYP | ALLDELAY | RAW | LCASE + | CBREAK | TANDEM); + s.main.sg_flags |= LPASS8; + s.main.sg_erase = 0377; + s.main.sg_kill = 0377; + s.lmode = LLITOUT | s.lmode; /* Don't strip 8th bit */ + #endif /* not HAVE_TERMIO */ EMACS_SET_TTY (out, &s, 0); ------------------------------------------------------------ revno: 100490 committer: Daiki Ueno branch nick: trunk timestamp: Tue 2010-06-01 04:06:33 +0900 message: Mention encryption commands in the Emacs manual. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2010-05-29 15:19:13 +0000 +++ doc/emacs/ChangeLog 2010-05-31 19:06:33 +0000 @@ -1,3 +1,8 @@ +2010-05-31 Daiki Ueno + + * dired.texi (Operating on Files): Mention encryption commands + (Bug#6315). + 2010-05-29 Eli Zaretskii * basic.texi (Moving Point): Update due to renaming of commands bound === modified file 'doc/emacs/dired.texi' --- doc/emacs/dired.texi 2010-04-15 07:54:06 +0000 +++ doc/emacs/dired.texi 2010-05-31 19:06:33 +0000 @@ -688,6 +688,34 @@ Compress the specified files (@code{dired-do-compress}). If the file appears to be a compressed file already, uncompress it instead. +@findex epa-dired-do-decrypt +@kindex :d @r{(Dired)} +@cindex decrypting files (in Dired) +@item :d +Decrypt the specified files (@code{epa-dired-do-decrypt}). +@xref{Dired integration,,, epa, EasyPG Assistant User's Manual}. + +@findex epa-dired-do-verify +@kindex :v @r{(Dired)} +@cindex verifying digital signatures on files (in Dired) +@item :v +Verify digital signatures on the specified files (@code{epa-dired-do-verify}). +@xref{Dired integration,,, epa, EasyPG Assistant User's Manual}. + +@findex epa-dired-do-sign +@kindex :s @r{(Dired)} +@cindex signing files (in Dired) +@item :s +Digitally sign the specified files (@code{epa-dired-do-sign}). +@xref{Dired integration,,, epa, EasyPG Assistant User's Manual}. + +@findex epa-dired-do-encrypt +@kindex :e @r{(Dired)} +@cindex encrypting files (in Dired) +@item :e +Encrypt the specified files (@code{epa-dired-do-encrypt}). +@xref{Dired integration,,, epa, EasyPG Assistant User's Manual}. + @findex dired-do-load @kindex L @r{(Dired)} @cindex loading several files (in Dired) ------------------------------------------------------------ revno: 100489 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2010-05-31 17:30:13 +0200 message: src/ChangeLog: Add missing bug id. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-30 19:01:51 +0000 +++ src/ChangeLog 2010-05-31 15:30:13 +0000 @@ -21,7 +21,7 @@ * font.c (font_delete_unmatched): Check Vface_ignored_fonts. Don't sheck SPEC if it is nil. (font_list_entities): Call font_delete_unmatched if - Vface_ignored_fonts is non-nil. + Vface_ignored_fonts is non-nil. (Bug#6287) 2010-05-28 Glenn Morris ------------------------------------------------------------ revno: 100488 author: Drew Adams committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2010-05-31 17:15:20 +0200 message: * files.el (directory-files-no-dot-files-regexp): Doc fix (bug#6298). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-31 14:13:41 +0000 +++ lisp/ChangeLog 2010-05-31 15:15:20 +0000 @@ -1,3 +1,7 @@ +2010-05-31 Drew Adams + + * files.el (directory-files-no-dot-files-regexp): Doc fix (bug#6298). + 2010-05-31 Juanma Barranquero * subr.el (momentary-string-display): Just use read-event to read === modified file 'lisp/files.el' --- lisp/files.el 2010-05-27 23:30:11 +0000 +++ lisp/files.el 2010-05-31 15:15:20 +0000 @@ -4673,7 +4673,7 @@ (defconst directory-files-no-dot-files-regexp "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*" - "Regexp of file names excluging \".\" an \"..\".") + "Regexp matching any file name except \".\" and \"..\".") (defun delete-directory (directory &optional recursive trash) "Delete the directory named DIRECTORY. Does not follow symlinks. ------------------------------------------------------------ revno: 100487 author: Juanma Barranquero committer: Chong Yidong branch nick: trunk timestamp: Mon 2010-05-31 10:13:41 -0400 message: Fix for momentary-string-display (Bug#6238). * lisp/subr.el (momentary-string-display): Just use read-event to read the exit event (Bug#6238). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-30 19:47:34 +0000 +++ lisp/ChangeLog 2010-05-31 14:13:41 +0000 @@ -1,3 +1,8 @@ +2010-05-31 Juanma Barranquero + + * subr.el (momentary-string-display): Just use read-event to read + the exit event (Bug#6238). + 2010-05-30 Eli Zaretskii * international/mule.el (define-coding-system): Doc fix (bug#6313). === modified file 'lisp/subr.el' --- lisp/subr.el 2010-05-29 15:19:13 +0000 +++ lisp/subr.el 2010-05-31 14:13:41 +0000 @@ -2204,22 +2204,11 @@ (recenter (/ (window-height) 2)))) (message (or message "Type %s to continue editing.") (single-key-description exit-char)) - (let (char) - (if (integerp exit-char) - (condition-case nil - (progn - (setq char (read-char)) - (or (eq char exit-char) - (setq unread-command-events (list char)))) - (error - ;; `exit-char' is a character, hence it differs - ;; from char, which is an event. - (setq unread-command-events (list char)))) - ;; `exit-char' can be an event, or an event description list. - (setq char (read-event)) - (or (eq char exit-char) - (eq char (event-convert-list exit-char)) - (setq unread-command-events (list char)))))) + (let ((event (read-event))) + ;; `exit-char' can be an event, or an event description list. + (or (eq event exit-char) + (eq event (event-convert-list exit-char)) + (setq unread-command-events (list event))))) (delete-overlay ol)))) ------------------------------------------------------------ revno: 100486 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2010-05-30 22:47:34 +0300 message: Fix bug #6313. lisp/international/mule.el (define-coding-system): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-30 18:52:56 +0000 +++ lisp/ChangeLog 2010-05-30 19:47:34 +0000 @@ -1,3 +1,7 @@ +2010-05-30 Eli Zaretskii + + * international/mule.el (define-coding-system): Doc fix (bug#6313). + 2010-05-30 Juanma Barranquero * emulation/cua-base.el: Recognize also `right-word' and `left-word'. === modified file 'lisp/international/mule.el' --- lisp/international/mule.el 2010-05-08 18:47:07 +0000 +++ lisp/international/mule.el 2010-05-30 19:47:34 +0000 @@ -608,9 +608,8 @@ VALUE is the EOL (end-of-line) format of the coding system. It must be one of `unix', `dos', `mac'. The symbol `unix' means Unix-like EOL \(i.e. single LF), `dos' means DOS-like EOL \(i.e. sequence of CR LF), -and `mac' means Mac-like EOL \(i.e. single CR). If omitted, on -decoding by the coding system, Emacs automatically detects the EOL -format of the source text. +and `mac' means Mac-like EOL \(i.e. single CR). If omitted, Emacs +detects the EOL format automatically when decoding. `:charset-list' @@ -664,13 +663,6 @@ VALUE non-nil means that visiting a file with the coding system results in a unibyte buffer. -`:eol-type' - -VALUE must be `unix', `dos', `mac'. The symbol `unix' means Unix-like -EOL (LF), `dos' means DOS-like EOL (CRLF), and `mac' means Mac-like -EOL (CR). If omitted, on decoding, the coding system detects EOL -format automatically, and on encoding, uses Unix-like EOL. - `:mime-charset' VALUE must be a symbol whose name is that of a MIME charset converted ------------------------------------------------------------ revno: 100485 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2010-05-30 22:01:51 +0300 message: Fix crash reported in bug #6306. bidi.c (bidi_move_to_visually_next): Make sure the sentinel state is always cached. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-29 12:51:01 +0000 +++ src/ChangeLog 2010-05-30 19:01:51 +0000 @@ -1,3 +1,8 @@ +2010-05-30 Eli Zaretskii + + * bidi.c (bidi_move_to_visually_next): Make sure the sentinel + state is always cached (bug#6306). + 2010-05-29 Eli Zaretskii Fix cursor motion in bidi-reordered continued lines. === modified file 'src/bidi.c' --- src/bidi.c 2010-05-22 19:32:21 +0000 +++ src/bidi.c 2010-05-30 19:01:51 +0000 @@ -1907,7 +1907,9 @@ if (!bidi_it->first_elt && bidi_it->orig_type == NEUTRAL_B) bidi_line_init (bidi_it); - /* Prepare the sentinel iterator state. */ + /* Prepare the sentinel iterator state, and cache it. When we bump + into it, scanning backwards, we'll know that the last non-base + level is exhausted. */ if (bidi_cache_idx == 0) { bidi_copy_it (&sentinel, bidi_it); @@ -1918,6 +1920,7 @@ sentinel.ch = '\n'; /* doesn't matter, but why not? */ sentinel.ch_len = 1; } + bidi_cache_iterator_state (&sentinel, 1); } old_level = bidi_it->resolved_level; @@ -1933,11 +1936,6 @@ int incr = ascending ? 1 : -1; int expected_next_level = old_level + incr; - /* If we don't have anything cached yet, we need to cache the - sentinel state, since we'll need it to record where to jump - when the last non-base level is exhausted. */ - if (bidi_cache_idx == 0) - bidi_cache_iterator_state (&sentinel, 1); /* Jump (or walk) to the other edge of this level. */ bidi_find_other_level_edge (bidi_it, level_to_search, !ascending); /* Switch scan direction and peek at the next character in the ------------------------------------------------------------ revno: 100484 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2010-05-30 20:52:56 +0200 message: emulation/cua-base.el: Recognize also `right-word' and `left-word'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-30 14:17:31 +0000 +++ lisp/ChangeLog 2010-05-30 18:52:56 +0000 @@ -1,3 +1,8 @@ +2010-05-30 Juanma Barranquero + + * emulation/cua-base.el: Recognize also `right-word' and `left-word'. + Suggested by Eli Zaretskii . + 2010-05-30 Stefan Monnier * minibuffer.el (completion-file-name-table): Don't return a boundary === modified file 'lisp/emulation/cua-base.el' --- lisp/emulation/cua-base.el 2010-05-30 04:44:46 +0000 +++ lisp/emulation/cua-base.el 2010-05-30 18:52:56 +0000 @@ -1498,6 +1498,7 @@ (dolist (cmd '(forward-char backward-char right-char left-char + right-word left-word next-line previous-line forward-word backward-word end-of-line beginning-of-line ------------------------------------------------------------ revno: 100483 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2010-05-30 10:17:31 -0400 message: * lisp/minibuffer.el (completion-file-name-table): Don't return a boundary past the end of `string'. (completion--file-name-table): Delegate to completion-file-name-table for the `boundaries' case. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-30 04:44:46 +0000 +++ lisp/ChangeLog 2010-05-30 14:17:31 +0000 @@ -1,3 +1,10 @@ +2010-05-30 Stefan Monnier + + * minibuffer.el (completion-file-name-table): Don't return a boundary + past the end of `string' (bug#6299). + (completion--file-name-table): Delegate to completion-file-name-table + for the `boundaries' case. + 2010-05-30 Juanma Barranquero * emulation/cua-base.el: Recognize `right-char' and `left-char' as === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2010-05-12 00:39:46 +0000 +++ lisp/minibuffer.el 2010-05-30 14:17:31 +0000 @@ -1342,12 +1342,19 @@ ((eq (car-safe action) 'boundaries) (let ((start (length (file-name-directory string))) (end (string-match-p "/" (cdr action)))) - (list* 'boundaries start end))) + (list* 'boundaries + ;; if `string' is "C:" in w32, (file-name-directory string) + ;; returns "C:/", so `start' is 3 rather than 2. + ;; Not quite sure what is The Right Fix, but clipping it + ;; back to 2 will work for this particular case. We'll + ;; see if we can come up with a better fix when we bump + ;; into more such problematic cases. + (min start (length string)) end))) - ((eq action 'lambda) - (if (zerop (length string)) - nil ;Not sure why it's here, but it probably doesn't harm. - (funcall (or pred 'file-exists-p) string))) + ((eq action 'lambda) + (if (zerop (length string)) + nil ;Not sure why it's here, but it probably doesn't harm. + (funcall (or pred 'file-exists-p) string))) (t (let* ((name (file-name-nondirectory string)) @@ -1395,19 +1402,20 @@ (cond ((eq (car-safe action) 'boundaries) ;; For the boundaries, we can't really delegate to - ;; completion-file-name-table and then fix them up, because it - ;; would require us to track the relationship between `str' and + ;; substitute-in-file-name+completion-file-name-table and then fix + ;; them up (as we do for the other actions), because it would + ;; require us to track the relationship between `str' and ;; `string', which is difficult. And in any case, if - ;; substitute-in-file-name turns "fo-$TO-ba" into "fo-o/b-ba", there's - ;; no way for us to return proper boundaries info, because the - ;; boundary is not (yet) in `string'. - ;; FIXME: Actually there is a way to return correct boundaries info, - ;; at the condition of modifying the all-completions return accordingly. - (let ((start (length (file-name-directory string))) - (end (string-match-p "/" (cdr action)))) - (list* 'boundaries start end))) + ;; substitute-in-file-name turns "fo-$TO-ba" into "fo-o/b-ba", + ;; there's no way for us to return proper boundaries info, because + ;; the boundary is not (yet) in `string'. + ;; + ;; FIXME: Actually there is a way to return correct boundaries + ;; info, at the condition of modifying the all-completions + ;; return accordingly. But for now, let's not bother. + (completion-file-name-table string pred action)) - (t + (t (let* ((default-directory (if (stringp pred) ;; It used to be that `pred' was abused to pass `dir' ------------------------------------------------------------ revno: 100482 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2010-05-30 06:44:46 +0200 message: emulation/cua-base.el: Recognize `right-char', `left-char' as movement commands. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-30 02:51:53 +0000 +++ lisp/ChangeLog 2010-05-30 04:44:46 +0000 @@ -1,5 +1,8 @@ 2010-05-30 Juanma Barranquero + * emulation/cua-base.el: Recognize `right-char' and `left-char' as + movement commands. + * progmodes/ada-xref.el (ada-prj-ada-project-path-sep): Set from `path-separator', but maintain compatibility with Emacs 20.2. === modified file 'lisp/emulation/cua-base.el' --- lisp/emulation/cua-base.el 2010-05-10 14:37:59 +0000 +++ lisp/emulation/cua-base.el 2010-05-30 04:44:46 +0000 @@ -1497,6 +1497,7 @@ (dolist (cmd '(forward-char backward-char + right-char left-char next-line previous-line forward-word backward-word end-of-line beginning-of-line ------------------------------------------------------------ revno: 100481 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2010-05-30 04:51:53 +0200 message: progmodes/ada-xref.el (ada-prj-ada-project-path-sep): Set from `path-separator'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-29 23:50:47 +0000 +++ lisp/ChangeLog 2010-05-30 02:51:53 +0000 @@ -1,3 +1,8 @@ +2010-05-30 Juanma Barranquero + + * progmodes/ada-xref.el (ada-prj-ada-project-path-sep): Set from + `path-separator', but maintain compatibility with Emacs 20.2. + 2010-05-29 Chong Yidong * server.el (server-process-filter): Receive parent-id argument === modified file 'lisp/progmodes/ada-xref.el' --- lisp/progmodes/ada-xref.el 2010-05-26 14:19:15 +0000 +++ lisp/progmodes/ada-xref.el 2010-05-30 02:51:53 +0000 @@ -108,10 +108,9 @@ :type 'string :group 'ada) (defcustom ada-prj-ada-project-path-sep - (if (or (equal system-type 'windows-nt) - (equal system-type 'ms-dos)) - ";" - ":") + (cond ((boundp 'path-separator) path-separator) ; 20.3+ + ((memq system-type '(windows-nt ms-dos)) ";") + (t ":")) "Default separator for ada_project_path project variable." :type 'string :group 'ada) ------------------------------------------------------------ revno: 100480 committer: Chong Yidong branch nick: trunk timestamp: Sat 2010-05-29 19:50:47 -0400 message: Add --parent-id argument to emacsclient. * lib-src/emacsclient.c (longopts, decode_options, print_help_and_exit): New arg `-parent-id'. (main): Send parent-id to Emacs. * lisp/server.el (server-process-filter): Receive parent-id argument from emacsclient. (server-create-window-system-frame): New arg. Pass parent-id as frame parameter. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-05-27 23:30:11 +0000 +++ etc/NEWS 2010-05-29 23:50:47 +0000 @@ -43,6 +43,10 @@ * Changes in Emacs 24.1 +** New emacsclient argument --parent-id ID can be used to open a +client frame in parent X window ID, via XEmbed. This works like the +--parent-id argument to Emacs. + ** Completion can cycle, depending on completion-cycle-threshold. ** auto-mode-case-fold is now enabled by default. === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2010-05-27 05:43:27 +0000 +++ lib-src/ChangeLog 2010-05-29 23:50:47 +0000 @@ -1,3 +1,9 @@ +2010-05-29 Chong Yidong + + * emacsclient.c (longopts, decode_options, print_help_and_exit): + New arg `-parent-id'. + (main): Send parent-id to Emacs. + 2010-05-27 Glenn Morris * Makefile.in (distclean): No more Makefile.c. === modified file 'lib-src/emacsclient.c' --- lib-src/emacsclient.c 2010-04-02 03:10:33 +0000 +++ lib-src/emacsclient.c 2010-05-29 23:50:47 +0000 @@ -138,6 +138,9 @@ /* The display on which Emacs should work. --display. */ char *display = NULL; +/* The parent window ID, if we are opening a frame via XEmbed. */ +char *parent_id = NULL; + /* Nonzero means open a new Emacs frame on the current terminal. */ int tty = 0; @@ -173,6 +176,7 @@ #ifndef WINDOWSNT { "display", required_argument, NULL, 'd' }, #endif + { "parent-id", required_argument, NULL, 'p' }, { 0, 0, 0, 0 } }; @@ -583,6 +587,11 @@ current_frame = 0; break; + case 'p': + parent_id = optarg; + current_frame = 0; + break; + case 'H': print_help_and_exit (); break; @@ -656,7 +665,8 @@ -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ -n, --no-wait Don't wait for the server to return\n\ -d DISPLAY, --display=DISPLAY\n\ - Visit the file in the given display\n" + Visit the file in the given display\n\ +--parent-id=ID Open in parent window ID, via XEmbed\n" #ifndef NO_SOCKETS_IN_FILE_SYSTEM "-s SOCKET, --socket-name=SOCKET\n\ Set filename of the UNIX socket for communication\n" @@ -1620,6 +1630,13 @@ send_to_emacs (emacs_socket, " "); } + if (parent_id) + { + send_to_emacs (emacs_socket, "-parent-id "); + quote_argument (emacs_socket, parent_id); + send_to_emacs (emacs_socket, " "); + } + /* If using the current frame, send tty information to Emacs anyway. In daemon mode, Emacs may need to occupy this tty if no other frame is available. */ === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-29 18:25:00 +0000 +++ lisp/ChangeLog 2010-05-29 23:50:47 +0000 @@ -1,5 +1,12 @@ 2010-05-29 Chong Yidong + * server.el (server-process-filter): Receive parent-id argument + from emacsclient. + (server-create-window-system-frame): New arg. Pass parent-id as + frame parameter. + +2010-05-29 Chong Yidong + * ansi-color.el: Delete unused escape sequences (Bug#6085). (ansi-color-drop-regexp): New constant. (ansi-color-apply, ansi-color-filter-region) === modified file 'lisp/server.el' --- lisp/server.el 2010-05-27 23:30:11 +0000 +++ lisp/server.el 2010-05-29 23:50:47 +0000 @@ -711,7 +711,7 @@ (number-to-string (emacs-pid)) "\n")) frame)) -(defun server-create-window-system-frame (display nowait proc) +(defun server-create-window-system-frame (display nowait proc parent-id) (add-to-list 'frame-inherited-parameters 'client) (if (not (fboundp 'make-frame-on-display)) (progn @@ -727,12 +727,14 @@ (let* ((params `((client . ,(if nowait 'nowait proc)) ;; This is a leftover, see above. (environment . ,(process-get proc 'env)))) - (frame (make-frame-on-display - (or display - (frame-parameter nil 'display) - (getenv "DISPLAY") - (error "Please specify display")) - params))) + (display (or display + (frame-parameter nil 'display) + (getenv "DISPLAY") + (error "Please specify display"))) + frame) + (if parent-id + (push (cons 'parent-id (string-to-number parent-id)) params)) + (setq frame (make-frame-on-display display params)) (server-log (format "%s created" frame) proc) (select-frame frame) (process-put proc 'frame frame) @@ -900,15 +902,16 @@ (coding-system (and (default-value 'enable-multibyte-characters) (or file-name-coding-system default-file-name-coding-system))) - nowait ; t if emacsclient does not want to wait for us. - frame ; The frame that was opened for the client (if any). - display ; Open the frame on this display. - dontkill ; t if the client should not be killed. + nowait ; t if emacsclient does not want to wait for us. + frame ; Frame opened for the client (if any). + display ; Open frame on this display. + parent-id ; Window ID for XEmbed + dontkill ; t if client should not be killed. commands dir use-current-frame - tty-name ;nil, `window-system', or the tty name. - tty-type ;string. + tty-name ; nil, `window-system', or the tty name. + tty-type ; string. files filepos command-line-args-left @@ -935,6 +938,12 @@ (setq display (pop command-line-args-left)) (if (zerop (length display)) (setq display nil))) + ;; -parent-id ID: + ;; Open X frame within window ID, via XEmbed. + ((and (equal "-parent-id" arg) command-line-args-left) + (setq parent-id (pop command-line-args-left)) + (if (zerop (length parent-id)) (setq parent-id nil))) + ;; -window-system: Open a new X frame. ((equal "-window-system" arg) (setq dontkill t) @@ -1039,7 +1048,8 @@ (setq tty-name nil tty-type nil) (if display (server-select-display display))) ((eq tty-name 'window-system) - (server-create-window-system-frame display nowait proc)) + (server-create-window-system-frame display nowait proc + parent-id)) ;; When resuming on a tty, tty-name is nil. (tty-name (server-create-tty-frame tty-name tty-type proc)))) ------------------------------------------------------------ revno: 100479 committer: Glenn Morris branch nick: trunk timestamp: Sat 2010-05-29 11:57:11 -0700 message: Regenerate configure. diff: === modified file 'configure' --- configure 2010-05-27 05:43:27 +0000 +++ configure 2010-05-29 18:57:11 +0000 @@ -2724,7 +2724,7 @@ ### the appropriate operating system and machine description files. ### You would hope that you could choose an m/*.h file pretty much -### based on the machine portion of the configuration name, and an s- +### based on the machine portion of the configuration name, and an s/*.h ### file based on the operating system portion. However, it turns out ### that each m/*.h file is pretty manufacturer-specific - for ### example mips.h is MIPS @@ -2736,10 +2736,6 @@ ### /etc/MACHINES doesn't say anything about version numbers, be ### prepared to handle anything reasonably. If version numbers ### matter, be sure /etc/MACHINES says something about it. -### -### Eric Raymond says we should accept strings like "sysvr4" to mean -### "System V Release 4"; he writes, "The old convention encouraged -### confusion between `system' and `release' levels'." machine='' opsys='' unported=no case "${canonical}" in @@ -2748,14 +2744,14 @@ *-*-freebsd* ) opsys=freebsd case "${canonical}" in - alpha*-*-freebsd*) machine=alpha ;; - arm*-*-freebsd*) machine=arm ;; - ia64-*-freebsd*) machine=ia64 ;; - sparc-*-freebsd*) machine=sparc ;; - sparc64-*-freebsd*) machine=sparc ;; - powerpc-*-freebsd*) machine=macppc ;; - i[3456]86-*-freebsd*) machine=intel386 ;; - amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;; + alpha*) machine=alpha ;; + amd64-*|x86_64-*) machine=amdx86-64 ;; + arm*) machine=arm ;; + ia64-*) machine=ia64 ;; + i[3456]86-*) machine=intel386 ;; + powerpc-*) machine=macppc ;; + sparc-*) machine=sparc ;; + sparc64-*) machine=sparc ;; esac ;; @@ -2763,13 +2759,13 @@ *-*-kfreebsd*gnu* ) opsys=gnu-kfreebsd case "${canonical}" in - alpha*-*-kfreebsd*) machine=alpha ;; - ia64-*-kfreebsd*) machine=ia64 ;; - sparc-*-kfreebsd*) machine=sparc ;; - sparc64-*-kfreebsd*) machine=sparc ;; - powerpc-*-kfreebsd*) machine=macppc ;; - i[3456]86-*-kfreebsd*) machine=intel386 ;; - amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;; + alpha*) machine=alpha ;; + amd64-*|x86_64-*) machine=amdx86-64 ;; + ia64-*) machine=ia64 ;; + i[3456]86-*) machine=intel386 ;; + powerpc-*) machine=macppc ;; + sparc-*) machine=sparc ;; + sparc64-*) machine=sparc ;; esac ;; @@ -2777,18 +2773,17 @@ *-*-netbsd* ) opsys=netbsd case "${canonical}" in - alpha*-*-netbsd*) machine=alpha ;; - i[3456]86-*-netbsd*) machine=intel386 ;; - mips-*-netbsd*) machine=mips ;; - mipsel-*-netbsd*) machine=mips ;; - mipseb-*-netbsd*) machine=mips ;; - powerpc-*-netbsd*) machine=macppc ;; - sparc*-*-netbsd*) machine=sparc ;; - vax-*-netbsd*) machine=vax ;; - arm-*-netbsd*) machine=arm ;; - x86_64-*-netbsd*) machine=amdx86-64 ;; - hppa-*-netbsd*) machine=hp800 ;; - m68k-*-netbsd*) machine=m68k ;; + alpha*) machine=alpha ;; + x86_64-*) machine=amdx86-64 ;; + arm-*) machine=arm ;; + hppa-*) machine=hp800 ;; + i[3456]86-*) machine=intel386 ;; + m68k-*) machine=m68k ;; + powerpc-*) machine=macppc ;; + mips-*) machine=mips ;; + mipse[bl]-*) machine=mips ;; + sparc*-) machine=sparc ;; + vax-*) machine=vax ;; esac ;; @@ -2796,14 +2791,14 @@ *-*-openbsd* ) opsys=openbsd case "${canonical}" in - alpha*-*-openbsd*) machine=alpha ;; - arm-*-openbsd*) machine=arm ;; - i386-*-openbsd*) machine=intel386 ;; - powerpc-*-openbsd*) machine=macppc ;; - sparc*-*-openbsd*) machine=sparc ;; - vax-*-openbsd*) machine=vax ;; - x86_64-*-openbsd*) machine=amdx86-64 ;; - hppa-*-openbsd*) machine=hp800 ;; + alpha*) machine=alpha ;; + x86_64-*) machine=amdx86-64 ;; + arm-*) machine=arm ;; + hppa-*) machine=hp800 ;; + i386-*) machine=intel386 ;; + powerpc-*) machine=macppc ;; + sparc*) machine=sparc ;; + vax-*) machine=vax ;; esac ;; @@ -2854,16 +2849,16 @@ s390x-*-linux-gnu* ) machine=ibms390x opsys=gnu-linux ;; - rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* ) - machine=ibmrs6000 opsys=aix4-2 - ;; - rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* ) - machine=ibmrs6000 opsys=aix4-2 - ;; - rs6000-ibm-aix5* | powerpc-ibm-aix5* ) - machine=ibmrs6000 opsys=aix4-2 - ;; - rs6000-ibm-aix6* | powerpc-ibm-aix6* ) + rs6000-ibm-aix4.[23]* ) + machine=ibmrs6000 opsys=aix4-2 + ;; + powerpc-ibm-aix4.[23]* ) + machine=ibmrs6000 opsys=aix4-2 + ;; + rs6000-ibm-aix[56]* ) + machine=ibmrs6000 opsys=aix4-2 + ;; + powerpc-ibm-aix[56]* ) machine=ibmrs6000 opsys=aix4-2 ;; @@ -2932,7 +2927,7 @@ machine=ia64 opsys=gnu-linux ;; - ## Intel 386 machines where we don't care about the manufacturer + ## Intel 386 machines where we don't care about the manufacturer. i[3456]86-*-* ) machine=intel386 case "${canonical}" in ------------------------------------------------------------ revno: 100478 committer: Glenn Morris branch nick: trunk timestamp: Sat 2010-05-29 11:54:16 -0700 message: Add some comments related to how epaths.h gets built. diff: === modified file 'Makefile.in' --- Makefile.in 2010-05-17 21:02:06 +0000 +++ Makefile.in 2010-05-29 18:54:16 +0000 @@ -279,6 +279,9 @@ removenullpaths=sed -e 's/^://g' -e 's/:$$//g' -e 's/::/:/g' # Generate epaths.h from epaths.in. This target is invoked by `configure'. +# See comments in configure.in for why it is done this way, as opposed +# to just letting configure generate epaths.h from epaths.in in a +# similar way to how Makefile is made from Makefile.in. epaths-force: FRC @(lisppath=`echo ${lisppath} | ${removenullpaths}` ; \ buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \ === modified file 'configure.in' --- configure.in 2010-05-28 04:25:06 +0000 +++ configure.in 2010-05-29 18:54:16 +0000 @@ -32,6 +32,10 @@ dnl --program-transform-name options AC_ARG_PROGRAM +dnl It is important that variables on the RHS not be expanded here, +dnl hence the single quotes. This is per the GNU coding standards, see +dnl (autoconf) Installation Directory Variables +dnl See also epaths.h below. lispdir='${datadir}/emacs/${version}/lisp' locallisppath='${datadir}/emacs/${version}/site-lisp:'\ '${datadir}/emacs/site-lisp' @@ -3750,6 +3754,14 @@ test "${exec_prefix}" != NONE && exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`] +dnl You might wonder (I did) why epaths.h is generated by running make, +dnl rather than just letting configure generate it from epaths.in. +dnl One reason is that the various paths are not fully expanded (see above); +dnl eg gamedir=${prefix}/var/games/emacs. +dnl Secondly, the GNU Coding standards require that one should be able +dnl to run `make prefix=/some/where/else' and override the values set +dnl by configure. This also explains the `move-if-change' test and +dnl the use of force in the `epaths-force' rule in Makefile.in. AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile \ doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ doc/lispref/Makefile src/Makefile \ ------------------------------------------------------------ revno: 100477 committer: Chong Yidong branch nick: trunk timestamp: Sat 2010-05-29 14:25:00 -0400 message: * 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. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-29 15:19:13 +0000 +++ lisp/ChangeLog 2010-05-29 18:25:00 +0000 @@ -1,3 +1,12 @@ +2010-05-29 Chong Yidong + + * 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-29 Eli Zaretskii Bidi-sensitive word movement with arrow keys. === modified file 'lisp/ansi-color.el' --- lisp/ansi-color.el 2010-01-13 08:35:10 +0000 +++ lisp/ansi-color.el 2010-05-29 18:25:00 +0000 @@ -142,6 +142,10 @@ (defconst ansi-color-regexp "\033\\[\\([0-9;]*m\\)" "Regexp that matches SGR control sequences.") +(defconst ansi-color-drop-regexp + "\033\\[\\([ABCDsuK]\\|2J\\|=[0-9]+[hI]\\|[0-9;]*[Hf]\\)" + "Regexp that matches ANSI control sequences to silently drop.") + (defconst ansi-color-parameter-regexp "\\([0-9]*\\)[m;]" "Regexp that matches SGR control sequence parameters.") @@ -154,7 +158,7 @@ If nil, do nothing. If the symbol `filter', then filter all SGR control sequences. If anything else (such as t), then translate SGR control sequences -into text-properties. +into text properties. In order for this to have any effect, `ansi-color-process-output' must be in `comint-output-filter-functions'. @@ -188,12 +192,12 @@ ;;;###autoload (defun ansi-color-process-output (ignored) - "Maybe translate SGR control sequences of comint output into text-properties. + "Maybe translate SGR control sequences of comint output into text properties. Depending on variable `ansi-color-for-comint-mode' the comint output is either not processed, SGR control sequences are filtered using `ansi-color-filter-region', or SGR control sequences are translated into -text-properties using `ansi-color-apply-on-region'. +text properties using `ansi-color-apply-on-region'. The comint output is assumed to lie between the marker `comint-last-output-start' and the process-mark. @@ -217,15 +221,15 @@ (defun ansi-color-unfontify-region (beg end &rest xemacs-stuff) "Replacement function for `font-lock-default-unfontify-region'. -As text-properties are implemented using extents in XEmacs, this +As text properties are implemented using extents in XEmacs, this function is probably not needed. In Emacs, however, things are a bit different: When font-lock is active in a buffer, you cannot simply add -face text-properties to the buffer. Font-lock will remove the face -text-property using `font-lock-unfontify-region-function'. If you want +face text properties to the buffer. Font-lock will remove the face +text property using `font-lock-unfontify-region-function'. If you want to insert the strings returned by `ansi-color-apply' into such buffers, you must set `font-lock-unfontify-region-function' to `ansi-color-unfontify-region'. This function will not remove all face -text-properties unconditionally. It will keep the face text-properties +text properties unconditionally. It will keep the face text properties if the property `ansi-color' is set. The region from BEG to END is unfontified. XEMACS-STUFF is ignored. @@ -262,7 +266,7 @@ (make-variable-buffer-local 'ansi-color-context) (defun ansi-color-filter-apply (string) - "Filter out all SGR control sequences from STRING. + "Filter out all ANSI control sequences from STRING. Every call to this function will set and use the buffer-local variable `ansi-color-context' to save partial escape sequences. This information @@ -292,10 +296,11 @@ result)) (defun ansi-color-apply (string) - "Translates SGR control sequences into text-properties. + "Translates SGR control sequences into text properties. +Delete all other control sequences without processing them. Applies SGR control sequences setting foreground and background colors -to STRING using text-properties and returns the result. The colors used +to STRING using text properties and returns the result. The colors used are given in `ansi-color-faces-vector' and `ansi-color-names-vector'. See function `ansi-color-apply-sequence' for details. @@ -309,23 +314,27 @@ You cannot insert the strings returned into buffers using font-lock. See `ansi-color-unfontify-region' for a way around this." (let ((face (car ansi-color-context)) - (start 0) end escape-sequence result) - ;; if context was saved and is a string, prepend it + (start 0) end escape-sequence result + colorized-substring) + ;; If context was saved and is a string, prepend it. (if (cadr ansi-color-context) (setq string (concat (cadr ansi-color-context) string) ansi-color-context nil)) - ;; find the next escape sequence + ;; Find the next escape sequence. (while (setq end (string-match ansi-color-regexp string start)) - ;; store escape sequence (setq escape-sequence (match-string 1 string)) - ;; colorize the old block from start to end using old face + ;; Colorize the old block from start to end using old face. (when face (put-text-property start end 'ansi-color t string) (put-text-property start end 'face face string)) - (setq result (concat result (substring string start end)) + (setq colorized-substring (substring string start end) start (match-end 0)) - ;; create new face by applying all the parameters in the escape - ;; sequence + ;; Eliminate unrecognized ANSI sequences. + (while (string-match ansi-color-drop-regexp colorized-substring) + (setq colorized-substring + (replace-match "" nil nil colorized-substring))) + (push colorized-substring result) + ;; Create new face, by applying escape sequence parameters. (setq face (ansi-color-apply-sequence escape-sequence face))) ;; if the rest of the string should have a face, put it there (when face @@ -335,13 +344,13 @@ (let (fragment) (if (string-match "\033" string start) (let ((pos (match-beginning 0))) - (setq fragment (substring string pos) - result (concat result (substring string start pos)))) - (setq result (concat result (substring string start)))) + (setq fragment (substring string pos)) + (push (substring string start pos) result)) + (push (substring string start) result)) (if (or face fragment) (setq ansi-color-context (list face fragment)) (setq ansi-color-context nil))) - result)) + (apply 'concat (nreverse result)))) ;; Working with regions @@ -354,7 +363,7 @@ (make-variable-buffer-local 'ansi-color-context-region) (defun ansi-color-filter-region (begin end) - "Filter out all SGR control sequences from region BEGIN to END. + "Filter out all ANSI control sequences from region BEGIN to END. Every call to this function will set and use the buffer-local variable `ansi-color-context-region' to save position. This information will be @@ -365,23 +374,27 @@ (start (or (cadr ansi-color-context-region) begin))) (save-excursion (goto-char start) - ;; find the next escape sequence + ;; Delete unrecognized escape sequences. + (while (re-search-forward ansi-color-drop-regexp end-marker t) + (replace-match "")) + (goto-char start) + ;; Delete SGR escape sequences. (while (re-search-forward ansi-color-regexp end-marker t) - ;; delete the escape sequence (replace-match "")) - ;; save context, add the remainder of the string to the result - (if (re-search-forward "\033" end-marker t) - (setq ansi-color-context-region (list nil (match-beginning 0))) - (setq ansi-color-context-region nil))))) + ;; save context, add the remainder of the string to the result + (if (re-search-forward "\033" end-marker t) + (setq ansi-color-context-region (list nil (match-beginning 0))) + (setq ansi-color-context-region nil))))) (defun ansi-color-apply-on-region (begin end) "Translates SGR control sequences into overlays or extents. +Delete all other control sequences without processing them. -Applies SGR control sequences setting foreground and background colors -to text in region between BEGIN and END using extents or overlays. -Emacs will use overlays, XEmacs will use extents. The colors used are -given in `ansi-color-faces-vector' and `ansi-color-names-vector'. See -function `ansi-color-apply-sequence' for details. +SGR control sequences are applied by setting foreground and +background colors to the text between BEGIN and END using +overlays. The colors used are given in `ansi-color-faces-vector' +and `ansi-color-names-vector'. See `ansi-color-apply-sequence' +for details. Every call to this function will set and use the buffer-local variable `ansi-color-context-region' to save position and current face. This @@ -394,11 +407,16 @@ (copy-marker begin))) (end-marker (copy-marker end)) escape-sequence) - (save-excursion - (goto-char start-marker) - ;; find the next escape sequence + ;; First, eliminate unrecognized ANSI control sequences. + (save-excursion + (goto-char start-marker) + (while (re-search-forward ansi-color-drop-regexp end-marker t) + (replace-match ""))) + (save-excursion + (goto-char start-marker) + ;; Find the next SGR sequence. (while (re-search-forward ansi-color-regexp end-marker t) - ;; colorize the old block from start to end using old face + ;; Colorize the old block from start to end using old face. (when face (ansi-color-set-extent-face (ansi-color-make-extent start-marker (match-beginning 0)) ------------------------------------------------------------ revno: 100476 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2010-05-29 18:19:13 +0300 message: Implement bidi-sensitive word movement with arrow keys. lisp/subr.el (right-arrow-command, left-arrow-command): Move to bindings.el. lisp/bindings.el (right-char, left-char): Move from subr.el and rename from right-arrow-command and left-arrow-command. (right-word, left-word): New functions. (global-map) : Bind to right-char. (global-map) : Bind to left-char. (global-map) : Bind to right-word. (global-map) : Bind to left-word. doc/emacs/basic.texi (Moving Point): Update due to renaming of commands bound to arrows. Document bidi-aware behavior of C- and C-. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2010-05-18 11:49:10 +0000 +++ doc/emacs/ChangeLog 2010-05-29 15:19:13 +0000 @@ -1,3 +1,8 @@ +2010-05-29 Eli Zaretskii + + * basic.texi (Moving Point): Update due to renaming of commands bound + to arrows. Document bidi-aware behavior of C- and C-. + 2010-05-18 Eli Zaretskii * display.texi (Fringes): Document reversal of fringe arrows for R2L === modified file 'doc/emacs/basic.texi' --- doc/emacs/basic.texi 2010-05-18 10:58:56 +0000 +++ doc/emacs/basic.texi 2010-05-29 15:19:13 +0000 @@ -146,8 +146,8 @@ @findex move-end-of-line @findex forward-char @findex backward-char -@findex right-arrow-command -@findex left-arrow-command +@findex right-char +@findex left-char @findex next-line @findex previous-line @findex beginning-of-buffer @@ -165,7 +165,7 @@ @item C-f Move forward one character (@code{forward-char}). @item @key{right} -Move one character to the right (@code{right-arrow-command}). This +Move one character to the right (@code{right-char}). This moves one character forward in text that is read in the usual left-to-right direction, but one character @emph{backward} if the text is read right-to-left, as needed for right-to-left scripts such as @@ -173,17 +173,23 @@ @item C-b Move backward one character (@code{backward-char}). @item @key{left} -Move one character to the left (@code{left-arrow-command}). This +Move one character to the left (@code{left-char}). This moves one character backward in left-to-right text and one character forward in right-to-left text. @item M-f @itemx M-@key{right} -@itemx C-@key{right} Move forward one word (@code{forward-word}). +@item C-@key{right} +Move one word to the right (@code{right-word}). This moves one word +forward in left-to-right text and one word backward in right-to-left +text. @item M-b @itemx M-@key{left} -@itemx C-@key{left} Move backward one word (@code{backward-word}). +@item C-@key{left} +Move one word to the left (@code{left-word}). This moves one word +backward in left-to-right text and one word forward in right-to-left +text. @item C-n @itemx @key{down} Move down one screen line (@code{next-line}). This command attempts === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-29 07:55:40 +0000 +++ lisp/ChangeLog 2010-05-29 15:19:13 +0000 @@ -1,5 +1,17 @@ 2010-05-29 Eli Zaretskii + Bidi-sensitive word movement with arrow keys. + * subr.el (right-arrow-command, left-arrow-command): Move to + bindings.el. + + * bindings.el (right-char, left-char): Move from subr.el and + rename from right-arrow-command and left-arrow-command. + (right-word, left-word): New functions. + (global-map) : Bind to right-char. + (global-map) : Bind to left-char. + (global-map) : Bind to right-word. + (global-map) : Bind to left-word. + * ls-lisp.el (ls-lisp-classify-file): New function. (ls-lisp-insert-directory): Call it if switches include -F (bug#6294). (ls-lisp-classify): Call ls-lisp-classify-file. === modified file 'lisp/bindings.el' --- lisp/bindings.el 2010-05-15 13:23:48 +0000 +++ lisp/bindings.el 2010-05-29 15:19:13 +0000 @@ -678,6 +678,63 @@ ;but they are not assigned to keys there. (put 'narrow-to-region 'disabled t) +;; Moving with arrows in bidi-sensitive direction. +(defun right-char (&optional n) + "Move point N characters to the right (to the left if N is negative). +On reaching beginning or end of buffer, stop and signal error. + +Depending on the bidirectional context, this may move either forward +or backward in the buffer. This is in contrast with \\[forward-char] +and \\[backward-char], which see." + (interactive "^p") + (if (eq (current-bidi-paragraph-direction) 'left-to-right) + (forward-char n) + (backward-char n))) + +(defun left-char ( &optional n) + "Move point N characters to the left (to the right if N is negative). +On reaching beginning or end of buffer, stop and signal error. + +Depending on the bidirectional context, this may move either backward +or forward in the buffer. This is in contrast with \\[backward-char] +and \\[forward-char], which see." + (interactive "^p") + (if (eq (current-bidi-paragraph-direction) 'left-to-right) + (backward-char n) + (forward-char n))) + +(defun right-word (&optional n) + "Move point N words to the right (to the left if N is negative). + +Depending on the bidirectional context, this may move either forward +or backward in the buffer. This is in contrast with \\[forward-word] +and \\[backward-word], which see. + +Value is normally t. +If an edge of the buffer or a field boundary is reached, point is left there +there and the function returns nil. Field boundaries are not noticed +if `inhibit-field-text-motion' is non-nil." + (interactive "^p") + (if (eq (current-bidi-paragraph-direction) 'left-to-right) + (forward-word n) + (backward-word n))) + +(defun left-word (&optional n) + "Move point N words to the left (to the right if N is negative). + +Depending on the bidirectional context, this may move either backward +or forward in the buffer. This is in contrast with \\[backward-word] +and \\[forward-word], which see. + +Value is normally t. +If an edge of the buffer or a field boundary is reached, point is left there +there and the function returns nil. Field boundaries are not noticed +if `inhibit-field-text-motion' is non-nil." + (interactive "^p") + (if (eq (current-bidi-paragraph-direction) 'left-to-right) + (backward-word n) + (forward-word n))) + (defvar narrow-map (make-sparse-keymap) "Keymap for narrowing commands.") (define-key ctl-x-map "n" narrow-map) @@ -828,9 +885,9 @@ (define-key global-map [C-home] 'beginning-of-buffer) (define-key global-map [M-home] 'beginning-of-buffer-other-window) (define-key esc-map [home] 'beginning-of-buffer-other-window) -(define-key global-map [left] 'left-arrow-command) +(define-key global-map [left] 'left-char) (define-key global-map [up] 'previous-line) -(define-key global-map [right] 'right-arrow-command) +(define-key global-map [right] 'right-char) (define-key global-map [down] 'next-line) (define-key global-map [prior] 'scroll-down-command) (define-key global-map [next] 'scroll-up-command) @@ -1030,8 +1087,8 @@ (global-set-key [M-left] 'backward-word) (define-key esc-map [left] 'backward-word) ;; ilya@math.ohio-state.edu says these bindings are standard on PC editors. -(global-set-key [C-right] 'forward-word) -(global-set-key [C-left] 'backward-word) +(global-set-key [C-right] 'right-word) +(global-set-key [C-left] 'left-word) ;; This is not quite compatible, but at least is analogous (global-set-key [C-delete] 'kill-word) (global-set-key [C-backspace] 'backward-kill-word) === modified file 'lisp/subr.el' --- lisp/subr.el 2010-05-25 00:54:13 +0000 +++ lisp/subr.el 2010-05-29 15:19:13 +0000 @@ -3802,30 +3802,5 @@ (prin1-to-string (make-hash-table))))) (provide 'hashtable-print-readable)) -;; Moving with arrows in bidi-sensitive direction. -(defun right-arrow-command (&optional n) - "Move point N characters to the right (to the left if N is negative). -On reaching beginning or end of buffer, stop and signal error. - -Depending on the bidirectional context, this may move either forward -or backward in the buffer. This is in contrast with \\[forward-char] -and \\[backward-char], which see." - (interactive "^p") - (if (eq (current-bidi-paragraph-direction) 'left-to-right) - (forward-char n) - (backward-char n))) - -(defun left-arrow-command ( &optional n) - "Move point N characters to the left (to the right if N is negative). -On reaching beginning or end of buffer, stop and signal error. - -Depending on the bidirectional context, this may move either backward -or forward in the buffer. This is in contrast with \\[backward-char] -and \\[forward-char], which see." - (interactive "^p") - (if (eq (current-bidi-paragraph-direction) 'left-to-right) - (backward-char n) - (forward-char n))) - ;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc ;;; subr.el ends here ------------------------------------------------------------ revno: 100475 [merge] committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2010-05-29 15:51:01 +0300 message: Fix cursor motion in bidi-reordered continued lines. xdisp.c (try_cursor_movement): Backup to non-continuation line only after finding point's row. Fix the logic. Rewrite the loop over continuation lines in bidi-reordered buffers. Return CURSOR_MOVEMENT_MUST_SCROLL upon failure to find a suitable row, rather than CURSOR_MOVEMENT_CANNOT_BE_USED. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-28 14:57:11 +0000 +++ src/ChangeLog 2010-05-29 12:51:01 +0000 @@ -1,3 +1,12 @@ +2010-05-29 Eli Zaretskii + + Fix cursor motion in bidi-reordered continued lines. + * xdisp.c (try_cursor_movement): Backup to non-continuation line + only after finding point's row. Fix the logic. Rewrite the loop + over continuation lines in bidi-reordered buffers. Return + CURSOR_MOVEMENT_MUST_SCROLL upon failure to find a suitable row, + rather than CURSOR_MOVEMENT_CANNOT_BE_USED. + 2010-05-28 Michael Albinus * fileio.c (Fdelete_file): Pass TRASH arg to handler call. === modified file 'src/xdisp.c' --- src/xdisp.c 2010-05-27 15:49:01 +0000 +++ src/xdisp.c 2010-05-29 10:49:21 +0000 @@ -13763,37 +13763,11 @@ ++row; if (!row->enabled_p) rc = CURSOR_MOVEMENT_MUST_SCROLL; - /* If rows are bidi-reordered, back up until we find a row - that does not belong to a continuation line. This is - because we must consider all rows of a continued line as - candidates for cursor positioning, since row start and - end positions change non-linearly with vertical position - in such rows. */ - /* FIXME: Revisit this when glyph ``spilling'' in - continuation lines' rows is implemented for - bidi-reordered rows. */ - if (!NILP (XBUFFER (w->buffer)->bidi_display_reordering)) - { - while (MATRIX_ROW_CONTINUATION_LINE_P (row)) - { - xassert (row->enabled_p); - --row; - /* If we hit the beginning of the displayed portion - without finding the first row of a continued - line, give up. */ - if (row <= w->current_matrix->rows) - { - rc = CURSOR_MOVEMENT_MUST_SCROLL; - break; - } - - } - } } if (rc == CURSOR_MOVEMENT_CANNOT_BE_USED) { - int scroll_p = 0; + int scroll_p = 0, must_scroll = 0; int last_y = window_text_bottom_y (w) - this_scroll_margin; if (PT > XFASTINT (w->last_point)) @@ -13886,10 +13860,41 @@ { /* if PT is not in the glyph row, give up. */ rc = CURSOR_MOVEMENT_MUST_SCROLL; - } - else if (rc != CURSOR_MOVEMENT_SUCCESS - && MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) - && make_cursor_line_fully_visible_p) + must_scroll = 1; + } + else if (rc != CURSOR_MOVEMENT_SUCCESS + && !NILP (XBUFFER (w->buffer)->bidi_display_reordering)) + { + /* If rows are bidi-reordered and point moved, back up + until we find a row that does not belong to a + continuation line. This is because we must consider + all rows of a continued line as candidates for the + new cursor positioning, since row start and end + positions change non-linearly with vertical position + in such rows. */ + /* FIXME: Revisit this when glyph ``spilling'' in + continuation lines' rows is implemented for + bidi-reordered rows. */ + while (MATRIX_ROW_CONTINUATION_LINE_P (row)) + { + xassert (row->enabled_p); + --row; + /* If we hit the beginning of the displayed portion + without finding the first row of a continued + line, give up. */ + if (row <= w->current_matrix->rows) + { + rc = CURSOR_MOVEMENT_MUST_SCROLL; + break; + } + + } + } + if (must_scroll) + ; + else if (rc != CURSOR_MOVEMENT_SUCCESS + && MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) + && make_cursor_line_fully_visible_p) { if (PT == MATRIX_ROW_END_CHARPOS (row) && !row->ends_at_zv_p @@ -13915,7 +13920,8 @@ } else if (scroll_p) rc = CURSOR_MOVEMENT_MUST_SCROLL; - else if (!NILP (XBUFFER (w->buffer)->bidi_display_reordering)) + else if (rc != CURSOR_MOVEMENT_SUCCESS + && !NILP (XBUFFER (w->buffer)->bidi_display_reordering)) { /* With bidi-reordered rows, there could be more than one candidate row whose start and end positions @@ -13928,8 +13934,11 @@ do { - rv |= set_cursor_from_row (w, row, w->current_matrix, - 0, 0, 0, 0); + if (MATRIX_ROW_START_CHARPOS (row) <= PT + && PT <= MATRIX_ROW_END_CHARPOS (row) + && cursor_row_p (w, row)) + rv |= set_cursor_from_row (w, row, w->current_matrix, + 0, 0, 0, 0); /* As soon as we've found the first suitable row whose ends_at_zv_p flag is set, we are done. */ if (rv @@ -13940,19 +13949,17 @@ } ++row; } - while (MATRIX_ROW_BOTTOM_Y (row) < last_y - && MATRIX_ROW_START_CHARPOS (row) <= PT - && PT <= MATRIX_ROW_END_CHARPOS (row) - && cursor_row_p (w, row)); + while ((MATRIX_ROW_CONTINUATION_LINE_P (row) + && MATRIX_ROW_BOTTOM_Y (row) <= last_y) + || (MATRIX_ROW_START_CHARPOS (row) == PT + && MATRIX_ROW_BOTTOM_Y (row) < last_y)); /* If we didn't find any candidate rows, or exited the loop before all the candidates were examined, signal to the caller that this method failed. */ if (rc != CURSOR_MOVEMENT_SUCCESS - && (!rv - || (MATRIX_ROW_START_CHARPOS (row) <= PT - && PT <= MATRIX_ROW_END_CHARPOS (row)))) - rc = CURSOR_MOVEMENT_CANNOT_BE_USED; - else + && (!rv || MATRIX_ROW_CONTINUATION_LINE_P (row))) + rc = CURSOR_MOVEMENT_MUST_SCROLL; + else if (rv) rc = CURSOR_MOVEMENT_SUCCESS; } else ------------------------------------------------------------ revno: 100474 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2010-05-29 10:55:40 +0300 message: Fix bug #6294. lisp/ls-lisp.el (ls-lisp-classify-file): New function. (ls-lisp-insert-directory): Call it if switches include -F. (ls-lisp-classify): Call ls-lisp-classify-file. (insert-directory): Remove blanks from switches. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-28 19:18:47 +0000 +++ lisp/ChangeLog 2010-05-29 07:55:40 +0000 @@ -1,3 +1,10 @@ +2010-05-29 Eli Zaretskii + + * ls-lisp.el (ls-lisp-classify-file): New function. + (ls-lisp-insert-directory): Call it if switches include -F (bug#6294). + (ls-lisp-classify): Call ls-lisp-classify-file. + (insert-directory): Remove blanks from switches. + 2010-05-28 Juri Linkov * image-dired.el (image-dired-dired-toggle-marked-thumbs): === modified file 'lisp/ls-lisp.el' --- lisp/ls-lisp.el 2010-02-10 08:46:54 +0000 +++ lisp/ls-lisp.el 2010-05-29 07:55:40 +0000 @@ -235,7 +235,7 @@ (if (string-match "--dired " switches) (setq switches (replace-match "" nil nil switches))) ;; Convert SWITCHES to a list of characters. - (setq switches (delete ?- (append switches nil))) + (setq switches (delete ?\ (delete ?- (append switches nil)))) ;; Sometimes we get ".../foo*/" as FILE. While the shell and ;; `ls' don't mind, we certainly do, because it makes us think ;; there is no wildcard, only a directory name. @@ -405,7 +405,11 @@ (setq file (substring file 0 -1))) (let ((fattr (file-attributes file 'string))) (if fattr - (insert (ls-lisp-format file fattr (nth 7 fattr) + (insert (ls-lisp-format + (if (memq ?F switches) + (ls-lisp-classify-file file fattr) + file) + fattr (nth 7 fattr) switches time-index (current-time))) (message "%s: doesn't exist or is inaccessible" file) (ding) (sit-for 2))))) ; to show user the message! @@ -522,29 +526,40 @@ (nreverse file-alist) file-alist)) +(defun ls-lisp-classify-file (filename fattr) + "Append a character to FILENAME indicating the file type. + +FATTR is the file attributes returned by `file-attributes' for the file. +The file type indicators are `/' for directories, `@' for symbolic +links, `|' for FIFOs, `=' for sockets, `*' for regular files that +are executable, and nothing for other types of files." + (let* ((type (car fattr)) + (modestr (nth 8 fattr)) + (typestr (substring modestr 0 1))) + (cond + (type + (concat filename (if (eq type t) "/" "@"))) + ((string-match "x" modestr) + (concat filename "*")) + ((string= "p" typestr) + (concat filename "|")) + ((string= "s" typestr) + (concat filename "=")) + (t filename)))) + (defun ls-lisp-classify (filedata) - "Append a character to each file name indicating the file type. -Also, for regular files that are executable, append `*'. + "Append a character to file name in FILEDATA indicating the file type. + +FILEDATA has the form (FILENAME . ATTRIBUTES), where ATTRIBUTES is the +structure returned by `file-attributes' for that file. + The file type indicators are `/' for directories, `@' for symbolic -links, `|' for FIFOs, `=' for sockets, and nothing for regular files. -\[But FIFOs and sockets are not recognized.] -FILEDATA has the form (filename . `file-attributes'). Its `cadr' is t -for directory, string (name linked to) for symbolic link, or nil." +links, `|' for FIFOs, `=' for sockets, `*' for regular files that +are executable, and nothing for other types of files." (let ((file-name (car filedata)) - (type (cadr filedata))) - (cond (type - (cons - (concat (propertize file-name 'dired-filename t) - (if (eq type t) "/" "@")) - (cdr filedata))) - ((string-match "x" (nth 9 filedata)) - (cons - (concat (propertize file-name 'dired-filename t) "*") - (cdr filedata))) - (t - (cons - (propertize file-name 'dired-filename t) - (cdr filedata)))))) + (fattr (cdr filedata))) + (setq file-name (propertize file-name 'dired-filename t)) + (cons (ls-lisp-classify-file file-name fattr) fattr))) (defun ls-lisp-extension (filename) "Return extension of FILENAME (ignoring any version extension) ------------------------------------------------------------ revno: 100473 committer: Juri Linkov branch nick: trunk timestamp: Fri 2010-05-28 22:18:47 +0300 message: * image-dired.el (image-dired-dired-toggle-marked-thumbs): Replace LOCALP arg of `dired-get-filename' 'no-dir with nil. (Bug#5270) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-28 14:48:56 +0000 +++ lisp/ChangeLog 2010-05-28 19:18:47 +0000 @@ -1,3 +1,9 @@ +2010-05-28 Juri Linkov + + * image-dired.el (image-dired-dired-toggle-marked-thumbs): + Replace LOCALP arg of `dired-get-filename' 'no-dir with nil. + (Bug#5270) + 2010-05-28 Michael Albinus * net/tramp.el (tramp-debug-message): Add `tramp-compat-funcall' === modified file 'lisp/image-dired.el' --- lisp/image-dired.el 2010-05-25 17:43:58 +0000 +++ lisp/image-dired.el 2010-05-28 19:18:47 +0000 @@ -642,7 +642,7 @@ (interactive "P") (dired-map-over-marks (let* ((image-pos (dired-move-to-filename)) - (image-file (dired-get-filename 'no-dir t)) + (image-file (dired-get-filename nil t)) thumb-file overlay) (when (and image-file (string-match-p (image-file-name-regexp) image-file)) ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.