------------------------------------------------------------ revno: 116708 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2014-03-08 23:26:20 +0100 message: lisp/frameset.el: Avoid computing frame-list unnecessarily. (frameset-restore): When no frame is visible, do not generate a list of frames, just make visible the selected one. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-03-08 06:56:22 +0000 +++ lisp/ChangeLog 2014-03-08 22:26:20 +0000 @@ -1,3 +1,8 @@ +2014-03-08 Juanma Barranquero + + * frameset.el (frameset-restore): When no frame is visible, do not + generate a list of frames, just make visible the selected one. + 2014-03-08 Dmitry Gutov * vc/vc-git.el (vc-git-command): Turn FILE-OR-LIST into nil when === modified file 'lisp/frameset.el' --- lisp/frameset.el 2014-03-05 16:22:47 +0000 +++ lisp/frameset.el 2014-03-08 22:26:20 +0000 @@ -1204,7 +1204,7 @@ ;; Make sure there's at least one visible frame. (unless (or (daemonp) (visible-frame-list)) - (make-frame-visible (car (frame-list)))))) + (make-frame-visible (selected-frame))))) ;; Register support ------------------------------------------------------------ revno: 116707 author: Luis Felipe López Acevedo committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2014-03-08 21:12:42 +0100 message: etc/tutorials/TUTORIAL.es: Fix typos. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2014-03-08 08:28:43 +0000 +++ etc/ChangeLog 2014-03-08 20:12:42 +0000 @@ -1,3 +1,7 @@ +2014-03-08 Luis Felipe López Acevedo (tiny change) + + * tutorials/TUTORIAL.es: Fix typos. + 2014-03-08 Eli Zaretskii * tutorials/TUTORIAL.he: Adapt to the recent changes in TUTORIAL. === modified file 'etc/tutorials/TUTORIAL.es' --- etc/tutorials/TUTORIAL.es 2014-03-06 11:12:25 +0000 +++ etc/tutorials/TUTORIAL.es 2014-03-08 20:12:42 +0000 @@ -29,8 +29,8 @@ pantalla; esto provee una continuidad para que pueda seguir leyendo el texto. -Lo primero que necesita saber es como moverse de un lugar a otro en el -texto. Ya sabe como avanzar una pantalla, con C-v. Para retroceder +Lo primero que necesita saber es cómo moverse de un lugar a otro en el +texto. Ya sabe cómo avanzar una pantalla, con C-v. Para retroceder una pantalla teclee M-v (mantenga oprimida la tecla META y teclee v, o teclee v si no tiene las teclas META, EDIT o ALT). @@ -52,7 +52,7 @@ Luego teclee C-l. Encuentre el cursor otra vez y note que el mismo texto está todavía cerca del cursor, pero ahora está en el centro de la pantalla. - Si vuelve teclear C-l, ese texto se moverá al principio de la + Si vuelve a teclear C-l, ese texto se moverá al principio de la pantalla. Al teclear C-l otra vez, se moverá al final de la pantalla. @@ -104,7 +104,7 @@ C-f puede moverse a través de una nueva línea igual que C-b. ->> Teclee algunos C-b más para que sienta por donde se encuentra el +>> Teclee algunos C-b más para que sienta por dónde se encuentra el cursor. Luego teclee C-f para regresar al final de la línea. Luego teclee otro C-f más para moverse a la línea siguiente. @@ -118,7 +118,7 @@ observe lo que sucede. Si moverse por caracteres es muy lento, puede moverse por palabras. -M-f (META-f) mueve adelante una palabra y M-b mueva atrás una palabra. +M-f (META-f) mueve adelante una palabra y M-b mueve atrás una palabra. >> Teclee algunos M-f y M-b @@ -281,7 +281,7 @@ ---------- Emacs puede tener varias "ventanas", cada una mostrando su propio texto. -Explicaremos después como usar múltiples ventanas. Ahora mismo +Explicaremos después cómo usar múltiples ventanas. Ahora mismo queremos explicar cómo deshacerse de ventanas adicionales y volver a la edición básica en una ventana. Es sencillo: @@ -415,7 +415,7 @@ que pueden quitar mucho texto lo eliminan (para que pueda pegarlo de nuevo) mientras que los comandos que quitan solo un carácter, o solo líneas en blanco y espacios, borran (y por tanto no se puede pegar lo -borrado). Si se normalmente, sin pasar un argumento, y C-d +borrado). Si se usa normalmente, sin pasar un argumento, y C-d borran. Con un argumento, eliminan. >> Mueva el cursor al comienzo de una línea que no esté vacía. @@ -534,7 +534,7 @@ punto. Una cosa especial acerca del comando para encontrar un archivo, es que -tendrá que decir que nombre de archivo desea. Decimos que el comando +tendrá que decir qué nombre de archivo desea. Decimos que el comando "lee un argumento" (en este caso, el argumento es el nombre del archivo). Después de teclear el comando: @@ -586,7 +586,7 @@ --------- Si visita un segundo archivo con C-x C-f, el primer archivo permanece -dentro de Emacs. Puede volver a el encontrándolo de nuevo con C-x +dentro de Emacs. Puede volver a él encontrándolo de nuevo con C-x C-f. De esta forma puede mantener un gran número de archivos dentro de Emacs. @@ -624,7 +624,7 @@ Algunos buffers no corresponden a un archivo. El buffer llamado "*Buffer List*", que contiene la lista de buffers que ha creado con C-x C-b, no tiene archivo. Este buffer TUTORIAL.es al principio no -tenía archivo, pero ahora ya sí, porque en la sección anterior tecleó +tenía archivo, pero ahora sí, porque en la sección anterior tecleó C-x C-s y lo guardó en un archivo. El buffer llamado "*Messages*" tampoco tiene un archivo @@ -645,7 +645,7 @@ C-x s Guardar algunos buffers C-x s le pregunta sobre cada buffer que contenga cambios que no haya -guardada. Le pregunta, por cada buffer, si quiere guardarlo o no. +guardado. Le pregunta, por cada buffer, si quiere guardarlo o no. >> Inserte una línea de texto, luego teclee C-x s. Debería preguntarle si desea guardar el buffer llamado TUTORIAL.es. @@ -803,7 +803,7 @@ No se preocupe, ninguno de los comandos de Emacs que ha aprendido cambia de manera significativa. Pero puede observar que M-f y M-b -tratan los apóstrofes como parte de las palabras. Previamente, en +tratan los apóstrofos como parte de las palabras. Previamente, en modo Fundamental, M-f y M-b trataban los apóstrofes como separadores de palabras. @@ -818,7 +818,7 @@ >> Use C-l C-l para traer esta línea a la parte superior de la pantalla. ->> Teclee C-h m, para ver como el modo de Texto difiere del modo +>> Teclee C-h m para ver cómo el modo de Texto difiere del modo Fundamental. >> Teclee C-x 1 para eliminar la documentación de la pantalla. @@ -853,7 +853,7 @@ >> Teclee C-x f con un argumento de 20. (C-u 2 0 C-x f). Luego teclee algún texto y vea como Emacs lo parte en líneas de 20 - caracteres. A continuación ponga de nuevo el margen a 70 usando + caracteres. A continuación ponga de nuevo el margen en 70 usando otra vez C-x f. Si hace cambios en el medio de un párrafo, el modo Auto Fill no lo @@ -951,7 +951,7 @@ Puede continuar usando C-x o para cambiar entre las ventanas. La "ventana seleccionada", donde tiene lugar casi toda la edición, es la que tiene un cursor muy visible que parpadea cuando usted no está -tecleando. Las otras ventanas tienen sus propia posición del cursor; +tecleando. Las otras ventanas tienen su propia posición del cursor; si está ejecutando Emacs en una pantalla gráfica, esos cursores se muestran como rectángulos vacíos que no parpadean. @@ -1143,7 +1143,7 @@ La completación es una manera de ahorrar teclear innecesariamente. Por ejemplo, si quiere cambiarse al buffer "*Messages*", puede teclear -C-x b *M y emacs encontrará el resto del nombre del buffer tan +C-x b *M y Emacs encontrará el resto del nombre del buffer tan lejos como pueda determinar de lo que ya haya tecleado. La completación también funciona con nombres de comandos y de archivos. La completación se describe en el Info del manual de Emacs en el nodo @@ -1193,6 +1193,7 @@ Vladimir Támara Rafael Sepúlveda Juanma Barranquero + Luis Felipe López Acevedo La versión en español ha sido actualizada por: ------------------------------------------------------------ revno: 116706 fixes bug: http://debbugs.gnu.org/14713 committer: Jan Djärv branch nick: trunk timestamp: Sat 2014-03-08 16:49:59 +0100 message: * nsterm.h (MAC_OS_X_VERSION_10_9): Add. * nsterm.m (constrainFrameRect:toScreen:): Constrain normally when frame is only on one screen. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-03-08 10:54:43 +0000 +++ src/ChangeLog 2014-03-08 15:49:59 +0000 @@ -1,3 +1,10 @@ +2014-03-08 Jan Djärv + + * nsterm.h (MAC_OS_X_VERSION_10_9): Add. + + * nsterm.m (constrainFrameRect:toScreen:): Constrain normally when frame + is only on one screen (Bug#14713). + 2014-03-08 Eli Zaretskii * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and === modified file 'src/nsterm.h' --- src/nsterm.h 2014-01-20 19:44:56 +0000 +++ src/nsterm.h 2014-03-08 15:49:59 +0000 @@ -42,6 +42,9 @@ #ifndef MAC_OS_X_VERSION_10_8 #define MAC_OS_X_VERSION_10_8 1080 #endif +#ifndef MAC_OS_X_VERSION_10_9 +#define MAC_OS_X_VERSION_10_9 1090 +#endif #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 #define HAVE_NATIVE_FS === modified file 'src/nsterm.m' --- src/nsterm.m 2014-02-16 09:51:41 +0000 +++ src/nsterm.m 2014-03-08 15:49:59 +0000 @@ -6963,7 +6963,8 @@ { /* When making the frame visible for the first time or if there is just one screen, we want to constrain. Other times not. */ - NSUInteger nr_screens = [[NSScreen screens] count]; + NSArray *screens = [NSScreen screens]; + NSUInteger nr_screens = [screens count], nr_eff_screens = 0, i; struct frame *f = ((EmacsView *)[self delegate])->emacsframe; NSTRACE (constrainFrameRect); NSTRACE_RECT ("input", frameRect); @@ -6971,6 +6972,31 @@ if (ns_menu_bar_should_be_hidden ()) return frameRect; + if (nr_screens == 1) + return [super constrainFrameRect:frameRect toScreen:screen]; + +#ifdef NS_IMPL_COCOA +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 + // If separate spaces is on, it is like each screen is independent. There is + // no spanning of frames across screens. + if ([NSScreen screensHaveSeparateSpaces]) + return [super constrainFrameRect:frameRect toScreen:screen]; +#endif +#endif + + for (i = 0; i < nr_screens; ++i) + { + NSScreen *s = [screens objectAtIndex: i]; + NSRect scrrect = [s frame]; + NSRect intersect = NSIntersectionRect (frameRect, scrrect); + + if (intersect.size.width > 0 || intersect.size.height > 0) + ++nr_eff_screens; + } + + if (nr_eff_screens == 1) + return [super constrainFrameRect:frameRect toScreen:screen]; + /* The default implementation does two things 1) ensure that the top of the rectangle is below the menu bar (or below the top of the screen) and 2) resizes windows larger than the screen. As we ------------------------------------------------------------ revno: 116705 fixes bug: http://debbugs.gnu.org/16961 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2014-03-08 15:18:43 +0200 message: src/xdisp.c (Fmove_point_visually): Fix previous change. diff: === modified file 'src/xdisp.c' --- src/xdisp.c 2014-03-08 10:54:43 +0000 +++ src/xdisp.c 2014-03-08 13:18:43 +0000 @@ -20880,7 +20880,10 @@ SAVE_IT (it2, it, it_data); move_it_in_display_line_to (&it, ZV, target_x, MOVE_TO_POS | MOVE_TO_X); - target_x = it.current_x - 1; + /* If we arrived at target_x, that _is_ the last + character on the previous line. */ + if (it.current_x != target_x) + target_x = it.current_x - 1; RESTORE_IT (&it, &it2, it_data); } } ------------------------------------------------------------ revno: 116704 fixes bug: http://debbugs.gnu.org/16961 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2014-03-08 12:54:43 +0200 message: Fix more failures of visual-order cursor movement under word-wrap (bug#16961). src/xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and there's a valid wrap point in the display line, the last glyph cannot "just barely fit" on this row, because display_line doesn't let it. Instead, proceed as if the last glyph didn't fit, so that we eventually back up the iterator to the wrap point. This avoids delusional behavior of move_it_to, whereby it proceeds to the next display line, but sets current_x to zero for all the glyphs that without word-wrap would fit on the previous display line. One result was that visual-order cursor movement behaved erratically under word-wrap. (Fmove_point_visually): Add code to find the x coordinate of the last character before wrap point, under word-wrap on a TTY. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-03-07 20:00:33 +0000 +++ src/ChangeLog 2014-03-08 10:54:43 +0000 @@ -1,3 +1,18 @@ +2014-03-08 Eli Zaretskii + + * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and + there's a valid wrap point in the display line, the last glyph + cannot "just barely fit" on this row, because display_line doesn't + let it. Instead, proceed as if the last glyph didn't fit, so that + we eventually back up the iterator to the wrap point. This avoids + delusional behavior of move_it_to, whereby it proceeds to the next + display line, but sets current_x to zero for all the glyphs that + without word-wrap would fit on the previous display line. One + result was that visual-order cursor movement behaved erratically + under word-wrap. + (Fmove_point_visually): Add code to find the x coordinate of the + last character before wrap point, under word-wrap on a TTY. + 2014-03-07 Eli Zaretskii * xdisp.c (Fmove_point_visually): When under word-wrap, accept === modified file 'src/xdisp.c' --- src/xdisp.c 2014-03-07 20:00:33 +0000 +++ src/xdisp.c 2014-03-08 10:54:43 +0000 @@ -8651,7 +8651,12 @@ doesn't fit on the line, e.g. a wide image. */ it->hpos == 0 || (new_x == it->last_visible_x - && FRAME_WINDOW_P (it->f))) + && FRAME_WINDOW_P (it->f) + /* When word-wrap is ON and we have a valid + wrap point, we don't allow the last glyph + to "just barely fit" on the line. */ + && (it->line_wrap != WORD_WRAP + || wrap_it.sp < 0))) { ++it->hpos; it->current_x = new_x; @@ -20857,6 +20862,27 @@ move_it_by_lines (&it, -1); target_x = it.last_visible_x - !FRAME_WINDOW_P (it.f); target_is_eol_p = true; + /* Under word-wrap, we don't know the x coordinate of + the last character displayed on the previous line, + which immediately precedes the wrap point. To find + out its x coordinate, we try moving to the right + margin of the window, which will stop at the wrap + point, and then reset target_x to point at the + character that precedes the wrap point. This is not + needed on GUI frames, because (see below) there we + move from the left margin one grapheme cluster at a + time, and stop when we hit the wrap point. */ + if (!FRAME_WINDOW_P (it.f) && it.line_wrap == WORD_WRAP) + { + void *it_data = NULL; + struct it it2; + + SAVE_IT (it2, it, it_data); + move_it_in_display_line_to (&it, ZV, target_x, + MOVE_TO_POS | MOVE_TO_X); + target_x = it.current_x - 1; + RESTORE_IT (&it, &it2, it_data); + } } } else ------------------------------------------------------------ revno: 116703 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2014-03-08 10:28:43 +0200 message: tutorials/TUTORIAL.he: Adapt to the recent changes in TUTORIAL. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2014-03-06 11:12:25 +0000 +++ etc/ChangeLog 2014-03-08 08:28:43 +0000 @@ -1,3 +1,7 @@ +2014-03-08 Eli Zaretskii + + * tutorials/TUTORIAL.he: Adapt to the recent changes in TUTORIAL. + 2014-03-06 Juanma Barranquero * tutorials/TUTORIAL.es: Adapt to change in English language tutorial. === modified file 'etc/tutorials/TUTORIAL.he' --- etc/tutorials/TUTORIAL.he 2014-01-01 08:31:29 +0000 +++ etc/tutorials/TUTORIAL.he 2014-03-08 08:28:43 +0000 @@ -279,7 +279,8 @@ כאשר שורה של טקסט נעשית ארוכה משורה אחת של תצוגה, חלק מהטקסט ממשיך בשורת תצוגה נוספת, היא "שורת ההמשך". על תצוגה גרפית יופיע חץ עקלקל קטן באזור השוליים -- "fringe" שמסמל כי לשורה יש שורת המשך, ואילו על תצוגה -טקסטואלית יופיע תו לוכסן ("/") לאותה תכלית בסוף השורה. +טקסטואלית יופיע תו לוכסן ('/' או '\', תלוי אם הוא בצד שמאל או בצד ימין) +לאותה תכלית, בסוף השורה. >> הקישו טקסט עד שתגיעו לקצה השורה, ואז תמשיכו להקיש עוד טקסט. כתוצאה, תראו שמופיעה שורת המשך. @@ -296,6 +297,12 @@ >> עתה הקישו כדי להחזיר את ה־Newline שמחקתם. +מקש הוא מיוחד בכך שהקשה עליו עשויה לגרום יותר מהכנסת תו +ה־Newline. בתלות בטקסט מסביב יתכן כי Emacs יכניס תווי רווח או TAB אחרי +תו ה־Newline, וזאת כדי ליישר את תחילת השורה החדשה עם הטקסט בשורה +הקודמת. התנהגות זו, שבה הקשה על מקש גורמת לתוצאות מעבר להכנסה פשוטה של +התו המתאים, נקראת "חשמלית" ("electric"). + זכרו כי לרוב הפקודות ב־Emacs אפשר לציין מספר חזרות. גם תוי טקסט שייכים לקבוצת פקודות זו. חזרה על תו טקסט מכניסה אותו מספר פעמים.